/* ============================================================
   Consulta de cursos - TransClavijo
   ============================================================ */

/* --- Iconos: tamanos conscientes y centrados --------------- */
svg { display: block; flex-shrink: 0; }
.icon-sm { width: 14px; height: 14px; }
.icon-md { width: 16px; height: 16px; }
.icon-lg { width: 20px; height: 20px; }

:root {
    --c-bg:        #f1f5f9;
    --c-surface:   #ffffff;
    --c-border:    #e2e8f0;
    --c-border-2:  #cbd5e1;

    --c-text:      #0f172a;
    --c-text-2:    #334155;
    --c-muted:     #64748b;

    --c-primary:   #2563eb;
    --c-primary-d: #1d4ed8;
    --c-primary-l: #dbeafe;

    --c-ok:        #16a34a;
    --c-ok-bg:     #dcfce7;
    --c-ok-bd:     #bbf7d0;

    --c-info:      #0ea5e9;
    --c-info-bg:   #e0f2fe;
    --c-info-bd:   #bae6fd;

    --c-warn:      #d97706;
    --c-warn-bg:   #fef3c7;
    --c-warn-bd:   #fde68a;

    --c-danger:    #dc2626;
    --c-danger-bg: #fee2e2;
    --c-danger-bd: #fecaca;

    --c-accent:    #7c3aed;
    --c-accent-bg: #ede9fe;
    --c-accent-bd: #ddd6fe;

    --shadow-sm:   0 1px 2px rgba(15,23,42,.04);
    --shadow:      0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --shadow-md:   0 4px 12px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
    --shadow-lg:   0 20px 40px rgba(15,23,42,.10), 0 8px 16px rgba(15,23,42,.06);

    --radius-sm:   6px;
    --radius:      10px;
    --radius-lg:   14px;
    --radius-xl:   20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Hero background para index */
body.page-hero {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(37,99,235,.12), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(124,58,237,.10), transparent 55%),
        linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-transparent {
    background: transparent;
    border-bottom: none;
    box-shadow: none;
    position: relative;
}
.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: .85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    text-decoration: none;
    color: var(--c-text);
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    color: #fff;
    border-radius: 8px;
    font-weight: 800;
    font-size: .78rem;
    letter-spacing: .03em;
    box-shadow: var(--shadow);
}
.brand-text {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -.01em;
}

/* ============================================================
   Main containers
   ============================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    flex: 1;
}

/* Index: card centrada verticalmente */
.index-main {
    display: flex;
    align-items: center;
    justify-content: center;
}
.index-card {
    width: 100%;
    max-width: 480px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}
.index-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -.01em;
    margin-bottom: .5rem;
}
.index-sub {
    color: var(--c-muted);
    font-size: .92rem;
    margin-bottom: 1.5rem;
}
.index-form {
    flex-direction: row !important;
    gap: .5rem;
}
.index-form > input {
    flex: 1;
    text-align: center;
}
@media (max-width: 480px) {
    .index-card { padding: 1.75rem 1.25rem; }
    .index-form { flex-direction: column !important; }
}

/* ============================================================
   Hero (index)
   ============================================================ */
.hero {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 2rem 1.5rem 3rem;
}
.hero-card {
    width: 100%;
    max-width: 520px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-xl);
    padding: 2.75rem 2.25rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.hero-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    color: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}
.hero-icon svg { width: 20px; height: 20px; }
.hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -.02em;
    margin-bottom: .5rem;
}
.hero-sub {
    color: var(--c-muted);
    font-size: .95rem;
    margin-bottom: 1.75rem;
}

/* ============================================================
   Forms
   ============================================================ */
