/* =============================================================
   MyCollege design system — single source of truth.
   One font (IBM Plex Sans Arabic 400/500/700 — never other weights),
   one accent with a tint ramp, semantic colors distinct from the accent.
   Add styles through these tokens; do not start a new "alignment layer".
   ============================================================= */

/* ---- Self-hosted fonts (wwwroot/fonts) — no CDN dependency ---- */
@font-face {
    font-family: "IBM Plex Sans Arabic";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-arabic-400-arabic.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E, U+2010-2011;
}

@font-face {
    font-family: "IBM Plex Sans Arabic";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-arabic-400-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Sans Arabic";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-arabic-500-arabic.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E, U+2010-2011;
}

@font-face {
    font-family: "IBM Plex Sans Arabic";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-arabic-500-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Sans Arabic";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-arabic-700-arabic.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E, U+2010-2011;
}

@font-face {
    font-family: "IBM Plex Sans Arabic";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-arabic-700-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}

/* ---- Design tokens ---- */
:root {
    --mc-bg: #f4f7f6;
    --mc-surface: #ffffff;
    --mc-surface-muted: #f7faf9;
    --mc-border: #e2eae8;
    --mc-border-strong: #ccd9d6;
    --mc-text: #1e2b29;
    --mc-muted: #556663;
    --mc-topbar-bg: rgba(255, 255, 255, .96);
    --mc-brand-panel: #11201e;   /* login brand panel — dark in both themes */
    /* Sidebar — light by owner decision (2026-07-11) */
    --mc-sidebar: #ffffff;
    --mc-sidebar-2: #f6f9f8;
    --mc-sidebar-border: #e2eae8;
    --mc-sidebar-text: #2c3c3a;
    --mc-sidebar-muted: #647370;
    --mc-sidebar-scroll: #c2d1cd;
    --mc-sidebar-hover: #e6f2f0;         /* legacy alias — menu hover bg */
    --mc-menu-hover-bg: #e6f2f0;
    --mc-menu-hover-text: #0b5d56;
    --mc-menu-active-bg: #e6f2f0;
    --mc-menu-active-text: #0b5d56;
    --mc-menu-disabled: #a8b5b2;
    --mc-accent: #0f766e;
    --mc-accent-strong: #0b5d56;
    --mc-accent-soft: #e6f2f0;
    --mc-accent-border: #bfdeda;
    --mc-warning: #a05a0a;
    --mc-warning-soft: #fbf1e0;
    --mc-gold: #a05a0a;          /* legacy alias — warning */
    --mc-gold-soft: #fbf1e0;     /* legacy alias — warning tint */
    --mc-danger: #b3261e;
    --mc-danger-soft: #fceceb;
    --mc-danger-border: #f2cdca;
    --mc-success: #297c41;
    --mc-success-strong: #226636;
    --mc-success-soft: #e9f5ec;
    --mc-info: #39618f;
    --mc-info-soft: #eaf0f7;
    --mc-grid-header: #f4f7f6;
    --mc-grid-header-text: #556663;
    --mc-grid-line: #e9efed;
    --mc-shadow: 0 8px 24px rgba(10, 25, 22, .08);
    --mc-shadow-soft: 0 1px 2px rgba(10, 25, 22, .05);
    --mc-radius: 10px;
    --mc-radius-sm: 8px;
    --mc-focus-ring: 0 0 0 3px rgba(15, 118, 110, .14);
    /* Strong ease-out for UI feedback (press/enter); punchier than the CSS default. */
    --mc-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --mc-accent-text: var(--mc-accent-strong);
    --mc-font: "IBM Plex Sans Arabic", "Segoe UI Variable", "Segoe UI", Tahoma, Arial, sans-serif;
}

/* ---- Dark theme (html[data-theme="dark"], toggled from the top bar;
       the Syncfusion stylesheet is swapped to bootstrap5-dark.css in JS) ---- */
:root[data-theme="dark"] {
    --mc-bg: #0f1917;
    --mc-surface: #17221f;
    --mc-surface-muted: #1c2825;
    --mc-border: #253431;
    --mc-border-strong: #344642;
    --mc-text: #e2eae8;
    --mc-muted: #9cafab;
    --mc-topbar-bg: rgba(19, 29, 27, .95);
    --mc-accent-soft: rgba(15, 118, 110, .18);
    --mc-accent-border: rgba(15, 118, 110, .45);
    --mc-accent-text: #5cc0b5;
    --mc-warning: #d99a4e;
    --mc-warning-soft: rgba(217, 154, 78, .15);
    --mc-gold: #d99a4e;
    --mc-gold-soft: rgba(217, 154, 78, .15);
    --mc-danger: #d66a60;
    --mc-danger-soft: rgba(214, 106, 96, .15);
    --mc-danger-border: rgba(214, 106, 96, .35);
    --mc-success: #3a9457;
    --mc-success-strong: #2f7a47;
    --mc-success-soft: rgba(58, 148, 87, .16);
    --mc-info: #7ea6d8;
    --mc-info-soft: rgba(126, 166, 216, .15);
    --mc-grid-header: #1c2825;
    --mc-grid-header-text: #9cafab;
    --mc-grid-line: #223230;
    --mc-shadow: 0 8px 24px rgba(0, 0, 0, .4);
    --mc-shadow-soft: 0 1px 2px rgba(0, 0, 0, .3);
    /* Sidebar goes dark with the rest of the app */
    --mc-sidebar: #11201e;
    --mc-sidebar-2: #0b1614;
    --mc-sidebar-border: rgba(255, 255, 255, .07);
    --mc-sidebar-text: #cfdedb;
    --mc-sidebar-muted: #879c98;
    --mc-sidebar-scroll: #33504b;
    --mc-sidebar-hover: rgba(255, 255, 255, .08);
    --mc-menu-hover-bg: rgba(255, 255, 255, .08);
    --mc-menu-hover-text: #ffffff;
    --mc-menu-active-bg: color-mix(in srgb, var(--mc-accent) 30%, transparent);
    --mc-menu-active-text: #ffffff;
    --mc-menu-disabled: #5f716d;
}

/* ---- Base ---- */
html, body {
    font-family: var(--mc-font);
    font-size: 15.5px;
    line-height: 1.6;
    background: var(--mc-bg);
    color: var(--mc-text);
    letter-spacing: 0;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
}

h1:focus {
    outline: none;
}

h1 {
    margin: 0;
    color: var(--mc-text);
    font-size: 1.42rem;
    font-weight: 700;
    line-height: 1.3;
}

a, .btn-link {
    color: var(--mc-accent-text);
}

.btn {
    border: 1px solid transparent;
    border-radius: var(--mc-radius-sm);
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.btn-link {
    border: 0;
    background: transparent;
    padding: .25rem .35rem;
    text-decoration: none;
    font-weight: 500;
}

.btn-link:hover {
    color: var(--mc-accent-text);
    text-decoration: none;
}

/* ---- Utility classes (Bootstrap-style names used in markup) ---- */
.d-flex {
    display: flex;
}

.gap-2 {
    gap: .5rem;
}

.w-100 {
    width: 100%;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: .5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.me-2 {
    margin-inline-end: .5rem;
}

.px-3 {
    padding-inline: 1rem;
}

.px-4 {
    padding-inline: 1.5rem;
}

.ps-3 {
    padding-inline-start: 1rem;
}

.alert {
    border-radius: var(--mc-radius-sm);
    padding: .7rem .85rem;
    margin-bottom: 1rem;
    border: 1px solid var(--mc-border);
}

.alert-danger {
    background: var(--mc-danger-soft);
    border-color: var(--mc-danger-border);
    color: var(--mc-danger);
}

.navbar {
    display: flex;
    align-items: center;
}

.navbar-dark {
    color: #fff;
}

.container-fluid {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-toggler {
    border: 1px solid transparent;
    border-radius: var(--mc-radius-sm);
    min-width: 2.25rem;
    min-height: 2.25rem;
}

.navbar-toggler-icon {
    display: block;
    width: 1.25rem;
    height: .9rem;
    border-top: 2px solid rgba(255, 255, 255, .82);
    border-bottom: 2px solid rgba(255, 255, 255, .82);
    position: relative;
}

.navbar-toggler-icon::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: calc(50% - 1px);
    border-top: 2px solid rgba(255, 255, 255, .82);
}

.nav {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.nav-link {
    text-decoration: none;
}

.collapse {
    display: none;
}

.btn-primary {
    color: #fff;
    background-color: var(--mc-accent);
    border-color: var(--mc-accent);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: var(--mc-focus-ring);
}

.content {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--mc-success);
}

.invalid {
    outline: 1px solid var(--mc-danger);
}

.validation-message {
    color: var(--mc-danger);
    font-size: .82rem;
    margin-top: .2rem;
}

/* ---- Blazor boilerplate ---- */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: var(--mc-border);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

.loading-progress circle:last-child {
            stroke: var(--mc-accent);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 700;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* ---- Page scaffolding ---- */
.page-header {
    position: sticky;
    inset-block-start: var(--topbar-height, 4rem);
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-bottom: 1rem;
    padding: .7rem .55rem;
    background: var(--mc-bg);
    border-bottom: 1px solid var(--mc-border);
    box-shadow: 0 8px 14px -16px rgba(10, 25, 22, .75);
}

/* ==== Historical data import (ACID 52) ==== */
.historical-import-subtitle {
    margin: .2rem 0 0;
    color: var(--mc-muted);
    font-size: .9rem;
}

.historical-import-notice {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    margin-bottom: 1rem;
    padding: .9rem 1rem;
    color: var(--mc-info);
    background: var(--mc-info-soft);
    border: 1px solid color-mix(in srgb, var(--mc-info) 28%, transparent);
    border-radius: var(--mc-radius);
}

.historical-import-notice-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 1.7rem;
    inline-size: 1.7rem;
    block-size: 1.7rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: .86rem;
    font-weight: 700;
}

.historical-import-notice p {
    margin: .18rem 0 0;
    color: var(--mc-text);
    font-size: .87rem;
}

.historical-import-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.historical-import-steps li {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-inline-size: 0;
    padding: .75rem .85rem;
    color: var(--mc-muted);
    background: var(--mc-surface-muted);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-sm);
}

.historical-import-steps li > span {
    display: inline-grid;
    place-items: center;
    flex: 0 0 1.9rem;
    inline-size: 1.9rem;
    block-size: 1.9rem;
    color: var(--mc-muted);
    background: var(--mc-surface);
    border: 1px solid var(--mc-border-strong);
    border-radius: 50%;
    font-size: .82rem;
    font-weight: 700;
}

.historical-import-steps li.is-active {
    color: var(--mc-accent-text);
    background: var(--mc-accent-soft);
    border-color: var(--mc-accent-border);
}

.historical-import-steps li.is-active > span {
    color: #fff;
    background: var(--mc-accent);
    border-color: var(--mc-accent);
}

.historical-import-steps strong,
.historical-import-steps small {
    display: block;
}

.historical-import-steps strong {
    color: var(--mc-text);
    font-size: .86rem;
}

.historical-import-steps small {
    margin-top: .08rem;
    color: var(--mc-muted);
    font-size: .72rem;
}

.historical-import-card {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    box-shadow: var(--mc-shadow-soft);
}

.historical-import-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .9rem;
}

.historical-import-card-heading h2 {
    margin: 0;
    font-size: 1.05rem;
}

.historical-import-card-heading p {
    margin: .15rem 0 0;
    color: var(--mc-muted);
    font-size: .82rem;
}

.historical-import-batch-id {
    direction: ltr;
    max-inline-size: 22rem;
    padding: .3rem .55rem;
    overflow: hidden;
    color: var(--mc-muted);
    background: var(--mc-surface-muted);
    border: 1px solid var(--mc-border);
    border-radius: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.historical-import-upload-grid {
    display: grid;
    grid-template-columns: minmax(13rem, .6fr) minmax(20rem, 1.4fr);
    gap: .9rem;
    align-items: end;
}

.historical-import-field > span,
.historical-import-filters label > span {
    display: block;
    margin-bottom: .28rem;
    color: var(--mc-muted);
    font-size: .78rem;
    font-weight: 500;
}

.historical-import-file-picker {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    min-block-size: 4.55rem;
    padding: .7rem .8rem;
    cursor: pointer;
    background: var(--mc-surface-muted);
    border: 1px dashed var(--mc-border-strong);
    border-radius: var(--mc-radius-sm);
    transition: transform 140ms var(--mc-ease-out), border-color 140ms ease, background-color 140ms ease;
}

.historical-import-file-picker.has-file {
    background: var(--mc-accent-soft);
    border-color: var(--mc-accent-border);
}

.historical-import-file-picker:active {
    transform: scale(.985);
}

@media (hover: hover) and (pointer: fine) {
    .historical-import-file-picker:hover {
        background: var(--mc-accent-soft);
        border-color: var(--mc-accent);
    }
}

.historical-import-file-picker input[type="file"] {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    opacity: 0;
}

.historical-import-file-icon {
    flex: 0 0 2.35rem;
    inline-size: 2.35rem;
    block-size: 2.35rem;
    background: var(--mc-accent);
    border-radius: 8px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h14v18H5V3Zm7 3-4 4 1.4 1.4 1.6-1.6V16h2V9.8l1.6 1.6L16 10l-4-4Zm-4 12v1h8v-1H8Z'/%3E%3C/svg%3E") center / 1.45rem no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h14v18H5V3Zm7 3-4 4 1.4 1.4 1.6-1.6V16h2V9.8l1.6 1.6L16 10l-4-4Zm-4 12v1h8v-1H8Z'/%3E%3C/svg%3E") center / 1.45rem no-repeat;
}

.historical-import-file-copy {
    min-inline-size: 0;
    flex: 1;
}

.historical-import-file-copy strong,
.historical-import-file-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.historical-import-file-copy small {
    margin-top: .12rem;
    color: var(--mc-muted);
    font-size: .74rem;
}

.historical-import-file-action {
    color: var(--mc-accent-text);
    font-size: .78rem;
    font-weight: 700;
}

.historical-import-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .9rem;
}

.historical-import-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
}

.historical-import-summary-card {
    min-inline-size: 0;
    padding: .8rem;
    background: var(--mc-surface-muted);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-sm);
}

.historical-import-summary-card h3 {
    margin: 0 0 .55rem;
    font-size: .9rem;
}

.historical-import-summary-card dl {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .45rem;
    margin: 0;
}

.historical-import-summary-card dl > div {
    min-inline-size: 0;
}

.historical-import-summary-card dt {
    color: var(--mc-muted);
    font-size: .67rem;
    font-weight: 500;
}

.historical-import-summary-card dd {
    margin: .05rem 0 0;
    color: var(--mc-text);
    font-size: 1.05rem;
    font-weight: 700;
}

.historical-import-summary-card .is-success dd { color: var(--mc-success); }
.historical-import-summary-card .is-danger dd { color: var(--mc-danger); }

