@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* =========================================
   BOTÓN DE TRADUCCIÓN (ES <-> EN)
   ========================================= */
.btn-traducir {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #0284C7;
    color: #FFFFFF;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-traducir:hover { background: #0369A1; transform: translateY(-1px); }
.btn-traducir:disabled,
.btn-traducir.is-loading { opacity: 0.7; cursor: wait; transform: none; }

#btn-guardar.is-loading,
#btn-guardar:disabled,
.btn-primary.is-loading,
.btn-primary:disabled.is-loading,
.btn-warn.is-loading,
.btn-success.is-loading,
.btn-danger.is-loading,
.btn-form-dark.is-loading {
    cursor: wait !important;
    opacity: 0.88;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    vertical-align: -2px;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}
.btn-traducir .bt-globo { font-size: 16px; line-height: 1; }

.lang-switch-mount { margin-bottom: 10px; }

.sidebar-footer .lang-switch-mount {
    margin-bottom: 12px;
}

.btn-traducir--sidebar {
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: none;
    padding: 9px 12px;
    font-size: 12px;
}

.lang-switch-mount--corner {
    position: fixed;
    top: calc(var(--inst-header-height, 96px) + 10px);
    right: 16px;
    z-index: 1000;
    margin-bottom: 0;
}

.lang-switch-mount--inline {
    margin-bottom: 0;
    flex-shrink: 0;
}

.eval-top .lang-switch-mount--inline .btn-traducir {
    box-shadow: none;
}

/* =========================================
   SELECTOR DE TIPO DE PARTICIPANTE (registro)
   ========================================= */
.tipo-part-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tipo-part-opt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.tipo-part-opt:hover { border-color: #0284C7; background: #F8FAFC; }

.tipo-part-opt:has(input:checked) {
    border-color: #0284C7;
    background: #EFF6FF;
    box-shadow: 0 0 0 1px #0284C7 inset;
}

.tipo-part-opt input[type="radio"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: #0284C7;
    cursor: pointer;
}

.tipo-part-opt span { display: flex; flex-direction: column; gap: 2px; }
.tipo-part-opt span strong { font-size: 14px; color: #1E293B; }
.tipo-part-opt span small { font-size: 12px; color: #64748B; }

/* Ocultar la barra superior de Google Translate y evitar que empuje la página */
.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.skiptranslate iframe { display: none !important; }

body { top: 0 !important; position: static !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* =========================================
   DESIGN TOKENS — Minimalista
   ========================================= */
:root {
    --bg-sidebar: #1E293B;
    --bg-sidebar-hover: #334155;
    --brand: #2563EB;
    --brand-soft: #EFF6FF;
    --bg-main: #F9FAFB;
    --surface: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E7EB;
    --border-focus: #93C5FD;
    --success: #059669;
    --success-soft: #ECFDF5;
    --danger: #DC2626;
    --danger-soft: #FEF2F2;
    --warning: #D97706;
    --warning-soft: #FFFBEB;

    /* Dual-tone suave: fondo claro + texto/icono (banderas y estados) */
    --tone-success-bg: #ECFDF5;
    --tone-success-fg: #047857;
    --tone-success-border: #A7F3D0;
    --tone-success-solid: #059669;

    --tone-info-bg: #EFF6FF;
    --tone-info-fg: #3B6FA8;
    --tone-info-border: #BFDBFE;
    --tone-info-solid: #4A7AB8;

    --tone-warning-bg: #FFFBEB;
    --tone-warning-fg: #B45309;
    --tone-warning-border: #FDE68A;
    --tone-warning-solid: #C68A1A;

    --tone-danger-bg: #FEF2F2;
    --tone-danger-fg: #B91C1C;
    --tone-danger-border: #FECACA;
    --tone-danger-solid: #C53030;

    --tone-neutral-bg: #F8FAFC;
    --tone-neutral-fg: #64748B;
    --tone-neutral-border: #E2E8F0;
    --tone-neutral-solid: #64748B;

    --tone-purple-bg: #F5F3FF;
    --tone-purple-fg: #6D28D9;
    --tone-purple-border: #DDD6FE;
    --tone-purple-solid: #7C6BAF;

    /* Botones de barra / filtros — minimalista */
    --chrome-bg: #F8FAFC;
    --chrome-border: #E5E7EB;
    --chrome-icon: #64748B;
    --chrome-hover-bg: #F1F5F9;
    --chrome-active-bg: #ECFDF5;
    --chrome-active-border: #A7F3D0;
    --chrome-active-icon: #059669;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --transition: 0.2s ease;
    --sidebar-width: 240px;
    --header-height: 56px;
    --inst-header-height: 108px;
}

*, *::before, *::after { box-sizing: border-box; }

/* =========================================
   ICONOS (Lucide) — base de plantilla
   ========================================= */
.lucide,
svg.lucide,
[data-lucide] {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    flex-shrink: 0;
    vertical-align: middle;
    display: inline-block;
}

/* Evita el "salto" de los <i> antes de convertirse en SVG */
i[data-lucide] { line-height: 0; }

/* Iconos dentro de botones de acción de tablas (32x32) */
.ico-btn { width: 16px; height: 16px; }

/* Iconos dentro de etiquetas de estado (badges) */
.ico-badge { width: 14px; height: 14px; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   HEADER INSTITUCIONAL — Logos del evento
   ========================================= */
.header-institucional {
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFC 70%, var(--bg-main) 100%);
    border-bottom: none;
}

.header-institucional-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 24px;
    width: 100%;
    flex-wrap: nowrap;
}

.header-logo-slot {
    flex: 1 1 0;
    min-width: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
}

.header-institucional .header-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Ajuste fino por logo (compensa padding interno de cada PNG) */
.header-institucional .header-logo--uam { transform: scale(0.95); }
.header-institucional .header-logo--amidiq { transform: scale(0.9); }
.header-institucional .header-logo--amoaiq { transform: scale(1); }
.header-institucional .header-logo--itesi {
    transform: scale(0.98);
    image-rendering: auto;
    object-fit: contain;
}
.header-institucional .header-logo--tec { transform: scale(0.96); }
.header-logo-slot:has(.header-logo--itesi) {
    flex: 1.85 1 0;
    min-width: 160px;
    height: 80px;
}

/* Dashboard: sidebar hasta arriba; logos del evento solo sobre el contenido */
body:has(.app-layout) .header-institucional {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

body:has(.app-layout) .header-institucional-inner {
    justify-content: space-between;
    gap: 10px;
}

body:has(.app-layout) .header-logo-slot {
    height: 72px;
}
body:has(.app-layout) .header-logo-slot:has(.header-logo--itesi) {
    height: 78px;
    flex: 1.9 1 0;
    min-width: 170px;
}
body:has(.app-layout) .header-institucional .header-logo--itesi {
    transform: scale(0.96);
}

body:has(.app-layout) .header-institucional .header-logo--amidiq { transform: scale(0.88); }

body:has(.app-layout) .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    min-height: 100dvh;
}

body:has(.app-layout) .app-layout {
    padding-left: var(--sidebar-width);
    min-height: calc(100dvh - var(--inst-header-height));
}

/* =========================================
   MÓDULO ASIGNACIÓN DE REVISORES
   ========================================= */
.asig-panel-modo {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.asig-modo-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.asig-modo-info .lucide { width: 18px; height: 18px; color: var(--brand); flex-shrink: 0; margin-top: 1px; }

/* Panel registro participantes (admin inscripciones) */
.insc-registro-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 18px;
}

.insc-registro-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.insc-registro-header h3 {
    margin: 0 0 4px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insc-registro-header h3 .lucide { width: 18px; height: 18px; color: var(--brand); }

.insc-registro-desc {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
    max-width: 520px;
}

.insc-registro-hint-warn {
    margin: 12px 0 0;
    font-size: 12px;
    color: #b45309;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

.insc-registro-hint-warn .lucide { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch--disabled { opacity: 0.55; cursor: not-allowed; }

.toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--brand, #0284c7);
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
    background: #e2e8f0;
}

.toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    min-width: 110px;
}

/* Certificados admin */
.cert-config-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 18px;
}

.cert-config-panel h3 {
    margin: 0 0 6px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cert-config-panel h3 .lucide { width: 18px; height: 18px; color: var(--brand); }

.cert-config-hint {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
}

.cert-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.cert-config-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.cert-config-grid input {
    font-weight: 400;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.cert-filtros { margin-bottom: 12px; }

.cert-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.cert-bulk-actions { margin-left: auto; }

.cert-lista { display: flex; flex-direction: column; gap: 10px; }

.cert-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.cert-row-check { flex-shrink: 0; }

.cert-row-body { flex: 1; min-width: 180px; }

.cert-row-body h4 { margin: 0 0 4px; font-size: 15px; }

.cert-row-body p { margin: 0; font-size: 12px; color: var(--text-muted); }

.cert-row-meta { flex-shrink: 0; }

.cert-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cert-loading, .cert-empty, .cert-error {
    padding: 20px 0;
    color: var(--text-muted);
}

.cert-error { color: #DC2626; }

.asig-modo-botones {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.asig-algoritmo-config {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.asig-objetivo-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.asig-objetivo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 8px 14px;
    border-radius: 8px;
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    font-size: 18px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1;
}

.asig-objetivo-input {
    width: 88px;
    padding: 8px 10px;
}

.asig-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 18px;
}

.asig-fichas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    align-items: start;
}

.asig-ficha-vacia {
    grid-column: 1 / -1;
}

.asig-ficha {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.asig-ficha:hover { border-color: #BFDBFE; }

.asig-ficha-head {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background var(--transition);
}

.asig-ficha-head:hover { background: var(--bg-main); }

.asig-ficha-info { flex: 1; min-width: 0; }

.asig-ficha-titulo {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
    word-break: break-word;
}

.asig-ficha-sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.asig-ficha-resumen {
    margin-top: 6px;
    font-size: 12px;
    color: #64748B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asig-ficha-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.asig-card { margin-bottom: 0; }

.asig-contador {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.asig-cont-ok { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.asig-cont-warn { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.asig-cont-empty { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }

.asig-slots-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
}

.asig-detalle-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.asig-sin-rev {
    margin: 0;
    padding: 28px 18px;
    text-align: center;
    color: #64748B;
    font-size: 13px;
    line-height: 1.5;
    background:
        linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
    border: 1px dashed #CBD5E1;
    border-radius: 14px;
}

.asig-rev-correo {
    display: block;
    font-size: 12px;
    color: #64748B;
    word-break: break-all;
    line-height: 1.4;
}

.asig-agregar-fila {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
    padding: 16px;
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
    border: 1px solid #E2E8F0;
    border-radius: 14px;
}

.asig-agregar-fila .asig-select {
    width: 100%;
    min-width: 0;
    border-radius: 10px;
    border-color: #CBD5E1;
    min-height: 42px;
}

.asig-btn-agregar {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 14px;
    background: linear-gradient(180deg, #22C55E 0%, #16A34A 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.asig-btn-agregar:hover {
    background: linear-gradient(180deg, #16A34A 0%, #15803D 100%);
    filter: brightness(1.02);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.28);
}

.asig-notificar-fila {
    margin-top: 12px;
}

.asig-btn-notificar {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 14px;
    background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.asig-btn-notificar:hover {
    background: linear-gradient(180deg, #2563EB 0%, #1D4ED8 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.asig-btn-notificar .lucide,
.asig-btn-notificar [data-lucide] { width: 16px; height: 16px; }

.asig-todos-asignados {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #166534;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 12px;
}

.asig-todos-asignados .lucide,
.asig-todos-asignados [data-lucide] {
    width: 16px;
    height: 16px;
    color: #059669;
}

.asig-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}

.asig-slot {
    position: relative;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 14px 14px 12px;
    min-width: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 20px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.asig-slot::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #94A3B8;
}

.asig-slot--ok::before { background: #22C55E; }
.asig-slot--eval::before { background: #3B82F6; }
.asig-slot--warn::before { background: #F59E0B; }

.asig-slot:hover {
    border-color: #CBD5E1;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 12px 28px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
}

.asig-slot-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.asig-slot-person {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    flex: 1;
    min-width: 0;
}

.asig-slot-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #1E3A8A;
    background: linear-gradient(145deg, #DBEAFE 0%, #EFF6FF 55%, #F8FAFC 100%);
    border: 1px solid #BFDBFE;
}

.asig-slot--eval .asig-slot-avatar {
    color: #1E40AF;
    background: linear-gradient(145deg, #BFDBFE 0%, #DBEAFE 60%, #EFF6FF 100%);
}

.asig-slot--ok .asig-slot-avatar {
    color: #166534;
    background: linear-gradient(145deg, #BBF7D0 0%, #DCFCE7 60%, #F0FDF4 100%);
    border-color: #86EFAC;
}

.asig-slot--warn .asig-slot-avatar {
    color: #92400E;
    background: linear-gradient(145deg, #FDE68A 0%, #FEF3C7 60%, #FFFBEB 100%);
    border-color: #FCD34D;
}

.asig-slot-info {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.asig-slot-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    flex-shrink: 0;
}

.asig-slot-foot {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #F1F5F9;
}

.asig-slot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.asig-slot-titulo {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #0F172A;
    line-height: 1.3;
    word-break: break-word;
}

.asig-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 999px;
    letter-spacing: 0.01em;
}

.asig-tag .lucide,
.asig-tag [data-lucide] { width: 13px; height: 13px; }
.asig-tag-ok { background: #ECFDF5; color: #166534; border: 1px solid #A7F3D0; }
.asig-tag-eval { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.asig-tag-warn { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.asig-tag-empty { background: #F8FAFC; color: #64748B; border: 1px solid #E2E8F0; }

.asig-slot-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.asig-select { cursor: pointer; flex: 1; min-width: 0; }

.asig-btn-cambiar,
.asig-btn-quitar {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 32px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 9px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.asig-btn-cambiar {
    background: #FFFFFF;
    color: #334155;
    border: 1px solid #CBD5E1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.asig-btn-cambiar:hover {
    background: #F8FAFC;
    border-color: #94A3B8;
    color: #0F172A;
}

.asig-btn-quitar {
    background: #FFF7F7;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.asig-btn-quitar:hover {
    background: #FEE2E2;
    border-color: #FCA5A5;
}

.asig-btn-cambiar .lucide,
.asig-btn-cambiar [data-lucide],
.asig-btn-quitar .lucide,
.asig-btn-quitar [data-lucide] {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .asig-slots { grid-template-columns: 1fr; }

    .asig-slot-main {
        flex-direction: column;
    }

    .asig-slot-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .asig-btn-cambiar,
    .asig-btn-quitar {
        flex: 1 1 auto;
    }
}

/* =========================================
   LAYOUT — Dashboard
   ========================================= */
.app-layout {
    display: flex;
    min-height: calc(100dvh - var(--inst-header-height));
    height: auto;
    overflow: visible;
    background: var(--bg-main);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.4);
    z-index: 998;
    opacity: 0;
    transition: opacity var(--transition);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 997;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.mobile-header-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mobile-brand-logo {
    height: 34px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
}

.mobile-header-title .lucide { width: 18px; height: 18px; color: var(--brand); }

.menu-toggle .lucide { width: 20px; height: 20px; }

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    color: var(--text-main);
    font-size: 18px;
    transition: background var(--transition);
}

.menu-toggle:hover { background: var(--bg-main); }

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--surface);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 999;
    transition: transform var(--transition);
    position: sticky;
    top: 0;
    min-height: calc(100dvh - var(--inst-header-height));
    align-self: stretch;
    box-shadow: 6px 0 28px rgba(15, 23, 42, 0.05);
}

.sidebar-header {
    padding: 22px 12px 18px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.sidebar-brand-logo {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    max-height: 76px;
    margin: 0 auto 16px;
    object-fit: contain;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-align: center;
    color: #FFFFFF;
    line-height: 1.3;
}

.sidebar-header h2 .lucide { width: 22px; height: 22px; color: var(--brand); }

.sidebar-header p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #9CA3AF;
    font-weight: 400;
    text-align: center;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    background: var(--bg-sidebar);
    scrollbar-width: thin;
    scrollbar-color: #475569 transparent;
}
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 999px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #64748B;
}

.nav-item {
    padding: 10px 14px;
    color: #9CA3AF;
    text-decoration: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 14px;
    transition: all var(--transition);
    cursor: pointer;
}

.nav-item .lucide { width: 18px; height: 18px; }

.nav-item:hover {
    background-color: var(--bg-sidebar-hover);
    color: var(--surface);
}

.nav-item.active {
    background-color: var(--brand);
    color: var(--surface);
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-modo-dual {
    margin-bottom: 12px;
}

.sidebar-modo-label {
    margin: 0 0 8px;
    font-size: 11px;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.btn-modo {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    background: transparent;
    color: #CBD5E1;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-modo:hover,
.btn-modo.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.btn-modo .lucide { width: 16px; height: 16px; }

.sidebar-modo-hint {
    margin: 8px 0 0;
    font-size: 10px;
    line-height: 1.4;
    color: #64748B;
}

.main-content {
    flex: 1;
    overflow-y: visible;
    padding: 32px;
    background-color: var(--bg-main);
    min-width: 0;
}

/* =========================================
   CARDS & SURFACES
   ========================================= */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    padding: 28px;
    border: 1px solid var(--border);
}

.profile-card {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 32px;
    padding: 32px 24px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    overflow: hidden;
    position: relative;
}

.profile-avatar-img,
.dashboard-perfil-img,
.perfil-foto-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar .lucide { width: 30px; height: 30px; }

/* Barra superior — acceso a perfil */
.dashboard-topbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: -8px 0 12px;
}

.edicion-admin-bar {
    flex: 1 1 320px;
    min-width: 0;
}

.edicion-admin-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 100%);
    border: 1px solid #BFDBFE;
    border-radius: var(--radius-md);
}

.edicion-admin-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.edicion-admin-select {
    min-width: 200px;
    max-width: 100%;
    flex: 1 1 180px;
    padding: 6px 10px;
    border: 1px solid #BFDBFE;
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-main);
}

.edicion-badge-activa {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--tone-success-bg);
    color: var(--tone-success-fg);
    border: 1px solid var(--tone-success-border);
    white-space: nowrap;
}

.edicion-btn-activar {
    color: #92400E;
    background: #FFFBEB;
    border-color: #FCD34D;
}

.edicion-banner-consulta {
    display: none;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px 14px;
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    border-radius: var(--radius-sm);
    color: #92400E;
    font-size: 13px;
    font-weight: 600;
}

.edicion-banner-consulta .lucide { width: 18px; height: 18px; flex-shrink: 0; }

body.edicion-solo-lectura .btn-primary,
body.edicion-solo-lectura .btn-add-action,
body.edicion-solo-lectura .btn-add-fecha,
body.edicion-solo-lectura #btn-nueva-edicion,
body.edicion-solo-lectura .fechas-card-delete,
body.edicion-solo-lectura .asig-btn-quitar,
body.edicion-solo-lectura .insc-btn-validar,
body.edicion-solo-lectura #btn-agregar-proyecto {
    pointer-events: none;
    opacity: 0.45;
}

body.edicion-solo-lectura .edicion-btn-activar,
body.edicion-solo-lectura #select-edicion-consulta,
body.edicion-solo-lectura #btn-nueva-edicion {
    pointer-events: auto;
    opacity: 1;
}

.dashboard-perfil-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    cursor: pointer;
    font-family: inherit;
    box-shadow: var(--shadow-xs);
    transition: border-color var(--transition), box-shadow var(--transition);
    max-width: min(100%, 320px);
}

.dashboard-perfil-btn:hover {
    border-color: #BFDBFE;
    box-shadow: var(--shadow-sm);
}

.dashboard-perfil-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.dashboard-perfil-avatar .lucide { width: 18px; height: 18px; }

.dashboard-perfil-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    text-align: left;
}

.dashboard-perfil-nombre {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.dashboard-perfil-rol {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.dashboard-perfil-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.perfil-modal-box { max-width: 480px; }

.perfil-modal-form { display: flex; flex-direction: column; gap: 16px; }

.perfil-foto-seccion {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.perfil-foto-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.perfil-foto-preview .lucide { width: 32px; height: 32px; }

.perfil-foto-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.perfil-btn-quitar-foto {
    color: #DC2626;
    border-color: #FECACA;
    background: #FEF2F2;
}

.perfil-modal-hint {
    margin: -4px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
}

.perfil-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.badge-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand);
    background: var(--brand-soft);
    border-color: transparent;
}

.badge-role .lucide { width: 14px; height: 14px; }

.profile-card h2 {
    color: var(--text-main);
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.profile-card p {
    color: var(--text-muted);
    margin: 0;
    font-size: 14px;
}

/* =========================================
   ACTION GRID
   ========================================= */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    max-width: 960px;
    margin: 0 auto;
}

.action-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    --card-accent: #3B82F6;
    --card-accent-2: #60A5FA;
    --card-ink: color-mix(in srgb, var(--card-accent) 72%, #0B1220);
    border-top: 4px solid var(--card-accent);
    padding: 18px 14px 16px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 120px;
}

.action-card:hover {
    border-color: color-mix(in srgb, var(--card-accent) 35%, var(--border));
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.action-card .icon-circle {
    width: 48px;
    height: 48px;
    position: relative;
    background: color-mix(in srgb, var(--card-accent) 8%, var(--surface));
    color: var(--card-ink);
    border-radius: 50%;
    border: 4px solid color-mix(in srgb, var(--card-accent) 32%, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0;
    transition: var(--transition);
    box-shadow: 0 10px 18px color-mix(in srgb, var(--card-accent) 24%, transparent);
}

.action-card .icon-circle .lucide { width: 22px; height: 22px; stroke-width: 2; }

.action-card .icon-circle::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 999px;
    background: conic-gradient(from 210deg, var(--card-accent), var(--card-accent-2), var(--card-accent));
    opacity: 0.25;
    filter: blur(6px);
    z-index: -1;
}

.action-card:hover .icon-circle {
    background: var(--card-accent);
    color: #fff;
    border-color: color-mix(in srgb, var(--card-accent) 45%, #fff);
}

/* Colores por ficha (Participante) */
#card-explorar { --card-accent: #3B82F6; --card-accent-2: #60A5FA; }
#card-nuevo-registro { --card-accent: #10B981; --card-accent-2: #34D399; }
#card-inscripcion { --card-accent: #8B5CF6; --card-accent-2: #A78BFA; }
#card-modificar { --card-accent: #F59E0B; --card-accent-2: #FBBF24; }
#card-credencial { --card-accent: #2563EB; --card-accent-2: #38BDF8; }
#card-factura { --card-accent: #06B6D4; --card-accent-2: #22C55E; }
#card-comprobante { --card-accent: #EC4899; --card-accent-2: #FB7185; }
#card-consultar-numero { --card-accent: #64748B; --card-accent-2: #94A3B8; }

.action-card[style*="flex"] {
    display: flex !important;
}

.action-card h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    width: 100%;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-primary {
    background-color: var(--text-main);
    color: var(--surface);
    border: none;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    width: 100%;
    font-family: inherit;
}

.btn-primary .lucide,
.btn-primary [data-lucide] { width: 16px; height: 16px; }

.btn-primary:hover { background-color: #374151; }

.btn-primary.btn-auto { width: auto; }

/* Agregar proyecto / fecha / etc.: negro, texto blanco visible */
.btn-add-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto !important;
    min-width: unset !important;
    height: auto !important;
    padding: 9px 16px !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    font-weight: 500;
    border: none !important;
    border-radius: 8px;
    background: var(--text-main) !important;
    color: #FFFFFF !important;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}

.btn-add-action:hover {
    background: #374151 !important;
    filter: none !important;
}

.btn-add-action .lucide,
.btn-add-action [data-lucide],
.btn-add-action svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
}

.btn-add-action > span {
    display: inline !important;
}

.btn-sidebar-logout {
    background: transparent;
    color: #F87171;
    border: 1px solid rgba(248, 113, 113, 0.25);
    padding: 10px 14px;
    width: 100%;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 14px;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-sidebar-logout .lucide { width: 16px; height: 16px; }

.btn-sidebar-logout:hover {
    background: rgba(248, 113, 113, 0.08);
}

/* =========================================
   FORMS
   ========================================= */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-main);
    font-size: 13px;
}

.form-group label .label-hint {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 400;
}

.institution-help-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 10px 0 14px;
    padding: 12px 14px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #1E40AF;
}

.institution-help-notice .institution-help-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #DBEAFE;
    color: #1D4ED8;
}

.institution-help-notice .institution-help-icon [data-lucide],
.institution-help-notice .institution-help-icon svg {
    width: 16px;
    height: 16px;
}

.institution-help-notice strong {
    display: block;
    color: #1E3A8A;
    font-size: 13px;
    margin-bottom: 2px;
}

.institution-help-email {
    color: #0284C7;
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
    margin-left: 4px;
}

.institution-help-email:hover {
    text-decoration: underline;
}

.mail-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 14px 16px;
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    border-left: 4px solid #F59E0B;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.55;
    color: #92400E;
}

.mail-notice-warning {
    background: #FFFBEB;
    border-color: #FCD34D;
    border-left-color: #F59E0B;
    color: #92400E;
}

.mail-notice-warning .mail-notice-icon {
    background: #FEF3C7;
    color: #D97706;
}

.mail-notice-success {
    background: #F0FDF4;
    border-color: #86EFAC;
    border-left-color: #22C55E;
    color: #166534;
}

.mail-notice-success .mail-notice-icon {
    background: #DCFCE7;
    color: #16A34A;
}

.mail-notice .mail-notice-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #FEF3C7;
    color: #D97706;
}

.mail-notice .mail-notice-icon [data-lucide],
.mail-notice .mail-notice-icon svg {
    width: 16px;
    height: 16px;
}

.mail-notice-title {
    font-weight: 700;
    color: #78350F;
    margin: 0 0 4px;
    font-size: 14px;
}

.mail-notice-body {
    margin: 0;
    color: #92400E;
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.password-toggle:hover {
    color: var(--text-main);
    background: var(--border);
}

.password-toggle .lucide {
    width: 18px;
    height: 18px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    background-color: var(--surface);
    color: var(--text-main);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

select.form-control { cursor: pointer; }

.checkbox-group {
    background: var(--bg-main);
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-main);
}

.checkbox-group label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    font-weight: 400;
    font-size: 13px;
}

.checkbox-group label:last-child { margin-bottom: 0; }

/* =========================================
   TABLES
   ========================================= */
.table-wrapper {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-xs);
    margin-top: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 560px;
}

/* Paginador reutilizable */
.paginador {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.paginador:empty {
    display: none;
}

.paginador-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-main);
    border-radius: var(--radius-sm, 8px);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.paginador-btn:hover:not(:disabled):not(.active) {
    background: var(--bg-main);
    border-color: var(--primary, #2563eb);
}

.paginador-btn.active {
    background: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
    color: #fff;
    cursor: default;
}

.paginador-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.paginador-btn i,
.paginador-btn svg {
    width: 16px;
    height: 16px;
}

.paginador-ellipsis {
    min-width: 24px;
    text-align: center;
    color: var(--text-muted);
    font-weight: 600;
}

th {
    background-color: var(--bg-main);
    color: var(--text-muted);
    padding: 12px 16px;
    font-weight: 500;
    font-size: 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    font-size: 14px;
}

tr:last-child td { border-bottom: none; }

tr:hover td { background-color: #FAFAFA; }

.proy-col-estatus { vertical-align: middle; white-space: nowrap; min-width: 140px; }
.proy-col-acciones {
    vertical-align: middle;
    white-space: nowrap;
    text-align: right;
}
.proy-col-acciones-inner {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
}

/* =========================================
   ESTADOS / BANDERAS — dual-tone
   (fondo claro + texto oscuro del mismo tono)
   ========================================= */
.estado-badge,
.badge-estado {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    border: 1px solid transparent;
    cursor: default;
    white-space: nowrap;
}

.estado-badge .lucide,
.estado-badge .ico-badge,
.badge-estado .lucide,
.badge-estado .ico-badge {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke-width: 2.25;
}

.estado-success { background: var(--tone-success-bg); color: var(--tone-success-fg); border-color: var(--tone-success-border); }
.estado-info { background: var(--tone-info-bg); color: var(--tone-info-fg); border-color: var(--tone-info-border); }
.estado-warning { background: var(--tone-warning-bg); color: var(--tone-warning-fg); border-color: var(--tone-warning-border); }
.estado-danger { background: var(--tone-danger-bg); color: var(--tone-danger-fg); border-color: var(--tone-danger-border); }
.estado-neutral { background: var(--tone-neutral-bg); color: var(--tone-neutral-fg); border-color: var(--tone-neutral-border); }
.estado-purple { background: var(--tone-purple-bg); color: var(--tone-purple-fg); border-color: var(--tone-purple-border); }

/* =========================================
   BADGES & SMALL BUTTONS
   ========================================= */
.badge {
    background-color: var(--bg-main);
    padding: 3px 10px;
    border-radius: 100px;
    font-weight: 500;
    font-size: 12px;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.rev-areas-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.badge-area {
    display: inline-block;
    max-width: 100%;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--tone-info-fg);
    background: var(--tone-info-bg);
    border: 1px solid var(--tone-info-border);
    word-break: break-word;
}

.badge-area + .badge-area {
    color: var(--tone-success-fg);
    background: var(--tone-success-bg);
    border-color: var(--tone-success-border);
}

/* =========================================
   REVISORES — RESUMEN (mini dashboard)
   ========================================= */
.rev-resumen { margin-bottom: 16px; }
.rev-resumen .adm-dash-hero-strip { margin-bottom: 10px; }

/* ===== Revisores: tarjetas KPI ===== */
.rev-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) 1.4fr;
    gap: 12px;
    margin-bottom: 16px;
}

.rev-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-xs);
}

.rev-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rev-kpi-icon .ico-badge { width: 20px; height: 20px; }
.rev-kpi-icon-total { background: #EFF6FF; color: #2563EB; }
.rev-kpi-icon-ok { background: #ECFDF5; color: #059669; }
.rev-kpi-icon-info { background: #EFF6FF; color: #3B82F6; }
.rev-kpi-icon-warn { background: #FFFBEB; color: #D97706; }

.rev-kpi-body { display: flex; flex-direction: column; min-width: 0; }
.rev-kpi-label { font-size: 12px; color: var(--text-muted); }
.rev-kpi-num { font-size: 26px; font-weight: 700; color: var(--text-main); line-height: 1.1; }
.rev-kpi-sub { font-size: 11px; color: var(--text-light); margin-top: 2px; }

.rev-kpi-card-donut { flex-direction: column; align-items: flex-start; gap: 8px; }
.rev-kpi-card-donut .rev-kpi-label { font-weight: 600; }
.rev-kpi-donut-row { display: flex; align-items: center; gap: 16px; width: 100%; }

/* ===== Donut multicolor ===== */
.rev-donut-multi {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rev-donut-multi-inner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
}

/* ===== Leyenda ===== */
.rev-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.rev-legend li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-main); }
.rev-legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.rev-legend-label { flex: 1; min-width: 0; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rev-legend-val { font-weight: 700; color: var(--text-main); }

/* ===== Revisores: gráficas inferiores ===== */
.rev-charts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.rev-chart-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
}
.rev-chart-title { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--text-main); }
.rev-chart-donut-row { display: flex; align-items: center; gap: 16px; }
.rev-chart-total { margin: 14px 0 0; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.rev-chart-empty { margin: 0; font-size: 12px; color: var(--text-light); }

/* ===== Barras (estado de participación) ===== */
.rev-barchart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 12px;
    height: 150px;
    padding-top: 6px;
}
.rev-bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; height: 100%; }
.rev-bar-val { font-size: 13px; font-weight: 700; color: var(--text-main); }
.rev-bar-track { flex: 1; width: 34px; display: flex; align-items: flex-end; }
.rev-bar-fill { width: 100%; border-radius: 6px 6px 0 0; min-height: 4px; transition: height var(--transition); }
.rev-bar-label { font-size: 11px; color: var(--text-muted); text-align: center; }

@media (max-width: 1024px) {
    .rev-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rev-kpi-card-donut { grid-column: 1 / -1; }
    .rev-charts { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .rev-kpis { grid-template-columns: 1fr; }
}
.rev-resumen-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rev-resumen-area {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
}
.rev-resumen-area small {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
}

/* Home revisor/evaluador */
.rev-home-resumen { margin-bottom: 16px; }
.rev-home-resumen .adm-dash-hero-strip { margin-bottom: 0; }

/* Botones de acción: solo ícono blanco sobre fondo sólido */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    margin-left: 4px;
    border: 1px solid var(--chrome-border);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition);
    font-family: inherit;
    color: var(--chrome-icon);
    background: var(--chrome-bg);
    vertical-align: middle;
}

.btn-icon .lucide,
.btn-icon .ico-btn,
.btn-icon svg {
    width: 16px;
    height: 16px;
    color: currentColor;
    stroke: currentColor;
}

.btn-icon:hover {
    background: var(--chrome-hover-bg);
    transform: none;
    filter: none;
}

.btn-icon:active { transform: none; }

.btn-icon-success {
    background: var(--tone-success-bg);
    border-color: var(--tone-success-border);
    color: var(--tone-success-fg);
}

.btn-icon-info,
.btn-icon-primary {
    background: var(--tone-info-bg);
    border-color: var(--tone-info-border);
    color: var(--tone-info-fg);
}

.btn-icon-warning {
    background: var(--tone-warning-bg);
    border-color: var(--tone-warning-border);
    color: var(--tone-warning-fg);
}

.btn-icon-danger {
    background: var(--tone-danger-bg);
    border-color: var(--tone-danger-border);
    color: var(--tone-danger-fg);
}

.btn-icon-neutral {
    background: var(--tone-neutral-bg);
    border-color: var(--tone-neutral-border);
    color: var(--tone-neutral-fg);
}

.btn-icon-purple {
    background: var(--tone-purple-bg);
    border-color: var(--tone-purple-border);
    color: var(--tone-purple-fg);
}

.btn-icon-purple:hover {
    background: #EDE9FE;
    border-color: var(--tone-purple-border);
    color: var(--tone-purple-fg);
}

.btn-icon-purple:hover .lucide,
.btn-icon-purple:hover .ico-btn,
.btn-icon-purple:hover svg {
    color: var(--tone-purple-fg);
    stroke: currentColor;
}

.btn-icon-muted:hover {
    background: #E2E8F0;
    border-color: var(--chrome-border);
    color: var(--chrome-icon);
}

/* Enlaces con btn-primary: no heredar hover blanco/invisible */
a.btn-primary,
a.btn-primary.btn-sm {
    width: auto;
    text-decoration: none !important;
    background-color: var(--text-main);
    color: #FFFFFF !important;
    border: none;
}

a.btn-primary:hover,
a.btn-primary.btn-sm:hover {
    background-color: #1E293B;
    color: #FFFFFF !important;
}

a.btn-primary:hover .lucide,
a.btn-primary:hover svg,
a.btn-primary.btn-sm:hover .lucide,
a.btn-primary.btn-sm:hover svg {
    color: #FFFFFF !important;
    stroke: currentColor;
}

.btn-icon-muted {
    background: var(--chrome-bg);
    border-color: var(--chrome-border);
    color: var(--chrome-icon);
}

.btn-icon-muted .lucide,
.btn-icon-muted .ico-btn,
.btn-icon-muted svg {
    color: currentColor;
    stroke: currentColor;
}

.btn-sm {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface);
    font-family: inherit;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-sm .lucide,
.btn-sm [data-lucide] { width: 15px; height: 15px; }

.btn-sm-view { color: var(--brand); }
.btn-sm-view:hover { background: var(--brand-soft); border-color: var(--brand); }

.btn-sm-edit { color: var(--warning); }
.btn-sm-edit:hover { background: var(--warning-soft); }

.btn-sm-danger { color: var(--danger); }
.btn-sm-danger:hover { background: var(--danger-soft); }

.btn-sm-success { color: var(--success); }
.btn-sm-success:hover { background: var(--success-soft); }

/* =========================================
   MODALS
   ========================================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(17, 24, 39, 0.45);
    overflow-y: auto;
    backdrop-filter: blur(2px);
    z-index: 1000;
    padding: 16px;
}

.modal-content {
    background-color: var(--surface);
    margin: 24px auto;
    padding: 28px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 640px;
    box-shadow: var(--shadow-md);
    position: relative;
    border: 1px solid var(--border);
}

.modal-content.modal-sm { max-width: 400px; }

#modalNuevaUniversidad,
#modalNuevaFecha,
#modalConfirmacion {
    align-items: center;
    justify-content: center;
}

.uni-modal-box .modal-title {
    border-bottom: none;
    margin-bottom: 16px;
    padding-bottom: 0;
}

.uni-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.uni-modal-actions .btn-primary,
.uni-modal-actions .btn-sm {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    cursor: pointer;
    font-size: 22px;
    color: var(--text-light);
    line-height: 1;
    background: none;
    border: none;
    padding: 4px;
}

.close-btn:hover { color: var(--text-main); }

.modal-title {
    color: var(--text-main);
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    letter-spacing: -0.02em;
}

/* =========================================
   FILE UPLOAD
   ========================================= */
.file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.btn-file {
    background-color: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-file .lucide { width: 16px; height: 16px; }

.btn-file:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-soft);
}

#archivo { display: none; }

#preview-container {
    display: none;
    margin-top: 12px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}

#pdf-preview {
    width: 100%;
    height: 360px;
    border: none;
    display: block;
}

/* =========================================
   AUTH — Login / Registro
   ========================================= */
.auth-page {
    min-height: calc(100vh - var(--inst-header-height));
    min-height: calc(100dvh - var(--inst-header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-main);
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    padding: 36px 32px;
}

.auth-card.auth-card-wide { max-width: 480px; }

.auth-brand {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-pse {
    background: linear-gradient(90deg, #1E293B 0%, #0c2340 100%);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.auth-brand-logo {
    display: block;
    height: 44px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.auth-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.auth-logo .lucide { width: 28px; height: 28px; }

.auth-logo-accent {
    background: var(--brand);
    color: var(--surface);
    margin: 0 auto 16px;
}

.auth-brand h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.4;
}

.auth-brand .auth-subtitle {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-welcome-title {
    text-align: center;
    color: var(--brand);
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
}

.auth-welcome-text {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 24px;
    line-height: 1.5;
}

.auth-help-note {
    margin: 16px 0 0;
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.5;
    color: #475569;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    text-align: left;
}

.auth-switch {
    text-align: center;
    color: var(--brand);
    font-size: 13px;
    margin-top: 20px;
    cursor: pointer;
    font-weight: 500;
}

.auth-switch:hover { text-decoration: underline; }

.btn-brand { background-color: var(--brand); }
.btn-brand:hover { background-color: #1D4ED8; }

.btn-form-dark {
    background-color: var(--text-main);
    color: var(--surface);
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-form-dark .lucide { width: 16px; height: 16px; }

.btn-form-dark:hover { background-color: #374151; }

.btn-form-light {
    background-color: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-form-light:hover {
    background-color: var(--bg-main);
    color: var(--text-main);
}

/* =========================================
   ALERTS & TOASTS
   ========================================= */
.alerta-exito {
    display: none;
    background-color: var(--success-soft);
    color: #065F46;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid #A7F3D0;
    font-weight: 500;
    text-align: center;
    font-size: 14px;
}

.toast-global {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    box-shadow: var(--shadow-md);
    min-width: 280px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

.alerta-sistema-modal {
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.alerta-sistema-box {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 440px;
    width: calc(100% - 32px);
    margin: 0;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid #E2E8F0;
    flex-shrink: 0;
}

.alerta-sistema-icon {
    font-size: 36px;
    line-height: 1;
    margin-bottom: 12px;
}

.alerta-sistema-titulo {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1E293B;
}

.alerta-sistema-mensaje {
    margin: 0 0 24px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    text-align: left;
}

.alerta-sistema-acciones {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-alerta {
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-alerta:hover {
    opacity: 0.9;
}

.btn-alerta-primario {
    background: #151A25;
    color: #FFFFFF;
}

.btn-alerta-secundario {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
}

.alerta-sistema-campo {
    margin-bottom: 20px;
    text-align: left;
}

.alerta-sistema-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

/* =========================================
   PAGE HEADERS & FILTERS
   ========================================= */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.page-header h2 {
    color: var(--text-main);
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.page-header h2 .lucide { width: 22px; height: 22px; color: var(--brand); }

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filters-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Desplegable de área en barra de filtros */
select.btn-filter {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    padding: 7px 12px;
    min-height: 36px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

select.btn-filter:hover {
    border-color: #D1D5DB;
    color: var(--text-main);
}

/* Botones de filtro: cuadrado, solo ícono, tonos suaves */
.filters-bar button.btn-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    gap: 0;
    border: 1px solid var(--chrome-border);
    border-radius: 8px;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    font-family: inherit;
    color: var(--chrome-icon);
    background: var(--chrome-bg);
}

.filters-bar button.btn-filter > span {
    display: none !important;
}

.filters-bar button.btn-filter .lucide,
.filters-bar button.btn-filter [data-lucide],
.filters-bar button.btn-filter svg {
    width: 16px;
    height: 16px;
    color: currentColor !important;
    stroke: currentColor !important;
}

.filters-bar button.btn-filter:hover {
    background: var(--chrome-hover-bg);
    border-color: #D1D5DB;
}

.filters-bar button.btn-filter.active {
    background: var(--chrome-active-bg);
    border-color: var(--chrome-active-border);
    color: var(--chrome-active-icon);
}

.filters-bar button.btn-filter.active:hover {
    background: #D1FAE5;
}

/* =========================================
   BOTONES DE BARRA (exportar, +, asignación)
   Solo ícono · tonos suaves
   ========================================= */
.btn-chrome,
.page-header-actions .btn-sm,
.page-header-actions .btn-primary:not(.btn-add-action),
.page-header > .btn-primary:not(.btn-add-action),
.page-header > .btn-sm,
.page-header > div .btn-primary:not(.btn-add-action),
.asig-modo-botones .btn-primary:not(.btn-add-action),
.asig-modo-botones .btn-sm:not(.btn-add-action) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    gap: 0;
    border: 1px solid var(--chrome-border);
    border-radius: 8px;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    font-family: inherit;
    color: var(--chrome-icon);
    background: var(--chrome-bg);
}

.btn-chrome > span,
.page-header-actions .btn-sm > span,
.page-header-actions .btn-primary:not(.btn-add-action) > span,
.page-header > .btn-primary:not(.btn-add-action) > span,
.page-header > .btn-sm > span,
.page-header > div .btn-primary:not(.btn-add-action) > span,
.asig-modo-botones .btn-primary:not(.btn-add-action) > span,
.asig-modo-botones .btn-sm:not(.btn-add-action) > span {
    display: none !important;
}

.btn-chrome .lucide,
.btn-chrome [data-lucide],
.btn-chrome svg,
.page-header-actions .btn-sm .lucide,
.page-header-actions .btn-sm [data-lucide],
.page-header-actions .btn-primary:not(.btn-add-action) .lucide,
.page-header-actions .btn-primary:not(.btn-add-action) [data-lucide],
.page-header > div .btn-primary:not(.btn-add-action) .lucide,
.page-header > div .btn-primary:not(.btn-add-action) [data-lucide],
.page-header > .btn-primary:not(.btn-add-action) .lucide,
.page-header > .btn-primary:not(.btn-add-action) [data-lucide],
.asig-modo-botones .btn-primary:not(.btn-add-action) .lucide,
.asig-modo-botones .btn-sm:not(.btn-add-action) .lucide,
.asig-modo-botones .btn-sm:not(.btn-add-action) [data-lucide] {
    width: 16px;
    height: 16px;
    color: currentColor !important;
    stroke: currentColor !important;
}

.btn-chrome:hover,
.page-header-actions .btn-sm:hover,
.page-header-actions .btn-primary:not(.btn-add-action):hover,
.page-header > div .btn-primary:not(.btn-add-action):hover,
.page-header > .btn-primary:not(.btn-add-action):hover,
.asig-modo-botones .btn-primary:not(.btn-add-action):hover,
.asig-modo-botones .btn-sm:not(.btn-add-action):hover {
    background: var(--chrome-hover-bg);
    border-color: #D1D5DB;
}

.btn-chrome-primary,
.page-header-actions .btn-primary:not(.btn-add-action),
.page-header > .btn-primary:not(.btn-add-action),
.page-header > div .btn-primary:not(.btn-add-action),
.asig-modo-botones .btn-primary:not(.btn-add-action) {
    background: var(--chrome-active-bg);
    border-color: var(--chrome-active-border);
    color: var(--chrome-active-icon);
}

.btn-chrome-primary:hover,
.page-header-actions .btn-primary:not(.btn-add-action):hover,
.page-header > .btn-primary:not(.btn-add-action):hover,
.page-header > div .btn-primary:not(.btn-add-action):hover,
.asig-modo-botones .btn-primary:not(.btn-add-action):hover {
    background: #D1FAE5;
    border-color: #86EFAC;
}

/* =========================================
   ACTION BUTTONS (tabla)
   ========================================= */
.btn-action-modern {
    border: 1px solid var(--chrome-border);
    border-radius: var(--radius-sm);
    padding: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 0;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    margin-right: 4px;
    margin-bottom: 4px;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.btn-action-modern .lucide,
.btn-action-modern svg { width: 14px; height: 14px; color: currentColor; stroke: currentColor; }

.btn-modern-accept {
    background: var(--tone-success-bg);
    border-color: var(--tone-success-border);
    color: var(--tone-success-fg);
}

.btn-modern-reject {
    background: var(--tone-danger-bg);
    border-color: var(--tone-danger-border);
    color: var(--tone-danger-fg);
}

.btn-modern-view {
    background: var(--tone-info-bg);
    border-color: var(--tone-info-border);
    color: var(--tone-info-fg);
}

.btn-modern-pdf {
    background: var(--chrome-bg);
    border-color: var(--chrome-border);
    color: var(--chrome-icon);
    text-decoration: none;
    display: inline-flex;
}

.btn-modern-edit {
    background: var(--tone-warning-bg);
    border-color: var(--tone-warning-border);
    color: var(--tone-warning-fg);
}

/* =========================================
   PROGRESS PANEL
   ========================================= */
.progress-panel {
    display: none;
    background: linear-gradient(180deg, #FAFBFF 0%, var(--surface) 55%);
    padding: 22px 22px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 28px;
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}

.progress-panel::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3B82F6 0%, #10B981 55%, #F59E0B 100%);
}

.progress-panel h3 {
    margin: 0 0 24px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.progress-track {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.progress-line-bg {
    position: absolute;
    top: 17px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--border);
    z-index: 1;
}

.progress-line-fill {
    position: absolute;
    top: 17px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--success);
    z-index: 2;
    transition: width 1s ease;
}

.progress-step {
    position: relative;
    z-index: 3;
    text-align: center;
    flex: 1;
    min-width: 0;
    background: var(--surface);
}

.progress-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #E2E8F0;
    color: var(--text-muted);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    border: 2px solid var(--surface);
    transition: var(--transition);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.08);
}

.progress-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 500;
}

.progress-message {
    text-align: center;
    max-width: 960px;
    margin: 24px auto 0;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-main);
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.progress-message::before {
    content: '';
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--tone-info-bg);
    border: 1px solid var(--tone-info-border);
    flex-shrink: 0;
}

.progress-message-text {
    flex: 0 1 auto;
    min-width: 0;
    line-height: 1.55;
    text-align: center;
}

.progress-message strong { color: var(--text-main); }

.progress-message.progress-msg-ok {
    border-left: 4px solid #10B981;
}
.progress-message.progress-msg-ok::before {
    background: var(--tone-success-bg);
    border-color: var(--tone-success-border);
}

.progress-message.progress-msg-info {
    border-left: 4px solid #3B82F6;
}
.progress-message.progress-msg-info::before {
    background: var(--tone-info-bg);
    border-color: var(--tone-info-border);
}

.progress-message.progress-msg-warn {
    border-left: 4px solid #F59E0B;
}
.progress-message.progress-msg-warn::before {
    background: var(--tone-warning-bg);
    border-color: var(--tone-warning-border);
}

.inscripcion-cerrada-panel {
    margin: 8px 0 22px;
    padding: 28px 26px;
    border-radius: 16px;
    background: linear-gradient(180deg, #F0F9FF 0%, #FFFFFF 55%);
    border: 1px solid #BFDBFE;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    text-align: center;
}

.inscripcion-cerrada-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #DBEAFE;
    color: #1D4ED8;
}

.inscripcion-cerrada-icon .lucide,
.inscripcion-cerrada-icon [data-lucide],
.inscripcion-cerrada-icon svg {
    width: 26px;
    height: 26px;
}

.inscripcion-cerrada-panel h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.01em;
}

.inscripcion-cerrada-panel p {
    margin: 0 auto;
    max-width: 640px;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}

.inscripcion-cerrada-panel .inscripcion-cerrada-proyecto {
    margin-top: 14px;
    padding: 12px 14px;
    max-width: 640px;
    border-radius: 10px;
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    color: #92400E;
    font-weight: 600;
}

.home-progreso-donuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 4px 0 6px;
}

.home-progreso-donuts .adm-dash-step-card,
.home-progreso-donuts .home-step-card {
    text-align: center;
    padding: 14px 10px 12px;
}

.home-step-card {
    position: relative;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 16px 12px 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.home-step-card-ok { border-top: 3px solid #10B981; }
.home-step-card-good { border-top: 3px solid #3B82F6; }
.home-step-card-warn { border-top: 3px solid #F59E0B; }
.home-step-card-pending { border-top: 3px solid #94A3B8; }

.home-step-num {
    position: absolute;
    top: 8px;
    left: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #94A3B8;
}

.home-progreso-donuts .adm-dash-step-num,
.home-progreso-donuts .home-step-num {
    top: 8px;
    left: 10px;
}

.home-donut {
    width: 66px;
    height: 66px;
    margin: 8px auto 10px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(#94A3B8 calc(var(--pct) * 1%), #E2E8F0 0);
}

.home-donut-ok { background: conic-gradient(#10B981 calc(var(--pct) * 1%), #E2E8F0 0); }
.home-donut-good { background: conic-gradient(#3B82F6 calc(var(--pct) * 1%), #E2E8F0 0); }
.home-donut-warn { background: conic-gradient(#F59E0B calc(var(--pct) * 1%), #E2E8F0 0); }
.home-donut-pending { background: conic-gradient(#94A3B8 calc(var(--pct) * 1%), #E2E8F0 0); }

.home-donut-inner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.home-progreso-donuts .adm-donut,
.home-progreso-donuts .home-donut {
    width: 66px;
    height: 66px;
}

.home-progreso-donuts .adm-donut-inner,
.home-progreso-donuts .home-donut-inner {
    width: 48px;
    height: 48px;
    font-size: 12px;
}

.home-step-label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.home-step-badge {
    display: inline-flex;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}

.home-step-badge-ok { background: #DCFCE7; color: #166534; }
.home-step-badge-good { background: #DBEAFE; color: #1E40AF; }
.home-step-badge-warn { background: #FEF3C7; color: #92400E; }
.home-step-badge-pending { background: #F1F5F9; color: #64748B; }

@media (max-width: 768px) {
    .home-progreso-donuts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================
   FECHAS — Timeline
   ========================================= */
.fechas-vista-wrap {
    max-width: 820px;
    margin: 0 auto;
}

.fechas-vista-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 100%);
    border: 1px solid #BFDBFE;
    border-radius: var(--radius-md);
}

.fechas-vista-desc {
    margin: 0;
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    flex: 1;
    min-width: 200px;
}

.fechas-vista-contador {
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    color: var(--brand);
    border: 1px solid #BFDBFE;
    white-space: nowrap;
}

.fechas-timeline-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    box-shadow: var(--shadow-xs);
}

.fechas-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fechas-timeline-item {
    display: flex;
    gap: 16px;
    position: relative;
    padding-bottom: 20px;
}

.fechas-timeline-item:last-child { padding-bottom: 0; }

.fechas-timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 19px;
    top: 44px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #93C5FD 0%, #E2E8F0 100%);
}

.fechas-timeline-rail {
    flex-shrink: 0;
    width: 40px;
    display: flex;
    justify-content: center;
    padding-top: 14px;
}

.fechas-timeline-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #DBEAFE;
    color: #1D4ED8;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 2px #BFDBFE;
    position: relative;
    z-index: 1;
}

.fechas-timeline-card {
    flex: 1;
    display: flex;
    align-items: stretch;
    background: #FAFBFC;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
    min-width: 0;
}

.fechas-timeline-card:hover {
    border-color: #BFDBFE;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.fechas-card-fecha {
    flex-shrink: 0;
    width: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    background: linear-gradient(180deg, #2563EB 0%, #1D4ED8 100%);
    color: #fff;
    text-align: center;
}

.fechas-card-dia {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.fechas-card-mes {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
    opacity: 0.92;
    line-height: 1.3;
}

.fechas-card-mes-solo { font-size: 11px; }

.fechas-card-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    min-width: 0;
}

.fechas-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #EFF6FF;
    color: #2563EB;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fechas-card-icon .lucide { width: 20px; height: 20px; }

.fechas-card-evento {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.45;
    word-break: break-word;
}

.fechas-card-delete {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 12px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    color: #DC2626;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition), border-color var(--transition);
}

.fechas-card-delete:hover {
    background: #FEE2E2;
    border-color: #FCA5A5;
}

.fechas-card-delete .lucide { width: 16px; height: 16px; }

.fechas-vista-vacio {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.fechas-vacio-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #F1F5F9;
    color: #94A3B8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fechas-vacio-icon .lucide { width: 28px; height: 28px; }

.fechas-vista-vacio p {
    margin: 0;
    font-size: 14px;
}

.fechas-modal-box {
    max-width: 420px;
}

.fechas-modal-box .modal-title {
    border-bottom: none;
    margin-bottom: 12px;
    padding-bottom: 0;
}

.fechas-modal-cal {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
    background: #FAFAFA;
    overflow: hidden;
}

.fechas-modal-cal .jcalendar {
    max-width: 100%;
    margin: 0 auto;
    box-shadow: none;
}

.fechas-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.fechas-modal-actions .btn-primary,
.fechas-modal-actions .btn-sm {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add-fecha,
.btn-add-action {
    background: var(--text-main) !important;
    color: #FFFFFF !important;
    border: none;
}

/* Legacy compact timeline (inicio u otros) */
.modulo-fechas-compacto {
    margin: 32px auto;
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    max-width: 900px;
}

.fechas-header-compacto {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.fechas-header-compacto h3 {
    margin: 0;
    font-size: 14px;
    color: var(--text-main);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fechas-header-compacto h3 .lucide { width: 18px; height: 18px; color: var(--brand); }

.timeline-compacta {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.timeline-compacta::before {
    content: '';
    position: absolute;
    left: 80px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: var(--border);
}

.fecha-item-compacto {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
}

.fecha-item-compacto:last-child { margin-bottom: 0; }

.tarjeta-fecha-compacta {
    width: 64px;
    text-align: right;
    padding-right: 20px;
    font-size: 10px;
    font-weight: 600;
    color: var(--brand);
    text-transform: uppercase;
    line-height: 1.3;
    flex-shrink: 0;
}

.punto-timeline {
    position: absolute;
    left: 80px;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--brand);
    border-radius: 50%;
    border: 2px solid var(--surface);
}

.texto-evento-compacto {
    flex: 1;
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-main);
    min-width: 0;
}

.fechas-vista-panel { margin: 0 auto; }

.btn-fecha-eliminar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #DC2626;
    cursor: pointer;
    padding: 4px 6px;
    margin-left: 8px;
    border-radius: 4px;
    transition: background var(--transition);
}

.btn-fecha-eliminar:hover { background: var(--danger-soft); }

/* Admin — dashboard inicio */
.vista-inicio-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.adm-dash {
    width: 100%;
    max-width: 100%;
    margin: 0 0 24px;
    padding: 0;
    box-sizing: border-box;
}

.adm-dash-hero-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 18px;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    background: linear-gradient(120deg, #0F172A 0%, #1E3A5F 55%, #0369A1 100%);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.adm-dash-hero-ok { background: linear-gradient(120deg, #064E3B 0%, #047857 55%, #10B981 100%); }
.adm-dash-hero-good { background: linear-gradient(120deg, #1E3A8A 0%, #1D4ED8 55%, #3B82F6 100%); }
.adm-dash-hero-warn { background: linear-gradient(120deg, #78350F 0%, #B45309 55%, #F59E0B 100%); }

.adm-dash-hero-strip .adm-donut {
    width: 52px;
    height: 52px;
    margin: 0;
    flex-shrink: 0;
}

.adm-dash-hero-strip .adm-donut-inner {
    width: 38px;
    height: 38px;
    font-size: 11px;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
}

.adm-dash-hero-info {
    flex: 1 1 160px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.adm-dash-hero-k {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.8;
}

.adm-dash-hero-pct {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.adm-dash-hero-edicion {
    font-size: 12px;
    opacity: 0.85;
    line-height: 1.35;
    word-break: break-word;
}

.adm-dash-hero-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

.adm-dash-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.adm-dash-pill strong { font-weight: 800; }

.adm-dash-pill-ok { background: rgba(255, 255, 255, 0.25); }
.adm-dash-pill-good { background: rgba(255, 255, 255, 0.22); }
.adm-dash-pill-warn { background: rgba(0, 0, 0, 0.2); font-weight: 700; }

.adm-dash-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-xs);
}

.adm-dash-section:last-child { margin-bottom: 0; }

.adm-dash-section-title {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}

.adm-dash-section-title .lucide { width: 18px; height: 18px; color: var(--brand); flex-shrink: 0; }

.adm-dash-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.adm-dash-section-head .adm-dash-section-title {
    margin: 0;
}

.adm-dash-pipeline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.adm-dash-step-card {
    --step-accent: #94A3B8;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--step-accent);
    border-radius: var(--radius-md);
    padding: 16px 12px 14px;
    text-align: center;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
    min-width: 0;
    box-shadow: var(--shadow-xs);
}

.adm-dash-step-card-ok { --step-accent: #10B981; }
.adm-dash-step-card-good { --step-accent: #3B82F6; }
.adm-dash-step-card-warn {
    --step-accent: #F59E0B;
    background: linear-gradient(180deg, #FFFBEB 0%, var(--surface) 45%);
}
.adm-dash-step-card-pending { --step-accent: #94A3B8; }

.adm-dash-step-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.adm-dash-step-card-warn:hover {
    border-color: #FCD34D;
}

.adm-dash-step-card:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.adm-dash-step-num {
    position: absolute;
    top: 8px;
    left: 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.adm-donut {
    --pct: 0;
    width: 80px;
    height: 80px;
    margin: 6px auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--donut-color, #3B82F6) calc(var(--pct) * 1%), #E2E8F0 0);
}

.adm-donut-ok { --donut-color: #10B981; }
.adm-donut-good { --donut-color: #3B82F6; }
.adm-donut-warn { --donut-color: #F59E0B; }
.adm-donut-pending { --donut-color: #94A3B8; }

.adm-donut-inner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
}

.adm-dash-step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
}

.adm-dash-step-pts {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.adm-dash-step-badge {
    display: inline-block;
    margin-top: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 3px 8px;
    border-radius: 999px;
}

.adm-dash-step-badge-ok { background: #D1FAE5; color: #047857; }
.adm-dash-step-badge-good { background: #DBEAFE; color: #1D4ED8; }
.adm-dash-step-badge-warn { background: #FEF3C7; color: #B45309; }
.adm-dash-step-badge-pending { background: #F1F5F9; color: #64748B; }

.adm-dash-step-note {
    margin: 10px 0 0;
    padding: 8px 8px 0;
    border-top: 1px dashed var(--border);
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-muted);
    text-align: left;
}

.adm-dash-step-card-warn .adm-dash-step-note {
    color: #92400E;
    font-weight: 500;
}

.adm-dash-refresh-btn {
    flex-shrink: 0;
}

.adm-dash-loading { text-align: center; color: var(--text-muted); padding: 20px !important; }
.adm-dash-error { color: #DC2626; }
.adm-dash-empty { color: var(--text-muted); font-size: 14px; margin: 0; }

/* Admin dashboard — responsive */
@media (max-width: 900px) {
    .adm-dash-pipeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .adm-dash-hero-pills {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .adm-dash-pipeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .adm-dash-step-card {
        padding: 12px 8px 10px;
    }

    .adm-donut {
        width: 64px;
        height: 64px;
    }

    .adm-donut-inner {
        width: 48px;
        height: 48px;
        font-size: 12px;
    }

    .adm-dash-hero-strip {
        padding: 10px 14px;
        gap: 12px;
    }

    .adm-dash-hero-pct {
        font-size: 20px;
    }
}

@media (max-width: 420px) {
    .adm-dash-pipeline {
        grid-template-columns: 1fr;
    }

    .adm-dash-hero-pills {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Admin — pendientes en inicio (legacy badges) */
.admin-pendientes-panel {
    max-width: 900px;
    margin: 0 auto 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-xs);
}

.admin-pendientes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.admin-pendientes-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-pendientes-header h3 .lucide { width: 18px; height: 18px; color: var(--brand); }

.admin-pendientes-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.admin-pendientes-timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: var(--border);
}

.admin-pendiente-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 8px;
    margin-bottom: 4px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.admin-pendiente-item:last-child { margin-bottom: 0; }

.admin-pendiente-item:hover { background: var(--bg-main); }

.admin-pendiente-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    border: 2px solid var(--surface);
}

.admin-pendiente-dot .lucide { width: 18px; height: 18px; }

.admin-pendiente-dot.warn { background: #FEF3C7; color: #D97706; }
.admin-pendiente-dot.action { background: #DBEAFE; color: #2563EB; }
.admin-pendiente-dot.info { background: #F1F5F9; color: #475569; }

.admin-pendiente-body { flex: 1; min-width: 0; }

.admin-pendiente-titulo {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.admin-pendiente-detalle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.admin-pendiente-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    flex-shrink: 0;
    align-self: flex-start;
}

.admin-pendientes-estado {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 4px;
    color: var(--text-muted);
    font-size: 14px;
}

.admin-pendientes-estado .lucide { width: 20px; height: 20px; }

.admin-pendientes-ok { color: #059669; }

.admin-pendientes-error { color: #DC2626; }

/* Fechas tabla (admin) */
#tabla-fechas-inicio {
    border-collapse: separate;
    border-spacing: 0 8px;
    width: 100%;
    min-width: unset;
}

.fecha-fila-moderna {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.fecha-fila-moderna:hover { box-shadow: var(--shadow-xs); }

.col-fecha-moderna {
    padding: 14px 16px;
    background-color: var(--brand-soft);
    color: var(--brand);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid var(--border);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    vertical-align: middle;
}

.col-evento-moderna {
    padding: 14px 20px;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    vertical-align: middle;
}

.btn-eliminar-fecha {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.btn-eliminar-fecha:hover { background-color: var(--danger-soft); }

/* =========================================
   VISTAS SECUNDARIAS
   ========================================= */
.vista-secundaria {
    display: none;
    flex: 1;
    overflow-y: visible;
    padding: 32px;
    background: var(--bg-main);
    min-width: 0;
}

#mount-vistas-secundarias {
    display: contents;
}

.vista-secundaria-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.search-box {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    width: 100%;
    max-width: 340px;
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    background: transparent;
    font-family: inherit;
    color: var(--text-main);
}

.search-box .search-icon {
    color: var(--text-light);
    font-size: 14px;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
}

.search-box .search-icon .lucide { width: 16px; height: 16px; }

/* =========================================
   PANEL DE INSCRIPCIONES (ADMIN)
   ========================================= */
.inscripciones-resumen {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.resumen-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    min-width: 130px;
    box-shadow: var(--shadow-xs);
}

.resumen-num {
    font-size: 24px;
    font-weight: 600;
    color: var(--brand);
    line-height: 1.1;
}

.resumen-lbl {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.inscripciones-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    align-items: start;
}

.insc-ficha-vacia {
    grid-column: 1 / -1;
}

.insc-ficha {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.insc-ficha:hover { border-color: #BFDBFE; }

.insc-ficha-head {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background var(--transition);
}

.insc-ficha-head:hover { background: var(--bg-main); }

.insc-ficha-info { flex: 1; min-width: 0; }

.insc-ficha-resumen {
    margin-top: 6px;
    font-size: 12px;
    color: #64748B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.insc-ficha-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.ficha-modal-body .insc-meta {
    margin-top: 0;
    margin-bottom: 16px;
}

.insc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-xs);
}

.insc-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.insc-nombre {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.insc-email {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}

.insc-email .lucide { width: 14px; height: 14px; }

.insc-head-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.insc-numero {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 600;
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 100px;
}

.insc-numero .lucide { width: 14px; height: 14px; }

.badge-pago {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 100px;
    border: 1px solid transparent;
}

.badge-pago-ok { background: var(--tone-success-bg); color: var(--tone-success-fg); border-color: var(--tone-success-border); }
.badge-pago-pendiente { background: var(--tone-warning-bg); color: var(--tone-warning-fg); border-color: var(--tone-warning-border); }
.badge-pago-no { background: var(--tone-danger-bg); color: var(--tone-danger-fg); border-color: var(--tone-danger-border); }

.insc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 32px;
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 16px;
}

.insc-meta .k,
.insc-asistente .k,
.insc-col .k {
    color: var(--text-muted);
    font-weight: 500;
}

.insc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.insc-col {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
}

.insc-col h4 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.insc-col h4 .lucide { width: 15px; height: 15px; color: var(--brand); }

.insc-asistente {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-main);
}

.insc-asistente:last-child { margin-bottom: 0; }

.insc-asistente-tit {
    font-weight: 600;
    color: var(--brand);
    font-size: 12px;
    margin-bottom: 4px;
}

.insc-vacio {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
    font-style: italic;
}

.insc-archivos {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.insc-archivo {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-decoration: none;
}

.insc-archivo .lucide { width: 15px; height: 15px; }

.insc-archivo.ok { color: var(--brand); background: var(--brand-soft); border-color: transparent; }
.insc-archivo.ok:hover { background: #DBEAFE; }

.insc-archivo.falta { color: var(--text-light); background: var(--bg-main); }

.insc-recibo-admin {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.insc-recibo-admin h4 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.insc-recibo-preview {
    margin: 12px 0;
}

.insc-recibo-iframe {
    width: 100%;
    height: 420px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
}

.insc-recibo-meta {
    font-size: 12px;
    color: var(--tone-success-fg);
    margin: 8px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.insc-recibo-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .main-content,
    .vista-secundaria {
        padding: 24px 20px;
    }

    .action-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {
    :root { --inst-header-height: 88px; }

    .header-institucional-inner {
        gap: 8px;
        padding: 10px 14px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .header-institucional-inner::-webkit-scrollbar { display: none; }

    .header-logo-slot {
        flex: 0 0 140px;
        width: 140px;
        height: 64px;
        padding: 2px 4px;
    }

    .header-institucional .header-logo--amidiq { transform: scale(0.88); }

    body:has(.app-layout) .header-institucional {
        margin-left: 0;
        width: 100%;
    }

    body:has(.app-layout) .header-institucional-inner {
        justify-content: space-between;
    }

    body:has(.app-layout) .app-layout {
        padding-left: 0;
    }

    .mobile-header {
        display: flex;
        position: static;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        height: 100dvh;
        transform: translateX(-100%);
        align-self: auto;
    }

    .sidebar.open { transform: translateX(0); }

    .main-content,
    .vista-secundaria {
        padding: 20px 16px 24px;
        width: 100%;
    }

    .dashboard-perfil-text,
    .dashboard-perfil-chevron { display: none; }

    .dashboard-perfil-btn {
        padding: 4px;
        border-radius: 50%;
    }

    .dashboard-topbar { margin: -4px 0 16px; }

    .app-layout { flex-direction: column; }

    .card { padding: 20px; }

    .profile-card { padding: 24px 16px; }

    .action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .action-card {
        padding: 18px 12px;
        min-height: 100px;
    }

    .action-card .icon-circle {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .action-card h3 { font-size: 13px; }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-actions { width: 100%; }

    .page-header-actions .btn-sm,
    .page-header-actions .btn-primary:not(.btn-add-action) {
        flex: 0 0 auto;
        width: 34px;
        min-width: 34px;
    }

    .page-header-actions .btn-add-action {
        width: auto !important;
        min-width: unset !important;
    }

    .insc-grid { grid-template-columns: 1fr; }

    .resumen-card { flex: 1; min-width: 100px; }

    .insc-archivo { flex: 1; justify-content: center; }

    .filters-bar { gap: 6px; }

    .filters-bar button.btn-filter,
    .page-header-actions .btn-sm,
    .page-header-actions .btn-primary:not(.btn-add-action) {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }

    .modal-content {
        margin: 12px auto;
        padding: 20px;
    }

    .modal-title { font-size: 16px; }

    #pdf-preview { height: 260px; }

    .progress-track {
        overflow-x: auto;
        justify-content: flex-start;
        gap: 8px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .progress-step {
        flex: 0 0 72px;
    }

    .progress-label { font-size: 10px; }

    .fechas-timeline-panel { padding: 20px 16px; }

    .fechas-timeline-item { gap: 12px; }

    .fechas-timeline-num {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }

    .fechas-timeline-item:not(:last-child)::after { left: 16px; }

    .fechas-card-fecha { width: 72px; padding: 12px 8px; }

    .fechas-card-dia { font-size: 22px; }

    .fechas-card-content { padding: 12px 14px; gap: 10px; }

    .fechas-card-evento { font-size: 14px; }

    .timeline-compacta::before { left: 60px; }

    .tarjeta-fecha-compacta {
        width: 48px;
        padding-right: 14px;
        font-size: 9px;
    }

    .punto-timeline { left: 60px; }

    .modulo-fechas-compacto { padding: 18px; }

    .auth-card { padding: 28px 20px; }

    th, td { padding: 10px 12px; font-size: 13px; }
}

@media (max-width: 480px) {
    .action-grid {
        grid-template-columns: 1fr 1fr;
    }

    .auth-card { max-width: 100%; }

    .progress-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .filters-bar select.btn-filter {
        width: 100%;
    }

    .file-upload-wrapper { flex-direction: column; align-items: flex-start; }

    .btn-action-modern {
        display: inline-block;
        margin-bottom: 4px;
    }
}

/* =========================================
   ACEPTAR INSCRIPCIÓN + GAFETE
   ========================================= */
.insc-acciones {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border, #E2E8F0);
}

.btn-aceptar-insc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--chrome-active-bg);
    color: var(--chrome-active-icon);
    border: 1px solid var(--chrome-active-border);
    border-radius: 8px;
    padding: 0;
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 0;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}
.btn-aceptar-insc:hover { background: #D1FAE5; }
.btn-aceptar-insc:active { transform: scale(.98); }
.btn-aceptar-insc i[data-lucide],
.btn-aceptar-insc .lucide {
    width: 16px;
    height: 16px;
    color: currentColor;
    stroke: currentColor;
}

.insc-num-oficial {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tone-success-fg);
    background: var(--tone-success-bg);
    border: 1px solid var(--tone-success-border);
    border-radius: 999px;
    padding: 6px 12px;
}
.insc-num-oficial i[data-lucide] { width: 15px; height: 15px; }
.insc-num-oficial strong { font-size: 15px; }

.modal-gafete {
    z-index: 100002;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    padding: 20px;
}

.modal-gafete.is-open {
    display: flex !important;
}

.modal-gafete-box {
    border: 3px solid #111827 !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    margin: auto;
}

/* Gafete (constancia de número) */
.gafete {
    text-align: center;
    padding: 40px 32px;
    border: 2px solid #111827;
    background: #FFFFFF;
    border-radius: 10px;
    font-family: 'Times New Roman', Georgia, serif;
    box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
}
.gafete-nombre {
    font-size: 15px;
    font-weight: bold;
    color: #1E293B;
    margin-bottom: 28px;
}
.gafete-logo-wrap {
    background: linear-gradient(90deg, #1E293B 0%, #0c2340 100%);
    border-radius: 10px;
    padding: 14px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    max-width: 100%;
}
.gafete-logo-img {
    display: block;
    height: 44px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}
.gafete-inst {
    font-size: 14px;
    font-weight: bold;
    color: #1E293B;
    margin-bottom: 14px;
}
.gafete-num {
    font-size: 18px;
    font-weight: bold;
    color: #1E293B;
    margin-bottom: 40px;
}
.gafete-msg {
    font-size: 15px;
    color: #1E293B;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
}

/* =========================================
   VISTA / MÓDULO DE EVALUACIONES (ADMIN)
   ========================================= */
.ev-fichas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    align-items: start;
}

.ev-ficha-vacia {
    grid-column: 1 / -1;
}

.ev-ficha {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ev-ficha:hover { border-color: #BFDBFE; }

.ev-ficha-row {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.ev-ficha-check {
    display: flex;
    align-items: flex-start;
    padding: 16px 0 16px 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.ev-ficha-check input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #0284C7;
}

.ev-ficha-row .ev-ficha-head {
    flex: 1;
    min-width: 0;
}

.ev-bulk-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
}

.ev-bulk-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.ev-bulk-count {
    font-size: 13px;
    color: #64748B;
    min-width: 120px;
}

.ev-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.ev-bulk-list {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 13px;
    color: #334155;
}

.ev-bulk-list li + li { margin-top: 8px; }

.ev-ficha-head {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.2s ease;
}

.ev-ficha-head:hover { background: #F9FAFB; }

.ev-ficha-info { flex: 1; min-width: 0; }

.ev-ficha-resumen {
    margin-top: 6px;
    font-size: 12px;
    color: #64748B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ev-ficha-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.ficha-modal-body .ev-cols { margin-top: 0; }

.ev-detalle-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.ev-cols,
.ev-cols-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ev-card { background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.ev-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; border-bottom: 1px solid #F1F5F9; padding-bottom: 12px; margin-bottom: 12px; }
.ev-titulo { font-weight: 700; color: #0F172A; font-size: 16px; }
.ev-sub { color: #64748B; font-size: 13px; margin-top: 2px; }
.ev-rev {
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 14px 16px;
    background: #FFFFFF;
    min-width: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 20px rgba(15, 23, 42, 0.04);
}
.ev-rev-head h4,
.ev-rev h4 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #0F172A;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ev-rev-head { margin-bottom: 0; }
.ev-rev-body {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #F1F5F9;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
}
.ev-rev-body .ev-crit:last-child {
    grid-column: 1 / -1;
}
.ev-rev-foot {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #F1F5F9;
}
.ev-rev-pendiente {
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
}
.ev-rev-pendiente .ev-pend {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid #F1F5F9;
}
.ev-rev-datos { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.ev-rev-nombre { font-size: 13px; font-weight: 600; color: #1E293B; }
.ev-rev-correo { font-size: 12px; color: #64748B; word-break: break-all; line-height: 1.4; }
.ev-crit { margin-bottom: 0; }
.ev-crit .l { font-size: 11px; color: #64748B; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 2px; }
.ev-crit .v { font-size: 13px; color: #334155; white-space: pre-wrap; font-weight: 500; }
.ev-pend { color: #94A3B8; font-size: 13px; font-style: italic; }
.ev-estatus { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #E0E7FF; color: #3730A3; }
.ev-estatus-warn { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }
.ev-estatus-info { background: #E0E7FF; color: #3730A3; border: 1px solid #A5B4FC; }
.ev-estatus-ok { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.ev-estatus-bad { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.ev-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.ev-detalle-estado {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ev-detalle-estado > span {
    width: auto;
    justify-content: center;
    box-sizing: border-box;
}

.ev-detalle-wrap .ev-actions,
.ev-detalle-wrap .ev-actions-bar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid #F1F5F9;
}

.ev-detalle-wrap .ev-actions > .btn-sm,
.ev-detalle-wrap .ev-actions > .btn-primary,
.ev-detalle-wrap .ev-actions > .btn-warn,
.ev-detalle-wrap .ev-actions > .btn-success,
.ev-detalle-wrap .ev-actions > .btn-danger,
.ev-detalle-wrap .ev-actions > .ev-action-link,
.ev-detalle-wrap .ev-actions > a.btn-sm {
    flex: 1 1 calc(25% - 8px);
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
    min-height: 38px;
    border-radius: 10px;
    font-size: 12px;
    padding: 8px 10px;
}

.ev-detalle-wrap .ev-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    background: #FFFFFF;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ev-detalle-wrap .ev-action-link:hover {
    background: #EFF6FF;
    border-color: #93C5FD;
    color: #1E40AF;
}

.ev-badge-enviado,
.ev-badge-recibido,
.ev-badge-ok,
.ev-badge-rechazado,
.ev-badge-pend-rev {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: default;
    user-select: none;
}
.ev-badge-enviado { background: var(--tone-warning-bg); color: var(--tone-warning-fg); border: 1px solid var(--tone-warning-border); }
.ev-badge-recibido { background: var(--tone-purple-bg); color: var(--tone-purple-fg); border: 1px solid var(--tone-purple-border); }
.ev-badge-ok { background: var(--tone-success-bg); color: var(--tone-success-fg); border: 1px solid var(--tone-success-border); }
.ev-badge-rechazado { background: var(--tone-danger-bg); color: var(--tone-danger-fg); border: 1px solid var(--tone-danger-border); }
.ev-badge-pend-rev { background: var(--tone-neutral-bg); color: var(--tone-neutral-fg); border: 1px solid var(--tone-neutral-border); }

.ev-ronda-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 14px;
    padding: 4px;
    background: #F1F5F9;
    border-radius: 12px;
    width: fit-content;
    max-width: 100%;
}
.ev-ronda-tab {
    border: none;
    background: transparent;
    color: #475569;
    border-radius: 10px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.ev-ronda-tab.active {
    background: #fff;
    color: #0F172A;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.ev-badge-corregida {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #F59E0B;
}
.insc-ficha-badges {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ev-badge-uni-pendiente {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #FFFBEB;
    color: #B45309;
    border: 1px solid #FCD34D;
    white-space: nowrap;
}
.ev-badge-uni-pendiente [data-lucide],
.ev-badge-uni-pendiente svg {
    width: 13px;
    height: 13px;
}
.ev-badge-uni-lista {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #86EFAC;
    white-space: nowrap;
}
.ev-badge-uni-lista [data-lucide],
.ev-badge-uni-lista svg {
    width: 13px;
    height: 13px;
}
.ev-ficha-badges,
.ev-detalle-badges {
    margin-top: 6px;
}
.ev-ronda-section {
    margin-bottom: 16px;
}
.ev-ronda-heading {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ev-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.ev-filtro-chip {
    border: 1px solid #E2E8F0;
    background: #fff;
    color: #475569;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ev-filtro-chip:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}
.ev-filtro-chip.active {
    background: #0284C7;
    border-color: #0284C7;
    color: #fff;
}
@media (max-width: 600px) {
    .ev-filtros { gap: 6px; }
    .ev-filtro-chip { font-size: 12px; padding: 6px 11px; }
}

.badge-dict { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-dict.aprobado { background: var(--tone-success-bg); color: var(--tone-success-fg); border: 1px solid var(--tone-success-border); }
.badge-dict.correcciones { background: var(--tone-warning-bg); color: var(--tone-warning-fg); border: 1px solid var(--tone-warning-border); }
.badge-dict.rechazado { background: var(--tone-danger-bg); color: var(--tone-danger-fg); border: 1px solid var(--tone-danger-border); }

.btn-warn {
    background: #F59E0B;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.btn-warn .lucide,
.btn-warn [data-lucide] { width: 15px; height: 15px; }
.btn-success { background:#10B981; color:#fff; border:none; border-radius:8px; padding:9px 14px; font-size:13px; font-weight:600; cursor:pointer; display:inline-flex; gap:6px; align-items:center; }
.btn-success:hover { background:#059669; }
.btn-danger { background:#EF4444; color:#fff; border:none; border-radius:8px; padding:9px 14px; font-size:13px; font-weight:600; cursor:pointer; display:inline-flex; gap:6px; align-items:center; }

/* Modal de correcciones */
.ev-modal { display:none; position:fixed; inset:0; background:rgba(15,23,42,.5); z-index:9999; align-items:center; justify-content:center; padding:16px; }
.ev-modal.open { display:flex; }
.ficha-modal { z-index: 10000; }
.ficha-modal-box { max-width: 960px; }
.ficha-modal.ficha-modal-asig .ficha-modal-box,
.ficha-modal.ficha-modal-asig .ficha-modal-box.ev-modal-wide {
    max-width: 560px;
    padding: 22px 22px 20px;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.ficha-modal.ficha-modal-asig .ev-modal-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #F1F5F9;
}

.ficha-modal.ficha-modal-asig .ficha-modal-titles h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0F172A;
}

.ficha-modal.ficha-modal-asig .ficha-modal-sub {
    margin-top: 6px;
    font-size: 12px;
    color: #64748B;
    line-height: 1.45;
}
.ficha-modal.ficha-modal-ev .ficha-modal-box,
.ficha-modal.ficha-modal-ev .ficha-modal-box.ev-modal-wide {
    max-width: 680px;
    padding: 22px 22px 20px;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.ficha-modal.ficha-modal-ev .ev-modal-header {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #F1F5F9;
}

.ficha-modal.ficha-modal-ev .ficha-modal-titles h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0F172A;
}

.ficha-modal.ficha-modal-ev .ficha-modal-sub {
    margin-top: 6px;
    font-size: 12px;
    color: #64748B;
    line-height: 1.45;
}
.ficha-modal-titles { min-width: 0; flex: 1; }
.ficha-modal-titles h3 { margin: 0; word-break: break-word; }
.ficha-modal-sub { margin: 4px 0 0; font-size: 13px; color: #64748B; }
.ficha-modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: calc(100vh - 140px);
}
.ev-modal-box { background:#fff; border-radius:12px; max-width:560px; width:100%; padding:24px; }
.ev-modal-box.ev-modal-wide { max-width:1100px; max-height: calc(100vh - 32px); display:flex; flex-direction:column; overflow:hidden; }
.ev-modal-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; flex-shrink:0; }
.ev-modal-header h3 { margin:0; color:#0F172A; }
.ev-modal-layout { display:grid; grid-template-columns: 1fr 1fr; gap:20px; min-height:0; flex:1; overflow:hidden; }
.ev-modal-hoja, .ev-modal-correcciones { display:flex; flex-direction:column; min-height:0; }
.ev-modal-hoja h4, .ev-modal-correcciones h4 { margin:0 0 10px; font-size:14px; color:#334155; display:flex; align-items:center; gap:6px; flex-shrink:0; }
.ev-modal-hint { color:#64748B; font-size:13px; margin:0 0 10px; flex-shrink:0; }
.ev-modal-hoja-scroll { overflow-y:auto; border:1px solid #E2E8F0; border-radius:10px; padding:12px; background:#FAFAFA; flex:1; min-height:280px; max-height:55vh; }
.ev-modal-hoja-scroll .ev-rev { margin-bottom:12px; }
.ev-modal-hoja-scroll .ev-rev:last-child { margin-bottom:0; }
.ev-modal-hoja-meta { font-size:13px; color:#64748B; margin-bottom:12px; padding-bottom:10px; border-bottom:1px solid #E2E8F0; }
.ev-modal-hoja-meta strong { color:#1E293B; display:block; font-size:14px; margin-bottom:2px; }
.ev-modal-correcciones textarea { width:100%; min-height:160px; border:1px solid #CBD5E1; border-radius:8px; padding:10px; font-family:inherit; font-size:14px; resize:vertical; flex-shrink:0; }
.ev-modal-pdf { margin-top:14px; padding-top:14px; border-top:1px solid #E2E8F0; flex-shrink:0; }
.ev-modal-pdf h4 { margin:0 0 6px; font-size:14px; color:#334155; display:flex; align-items:center; gap:6px; }
.ev-btn-file { display:inline-flex; align-items:center; gap:6px; margin-top:4px; cursor:pointer; }
.ev-pdf-nombre { font-size:12px; color:#64748B; margin:8px 0 0; }
.ev-modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:14px; flex-shrink:0; }
.ev-modal-box h3 { margin:0 0 12px; color:#0F172A; }
.ev-modal-box textarea { width:100%; min-height:160px; border:1px solid #CBD5E1; border-radius:8px; padding:10px; font-family:inherit; font-size:14px; resize:vertical; }
@media (max-width: 900px) {
    .ev-modal-layout { grid-template-columns: 1fr; overflow-y:auto; }
    .ev-modal-box.ev-modal-wide { max-height: calc(100vh - 16px); overflow-y:auto; }
    .ev-modal-hoja-scroll { max-height: none; min-height:200px; }
}

@media (max-width: 700px) {
    .ev-rev-body { grid-template-columns: 1fr; }

    .ev-detalle-wrap .ev-actions,
    .ev-detalle-wrap .ev-actions-bar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .ev-detalle-wrap .ev-actions > .btn-sm,
    .ev-detalle-wrap .ev-actions > .btn-primary,
    .ev-detalle-wrap .ev-actions > .btn-warn,
    .ev-detalle-wrap .ev-actions > .btn-success,
    .ev-detalle-wrap .ev-actions > .btn-danger,
    .ev-detalle-wrap .ev-actions > .ev-action-link,
    .ev-detalle-wrap .ev-actions > a.btn-sm {
        flex: 1 1 calc(50% - 8px);
        min-width: 120px;
        width: auto;
    }
}

.ev-r2-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0 4px;
    max-height: 280px;
    overflow-y: auto;
}
.ev-r2-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #F8FAFC;
    cursor: pointer;
}
.ev-r2-item:hover { border-color: #BFDBFE; background: #EFF6FF; }
.ev-r2-item input { margin-top: 3px; }
.ev-r2-item-text { flex: 1; min-width: 0; }
.ev-r2-item-name { font-weight: 600; color: #0F172A; font-size: 14px; }
.ev-r2-item-email { font-size: 12px; color: #64748B; margin-top: 2px; }
.ev-r2-hint { font-size: 13px; color: #475569; margin: 0 0 8px; line-height: 1.45; }
.ev-r2-tools { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }

/* =========================================
   GESTIÓN DE UNIVERSIDADES (panel admin)
   ========================================= */
.page-header-titles { display: flex; flex-direction: column; gap: 2px; }
.page-header-titles h2 { margin: 0; }
.page-subtitle { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); font-weight: 400; }

.uni-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 18px 0 4px;
}

.uni-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    padding: 16px 18px;
    box-shadow: var(--shadow-xs);
}

.uni-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.uni-stat-icon svg { width: 22px; height: 22px; }

.uni-tone-info { background: var(--tone-info-bg); color: var(--tone-info-fg); }
.uni-tone-success { background: var(--tone-success-bg); color: var(--tone-success-fg); }
.uni-tone-purple { background: var(--tone-purple-bg); color: var(--tone-purple-fg); }
.uni-tone-warning { background: var(--tone-warning-bg); color: var(--tone-warning-fg); }

.uni-stat-body { display: flex; flex-direction: column; min-width: 0; }
.uni-stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.uni-stat-value { font-size: 24px; font-weight: 700; color: var(--text-main); line-height: 1.2; }
.uni-stat-hint { font-size: 11px; color: var(--text-light); }

.uni-col-id { color: var(--text-muted); font-weight: 600; }

.uni-name-cell { display: flex; align-items: center; gap: 12px; }
.uni-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.uni-cell-main { display: block; font-weight: 600; color: var(--text-main); }
.uni-cell-sub { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.uni-loc { display: flex; align-items: flex-start; gap: 6px; }
.uni-loc-ico { width: 15px; height: 15px; color: var(--text-light); flex-shrink: 0; margin-top: 2px; }
.uni-loc > div { min-width: 0; }
.uni-loc span { display: block; }

.uni-muted { color: var(--text-light); }

.uni-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.uni-count .ico-badge, .uni-count svg { width: 14px; height: 14px; }
.uni-count-part { background: var(--tone-info-bg); color: var(--tone-info-fg); }
.uni-count-proj { background: var(--tone-success-bg); color: var(--tone-success-fg); }

.uni-empty { text-align: center; color: var(--text-muted); padding: 28px 12px; }

.table-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.table-footer-bar .paginador {
    margin-top: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.table-footer-showing {
    font-size: 13px;
    color: var(--text-muted);
    flex: 0 1 auto;
}

.uni-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.uni-table-footer .paginador { margin-top: 0; flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
.uni-showing { font-size: 13px; color: var(--text-muted); flex: 0 1 auto; }

.uni-solicitudes-section {
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    border-radius: var(--radius-md, 12px);
    padding: 16px 18px;
    margin: 0 0 16px;
}
.uni-solicitudes-section-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    font-size: 16px;
    color: #92400E;
}
.uni-solicitudes-section-head h3 .lucide { width: 18px; height: 18px; color: #D97706; }
.uni-solicitudes-section-head p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #78350F;
}
.uni-solicitudes-table-wrap { overflow-x: auto; }
.uni-solicitudes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    overflow: hidden;
}
.uni-solicitudes-table th,
.uni-solicitudes-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #FEF3C7;
    text-align: left;
    vertical-align: middle;
}
.uni-solicitudes-table th {
    background: #FEF9C3;
    color: #92400E;
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.uni-solicitudes-table tr:last-child td { border-bottom: none; }
.uni-solicitudes-table .uni-sol-col-acciones {
    text-align: right;
    min-width: 200px;
    white-space: nowrap;
}
.uni-sol-acciones {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.uni-sol-btn-aceptar,
.uni-sol-btn-rechazar {
    font-size: 12px !important;
    padding: 7px 10px !important;
    line-height: 1.2 !important;
    white-space: nowrap;
}
.uni-solicitudes-table .btn-sm { margin-left: 0; }

.uni-otra-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.uni-otra-enviar {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 148px;
    min-height: 38px;
    padding: 9px 18px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    font-family: inherit;
    color: #FFFFFF !important;
    background-color: #1E293B !important;
    border: none !important;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    transition: background 0.15s ease, transform 0.1s ease;
}

.uni-otra-enviar:hover:not(:disabled) {
    background-color: #374151 !important;
}

.uni-otra-enviar:active:not(:disabled) {
    transform: translateY(1px);
}

.uni-otra-enviar.uni-otra-enviando {
    cursor: wait !important;
}

.uni-otra-enviar:disabled {
    opacity: 0.85;
    cursor: default !important;
}

.uni-otra-enviar.uni-otra-enviado {
    background-color: #059669 !important;
    cursor: default !important;
}

.uni-otra-enviar.uni-otra-enviado:hover {
    background-color: #059669 !important;
}

.uni-otra-status { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.uni-otra-status-ok { color: #059669; font-weight: 600; }

.uni-otra-panel .form-control {
    background: #FFFFFF;
}

.uni-solicitudes-banner {
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    border-radius: var(--radius-md, 12px);
    padding: 14px 16px;
    margin: 14px 0 6px;
}

.uni-solicitudes-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.uni-solicitudes-head .lucide { width: 20px; height: 20px; color: #D97706; flex-shrink: 0; margin-top: 2px; }
.uni-solicitudes-head strong { display: block; color: #92400E; font-size: 14px; }
.uni-solicitudes-head p { margin: 4px 0 0; font-size: 13px; color: #78350F; }

.uni-solicitudes-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.uni-solicitudes-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    background: #fff;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: 10px 12px;
}

.uni-sol-nombre { font-weight: 600; color: var(--text-main); flex: 1 1 180px; }
.uni-sol-meta { font-size: 12px; color: var(--text-muted); flex: 1 1 160px; }

@media (max-width: 900px) {
    .uni-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .uni-stats { grid-template-columns: 1fr; }
}

/* =========================================
   RECORDATORIO DE REVISIONES (modal)
   ========================================= */
.rec-selall {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    padding: 10px 12px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 10px;
}
.rec-selall input { width: 16px; height: 16px; cursor: pointer; }

.rec-lista {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
}

.rec-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .12s ease;
}
.rec-item:hover { background: var(--bg-main); }
.rec-item input { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }

.rec-item-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rec-item-name { font-weight: 600; color: var(--text-main); font-size: 14px; }
.rec-item-mail { font-size: 12px; color: var(--text-muted); }

.rec-item-badge {
    flex-shrink: 0;
    background: var(--tone-warning-bg);
    color: var(--tone-warning-fg);
    border: 1px solid var(--tone-warning-border);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.rec-item-badge-info {
    background: var(--tone-info-bg);
    color: var(--tone-info-fg);
    border-color: var(--tone-info-border);
}

.rec-empty { text-align: center; color: var(--text-muted); padding: 20px 12px; font-size: 14px; }

.rec-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}
.rec-actions .btn-primary { display: inline-flex; align-items: center; gap: 7px; }
.rec-actions .btn-primary i, .rec-actions .btn-primary svg { width: 16px; height: 16px; }

/* =========================================
   REPORTES Y RESPALDOS (admin)
   ========================================= */
.rep-section { margin: 22px 0 8px; }
.rep-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.rep-section-title .lucide,
.rep-section-title [data-lucide] { width: 18px; height: 18px; color: var(--brand); }
.rep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.rep-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    padding: 16px 18px;
    box-shadow: var(--shadow-xs);
}
.rep-card-backup {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
}
.rep-card-body h4 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.rep-card-body p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}
.rep-card .btn-sm,
.rep-card .btn-primary {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.rep-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.rep-actions .btn-sm-pdf {
    color: #B91C1C;
}
.rep-actions .btn-sm-pdf:hover {
    background: #FEF2F2;
    border-color: #FECACA;
}
@media (max-width: 640px) {
    .rep-card-backup { flex-direction: column; align-items: stretch; }
    .rep-card-backup .btn-primary { width: 100%; justify-content: center; }
    .rep-actions .btn-sm { flex: 1; justify-content: center; }
}