.search-form {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--c-muted);
    pointer-events: none;
}
.input-group input {
    width: 100%;
    padding: .9rem 1rem .9rem 2.7rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--c-text);
    background: #f8fafc;
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius);
    outline: none;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.input-group input:focus {
    border-color: var(--c-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* Form simple (importar.php) */
.search-form > input[type="password"],
.search-form > input[type="text"] {
    flex: 1;
    padding: .85rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.search-form > input:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn, .boton, .search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .65rem 1.25rem;
    font-size: .9rem;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    transition: background .15s, border-color .15s, color .15s, transform .05s, box-shadow .15s;
    white-space: nowrap;
}
.btn:active, .boton:active { transform: translateY(1px); }

.btn-primary, .search-form button {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
    box-shadow: 0 1px 2px rgba(37,99,235,.25);
}
.btn-primary:hover, .search-form button:hover {
    background: var(--c-primary-d);
    border-color: var(--c-primary-d);
}

.btn-ghost {
    background: transparent;
    color: var(--c-text-2);
    border-color: var(--c-border);
}
.btn-ghost:hover {
    background: var(--c-surface);
    border-color: var(--c-border-2);
}

.btn-danger {
    background: transparent;
    color: var(--c-danger);
    border-color: var(--c-danger-bd);
}
.btn-danger:hover {
    background: var(--c-danger-bg);
    border-color: var(--c-danger);
}

.btn-lg {
    padding: .9rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--radius);
}
.btn-sm {
    padding: .45rem .85rem;
    font-size: .85rem;
}

/* boton legacy (volver) */
.boton {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
    margin-top: 1rem;
}
.boton:hover { background: var(--c-primary-d); }

/* ============================================================
   User card (resultados)
   ============================================================ */
.user-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
    overflow: hidden;
    position: relative;
}
.user-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
}

.user-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .02em;
    box-shadow: var(--shadow);
}
.user-card-title { flex: 1; min-width: 0; }
.user-card-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--c-text);
    margin-bottom: .35rem;
    word-wrap: break-word;
}
.user-card-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    font-size: .9rem;
    color: var(--c-muted);
}
.meta-item .meta-lbl { font-weight: 500; }