.historical-import-warning {
    margin-top: .8rem;
    padding: .65rem .8rem;
    color: var(--mc-warning);
    background: var(--mc-warning-soft);
    border-inline-start: 3px solid var(--mc-warning);
    border-radius: 6px;
    font-size: .82rem;
}

.historical-import-filters {
    display: flex;
    align-items: end;
    gap: .65rem;
    margin-top: 1rem;
    padding-top: .9rem;
    border-top: 1px solid var(--mc-border);
}

.historical-import-filters label {
    inline-size: min(13rem, 100%);
}

.historical-import-row-count {
    margin-inline-start: auto;
    padding-bottom: .45rem;
    color: var(--mc-muted);
    font-size: .78rem;
}

.historical-import-table-wrap {
    margin-top: .65rem;
    overflow-x: auto;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-sm);
}

.historical-import-table {
    min-inline-size: 760px;
    margin: 0;
}

.historical-import-table th {
    color: var(--mc-grid-header-text);
    background: var(--mc-grid-header);
    font-size: .74rem;
    white-space: nowrap;
}

.historical-import-table td {
    border-color: var(--mc-grid-line);
    font-size: .79rem;
    vertical-align: middle;
}

.historical-import-table code {
    direction: ltr;
    color: var(--mc-text);
}

.historical-import-status {
    display: inline-flex;
    align-items: center;
    min-block-size: 1.5rem;
    padding: .14rem .5rem;
    border-radius: 999px;
    font-size: .69rem;
    font-weight: 700;
    white-space: nowrap;
}

.historical-import-status.is-success { color: var(--mc-success); background: var(--mc-success-soft); }
.historical-import-status.is-danger { color: var(--mc-danger); background: var(--mc-danger-soft); }
.historical-import-status.is-warning { color: var(--mc-warning); background: var(--mc-warning-soft); }
.historical-import-status.is-neutral { color: var(--mc-muted); background: var(--mc-surface-muted); }

.historical-import-error {
    min-inline-size: 18rem;
    max-inline-size: 34rem;
    color: var(--mc-muted);
    white-space: normal;
}

.historical-import-empty {
    padding: 2rem !important;
    color: var(--mc-muted);
    text-align: center;
}

.historical-import-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    margin-top: .75rem;
    color: var(--mc-muted);
    font-size: .78rem;
}

.historical-import-confirm p {
    margin: 0;
    color: var(--mc-text);
}

.historical-import-confirm-counts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem;
    margin-top: .8rem;
}

.historical-import-confirm-counts span {
    padding: .7rem;
    background: var(--mc-surface-muted);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-sm);
}

@media (max-width: 1100px) {
    .historical-import-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .historical-import-steps,
    .historical-import-upload-grid,
    .historical-import-summary-grid { grid-template-columns: 1fr; }

    .historical-import-card-heading,
    .historical-import-filters { align-items: stretch; flex-direction: column; }

    .historical-import-row-count { margin-inline-start: 0; padding-bottom: 0; }
    .historical-import-filters label { inline-size: 100%; }
    .historical-import-commit { inline-size: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .historical-import-file-picker { transition: border-color 120ms ease, background-color 120ms ease; }
    .historical-import-file-picker:active { transform: none; }
}

.page-header h1 {
    margin: 0;
    font-size: 1.42rem;
    font-weight: 700;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    align-items: center;
    justify-content: flex-end;
}

.page-edit-actions {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-inline-size: 13rem;
    justify-content: flex-end;
}

.page-unsaved-indicator {
    min-inline-size: 7.75rem;
    color: var(--mc-warning);
    font-size: .78rem;
    font-weight: 650;
    text-align: end;
}

.page-unsaved-indicator.is-clean {
    visibility: hidden;
}

.app-user {
    color: var(--mc-text);
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: 999px;
    padding: .35rem .8rem;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    font-size: .9rem;
    box-shadow: var(--mc-shadow-soft);
}

/* ---- Forms ---- */
.form-label,
label span {
    color: var(--mc-muted);
    display: block;
    margin-bottom: .35rem;
    font-weight: 500;
    font-size: .9rem;
}

.form-control,
.form-select,
.e-input-group,
.e-control-wrapper.e-input-group {
    border-color: var(--mc-border-strong);
    border-radius: var(--mc-radius-sm);
}

.form-control,
.form-select {
    display: block;
    width: 100%;
    color: var(--mc-text);
    min-height: 2.45rem;
    padding: .45rem .7rem;
    font-size: .95rem;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border-strong);
}

.form-control:focus,
.form-select:focus,
.e-input-group.e-input-focus,
.e-control-wrapper.e-input-focus {
    border-color: var(--mc-accent);
    box-shadow: var(--mc-focus-ring);
}

/* ---- Syncfusion buttons ---- */
.e-btn,
.e-css.e-btn {
    border-radius: var(--mc-radius-sm);
    border-color: var(--mc-border-strong);
    background: var(--mc-surface);
    color: var(--mc-text);
    font-weight: 500;
    font-size: .93rem;
    line-height: 1.3;
    min-height: 2.5rem;
    padding-inline: 1rem;
    box-shadow: none;
}

.e-btn:hover,
.e-css.e-btn:hover {
    border-color: var(--mc-accent);
    color: var(--mc-accent-text);
    background: var(--mc-accent-soft);
}

.e-btn.e-primary,
.e-css.e-btn.e-primary {
    background: var(--mc-accent);
    border-color: var(--mc-accent);
    color: #fff;
}

.e-btn.e-primary:hover,
.e-css.e-btn.e-primary:hover {
    background: var(--mc-accent-strong);
    border-color: var(--mc-accent-text);
    color: #fff;
}

.e-btn.e-danger,
.e-css.e-btn.e-danger {
    background: var(--mc-danger-soft);
    border-color: var(--mc-danger-border);
    color: var(--mc-danger);
}

.e-btn.e-danger:hover,
.e-css.e-btn.e-danger:hover {
    background: var(--mc-danger);
    border-color: var(--mc-danger);
    color: #fff;
}

.e-btn.e-success,
.e-css.e-btn.e-success {
    background: var(--mc-success);
    border-color: var(--mc-success);
    color: #fff;
}

.e-btn.e-success:hover,
.e-css.e-btn.e-success:hover {
    background: var(--mc-success-strong);
    border-color: var(--mc-success-strong);
    color: #fff;
}

.e-btn.e-primary:focus,
.e-css.e-btn.e-primary:focus,
.e-btn.e-success:focus,
.e-css.e-btn.e-success:focus,
.e-btn.e-danger:focus,
.e-css.e-btn.e-danger:focus {
    outline: 2px solid var(--mc-accent-border);
    outline-offset: 1px;
    box-shadow: none;
}

/* Press feedback. Syncfusion ships no :active state, so every button in the
   app felt inert on click. A subtle scale confirms the press instantly. */
.e-btn,
.e-css.e-btn {
    transition: transform 140ms var(--mc-ease-out),
                background-color 140ms ease,
                border-color 140ms ease,
                color 140ms ease;
}

.e-btn:not(:disabled):not(.e-disabled):active,
.e-css.e-btn:not(:disabled):not(.e-disabled):active {
    transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
    .e-btn:not(:disabled):not(.e-disabled):active,
    .e-css.e-btn:not(:disabled):not(.e-disabled):active {
        transform: none;
    }
}

.e-btn:disabled,
.e-css.e-btn:disabled,
.e-btn.e-primary:disabled,
.e-css.e-btn.e-primary:disabled,
.e-btn.e-success:disabled,
.e-css.e-btn.e-success:disabled {
    background: var(--mc-surface-muted);
    border-color: var(--mc-border);
    color: var(--mc-muted);
    cursor: not-allowed;
}

.e-btn.e-small,
.e-css.e-btn.e-small {
    min-height: 2.05rem;
    padding: .25rem .65rem;
    font-size: .85rem;
}

/* ---- Syncfusion grid ---- */
.e-grid {
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    overflow: visible;
    position: relative;
    background: var(--mc-surface);
    box-shadow: var(--mc-shadow-soft);
}

.e-grid .e-gridheader,
.e-grid .e-headercontent {
    background: var(--mc-grid-header);
    border-color: var(--mc-border-strong);
}

.e-grid .e-headercell {
    background: var(--mc-grid-header);
    color: var(--mc-grid-header-text);
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    border-color: var(--mc-grid-line);
}

.e-grid .e-headercell .e-headertext,
.e-grid .e-headercell .e-sortfilterdiv {
    color: inherit;
}

.e-grid .e-rowcell {
    color: var(--mc-text);
    border-color: var(--mc-grid-line);
    font-size: .93rem;
    line-height: 1.5;
    padding: .6rem .8rem;
    min-height: 2.6rem;
}

.e-grid .e-altrow {
    background: var(--mc-surface-muted);
}

.e-grid .e-row:hover .e-rowcell,
.e-grid .e-altrow:hover .e-rowcell {
    background: var(--mc-accent-soft);
}

.e-grid .e-toolbar {
    background: var(--mc-surface);
    border-color: var(--mc-border);
    border-start-start-radius: var(--mc-radius);
    border-start-end-radius: var(--mc-radius);
    padding: .65rem .75rem;
}

.e-grid .e-toolbar .e-toolbar-items {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
    min-height: 2.45rem;
}

.e-grid .e-toolbar .e-toolbar-left,
.e-grid .e-toolbar .e-toolbar-center,
.e-grid .e-toolbar .e-toolbar-right {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.e-grid .e-toolbar .e-toolbar-right {
    margin-inline-start: auto;
}

.e-grid .e-toolbar .e-toolbar-left {
    margin-inline-end: auto;
}

.page[dir="rtl"] .e-grid .e-toolbar .e-toolbar-items {
    justify-content: flex-end;
}

.page[dir="rtl"] .e-grid .e-toolbar .e-toolbar-left {
    margin-inline-start: auto;
    margin-inline-end: 0;
}

.page[dir="rtl"] .e-grid .e-toolbar .e-toolbar-right {
    margin-inline-start: 0;
    margin-inline-end: auto;
}

.page[dir="rtl"] .e-grid .e-toolbar .e-toolbar-items,
.page[dir="rtl"] .e-grid .e-toolbar .e-toolbar-left,
.page[dir="rtl"] .e-grid .e-toolbar .e-toolbar-center,
.page[dir="rtl"] .e-grid .e-toolbar .e-toolbar-right {
    direction: rtl;
}

.e-grid .e-toolbar .e-search,
.e-grid .e-toolbar .e-search-wrapper,
.e-grid .e-toolbar .e-toolbar-item.e-search-wrapper,
.e-grid .e-toolbar .e-input-group.e-search,
.e-grid .e-toolbar .e-toolbar-item.e-search,
.e-grid .e-toolbar .e-control-wrapper.e-search {
    display: flex;
    align-items: center;
    width: min(360px, calc(100vw - 4rem));
    max-width: 100%;
    min-height: 2.35rem;
    flex: 0 1 360px;
}

.page[dir="rtl"] .e-grid .e-toolbar .e-search,
.page[dir="rtl"] .e-grid .e-toolbar .e-search-wrapper,
.page[dir="rtl"] .e-grid .e-toolbar .e-toolbar-item.e-search-wrapper,
.page[dir="rtl"] .e-grid .e-toolbar .e-input-group.e-search,
.page[dir="rtl"] .e-grid .e-toolbar .e-toolbar-item.e-search,
.page[dir="rtl"] .e-grid .e-toolbar .e-control-wrapper.e-search {
    direction: rtl;
}

.e-grid .e-toolbar .e-input-group.e-search,
.e-grid .e-toolbar .e-search-wrapper .e-input-group,
.e-grid .e-toolbar .e-search .e-input-group,
.e-grid .e-toolbar .e-control-wrapper.e-search {
    border-color: var(--mc-border-strong);
    border-radius: var(--mc-radius-sm);
    background: var(--mc-surface);
}

.e-grid .e-toolbar .e-search input,
.e-grid .e-toolbar .e-search-wrapper input {
    color: var(--mc-text);
    font: inherit;
    font-size: .9rem;
    text-align: start;
}

.page[dir="rtl"] .e-grid .e-toolbar .e-search input,
.page[dir="rtl"] .e-grid .e-toolbar .e-search-wrapper input {
    direction: rtl;
    text-align: right;
}

.e-grid .e-toolbar .e-search input::placeholder,
.e-grid .e-toolbar .e-search-wrapper input::placeholder {
    color: #7d928e;
}

.applicant-grid.e-grid .e-gridheader,
.applicant-grid.e-grid .e-headercontent {
    overflow: visible !important;
    position: relative;
}

.applicant-grid.e-grid .e-gridheader,
.applicant-grid.e-grid .e-headercontent {
    z-index: 25;
}

.applicant-search-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin-bottom: .75rem;
}

.applicant-list-search {
    position: relative;
    width: min(360px, calc(100vw - 4rem));
    max-width: 100%;
}

.applicant-list-search .applicant-search-input.e-control-wrapper.e-input-group {
    width: 100%;
    min-height: 2.35rem;
    padding-inline-end: 2.55rem;
    border-color: var(--mc-border-strong);
    border-radius: var(--mc-radius-sm);
    background: var(--mc-surface);
}

.applicant-list-search .applicant-search-input.e-input-focus {
    border-color: var(--mc-accent);
    box-shadow: var(--mc-focus-ring);
}

.applicant-list-search .applicant-search-input input {
    color: var(--mc-text);
    font: inherit;
    font-size: .9rem;
    text-align: start;
}

.applicant-search-row[dir="rtl"] .applicant-search-input input {
    direction: rtl;
    text-align: right;
}

.applicant-list-search .applicant-search-input input::placeholder {
    color: #7d928e;
    opacity: 1;
}

.applicant-list-search > .e-search-icon {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    z-index: 2;
    display: grid;
    width: 2.55rem;
    place-items: center;
    color: var(--mc-muted);
    border-inline-start: 1px solid var(--mc-border);
    pointer-events: none;
}

.e-grid .e-gridcontent,
.e-grid .e-content,
.e-grid .e-movablecontent,
.e-grid .e-detailrowcollapse,
.e-grid .e-detailrowexpand {
    position: relative;
    z-index: 1;
}

.e-grid .e-filtermenudiv,
.e-grid .e-filtericon {
    color: var(--mc-muted);
}

.e-grid .e-filtermenudiv:hover,
.e-grid .e-filtered {
    color: var(--mc-accent);
}

.e-grid .e-pager {
    background: var(--mc-surface);
    border-color: var(--mc-border);
    border-end-start-radius: var(--mc-radius);
    border-end-end-radius: var(--mc-radius);
    color: var(--mc-muted);
    font-size: .86rem;
    padding: .55rem .7rem;
}

.e-grid .e-pager .e-pagercontainer {
    background: transparent;
    border: 0;
    display: inline-flex;
    gap: .25rem;
}

.e-grid .e-pager .e-numericitem,
.e-grid .e-pager .e-prevpage,
.e-grid .e-pager .e-nextpage,
.e-grid .e-pager .e-firstpage,
.e-grid .e-pager .e-lastpage {
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-sm);
    min-width: 2rem;
    min-height: 2rem;
    color: var(--mc-muted);
    background: var(--mc-surface);
}

