/* Athena EDU — estilos base (dashboard + login) */

:root {
    /* Paleta */
    --c-cream: #f8ede3;
    --c-sand: #dfd3c3;
    --c-taupe: #d0b8a8;
    --c-accent: #c5705d;

    /* Neutrales */
    --text: #1f2937;
    --text-muted: #6b7280;
    --surface: var(--c-cream);
    --card: #ffffff;

    /* Acciones */
    --primary: var(--c-accent);
    --primary-ink: #ffffff;
    /* Alias heredados (evitan botones “fantasma” si faltan) */
    --navy-800: #1f2937;
    --blue-mid: #b85547;

    /* Sombras / radios */
    --shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
    --shadow-lg: 0 18px 45px rgba(31, 41, 55, 0.12);
    --radius: 14px;
    --sidebar-w: 260px;
    --header-h: 168px;
    --font: "Inter", system-ui, -apple-system, sans-serif;
}

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

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--surface);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- Layout app --- */
.app-body {
    min-height: 100vh;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--c-sand) 0%, #ffffff 100%);
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0 1rem;
    position: sticky;
    top: 0;
    align-self: flex-start;
    min-height: 100vh;
}

.sidebar-brand {
    padding: 0 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(31, 41, 55, 0.08);
}

.sidebar-logo-link {
    display: block;
}

.sidebar-logo {
    display: block;
    max-width: 100%;
    height: auto;
}

.sidebar-section {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 1.25rem 1.25rem 0.5rem;
    padding: 0;
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0 0.75rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
    background: rgba(197, 112, 93, 0.12);
    color: var(--text);
}

.sidebar-link.is-active {
    background: rgba(197, 112, 93, 0.16);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(197, 112, 93, 0.28);
}

.sidebar-icon {
    width: 1.25rem;
    text-align: center;
    color: var(--primary);
    opacity: 0.95;
}

.sidebar-link.is-active .sidebar-icon {
    color: var(--gold-bright);
}

.sidebar-help {
    margin-top: auto;
    margin-left: 1rem;
    margin-right: 1rem;
    padding: 1rem;
    background: rgba(208, 184, 168, 0.25);
    border-radius: var(--radius);
    border: 1px solid rgba(31, 41, 55, 0.08);
}