.user-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .75rem 1.25rem;
}
.field {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
}
.field-wide { grid-column: 1 / -1; }
.field-lbl {
    font-size: .72rem;
    font-weight: 600;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.field-val {
    font-size: .95rem;
    color: var(--c-text-2);
    word-wrap: break-word;
}

.hint {
    margin-top: 1rem;
    padding: .65rem .85rem;
    background: var(--c-warn-bg);
    border: 1px solid var(--c-warn-bd);
    border-radius: var(--radius);
    font-size: .85rem;
    color: #78350f;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.hint svg { width: 14px; height: 14px; }

/* ============================================================
   Badges & pills
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    border: 1px solid transparent;
}
.badge-warn { background: var(--c-warn-bg); color: var(--c-warn); border-color: var(--c-warn-bd); }
.badge-ok   { background: var(--c-ok-bg);   color: var(--c-ok);   border-color: var(--c-ok-bd); }

.pill {
    display: inline-flex;
    align-items: center;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 500;
    border: 1px solid transparent;
    white-space: nowrap;
    line-height: 1.4;
}
.pill-completado    { background: var(--c-ok-bg);     color: var(--c-ok);     border-color: var(--c-ok-bd); }
.pill-progreso      { background: var(--c-info-bg);   color: var(--c-info);   border-color: var(--c-info-bd); }
.pill-no-completado { background: var(--c-warn-bg);   color: var(--c-warn);   border-color: var(--c-warn-bd); }
.pill-otro          { background: #f1f5f9;            color: var(--c-text-2); border-color: var(--c-border); }

.pill-q-aprobado    { background: var(--c-ok-bg);     color: var(--c-ok);     border-color: var(--c-ok-bd); }
.pill-q-reprobado   { background: var(--c-danger-bg); color: var(--c-danger); border-color: var(--c-danger-bd); }
.pill-q-pendiente   { background: var(--c-info-bg);   color: var(--c-info);   border-color: var(--c-info-bd); }
.pill-q-na          { background: #f1f5f9;            color: var(--c-muted);  border-color: var(--c-border); }
.pill-q-otro        { background: #f1f5f9;            color: var(--c-text-2); border-color: var(--c-border); }

/* ============================================================
   KPIs
   ============================================================ */
.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.kpi {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    box-shadow: var(--shadow-sm);
    transition: transform .15s, box-shadow .15s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-num {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--c-text);
    line-height: 1;
    letter-spacing: -.02em;
}
.kpi-lbl {
    font-size: .72rem;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
}
.kpi-ok     { background: linear-gradient(180deg, #f0fdf4, #ffffff); border-color: var(--c-ok-bd); }
.kpi-ok     .kpi-num { color: var(--c-ok); }
.kpi-info   { background: linear-gradient(180deg, var(--c-info-bg), #ffffff); border-color: var(--c-info-bd); }
.kpi-info   .kpi-num { color: var(--c-info); }
.kpi-warn   { background: linear-gradient(180deg, var(--c-warn-bg), #ffffff); border-color: var(--c-warn-bd); }
.kpi-warn   .kpi-num { color: var(--c-warn); }
.kpi-accent { background: linear-gradient(180deg, var(--c-accent-bg), #ffffff); border-color: var(--c-accent-bd); }
.kpi-accent .kpi-num { color: var(--c-accent); }

/* ============================================================
   Toolbar (chips + search)
   ============================================================ */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: .85rem;
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .35rem;
    background: #f1f5f9;
    border: 1px solid var(--c-border);
    border-radius: 12px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .9rem;
    background: transparent;
    color: var(--c-text-2);
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.chip:hover {
    background: #ffffff;
    color: var(--c-primary-d);
}
.chip.active {
    background: #ffffff;
    color: var(--c-primary-d);
    border-color: var(--c-border);
    box-shadow: 0 1px 2px rgba(15,23,42,.08);
}
.chip-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 20px;
    padding: 0 .4rem;
    background: var(--c-border);
    color: var(--c-muted);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.chip.active .chip-count {
    background: var(--c-primary);
    color: #fff;
}

.search-inline {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 220px;
    max-width: 320px;
}
.search-inline svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--c-muted);
    pointer-events: none;
}
.search-inline input {
    width: 100%;
    padding: .5rem .85rem .5rem 2.1rem;
    font-size: .88rem;
    font-family: inherit;
    background: var(--c-surface);
    color: var(--c-text);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.search-inline input:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* ============================================================
   Tabla
   ============================================================ */
.tabla-wrap {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.tabla-scroll {
    max-height: 65vh;
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .88rem;
    min-width: 900px;
}
thead th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--c-muted);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .72rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}
tbody td {
    padding: .8rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--c-text-2);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafbfc; }

.text-right { text-align: right; }
.td-curso { font-weight: 500; color: var(--c-text); max-width: 320px; }
.td-fecha { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--c-muted); font-size: .85rem; }
.muted { color: var(--c-muted); }

.nota {
    display: inline-block;
    min-width: 48px;
    padding: .25rem .55rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
    font-size: .85rem;
}
.nota-ok  { background: var(--c-ok-bg);     color: var(--c-ok); }
.nota-mid { background: var(--c-warn-bg);   color: var(--c-warn); }
.nota-low { background: var(--c-danger-bg); color: var(--c-danger); }

.vacio-filtro {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 2rem 1rem;
    color: var(--c-muted);
    font-style: italic;
}
.vacio-filtro svg { width: 14px; height: 14px; }

/* ============================================================
   Estados (vacio, error, alerts)
   ============================================================ */
.empty-state {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 480px;
    margin: 2rem auto;
}
.empty-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: var(--c-primary-l);
    color: var(--c-primary);
    border-radius: 50%;
    margin-bottom: 1rem;
}
.empty-icon svg { width: 20px; height: 20px; }
.empty-state h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: .5rem;
}
.empty-state p {
    color: var(--c-muted);
    margin-bottom: 1.25rem;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    margin-bottom: 1rem;
}
.alert-error {
    background: var(--c-danger-bg);
    border-color: var(--c-danger-bd);
    color: #7f1d1d;
}
.alert-warn {
    background: var(--c-warn-bg);
    border-color: var(--c-warn-bd);
    color: #78350f;
}
.alert-success {
    background: var(--c-ok-bg);
    border-color: var(--c-ok-bd);
    color: #14532d;
}
.alert-success h2 { color: #14532d; margin-bottom: .75rem; font-size: 1.1rem; }
.alert-success code { background: rgba(255,255,255,.6); }

/* Importar: cards de subida */
.upload-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}
.upload-card h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 1rem;
}
.upload-card-alt { background: #f8fafc; }

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Input file estilo dropzone */
.file-input {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: 2rem 1.5rem;
    background: #f8fafc;
    border: 2px dashed var(--c-border-2);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    text-align: center;
}
.file-input:hover {
    border-color: var(--c-primary);
    background: var(--c-primary-l);
}
.file-input input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.file-input-text {
    font-size: .95rem;
    font-weight: 500;
    color: var(--c-text-2);
}
.file-input-hint {
    font-size: .78rem;
    color: var(--c-muted);
}

.archivo-actual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .5rem 1.25rem;
    margin-bottom: 1rem;
    padding: .85rem 1rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
}
.archivo-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

/* Importar: layout */
.import-main h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: .25rem;
    color: var(--c-text);
    letter-spacing: -.01em;
}
.import-main h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-text);
    margin: 1.5rem 0 .5rem;
}