.e-grid .e-pager .e-numericitem:hover,
.e-grid .e-pager .e-prevpage:hover,
.e-grid .e-pager .e-nextpage:hover,
.e-grid .e-pager .e-firstpage:hover,
.e-grid .e-pager .e-lastpage:hover {
    background: var(--mc-accent-soft);
    border-color: var(--mc-accent-border);
    color: var(--mc-accent-text);
}

.e-grid .e-pager .e-currentitem,
.e-grid .e-pager .e-currentitem:hover {
    background: var(--mc-accent);
    border-color: var(--mc-accent);
    color: #fff;
    font-weight: 500;
}

.e-grid .e-pager .e-parentmsgbar,
.e-grid .e-pager .e-pagesizes,
.e-grid .e-pager .e-pagenomsg {
    color: var(--mc-muted);
}

.e-grid .e-pager .e-icons {
    color: inherit;
}

.e-grid .e-pager .e-disable,
.e-grid .e-pager .e-disabled {
    opacity: .48;
}

.e-grid .e-content,
.e-grid .e-movablecontent {
    scrollbar-color: #b8c8c4 transparent;
    scrollbar-width: thin;
}

.e-grid .e-content::-webkit-scrollbar,
.e-grid .e-movablecontent::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.e-grid .e-content::-webkit-scrollbar-thumb,
.e-grid .e-movablecontent::-webkit-scrollbar-thumb {
    background: #b8c8c4;
    border-radius: 999px;
}

.e-grid .e-content::-webkit-scrollbar-track,
.e-grid .e-movablecontent::-webkit-scrollbar-track {
    background: transparent;
}

/* ---- Syncfusion filter popup ---- */
.e-filter-popup {
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    box-shadow: var(--mc-shadow);
    font-family: var(--mc-font);
    color: var(--mc-text);
    z-index: 20000 !important;
}

.e-filter-popup.e-popup,
.e-popup.e-popup-open,
.e-popup-open,
.e-popup-open.e-filter-popup,
.e-grid .e-filter-popup,
.e-grid .e-gridpopup,
.e-gridpopup,
.e-popup.e-filter-popup,
.e-dialog.e-filter-popup,
.e-xlflmenu,
.e-flmenu,
.e-checkboxfilter,
.e-excelfilter,
.e-grid .e-xlflmenu,
.e-grid .e-flmenu,
.e-grid .e-checkboxfilter,
.e-grid .e-excelfilter {
    z-index: 20000 !important;
}

.page[dir="rtl"] .e-filter-popup {
    direction: rtl;
    text-align: right;
}

.e-filter-popup .e-dlg-content {
    padding: .8rem;
}

.e-filter-popup .e-input-group,
.e-filter-popup .e-control-wrapper.e-input-group {
    border-color: var(--mc-border-strong);
    border-radius: var(--mc-radius-sm);
}

.e-filter-popup .e-input-group.e-input-focus,
.e-filter-popup .e-control-wrapper.e-input-group.e-input-focus {
    border-color: var(--mc-accent);
    box-shadow: var(--mc-focus-ring);
}

.e-filter-popup .e-checkbox-wrapper .e-frame.e-check,
.e-filter-popup .e-css.e-checkbox-wrapper .e-frame.e-check {
    background-color: var(--mc-accent);
    border-color: var(--mc-accent);
}

.e-filter-popup .e-footer-content {
    border-top: 1px solid var(--mc-border);
    padding: .65rem .8rem;
}

.e-filter-popup .e-footer-content .e-btn {
    border-radius: var(--mc-radius-sm);
    font-weight: 500;
}

.e-filter-popup .e-footer-content .e-primary,
.e-filter-popup .e-footer-content .e-btn.e-primary {
    background: var(--mc-accent);
    border-color: var(--mc-accent);
}

/* ---- Syncfusion dialog ---- */
.e-dialog {
    border-radius: var(--mc-radius);
    box-shadow: 0 20px 60px rgba(10, 25, 22, .22);
}

.e-dialog .e-dlg-header-content {
    border-bottom: 1px solid var(--mc-border);
    background: var(--mc-surface-muted);
}

.e-dialog .e-dlg-header {
    color: var(--mc-text);
    font-weight: 700;
}

.e-dialog .e-dlg-content {
    padding: 1.1rem 1.25rem;
}

/* ---- Plain tables ---- */
.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--mc-text);
    border-color: var(--mc-border);
}

.table-sm th,
.table-sm td {
    padding: .5rem .65rem;
}

.table thead th {
    background: var(--mc-grid-header);
    color: var(--mc-grid-header-text);
    border-bottom: 1px solid var(--mc-border-strong);
    font-size: .84rem;
    font-weight: 700;
    text-transform: none;
}

.table tbody td {
    vertical-align: middle;
    border-color: var(--mc-grid-line);
    font-size: .93rem;
}

.table tbody tr:hover {
    background: var(--mc-accent-soft);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--mc-muted);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ---- App boot ---- */
.app-boot {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* ---- Login ---- */
.login-page {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
    background: var(--mc-bg);
}

/* Brand panel fills the inline-end column (works in both directions). */
.login-page::before {
    content: "";
    grid-column: 2;
    grid-row: 1;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 64px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 64px),
        radial-gradient(1100px 520px at 80% -10%, rgba(15, 118, 110, .38), transparent 62%),
        var(--mc-brand-panel);
}

.login-page::after {
    content: "MyCollege\A\646\638\627\645\20\634\624\648\646\20\627\644\637\644\628\629";
    white-space: pre-line;
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: start;
    padding: 0 3rem 3rem;
    color: rgba(255, 255, 255, .92);
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    font-weight: 700;
    line-height: 1.5;
    pointer-events: none;
}

.login-card {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    position: relative;
    z-index: 1;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: 12px;
    padding: 2.15rem;
    width: min(400px, calc(100vw - 3rem));
    box-shadow: 0 22px 60px rgba(10, 25, 22, .12);
    text-align: start;
    transition: opacity 250ms cubic-bezier(0.23, 1, 0.32, 1),
                transform 250ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* Entrance: login is a rare, once-per-session event — a subtle arrival is worth it. */
@starting-style {
    .login-card {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* Mode switch (sign-in / forgot / reset): the wrapper is keyed by mode, so each
   mode change remounts it and re-triggers this enter transition. */
.login-form-enter {
    transition: opacity 180ms cubic-bezier(0.23, 1, 0.32, 1),
                transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

@starting-style {
    .login-form-enter {
        opacity: 0;
        transform: translateY(4px);
    }
}

.login-card * {
    min-width: 0;
}

.login-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 10px;
    background: var(--mc-accent);
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
    box-shadow: 0 10px 22px rgba(15, 118, 110, .26);
}

.login-card h1 {
    margin-bottom: .2rem;
    font-size: 1.5rem;
    color: var(--mc-text);
    font-weight: 700;
}

.login-subtitle {
    color: var(--mc-muted);
    margin-bottom: 1.5rem;
    font-size: .95rem;
}

.login-card .form-label {
    display: block;
    text-align: start;
    color: var(--mc-muted);
    font-weight: 500;
}

.login-card .mb-3 {
    margin-bottom: 1.05rem;
}

.login-card .e-input-group,
.login-card .e-control-wrapper.e-input-group {
    width: 100%;
    border-color: var(--mc-border-strong);
    border-radius: var(--mc-radius-sm);
    background: var(--mc-surface);
}

.login-card .e-input-group.e-input-focus,
.login-card .e-control-wrapper.e-input-group.e-input-focus {
    border-color: var(--mc-accent);
    box-shadow: var(--mc-focus-ring);
}

.login-card .e-btn.w-100 {
    display: block;
    width: 100%;
    min-height: 2.75rem;
}

.login-card .form-control {
    border-color: var(--mc-border-strong);
}

.login-card .form-control:focus {
    border-color: var(--mc-accent);
    box-shadow: var(--mc-focus-ring);
}

.login-card .e-btn.e-primary,
.login-card .e-css.e-btn.e-primary {
    background: var(--mc-accent);
    border-color: var(--mc-accent);
    color: #fff;
    border-radius: var(--mc-radius-sm);
    font-weight: 500;
    transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1),
                background-color 150ms ease,
                opacity 150ms ease;
}

.login-card .e-btn.e-primary:active,
.login-card .e-css.e-btn.e-primary:active {
    transform: scale(0.98);
}

.login-card .e-btn.e-primary:hover,
.login-card .e-css.e-btn.e-primary:hover,
.login-card .e-btn.e-primary:focus,
.login-card .e-css.e-btn.e-primary:focus {
    background: var(--mc-accent-strong);
    border-color: var(--mc-accent-text);
    color: #fff;
    box-shadow: var(--mc-focus-ring);
}

/* Busy while submitting: stay accent and quiet down — the gray "disabled" look
   reads as broken mid-submit, not as working. */
.login-card .e-btn.e-primary:disabled,
.login-card .e-css.e-btn.e-primary:disabled {
    background: var(--mc-accent);
    border-color: var(--mc-accent);
    color: #fff;
    opacity: .7;
}

.login-language {
    padding-inline: 0;
    margin-top: 1rem;
    color: var(--mc-accent-text);
    transition: color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .login-language:hover {
        color: var(--mc-accent);
    }
}

.login-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .75rem;
    align-items: center;
    justify-content: space-between;
    margin-top: .9rem;
}

.login-card-actions .btn-link {
    padding-inline: 0;
    color: var(--mc-accent-text);
    transition: color 150ms ease;
}

.login-status {
    margin-top: .9rem;
    border-color: var(--mc-accent-border);
    background: var(--mc-accent-soft);
    color: var(--mc-accent-text);
}

/* Alerts arrive, they don't teleport. */
.login-card .alert {
    transition: opacity 200ms cubic-bezier(0.23, 1, 0.32, 1),
                transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

@starting-style {
    .login-card .alert {
        opacity: 0;
        transform: translateY(-4px);
    }
}

/* Reduced motion: keep the opacity fades, drop the movement and press scale. */
@media (prefers-reduced-motion: reduce) {
    .login-card,
    .login-form-enter,
    .login-card .alert {
        transition: opacity 200ms ease;
    }

    .login-card .e-btn.e-primary:active,
    .login-card .e-css.e-btn.e-primary:active {
        transform: none;
    }
}

/* ---- Menu tree (always rendered inside the dark sidebar) ---- */
.app-nav {
    gap: .18rem;
    padding: .8rem .75rem 1rem;
}

.menu-node {
    padding: 0;
    min-width: 0;
}

.menu-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* One monochrome icon treatment: the glyph follows the row's text color. */
.menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h7v7H4V4Zm9 0h7v7h-7V4ZM4 13h7v7H4v-7Zm9 0h7v7h-7v-7Z'/%3E%3C/svg%3E");
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 auto;
    position: relative;
    background: transparent;
    border: 0;
    opacity: .8;
}

.menu-symbol::before {
    content: "";
    position: absolute;
    inset: .05rem;
    background: currentColor;
    -webkit-mask: var(--menu-icon) center / contain no-repeat;
    mask: var(--menu-icon) center / contain no-repeat;
}

.menu-branch {
    background: transparent;
    border: 1px solid transparent;
    width: 100%;
    text-align: start;
    color: var(--mc-sidebar-text);
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 2.5rem;
    border-radius: var(--mc-radius-sm);
    padding: .45rem .65rem;
    font-weight: 500;
    font-size: .93rem;
    line-height: 1.35;
}

.menu-branch:hover,
.menu-branch.is-expanded {
    background: var(--mc-menu-hover-bg);
    color: var(--mc-menu-hover-text);
}

.menu-branch:hover .menu-symbol,
.menu-branch.is-expanded .menu-symbol {
    opacity: 1;
}

.menu-depth-0 {
    margin-top: .3rem;
}

.menu-depth-0 > .menu-branch {
    min-height: 2.6rem;
    padding: .5rem .65rem;
    font-size: .93rem;
    font-weight: 500;
}

.menu-depth-1 > .menu-branch {
    font-size: .9rem;
    font-weight: 400;
}

.menu-depth-2 > .menu-branch,
.menu-depth-3 > .menu-branch {
    font-size: .88rem;
    font-weight: 400;
    color: var(--mc-sidebar-muted);
}

.menu-chevron {
    color: var(--mc-sidebar-muted);
    font-size: .85rem;
    margin-inline-start: auto;
    flex: 0 0 auto;
}

.menu-leaf {
    color: var(--mc-sidebar-text);
    border-radius: var(--mc-radius-sm);
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    line-height: 1.35;
    padding: .4rem .65rem;
    font-weight: 400;
    font-size: .9rem;
    border: 1px solid transparent;
}

.menu-leaf:hover {
    background: var(--mc-menu-hover-bg);
    color: var(--mc-menu-hover-text);
    text-decoration: none;
}

.menu-leaf.active {
    background: var(--mc-menu-active-bg);
    color: var(--mc-menu-active-text);
    border-color: var(--mc-accent-border);
    font-weight: 500;
}

.menu-leaf.active .menu-symbol,
.menu-leaf:hover .menu-symbol {
    opacity: 1;
}

.menu-leaf-home {
    margin-bottom: .3rem;
}

.menu-leaf-disabled {
    color: var(--mc-menu-disabled);
    cursor: default;
    opacity: 1;
}

.menu-leaf-disabled:hover {
    background: transparent;
    color: var(--mc-menu-disabled);
}

.menu-children {
    border-inline-start: 1px solid var(--mc-sidebar-border);
    margin: .1rem 0 .32rem;
    padding-inline-start: .5rem;
}

.menu-children-depth-0 {
    margin-inline-start: .75rem;
}

.menu-children-depth-1,
.menu-children-depth-2,
.menu-children-depth-3 {
    margin-inline-start: .45rem;
}

.menu-depth-1 .menu-symbol,
.menu-depth-2 .menu-symbol,
.menu-depth-3 .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3h8l4 4v14H6V3Zm7 1.8V8h3.2L13 4.8ZM8 12h8v2H8v-2Zm0 4h8v2H8v-2Z'/%3E%3C/svg%3E");
    width: 1.05rem;
    height: 1.05rem;
}

/* Per-item glyphs (shape only — color always follows the row) */
.menu-home .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11 12 3l9 8v10h-6v-6H9v6H3V11Z'/%3E%3C/svg%3E");
}

.menu-acid-1 > .menu-branch .menu-symbol,
.menu-acid-1 .menu-leaf .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-8 9a8 8 0 0 1 16 0H4Zm15-12h2v2h2v2h-2v2h-2v-2h-2v-2h2V9Z'/%3E%3C/svg%3E");
}

.menu-acid-2 > .menu-branch .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm8 1a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM2 21a6 6 0 0 1 12 0H2Zm11.5 0a7.5 7.5 0 0 0-2.1-5.2A5.5 5.5 0 0 1 22 18.5V21h-8.5Z'/%3E%3C/svg%3E");
}