.sidebar-help-title {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.sidebar-help-text {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.sidebar-help-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}

.sidebar-help-link:hover {
    text-decoration: underline;
}

/* --- Main area --- */
.main-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.top-header {
    background: transparent;
    color: var(--text);
    padding: 1.25rem 1.75rem 1rem;
    position: relative;
    flex-shrink: 0;
}

.top-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.breadcrumb {
    margin: 0 0 0.25rem;
    font-size: 0.8rem;
    opacity: 1;
    color: var(--text-muted);
}

.page-heading {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.top-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.search-pill {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    border: 1px solid rgba(31, 41, 55, 0.10);
    padding: 0.35rem 0.35rem 0.35rem 1rem;
    min-width: 200px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font: inherit;
    font-size: 0.875rem;
    min-width: 0;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: rgba(197, 112, 93, 0.12);
    color: var(--primary);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid rgba(31, 41, 55, 0.10);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    position: relative;
    transition: background 0.15s;
}

.icon-btn:hover {
    background: rgba(197, 112, 93, 0.10);
}

.icon-btn--ghost {
    background: transparent;
}

.notify-dot {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: 0.25rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #9f5445 100%);
    color: var(--primary-ink);
    font-weight: 700;
    font-size: 0.95rem;
    display: grid;
    place-items: center;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(197, 112, 93, 0.12);
    border: 1px solid rgba(197, 112, 93, 0.18);
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s;
}

.btn-logout:hover {
    background: rgba(197, 112, 93, 0.18);
}

.main-content {
    flex: 1;
    padding: 0 1.75rem 2rem;
    margin-top: 0;
    position: relative;
    z-index: 1;
}

/* --- Métricas --- */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1100px) {
    .metrics-row {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.metric-card--glass {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.metric-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    color: #fff;
    flex-shrink: 0;
}

.metric-icon--blue {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.metric-icon--gold {
    background: linear-gradient(135deg, #92400e 0%, var(--gold-bright) 100%);
}

.metric-icon--red {
    background: linear-gradient(135deg, #991b1b 0%, #ef4444 100%);
}

.metric-label {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-value {
    margin: 0.15rem 0 0;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
}

.metric-trend {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.metric-trend--up {
    color: #16a34a;
}

.metric-trend--down {
    color: #dc2626;
}

/* --- Grid paneles --- */
.grid-two {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.grid-two--bottom {
    margin-bottom: 0;
}

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

.panel {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.35rem 1.5rem;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.panel-head--row {
    align-items: center;
    margin-bottom: 1rem;
}

.panel-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.panel-sub {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.panel-tabs {
    display: flex;
    gap: 0.35rem;
    background: var(--surface);
    padding: 0.25rem;
    border-radius: 10px;
}

.panel-tab {
    border: none;
    background: transparent;
    padding: 0.45rem 0.75rem;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
}

.panel-tab.is-active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.chart-area {
    min-height: 220px;
    padding-top: 0.5rem;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
    height: 200px;
    padding: 0 0.25rem;
}

.chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    min-width: 0;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
}

.chart-bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    min-height: 4px;
}

.chart-bar--top {
    background: linear-gradient(180deg, #7c3aed 0%, #4f46e5 100%);
}

.chart-bar--bottom {
    background: linear-gradient(180deg, #1e3a8a 0%, #2563eb 100%);
}

.panel-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.panel-wallet {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1rem 1.25rem;
}

.donut {
    --p: 50;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background: conic-gradient(
        var(--gold-bright) calc(var(--p) * 1%),
        #e2e8f0 0
    );
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text);
}

.donut--alt {
    background: conic-gradient(#6366f1 calc(var(--p) * 1%), #e2e8f0 0);
}

.donut--warn {
    background: conic-gradient(#f59e0b calc(var(--p) * 1%), #e2e8f0 0);
}

.donut span {
    width: 68%;
    height: 68%;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px #f1f5f9;
}

.wallet-title {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.wallet-amount {
    margin: 0.15rem 0 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.wallet-trend {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
}

/* --- Perfil + tabla --- */
.panel-profile {
    padding: 1.5rem;
}

.profile-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
    color: #fff;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.profile-name {
    margin: 0;
    font-weight: 700;
}

.profile-meta {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.profile-text {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.55;
}

.profile-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    background: var(--gold-dim);
    border: 1px solid rgba(201, 162, 39, 0.25);
}

.profile-box-label {
    margin: 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.profile-box-value {
    margin: 0.2rem 0 0;
    font-weight: 700;
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    transition: opacity 0.15s, transform 0.1s;
}

.btn-outline-gold {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--gold-bright);
}

.btn-outline-gold:hover {
    background: rgba(201, 162, 39, 0.12);
}

.btn-icon-plain {
    border: none;
    background: var(--surface);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    text-align: left;
    padding: 0.65rem 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-ok {
    background: #dcfce7;
    color: #166534;
}

.badge-warn {
    background: #fef3c7;
    color: #b45309;
}

/* --- Login --- */
.auth-body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(145deg, var(--navy-900) 0%, #0c2744 50%, #1a1520 100%);
    display: grid;
    place-items: center;
    padding: 2rem;
}

.auth-wrap {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--radius);
    padding: 2rem 2rem 2.25rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo {
    max-width: 220px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.auth-tagline {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #475569;
}

.form-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font: inherit;
    margin-bottom: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-dim);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #8f4539 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(158, 74, 62, 0.35);
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-block {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

/* --- Responsive sidebar --- */
@media (max-width: 900px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 1rem;
    }

    .sidebar-brand {
        border-bottom: none;
        padding: 0 1rem 0 0;
    }

    .sidebar-nav {
        flex: 1;
        min-width: 200px;
    }

    .sidebar-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .sidebar-help {
        width: 100%;
        margin: 1rem 0 0;
    }

    .main-content {
        margin-top: -2rem;
    }

    .user-name {
        display: none;
    }
}

/* --- Módulo Alumnos --- */
.main-content--flush-top {
    padding-top: 0.5rem;
}

.module-page {
    max-width: 1200px;
    margin: 0 auto;
}

.module-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.module-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.module-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 36rem;
}

.module-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    min-width: 220px;
    box-shadow: var(--shadow);
}

.search-box .fa-magnifying-glass {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-box-input {
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.875rem;
    min-width: 0;
    flex: 1;
    outline: none;
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    background: linear-gradient(135deg, #a67c00 0%, var(--gold-bright) 100%);
    color: var(--navy-900);
    box-shadow: 0 4px 14px rgba(201, 162, 39, 0.35);
}

.btn-gold:hover {
    filter: brightness(1.06);
}

.module-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.module-alert--ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.module-alert--error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.module-panel {
    padding: 0;
    overflow: hidden;
}

.data-table--actions th,
.data-table--actions td {
    vertical-align: middle;
}

.th-actions,
.td-actions {
    width: 6.5rem;
    text-align: right;
    white-space: nowrap;
}

.td-actions {
    padding-right: 0.75rem !important;
}

.curp-code {
    font-size: 0.8rem;
    background: #f8fafc;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

.badge-muted {
    background: #f1f5f9;
    color: #64748b;
}

.cell-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem !important;
}

.cell-error {
    color: #b91c1c;
}

.row-loading td {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem !important;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: var(--surface);
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
}

.btn-icon:hover {
    background: #e2e8f0;
    color: var(--text);
}

.btn-icon--edit:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.btn-icon--danger:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-height: calc(100vh - 3rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal--lg {
    max-width: 520px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.modal-close:hover {
    background: #e2e8f0;
    color: var(--text);
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #fafafa;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.form-group {
    margin: 0;
}

.form-group--full {
    grid-column: 1 / -1;
}

.modal-body .form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #475569;
}

.req {
    color: #dc2626;
}

.modal-body .form-input,
.modal-body select.form-input {
    width: 100%;
    margin-bottom: 0;
}

.form-errors {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.875rem;
}

.form-errors ul {
    margin: 0;
    padding-left: 1.2rem;
}

.btn-ghost {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: var(--text);
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.btn-ghost:hover {
    background: var(--surface);
}

.modal-footer .btn-primary {
    padding: 0.55rem 1.25rem;
    border-radius: 10px;
    cursor: pointer;
}

.modal--tutor {
    max-width: 560px;
}

.form-textarea {
    resize: vertical;
    min-height: 4rem;
    margin-bottom: 0;
}

.cell-muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.td-alumnos {
    max-width: 14rem;
    font-size: 0.85rem;
    vertical-align: top;
}

.tutor-alumnos-preview {
    display: inline-block;
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.tutor-alumnos-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.tutor-alumnos-title {
    margin: 0 0 0.65rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.tutor-alumnos-title .fa-user-graduate {
    margin-right: 0.35rem;
    color: var(--gold-bright);
}

.tutor-alumnos-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tutor-alumnos-list li {
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.35rem;
    background: var(--surface);
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.45;
}

.ta-name {
    font-weight: 600;
    color: var(--text);
}

.ta-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.tutor-alumnos-empty {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* --- Pestañas Grupos y materias --- */
.gm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.25rem;
    background: #e2e8f0;
    border-radius: 12px;
    max-width: 640px;
}

.gm-tab {
    border: none;
    background: transparent;
    padding: 0.55rem 1.1rem;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.gm-tab:hover {
    color: var(--text);
}

.gm-tab.is-active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.gm-panel {
    margin-bottom: 2rem;
}

.gm-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.gm-panel-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.gm-asig-lead {
    margin: -0.25rem 0 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 52rem;
}

.data-table--gmd .gm-cell-grupo {
    font-weight: 600;
    color: var(--text);
}

.modal--sm {
    max-width: 420px;
}

/* --- Módulo Docentes --- */
.modal--docente {
    max-width: 580px;
}

.docente-asignaciones {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.docente-asignaciones-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.docente-asignaciones-hint {
    margin: 0.35rem 0 0.85rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-sm-add {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(201, 162, 39, 0.45);
    background: rgba(201, 162, 39, 0.1);
    color: var(--text);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-sm-add:hover {
    background: rgba(201, 162, 39, 0.2);
}

.docente-asig-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.65rem 0.75rem;
    align-items: end;
    margin-bottom: 0.65rem;
}

.docente-asig-field .form-label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.docente-asig-row .docente-asig-quitar {
    margin-bottom: 0.15rem;
}

@media (max-width: 520px) {
    .docente-asig-row {
        grid-template-columns: 1fr;
    }

    .docente-asig-row .docente-asig-quitar {
        justify-self: end;
    }
}

/* --- Asistencias --- */
.asist-toolbar {
    flex-wrap: wrap;
}

.asist-filtros {
    align-items: flex-end;
}

.asist-filtro-grupo,
.asist-filtro-fecha {
    margin: 0;
}

.asist-filtro-grupo .form-input,
.asist-filtro-fecha .form-input {
    margin-bottom: 0;
    min-width: 200px;
}

.asist-placeholder {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 36rem;
}

.asist-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.asist-table-wrap {
    padding: 0;
    overflow: hidden;
}

.data-table--asistencias .th-num,
.data-table--asistencias .td-num {
    width: 2.5rem;
    text-align: center;
    color: var(--text-muted);
}

.data-table--asistencias .th-estados {
    text-align: center;
}

.data-table--asistencias .asist-subhead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.data-table--asistencias .td-radio {
    text-align: center;
    vertical-align: middle;
}

.asist-radio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0.35rem;
}

.asist-radio input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.asist-leyenda {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.asist-leyenda .dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    margin: 0 0.2rem 0 0.75rem;
    vertical-align: middle;
}

.asist-leyenda .dot:first-child {
    margin-left: 0;
}

.asist-leyenda .dot-p {
    background: #2563eb;
}

.asist-leyenda .dot-f {
    background: #dc2626;
}

.asist-leyenda .dot-r {
    background: #d97706;
}

/* --- Calificaciones --- */
.calif-filtros {
    flex-wrap: wrap;
    max-width: 100%;
}

.calif-hint {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.data-table--calif .th-calif,
.data-table--calif .th-prom {
    min-width: 7rem;
}

.data-table--calif .input-calif {
    max-width: 6.5rem;
    margin: 0;
    text-align: center;
    font-weight: 600;
}

.data-table--calif .td-prom-cell {
    font-weight: 700;
    color: var(--text);
    font-size: 1.05rem;
}

.data-table--calif .calif-prom-val {
    display: inline-block;
    min-width: 2.5rem;
}

/* --- Finanzas --- */
.fin-tabs {
    margin-bottom: 1.25rem;
}

.fin-hint,
.fin-filter-row .form-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.fin-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.fin-filter-row .form-input {
    margin-bottom: 0;
    min-width: 220px;
}

.fin-mono .td-money,
.fin-mono .th-money {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.fin-select-estado {
    min-width: 280px;
}

.fin-estado-filtro {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.fin-estado-filtro .form-group {
    margin: 0;
}

.fin-estado-result {
    margin-top: 0.5rem;
}

.fin-resumen-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.fin-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
}

.fin-card-label {
    margin: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.fin-card-value {
    margin: 0.35rem 0 0;
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.fin-card--warn .fin-card-value {
    color: #b45309;
}

.fin-card--ok .fin-card-value {
    color: #15803d;
}

.fin-alumno-nombre {
    margin: 0 0 1rem;
    font-weight: 600;
    color: var(--text);
}

.fin-mov-det {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.fin-saldo-cell {
    font-weight: 700;
}

.fin-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
}

/* --- Dashboard estilo Frest (más limpio) --- */
.dash-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr 0.8fr;
    gap: 1.25rem;
    align-items: start;
}

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

.dash-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
    padding: 1.25rem 1.35rem;
}

.dash-card {
    animation: dashEnter 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.dash-grid > *:nth-child(1) { animation-delay: 20ms; }
.dash-grid > *:nth-child(2) { animation-delay: 60ms; }
.dash-grid > *:nth-child(3) { animation-delay: 100ms; }
.dash-grid > *:nth-child(4) { animation-delay: 140ms; }
.dash-grid > *:nth-child(5) { animation-delay: 180ms; }
.dash-grid > *:nth-child(6) { animation-delay: 220ms; }

@keyframes dashEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dash-card { animation: none; }
}

/* Sidebar colapsada */
body.sidebar-collapsed .sidebar {
    width: 86px;
}

body.sidebar-collapsed .sidebar-section,
body.sidebar-collapsed .sidebar-help,
body.sidebar-collapsed .sidebar-link span:not(.sidebar-icon) {
    display: none;
}

body.sidebar-collapsed .sidebar-list {
    padding: 0 0.6rem;
}

body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 0.75rem;
}

body.sidebar-collapsed .sidebar-brand {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

body.sidebar-collapsed .sidebar-logo {
    max-width: 100%;
}

.dash-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.dash-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.dash-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.dash-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

.dash-link:hover {
    text-decoration: underline;
}

.dash-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
    padding: 1.5rem;
}

@media (max-width: 700px) {
    .dash-hero {
        grid-template-columns: 1fr;
    }
}

.dash-eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.dash-hero-title {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.dash-hero-sub {
    margin: 0.45rem 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 32rem;
}

.dash-hero-kpi {
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.75rem;
}

.dash-hero-kpi-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.dash-hero-kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.dash-hero-art {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dash-trophy {
    width: 9.5rem;
    height: 9.5rem;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(197, 112, 93, 0.12), rgba(197, 112, 93, 0.02));
    display: grid;
    place-items: center;
    color: var(--primary);
    font-size: 3.25rem;
}

.dash-stack {
    display: grid;
    gap: 1rem;
}

.dash-stat {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 1rem 1.1rem;
}

.dash-stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
}

.dash-stat-icon--blue {
    background: linear-gradient(135deg, #a85a4a, var(--primary));
}

.dash-stat-icon--gold {
    background: linear-gradient(135deg, #8f4b3f, var(--c-taupe));
}

.dash-stat-icon--green {
    background: linear-gradient(135deg, #7a3f35, var(--c-sand));
}

.dash-stat-label {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.dash-stat-value {
    margin: 0.15rem 0 0;
    font-size: 1.35rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.dash-donut-wrap {
    display: grid;
    place-items: center;
    padding: 0.75rem 0 0.25rem;
}

.dash-donut-ring {
    --p: 0;
    width: 10.25rem;
    height: 10.25rem;
    border-radius: 50%;
    background: conic-gradient(var(--primary) calc(var(--p) * 1%), rgba(31, 41, 55, 0.10) 0);
    display: grid;
    place-items: center;
}

.dash-donut-center {
    width: 72%;
    height: 72%;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px #f1f5f9;
    text-align: center;
}

.dash-donut-big {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.dash-donut-small {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.dash-note {
    margin: 0.5rem 0 0;
}

.dash-wide {
    grid-column: 1 / -1;
}

.dash-chart-placeholder {
    height: 150px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc, #fff);
    border: 1px dashed #e2e8f0;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.dash-bars {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 0.4rem;
    align-items: end;
    padding: 1rem;
}

.dash-bar {
    height: 40%;
    border-radius: 6px 6px 0 0;
    background: rgba(37, 99, 235, 0.35);
}

.dash-bars .dash-bar:nth-child(3n) { height: 65%; }
.dash-bars .dash-bar:nth-child(4n) { height: 30%; }
.dash-bars .dash-bar:nth-child(5n) { height: 80%; background: rgba(59, 130, 246, 0.45); }

.th-money,
.td-money {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* --- Dashboard analítico (métricas + gráfica) --- */
.dash-board {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 1280px;
    margin: 0 auto;
}

.dash-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
    gap: 1rem;
}

.dash-mini-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
    padding: 1rem 1.1rem;
    animation: dashEnter 500ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.dash-metrics-grid > *:nth-child(1) { animation-delay: 20ms; }
.dash-metrics-grid > *:nth-child(2) { animation-delay: 45ms; }
.dash-metrics-grid > *:nth-child(3) { animation-delay: 70ms; }
.dash-metrics-grid > *:nth-child(4) { animation-delay: 95ms; }
.dash-metrics-grid > *:nth-child(5) { animation-delay: 120ms; }
.dash-metrics-grid > *:nth-child(6) { animation-delay: 145ms; }
.dash-metrics-grid > *:nth-child(7) { animation-delay: 170ms; }
.dash-metrics-grid > *:nth-child(8) { animation-delay: 195ms; }

@media (prefers-reduced-motion: reduce) {
    .dash-mini-card { animation: none; }
}

.dash-mini-icon {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(197, 112, 93, 0.18), rgba(197, 112, 93, 0.06));
    color: var(--primary);
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.dash-mini-label {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dash-mini-value {
    margin: 0.35rem 0 0;
    font-size: 1.35rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    line-height: 1.15;
}

.dash-mini-hint {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.dash-row-2 {
    display: grid;
    grid-template-columns: 1.25fr 0.85fr;
    gap: 1.25rem;
    align-items: stretch;
}

@media (max-width: 960px) {
    .dash-row-2 {
        grid-template-columns: 1fr;
    }
}

.dash-chart-card .dash-card-title {
    margin: 0;
}

.dash-chart-bars {
    display: flex;
    gap: 0.45rem;
    align-items: flex-end;
    min-height: 160px;
    padding: 0.5rem 0.25rem 0;
}

.dash-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.dash-chart-bar-wrap {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.dash-chart-bar {
    width: 100%;
    max-width: 48px;
    min-height: 4px;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, var(--primary) 0%, rgba(197, 112, 93, 0.45) 100%);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.dash-chart-bar:hover {
    transform: scaleY(1.02);
    filter: brightness(1.05);
}

.dash-chart-x {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.dash-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dash-rank-item {
    display: grid;
    grid-template-columns: 1.6rem 1fr auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.dash-rank-item:last-child {
    border-bottom: none;
}

.dash-rank-n {
    font-weight: 800;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.dash-rank-name {
    font-weight: 600;
    color: var(--text);
}

.dash-rank-val {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--primary);
}

/* Variante compacta tablas */
.data-table--compact th,
.data-table--compact td {
    padding: 0.4rem 0.55rem;
    font-size: 0.8125rem;
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.875rem;
    border-radius: 10px;
}

.portal-login-foot {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.portal-login-foot a {
    color: var(--primary);
    font-weight: 600;
}

.portal-body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
}

.portal-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.portal-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: var(--shadow);
}

.portal-header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.portal-logo {
    border-radius: 10px;
}

.portal-eyebrow {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
}

.portal-user {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
}

.portal-nav-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.portal-main {
    flex: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
    width: 100%;
}

.portal-heading {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.portal-lead {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 40rem;
}

.portal-empty {
    padding: 1.5rem;
}

.portal-student-card {
    margin-bottom: 1.25rem;
}

.portal-student-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.portal-student-name {
    margin: 0;
    font-size: 1.15rem;
}

.portal-student-meta {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.portal-kpis {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.portal-kpi {
    text-align: right;
}

.portal-kpi-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.portal-kpi-val {
    font-size: 1.2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.portal-subtitle {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.portal-subtitle i {
    margin-right: 0.35rem;
    color: var(--primary);
}

.portal-muted {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.portal-two-col {
    margin-top: 0.5rem;
}