.resumen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem 1.25rem;
}

/* Log de progreso de importacion */
.progreso-log {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: .85rem 1.15rem;
    margin: 1rem 0;
    max-height: 240px;
    overflow-y: auto;
    font-size: .88rem;
    color: var(--c-text-2);
}
.progreso-linea {
    margin: .15rem 0;
    font-variant-numeric: tabular-nums;
}

/* Tabla de diagnostico (importar) con barras */
.tabla-diag .th-bar { width: 35%; }
.tabla-diag .td-bar { padding: .8rem 1rem; vertical-align: middle; }
.bar {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width .25s;
}
.pct {
    display: inline-block;
    min-width: 56px;
    padding: .2rem .55rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    font-size: .82rem;
    border: 1px solid transparent;
}
.pct-ok    { background: var(--c-ok-bg);   color: var(--c-ok);   border-color: var(--c-ok-bd); }
.pct-mid   { background: var(--c-warn-bg); color: var(--c-warn); border-color: var(--c-warn-bd); }
.pct-high  { background: var(--c-danger-bg); color: var(--c-danger); border-color: var(--c-danger-bd); }
.bar-fill.pct-ok   { background: var(--c-ok); }
.bar-fill.pct-mid  { background: var(--c-warn); }
.bar-fill.pct-high { background: var(--c-danger); }

/* legacy .vacio (importar.php) */
.vacio {
    background: var(--c-warn-bg);
    border: 1px solid var(--c-warn-bd);
    color: #78350f;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin: 1rem 0;
}

/* legacy .info-usuario (importar.php diagnostico) */
.info-usuario {
    background: var(--c-primary-l);
    padding: 1.25rem;
    border-left: 4px solid var(--c-primary);
    border-radius: var(--radius);
    margin: 1rem 0 1.5rem;
}
.info-usuario h2 { color: var(--c-primary-d); margin-bottom: .5rem; }

code {
    background: #f1f5f9;
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .88em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
    color: var(--c-text-2);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    padding: 1.5rem;
    text-align: center;
    color: var(--c-muted);
    font-size: .8rem;
    border-top: 1px solid var(--c-border);
    background: transparent;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
    .container { padding: 1rem 1rem 2rem; }
    .topbar-inner { padding: .75rem 1rem; }
    .brand-text { display: none; }
    .hero-card { padding: 2rem 1.5rem; }
    .user-card { padding: 1.25rem; }
    .user-card-title h1 { font-size: 1.25rem; }
    .avatar { width: 48px; height: 48px; font-size: 1rem; }
    .kpi-num { font-size: 1.5rem; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .search-inline { max-width: none; }
    table { font-size: .82rem; }
    thead th, tbody td { padding: .65rem .75rem; }
}