.menu-acid-4 > .menu-branch .menu-symbol,
.menu-acid-99 > .menu-branch .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h18v3H3V9Zm2 4h3v7H5v-7Zm5 0h4v7h-4v-7Zm6 0h3v7h-3v-7ZM2 21h20v2H2v-2ZM12 2l9 5H3l9-5Z'/%3E%3C/svg%3E");
}

.menu-acid-5 > .menu-branch .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h10v3h3v15H4V6h3V3Zm2 3h6V5H9v1Zm-2 5h10V9H7v2Zm0 4h10v-2H7v2Zm0 4h7v-2H7v2Z'/%3E%3C/svg%3E");
}

.menu-acid-7 > .menu-branch .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m19.4 13.5.1-1.5-.1-1.5 2-1.5-2-3.5-2.4 1a7.8 7.8 0 0 0-2.6-1.5L14 2h-4l-.4 2.5A7.8 7.8 0 0 0 7 6L4.6 5 2.6 8.5l2 1.5-.1 1.5.1 1.5-2 1.5 2 3.5 2.4-1a7.8 7.8 0 0 0 2.6 1.5L10 22h4l.4-2.5A7.8 7.8 0 0 0 17 18l2.4 1 2-3.5-2-1.5ZM12 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z'/%3E%3C/svg%3E");
}

.menu-acid-19 > .menu-branch .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4.5A2.5 2.5 0 0 1 6.5 2H20v18H7a3 3 0 0 0-3 2V4.5ZM7 5v11h10V5H7Z'/%3E%3C/svg%3E");
}

.menu-acid-132 > .menu-branch .menu-symbol,
.menu-acid-158 > .menu-branch .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19h14v2H5v-2Zm1-8h3v6H6v-6Zm5-5h3v11h-3V6Zm5 3h3v8h-3V9Z'/%3E%3C/svg%3E");
}

.menu-acid-6 > .menu-branch .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 4h6l1 3h4v14H4V7h4l1-3Zm1.5 3h3l-.3-1h-2.4l-.3 1ZM7 11h10v2H7v-2Zm0 4h7v2H7v-2Z'/%3E%3C/svg%3E");
}

.menu-acid-81 > .menu-branch .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Zm-8 9a8 8 0 0 1 16 0H4Z'/%3E%3C/svg%3E");
}

.menu-acid-106 > .menu-branch .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h7l2 2h9v13H3V5Zm3 5v2h12v-2H6Zm0 4v2h8v-2H6Z'/%3E%3C/svg%3E");
}

.menu-icon-intake .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16l-6 7v5l-4 2v-7L4 5Z'/%3E%3C/svg%3E");
}

.menu-icon-admission .menu-symbol,
.menu-icon-applications .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3h9l4 4v14H6V3Zm8 1.8V8h3.2L14 4.8ZM8 12h8v2H8v-2Zm0 4h6v2H8v-2Z'/%3E%3C/svg%3E");
}

.menu-icon-students .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm8 1a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM2 21a6 6 0 0 1 12 0H2Zm11.5 0a7.5 7.5 0 0 0-2.1-5.2A5.5 5.5 0 0 1 22 18.5V21h-8.5Z'/%3E%3C/svg%3E");
}

.menu-icon-student-card .menu-symbol,
.menu-icon-cards .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18v14H3V5Zm2 3v2h14V8H5Zm2 5h5v1.5H7V13Zm0 3h8v1.5H7V16Zm10-3.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z'/%3E%3C/svg%3E");
}

.menu-icon-academics .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 8l10 5 8-4v6h2V8L12 3Zm-6 9v4c2.2 2 4.2 3 6 3s3.8-1 6-3v-4l-6 3-6-3Z'/%3E%3C/svg%3E");
}

.menu-icon-study-plans .menu-symbol,
.menu-icon-plans .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4.5A2.5 2.5 0 0 1 6.5 2H20v18H7a3 3 0 0 0-3 2V4.5ZM7 5v11h10V5H7Zm2 3h6v2H9V8Zm0 4h5v2H9v-2Z'/%3E%3C/svg%3E");
}

.menu-icon-courses .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 4h14v16H5V4Zm3 3v2h8V7H8Zm0 4v2h8v-2H8Zm0 4v2h5v-2H8Z'/%3E%3C/svg%3E");
}

.menu-icon-programs .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5h6v6H5V5Zm8 0h6v6h-6V5ZM5 13h6v6H5v-6Zm8 0h6v6h-6v-6Z'/%3E%3C/svg%3E");
}

.menu-icon-grades .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 16.3l-5.6 2.9 1.1-6.2L3 8.6l6.2-.9L12 2Z'/%3E%3C/svg%3E");
}

.menu-icon-planning .menu-symbol,
.menu-icon-terms .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h2v3h6V2h2v3h3v16H4V5h3V2Zm-1 8v9h12v-9H6Zm2 2h3v3H8v-3Z'/%3E%3C/svg%3E");
}

.menu-icon-schedule .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h2v3h6V2h2v3h3v16H4V5h3V2Zm-1 8v9h12v-9H6Zm6 1a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm.7 2h-1.4v3.1l2.5 1.5.7-1.2-1.8-1.1V13Z'/%3E%3C/svg%3E");
}

.menu-icon-finance .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h18v3H3V9Zm2 4h3v7H5v-7Zm5 0h4v7h-4v-7Zm6 0h3v7h-3v-7ZM2 21h20v2H2v-2ZM12 2l9 5H3l9-5Z'/%3E%3C/svg%3E");
}

.menu-icon-fee-schema .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h12v20l-3-2-3 2-3-2-3 2V2Zm3 5v2h6V7H9Zm0 4v2h6v-2H9Zm0 4v2h4v-2H9Z'/%3E%3C/svg%3E");
}

.menu-icon-dashboard .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h8v10H3V3Zm10 0h8v6h-8V3ZM3 15h8v6H3v-6Zm10-4h8v10h-8V11Z'/%3E%3C/svg%3E");
}

.menu-icon-settings .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m19.4 13.5.1-1.5-.1-1.5 2-1.5-2-3.5-2.4 1a7.8 7.8 0 0 0-2.6-1.5L14 2h-4l-.4 2.5A7.8 7.8 0 0 0 7 6L4.6 5 2.6 8.5l2 1.5-.1 1.5.1 1.5-2 1.5 2 3.5 2.4-1a7.8 7.8 0 0 0 2.6 1.5L10 22h4l.4-2.5A7.8 7.8 0 0 0 17 18l2.4 1 2-3.5-2-1.5ZM12 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z'/%3E%3C/svg%3E");
}

.menu-icon-language .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h9v3h-2V6H6v4h5v2H8.8a7.6 7.6 0 0 1-1 2.1l2.1 2.1-1.4 1.4-1.9-1.9A9.4 9.4 0 0 1 4 17v-2a7 7 0 0 0 1.2-.5L4 13.3 5.3 12l1.4 1.4c.4-.5.7-1 .9-1.4H4V4Zm10 5h6l3 11h-2.2l-.6-2h-6.4l-.6 2H11l3-11Zm.4 7h5.2L17 11.6 14.4 16Z'/%3E%3C/svg%3E");
}

.menu-icon-branch .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 21V4h10v4h6v13h-6v-5h-4v5H4Zm3-13h2V6H7v2Zm0 4h2v-2H7v2Zm0 4h2v-2H7v2Zm5-8h2V6h-2v2Zm4 4h2v-2h-2v2Zm0 4h2v-2h-2v2Z'/%3E%3C/svg%3E");
}

.menu-icon-nationality .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h2v18H5V3Zm4 1h10l-2 4 2 4H9V4Z'/%3E%3C/svg%3E");
}

.menu-icon-id-card .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18v14H3V5Zm3 4h5v5H6V9Zm1.2 7h8.6v1.5H7.2V16ZM14 9h5v2h-5V9Zm0 4h5v2h-5v-2Z'/%3E%3C/svg%3E");
}

.menu-icon-lookups .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h7a3 3 0 0 1 1 .2A3 3 0 0 1 13 3h7v16h-7.5a1.5 1.5 0 0 0-1.5 1.5h-2A1.5 1.5 0 0 0 7.5 19H4V3Zm7 2H6v12h3.5c.5 0 1 .1 1.5.4V5Zm2 12.4c.5-.3 1-.4 1.5-.4H18V5h-5v12.4Z'/%3E%3C/svg%3E");
}

.menu-icon-category .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h7v7H4V4Zm9 0h7v7h-7V4ZM4 13h7v7H4v-7Zm9 0h7v7h-7v-7Z'/%3E%3C/svg%3E");
}

.menu-icon-term-events .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h2v3h6V2h2v3h3v16H4V5h3V2Zm-1 8v9h12v-9H6Zm5 2h2v2h2v2h-2v2h-2v-2H9v-2h2v-2Z'/%3E%3C/svg%3E");
}

.menu-icon-admin .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 4 5v6c0 5 3.4 9.4 8 11 4.6-1.6 8-6 8-11V5l-8-3Zm0 4a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm-5 12a5 5 0 0 1 10 0 10.2 10.2 0 0 1-5 2 10.2 10.2 0 0 1-5-2Z'/%3E%3C/svg%3E");
}

.menu-icon-users .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm8 1a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM2 21a6 6 0 0 1 12 0H2Zm11.5 0a7.5 7.5 0 0 0-2.1-5.2A5.5 5.5 0 0 1 22 18.5V21h-8.5Z'/%3E%3C/svg%3E");
}

.menu-icon-permissions .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V8a5 5 0 0 1 10 0v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1Zm2 0h6V8a3 3 0 0 0-6 0v2Zm2 6.2 4.8-4.8 1.4 1.4-6.2 6.2-3.2-3.2 1.4-1.4 1.8 1.8Z'/%3E%3C/svg%3E");
}

.menu-icon-menu-builder .menu-symbol,
.menu-icon-menu .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v4H4V5Zm0 6h10v4H4v-4Zm0 6h16v2H4v-2Zm12-6h4v4h-4v-4Z'/%3E%3C/svg%3E");
}

.menu-icon-mail .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18v14H3V5Zm2.4 2 6.6 5 6.6-5H5.4ZM5 9.4V17h14V9.4l-7 5.3-7-5.3Z'/%3E%3C/svg%3E");
}

.menu-icon-placement-test .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 3h6l1 2h4v16H4V5h4l1-2Zm1.5 3h3l-.3-1h-2.4l-.3 1ZM8 11h8V9H8v2Zm0 4h4v-2H8v2Zm6.2 2.2 4.6-4.6-1.4-1.4-3.2 3.2-1.4-1.4-1.4 1.4 2.8 2.8Z'/%3E%3C/svg%3E");
}

.menu-icon-applicants .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-8 9a8 8 0 0 1 16 0H4Zm15-12h2v2h2v2h-2v2h-2v-2h-2v-2h2V9Z'/%3E%3C/svg%3E");
}

/* ---- Security admin ---- */
.security-toolbar {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin-bottom: 1rem;
    max-width: 760px;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    padding: .75rem;
    box-shadow: var(--mc-shadow-soft);
}

.security-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: .85rem;
}

.security-form-grid label span {
    display: block;
    margin-bottom: .25rem;
    font-weight: 500;
}

.security-checks {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    margin-top: 1rem;
    background: var(--mc-surface-muted);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    padding: .75rem;
}

.security-checks label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--mc-text);
    font-weight: 500;
}

.security-actions {
    display: flex;
    gap: .35rem;
    justify-content: flex-end;
}

.security-groups-table {
    max-width: 900px;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    overflow: hidden;
    box-shadow: var(--mc-shadow-soft);
}

.privilege-table {
    max-width: 980px;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    overflow: hidden;
    box-shadow: var(--mc-shadow-soft);
}

/* ---- Lookup hub ---- */
.lookup-hub {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    max-width: 1080px;
}

.lookup-hub-search {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    padding: .25rem .8rem;
    box-shadow: var(--mc-shadow-soft);
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

/* The input suppresses its own outline, so the wrapper carries the focus signal. */
.lookup-hub-search:focus-within {
    border-color: var(--mc-accent);
    box-shadow: var(--mc-focus-ring);
}

.lookup-hub-search-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    background-color: var(--mc-muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3a7 7 0 1 1 0 14 7 7 0 0 1 0-14Zm0 2a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm7.2 10.8 3.9 3.9-1.4 1.4-3.9-3.9 1.4-1.4Z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3a7 7 0 1 1 0 14 7 7 0 0 1 0-14Zm0 2a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm7.2 10.8 3.9 3.9-1.4 1.4-3.9-3.9 1.4-1.4Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.lookup-hub-search-input {
    flex: 1 1 auto;
    border: 0;
    background: transparent;
    color: inherit;
    padding: .55rem .6rem;
    font-size: .97rem;
    outline: none;
}

.lookup-hub-section h2 {
    font-size: .95rem;
    font-weight: 600;
    color: var(--mc-muted);
    margin-bottom: .6rem;
}

.lookup-hub-empty {
    color: var(--mc-muted);
}

.lookup-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: .6rem;
}

.lookup-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    text-align: start;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    background: var(--mc-surface);
    padding: .8rem .9rem;
    box-shadow: var(--mc-shadow-soft);
    transition: border-color 120ms ease, background 120ms ease, transform 140ms var(--mc-ease-out);
}

/* Touch taps fire :hover and leave the accent stuck until the next tap. */
@media (hover: hover) and (pointer: fine) {
    .lookup-tile:hover {
        border-color: var(--mc-accent-border);
        background: var(--mc-accent-soft);
    }
}

/* Press feedback: confirm the click without a navigation animation. */
.lookup-tile:active {
    transform: scale(0.98);
}

.lookup-tile:focus-visible {
    outline: 2px solid var(--mc-accent-border);
    outline-offset: 1px;
}

/* Most-used tiles are the user's own data — give them a hair more weight. */
.lookup-tile-favorite {
    border-inline-start: 2px solid var(--mc-accent);
}

.lookup-tile-title {
    font-weight: 600;
    font-size: .95rem;
}

.lookup-tile-meta {
    color: var(--mc-muted);
    font-size: .82rem;
}

.lookup-tile-count {
    position: absolute;
    top: .55rem;
    inset-inline-end: .6rem;
    min-width: 1.5rem;
    text-align: center;
    padding: .05rem .4rem;
    border-radius: 999px;
    background: var(--mc-accent-soft);
    border: 1px solid var(--mc-accent-border);
    color: var(--mc-accent-text);
    font-size: .78rem;
    font-weight: 600;
}

.lookup-manage-header {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.lookup-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-sm);
    background: var(--mc-surface);
    color: var(--mc-muted);
    padding: .4rem .7rem;
    font-size: .9rem;
    font-weight: 500;
    transition: background 120ms ease, color 120ms ease, transform 140ms var(--mc-ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .lookup-back:hover {
        background: var(--mc-accent-soft);
        color: var(--mc-accent-text);
    }
}

.lookup-back:active {
    transform: scale(0.97);
}

.lookup-back:focus-visible {
    outline: 2px solid var(--mc-accent-border);
    outline-offset: 1px;
}

/* Staggered entrance for the default hub view (most-used + grouped catalog).
   Deliberately NOT applied to search results, which re-render on every
   keystroke — animating those would feel slow, not delightful. */
.lookup-hub-section--enter .lookup-tile {
    opacity: 0;
    animation: lookup-tile-in 320ms var(--mc-ease-out) forwards;
}

.lookup-hub-section--enter .lookup-tile:nth-child(1) { animation-delay: 0ms; }
.lookup-hub-section--enter .lookup-tile:nth-child(2) { animation-delay: 40ms; }
.lookup-hub-section--enter .lookup-tile:nth-child(3) { animation-delay: 80ms; }
.lookup-hub-section--enter .lookup-tile:nth-child(4) { animation-delay: 120ms; }
.lookup-hub-section--enter .lookup-tile:nth-child(5) { animation-delay: 160ms; }
.lookup-hub-section--enter .lookup-tile:nth-child(n+6) { animation-delay: 200ms; }

@keyframes lookup-tile-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Reduced motion: keep the fade for continuity, drop movement and press-scale. */
@media (prefers-reduced-motion: reduce) {
    .lookup-hub-section--enter .lookup-tile {
        animation-name: lookup-tile-fade;
    }

    .lookup-tile:active,
    .lookup-back:active {
        transform: none;
    }
}

@keyframes lookup-tile-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lookup-toolbar,
.lookup-pager {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-bottom: 1rem;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    padding: .7rem;
    box-shadow: var(--mc-shadow-soft);
}

.lookup-toolbar .form-control {
    max-width: 320px;
}

.lookup-table {
    max-width: 1080px;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    overflow: hidden;
    box-shadow: var(--mc-shadow-soft);
}

.lookup-actions {
    display: flex;
    gap: .35rem;
    justify-content: flex-end;
}

.lookup-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    max-height: min(64vh, 620px);
    overflow-y: auto;
    padding-inline-end: .25rem;
}

.lookup-form label span {
    display: block;
    margin-bottom: .25rem;
    font-weight: 500;
}

.lookup-form-wide {
    grid-column: 1 / -1;
}

.lookup-form textarea {
    resize: vertical;
    min-height: 5.5rem;
}

.lookup-value-number {
    direction: ltr;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .lookup-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .lookup-form-wide {
        grid-column: auto;
    }
}

/* ---- Request-workflow dialogs (academic profile actions) ----
   A narrow, single-question form: note on top, then label-above-control.
   Deliberately NOT .lookup-form — that is a 2-column grid for wide lookup
   editors, which at these dialog widths drops the intro note into column 1
   and the field into column 2 instead of stacking them. */
.mc-request-form {
    display: flex;
    flex-direction: column;
    gap: .95rem;
}

.mc-request-note,
.mc-request-subject {
    margin: 0;
    padding: .65rem .8rem;
    border-radius: calc(var(--mc-radius) - 3px);
    font-size: .85rem;
    line-height: 1.65;
}

.mc-request-note {
    background: var(--mc-accent-soft);
    border: 1px solid var(--mc-accent-border);
    border-inline-start: 3px solid var(--mc-accent);
    color: var(--mc-accent-text);
}

/* The record the action targets (course label) — identifies, not informs. */
.mc-request-subject {
    background: var(--mc-surface-muted);
    border: 1px solid var(--mc-border);
    color: var(--mc-text);
    font-weight: 600;
}

.mc-request-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-width: 0;
}

.mc-request-field > span {
    font-size: .85rem;
    font-weight: 600;
    color: var(--mc-text);
}

.mc-request-field .mc-req {
    margin-inline-start: .15rem;
    color: var(--mc-danger);
    font-style: normal;
}

.mc-request-field textarea,
.mc-request-field .e-input-group,
.mc-request-field .e-ddl {
    width: 100%;
}

.mc-request-field textarea {
    resize: vertical;
    min-height: 5.75rem;
}

.mc-request-hint {
    font-size: .76rem;
    color: var(--mc-muted);
}

.mc-request-actions {
    display: flex;
    gap: .5rem;
    margin-top: 1.15rem;
    padding-top: .9rem;
    border-top: 1px solid var(--mc-border);
}

/* ---- Shared admin card surfaces ---- */
.menu-builder-toolbar,
.system-settings-panel {
    border-radius: var(--mc-radius);
    box-shadow: var(--mc-shadow-soft);
}

.menu-privilege-picker {
    background: var(--mc-surface-muted);
}

/* ---- Applicant editor (PB d_applicants groupbox look — owner-approved) ---- */
.applicant-editor {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
    border: 0;
    margin: 0;
    padding: 0;
    min-inline-size: 0;
}

/* PB groupbox: bordered frame with the title sitting ON the border. */
.pbx-group {
    position: relative;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border-strong);
    border-radius: var(--mc-radius);
    box-shadow: var(--mc-shadow-soft);
    padding: 1.6rem 1.2rem 1.2rem;
    margin-top: .6rem;
}

.pbx-group > h3 {
    position: absolute;
    top: -0.78em;
    inset-inline-start: 1rem;
    margin: 0;
    padding: 0 .65rem;
    background: var(--mc-surface);
    color: var(--mc-accent-text);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.4;
}

/* One PB row: column widths vary per row via the --cols variable. */
.pbx-row {
    display: grid;
    grid-template-columns: var(--cols, repeat(4, minmax(0, 1fr)));
    gap: .8rem 1.5rem;
    align-items: start;
}

.pbx-row.cols-4 {
    --cols: repeat(4, minmax(0, 1fr));
}

.pbx-row + .pbx-row {
    margin-top: .9rem;
}

/* PB field: inline label beside the control ("label : field"). */
.pbx-field {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: .5rem;
    margin: 0;
}

.pbx-field > span {
    font-weight: 500;
    font-size: .88rem;
    color: var(--mc-muted);
    white-space: nowrap;
    margin-bottom: 0;
}

.pbx-field > span::after {
    content: " :";
}

.pbx-field .validation-message {
    grid-column: 2;
    font-size: .8rem;
}

.pbx-ltr {
    direction: ltr;
    text-align: left;
}

.pbx-rtl {
    direction: rtl;
    text-align: right;
}

.pbx-uppercase {
    text-transform: uppercase;
}

.pbx-phone-mask,
.pbx-phone-mask .e-input,
.pbx-phone-mask input {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: isolate !important;
}

.pbx-phone-mask::placeholder,
.pbx-phone-mask input::placeholder {
    direction: ltr !important;
    text-align: left !important;
}

.pbx-phone-text {
    direction: ltr !important;
    unicode-bidi: isolate !important;
    display: inline-block;
    text-align: left !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.applicant-editor:disabled .form-control {
    background: var(--mc-surface-muted);
}

.applicant-documents {
    margin-top: 1.9rem;
}

.document-upload-panel {
    display: grid;
    grid-template-columns: minmax(260px, .95fr) minmax(320px, 1.4fr) max-content;
    align-items: end;
    gap: .9rem 1rem;
    padding: .85rem;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-sm);
    background: var(--mc-surface-muted);
}

.document-type-field,
.document-file-picker {
    display: grid;
    gap: .35rem;
    margin: 0;
    min-width: 0;
}

.document-type-field > span,
.document-file-picker > span {
    color: var(--mc-muted);
    font-size: .84rem;
    font-weight: 500;
}

.document-file-picker input[type="file"] {
    inline-size: 100%;
    min-block-size: 2.45rem;
    padding: .45rem .65rem;
    border: 1px solid var(--mc-border-strong);
    border-radius: var(--mc-radius-sm);
    background: var(--mc-surface);
    color: var(--mc-text);
    font: inherit;
    font-size: .9rem;
}

.document-upload-panel > .e-btn {
    min-inline-size: 8.2rem;
    justify-self: end;
}

.document-hint,
.document-empty {
    margin-top: .9rem;
    padding: .7rem .85rem;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-sm);
    background: var(--mc-surface-muted);
    color: var(--mc-muted);
    font-size: .9rem;
    font-weight: 500;
}

.pending-documents {
    display: grid;
    gap: .55rem;
    margin-top: .9rem;
}

.pending-document {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    align-items: center;
    gap: .85rem;
    padding: .65rem .75rem;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-sm);
    background: var(--mc-surface);
}

.pending-document strong,
.pending-document span {
    display: block;
}

.pending-document strong {
    overflow: hidden;
    color: var(--mc-text);
    font-size: .92rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-document span {
    color: var(--mc-muted);
    font-size: .82rem;
    font-weight: 500;
}

.applicant-documents-table {
    margin: 1rem 0 0;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-sm);
    overflow: hidden;
}

.applicant-documents-table thead th {
    background: var(--mc-surface-muted);
    color: var(--mc-muted);
}

.applicant-documents-table th,
.applicant-documents-table td {
    padding: .65rem .85rem;
}

.applicant-documents-table tbody tr:last-child td {
    border-bottom: 0;
}

.document-actions-cell {
    width: 1%;
    white-space: nowrap;
}

.document-actions {
    display: flex;
    justify-content: flex-end;
    gap: .45rem;
}

@media (max-width: 1100px) {
    .pbx-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .document-upload-panel {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .document-upload-panel > .e-btn {
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .pbx-row {
        grid-template-columns: 1fr !important;
    }

    .pbx-field {
        grid-template-columns: 1fr;
        gap: .2rem;
    }

    .pbx-field .validation-message {
        grid-column: 1;
    }

    .document-upload-panel,
    .pending-document {
        grid-template-columns: 1fr;
    }

    .document-actions {
        justify-content: flex-start;
    }
}

.editor-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    gap: .55rem;
    margin-top: 1rem;
    padding: .75rem 1.1rem;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    box-shadow: 0 -2px 14px rgba(10, 25, 22, .07);
}

.editor-state-badge {
    align-self: center;
    padding: .25rem .75rem;
    border-radius: 999px;
    background: var(--mc-accent-soft);
    border: 1px solid var(--mc-accent-border);
    color: var(--mc-accent-text);
    font-size: .82rem;
    font-weight: 500;
}

/* ==== Academic-profile action toolbar (PB n_student_academic context menu) ==== */
.acad-actionbar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 1rem 1.5rem;
    margin-top: 1rem;
    padding: .9rem 1.1rem;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    box-shadow: 0 1px 10px rgba(10, 25, 22, .05);
}

.acad-action-group {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-width: 0;
}

.acad-action-group-label {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .01em;
    text-transform: uppercase;
    color: var(--mc-muted);
}

.acad-action-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.acad-action-divider {
    width: 1px;
    align-self: stretch;
    background: var(--mc-border);
    margin-block: .15rem;
}

.acad-action-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .85rem;
    font-family: var(--mc-font);
    font-size: .88rem;
    font-weight: 500;
    color: var(--mc-text, #1c2b28);
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: calc(var(--mc-radius) - 2px);
    cursor: pointer;
    transition: background .14s ease, border-color .14s ease, box-shadow .14s ease, transform .06s ease;
}

.acad-action-btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--mc-accent) 9%, var(--mc-surface));
    border-color: color-mix(in srgb, var(--mc-accent) 40%, var(--mc-border));
    color: var(--mc-accent-text);
}

.acad-action-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.acad-action-btn:focus-visible {
    outline: 2px solid var(--mc-accent-text);
    outline-offset: 2px;
}

.acad-action-btn:disabled {
    cursor: not-allowed;
}

/* "coming soon" placeholders — PB shows the menu items but never wired them. */
.acad-action-btn.is-soon {
    color: var(--mc-muted);
    background: color-mix(in srgb, var(--mc-border) 22%, var(--mc-surface));
    border-style: dashed;
    opacity: .85;
}

.acad-action-soon {
    padding: .05rem .4rem;
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 600;
    color: var(--mc-muted);
    background: color-mix(in srgb, var(--mc-border) 45%, var(--mc-surface));
}

.acad-action-ico {
    flex: none;
    width: 1.05rem;
    height: 1.05rem;
    background: currentColor;
    -webkit-mask: var(--mc-act-icon) center / contain no-repeat;
    mask: var(--mc-act-icon) center / contain no-repeat;
}

/* PB AppIcons parity: pause / handshake / merge / justice / text-file / certificate / student-card. */
.mc-act-icon-pause {
    --mc-act-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='4' width='4' height='16' rx='1'/%3E%3Crect x='14' y='4' width='4' height='16' rx='1'/%3E%3C/svg%3E");
}

.mc-act-icon-withdraw {
    --mc-act-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E");
}

.mc-act-icon-program {
    --mc-act-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3v6a5 5 0 0 0 5 5 5 5 0 0 1 5 5v2M17 3v3M7 21v-2'/%3E%3Ccircle cx='7' cy='3' r='0'/%3E%3Cpath d='m14 6 3-3 3 3'/%3E%3C/svg%3E");
}

.mc-act-icon-equivalency {
    --mc-act-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M7 6h10M4.5 6 2 12h5zM19.5 6 17 12h5z'/%3E%3Cpath d='M2 12a2.5 3 0 0 0 5 0M17 12a2.5 3 0 0 0 5 0'/%3E%3C/svg%3E");
}

.mc-act-icon-transcript {
    --mc-act-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M8 13h8M8 17h6'/%3E%3C/svg%3E");
}

.mc-act-icon-graduation {
    --mc-act-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 9-10-4L2 9l10 4z'/%3E%3Cpath d='M6 10.5V15c0 1.5 3 3 6 3s6-1.5 6-3v-4.5M22 9v5'/%3E%3C/svg%3E");
}

.mc-act-icon-card {
    --mc-act-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Ccircle cx='8' cy='11' r='2'/%3E%3Cpath d='M5 16c.6-1.4 1.7-2 3-2s2.4.6 3 2M14 10h5M14 13.5h5M14 17h3'/%3E%3C/svg%3E");
}

:root[data-theme="dark"] .acad-action-btn {
    color: var(--mc-text, #e7edeb);
}

@media (max-width: 640px) {
    .acad-action-divider {
        display: none;
    }

    .acad-actionbar {
        flex-direction: column;
    }
}

.editor-state-badge.is-submitted {
    background: var(--mc-warning-soft);
    border-color: #edd9b4;
    color: var(--mc-warning);
}

/* ---- Responsive ---- */
@media (max-width: 760px) {
    .lookup-hub-grid {
        grid-template-columns: 1fr 1fr;
    }

    .lookup-manage-header {
        flex-wrap: wrap;
    }
}

@media (max-width: 640.98px) {
    .content {
        padding-inline: 1rem !important;
    }

    .page-header {
        align-items: stretch;
    }

    .page-actions,
    .lookup-toolbar,
    .security-toolbar {
        width: 100%;
    }

    .page-edit-actions {
        min-inline-size: 0;
        flex: 1 1 100%;
    }

    .page-unsaved-indicator {
        min-inline-size: 0;
        margin-inline-end: auto;
    }

    .page-actions .e-btn,
    .lookup-toolbar .e-btn {
        flex: 1 1 auto;
    }

    .login-page {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }

    .login-page::before,
    .login-page::after {
        display: none;
    }

    .login-card {
        padding: 1.4rem;
        width: calc(100vw - 2rem);
        max-width: calc(100vw - 2rem);
    }
}

/* ---- Print pages ---- */
.print-toolbar {
    display: flex;
    gap: .5rem;
    padding: 1rem;
}

.card-print-hint { align-self: center; color: var(--mc-muted); font-size: .85rem; }
.card-print-error { margin: 0 1rem; padding: .75rem 1rem; border: 1px solid #dc3545; border-radius: .4rem; background: #fff1f2; color: #8b1d2c; font-weight: 600; }
.card-loading { padding: 2rem; text-align: center; }
.student-card-sheet { display: grid; gap: 1.5rem; justify-content: center; padding: 1rem; }
.student-card-side { position: relative; width: 85.6mm; height: 53.98mm; overflow: hidden; background: #fff; box-shadow: 0 3px 16px #0003; }
.student-card-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.card-field { position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #061a42; font-family: "IBM Plex Sans Arabic", sans-serif; font-weight: 700; font-size: 2.25mm; line-height: 1.1; white-space: nowrap; }
.card-student-photo { position: absolute; z-index: 2; left: 10.25%; top: 27%; width: 22.05%; height: 49.5%; object-fit: cover; border-radius: 1.7mm; }
.card-qr-code { position: absolute; z-index: 2; left: 73.6%; top: 68.7%; width: 17.1%; height: 26.4%; object-fit: contain; image-rendering: crisp-edges; }
.card-name { left: 45.65%; top: 11%; width: 36.35%; height: 7.5%; }
.card-student-no { left: 51.85%; top: 22%; width: 28.9%; height: 8%; }
.card-department { left: 49.7%; top: 33.5%; width: 32%; height: 8%; }
.card-academic-year { left: 47.8%; top: 45.5%; width: 34%; height: 8%; }
.card-number { left: 46%; top: 57.5%; width: 33.5%; height: 8%; }
.card-expiry { left: 7.2%; top: 68.2%; width: 18.2%; height: 7%; font-size: 2.4mm; }
.student-card-photo-input { display: none; }

@media print {
    .no-print {
        display: none !important;
    }

    html, body { width: auto; margin: 0 !important; padding: 0 !important; background: #fff; }
    .student-card-sheet { display: block; padding: 0; }
    .student-card-side { width: 85.6mm; height: 53.98mm; margin: 0; box-shadow: none; break-after: page; page-break-after: always; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .student-card-side:last-child { break-after: auto; page-break-after: auto; }
}

/* ==== Student profile (ACID 47 — PB بيانات الطالب الاساسية) ==== */

.student-profile {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

/* Student / Academic / Finance record screens share the same student-roster
   search sidebar. Widened from 320px: the results grid's name column was being
   squeezed to ~113px (after the 105px student-no + 78px audit columns),
   clipping Arabic names — the extra width flows to the flexible name column.
   Scoped to the roster screens so the fee-schema (stretch) and account
   (custom list) layouts that reuse .student-profile keep their own widths. */
.student-profile--roster {
    grid-template-columns: 25rem minmax(0, 1fr);
    /* Fill the page: without a floor the row is only as tall as its content, so
       on the empty/short states both columns stop halfway down. calc(100vh -
       190px) matches the .account-charges-sidebar convention (topbar + header +
       page padding). Taller record panels grow past it — it is only a floor. */
    min-height: calc(100vh - 190px);
    /* Stretch both columns to the row height so the search sidebar's bottom
       lines up with the details panel and both reach the page bottom. */
    align-items: stretch;
}

/* When no student is selected the left column is just the prompt card; fill the
   stretched column and center it so the tall empty area reads as intentional. */
.student-profile--roster .student-profile-empty {
    height: 100%;
    justify-content: center;
}

/* Lay the sidebar out as a column so the results grid can grow into the space
   left below the search box + titles, filling the gap down to the record
   panel's bottom edge. */
.student-profile--roster .student-profile-search {
    display: flex;
    flex-direction: column;
}

.student-profile-search {
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    box-shadow: var(--mc-shadow-soft);
    padding: .75rem;
    position: sticky;
    top: .75rem;
}

.student-profile-search > h3 {
    font-size: .85rem;
    font-weight: 700;
    color: var(--mc-muted);
    margin: 0 0 .5rem;
}

.student-profile-results-title {
    margin-top: .9rem !important;
}

.student-profile-search-box {
    margin-bottom: .25rem;
}

/* Anchor on the sidebar, not the grid's CssClass: Syncfusion does not render
   SfGrid CssClass onto the grid root here, so `.student-profile-results` never
   matches in the DOM (which had also left the cursor rule below dead). The
   results grid is the only grid inside the search aside, so this is precise. */
.student-profile-search .e-grid .e-rowcell {
    cursor: pointer;
    transition: background 120ms ease;
}

/* Let the results grid fill the sidebar: the grid becomes a column (header /
   body / pager), the body flex-grows, and its scroll region fills whatever
   height is left. A min-height keeps a sensible list (~10 rows) on short record
   panels; taller panels stretch the body further and any overflow scrolls
   inside the body, keeping the pager pinned at the bottom. */
.student-profile--roster .student-profile-search .e-grid {
    flex: 1 1 auto;
    min-height: 27rem;
    display: flex;
    flex-direction: column;
}

.student-profile--roster .student-profile-search .e-grid .e-gridcontent {
    flex: 1 1 auto;
    min-height: 0;
}

.student-profile--roster .student-profile-search .e-grid .e-content {
    height: 100%;
    overflow-y: auto;
}

/* Selecting a student is the screen's primary action. Reuse the accent
   language of the account lists: a hover tint plus a leading accent bar
   that marks the row whose profile is currently open. */
.student-profile-search .e-grid.e-gridhover tr.e-row:hover .e-rowcell,
.student-profile-search .e-grid tr.e-row:hover .e-rowcell {
    background: var(--mc-accent-soft);
}

.student-profile-search .e-grid tr.e-row.e-active .e-rowcell,
.student-profile-search .e-grid tr.e-row[aria-selected="true"] .e-rowcell {
    background: var(--mc-accent-soft);
}

.student-profile-search .e-grid tr.e-row.e-active .e-rowcell:first-child,
.student-profile-search .e-grid tr.e-row[aria-selected="true"] .e-rowcell:first-child {
    box-shadow: inset 3px 0 0 var(--mc-accent);
}

[dir="rtl"] .student-profile-search .e-grid tr.e-row.e-active .e-rowcell:first-child,
[dir="rtl"] .student-profile-search .e-grid tr.e-row[aria-selected="true"] .e-rowcell:first-child {
    box-shadow: inset -3px 0 0 var(--mc-accent);
}

.student-profile-empty,
.student-tab-empty,
.document-empty {
    color: var(--mc-muted);
    background: var(--mc-surface-muted);
    border: 1px dashed var(--mc-border);
    border-radius: var(--mc-radius-sm);
    padding: 1.25rem;
    text-align: center;
}

/* Scoped to the main "select a student" prompt (not the tab/document
   empties): an icon + rhythm so it reads as intentional, not a fallback. */
.student-profile-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 2.75rem 1.25rem;
}

.student-profile-empty::before {
    content: "";
    width: 42px;
    height: 42px;
    opacity: .55;
    background-color: var(--mc-muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18v14H3V5Zm3 4a2 2 0 1 0 4 0 2 2 0 0 0-4 0Zm-1 6.5c0-1.5 2-2.3 3-2.3s3 .8 3 2.3V16H5v-.5ZM14 8h5v2h-5V8Zm0 4h5v2h-5v-2Z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18v14H3V5Zm3 4a2 2 0 1 0 4 0 2 2 0 0 0-4 0Zm-1 6.5c0-1.5 2-2.3 3-2.3s3 .8 3 2.3V16H5v-.5ZM14 8h5v2h-5V8Zm0 4h5v2h-5v-2Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.account-charges-workspace { align-items: stretch; }
.account-charges-sidebar { display: flex; flex-direction: column; min-height: calc(100vh - 190px); }
.account-charge-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
.account-charge-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; margin-inline-start: .35rem; border-radius: 999px; background: var(--mc-primary-soft, #e5f4f1); color: var(--mc-primary, #087f6d); font-size: .75rem; }
.account-charge-list { flex: 1; min-height: 0; overflow: auto; border-top: 1px solid var(--mc-border, #dfe7e5); }
.account-charge-list-entry { position: relative; }
.account-charge-list-item { display: block; width: 100%; padding: .75rem .85rem; border: 0; border-bottom: 1px solid var(--mc-border, #dfe7e5); background: transparent; color: inherit; text-align: start; transition: background .15s ease, box-shadow .15s ease; }
.account-charge-list-item.has-audit { padding-inline-end: 4.75rem; }
.account-charge-list-audit { position: absolute; inset-inline-end: .65rem; top: 50%; z-index: 1; transform: translateY(-50%); }
.account-charge-list-item:hover { background: var(--mc-surface-hover, #f1f7f5); }
.account-charge-list-item.is-selected { background: var(--mc-primary-soft, #e5f4f1); box-shadow: inset 3px 0 0 var(--mc-primary, #087f6d); }
[dir="rtl"] .account-charge-list-item.is-selected { box-shadow: inset -3px 0 0 var(--mc-primary, #087f6d); }
.account-charge-list-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: var(--mc-primary, #087f6d); }
.account-charge-student, .account-charge-list-date { display: block; margin-top: .2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-charge-list-date { color: var(--mc-text-muted, #6b7976); font-size: .78rem; }
.account-charge-list-state { padding: 1.5rem .75rem; color: var(--mc-text-muted, #6b7976); text-align: center; }
.account-charges-main { min-width: 0; }
.account-charge-header { margin-bottom: 1rem; min-height: 245px; }
.account-charge-header-grid { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(350px, 1.35fr); gap: .55rem 2.5rem; padding: .35rem .5rem 1rem; }
.account-payment-header { min-height: 0; }
.account-payment-header-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem 1rem; padding: .35rem .5rem 1rem; }
.account-payment-student { grid-column: span 2; }
.account-payment-notes { grid-column: 1 / -1; }
.account-payment-table { min-width: 1080px; table-layout: fixed; }
.account-payment-student-trigger { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; min-height: 40px; padding: .5rem .7rem; border: 1px solid var(--mc-border); border-radius: 4px; background: var(--mc-surface); color: var(--mc-text); text-align: start; cursor: pointer; transition: border-color 140ms ease, background 140ms ease, transform 140ms cubic-bezier(.23,1,.32,1); }
.account-payment-student-trigger:not(:disabled):active { transform: scale(.985); }
.account-payment-student-trigger:focus-visible { outline: 2px solid var(--mc-accent); outline-offset: 2px; border-color: var(--mc-accent); }
.account-payment-student-trigger:disabled { background: var(--mc-surface-2, #f5f8f7); cursor: default; opacity: 1; }
.account-payment-student-trigger-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.account-payment-student-trigger-icon { flex: 0 0 1.15rem; width: 1.15rem; height: 1.15rem; background: currentColor; opacity: .72; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 3a6.5 6.5 0 1 0 3.98 11.64L19.85 21 21 19.85l-6.36-6.37A6.5 6.5 0 0 0 9.5 3Zm0 2a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9Z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 3a6.5 6.5 0 1 0 3.98 11.64L19.85 21 21 19.85l-6.36-6.37A6.5 6.5 0 0 0 9.5 3Zm0 2a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9Z'/%3E%3C/svg%3E") center/contain no-repeat; }
.account-payment-allocation-summary { display: flex; align-items: stretch; gap: .5rem; }
.account-payment-allocation-summary > span { display: flex; flex-direction: column; align-items: flex-end; min-width: 8.5rem; padding: .35rem .6rem; border: 1px solid var(--mc-border); border-radius: 6px; background: var(--mc-surface-2, #f5f8f7); }
.account-payment-allocation-summary small { color: var(--mc-muted); font-size: .7rem; font-weight: 600; }
.account-payment-allocation-summary strong { direction: ltr; color: var(--mc-text); font-size: .9rem; font-variant-numeric: tabular-nums; }
.account-payment-col-index { width: 3rem; }
.account-payment-col-invoice { width: 8rem; }
.account-payment-col-date { width: 7.5rem; }
.account-payment-col-service { width: auto; }
.account-payment-col-money { width: 7rem; }
.account-payment-col-entry { width: 10rem; }
.account-payment-col-actions { width: 6rem; }
.account-payment-table th,
.account-payment-table td { padding: .65rem .6rem; border-bottom: 1px solid var(--mc-grid-line); }
.account-payment-table thead th { font-size: .78rem; line-height: 1.25; vertical-align: middle; }
.account-payment-table tbody tr:last-child td { border-bottom-color: transparent; }
.account-payment-table .account-payment-money-heading { text-align: end; }
.account-payment-invoice-cell,
.account-payment-date-cell { direction: ltr; white-space: nowrap; font-variant-numeric: tabular-nums; }
.account-payment-service-cell { min-width: 0; white-space: normal; }
.account-payment-service-title { display: block; color: var(--mc-text); line-height: 1.4; overflow-wrap: anywhere; }
.account-payment-service-details { display: block; margin-top: .2rem; color: var(--mc-muted); font-size: .76rem; line-height: 1.35; overflow-wrap: anywhere; }
.account-payment-payment-cell .form-control { width: 100%; min-width: 0; direction: ltr; text-align: end; font-variant-numeric: tabular-nums; }
.account-payment-actions-cell { text-align: center; }
.account-payment-picker-help { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .75rem; padding: .65rem .75rem; border: 1px solid var(--mc-accent-border); border-radius: var(--mc-radius-sm); background: var(--mc-accent-soft); color: var(--mc-text); }
.account-payment-picker-help span { color: var(--mc-muted); font-size: .82rem; }
.account-payment-picker-grid { overflow-x: auto; }
.account-payment-picker-grid .e-grid { min-width: 900px; }
.account-payment-picker-actions { display: flex; align-items: center; justify-content: center; gap: .4rem; }
.account-payment-picker-actions .e-btn { transition: transform 140ms cubic-bezier(.23,1,.32,1); }
.account-payment-picker-actions .e-btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
    .account-payment-student-trigger:not(:disabled):hover { border-color: var(--mc-accent-border); background: var(--mc-accent-soft); }
}

.menu-icon-import .menu-symbol {
    --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h14v6h-2V5H7v14h10v-4h2v6H5V3Zm8 5v5.2l1.6-1.6L16 13l-4 4-4-4 1.4-1.4 1.6 1.6V8h2Zm3-1h5v2h-5V7Z'/%3E%3C/svg%3E");
}
.account-payment-date-filter { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .5rem; }
.account-payment-list-pending { margin-inline-start: .4rem; padding: .1rem .45rem; border-radius: 999px; background: #fff4ce; color: #7c5b00; font-size: .7rem; font-weight: 700; }
.account-payment-void-confirm p { margin: 0 0 .9rem; }
.account-payment-void-actions { display: flex; gap: .5rem; justify-content: flex-end; }
.account-payment-select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.account-payment-select-panel { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--mc-border, #dfe7e5); border-radius: .35rem; }
.account-payment-select-panel > h4 { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0; padding: .55rem .7rem; border-bottom: 1px solid var(--mc-border, #dfe7e5); background: var(--mc-surface-2, #f5f8f7); font-size: .85rem; }
.account-payment-select-list { display: flex; flex-direction: column; gap: .35rem; max-height: 380px; overflow: auto; padding: .45rem; }
.account-payment-select-row { display: flex; align-items: center; gap: .55rem; padding: .45rem .55rem; border: 1px solid var(--mc-border, #dfe7e5); border-radius: .3rem; background: var(--mc-surface, #fff); }
.account-payment-select-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.account-payment-select-info small { color: var(--mc-muted, #63716e); }
.account-payment-select-meta { color: var(--mc-muted, #63716e); font-size: .72rem; }
.account-payment-select-amount { max-width: 130px; direction: ltr; text-align: end; }
.account-payment-select-empty { padding: 1.5rem .75rem; text-align: center; color: var(--mc-muted, #63716e); }
.account-payment-select-total { display: flex; align-items: center; justify-content: space-between; padding: .55rem .7rem; border-top: 1px solid var(--mc-border, #dfe7e5); font-weight: 700; }
.account-payment-select-actions { display: flex; justify-content: flex-end; margin-top: .75rem; }
@media (max-width: 900px) { .account-payment-select-grid { grid-template-columns: 1fr; } }
.account-charge-number { grid-column: 1; grid-row: 1; }
.account-charge-dates { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.account-charge-student-field { grid-column: 1 / -1; grid-row: 2; }
.account-charge-notes-field { grid-column: 1 / -1; grid-row: 3; }
.account-charge-notes-field textarea { min-height: 76px; resize: vertical; }
.account-charge-readonly-field { display: flex; align-items: center; min-height: 38px; padding: .45rem .7rem; border: 1px solid var(--mc-border, #d7e0de); border-radius: .25rem; background: var(--mc-surface-2, #f5f8f7); color: var(--mc-text, #263431); }
.account-charge-invoice-no { direction: ltr; justify-content: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.account-charge-items { min-height: 360px; }
.account-charge-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: -.75rem -.75rem .75rem; padding: .65rem .75rem; border-bottom: 1px solid var(--mc-border, #dfe7e5); }
.account-charge-section-heading h3 { margin: 0; }
.account-charge-table-wrap { max-height: calc(100vh - 485px); min-height: 260px; overflow: auto; }
.account-charge-table { margin: 0; min-width: 1050px; }
.account-charge-table thead { position: sticky; top: 0; z-index: 2; }
.account-charge-table thead th { background: var(--mc-surface-2, #f5f8f7); white-space: nowrap; }
.account-charge-table tfoot { position: sticky; bottom: 0; z-index: 1; }
.account-charge-table tfoot th { background: var(--mc-surface-2, #f5f8f7); }
.account-charge-table .form-control, .account-charge-table .form-select { min-width: 90px; }
.account-charge-table:not(.account-payment-table) td:nth-child(3) { min-width: 230px; }
.account-charge-table:not(.account-payment-table) td:nth-child(9) .form-control { min-width: 180px; }
.account-charge-cell-label { display: block; padding: .45rem .35rem; color: var(--mc-text, #263431); line-height: 1.35; }
.account-charge-service-label { font-weight: 600; }
.account-charge-number-label { direction: ltr; text-align: end; font-variant-numeric: tabular-nums; }
.account-charge-money { direction: ltr; text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mc-money { direction: ltr; font-variant-numeric: tabular-nums; }
.mc-money-negative { color: #c62828 !important; }

/* Printable A4 term invoice. */
.invoice-print-state { padding: 3rem; text-align: center; }
.invoice-print-sheet { width: min(100%, 210mm); min-height: 270mm; margin: 1.25rem auto; padding: 16mm; background: #fff; color: #1d2826; box-shadow: 0 8px 30px rgba(22, 45, 40, .12); }
.invoice-print-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; padding-bottom: 1rem; border-bottom: 3px solid #087f6d; }
.invoice-print-title h1 { margin: 0; color: #087f6d; font-size: 1.75rem; }
.invoice-print-title p { margin: .25rem 0 0; color: #63716e; }
.invoice-print-number { min-width: 170px; padding: .75rem 1rem; border: 1px solid #b9cac6; border-radius: .35rem; text-align: center; }
.invoice-print-number span, .invoice-print-meta span, .invoice-print-summary span { display: block; margin-bottom: .2rem; color: #687672; font-size: .78rem; }
.invoice-print-number strong { direction: ltr; display: block; font-size: 1.15rem; }
.invoice-print-meta { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; margin: 1.25rem 0; padding: 1rem; background: #f3f8f6; border: 1px solid #dbe7e4; border-radius: .35rem; }
.invoice-print-meta > div { min-width: 0; }
.invoice-print-student strong { overflow-wrap: anywhere; }
.invoice-print-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.invoice-print-table th, .invoice-print-table td { padding: .55rem .45rem; border: 1px solid #cbd8d5; text-align: start; vertical-align: top; }
.invoice-print-table th { background: #e8f2ef; color: #25413b; white-space: nowrap; }
.invoice-print-table td:nth-child(n+3):nth-child(-n+7) { direction: ltr; text-align: end; font-variant-numeric: tabular-nums; }
.invoice-print-table td small { display: block; margin-top: .2rem; color: #687672; }
.invoice-print-table tr.is-canceled { color: #77817f; text-decoration: line-through; }
.invoice-print-status { display: inline-block; padding: .2rem .4rem; border-radius: 999px; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.invoice-print-status.is-unpaid { background: #fff0f0; color: #a52d2d; }
.invoice-print-status.is-partial { background: #fff4ce; color: #765600; }
.invoice-print-status.is-paid { background: #e5f6ed; color: #176d49; }
.invoice-print-status.is-canceled { background: #eef1f0; color: #626d6a; }
.invoice-print-summary { width: 310px; margin: 1rem 0 0 auto; border: 1px solid #cbd8d5; }
[dir="rtl"] .invoice-print-summary { margin-right: auto; margin-left: 0; }
.invoice-print-summary > div { display: flex; align-items: center; justify-content: space-between; padding: .5rem .75rem; border-bottom: 1px solid #dce5e3; }
.invoice-print-summary > div:last-child { border-bottom: 0; }
.invoice-print-balance { background: #e8f2ef; font-size: 1.05rem; }
.invoice-print-notes { margin-top: 1.25rem; padding: .75rem; border: 1px solid #d6e1df; min-height: 60px; }
.invoice-print-notes p { margin: .35rem 0 0; white-space: pre-wrap; }
.invoice-print-footer { margin-top: 2rem; padding-top: .5rem; border-top: 1px solid #d6e1df; color: #788582; font-size: .72rem; text-align: center; }

@media print {
    .no-print { display: none !important; }
    .invoice-print-sheet { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .invoice-print-table thead { display: table-header-group; }
    .invoice-print-table tr, .invoice-print-summary, .invoice-print-notes { break-inside: avoid; }
}
.account-charge-row-number, .account-charge-row-action { text-align: center; vertical-align: middle; }
.account-charge-payment-badge { display: inline-flex; align-items: center; gap: .35rem; min-width: 92px; padding: .28rem .5rem; border: 1px solid transparent; border-radius: 999px; font-size: .76rem; font-weight: 700; line-height: 1; white-space: nowrap; text-decoration: none; }
.account-charge-payment-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; color: #fff; font-size: .72rem; font-weight: 900; }
.account-charge-payment-badge.is-unpaid { border-color: #efb5b5; background: #fff0f0; color: #a52d2d; }
.account-charge-payment-badge.is-unpaid .account-charge-payment-icon { background: #cf3f3f; }
.account-charge-payment-badge.is-partial { border-color: #e7cd80; background: #fff8df; color: #7c5b00; }
.account-charge-payment-badge.is-partial .account-charge-payment-icon { background: #d59b00; }
.account-charge-payment-badge.is-paid { border-color: #9bd4bc; background: #eaf8f1; color: #176d49; }
.account-charge-payment-badge.is-paid .account-charge-payment-icon { background: #249461; }
.account-charge-payment-badge.is-canceled { border-color: #cbd2d0; background: #f1f3f3; color: #626d6a; }
.account-charge-payment-badge.is-canceled .account-charge-payment-icon { background: #77817f; }
.account-charge-table tr.is-canceled { color: var(--mc-text-muted, #6b7976); text-decoration: line-through; opacity: .75; }

@media (max-width: 1100px) {
    .account-charge-header-grid { grid-template-columns: 1fr; }
    .account-charge-number, .account-charge-dates, .account-charge-student-field, .account-charge-notes-field { grid-column: 1; grid-row: auto; }
    .account-payment-header-grid { grid-template-columns: 1fr; }
    .account-payment-student, .account-payment-notes { grid-column: 1; }
    .account-charge-table-wrap { max-height: none; }
}

@media (max-width: 620px) {
    .account-payment-services-heading { align-items: flex-start; flex-direction: column; }
    .account-payment-allocation-summary { width: 100%; }
    .account-payment-allocation-summary > span { flex: 1; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .account-payment-student-trigger,
    .account-payment-picker-actions .e-btn { transition: none; }
}

.student-profile-tabs {
    margin-top: 1.25rem;
    overflow: hidden;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: calc(var(--mc-radius) + 2px);
    box-shadow: var(--mc-shadow-soft);
}

.fee-schema-master-detail .student-profile-search {
    align-self: stretch;
}

.fee-schema-nav-item {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.fee-schema-nav-item span {
    color: var(--text-muted, #64748b);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fee-schema-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.fee-schema-heading h2 {
    margin: .25rem 0 0;
}

.fee-schema-code {
    color: var(--text-muted, #64748b);
    font-weight: 700;
    letter-spacing: .04em;
}

.fee-schema-notes {
    margin: .8rem 0 0;
    color: var(--text-muted, #64748b);
}

/* Give the profile group boxes room to breathe; their legends sit above the border. */
.student-profile-main .pbx-group + .pbx-group {
    margin-top: 1.65rem;
}

/* Shared tab navigation: semantic icons plus a high-contrast selected card. */
.student-profile-tabs.e-tab .e-tab-header {
    box-sizing: border-box;
    height: auto !important;
    min-height: calc(2.85rem + 1rem);
    padding: .5rem;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--mc-accent) 4%, transparent), transparent),
        var(--mc-surface-muted);
    border-bottom: 1px solid var(--mc-border);
}

.student-profile-tabs.e-tab .e-tab-header::before,
.student-profile-tabs.e-tab .e-tab-header .e-indicator {
    display: none;
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-items {
    min-height: 2.85rem;
    gap: .38rem;
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-items.e-hscroll .e-scroll-nav {
    width: 2.85rem;
    min-width: 2.85rem;
    height: 2.85rem;
    color: var(--mc-muted);
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-sm);
}

.student-profile-tabs.e-tab .e-tab-header .e-scroll-nav:focus-visible {
    outline: 2px solid var(--mc-accent-text);
    outline-offset: -3px;
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item {
    position: relative;
    height: 2.85rem !important;
    min-height: 2.85rem !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible;
    background: transparent !important;
    border: 0 !important;
    border-radius: var(--mc-radius-sm);
    box-shadow: none !important;
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item .e-tab-wrap {
    box-sizing: border-box;
    height: 2.85rem;
    min-height: 2.85rem;
    padding: .5rem .78rem !important;
    background: color-mix(in srgb, var(--mc-surface) 70%, transparent);
    border: 1px solid transparent;
    border-radius: var(--mc-radius-sm);
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item .e-text-wrap {
    display: flex;
    align-items: center;
    gap: .5rem;
    height: auto !important;
    min-height: 0 !important;
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item:not(.e-active) .e-tab-wrap:hover {
    background: color-mix(in srgb, var(--mc-surface) 70%, transparent);
    border-color: transparent;
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item:not(.e-active) .e-tab-wrap:hover .e-tab-text,
.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item:not(.e-active) .e-tab-wrap:hover .e-tab-icon {
    color: var(--mc-muted);
}

@media (hover: hover) and (pointer: fine) {
    .student-profile-tabs.e-tab .e-tab-header .e-toolbar-item:hover:not(.e-active) .e-tab-wrap {
        background: color-mix(in srgb, var(--mc-accent) 9%, var(--mc-surface));
        border-color: color-mix(in srgb, var(--mc-accent) 34%, var(--mc-border));
    }

    .student-profile-tabs.e-tab .e-tab-header .e-toolbar-item:hover:not(.e-active) .e-tab-text,
    .student-profile-tabs.e-tab .e-tab-header .e-toolbar-item:hover:not(.e-active) .e-tab-icon {
        color: var(--mc-accent-text);
    }
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-wrap,
.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-wrap:hover,
.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-wrap:active {
    background: linear-gradient(135deg, var(--mc-accent-strong), var(--mc-accent));
    border-color: color-mix(in srgb, var(--mc-accent-strong) 80%, var(--mc-border));
    box-shadow:
        0 6px 16px color-mix(in srgb, var(--mc-accent-strong) 26%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, .2),
        inset 0 -3px 0 rgba(255, 255, 255, .78);
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item .e-tab-text,
.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item .e-tab-icon {
    color: var(--mc-muted);
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item .e-tab-text {
    margin: 0 !important;
    font-family: var(--mc-font);
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.25;
    text-transform: none;
    white-space: nowrap;
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-text,
.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-icon,
.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-wrap:hover .e-tab-text,
.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-wrap:hover .e-tab-icon {
    color: #ffffff;
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-text {
    font-weight: 700;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .14);
}

.student-profile-tabs.e-tab.e-focused > .e-tab-header .e-toolbar-item .e-tab-wrap:focus,
.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-focused .e-tab-wrap,
.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item .e-tab-wrap:focus-visible {
    outline: 2px solid var(--mc-accent-text);
    outline-offset: -3px;
    border-color: var(--mc-accent-text);
    box-shadow: inset 0 0 0 2px var(--mc-surface);
}

.student-profile-tabs.e-tab.e-focused > .e-tab-header .e-toolbar-item.e-active .e-tab-wrap:focus,
.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active.e-focused .e-tab-wrap,
.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-wrap:focus-visible {
    outline-color: #ffffff;
    box-shadow:
        0 6px 16px color-mix(in srgb, var(--mc-accent-strong) 26%, transparent),
        inset 0 0 0 4px rgba(255, 255, 255, .18),
        inset 0 -3px 0 rgba(255, 255, 255, .78);
}

/* TabHeader.IconCss targets these masks; each glyph sits in a small semantic tile. */
.student-profile-tabs.e-tab .e-tab-header .e-icons.e-tab-icon.mc-tab-icon {
    display: inline-grid !important;
    place-items: center;
    flex: 0 0 1.65rem;
    width: 1.65rem !important;
    min-width: 1.65rem !important;
    height: 1.65rem !important;
    margin: 0 !important;
    background: color-mix(in srgb, var(--mc-accent) 12%, var(--mc-surface));
    border-radius: 6px;
    color: var(--mc-accent-text);
    font-size: 0 !important;
    opacity: 1;
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item .e-tab-icon.mc-tab-icon::before {
    content: "";
    position: static !important;
    inset: auto !important;
    width: 1rem;
    height: 1rem;
    background: currentColor;
    -webkit-mask: var(--mc-tab-icon) center / contain no-repeat;
    mask: var(--mc-tab-icon) center / contain no-repeat;
}

.student-profile-tabs.e-tab .e-tab-header .mc-tab-icon + .e-tab-text {
    margin-inline-start: 0 !important;
}

.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active .mc-tab-icon,
.student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-wrap:hover .mc-tab-icon {
    background: rgba(255, 255, 255, .16);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

:root[data-theme="dark"] .student-profile-tabs.e-tab .e-tab-header .e-icons.e-tab-icon.mc-tab-icon {
    background: color-mix(in srgb, var(--mc-accent) 18%, var(--mc-surface));
}

:root[data-theme="dark"] .student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active .mc-tab-icon,
:root[data-theme="dark"] .student-profile-tabs.e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-wrap:hover .mc-tab-icon {
    background: rgba(255, 255, 255, .16);
}

.mc-tab-icon-people {
    --mc-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 20v-1.6a3.4 3.4 0 0 0-3.4-3.4H6.4A3.4 3.4 0 0 0 3 18.4V20'/%3E%3Ccircle cx='9' cy='7.5' r='3.5'/%3E%3Cpath d='M17 11.5a3.5 3.5 0 0 0 0-7M21 20v-1.6a3.4 3.4 0 0 0-2.5-3.28'/%3E%3C/svg%3E");
}

.mc-tab-icon-contact {
    --mc-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16.6v2.7a1.8 1.8 0 0 1-1.96 1.8A17.8 17.8 0 0 1 11.3 18.35a17.5 17.5 0 0 1-5.4-5.4A17.8 17.8 0 0 1 3.15 5.17 1.8 1.8 0 0 1 4.94 3.2h2.7a1.8 1.8 0 0 1 1.8 1.55c.11.87.32 1.72.62 2.53a1.8 1.8 0 0 1-.4 1.9L8.52 10.3a14.4 14.4 0 0 0 5.4 5.4l1.12-1.13a1.8 1.8 0 0 1 1.9-.4c.81.3 1.66.51 2.53.62A1.8 1.8 0 0 1 21 16.6z'/%3E%3C/svg%3E");
}

.mc-tab-icon-course {
    --mc-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5.5A3.5 3.5 0 0 1 6.5 2H11a1 1 0 0 1 1 1v18a3 3 0 0 0-3-3H3zM21 5.5A3.5 3.5 0 0 0 17.5 2H13a1 1 0 0 0-1 1v18a3 3 0 0 1 3-3h6z'/%3E%3C/svg%3E");
}

.mc-tab-icon-location {
    --mc-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='2.6'/%3E%3C/svg%3E");
}

.mc-tab-icon-document {
    --mc-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M8 13h8M8 17h6'/%3E%3C/svg%3E");
}

.mc-tab-icon-program {
    --mc-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 9 10-5 10 5-10 5zM6 11v5c3.2 2.7 8.8 2.7 12 0v-5M22 9v6'/%3E%3C/svg%3E");
}

.mc-tab-icon-status {
    --mc-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l2.2-6 4.1 12 2.2-6H21'/%3E%3C/svg%3E");
}

.mc-tab-icon-request {
    --mc-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2M9 2h6a1 1 0 0 1 1 1v3H8V3a1 1 0 0 1 1-1zM8 12h8M8 16h5'/%3E%3C/svg%3E");
}

.mc-tab-icon-wallet {
    --mc-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6a3 3 0 0 1 3-3h12a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a3 3 0 0 1-3-3zM3 7h15M16 12h5v5h-5a2.5 2.5 0 0 1 0-5z'/%3E%3C/svg%3E");
}

.mc-tab-icon-benefit {
    --mc-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 2.7 5.47 6.04.88-4.37 4.26 1.03 6.02L12 15.8l-5.4 2.83 1.03-6.02-4.37-4.26 6.04-.88z'/%3E%3Cpath d='m9.5 12 1.6 1.6 3.7-3.7'/%3E%3C/svg%3E");
}

.mc-tab-icon-ledger {
    --mc-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='2' width='18' height='20' rx='2'/%3E%3Cpath d='M7 6h10M7 10h4M15 10h2M7 14h4M15 14h2M7 18h4M15 18h2'/%3E%3C/svg%3E");
}

.mc-tab-icon-calendar {
    --mc-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='17' rx='2'/%3E%3Cpath d='M8 2v5M16 2v5M3 9.5h18M8 14h.01M12 14h.01M16 14h.01M8 18h.01M12 18h.01'/%3E%3C/svg%3E");
}

.mc-tab-icon-service {
    --mc-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5-5L7.5 3.5l3 3 2.2-2.2a4 4 0 0 0 2 5L6.2 17.8a2.8 2.8 0 1 0 4 4l8.5-8.5a4 4 0 0 0 5-5l-2.2 2.2-3-3z'/%3E%3C/svg%3E");
}

@media (max-width: 720px) {
    .student-profile-tabs.e-tab .e-tab-header {
        min-height: calc(2.85rem + .8rem);
        padding: .4rem;
    }

    .student-profile-tabs.e-tab .e-tab-header .e-toolbar-items {
        gap: .25rem;
    }

    .student-profile-tabs.e-tab .e-tab-header .e-toolbar-item .e-tab-wrap {
        padding: .5rem .65rem !important;
    }

    .student-profile-tabs.e-tab .e-tab-header .e-toolbar-item .e-tab-text {
        font-size: .86rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .student-profile-tabs.e-tab .e-tab-header .e-toolbar-item .e-tab-wrap {
        transition: none;
    }
}

/* Syncfusion's default horizontal slide feels heavy on this data-dense page. */
.student-profile-tabs.e-tab .e-content,
.student-profile-tabs.e-tab .e-content .e-item {
    animation: none !important;
    transition: none !important;
}

.student-tab-body {
    min-height: 11rem;
    padding: 1rem;
}

.student-tab-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: .6rem;
}

.student-row-actions {
    display: flex;
    gap: .35rem;
    white-space: nowrap;
}

.student-doc-source {
    display: inline-block;
    font-size: .78rem;
    padding: .1rem .5rem;
    border-radius: 999px;
    background: var(--mc-accent-soft);
    color: var(--mc-accent-text);
}

.student-check-field {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.student-check-field input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--mc-accent);
}

@media (max-width: 1100px) {
    .student-profile {
        grid-template-columns: 1fr;
    }

    .student-profile-search {
        position: static;
    }
}

/* ==== User management roster + inline editor ==== */
.security-user-list-name {
    min-width: 0;
}

.security-user-list-name strong,
.security-user-list-name small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.security-user-list-name strong {
    color: var(--mc-text);
    font-size: .86rem;
}

.security-user-list-name small {
    margin-top: .12rem;
    color: var(--mc-muted);
    font-size: .71rem;
}

.security-user-list-name.is-active strong {
    font-weight: 750;
}

.security-user-list-name.is-inactive strong,
.security-user-list-name.is-inactive small {
    color: color-mix(in srgb, var(--mc-muted) 78%, transparent);
    font-weight: 500;
}

.security-user-list-status {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    min-height: 1.5rem;
    padding: .16rem .46rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
}

.security-user-list-status::before {
    content: "";
    width: .8rem;
    height: .8rem;
    background: currentColor;
    -webkit-mask: var(--security-user-status-icon) center / contain no-repeat;
    mask: var(--security-user-status-icon) center / contain no-repeat;
}

.security-user-list-status.is-active {
    --security-user-status-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.3-4.1-4.1 1.4-1.4 2.7 2.7 5.1-5.1 1.4 1.4-6.5 6.5Z'/%3E%3C/svg%3E");
    color: var(--mc-success);
    background: var(--mc-success-soft);
}

.security-user-list-status.is-inactive {
    --security-user-status-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-5 9h10v2H7v-2Z'/%3E%3C/svg%3E");
    color: var(--mc-muted);
    background: var(--mc-surface-muted);
}

.user-management-flags {
    margin-top: 1rem;
}

.student-tab-warning {
    color: var(--mc-warning);
    background: color-mix(in srgb, var(--mc-warning) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--mc-warning) 35%, transparent);
    border-radius: var(--mc-radius-sm);
    padding: .5rem .85rem;
    margin-bottom: .6rem;
    font-size: .85rem;
}

/* ==== record audit (footprint + history) ==== */
.audit-icons { display: inline-flex; align-items: center; gap: .25rem; }
.audit-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; padding: 0; border: 1px solid var(--mc-border); border-radius: 6px; background: var(--mc-surface); color: var(--mc-muted); cursor: pointer; transition: color .12s, border-color .12s, background .12s; }
.audit-icon:hover { color: var(--mc-accent-strong); border-color: var(--mc-accent-border); background: var(--mc-accent-soft); }
.audit-icon svg { width: 1rem; height: 1rem; }

.audit-empty { padding: 1.25rem; text-align: center; color: var(--mc-muted); }
.audit-empty.is-error { color: var(--mc-danger); }
.audit-record-key { margin: 0 0 .55rem; color: var(--mc-muted); font: 600 .75rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; direction: ltr; text-align: start; }

.audit-footprint { display: flex; flex-direction: column; gap: .5rem; padding: .25rem 0; }
.audit-footprint-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: stretch; gap: .75rem; padding: .65rem .75rem; border: 1px solid var(--mc-border); border-radius: 8px; background: var(--mc-surface-muted); }
.audit-footprint-row.is-deleted { border-color: #efb5b5; background: #fff0f0; }
.audit-footprint-value { display: flex; min-width: 0; flex-direction: column; gap: .2rem; }
.audit-footprint-label { font-size: .8rem; font-weight: 700; color: var(--mc-muted); }
.audit-footprint-who { font-weight: 600; }
.audit-footprint-when { font-size: .86rem; font-weight: 600; direction: ltr; text-align: start; }

@media (max-width: 620px) {
    .audit-footprint-row { grid-template-columns: 1fr; }
}

.audit-history-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.audit-history-count { color: var(--mc-muted); font-size: .85rem; }
.audit-history-toggle { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; cursor: pointer; user-select: none; }

.audit-history-wrap { overflow: auto; max-height: 62vh; border: 1px solid var(--mc-border); border-radius: 8px; }
.audit-history-table { width: 100%; border-collapse: collapse; font-size: .82rem; white-space: nowrap; }
.audit-history-table th, .audit-history-table td { padding: .4rem .6rem; border-bottom: 1px solid var(--mc-border); text-align: start; }
.audit-history-table thead th { position: sticky; top: 0; z-index: 1; background: var(--mc-surface-muted); color: var(--mc-muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .02em; }
.audit-history-table tbody tr:hover { background: var(--mc-surface-muted); }
.audit-history-table td.is-changed { background: var(--mc-warning-soft); box-shadow: inset 0 0 0 1px var(--mc-warning); border-radius: 3px; font-weight: 600; }
.audit-version-no { color: var(--mc-muted); }
.audit-history-who { font-weight: 600; }
.audit-history-when { direction: ltr; color: var(--mc-muted); }

.audit-action { display: inline-flex; align-items: center; padding: .18rem .5rem; border: 1px solid transparent; border-radius: 999px; font-size: .74rem; font-weight: 700; line-height: 1; }
.audit-action-i { border-color: #9bd4bc; background: #eaf8f1; color: #176d49; }
.audit-action-u { border-color: #e7cd80; background: #fff8df; color: #7c5b00; }
.audit-action-d { border-color: #efb5b5; background: #fff0f0; color: #a52d2d; }
.audit-action-r { border-color: #9abfe9; background: #eef6ff; color: #235f9f; }

.table tr.is-inactive > * { background: var(--mc-surface-muted); color: var(--mc-muted); }
.table tr.is-inactive .audit-icons { opacity: 1; }

.audit-history-dialog.e-dialog { max-width: 94vw; }

/* ==== audit history detail tabs + explorer ==== */
.audit-history-tabs { display: flex; gap: .25rem; margin-bottom: .6rem; border-bottom: 1px solid var(--mc-border); }
.audit-history-tab { padding: .45rem .9rem; border: none; border-bottom: 2px solid transparent; background: none; color: var(--mc-muted); font-size: .85rem; font-weight: 600; cursor: pointer; }
.audit-history-tab:hover { color: var(--mc-accent-strong); }
.audit-history-tab.is-active { color: var(--mc-accent-strong); border-bottom-color: var(--mc-accent); }

.audit-explorer-controls .audit-explorer-actions > div { display: flex; align-items: center; min-height: 2.2rem; }
.audit-explorer-wrap { max-height: 55vh; }

/* ==== ranked course suggestions (S5) ==== */
.mc-suggest-header { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.mc-suggest-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .55rem; border: 1px solid var(--mc-border); border-radius: 999px; background: color-mix(in srgb, var(--mc-border) 18%, transparent); color: var(--mc-text, inherit); font-size: .76rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.mc-suggest-chip.is-standing { border-color: var(--mc-accent-border); background: var(--mc-accent-soft); color: var(--mc-accent-text); }
.mc-suggest-chip.is-tier { border-color: var(--mc-accent-border); color: var(--mc-accent-strong); background: transparent; }
.mc-suggest-chip.is-unlock { border-color: color-mix(in srgb, var(--mc-success, #249461) 45%, transparent); background: color-mix(in srgb, var(--mc-success, #249461) 12%, transparent); color: var(--mc-success, #176d49); }
.mc-suggest-chip.is-critical { border-color: color-mix(in srgb, var(--mc-warning) 55%, transparent); background: color-mix(in srgb, var(--mc-warning) 14%, transparent); color: var(--mc-warning); }
.mc-suggest-chip.is-hard { border-color: color-mix(in srgb, var(--mc-danger) 45%, transparent); background: color-mix(in srgb, var(--mc-danger) 10%, transparent); color: var(--mc-danger); }
.mc-suggest-chip.is-blocked { border-color: color-mix(in srgb, var(--mc-danger) 45%, transparent); background: color-mix(in srgb, var(--mc-danger) 10%, transparent); color: var(--mc-danger); }
.mc-suggest-table td { vertical-align: top; }
.mc-suggest-table td:nth-last-child(2) { display: flex; flex-wrap: wrap; gap: .3rem; }
.mc-suggest-row-blocked { opacity: .62; }
.mc-suggest-registrar { margin-bottom: .6rem; }
.mc-suggest-precheck { margin-top: .6rem; padding: .55rem .8rem; border: 1px solid color-mix(in srgb, var(--mc-warning) 55%, transparent); border-radius: .5rem; background: color-mix(in srgb, var(--mc-warning) 10%, transparent); }
.mc-suggest-precheck ul { margin: .3rem 0 0; padding-inline-start: 1.2rem; }
