@font-face {
    font-family: "Manrope";
    src: url("/web/assets/fonts/manrope-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url("/web/assets/fonts/manrope-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url("/web/assets/fonts/manrope-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url("/web/assets/fonts/manrope-800.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Space Mono";
    src: url("/web/assets/fonts/space-mono-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Space Mono";
    src: url("/web/assets/fonts/space-mono-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-ui: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Space Mono", "Consolas", "Liberation Mono", monospace;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;

    --bg-0: #081725;
    --bg-1: #0f2333;
    --surface-0: rgba(12, 29, 44, 0.92);
    --surface-1: rgba(16, 37, 55, 0.82);
    --surface-2: rgba(20, 44, 64, 0.66);

    --ums-sidebar-width: 176px;
    --glass: rgba(163, 196, 220, 0.1);
    --glass-strong: rgba(163, 196, 220, 0.18);
    --line: rgba(170, 205, 232, 0.28);
    --text: #e9f2fb;
    --muted: #9fb0c2;
    --good: #2de39b;
    --warn: #ff8450;
    --neutral: #8db0d5;
    --ui-state-neutral-dark: #c1d8ec;
    --ui-state-loading-dark: #9dd8ff;
    --ui-state-empty-dark: #b3c9de;
    --ui-state-error-dark: #ffb0a0;
    --ui-state-success-dark: #92ebbf;
    --ui-state-neutral-light: #5b6672;
    --ui-state-loading-light: #2e73a9;
    --ui-state-empty-light: #5f6b78;
    --ui-state-error-light: #b23322;
    --ui-state-success-light: #166a42;
    --accent: #2d84ff;
    --accent-2: #2d84ff;
    --radius-xl: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --card-border-w: 1px;
    --elevation-1: 0 8px 20px rgba(5, 19, 31, 0.22);
    --elevation-2: 0 14px 30px rgba(5, 19, 31, 0.28);
    --elevation-3: 0 22px 46px rgba(4, 16, 27, 0.34);
    --shadow-xl: var(--elevation-3);
    --motion-fast: 0.16s;
    --motion-medium: 0.26s;
    --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-ui);
    color: var(--text);
    background: radial-gradient(circle at 8% 10%, rgba(57, 108, 150, 0.26) 0%, transparent 38%),
        radial-gradient(circle at 92% 10%, rgba(45, 132, 255, 0.18) 0%, transparent 34%),
        linear-gradient(150deg, var(--bg-0), var(--bg-1));
    overflow-x: hidden;
}

.skip-link {
    position: fixed;
    top: -48px;
    left: 0.9rem;
    z-index: 30;
    padding: 0.52rem 0.74rem;
    border-radius: 10px;
    background: #f3fbff;
    color: #03213a;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid rgba(67, 145, 206, 0.45);
    box-shadow: 0 10px 18px rgba(5, 20, 34, 0.18);
    transition: top var(--motion-fast) var(--motion-ease);
}

.skip-link:focus-visible {
    top: 0.82rem;
    outline: 2px solid rgba(32, 128, 204, 0.9);
    outline-offset: 1px;
}

.scene {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    perspective: 1200px;
    opacity: 0.52;
}

.parallax-layer {
    position: absolute;
    transition: transform 0.24s linear;
}

.nebula {
    border-radius: 50%;
    filter: blur(84px);
    opacity: 0.26;
}

.layer-a {
    width: 460px;
    height: 460px;
    background: #276aa0;
    top: -160px;
    left: -90px;
}

.layer-b {
    width: 560px;
    height: 560px;
    background: #2c5e90;
    right: -180px;
    top: 12%;
}

.grid-field {
    inset: -20%;
    background-image:
        linear-gradient(rgba(159, 212, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(159, 212, 255, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    transform: rotateX(62deg) translateY(42%);
    opacity: 0.08;
}

.orb {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    filter: blur(6px);
    opacity: 0.14;
    animation: float-orb 12s ease-in-out infinite;
}

.orb-one {
    background: radial-gradient(circle at 35% 30%, #6cb0ea 0%, #245f91 70%);
    left: 60%;
    top: 20%;
}

.orb-two {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at 35% 30%, #8ebde4 0%, #375f84 70%);
    left: 16%;
    top: 62%;
    animation-delay: 1.6s;
}

@keyframes float-orb {
    0%,
    100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

.dashboard {
    position: relative;
    z-index: 1;
    width: min(1260px, calc(100% - var(--ums-sidebar-width) - 2rem));
    margin: 0.75rem 1rem 1rem calc(var(--ums-sidebar-width) + 0.8rem);
    display: grid;
    gap: var(--space-4);
}

.hidden {
    display: none !important;
}

.elevation-1 {
    box-shadow: var(--elevation-1);
}

.elevation-2 {
    box-shadow: var(--elevation-2);
}

.elevation-3 {
    box-shadow: var(--elevation-3);
}

.glass {
    background: var(--surface-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--elevation-1);
    backdrop-filter: blur(6px) saturate(110%);
    -webkit-backdrop-filter: blur(6px) saturate(110%);
    transform-style: preserve-3d;
    transition: border-color var(--motion-medium) var(--motion-ease), box-shadow var(--motion-medium) var(--motion-ease);
}

#main-dashboard-header.topbar {
    box-shadow: var(--elevation-3);
}

.tilt {
    will-change: transform;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.topbar {
    position: sticky;
    top: 0.55rem;
    z-index: 7;
    padding: var(--space-4);
    display: grid;
    grid-template-columns: minmax(320px, 1.12fr) minmax(420px, 1fr);
    align-items: center;
    justify-content: stretch;
    gap: var(--space-4);
    background: var(--surface-0);
    box-shadow: var(--elevation-3);
}

.ums-top-left {
    min-width: 0;
    max-width: 100%;
}

.topbar-control-row {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.62rem;
}

.kicker {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    color: #a9c5df;
    text-transform: uppercase;
}

h1 {
    margin: 0.2rem 0 0.24rem;
    font-size: clamp(1.45rem, 2.25vw, 2.05rem);
    line-height: 1.14;
    letter-spacing: -0.02em;
}

.subline {
    margin: 0;
    color: var(--muted);
    max-width: 68ch;
    font-size: 0.98rem;
    line-height: 1.5;
}

.hero-summary {
    margin-top: 0.7rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.hero-kpi {
    display: grid;
    align-content: center;
    gap: 0.08rem;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(145, 189, 221, 0.42);
    background: var(--surface-2);
    padding: 0.42rem 0.72rem;
}

.hero-kpi span {
    font-family: var(--font-mono);
    font-size: 0.69rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a9c1d6;
}

.hero-kpi strong {
    font-size: 0.88rem;
    color: #e4f1fc;
}

.hero-primary-cta {
    min-height: 44px;
    padding-inline: 0.96rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.live-datetime {
    margin: 0.72rem 0 0;
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    border-radius: 999px;
    padding: 0.34rem 0.64rem;
    border: 1px solid rgba(136, 198, 241, 0.46);
    background: rgba(13, 43, 67, 0.62);
    color: #d7eeff;
}

.live-datetime::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 8px;
    background: radial-gradient(circle at 35% 35%, #f8fdff 0%, #7ad7ff 62%, #2ca8ff 100%);
    box-shadow: 0 0 0 3px rgba(71, 180, 242, 0.18);
}

body.ums-theme .live-datetime {
    border-color: rgba(116, 186, 235, 0.45);
    background: rgba(216, 236, 251, 0.72);
    color: #1f4f76;
}

body.ums-theme .live-datetime::before {
    background: radial-gradient(circle at 35% 35%, #fdfdff 0%, #5ec0ff 58%, #2a91dd 100%);
    box-shadow: 0 0 0 3px rgba(72, 151, 219, 0.2);
}

.chip-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.account-menu {
    position: relative;
}

.topbar-actions {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.theme-toggle-btn {
    border-radius: 999px;
    padding: 0.45rem 0.78rem;
    font-size: 0.77rem;
    line-height: 1;
    white-space: nowrap;
}

.account-trigger {
    border: 1px solid rgba(166, 214, 251, 0.44);
    background: rgba(45, 96, 139, 0.32);
    color: #e7f3ff;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: border-color var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}

.account-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(8, 27, 46, 0.35);
}

.account-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.account-initial {
    font-weight: 800;
    font-size: 0.95rem;
}

.account-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: min(320px, 88vw);
    border-radius: 14px;
    border: 1px solid rgba(171, 218, 252, 0.38);
    background: rgba(15, 45, 72, 0.94);
    box-shadow: 0 18px 45px rgba(3, 14, 24, 0.38);
    padding: 0.6rem;
    display: grid;
    gap: 0.44rem;
    z-index: 22;
    max-height: min(76vh, calc(100dvh - 5.8rem));
    overflow: auto;
    animation: micro-pop 0.22s var(--motion-ease);
}

.account-dropdown-head {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 0.62rem;
    align-items: center;
    border-bottom: 1px solid rgba(160, 206, 242, 0.24);
    padding-bottom: 0.55rem;
}

.account-lines {
    min-width: 0;
    display: grid;
    gap: 0.14rem;
}

.account-lines strong {
    font-size: 0.84rem;
    color: #e7f4ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-lines small {
    font-size: 0.76rem;
    color: #a8c7e2;
}

.dropdown-item {
    border: 1px solid rgba(161, 209, 245, 0.3);
    background: rgba(36, 84, 124, 0.35);
    color: #e7f4ff;
    border-radius: 10px;
    text-align: left;
    padding: 0.52rem 0.66rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: background-color var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}

.dropdown-item:hover {
    transform: translateY(-1px);
    background: rgba(45, 102, 149, 0.45);
    border-color: rgba(176, 220, 250, 0.44);
}

.chip {
    display: inline-block;
    border: 1px solid rgba(180, 222, 255, 0.42);
    color: #d4ebff;
    background: rgba(58, 120, 168, 0.22);
    border-radius: 999px;
    padding: 0.42rem 0.76rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.chip-live {
    border-color: rgba(126, 214, 255, 0.62);
    background: rgba(30, 98, 144, 0.45);
}

.btn-ghost {
    background: rgba(123, 173, 209, 0.14);
    color: #d5edff;
}

.control-grid {
    padding: 0.86rem;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: 1.1fr 1.1fr 1fr 1fr;
    align-items: end;
}

.btn {
    border: 1px solid rgba(138, 186, 221, 0.44);
    background: var(--surface-2);
    color: #e9f6ff;
    border-radius: 12px;
    padding: 0.72rem 0.9rem;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform var(--motion-fast) var(--motion-ease), background-color var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}

.btn:focus-visible {
    outline: 2px solid rgba(84, 178, 248, 0.78);
    outline-offset: 1px;
}

.btn:hover {
    transform: translateY(-1px);
    background: rgba(33, 79, 116, 0.78);
    border-color: rgba(180, 219, 246, 0.62);
    box-shadow: var(--elevation-1);
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.56;
    transform: none;
    box-shadow: none;
}

.micro-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.46) 0%, rgba(255, 255, 255, 0.08) 55%, rgba(255, 255, 255, 0) 100%);
    transform: translate(-50%, -50%) scale(0);
    animation: ripple-pop 0.46s ease-out forwards;
}

@keyframes ripple-pop {
    to {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

.btn-primary {
    background: linear-gradient(120deg, #1f75ff, #3ea3ff);
    color: #f5fbff;
    border-color: rgba(134, 194, 255, 0.92);
    box-shadow: 0 8px 18px rgba(18, 80, 142, 0.34);
}

.btn-secondary {
    background: rgba(14, 36, 54, 0.66);
    color: #dceaf8;
    border-color: rgba(124, 173, 208, 0.58);
}

.btn-secondary:hover {
    background: rgba(18, 45, 67, 0.84);
    border-color: rgba(152, 199, 233, 0.86);
}

.field {
    display: grid;
    gap: 0.4rem;
    font-size: 0.86rem;
    color: #b9cee1;
}

input,
select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(177, 219, 255, 0.44);
    padding: 0.7rem 0.72rem;
    color: #ddf2ff;
    font: inherit;
    background: rgba(22, 52, 76, 0.72);
}

input[readonly] {
    cursor: text;
    opacity: 0.96;
}

input:focus,
select:focus {
    outline: 2px solid rgba(81, 180, 255, 0.55);
    outline-offset: 1px;
}

.metric-grid {
    display: grid;
    gap: 0.78rem;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
}

.metric {
    padding: 0.9rem;
    border-radius: var(--radius-md);
    box-shadow: var(--elevation-1);
}

.control-grid:hover,
.metric:hover,
.viz-card:hover,
.ops-card:hover,
.log-card:hover {
    border-color: rgba(178, 225, 255, 0.46);
    box-shadow: 0 22px 42px rgba(8, 24, 38, 0.32);
}

.metric h2 {
    margin: 0;
    font-size: 0.9rem;
    color: #a9c8e6;
    font-weight: 700;
}

.metric-value {
    margin: 0.5rem 0 0;
    font-size: 2rem;
    font-family: var(--font-mono);
    text-shadow: 0 0 18px rgba(102, 188, 255, 0.45);
}

.viz-grid {
    display: grid;
    gap: 0.82rem;
    grid-template-columns: 1.12fr 1.4fr 1.2fr;
}

#food-section .viz-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.viz-card,
.ops-card,
.log-card {
    padding: 0.9rem;
    border-radius: var(--radius-md);
    box-shadow: var(--elevation-1);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.6rem;
}

.panel-head h3 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.panel-head small {
    color: var(--muted);
    font-size: 0.78rem;
}

.donut-wrap {
    margin-top: 0.7rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: center;
}

.donut {
    width: 156px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(var(--good) 0% 0%, rgba(140, 181, 218, 0.18) 0% 100%);
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.4), 0 0 24px rgba(67, 208, 255, 0.23);
}

.donut-core {
    width: 64%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(7, 24, 40, 0.86);
    border: 1px solid rgba(153, 212, 255, 0.35);
    display: grid;
    place-items: center;
    text-align: center;
}

.donut-core span {
    font-size: 1.06rem;
    font-family: var(--font-mono);
    font-weight: 700;
}

.donut-core small {
    color: #9ab7d0;
    font-size: 0.7rem;
}

.legend {
    display: grid;
    gap: 0.4rem;
}

.legend-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.44rem;
    font-size: 0.86rem;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.dot.good {
    background: var(--good);
}

.dot.warn {
    background: var(--warn);
}

.dot.neutral {
    background: var(--neutral);
}

.bar-chart {
    margin-top: 0.78rem;
    min-height: 210px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    align-items: end;
    gap: 0.6rem;
}

.bar-col {
    display: grid;
    gap: 0.35rem;
    justify-items: center;
}

.bar-wrap {
    width: 100%;
    min-height: 160px;
    display: flex;
    align-items: flex-end;
}

.bar {
    width: 100%;
    height: calc(var(--h, 0) * 1%);
    border-radius: 14px 14px 8px 8px;
    background: linear-gradient(180deg, rgba(74, 196, 255, 0.92), rgba(44, 101, 161, 0.9));
    border: 1px solid rgba(146, 217, 255, 0.66);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 8px 18px rgba(22, 99, 170, 0.33);
    transform: translateZ(14px);
    transition: height 0.42s ease;
}

.bar.warn {
    background: linear-gradient(180deg, rgba(255, 174, 127, 0.95), rgba(183, 85, 50, 0.9));
    border-color: rgba(255, 207, 179, 0.82);
}

.bar-label {
    color: #b6d3ec;
    text-align: center;
    font-size: 0.72rem;
}

.bar-value {
    font-size: 0.74rem;
    font-family: var(--font-mono);
}

.bar-delta {
    font-size: 0.68rem;
    font-weight: 800;
    color: #8fd7ff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.bar-col.delta-up .bar-delta {
    color: #95efba;
}

.bar-col.delta-down .bar-delta {
    color: #ffb4a7;
}

.bar-activity {
    display: none;
}

.hbar-chart {
    margin-top: 0.8rem;
    display: grid;
    gap: 0.5rem;
}

.hbar-row {
    display: grid;
    gap: 0.3rem;
}

.hbar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.76rem;
    color: #a9c8e5;
}

.hbar-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(150, 191, 226, 0.2);
    overflow: hidden;
    border: 1px solid rgba(171, 212, 245, 0.24);
}

.hbar-fill {
    height: 100%;
    width: calc(var(--w, 0) * 1%);
    border-radius: inherit;
    background: linear-gradient(90deg, #63d8ff, #2fa3ee);
    box-shadow: 0 0 12px rgba(87, 194, 255, 0.48);
    transition: width 0.45s ease;
}

.ops-grid {
    display: grid;
    gap: 0.82rem;
    grid-template-columns: 1fr 1.2fr;
}

.role-section {
    display: grid;
    gap: 0.85rem;
}

.module-panel {
    animation: micro-pop 180ms var(--motion-ease);
}

#executive-section {
    gap: 0.9rem;
    --adm-heading: #edf6ff;
    --adm-text: #cfe2f5;
    --adm-muted: #9eb7cf;
    --adm-border: rgba(120, 169, 205, 0.54);
    --adm-border-strong: rgba(151, 208, 245, 0.72);
    --adm-chip-bg: rgba(31, 70, 103, 0.52);
    --adm-chip-text: #d7ebff;
    --adm-surface-hero: linear-gradient(156deg, rgba(23, 58, 86, 0.9), rgba(14, 40, 61, 0.9));
    --adm-surface-panel: linear-gradient(160deg, rgba(18, 50, 74, 0.84), rgba(10, 33, 52, 0.8));
    --adm-surface-elevated: linear-gradient(160deg, rgba(21, 56, 83, 0.9), rgba(12, 37, 58, 0.88));
    --adm-top-glow: rgba(246, 170, 119, 0.18);
    --adm-card-shadow: 0 14px 28px rgba(4, 14, 24, 0.26);
    --adm-telemetry-attendance: #72e6b2;
    --adm-telemetry-capacity: #7ac9ff;
    --adm-telemetry-demand: #ffbf8e;
    --adm-track-bg: rgba(17, 54, 83, 0.5);
    --adm-track-border: rgba(136, 194, 235, 0.38);
}

body.ums-theme #executive-section {
    --adm-heading: #17344d;
    --adm-text: #3c5a74;
    --adm-muted: #5f7d97;
    --adm-border: #b8cee2;
    --adm-border-strong: #95b9d6;
    --adm-chip-bg: #edf4fb;
    --adm-chip-text: #315472;
    --adm-surface-hero: linear-gradient(160deg, #ffffff 0%, #f4f9ff 56%, #fbf6ef 100%);
    --adm-surface-panel: linear-gradient(162deg, #ffffff 0%, #f5f9ff 62%, #fefaf5 100%);
    --adm-surface-elevated: linear-gradient(165deg, #fafdff 0%, #edf6ff 60%, #f8fbff 100%);
    --adm-top-glow: rgba(242, 164, 92, 0.2);
    --adm-card-shadow: 0 8px 20px rgba(67, 97, 128, 0.12);
    --adm-telemetry-attendance: #2cbf77;
    --adm-telemetry-capacity: #2f8fdf;
    --adm-telemetry-demand: #d9803e;
    --adm-track-bg: #eaf2fb;
    --adm-track-border: #c2d6e7;
}

#executive-section .admin-hero-card,
#executive-section .admin-kpi-card,
#executive-section .viz-card,
#executive-section .ops-card {
    border-width: 1.5px;
    border-color: var(--adm-border);
    box-shadow: var(--adm-card-shadow);
}

#executive-section .panel-head h3 {
    color: var(--adm-heading);
    letter-spacing: 0.012em;
}

#executive-section .panel-head small {
    color: var(--adm-muted);
}

#executive-section .admin-hero-card {
    background:
        radial-gradient(circle at 92% 6%, var(--adm-top-glow), transparent 42%),
        var(--adm-surface-hero);
    border-color: var(--adm-border-strong);
}

#executive-section .admin-hero-head {
    align-items: center;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--adm-border);
}

#executive-section .admin-live-chip {
    white-space: nowrap;
    border-color: var(--adm-border);
    background: var(--adm-chip-bg);
    color: var(--adm-chip-text);
    box-shadow: none;
}

#executive-section .admin-live-chip.is-fresh {
    border-color: rgba(107, 209, 165, 0.62);
    color: #2a6b54;
    background: linear-gradient(180deg, rgba(232, 252, 243, 0.92), rgba(219, 245, 234, 0.92));
}

#executive-section .admin-live-chip.is-stale {
    border-color: rgba(240, 163, 122, 0.72);
    color: #8d4926;
    background: linear-gradient(180deg, rgba(255, 241, 229, 0.95), rgba(255, 232, 213, 0.95));
}

#executive-section .admin-toolbar {
    margin-top: 0.72rem;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.8fr) auto;
    gap: 0.58rem;
    align-items: end;
}

#executive-section .admin-toolbar-field span {
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--adm-text);
}

#executive-section .admin-refresh-btn {
    min-height: 42px;
    min-width: 190px;
    border-color: var(--adm-border-strong);
}

#executive-section .admin-kpi-card {
    background:
        radial-gradient(circle at 88% 10%, rgba(99, 202, 255, 0.1), transparent 46%),
        var(--adm-surface-panel);
    border-color: var(--adm-border);
}

#executive-section .admin-metric-grid {
    margin-top: 0.68rem;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 0.7rem;
}

#executive-section .admin-metric-grid .metric {
    padding: 0.86rem 0.82rem;
    border: 1.4px solid var(--adm-border);
    background: var(--adm-surface-elevated);
}

#executive-section .admin-metric-grid .metric h2 {
    color: var(--adm-text);
}

#executive-section .admin-metric-grid .metric-value {
    font-size: clamp(1.5rem, 2.1vw, 1.95rem);
    color: var(--adm-heading);
    text-shadow: none;
}

#executive-section .admin-cluster-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.08rem 0.2rem 0.02rem;
}

#executive-section .admin-cluster-head h4 {
    margin: 0;
    font-size: 0.96rem;
    letter-spacing: 0.01em;
    color: var(--adm-heading);
}

#executive-section .admin-cluster-head small {
    color: var(--adm-muted);
    font-size: 0.76rem;
}

#executive-section .admin-viz-grid {
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 0.74rem;
    align-items: start;
}

#executive-section .admin-viz-grid .viz-card {
    min-height: 258px;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 90% 8%, rgba(255, 167, 117, 0.1), transparent 48%),
        var(--adm-surface-panel);
    border-color: var(--adm-border);
}

#executive-section .admin-viz-grid .viz-card .panel-head {
    flex-shrink: 0;
}

#executive-section #admin-attendance-card .admin-attendance-wrap {
    margin-top: 0.62rem;
    align-items: start;
    gap: 0.78rem;
}

#executive-section #admin-attendance-card .donut {
    width: 168px;
    box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.42), 0 0 26px rgba(67, 208, 255, 0.26);
}

#executive-section #admin-attendance-card .legend {
    gap: 0.46rem;
    align-content: start;
}

#executive-section .admin-attendance-pulse {
    margin-top: 0.62rem;
    padding-top: 0.58rem;
    border-top: 1px solid var(--adm-border);
    display: grid;
    gap: 0.42rem;
    align-content: start;
}

#executive-section .admin-pulse-row {
    border-radius: 11px;
    border: 1.2px solid var(--adm-border);
    background: var(--adm-surface-elevated);
    padding: 0.44rem 0.56rem;
    display: grid;
    gap: 0.3rem;
}

#executive-section .admin-pulse-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

#executive-section .admin-pulse-meta span {
    font-size: 0.74rem;
    color: var(--adm-text);
}

#executive-section .admin-pulse-meta strong {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--adm-heading);
}

#executive-section .admin-pulse-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    border: 1px solid var(--adm-track-border);
    background: var(--adm-track-bg);
    overflow: hidden;
}

#executive-section .admin-pulse-fill {
    display: block;
    width: calc(var(--w, 0) * 1%);
    height: 100%;
    border-radius: inherit;
    transition: width 0.36s ease;
    background: linear-gradient(90deg, rgba(120, 214, 255, 0.92), rgba(69, 155, 226, 0.92));
}

#executive-section .admin-pulse-fill[data-state="good"] {
    background: linear-gradient(90deg, #8df0be, #41cb89);
}

#executive-section .admin-pulse-fill[data-state="mid"] {
    background: linear-gradient(90deg, #9ad9ff, #4fa9ef);
}

#executive-section .admin-pulse-fill[data-state="warn"] {
    background: linear-gradient(90deg, #ffc89c, #e98b4c);
}

#executive-section .admin-attendance-note {
    margin: 0.05rem 0 0;
    font-size: 0.73rem;
    color: var(--adm-muted);
}

#executive-section #admin-telemetry-card,
#executive-section #admin-health-card {
    position: relative;
    overflow: hidden;
}

#executive-section #admin-telemetry-card::before,
#executive-section #admin-health-card::before {
    content: "";
    position: absolute;
    top: 0.55rem;
    left: 0.72rem;
    right: 0.72rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--adm-telemetry-capacity), var(--adm-telemetry-demand));
    opacity: 0.7;
    pointer-events: none;
}

#executive-section .telemetry-chart {
    margin-top: 0;
    border-radius: 14px;
    border: 1.3px solid var(--adm-border);
    background:
        radial-gradient(circle at 85% 14%, rgba(255, 169, 118, 0.1), transparent 44%),
        var(--adm-surface-elevated);
    min-height: 216px;
    height: 100%;
    overflow: hidden;
}

#executive-section .admin-telemetry-layout {
    margin-top: 0.62rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(138px, 0.45fr);
    gap: 0.54rem;
    align-items: stretch;
    flex: 1;
    min-height: 228px;
}

#executive-section .admin-telemetry-stats {
    display: grid;
    gap: 0.4rem;
    grid-template-rows: repeat(4, minmax(0, 1fr));
}

#executive-section .admin-telemetry-stat {
    border-radius: 11px;
    border: 1.2px solid var(--adm-border);
    background: var(--adm-surface-elevated);
    padding: 0.42rem 0.5rem;
    display: grid;
    gap: 0.12rem;
    align-content: center;
}

#executive-section .admin-telemetry-stat span {
    font-size: 0.7rem;
    color: var(--adm-text);
    letter-spacing: 0.01em;
}

#executive-section .admin-telemetry-stat strong {
    font-size: 1.05rem;
    line-height: 1;
    color: var(--adm-heading);
    font-family: var(--font-mono);
}

#executive-section .admin-telemetry-stat small {
    font-size: 0.68rem;
    color: var(--adm-muted);
}

#executive-section .admin-telemetry-stat small[data-trend="up"] {
    color: #8cf2bd;
}

#executive-section .admin-telemetry-stat small[data-trend="down"] {
    color: #ffc39b;
}

#executive-section .admin-telemetry-stat small[data-trend="flat"] {
    color: #bdd6eb;
}

#executive-section .admin-telemetry-stat[data-tone="attendance"] {
    border-color: color-mix(in srgb, var(--adm-telemetry-attendance) 56%, var(--adm-border));
}

#executive-section .admin-telemetry-stat[data-tone="capacity"] {
    border-color: color-mix(in srgb, var(--adm-telemetry-capacity) 56%, var(--adm-border));
}

#executive-section .admin-telemetry-stat[data-tone="demand"] {
    border-color: color-mix(in srgb, var(--adm-telemetry-demand) 56%, var(--adm-border));
}

#executive-section .admin-telemetry-stat[data-tone="stability"] {
    border-color: color-mix(in srgb, #c1d7eb 58%, var(--adm-border));
}

#executive-section .telemetry-svg {
    width: 100%;
    height: 216px;
    display: block;
}

#executive-section .telemetry-chart .list-item {
    margin: 0.44rem;
    min-height: calc(100% - 0.88rem);
    display: grid;
    place-items: center;
    text-align: center;
}

#executive-section .telemetry-guides line {
    stroke: rgba(149, 205, 240, 0.24);
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

#executive-section .telemetry-line {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.22));
}

#executive-section .telemetry-line-attendance {
    stroke: var(--adm-telemetry-attendance);
}

#executive-section .telemetry-line-capacity {
    stroke: var(--adm-telemetry-capacity);
}

#executive-section .telemetry-line-demand {
    stroke: var(--adm-telemetry-demand);
}

#executive-section .telemetry-dot {
    stroke-width: 1.2;
}

#executive-section .telemetry-dot-attendance {
    fill: #9af2c8;
    stroke: rgba(24, 98, 66, 0.95);
}

#executive-section .telemetry-dot-capacity {
    fill: #99dbff;
    stroke: rgba(24, 76, 121, 0.95);
}

#executive-section .telemetry-dot-demand {
    fill: #ffd0a3;
    stroke: rgba(117, 66, 22, 0.95);
}

#executive-section .telemetry-legend {
    margin-top: 0.56rem;
    display: flex;
    gap: 0.42rem;
    flex-wrap: wrap;
}

#executive-section .telemetry-key {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.12rem 0.52rem;
    border-radius: 999px;
    border: 1.2px solid var(--adm-border);
    background: var(--adm-chip-bg);
    color: var(--adm-chip-text);
    font-size: 0.72rem;
    font-weight: 700;
}

#executive-section .telemetry-key-attendance {
    border-color: rgba(129, 231, 183, 0.64);
    color: #c7f7df;
}

#executive-section .telemetry-key-capacity {
    border-color: rgba(129, 201, 248, 0.66);
    color: #d2ecff;
}

#executive-section .telemetry-key-demand {
    border-color: rgba(250, 190, 136, 0.66);
    color: #ffe3c7;
}

#executive-section .admin-health-grid {
    margin-top: 0.68rem;
    display: grid;
    gap: 0.5rem;
}

#executive-section .admin-health-row {
    border-radius: 12px;
    border: 1.2px solid var(--adm-border);
    background: var(--adm-surface-elevated);
    padding: 0.5rem 0.58rem;
    display: grid;
    gap: 0.34rem;
}

#executive-section .admin-health-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.55rem;
    font-size: 0.76rem;
    color: var(--adm-text);
}

#executive-section .admin-health-meta strong {
    color: var(--adm-heading);
    font-size: 0.86rem;
    font-weight: 800;
}

#executive-section .admin-health-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    border: 1px solid var(--adm-track-border);
    background: var(--adm-track-bg);
    overflow: hidden;
}

#executive-section .admin-health-fill {
    display: block;
    width: calc(var(--w, 0) * 1%);
    height: 100%;
    border-radius: inherit;
    transition: width 0.36s ease;
    background: linear-gradient(90deg, rgba(120, 214, 255, 0.92), rgba(69, 155, 226, 0.92));
}

#executive-section .admin-health-fill[data-state="good"] {
    background: linear-gradient(90deg, #8df0be, #41cb89);
}

#executive-section .admin-health-fill[data-state="mid"] {
    background: linear-gradient(90deg, #9ad9ff, #4fa9ef);
}

#executive-section .admin-health-fill[data-state="warn"] {
    background: linear-gradient(90deg, #ffc89c, #e98b4c);
}

#executive-section .admin-viz-grid #workload-card .list-wrap,
#executive-section .admin-viz-grid #capacity-card .hbar-chart {
    max-height: 244px;
}

#executive-section #demand-chart.bar-chart {
    margin-top: 0.62rem;
    min-height: 158px;
    max-height: 266px;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 0.48rem;
    align-content: start;
    overflow-y: auto;
    padding-right: 0.22rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(116, 170, 210, 0.52) rgba(18, 42, 64, 0.16);
}

#executive-section #demand-chart.bar-chart::-webkit-scrollbar {
    width: 8px;
}

#executive-section #demand-chart.bar-chart::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(18, 42, 64, 0.16);
}

#executive-section #demand-chart.bar-chart::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(115, 187, 240, 0.8), rgba(92, 141, 188, 0.72));
}

#executive-section #demand-chart .bar-wrap {
    min-height: 92px;
}

#executive-section #demand-chart .bar-label {
    font-size: 0.69rem;
    line-height: 1.2;
}

#executive-section #demand-chart .bar-value {
    font-size: 0.72rem;
}

#executive-section .hbar-meta,
#executive-section .legend-row,
#executive-section .bar-label {
    color: var(--adm-text);
}

#executive-section .bar-value,
#executive-section .legend-row strong {
    color: var(--adm-heading);
}

#executive-section .bar {
    border-color: rgba(146, 214, 255, 0.58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 18px rgba(22, 99, 170, 0.26);
}

#executive-section .donut-core {
    background: rgba(8, 26, 40, 0.9);
    border: 1px solid var(--adm-border-strong);
}

#executive-section .donut-core span {
    color: var(--adm-heading);
}

#executive-section .donut-core small {
    color: var(--adm-muted);
}

#executive-section .admin-ops-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-auto-flow: dense;
    gap: 0.74rem;
}

#executive-section .admin-insights-grid {
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
    gap: 0.74rem;
}

#executive-section .admin-ops-grid .ops-card {
    min-height: 250px;
    background:
        radial-gradient(circle at 86% 8%, rgba(100, 197, 255, 0.1), transparent 45%),
        var(--adm-surface-panel);
    border-color: var(--adm-border);
}

#executive-section .admin-ops-grid .panel-head {
    padding-bottom: 0.28rem;
    border-bottom: 1px solid var(--adm-border);
}

#executive-section .list-item {
    border-color: var(--adm-border);
    background: rgba(31, 69, 99, 0.32);
    color: var(--adm-text);
}

#executive-section .admin-issue-item {
    display: grid;
    justify-content: initial;
    align-items: start;
    gap: 0.16rem;
}

#executive-section .admin-issue-message {
    font-weight: 700;
    color: var(--adm-heading);
    line-height: 1.26;
}

#executive-section .admin-issue-meta {
    font-size: 0.74rem;
    color: var(--adm-muted);
}

#executive-section .admin-insight-kpi-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

#executive-section .admin-insight-kpi {
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    padding: 0.52rem 0.62rem;
    background: color-mix(in srgb, var(--adm-surface-panel) 78%, rgba(140, 192, 238, 0.16));
    display: grid;
    gap: 0.12rem;
}

#executive-section .admin-insight-kpi span {
    color: var(--adm-muted);
    font-size: 0.74rem;
}

#executive-section .admin-insight-kpi strong {
    color: var(--adm-heading);
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.05;
}

#executive-section .admin-insight-kpi small {
    color: var(--adm-text-soft);
    font-size: 0.72rem;
}

#executive-section .admin-insight-block {
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    padding: 0.52rem 0.62rem;
    margin-bottom: 0.5rem;
    background: color-mix(in srgb, var(--adm-surface-panel) 84%, rgba(117, 172, 222, 0.12));
}

#executive-section .admin-insight-block h4 {
    margin: 0 0 0.42rem;
    font-size: 0.86rem;
    color: var(--adm-heading);
}

#executive-section .admin-insight-note-list {
    display: grid;
    gap: 0.34rem;
}

#executive-section .admin-insight-note-list .list-item {
    min-height: auto;
    padding: 0.44rem 0.52rem;
}

#executive-section .admin-insight-bar-row {
    margin-bottom: 0.36rem;
}

#executive-section .admin-insight-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.44rem;
    margin-bottom: 0.16rem;
    font-size: 0.77rem;
}

#executive-section .admin-insight-bar-head span {
    color: var(--adm-text-soft);
    font-weight: 600;
}

#executive-section .admin-insight-bar-head strong {
    color: var(--adm-heading);
    font-weight: 800;
}

#executive-section .admin-insight-bar-track {
    position: relative;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--adm-border) 70%, transparent);
    background: color-mix(in srgb, var(--adm-surface-panel) 76%, rgba(78, 125, 170, 0.2));
}

#executive-section .admin-insight-bar-fill {
    --w: 0;
    display: block;
    width: calc(var(--w, 0) * 1%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(54, 166, 250, 0.98), rgba(37, 222, 180, 0.95));
    transition: width 240ms ease;
}

#executive-section .list-item.warn {
    border-color: rgba(244, 176, 147, 0.62);
    background: rgba(146, 75, 53, 0.24);
}

#executive-section .list-item.good {
    border-color: rgba(126, 225, 180, 0.64);
    background: rgba(26, 105, 74, 0.24);
}

#executive-section .ai-actions .btn {
    border-color: var(--adm-border-strong);
    background: var(--adm-chip-bg);
    color: var(--adm-heading);
}

#executive-section .ai-actions .btn:hover {
    border-color: var(--adm-border-strong);
    filter: saturate(1.06);
}

#executive-section #ai-output {
    min-height: 170px;
    border: 1px solid var(--adm-border);
    background: var(--adm-surface-elevated);
    color: var(--adm-text);
}

body.ums-theme #executive-section .list-item {
    background: rgba(241, 248, 255, 0.94);
}

body.ums-theme #executive-section .admin-insight-kpi,
body.ums-theme #executive-section .admin-insight-block {
    background: color-mix(in srgb, #ffffff 92%, rgba(53, 133, 212, 0.08));
}

body.ums-theme #executive-section .list-item.warn {
    background: rgba(255, 236, 231, 0.92);
}

body.ums-theme #executive-section .list-item.good {
    background: rgba(231, 249, 241, 0.94);
}

body.ums-theme #executive-section .bar {
    border-color: rgba(134, 190, 233, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 8px 16px rgba(56, 115, 163, 0.2);
}

body.ums-theme #executive-section .donut-core {
    background: #ffffff;
    border-color: #b6cde0;
}

.list-wrap {
    margin-top: 0.7rem;
    display: grid;
    gap: 0.46rem;
    max-height: 280px;
    overflow: auto;
    padding-right: 0.2rem;
}

.list-wrap:empty {
    position: relative;
    min-height: 96px;
    border-radius: 12px;
    border: 1px dashed rgba(148, 198, 233, 0.44);
    background: rgba(19, 51, 76, 0.38);
    padding: 0.68rem;
}

.list-wrap:empty::before {
    content: "Waiting for records and live events...";
    font-size: 0.82rem;
    color: #bed8ee;
}

.list-wrap:empty::after {
    content: "";
    display: block;
    margin-top: 0.56rem;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(68, 120, 161, 0.18) 0%, rgba(124, 174, 214, 0.34) 48%, rgba(68, 120, 161, 0.18) 100%);
    background-size: 240% 100%;
    animation: skeleton-shimmer 1.4s var(--motion-ease) infinite;
}

#food-peak-list.list-wrap {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.list-item {
    border-radius: 12px;
    border: 1px solid rgba(177, 219, 250, 0.28);
    background: rgba(44, 88, 124, 0.25);
    padding: 0.56rem 0.6rem;
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.84rem;
}

.list-item.warn {
    border-color: rgba(255, 169, 132, 0.45);
    background: rgba(160, 86, 58, 0.24);
}

.list-item.good {
    border-color: rgba(105, 231, 177, 0.5);
    background: rgba(28, 117, 82, 0.24);
}

.empty-state-row {
    display: grid;
    gap: 0.52rem;
    justify-items: flex-start;
    align-items: flex-start;
    border-style: dashed;
    padding: 0.82rem 0.88rem;
    background: rgba(18, 53, 79, 0.38);
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0.12rem 0.46rem;
    border-radius: 999px;
    border: var(--card-border-w) solid rgba(147, 209, 245, 0.48);
    background: rgba(40, 94, 132, 0.3);
    color: #dff2ff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.empty-state-row strong {
    font-size: 0.86rem;
    color: #e6f4ff;
}

.empty-state-row small {
    color: #bdd5ea;
    font-size: 0.76rem;
    line-height: 1.35;
}

.empty-state-row .btn {
    margin-top: 0.08rem;
}

.student-aggregate-panel {
    margin-top: 0.7rem;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.aggregate-chip {
    border-radius: 12px;
    border: 1px solid rgba(168, 214, 246, 0.34);
    background: rgba(34, 84, 125, 0.36);
    padding: 0.55rem 0.64rem;
    display: grid;
    gap: 0.15rem;
}

.aggregate-chip span {
    font-size: 0.78rem;
    color: #b5d4eb;
}

.aggregate-chip strong {
    font-size: 1.2rem;
    color: #eef9ff;
    letter-spacing: 0.01em;
}

.saarthi-header-section,
.saarthi-conversation-section,
.saarthi-input-section {
    border-radius: 20px;
    border: 1px solid rgba(189, 210, 231, 0.82);
    background: linear-gradient(164deg, rgba(255, 255, 255, 0.9), rgba(244, 249, 255, 0.94));
    box-shadow: 0 12px 26px rgba(77, 104, 136, 0.1);
    padding: clamp(0.8rem, 1.8vw, 1.15rem);
}

#saarthi-section {
    width: 100%;
}

#student-saarthi-card {
    font-family: "Inter", "Manrope", "Segoe UI", Arial, sans-serif;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    display: grid;
    gap: 0.95rem;
    border-radius: 22px;
    border: 1px solid rgba(179, 203, 227, 0.8);
    background:
        radial-gradient(circle at 7% 10%, rgba(198, 229, 255, 0.35), transparent 42%),
        radial-gradient(circle at 88% 12%, rgba(224, 208, 255, 0.32), transparent 44%),
        linear-gradient(158deg, #fdfdff, #f2f8ff 52%, #eef6ff);
    box-shadow: 0 22px 50px rgba(74, 104, 136, 0.16);
    animation: saarthi-card-float 10.5s ease-in-out infinite;
}

#student-saarthi-card .helper-text {
    line-height: 1.48;
    color: #61758b;
}

.saarthi-header-section {
    display: grid;
    gap: 0.8rem;
}

.saarthi-affirmation-band {
    margin: 0;
    border-radius: 14px;
    border: 1px solid rgba(201, 217, 239, 0.96);
    background: linear-gradient(110deg, #f8f2ff, #eef5ff 44%, #edf9ff);
    overflow: hidden;
    padding: 0.5rem 0;
}

.saarthi-affirmation-track {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    width: max-content;
    padding: 0 0.72rem;
    animation: saarthi-affirmation-scroll 30s linear infinite;
    will-change: transform;
}

.saarthi-affirmation-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid rgba(207, 221, 240, 0.94);
    background: linear-gradient(145deg, #ffffff, #f3f7fd);
    color: #4d637e;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.32rem 0.66rem;
    box-shadow: 0 8px 16px rgba(81, 106, 138, 0.1);
}

.saarthi-welcome-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.8rem;
    border-radius: 16px;
    border: 1px solid rgba(195, 214, 234, 0.9);
    background: linear-gradient(150deg, rgba(252, 255, 255, 0.96), rgba(245, 251, 255, 0.95));
    padding: 0.8rem 0.88rem;
    box-shadow: 0 10px 18px rgba(80, 107, 138, 0.1);
}

.saarthi-welcome-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle at 40% 35%, #e5f6ff, #d8ebff 56%, #c4deff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 8px 16px rgba(92, 119, 155, 0.2);
    overflow: hidden;
}

.saarthi-welcome-orb,
.saarthi-welcome-ring,
.saarthi-welcome-spark {
    position: absolute;
    display: block;
}

.saarthi-welcome-orb {
    inset: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff, #dff0ff 72%);
    animation: saarthi-orb-breathe 3.6s ease-in-out infinite;
}

.saarthi-welcome-ring {
    inset: 8px;
    border-radius: 50%;
    border: 1px solid rgba(170, 203, 234, 0.8);
    animation: saarthi-orb-breathe 4.2s ease-in-out infinite reverse;
}

.saarthi-welcome-spark {
    width: 10px;
    height: 10px;
    top: 9px;
    right: 10px;
    border-radius: 3px;
    background: linear-gradient(145deg, #b8f1e6, #8fd4f1);
    transform: rotate(45deg);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.66);
    animation: saarthi-spark-float 2.8s ease-in-out infinite;
}

.saarthi-welcome-copy h3 {
    margin: 0;
    font-size: clamp(1.08rem, 2vw, 1.32rem);
    line-height: 1.2;
    color: #2f4054;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.saarthi-welcome-copy p {
    margin: 0.28rem 0 0;
    color: #5d7288;
    font-size: 0.92rem;
    line-height: 1.58;
}

.saarthi-status-line {
    margin: 0;
    font-size: 0.84rem;
}

.saarthi-chip-grid {
    margin-top: 0.1rem;
    display: grid;
    gap: 0.58rem;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.saarthi-chip {
    border-radius: 14px;
    border: 1px solid rgba(198, 215, 236, 0.92);
    background: linear-gradient(164deg, #ffffff, #f2f8ff);
    padding: 0.62rem 0.72rem;
    display: grid;
    gap: 0.2rem;
    box-shadow: 0 8px 16px rgba(84, 107, 137, 0.1);
}

.saarthi-chip span {
    font-size: 0.73rem;
    color: #5a6f85;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.saarthi-chip strong {
    font-size: 1rem;
    color: #2f4054;
    letter-spacing: 0.01em;
}

.saarthi-conversation-section {
    display: grid;
    gap: 0.62rem;
}

.saarthi-history {
    margin-top: 0;
    border-radius: 18px;
    border: 1px solid rgba(202, 217, 237, 0.94);
    background: linear-gradient(175deg, #fffefc, #f7f5ff 66%, #f2f8ff);
    padding: 0.95rem;
    min-height: min(38vh, 340px);
    max-height: min(56vh, 520px);
    overflow: auto;
    display: grid;
    gap: 0.72rem;
    align-content: start;
}

.saarthi-history.is-empty {
    min-height: clamp(160px, 22vh, 236px);
    max-height: clamp(180px, 24vh, 256px);
    align-content: center;
}

.saarthi-history::-webkit-scrollbar {
    width: 10px;
}

.saarthi-history::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
    background: rgba(151, 172, 201, 0.52);
}

.saarthi-message {
    max-width: min(88%, 560px);
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(203, 216, 234, 0.92);
    background: linear-gradient(160deg, #ffffff, #f6f9ff);
    box-shadow: 0 10px 18px rgba(84, 110, 139, 0.1);
    padding: 0.68rem 0.76rem;
    display: grid;
    gap: 0.28rem;
    animation: saarthi-message-enter 220ms var(--motion-ease);
    transform-style: preserve-3d;
}

.saarthi-message::after {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(58, 90, 126, 0.14);
    filter: blur(8px);
    pointer-events: none;
    opacity: 0.45;
}

.saarthi-message.theirs {
    border-color: rgba(214, 204, 238, 0.96);
    background: linear-gradient(160deg, #fefcff, #f6f1ff);
}

.saarthi-message.mine {
    margin-left: auto;
    border-color: rgba(186, 212, 242, 0.96);
    background: linear-gradient(160deg, #f4faff, #e9f4ff);
}

.saarthi-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    font-size: 0.72rem;
    color: #8492a0;
}

.saarthi-message-sender {
    color: #6d5a96;
    font-size: 0.69rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.saarthi-message.mine .saarthi-message-sender {
    color: #3f6fa3;
}

.saarthi-message-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #33465a;
    white-space: pre-wrap;
    word-break: break-word;
}

.saarthi-typing {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 0.44rem;
    border-radius: 999px;
    border: 1px solid rgba(207, 219, 236, 0.96);
    background: linear-gradient(150deg, #ffffff, #f5f8ff);
    color: #5e738a;
    padding: 0.42rem 0.66rem;
    box-shadow: 0 8px 14px rgba(84, 110, 141, 0.12);
}

.saarthi-typing-label {
    font-size: 0.78rem;
    font-weight: 700;
}

.saarthi-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.saarthi-typing-dots i {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8fa5bf;
    animation: saarthi-typing-dot 1.12s ease-in-out infinite;
}

.saarthi-typing-dots i:nth-child(2) {
    animation-delay: 0.16s;
}

.saarthi-typing-dots i:nth-child(3) {
    animation-delay: 0.32s;
}

.saarthi-empty {
    padding: 1.26rem 0.9rem;
    max-width: min(760px, 100%);
    margin-inline: auto;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.55;
    color: #667b91;
    border-radius: 14px;
    border: 1px dashed rgba(190, 209, 231, 0.88);
    background: rgba(245, 249, 255, 0.88);
}

.saarthi-soft-note {
    margin: 0;
    text-align: center;
    font-size: 0.84rem;
    color: #62778e;
}

.saarthi-input-section {
    display: grid;
    gap: 0.72rem;
}

.saarthi-compose-field {
    margin-top: 0;
    gap: 0.48rem;
}

.saarthi-compose-field > span {
    font-size: 0.82rem;
    color: #4f6379;
    font-weight: 700;
}

.saarthi-compose-field textarea {
    width: 100%;
    min-height: 90px;
    resize: vertical;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2f4357;
    background: #ffffff;
    border: 1px solid rgba(198, 215, 235, 0.96);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    padding: 0.82rem 0.9rem;
}

.saarthi-compose-field textarea:focus {
    outline: 2px solid rgba(120, 171, 231, 0.46);
    outline-offset: 1px;
    border-color: rgba(157, 190, 228, 0.95);
}

.saarthi-compose-field textarea::placeholder {
    color: rgba(133, 155, 178, 0.9);
}

.saarthi-actions {
    margin-top: 0.08rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.74rem;
}

.saarthi-actions .helper-text {
    margin: 0;
    flex: 1 1 280px;
    color: #6d8298;
    font-size: 0.78rem;
}

.saarthi-new-chat-btn {
    min-height: 42px;
    padding: 0 1rem;
    border-radius: 999px;
    border: 1px solid rgba(153, 184, 214, 0.9);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.95), rgba(236, 245, 255, 0.95));
    color: #3f5f80;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease);
}

.saarthi-new-chat-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(118, 162, 205, 0.95);
    box-shadow: 0 8px 16px rgba(76, 114, 153, 0.18);
}

.saarthi-new-chat-btn:active {
    transform: translateY(0);
}

.saarthi-new-chat-btn:focus-visible {
    outline: 2px solid rgba(105, 160, 228, 0.74);
    outline-offset: 2px;
}

.saarthi-new-chat-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
    transform: none;
}

.saarthi-new-chat-btn.is-loading {
    animation: saarthi-send-pulse 1.25s ease-in-out infinite;
}

.saarthi-send-btn {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border: 1px solid rgba(145, 183, 225, 0.96);
    background: linear-gradient(145deg, #8db7ff, #7ad7d8);
    color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 22px rgba(80, 123, 172, 0.28);
    transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), filter var(--motion-fast) var(--motion-ease);
    position: relative;
}

.saarthi-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px rgba(146, 190, 239, 0.2), 0 14px 24px rgba(80, 123, 172, 0.32);
    filter: saturate(1.05);
}

.saarthi-send-btn:active {
    transform: translateY(0);
}

.saarthi-send-btn:focus-visible {
    outline: 2px solid rgba(105, 160, 228, 0.78);
    outline-offset: 2px;
}

.saarthi-send-btn:disabled {
    cursor: not-allowed;
    opacity: 0.56;
    transform: none;
    box-shadow: none;
}

.saarthi-send-btn.is-sending {
    animation: saarthi-send-pulse 1.25s ease-in-out infinite;
}

.saarthi-send-icon {
    width: 21px;
    height: 21px;
    display: block;
}

.saarthi-send-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes saarthi-affirmation-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes saarthi-message-enter {
    0% {
        transform: translateY(5px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes saarthi-typing-dot {
    0%,
    80%,
    100% {
        opacity: 0.4;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-1px);
    }
}

@keyframes saarthi-send-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(115, 177, 233, 0.26), 0 12px 22px rgba(80, 123, 172, 0.28);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(115, 177, 233, 0), 0 14px 24px rgba(80, 123, 172, 0.34);
    }
}

@keyframes saarthi-orb-breathe {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes saarthi-spark-float {
    0%,
    100% {
        transform: rotate(45deg) translateY(0);
    }
    50% {
        transform: rotate(45deg) translateY(-2px);
    }
}

.course-aggregate-item {
    border-radius: 12px;
    border: 1px solid rgba(166, 212, 245, 0.3);
    background: rgba(34, 78, 116, 0.3);
    padding: 0.58rem 0.62rem;
    display: grid;
    gap: 0.22rem;
    transition: border-color var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}

.course-aggregate-item:hover {
    transform: translateY(-1px);
    border-color: rgba(183, 226, 253, 0.68);
    box-shadow: 0 10px 22px rgba(6, 20, 34, 0.26);
}

.course-aggregate-item.course-clickable {
    cursor: pointer;
}

.course-aggregate-item.course-clickable:focus-visible {
    outline: 2px solid rgba(93, 198, 255, 0.95);
    outline-offset: 1px;
    border-color: rgba(123, 212, 255, 0.82);
    box-shadow: 0 0 0 2px rgba(83, 190, 255, 0.24), 0 10px 22px rgba(8, 25, 40, 0.24);
}

.course-aggregate-item h4 {
    margin: 0;
    font-size: 0.88rem;
    color: #edf8ff;
}

.course-aggregate-item p {
    margin: 0;
    font-size: 0.8rem;
    color: #bcd9ef;
}

.course-card-hint {
    margin-top: 0.1rem;
    font-size: 0.72rem;
    color: #a8c9e3;
    font-weight: 700;
}

.course-aggregate-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}

.course-percent-badge {
    border-radius: 999px;
    padding: 0.15rem 0.52rem;
    border: 1px solid rgba(169, 214, 247, 0.44);
    background: rgba(47, 101, 145, 0.34);
    color: #dbf0ff;
    font-size: 0.72rem;
    font-weight: 800;
}

.course-percent-badge.good {
    border-color: rgba(108, 236, 181, 0.5);
    background: rgba(29, 138, 93, 0.32);
    color: #dbffef;
}

.course-percent-badge.mid {
    border-color: rgba(255, 199, 114, 0.55);
    background: rgba(173, 116, 34, 0.32);
    color: #ffe8c4;
}

.course-percent-badge.low {
    border-color: rgba(255, 156, 134, 0.54);
    background: rgba(151, 66, 49, 0.32);
    color: #ffe0d8;
}

.attendance-recovery-panel {
    margin: 0.75rem 0 0.85rem;
    display: grid;
    gap: 0.55rem;
}

.panel-head-compact {
    margin-bottom: 0;
}

.attendance-recovery-list {
    display: grid;
    gap: 0.55rem;
}

.recovery-plan-card {
    border-radius: 14px;
    border: 1px solid rgba(166, 212, 245, 0.3);
    background: rgba(28, 67, 99, 0.4);
    padding: 0.72rem 0.8rem;
    display: grid;
    gap: 0.55rem;
}

.recovery-plan-card.watch {
    border-left: 4px solid rgba(255, 206, 138, 0.78);
}

.recovery-plan-card.high {
    border-left: 4px solid rgba(255, 158, 135, 0.82);
}

.recovery-plan-card.critical {
    border-left: 4px solid rgba(255, 107, 107, 0.9);
    box-shadow: 0 12px 24px rgba(82, 15, 22, 0.18);
}

.recovery-plan-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.recovery-plan-head h4 {
    margin: 0 0 0.16rem;
    font-size: 0.95rem;
    color: #eef8ff;
}

.recovery-plan-head p {
    margin: 0;
    font-size: 0.8rem;
    color: #bcd9ef;
}

.recovery-plan-risk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.22rem 0.62rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid rgba(187, 226, 249, 0.42);
    background: rgba(58, 104, 138, 0.34);
    color: #edf8ff;
    white-space: nowrap;
}

.recovery-plan-risk.watch {
    background: rgba(168, 110, 50, 0.32);
    border-color: rgba(255, 200, 136, 0.58);
    color: #ffe9cd;
}

.recovery-plan-risk.high {
    background: rgba(160, 59, 41, 0.34);
    border-color: rgba(255, 160, 138, 0.6);
    color: #ffe3dc;
}

.recovery-plan-risk.critical {
    background: rgba(169, 39, 48, 0.42);
    border-color: rgba(255, 129, 129, 0.72);
    color: #fff0f0;
}

.recovery-plan-risk.pending {
    background: rgba(168, 110, 50, 0.32);
    border-color: rgba(255, 200, 136, 0.58);
    color: #ffe9cd;
}

.recovery-plan-risk.acknowledged {
    background: rgba(48, 116, 171, 0.34);
    border-color: rgba(125, 198, 255, 0.64);
    color: #e8f6ff;
}

.recovery-plan-risk.completed {
    background: rgba(24, 143, 95, 0.35);
    border-color: rgba(118, 252, 196, 0.62);
    color: #e3ffef;
}

.recovery-plan-summary {
    margin: 0;
    font-size: 0.82rem;
    color: #d7ecfb;
    line-height: 1.45;
}

.recovery-plan-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.45rem;
}

.recovery-metric {
    border-radius: 11px;
    border: 1px solid rgba(174, 218, 245, 0.24);
    background: rgba(17, 47, 72, 0.45);
    padding: 0.46rem 0.52rem;
    display: grid;
    gap: 0.16rem;
}

.recovery-metric span {
    font-size: 0.72rem;
    color: #afcfe5;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.recovery-metric strong {
    font-size: 0.95rem;
    color: #eef8ff;
}

.recovery-actions {
    display: grid;
    gap: 0.42rem;
}

.recovery-plan-chip-row {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.34rem;
}

.recovery-action-row {
    border-radius: 12px;
    border: 1px solid rgba(173, 215, 244, 0.28);
    background: rgba(19, 50, 78, 0.46);
    padding: 0.52rem 0.56rem;
    display: grid;
    gap: 0.28rem;
}

.recovery-action-row.completed {
    border-left: 4px solid rgba(112, 241, 187, 0.82);
}

.recovery-action-row.acknowledged {
    border-left: 4px solid rgba(125, 198, 255, 0.78);
}

.recovery-action-row.pending {
    border-left: 4px solid rgba(255, 206, 138, 0.74);
}

.recovery-action-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.55rem;
}

.recovery-action-title {
    margin: 0;
    font-size: 0.82rem;
    color: #edf8ff;
}

.recovery-action-description {
    margin: 0;
    font-size: 0.77rem;
    color: #c2def1;
    line-height: 1.45;
}

.recovery-action-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.recovery-action-meta small {
    color: #a8c9e3;
    font-size: 0.72rem;
}

.recovery-action-buttons {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    flex-wrap: wrap;
}

.recovery-action-buttons .btn {
    min-height: 30px;
    padding: 0.24rem 0.6rem;
    font-size: 0.74rem;
}

.admin-recovery-toolbar {
    align-items: end;
}

.admin-recovery-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.48rem;
}

.admin-recovery-stat {
    border-radius: 12px;
    border: 1px solid rgba(173, 215, 244, 0.24);
    background: rgba(18, 47, 71, 0.46);
    padding: 0.52rem 0.58rem;
    display: grid;
    gap: 0.12rem;
}

.admin-recovery-stat span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #afcfe5;
}

.admin-recovery-stat strong {
    font-size: 1rem;
    color: #eef8ff;
}

.admin-recovery-stat.critical {
    border-color: rgba(255, 133, 133, 0.46);
    background: rgba(110, 27, 35, 0.32);
}

.admin-recovery-list .recovery-plan-card {
    gap: 0.65rem;
}

.recovery-empty {
    border-radius: 12px;
    border: 1px dashed rgba(164, 209, 240, 0.28);
    background: rgba(23, 58, 86, 0.25);
    color: #bfd9eb;
    padding: 0.7rem 0.78rem;
    font-size: 0.82rem;
}

.attendance-history-wrap {
    margin-top: 0.72rem;
    display: grid;
    gap: 0.44rem;
    max-height: 420px;
    overflow: auto;
    padding-right: 0.2rem;
}

.history-row {
    border-radius: 11px;
    border: 1px solid rgba(170, 213, 244, 0.33);
    background: rgba(38, 84, 122, 0.33);
    padding: 0.52rem 0.6rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    align-items: center;
    transition: border-color var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}

.history-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(6, 20, 34, 0.24);
}

.history-row.present-row {
    border-left: 3px solid rgba(108, 236, 181, 0.45);
}

.history-row.absent-row {
    border-left: 3px solid rgba(255, 156, 134, 0.45);
}

.history-status {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.85rem;
    border: 1px solid rgba(177, 219, 248, 0.3);
}

.history-status.present {
    color: #d6ffee;
    background: rgba(29, 138, 93, 0.36);
    border-color: rgba(108, 236, 181, 0.5);
}

.history-status.absent {
    color: #ffe6dd;
    background: rgba(151, 66, 49, 0.38);
    border-color: rgba(255, 156, 134, 0.5);
}

.history-main {
    display: grid;
    gap: 0.14rem;
}

.history-main strong {
    font-size: 0.85rem;
    color: #edf8ff;
}

.history-main small {
    font-size: 0.77rem;
    color: #b6d4eb;
}

.history-time {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #b7d4ea;
}

.ai-actions {
    margin-top: 0.66rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem;
}

.ai-output {
    margin-top: 0.72rem;
    min-height: 190px;
    border-radius: 14px;
    border: 1px solid rgba(175, 214, 248, 0.32);
    background: rgba(17, 46, 72, 0.38);
    padding: 0.72rem;
    white-space: pre-wrap;
    line-height: 1.46;
    color: #d7ecff;
}

.log-card {
    min-height: 140px;
}

.status-log {
    margin-top: 0.66rem;
    display: grid;
    gap: 0.38rem;
    max-height: 180px;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.status-log-skeleton {
    display: grid;
    gap: 0.42rem;
}

.skeleton-line {
    display: block;
    height: 0.58rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(73, 125, 165, 0.2) 0%, rgba(130, 183, 224, 0.44) 50%, rgba(73, 125, 165, 0.2) 100%);
    background-size: 220% 100%;
    animation: skeleton-shimmer 1.35s var(--motion-ease) infinite;
}

.skeleton-line:nth-child(2) {
    width: 86%;
}

.skeleton-line:nth-child(3) {
    width: 72%;
}

.log-line {
    border-radius: 10px;
    border: 1px solid rgba(161, 206, 243, 0.27);
    background: rgba(40, 86, 124, 0.32);
    padding: 0.34rem 0.46rem;
    animation: log-slide-in 0.22s var(--motion-ease);
}

@keyframes log-slide-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 180% 0;
    }
    100% {
        background-position: -40% 0;
    }
}

.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 1rem;
    background:
        radial-gradient(circle at 14% 12%, rgba(44, 118, 204, 0.34), transparent 46%),
        radial-gradient(circle at 88% 8%, rgba(72, 182, 240, 0.2), transparent 34%),
        linear-gradient(150deg, rgba(8, 24, 43, 0.84), rgba(7, 21, 39, 0.9));
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.auth-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.12) 0.8px, transparent 1px),
        radial-gradient(circle, rgba(164, 214, 255, 0.1) 0.8px, transparent 1px);
    background-size: 28px 28px, 52px 52px;
    background-position: 0 0, 14px 10px;
    opacity: 0.08;
}

.auth-overlay > * {
    position: relative;
    z-index: 1;
}

.auth-card {
    width: min(920px, 100%);
    padding: clamp(0.76rem, 0.92vw, 0.94rem);
    border-radius: 18px;
    max-height: min(calc(100vh - 3rem), 780px);
    max-height: min(calc(100dvh - 3rem), 780px);
    overflow: hidden;
    animation: auth-card-enter 0.32s var(--motion-ease);
    background:
        linear-gradient(132deg, rgba(13, 41, 66, 0.74), rgba(9, 32, 54, 0.78)),
        rgba(16, 40, 63, 0.62);
    border: 1px solid rgba(171, 216, 249, 0.34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.28);
}

@keyframes auth-card-enter {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-shell {
    display: grid;
    grid-template-columns: 48% 52%;
    gap: 0.68rem;
    align-items: start;
}

.auth-brand-panel {
    border-radius: 16px;
    border: 1px solid rgba(134, 205, 247, 0.34);
    background: linear-gradient(152deg, rgba(8, 30, 48, 0.74), rgba(9, 31, 46, 0.84));
    padding: 0.52rem;
    display: flex;
    min-height: 0;
}

.auth-brand-hero {
    margin: 0;
    flex: 0 0 auto;
    width: 100%;
    position: relative;
    border-radius: 14px;
    border: 1px solid rgba(168, 220, 248, 0.46);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    min-height: 0;
    max-height: min(68vh, 520px);
    background: url('/web/assets/auth-side-panel-bg.png?v=20260306c') center top / contain no-repeat #0c3157;
    filter: none;
    transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}

.auth-brand-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(10, 15, 25, 0.25), rgba(10, 15, 25, 0.65)),
        radial-gradient(circle at 50% 28%, rgba(90, 160, 255, 0.35), transparent 65%);
}

.auth-brand-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(186, 226, 255, 0.32) 1px, transparent 1.6px);
    background-size: 28px 28px;
    opacity: 0.15;
    mix-blend-mode: screen;
    animation: auth-particle-drift 25s linear infinite;
}

@keyframes auth-particle-drift {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-18px, 24px, 0);
    }
}

.auth-brand-topline {
    position: absolute;
    top: 0.86rem;
    left: 0.86rem;
    z-index: 2;
}

.auth-brand-chip {
    border-radius: 999px;
    border: 1px solid rgba(189, 230, 253, 0.6);
    background: rgba(5, 27, 44, 0.6);
    color: #f3fbff;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.56rem;
    box-shadow: 0 8px 16px rgba(4, 17, 28, 0.32);
}

.auth-brand-overlay {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    padding: 0.86rem;
}

.auth-brand-story {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(171, 221, 251, 0.36);
    background: linear-gradient(160deg, rgba(5, 23, 38, 0.54), rgba(5, 22, 36, 0.78));
    padding: 0.7rem 0.74rem;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}

.auth-brand-panel:hover .auth-brand-hero {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(5, 23, 38, 0.3);
}

.auth-brand-panel:hover .auth-brand-story {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(4, 17, 29, 0.22);
}

.auth-brand-eyebrow {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d7eefe;
}

.auth-brand-title {
    margin: 0.36rem 0 0;
    font-size: 1.02rem;
    line-height: 1.28;
    letter-spacing: -0.01em;
    color: #f4fbff;
}

.auth-brand-copy {
    margin: 0.42rem 0 0;
    font-size: 0.82rem;
    line-height: 1.46;
    color: #d4e9f8;
}

.auth-brand-points {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.24rem;
}

.auth-brand-points li {
    position: relative;
    margin: 0;
    padding-left: 0.82rem;
    font-size: 0.76rem;
    line-height: 1.36;
    color: #e2f3ff;
}

.auth-brand-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42rem;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, #7be0ff, #38b4e4);
}

.auth-brand-caption {
    margin: 0;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(180, 226, 252, 0.5);
    background: rgba(6, 24, 39, 0.46);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #eff8ff;
    padding: 0.28rem 0.56rem;
}

.auth-form-panel {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 0.56rem;
}

.auth-card h2 {
    margin: 0.04rem 0 0.1rem;
    font-size: clamp(1.7rem, 2.2vw, 1.92rem);
    line-height: 1.12;
    letter-spacing: -0.014em;
    font-weight: 650;
}

.auth-sub {
    margin: 0;
    color: #c5d9ea;
    font-size: 0.9rem;
    line-height: 1.42;
    max-width: 48ch;
}

.auth-form-panel .kicker {
    font-size: 0.69rem;
    letter-spacing: 0.15em;
    font-weight: 700;
}

.auth-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
}

.auth-highlight {
    border-radius: 999px;
    border: 1px solid rgba(142, 205, 247, 0.52);
    background: rgba(16, 49, 73, 0.44);
    color: #d6ecfc;
    font-size: 0.67rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.28rem 0.48rem;
}

.auth-journey {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.42rem;
}

.auth-journey-step {
    margin: 0;
    border-radius: 12px;
    border: 1px solid rgba(140, 198, 236, 0.34);
    background: rgba(10, 35, 56, 0.42);
    padding: 0.38rem 0.44rem;
    display: grid;
    gap: 0.16rem;
}

.auth-journey-step span {
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(145, 210, 249, 0.62);
    background: rgba(28, 97, 145, 0.55);
    color: #ebf8ff;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
}

.auth-journey-step p {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.28;
    color: #d7ebfa;
}

.auth-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    margin-bottom: 0.28rem;
    border-radius: 10px;
    border: 1px solid rgba(137, 193, 231, 0.34);
    background: rgba(8, 30, 48, 0.42);
    padding: 4px;
    box-shadow: inset 0 1px 0 rgba(177, 221, 250, 0.18);
}

.auth-mode-btn {
    border-radius: 8px;
    min-height: 40px;
    font-weight: 700;
    transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease);
}

.auth-mode-btn.active {
    background: linear-gradient(135deg, #4f7cff, #2563eb);
    border-color: rgba(130, 191, 248, 0.9);
    color: #f5fbff;
    box-shadow: 0 8px 16px rgba(36, 88, 158, 0.36);
}

.auth-mode-btn:not(.active) {
    background: rgba(44, 76, 104, 0.56);
    border-color: rgba(124, 172, 204, 0.4);
    color: #d6e9f8;
}

.auth-mode-btn:hover {
    transform: translateY(-1px);
}

.auth-mode-btn:active {
    transform: translateY(0);
}

.auth-progress {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    margin: 0 0 0.52rem;
    padding: 0.24rem 0.52rem;
    border-radius: 999px;
    border: 1px solid rgba(145, 198, 234, 0.36);
    background: rgba(9, 33, 52, 0.34);
    color: #bdddf3;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-progress-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(167, 214, 247, 0.32);
}

.auth-progress-dot.active {
    background: #62c6ff;
    box-shadow: 0 0 0 3px rgba(98, 198, 255, 0.18);
}

.auth-progress-label {
    color: #c7e4f8;
}

.auth-progress-arrow {
    opacity: 0.64;
}

.auth-flow-section {
    margin-bottom: 0.54rem;
    padding: 0.72rem;
    border-radius: 12px;
    border: 1px solid rgba(134, 188, 226, 0.28);
    background: rgba(9, 28, 44, 0.38);
    border-left-width: 3px;
    transition: transform var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease);
}

.auth-flow-section:hover {
    box-shadow: 0 8px 16px rgba(8, 28, 46, 0.12);
    transform: translateY(-1px);
}

.auth-flow-section:focus-within {
    box-shadow: 0 0 0 2px rgba(94, 184, 246, 0.24), 0 10px 20px rgba(8, 28, 46, 0.18);
    transform: translateY(-1px);
}

.auth-login-section {
    border-color: rgba(101, 193, 250, 0.56);
    background: linear-gradient(148deg, rgba(18, 56, 89, 0.48), rgba(10, 33, 57, 0.36));
    border-left-color: #47b3ff;
}

.auth-otp-section {
    border-color: rgba(147, 204, 235, 0.46);
    background: rgba(11, 36, 58, 0.22);
    border-left-color: #2fd0f1;
}

.auth-signup-section {
    border-color: rgba(146, 183, 214, 0.4);
    background: rgba(9, 31, 51, 0.16);
    border-left-color: #7f9fbc;
}

.auth-signup-actions {
    margin-top: 0.25rem;
}

.auth-photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid rgba(142, 194, 231, 0.4);
    box-shadow: 0 12px 26px rgba(10, 26, 42, 0.35);
}

.field-hint {
    font-size: 0.72rem;
    color: #9fb8ce;
}

.auth-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.auth-section-head h3 {
    margin: 0;
    font-size: 1.02rem;
    color: #e9f6ff;
    font-weight: 680;
    letter-spacing: -0.01em;
}

.auth-section-head p {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    line-height: 1.3;
    color: #b9cfe2;
}

.auth-actions {
    margin: 0.42rem 0 0.45rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.auth-actions-emphasis {
    margin-top: 0.2rem;
}

.auth-login-controls {
    display: grid;
    gap: 0.34rem;
}

.auth-overlay input,
.auth-overlay select {
    background: rgba(14, 41, 64, 0.74);
    border: 1px solid rgba(142, 194, 231, 0.4);
    border-radius: 10px;
    padding: 0.72rem 0.82rem;
    color: #e2f3ff;
    font-size: 0.94rem;
    font-weight: 500;
    transition: border-color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), background-color var(--motion-fast) var(--motion-ease);
}

.auth-overlay input:hover,
.auth-overlay select:hover {
    border-color: rgba(168, 217, 252, 0.66);
}

.auth-overlay input::placeholder {
    color: rgba(188, 216, 237, 0.76);
}

.auth-overlay input:focus,
.auth-overlay select:focus {
    border-color: #4f7cff;
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.15);
    outline: none;
}

.auth-overlay .field span {
    font-size: 0.78rem;
    font-weight: 500;
    color: #bad4e8;
}

.forgot-password-toggle {
    justify-self: flex-start;
    padding: 0.3rem 0.62rem;
    border-radius: 10px;
    font-size: 0.74rem;
}

.password-strength {
    margin: 0.14rem 0 0.16rem;
    font-size: 0.73rem;
    color: #a8c8e4;
}

.password-strength.weak {
    color: #ffab9c;
}

.password-strength.medium {
    color: #ffd580;
}

.password-strength.strong {
    color: #8df0bb;
}

.auth-message {
    margin: 0.4rem 0 0;
    color: #c0dbf3;
    font-size: 0.8rem;
}

body.auth-open:not(.auth-signup-mode) .auth-card {
    overflow: hidden;
}

body.auth-open.auth-signup-mode .auth-overlay {
    place-items: start center;
    overflow-y: auto;
}

body.auth-open.auth-signup-mode .auth-card {
    overflow: hidden;
    max-height: none;
    margin-block: 1rem;
}

body.auth-open.auth-signup-mode .auth-form-panel {
    gap: 0.42rem;
}

body.auth-open.auth-signup-mode .auth-progress {
    display: none;
}

body.auth-open.auth-signup-mode .auth-sub {
    font-size: 0.84rem;
    line-height: 1.3;
}

body.auth-open.auth-signup-mode .auth-journey {
    display: none;
}

body.auth-open.auth-signup-mode .auth-flow-section {
    margin-bottom: 0.42rem;
    padding: 0.58rem;
}

body.auth-open.auth-signup-mode .auth-section-head {
    margin-bottom: 0.3rem;
}

body.auth-open.auth-signup-mode .auth-signup-actions {
    margin-top: 0.1rem;
}

body.auth-open.auth-signup-mode #auth-signup-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.56rem;
}

body.auth-open.auth-signup-mode #auth-signup-fields .auth-section-head,
body.auth-open.auth-signup-mode #auth-signup-fields .password-strength,
body.auth-open.auth-signup-mode #auth-signup-fields #auth-role-wrap,
body.auth-open.auth-signup-mode #auth-signup-fields #auth-signup-registration-wrap,
body.auth-open.auth-signup-mode #auth-signup-fields #auth-signup-faculty-id-wrap,
body.auth-open.auth-signup-mode #auth-signup-fields #auth-parent-email-wrap {
    grid-column: 1 / -1;
}

body.auth-open:not(.auth-signup-mode) .auth-journey {
    display: none;
}

.auth-divider {
    margin: 0.8rem 0 0.65rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(152, 211, 251, 0.5), transparent);
}

.auth-hint {
    margin: 0.5rem 0 0;
    color: #9bb9d5;
    font-size: 0.8rem;
}

.auth-modal {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(4, 14, 26, 0.72);
    backdrop-filter: blur(4px) saturate(110%);
    -webkit-backdrop-filter: blur(4px) saturate(110%);
    z-index: 5;
    padding: 1rem;
}

.auth-modal-card {
    width: min(540px, 100%);
    border-radius: 16px;
    border: 1px solid rgba(133, 203, 244, 0.58);
    background: linear-gradient(170deg, rgba(11, 39, 65, 0.98), rgba(5, 23, 41, 0.97));
    box-shadow: 0 24px 54px rgba(3, 13, 25, 0.66);
    padding: 1rem;
    display: grid;
    gap: 0.56rem;
    max-height: calc(100vh - 2.5rem);
    overflow: auto;
}

.auth-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.auth-modal-head h3 {
    margin: 0;
    font-size: 1.08rem;
    color: #eef8ff;
}

.auth-modal-sub {
    margin: 0;
    font-size: 0.82rem;
    color: #a9c8e5;
}

.mfa-setup-card {
    width: min(620px, 100%);
}

.mfa-help-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.mfa-readonly {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.01em;
}

.mfa-qr-block {
    display: grid;
    gap: 0.42rem;
}

.mfa-qr-frame {
    border: 1px dashed rgba(142, 206, 247, 0.58);
    border-radius: 12px;
    background: rgba(16, 54, 82, 0.42);
    padding: 0.66rem;
    display: grid;
    place-items: center;
    min-height: 180px;
}

.mfa-qr-image {
    width: min(220px, 100%);
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    border: 1px solid rgba(145, 209, 249, 0.52);
    background: #ffffff;
    padding: 0.36rem;
}

.mfa-qr-empty {
    margin: 0;
    color: #b9d5eb;
    font-size: 0.8rem;
    text-align: center;
}

.mfa-qr-confirm-wrap {
    margin-top: -0.1rem;
}

.mfa-inline-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
}

.mfa-copy-btn {
    min-height: 42px;
    white-space: nowrap;
    padding-inline: 0.72rem;
}

.mfa-secret-input {
    letter-spacing: 0.06em;
    font-weight: 700;
}

.mfa-secret-hint strong {
    color: #edf8ff;
}

@media (max-width: 640px) {
    .mfa-inline-field {
        grid-template-columns: 1fr;
    }
}

.mfa-backup-codes {
    margin: 0.25rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
    gap: 0.42rem;
}

.mfa-backup-code {
    border: 1px dashed rgba(149, 216, 255, 0.62);
    border-radius: 10px;
    background: rgba(23, 67, 97, 0.34);
    color: #d7edff;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.3;
    padding: 0.38rem 0.46rem;
    overflow-wrap: anywhere;
}

.mfa-backup-code-empty {
    grid-column: 1 / -1;
    font-family: var(--font-main);
}

.mfa-help-card {
    width: min(640px, 100%);
}

.mfa-help-steps {
    margin: 0.2rem 0 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.4rem;
    color: #d3e8fb;
    font-size: 0.84rem;
    line-height: 1.45;
}

.mfa-help-steps li strong {
    color: #f1f9ff;
}

.otp-popup {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(2, 11, 24, 0.68);
    backdrop-filter: blur(3px) saturate(105%);
    -webkit-backdrop-filter: blur(3px) saturate(105%);
    z-index: 3;
    padding: 1rem;
}

.otp-popup-card {
    width: min(360px, 100%);
    border-radius: 16px;
    border: 1px solid rgba(113, 208, 255, 0.58);
    background: linear-gradient(162deg, rgba(10, 38, 64, 0.98), rgba(5, 24, 43, 0.98));
    box-shadow: 0 20px 44px rgba(3, 13, 25, 0.58);
    padding: 1.05rem 1rem 0.95rem;
    display: grid;
    gap: 0.68rem;
    text-align: center;
}

.otp-popup-card h4 {
    margin: 0;
    font-size: 1.16rem;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.otp-popup-card p {
    margin: 0;
    font-size: 0.95rem;
    color: #e6f5ff;
    line-height: 1.4;
}

.otp-popup-card[data-tone="sending"] {
    border-color: rgba(99, 200, 255, 0.8);
}

.otp-popup-card[data-tone="success"] {
    border-color: rgba(88, 223, 181, 0.85);
}

.otp-popup-card[data-tone="cooldown"] {
    border-color: rgba(255, 195, 96, 0.9);
}

.otp-popup-card[data-tone="danger"] {
    border-color: rgba(255, 128, 128, 0.9);
}

.otp-popup-loader {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 3px solid rgba(130, 212, 255, 0.4);
    border-top-color: #6dd7ff;
    margin: 0 auto 0.1rem;
    animation: otp-popup-spin 0.9s linear infinite;
}

@keyframes otp-popup-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body.ums-theme .otp-popup {
    background: rgba(18, 24, 35, 0.52);
}

body.ums-theme .otp-popup-card {
    border: 1px solid rgba(36, 121, 201, 0.38);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 255, 0.98));
    box-shadow: 0 24px 54px rgba(15, 33, 54, 0.2);
}

body.ums-theme .otp-popup-card h4 {
    color: #0b2138;
}

body.ums-theme .otp-popup-card p {
    color: #1f4261;
}

body.ums-theme .otp-popup-loader {
    border-color: rgba(56, 139, 217, 0.24);
    border-top-color: #2a96ff;
}

.food-toast {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 200;
    pointer-events: none;
}

.food-toast-card {
    min-width: min(92vw, 360px);
    max-width: min(92vw, 420px);
    border: 1px solid rgba(114, 193, 255, 0.55);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(18, 54, 90, 0.96), rgba(12, 42, 74, 0.94));
    box-shadow: 0 14px 34px rgba(5, 22, 38, 0.36);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.78rem;
    pointer-events: auto;
    animation: food-toast-in 170ms ease-out;
}

.food-toast-copy {
    display: grid;
    gap: 0.1rem;
}

.food-toast-copy strong {
    color: #f6fbff;
    font-size: 0.94rem;
    font-weight: 800;
}

.food-toast-copy p {
    margin: 0;
    color: #d6e9fa;
    font-size: 0.84rem;
    line-height: 1.36;
}

#food-toast-card[data-tone="error"] {
    border-color: rgba(255, 140, 129, 0.72);
    background: linear-gradient(145deg, rgba(102, 27, 23, 0.96), rgba(73, 19, 19, 0.95));
}

#food-toast-card[data-tone="error"] .food-toast-copy strong {
    color: #ffe6e1;
}

#food-toast-card[data-tone="error"] .food-toast-copy p {
    color: #ffd2c8;
}

@keyframes food-toast-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.ums-theme .food-toast-card {
    border-color: rgba(52, 134, 208, 0.45);
    background: linear-gradient(145deg, rgba(246, 251, 255, 0.98), rgba(232, 243, 252, 0.97));
    box-shadow: 0 10px 26px rgba(12, 42, 71, 0.2);
}

body.ums-theme .food-toast-copy strong {
    color: #17385a;
}

body.ums-theme .food-toast-copy p {
    color: #345a7f;
}

body.ums-theme #food-toast-card[data-tone="error"] {
    border-color: rgba(198, 87, 74, 0.5);
    background: linear-gradient(145deg, rgba(255, 239, 235, 0.98), rgba(255, 226, 220, 0.97));
}

body.ums-theme #food-toast-card[data-tone="error"] .food-toast-copy strong {
    color: #7a1f15;
}

body.ums-theme #food-toast-card[data-tone="error"] .food-toast-copy p {
    color: #97392f;
}

body.auth-open .dashboard {
    filter: blur(3px) saturate(80%);
    pointer-events: none;
}

body.ums-theme .auth-overlay {
    background:
        radial-gradient(circle at 16% 10%, rgba(62, 156, 236, 0.3), transparent 46%),
        radial-gradient(circle at 86% 8%, rgba(66, 210, 255, 0.2), transparent 36%),
        linear-gradient(160deg, rgba(8, 25, 45, 0.86), rgba(7, 22, 41, 0.9));
}

body.ums-theme .auth-card {
    background:
        radial-gradient(circle at 20% 0%, rgba(108, 186, 248, 0.18), transparent 50%),
        radial-gradient(circle at 94% 8%, rgba(48, 222, 255, 0.14), transparent 38%),
        linear-gradient(132deg, rgba(14, 44, 74, 0.92), rgba(10, 35, 61, 0.96), rgba(9, 31, 54, 0.98));
    border-color: rgba(143, 202, 244, 0.46);
    box-shadow: 0 42px 84px rgba(4, 15, 28, 0.5);
}

body.ums-theme .auth-form-panel .kicker {
    color: #9fd8ff;
    letter-spacing: 0.14em;
}

body.ums-theme .auth-card h2 {
    color: #edf7ff;
    background: linear-gradient(126deg, #f8fbff 10%, #c7ecff 50%, #8ad8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.ums-theme .auth-sub {
    color: #bddbf2;
}

body.ums-theme .auth-brand-panel {
    border-color: rgba(149, 207, 249, 0.42);
    background: linear-gradient(150deg, rgba(11, 37, 60, 0.82), rgba(10, 33, 53, 0.9));
}

body.ums-theme .auth-brand-hero {
    border-color: #c7d9e9;
    background: url('/web/assets/auth-side-panel-bg.png?v=20260306c') center top / contain no-repeat #0c3157;
    filter: none;
}

body.ums-theme .auth-brand-hero::after {
    opacity: 0.16;
}

body.ums-theme .auth-brand-chip {
    border-color: rgba(190, 227, 250, 0.48);
    background: rgba(7, 30, 49, 0.44);
    color: #eef8ff;
}

body.ums-theme .auth-brand-caption {
    border-color: rgba(188, 228, 251, 0.52);
    background: rgba(6, 25, 39, 0.44);
    color: #eff8ff;
}

body.ums-theme .auth-brand-story {
    border-color: rgba(187, 221, 246, 0.52);
    background: linear-gradient(160deg, rgba(9, 38, 60, 0.5), rgba(6, 29, 47, 0.7));
}

body.ums-theme .auth-brand-title {
    color: #f3fbff;
}

body.ums-theme .auth-brand-copy,
body.ums-theme .auth-brand-points li {
    color: #dcedfb;
}

body.ums-theme .auth-highlights .auth-highlight {
    border-color: rgba(139, 206, 248, 0.52);
    background: rgba(26, 68, 102, 0.52);
    color: #d8efff;
}

body.ums-theme .auth-mode-switch {
    background: rgba(11, 39, 64, 0.48);
    border-color: rgba(132, 196, 240, 0.38);
}

body.ums-theme .auth-mode-btn:not(.active) {
    background: rgba(42, 76, 104, 0.6);
    border-color: rgba(125, 176, 210, 0.42);
    color: #d3e7f7;
}

body.ums-theme .auth-progress {
    border-color: rgba(132, 196, 240, 0.36);
    background: rgba(12, 40, 63, 0.42);
    color: #c3e2f7;
}

body.ums-theme .auth-journey-step {
    border-color: rgba(134, 200, 244, 0.42);
    background: rgba(16, 52, 82, 0.5);
}

body.ums-theme .auth-journey-step span {
    border-color: rgba(138, 205, 248, 0.62);
    background: rgba(36, 112, 168, 0.56);
    color: #eef8ff;
}

body.ums-theme .auth-journey-step p {
    color: #d0e8fb;
}

body.ums-theme .auth-flow-section {
    border-color: rgba(136, 198, 240, 0.42);
    background: linear-gradient(158deg, rgba(18, 56, 86, 0.56), rgba(12, 40, 66, 0.66));
    box-shadow: 0 1px 0 rgba(77, 151, 208, 0.12);
}

body.ums-theme .auth-login-section {
    border-color: rgba(114, 193, 247, 0.68);
    background: linear-gradient(165deg, rgba(24, 71, 108, 0.65), rgba(14, 49, 81, 0.72));
    border-left-color: #3cb0ff;
}

body.ums-theme .auth-otp-section {
    border-color: rgba(129, 199, 243, 0.52);
    background: linear-gradient(160deg, rgba(16, 54, 84, 0.54), rgba(11, 42, 70, 0.64));
    border-left-color: #2fc6e7;
}

body.ums-theme .auth-signup-section {
    border-color: rgba(126, 187, 224, 0.42);
    background: linear-gradient(160deg, rgba(14, 45, 70, 0.5), rgba(10, 36, 59, 0.62));
    border-left-color: #7ab6de;
}

body.ums-theme .profile-tab-panel {
    border-color: #c9dcee;
    background: #f8fbff;
}

body.ums-theme .enrollment-box {
    border-color: #c9dcee;
    background: #ffffff;
}

body.ums-theme .enrollment-box-title {
    color: #183957;
}

body.ums-theme .auth-section-head h3 {
    color: #edf8ff;
}

body.ums-theme .auth-section-head p {
    color: #b5d4ec;
}

body.ums-theme .auth-flow-section:hover {
    box-shadow: 0 10px 22px rgba(7, 24, 40, 0.32);
}

body.ums-theme .auth-flow-section:focus-within {
    box-shadow: 0 0 0 2px rgba(86, 183, 243, 0.38), 0 12px 24px rgba(6, 23, 39, 0.34);
}

body.ums-theme .auth-overlay input,
body.ums-theme .auth-overlay select {
    color: #eaf6ff;
    background: rgba(9, 33, 55, 0.68);
    border: 1px solid rgba(127, 192, 236, 0.46);
}

body.ums-theme .auth-overlay input::placeholder {
    color: rgba(198, 226, 246, 0.74);
}

body.ums-theme .auth-overlay .btn {
    border-color: rgba(130, 189, 233, 0.44);
    background: rgba(20, 57, 88, 0.64);
    color: #dcedfb;
}

body.ums-theme .auth-overlay .btn:hover,
body.ums-theme .auth-overlay .btn:active {
    background: rgba(32, 77, 114, 0.82);
    border-color: rgba(142, 206, 248, 0.62);
    box-shadow: 0 8px 18px rgba(6, 24, 40, 0.34);
}

body.ums-theme .auth-overlay .btn-primary {
    background: linear-gradient(135deg, #4f7cff, #2563eb);
    border-color: rgba(93, 190, 255, 0.82);
    color: #f5fcff;
}

body.ums-theme .auth-overlay .btn-secondary {
    background: rgba(33, 87, 129, 0.74);
    border-color: rgba(123, 188, 235, 0.62);
    color: #dff1ff;
}

body.ums-theme .auth-message {
    color: #b6d8f0;
}

body.ums-theme .auth-hint {
    color: #96c2e3;
}

body.ums-theme .auth-overlay .field span {
    color: #b9d7ee;
}

body.ums-theme .food-shop-card {
    border-color: #c8dbec;
    background: linear-gradient(165deg, #f7fbff, #eef6ff);
}

body.ums-theme .food-shop-card small {
    color: #5d7992;
}

body.ums-theme .food-shop-card .shop-popular {
    border-color: rgba(234, 162, 86, 0.65);
    color: #a95e16;
    background: rgba(255, 239, 221, 0.8);
}

body.ums-theme .food-cart-summary {
    border-color: #c5d8ea;
    background: #f4f9ff;
    color: #1e3f63;
}

body.ums-theme .food-location-status[data-tone="ok"] {
    color: #157b4a;
}

body.ums-theme .food-location-status[data-tone="warn"] {
    color: #8e5c00;
}

body.ums-theme .food-location-status[data-tone="error"] {
    color: #b84735;
}

body.ums-theme .auth-modal {
    background: rgba(24, 34, 47, 0.46);
}

body.ums-theme .auth-modal-card {
    border-color: rgba(38, 116, 190, 0.32);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.98));
    box-shadow: 0 24px 54px rgba(15, 33, 54, 0.22);
}

body.ums-theme .auth-modal-head h3 {
    color: #17324d;
}

body.ums-theme .auth-modal-sub {
    color: #4f6f8d;
}

body.ums-theme .mfa-backup-code {
    border-color: rgba(135, 187, 230, 0.62);
    background: rgba(224, 238, 251, 0.76);
    color: #234f76;
}

body.ums-theme .mfa-help-steps {
    color: #345d82;
}

body.ums-theme .mfa-help-steps li strong {
    color: #1b3f63;
}

body.ums-theme .mfa-secret-hint strong {
    color: #1f4368;
}

body.ums-theme .mfa-qr-frame {
    border-color: rgba(124, 184, 226, 0.6);
    background: rgba(223, 239, 251, 0.8);
}

body.ums-theme .mfa-qr-empty {
    color: #4f7292;
}

body.ums-theme .password-strength {
    color: #476d8f;
}

body.ums-theme .password-strength.weak {
    color: #bf3c2d;
}

body.ums-theme .password-strength.medium {
    color: #946700;
}

body.ums-theme .password-strength.strong {
    color: #0f7f4a;
}

.helper-text {
    margin: 0.56rem 0 0;
    color: #c1d8ec;
    font-size: 0.86rem;
    line-height: 1.38;
}

.ui-state {
    transition: color var(--motion-fast) var(--motion-ease);
}

.ui-state[data-ui-state="neutral"] {
    color: var(--ui-state-neutral-dark) !important;
}

.ui-state[data-ui-state="loading"] {
    color: var(--ui-state-loading-dark) !important;
}

.ui-state[data-ui-state="empty"] {
    color: var(--ui-state-empty-dark) !important;
}

.ui-state[data-ui-state="error"] {
    color: var(--ui-state-error-dark) !important;
}

.ui-state[data-ui-state="success"] {
    color: var(--ui-state-success-dark) !important;
}

body.ums-theme .ui-state[data-ui-state="neutral"] {
    color: var(--ui-state-neutral-light) !important;
}

body.ums-theme .ui-state[data-ui-state="loading"] {
    color: var(--ui-state-loading-light) !important;
}

body.ums-theme .ui-state[data-ui-state="empty"] {
    color: var(--ui-state-empty-light) !important;
}

body.ums-theme .ui-state[data-ui-state="error"] {
    color: var(--ui-state-error-light) !important;
}

body.ums-theme .ui-state[data-ui-state="success"] {
    color: var(--ui-state-success-light) !important;
}

.compact {
    min-height: 120px;
}

.inline-controls {
    display: flex;
    align-items: end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.direct-email-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6rem;
    align-items: end;
}

.direct-email-card textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    border-radius: 12px;
    border: 1px solid rgba(177, 219, 255, 0.44);
    padding: 0.7rem 0.72rem;
    color: #ddf2ff;
    font: inherit;
    background: rgba(22, 52, 76, 0.72);
}

.direct-email-card textarea:focus {
    outline: 2px solid rgba(81, 180, 255, 0.55);
    outline-offset: 1px;
}

.food-order-controls {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) auto;
    align-items: end;
    gap: 0.55rem;
}

.food-order-controls .food-order-field {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0;
    min-width: 0;
    max-width: none;
    width: 100%;
}

.food-order-controls .food-order-field > span {
    min-height: 1.2rem;
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.18rem;
}

.food-order-controls .food-order-field input,
.food-order-controls .food-order-field select {
    width: 100%;
    height: 50px;
    min-height: 50px;
    box-sizing: border-box;
}

#food-order-date,
#food-slot-select {
    font-size: 1.02rem;
}

.food-order-actions {
    display: inline-flex;
    align-items: flex-end;
    gap: 0.55rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    min-height: 50px;
    align-self: end;
}

.food-order-actions .btn {
    min-height: 50px;
}

.food-demo-helper,
.food-demo-status {
    margin-top: 0.45rem;
}

#food-order-date {
    cursor: pointer;
}

#food-open-cart-btn {
    position: relative;
}

#food-open-cart-btn.has-items::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff3b30;
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.55);
    animation: food-cart-dot-ping 1.55s ease-out infinite;
}

@keyframes food-cart-dot-ping {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.55);
    }
    100% {
        box-shadow: 0 0 0 8px rgba(255, 59, 48, 0);
    }
}

.food-setup-grid {
    margin-top: 0.4rem;
}

.food-setup-grid > .field {
    min-width: 150px;
}

.food-shop-section {
    --food-accent: #62c1ff;
    --food-bg-start: rgba(14, 55, 92, 0.45);
    --food-bg-end: rgba(10, 37, 64, 0.4);
    --food-card-start: rgba(10, 40, 72, 0.78);
    --food-card-end: rgba(9, 34, 58, 0.72);
    margin-top: 0.75rem;
    border: 1px solid rgba(119, 193, 246, 0.36);
    border-radius: 14px;
    padding: 0.72rem;
    background: linear-gradient(140deg, var(--food-bg-start), var(--food-bg-end));
}

.food-shop-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
}

.food-shop-section-head h4 {
    margin: 0;
    color: #e9f6ff;
    font-size: 1rem;
}

.food-shop-section-head small {
    color: #bed9ee;
    font-size: 0.82rem;
}

#food-shop-grid {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
}

.food-shop-cards {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    align-items: start;
}

.food-shop-card {
    border: 1px solid color-mix(in srgb, var(--food-accent) 58%, transparent);
    border-radius: 14px;
    padding: 0;
    background: linear-gradient(160deg, var(--food-card-start), var(--food-card-end));
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), filter var(--motion-fast) var(--motion-ease);
}

.food-shop-card:hover {
    transform: translateY(-2px) scale(1.01);
    border-color: color-mix(in srgb, var(--food-accent) 78%, white 10%);
    box-shadow: 0 12px 24px rgba(8, 27, 45, 0.36);
    filter: saturate(1.08);
}

.food-shop-card.is-selected {
    border-color: color-mix(in srgb, var(--food-accent) 88%, #fff 12%);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--food-accent) 34%, transparent), 0 12px 24px rgba(8, 27, 45, 0.32);
}

.food-shop-card.is-closed {
    border-color: rgba(154, 167, 182, 0.6);
    background: linear-gradient(160deg, rgba(66, 77, 90, 0.88), rgba(46, 55, 67, 0.84));
    box-shadow: none;
    filter: grayscale(0.9) saturate(0.28);
    cursor: not-allowed;
}

.food-shop-card.is-closed:hover {
    transform: none;
    border-color: rgba(154, 167, 182, 0.6);
    box-shadow: none;
    filter: grayscale(0.9) saturate(0.28);
}

.food-shop-card.is-closed.is-selected {
    box-shadow: 0 0 0 1px rgba(154, 167, 182, 0.55);
}

.food-shop-cover-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    border-bottom: 1px solid color-mix(in srgb, var(--food-accent) 45%, transparent);
}

.food-shop-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.food-shop-card.is-closed .food-shop-cover {
    filter: grayscale(1) brightness(0.72);
}

.food-shop-closed-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    background: rgba(39, 44, 51, 0.92);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.food-shop-hours-note {
    margin-top: 0.3rem;
    color: rgba(219, 229, 239, 0.95);
    font-size: 0.74rem;
    font-weight: 700;
}

.food-shop-card-body {
    padding: 0.62rem 0.68rem 0.7rem;
}

.food-shop-card h4 {
    margin: 0 0 0.18rem;
    color: #f3faff;
    font-size: 0.95rem;
}

.food-shop-card small {
    color: #bdd9ef;
    font-size: 0.81rem;
    display: block;
}

.food-shop-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}

.shop-rating-live {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 222, 139, 0.62);
    background: rgba(106, 71, 14, 0.48);
    color: #ffe6a7;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.1rem 0.44rem;
}

.food-shop-card .shop-popular {
    margin-top: 0.34rem;
    display: inline-flex;
    padding: 0.15rem 0.46rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 233, 154, 0.74);
    color: #fff1b6;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.food-shop-section[data-group="popular"] {
    --food-accent: #f5b04f;
    --food-bg-start: rgba(109, 55, 8, 0.45);
    --food-bg-end: rgba(48, 25, 8, 0.36);
    --food-card-start: rgba(103, 57, 13, 0.88);
    --food-card-end: rgba(69, 37, 12, 0.84);
}

.food-shop-section[data-group="unimall17"] {
    --food-accent: #ff8080;
    --food-bg-start: rgba(102, 28, 44, 0.42);
    --food-bg-end: rgba(53, 18, 37, 0.35);
    --food-card-start: rgba(87, 30, 47, 0.86);
    --food-card-end: rgba(54, 20, 36, 0.82);
}

.food-shop-section[data-group="bh1"] {
    --food-accent: #79d88d;
    --food-bg-start: rgba(16, 74, 42, 0.42);
    --food-bg-end: rgba(8, 39, 24, 0.34);
    --food-card-start: rgba(16, 70, 41, 0.84);
    --food-card-end: rgba(11, 43, 27, 0.78);
}

.food-shop-section[data-group="bh2to6"] {
    --food-accent: #65c6ff;
    --food-bg-start: rgba(13, 63, 95, 0.42);
    --food-bg-end: rgba(8, 33, 54, 0.35);
    --food-card-start: rgba(12, 57, 86, 0.84);
    --food-card-end: rgba(9, 37, 60, 0.8);
}

.food-shop-section[data-group="block41"] {
    --food-accent: #ad87ff;
    --food-bg-start: rgba(59, 34, 103, 0.42);
    --food-bg-end: rgba(33, 19, 60, 0.35);
    --food-card-start: rgba(56, 33, 97, 0.86);
    --food-card-end: rgba(35, 21, 61, 0.8);
}

.food-shop-section[data-group="block34"] {
    --food-accent: #ff9d72;
    --food-bg-start: rgba(96, 42, 18, 0.43);
    --food-bg-end: rgba(51, 24, 12, 0.35);
    --food-card-start: rgba(92, 45, 20, 0.84);
    --food-card-end: rgba(58, 28, 14, 0.8);
}

.food-shop-section[data-group="campus"] {
    --food-accent: #61ddd7;
    --food-bg-start: rgba(10, 76, 72, 0.42);
    --food-bg-end: rgba(6, 42, 40, 0.34);
    --food-card-start: rgba(9, 66, 62, 0.82);
    --food-card-end: rgba(6, 42, 40, 0.78);
}

body.ums-theme .food-shop-section {
    border-color: color-mix(in srgb, var(--food-accent) 38%, #aac9e6);
}

body.ums-theme .food-shop-section-head h4 {
    color: #203d59;
}

body.ums-theme .food-shop-section-head small {
    color: #456785;
}

body.ums-theme .food-shop-section[data-group="popular"] {
    --food-bg-start: #fff5e6;
    --food-bg-end: #ffeccf;
    --food-card-start: #fff3de;
    --food-card-end: #ffe8c4;
}

body.ums-theme .food-shop-section[data-group="unimall17"] {
    --food-bg-start: #ffecee;
    --food-bg-end: #ffdfe3;
    --food-card-start: #ffedf0;
    --food-card-end: #ffe2e7;
}

body.ums-theme .food-shop-section[data-group="bh1"] {
    --food-bg-start: #eaf9ef;
    --food-bg-end: #dff1e7;
    --food-card-start: #eefcf3;
    --food-card-end: #e2f6ea;
}

body.ums-theme .food-shop-section[data-group="bh2to6"] {
    --food-bg-start: #e9f5ff;
    --food-bg-end: #deeffd;
    --food-card-start: #ecf7ff;
    --food-card-end: #e0f1ff;
}

body.ums-theme .food-shop-section[data-group="block41"] {
    --food-bg-start: #f2ecff;
    --food-bg-end: #e8e0ff;
    --food-card-start: #f5f0ff;
    --food-card-end: #eae2ff;
}

body.ums-theme .food-shop-section[data-group="block34"] {
    --food-bg-start: #fff1e8;
    --food-bg-end: #ffe7db;
    --food-card-start: #fff4ec;
    --food-card-end: #ffe9de;
}

body.ums-theme .food-shop-section[data-group="campus"] {
    --food-bg-start: #e8fbf8;
    --food-bg-end: #ddf4f0;
    --food-card-start: #ecfdfa;
    --food-card-end: #def7f3;
}

body.ums-theme .food-shop-card {
    box-shadow: 0 6px 12px rgba(27, 54, 78, 0.08);
}

body.ums-theme .food-shop-card.is-closed {
    border-color: #aeb8c4;
    background: linear-gradient(160deg, #edf1f5, #e1e7ee);
    filter: grayscale(1);
    box-shadow: none;
}

body.ums-theme .food-shop-card.is-closed h4 {
    color: #5a6d80;
}

body.ums-theme .food-shop-card.is-closed small {
    color: #62788d;
}

body.ums-theme .food-shop-closed-badge {
    border-color: rgba(86, 99, 112, 0.46);
    background: rgba(111, 122, 134, 0.94);
    color: #ffffff;
}

body.ums-theme .food-shop-hours-note {
    color: #5f7388;
}

body.ums-theme .food-shop-card h4 {
    color: #203950;
}

body.ums-theme .food-shop-card small {
    color: #4d6f8c;
}

body.ums-theme .shop-rating-live {
    border-color: rgba(221, 171, 91, 0.65);
    background: rgba(255, 235, 197, 0.9);
    color: #8c5b12;
}

body.ums-theme .food-shop-card .shop-popular {
    border-color: rgba(222, 148, 63, 0.76);
    color: #9f4e05;
    background: rgba(255, 228, 187, 0.7);
}

.food-cart-tabs {
    margin-top: 0.52rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
    padding: 0.34rem;
    border-radius: var(--radius-sm);
    border: var(--card-border-w) solid rgba(125, 194, 240, 0.42);
    background: linear-gradient(136deg, rgba(16, 45, 73, 0.46), rgba(75, 46, 20, 0.34));
}

.food-cart-stepper {
    margin-top: 0.45rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.36rem;
}

.food-cart-step {
    min-height: 34px;
    border-radius: var(--radius-sm);
    border: var(--card-border-w) solid rgba(136, 206, 249, 0.44);
    background: rgba(25, 68, 102, 0.34);
    color: #cfe7fa;
    font-size: 0.74rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.01em;
}

.food-cart-step.is-active {
    border-color: rgba(247, 191, 136, 0.78);
    background: linear-gradient(128deg, rgba(58, 149, 230, 0.9), rgba(215, 136, 73, 0.92));
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(10, 33, 53, 0.3);
}

.food-cart-tab-btn {
    min-height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: #cfe9ff;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.food-cart-tab-btn:hover:not(:disabled) {
    border-color: rgba(249, 186, 129, 0.5);
    color: #ffe3c4;
}

.food-cart-tab-btn.is-active {
    border-color: rgba(255, 198, 143, 0.72);
    background: linear-gradient(135deg, rgba(42, 127, 198, 0.78), rgba(201, 122, 46, 0.72));
    color: #fff8ee;
    box-shadow: 0 4px 12px rgba(14, 33, 53, 0.32);
}

.food-cart-tab-btn:disabled {
    opacity: 0.56;
    cursor: not-allowed;
}

.food-cart-pane {
    margin-top: 0.62rem;
    padding: 0.72rem;
    border-radius: var(--radius-sm);
    border: var(--card-border-w) solid rgba(128, 198, 246, 0.36);
    display: grid;
    gap: 0.58rem;
}

.food-cart-pane-cart {
    border-color: rgba(115, 193, 246, 0.46);
    background: linear-gradient(156deg, rgba(15, 42, 68, 0.44), rgba(9, 30, 52, 0.34));
}

.food-cart-pane-review {
    border-color: rgba(245, 186, 131, 0.48);
    background: linear-gradient(154deg, rgba(78, 45, 17, 0.38), rgba(38, 26, 15, 0.32));
}

.food-cart-pane-actions {
    margin-top: 0.12rem;
    justify-content: flex-end;
}

.food-cart-summary {
    margin-top: 0;
    padding: 0.58rem 0.66rem;
    border-radius: var(--radius-sm);
    border: var(--card-border-w) solid rgba(128, 198, 246, 0.4);
    background: rgba(17, 49, 79, 0.42);
    font-weight: 700;
    color: #d6edff;
}

.food-cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.55rem;
    align-items: center;
}

.food-cart-actions {
    display: inline-flex;
    gap: 0.3rem;
}

.food-cart-actions .btn {
    padding: 0.22rem 0.5rem;
    min-height: 30px;
}

.food-checkout-preview {
    margin-top: 0;
    border: var(--card-border-w) solid rgba(245, 186, 131, 0.42);
    border-radius: var(--radius-sm);
    padding: 0.62rem 0.72rem;
    background: rgba(112, 70, 25, 0.2);
}

.food-checkout-preview .panel-head h4 {
    margin: 0;
    font-size: 0.96rem;
}

.food-review-summary-strip {
    margin-top: 0;
    border-radius: var(--radius-sm);
    border: var(--card-border-w) solid rgba(245, 190, 137, 0.46);
    background: linear-gradient(130deg, rgba(151, 92, 34, 0.28), rgba(46, 112, 156, 0.24));
    padding: 0.56rem 0.68rem;
    color: #ffe8cf;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.34;
}

.food-checkout-items .list-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

.food-checkout-fee-breakdown {
    display: grid;
    gap: 0.28rem;
    padding: 0.44rem 0.5rem;
    border-radius: var(--radius-sm);
    border: var(--card-border-w) solid rgba(243, 187, 130, 0.38);
    background: rgba(112, 71, 29, 0.22);
}

.food-checkout-fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: #f0dfcc;
}

.food-checkout-fee-row.is-total {
    padding-top: 0.32rem;
    border-top: 1px dashed rgba(245, 192, 140, 0.46);
    color: #fff2df;
    font-weight: 800;
}

body.ums-theme .food-cart-tabs {
    border-color: #c5d8ea;
    background: linear-gradient(136deg, #f0f7ff, #fff4e7);
}

body.ums-theme .food-cart-step {
    border-color: #c7d8e7;
    background: #f5faff;
    color: #3d5a74;
}

body.ums-theme .food-cart-step.is-active {
    border-color: #da9f5e;
    background: linear-gradient(128deg, #3a9bdd, #d88a4d);
    color: #fffdf9;
    box-shadow: 0 6px 14px rgba(36, 77, 112, 0.22);
}

body.ums-theme .food-cart-tab-btn {
    color: #2c4e6a;
}

body.ums-theme .food-cart-tab-btn:hover:not(:disabled) {
    border-color: #e5be95;
    color: #7d4a1c;
}

body.ums-theme .food-cart-tab-btn.is-active {
    border-color: #d39f68;
    background: linear-gradient(134deg, #4e9ed7, #d98744);
    color: #fff9f1;
    box-shadow: 0 4px 10px rgba(72, 118, 154, 0.22);
}

body.ums-theme .food-cart-pane-cart {
    background: #edf5fd;
    border-color: #bdd4e8;
}

body.ums-theme .food-cart-pane-review {
    background: #fff3e7;
    border-color: #ebc8a6;
}

body.ums-theme .food-cart-summary {
    background: #e7f1fb;
    border-color: #bed4e8;
    color: #264562;
}

body.ums-theme .food-checkout-preview {
    background: #fff9f1;
    border-color: #e4c5a2;
}

body.ums-theme .food-review-summary-strip {
    border-color: #e6c59f;
    background: linear-gradient(125deg, #fff7ec, #edf7ff);
    color: #5f4a26;
}

body.ums-theme .food-checkout-fee-breakdown {
    border-color: #e5c6a4;
    background: #fff9f2;
}

body.ums-theme .food-checkout-fee-row {
    color: #6f5532;
}

body.ums-theme .food-checkout-fee-row.is-total {
    color: #4f3a1c;
    border-top-color: #e8ccac;
}

body.ums-theme #food-open-cart-btn.has-items::after {
    border-color: #ffffff;
}

#food-slot-select[data-hint="recommended"] {
    border-color: rgba(118, 252, 196, 0.72);
    box-shadow: 0 0 0 1px rgba(118, 252, 196, 0.24);
}

#food-slot-select[data-hint="busy"] {
    border-color: rgba(255, 176, 145, 0.7);
    box-shadow: 0 0 0 1px rgba(255, 176, 145, 0.2);
}

.food-location-status[data-tone="ok"] {
    color: #76e4ac;
}

.food-location-status[data-tone="warn"] {
    color: #ffd18e;
}

.food-location-status[data-tone="error"] {
    color: #ffb6a3;
}

.food-shop-menu-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
}

.food-menu-options {
    margin-top: 0.42rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.36rem;
}

.food-menu-option-field span {
    font-size: 0.7rem;
    color: var(--muted);
}

.food-menu-option-field select {
    min-height: 34px;
    border-radius: 9px;
}

.food-shop-menu-row strong {
    display: block;
    font-size: 0.95rem;
}

.food-shop-menu-row small {
    color: var(--muted);
}

.food-order-stage {
    border-left: 4px solid rgba(90, 173, 237, 0.7);
}

.food-order-stage.warn {
    border-left-color: rgba(255, 177, 129, 0.8);
}

#food-orders-panel {
    position: relative;
    overflow: hidden;
    border-color: rgba(132, 206, 255, 0.74);
    background:
        radial-gradient(circle at 92% 7%, rgba(255, 173, 118, 0.22), transparent 46%),
        linear-gradient(160deg, rgba(13, 45, 72, 0.94), rgba(8, 28, 48, 0.96));
    box-shadow: inset 0 1px 0 rgba(182, 225, 255, 0.2), 0 14px 30px rgba(4, 18, 33, 0.42);
}

@keyframes food-sync-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(93, 190, 251, 0.12);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(93, 190, 251, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(93, 190, 251, 0);
    }
}

#food-orders-panel.is-sync-pulse {
    animation: food-sync-pulse 1.2s ease-out;
}

#food-orders-panel::before {
    content: "";
    position: absolute;
    left: 0.72rem;
    right: 0.72rem;
    top: 0.56rem;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #5db9ff, #f0a766);
    opacity: 0.95;
    pointer-events: none;
}

#food-orders-panel .panel-head {
    padding-top: 0.28rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(141, 208, 246, 0.5);
}

.food-orders-head-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.38rem;
}

.food-freshness-indicator {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: var(--card-border-w) solid rgba(139, 208, 248, 0.5);
    background: rgba(29, 82, 119, 0.34);
    padding: 0.12rem 0.44rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #dcf1ff;
    white-space: nowrap;
}

.food-demand-live-compact {
    margin-top: 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(129, 202, 245, 0.42);
    background: linear-gradient(132deg, rgba(17, 60, 90, 0.58), rgba(13, 44, 69, 0.56));
    padding: 0.42rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.food-demand-live-compact.is-live-active {
    border-color: rgba(132, 226, 185, 0.66);
    box-shadow: 0 0 0 1px rgba(132, 226, 185, 0.22);
}

#food-demand-live-compact-summary {
    color: #d9efff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
}

.food-demand-hot-btn {
    min-height: 30px;
    padding: 0.24rem 0.62rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    white-space: nowrap;
}

.food-demand-hot-btn:disabled {
    opacity: 0.56;
    cursor: not-allowed;
}

.food-demand-minimal {
    margin-top: 0.52rem;
}

.food-demand-pie-layout {
    display: grid;
    grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
    gap: 0.86rem;
    align-items: center;
}

.food-demand-pie-wrap {
    position: relative;
    width: min(100%, 270px);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}

.food-demand-pie-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.food-demand-pie-base {
    stroke: rgba(126, 193, 234, 0.26);
    stroke-width: 32;
}

.food-demand-pie-segment {
    cursor: pointer;
    stroke: rgba(8, 34, 52, 0.46);
    stroke-width: 2;
    transition: opacity var(--motion-fast) var(--motion-ease), filter var(--motion-fast) var(--motion-ease), stroke-width var(--motion-fast) var(--motion-ease);
}

.food-demand-pie-segment:hover {
    filter: brightness(1.1);
    opacity: 0.95;
}

.food-demand-pie-segment.is-active {
    stroke: rgba(255, 255, 255, 0.94);
    stroke-width: 3;
    filter: brightness(1.08) drop-shadow(0 0 8px rgba(128, 214, 255, 0.34));
}

.food-demand-pie-segment.is-live {
    animation: food-demand-segment-live 1.7s ease-in-out infinite;
}

.food-demand-pie-center {
    --selected-color: #63c4ff;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 58%;
    height: 58%;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--selected-color) 48%, rgba(129, 198, 238, 0.44));
    background: linear-gradient(150deg, rgba(15, 53, 81, 0.66), rgba(9, 34, 56, 0.66));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--selected-color) 26%, transparent);
    display: grid;
    place-content: center;
    gap: 0.08rem;
    text-align: center;
    padding: 0.52rem;
}

.food-demand-pie-center small {
    color: #bddbf3;
    font-size: 0.66rem;
    line-height: 1.2;
}

.food-demand-pie-center strong {
    color: #f3fbff;
    font-family: var(--font-mono);
    font-size: 1.4rem;
    line-height: 1;
}

.food-demand-pie-center span {
    color: #cae4f8;
    font-size: 0.68rem;
}

.food-demand-pie-legend {
    display: grid;
    gap: 0.38rem;
    max-height: 244px;
    overflow: auto;
    padding-right: 0.18rem;
}

.food-demand-pie-legend::-webkit-scrollbar {
    width: 7px;
}

.food-demand-pie-legend::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(18, 53, 80, 0.3);
}

.food-demand-pie-legend::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(106, 176, 223, 0.7);
}

.food-demand-legend-item {
    --slot-color: #63c4ff;
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(130, 202, 244, 0.34);
    background: linear-gradient(160deg, rgba(15, 53, 82, 0.4), rgba(10, 37, 60, 0.4));
    padding: 0.34rem 0.42rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.34rem;
    color: #d9edfd;
    text-align: left;
    transition: border-color var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}

.food-demand-legend-item:hover {
    border-color: rgba(163, 224, 255, 0.66);
}

.food-demand-legend-item.is-active {
    border-color: rgba(255, 203, 123, 0.82);
    box-shadow: 0 0 0 1px rgba(255, 203, 123, 0.24);
}

.food-demand-legend-item.is-live {
    box-shadow: inset 0 0 0 1px rgba(131, 228, 186, 0.2);
}

.food-demand-legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--slot-color);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.food-demand-legend-main {
    font-size: 0.72rem;
    font-weight: 700;
    color: #e5f4ff;
}

.food-demand-legend-meta {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: #bddaf0;
}

.food-demand-slot-detail {
    margin-top: 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(131, 202, 243, 0.42);
    background: linear-gradient(155deg, rgba(15, 52, 79, 0.4), rgba(9, 35, 57, 0.4));
    padding: 0.46rem 0.56rem;
    display: grid;
    gap: 0.14rem;
}

.food-demand-slot-detail strong {
    color: #eaf5ff;
    font-size: 0.84rem;
}

.food-demand-slot-detail span {
    color: #c2ddf4;
    font-size: 0.74rem;
}

.food-demand-slot-detail.is-live-updated {
    animation: food-demand-detail-pulse 0.85s ease-out;
}

@keyframes food-demand-detail-pulse {
    from {
        box-shadow: 0 0 0 0 rgba(128, 216, 255, 0.36);
    }
    to {
        box-shadow: 0 0 0 9px rgba(128, 216, 255, 0);
    }
}

@keyframes food-demand-segment-live {
    0%,
    100% {
        filter: drop-shadow(0 0 0 rgba(123, 216, 255, 0));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(123, 216, 255, 0.34));
    }
}

.food-demand-live-strip {
    margin-top: 0.48rem;
    border-radius: 12px;
    border: 1px solid rgba(122, 198, 242, 0.42);
    background: linear-gradient(140deg, rgba(18, 63, 95, 0.72), rgba(12, 40, 66, 0.72));
    padding: 0.48rem 0.52rem;
    display: grid;
    gap: 0.42rem;
    transition: border-color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}

.food-demand-live-strip.is-live-active {
    border-color: rgba(139, 227, 191, 0.65);
    box-shadow: 0 0 0 1px rgba(108, 215, 168, 0.24), 0 10px 20px rgba(6, 29, 46, 0.28);
}

.food-demand-live-strip.is-live-updated {
    animation: food-demand-live-flash 0.9s ease-out;
}

.food-demand-live-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.38rem;
}

.food-demand-live-kpi {
    border-radius: 10px;
    border: 1px solid rgba(135, 204, 245, 0.36);
    background: rgba(18, 56, 86, 0.46);
    padding: 0.26rem 0.36rem 0.3rem;
    display: grid;
    gap: 0.06rem;
}

.food-demand-live-kpi small {
    color: rgba(201, 230, 251, 0.82);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.food-demand-live-kpi strong {
    color: #f3fbff;
    font-size: 1rem;
    font-family: var(--font-mono);
}

.food-demand-live-kpi strong.is-live-updated {
    animation: food-demand-kpi-pop 0.78s ease-out;
}

.food-demand-live-kpi[data-tone="orders"] {
    border-color: rgba(142, 225, 183, 0.52);
}

.food-demand-live-kpi[data-tone="status"] {
    border-color: rgba(145, 206, 246, 0.5);
}

.food-demand-live-kpi[data-tone="payment"] {
    border-color: rgba(255, 201, 137, 0.56);
}

.food-demand-live-kpi[data-tone="active"] {
    border-color: rgba(182, 176, 255, 0.52);
}

.food-demand-live-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.34rem;
}

.food-demand-live-hot-slot {
    color: #d6ecff;
    font-size: 0.76rem;
    font-weight: 700;
}

.food-demand-live-pulses {
    margin-top: 0.36rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.34rem;
    min-height: 1.6rem;
}

.food-demand-live-chip {
    --intensity: 22;
    border-radius: 999px;
    border: 1px solid rgba(133, 206, 247, 0.48);
    background: linear-gradient(120deg, rgba(28, 85, 126, 0.64), rgba(44, 122, 176, 0.72));
    box-shadow: 0 0 calc(var(--intensity) * 0.08px) rgba(105, 197, 255, 0.46);
    color: #dff1ff;
    padding: 0.14rem 0.52rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.food-demand-live-chip.is-idle {
    border-color: rgba(133, 176, 207, 0.42);
    background: rgba(20, 58, 88, 0.52);
    color: rgba(191, 216, 236, 0.9);
}

#food-demand-chart-module {
    margin-top: 0.46rem;
    min-height: 190px;
    grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
    gap: 0.46rem;
    align-content: start;
}

#food-demand-chart-module .bar-col {
    position: relative;
    border-radius: 12px;
    border: 1px solid rgba(130, 204, 247, 0.3);
    background: linear-gradient(170deg, rgba(16, 56, 84, 0.22), rgba(11, 39, 62, 0.24));
    padding: 0.22rem 0.3rem 0.34rem;
    transition: border-color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}

#food-demand-chart-module .bar-col.is-updated {
    border-color: rgba(132, 232, 187, 0.66);
    box-shadow: 0 0 0 1px rgba(132, 232, 187, 0.25);
}

#food-demand-chart-module .bar-col.is-live-hot {
    border-color: rgba(255, 207, 136, 0.62);
    box-shadow: inset 0 0 0 1px rgba(255, 207, 136, 0.2);
}

#food-demand-chart-module .bar-col.is-live-burst::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(120, 214, 255, 0.56);
    pointer-events: none;
    animation: food-demand-live-burst 1.15s ease-out;
}

#food-demand-chart-module .bar-activity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.08rem;
    border-radius: 999px;
    border: 1px solid rgba(124, 204, 248, 0.46);
    background: rgba(28, 88, 126, 0.46);
    color: #dff3ff;
    padding: 0.04rem 0.44rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

#food-demand-chart-module .bar-activity.is-idle {
    border-color: rgba(128, 177, 211, 0.4);
    background: rgba(26, 65, 95, 0.38);
    color: rgba(188, 217, 239, 0.88);
}

#food-demand-chart-module .bar-wrap {
    min-height: 116px;
}

#food-demand-chart-module .bar {
    border-radius: 12px 12px 8px 8px;
}

@keyframes food-demand-live-flash {
    from {
        box-shadow: 0 0 0 0 rgba(113, 205, 255, 0.36);
    }
    to {
        box-shadow: 0 0 0 12px rgba(113, 205, 255, 0);
    }
}

@keyframes food-demand-kpi-pop {
    0% {
        transform: translateY(0);
        text-shadow: 0 0 0 rgba(148, 234, 193, 0);
    }
    45% {
        transform: translateY(-1px);
        text-shadow: 0 0 16px rgba(148, 234, 193, 0.62);
    }
    100% {
        transform: translateY(0);
        text-shadow: 0 0 0 rgba(148, 234, 193, 0);
    }
}

@keyframes food-demand-live-burst {
    0% {
        opacity: 0.82;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.015);
    }
}

.food-orders-scroll {
    margin-top: 0.56rem;
    max-height: 560px;
    overflow: auto;
    padding-right: 0.2rem;
    display: grid;
    gap: 0.82rem;
    position: relative;
    --food-orders-tabs-sticky-top: 0;
    scroll-padding-top: 3rem;
    border-top: 1px solid rgba(126, 196, 239, 0.34);
    padding-top: 0.46rem;
}

.food-orders-scroll::-webkit-scrollbar {
    width: 8px;
}

.food-orders-scroll::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(11, 36, 57, 0.52);
}

.food-orders-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(112, 194, 248, 0.86), rgba(70, 135, 194, 0.8));
}

.food-orders-section {
    border-radius: var(--radius-sm);
    border: var(--card-border-w) solid rgba(132, 203, 247, 0.48);
    background: linear-gradient(168deg, rgba(12, 46, 74, 0.6), rgba(8, 34, 56, 0.58));
    padding: 0.46rem;
    display: grid;
    gap: 0.56rem;
    box-shadow: inset 0 1px 0 rgba(170, 219, 255, 0.14);
}

#food-section .viz-grid .viz-card {
    border-color: rgba(128, 202, 248, 0.46);
    background:
        radial-gradient(circle at 86% 10%, rgba(255, 160, 117, 0.11), transparent 48%),
        linear-gradient(160deg, rgba(15, 48, 74, 0.4), rgba(9, 31, 49, 0.36));
}

#food-section .viz-grid .viz-card:hover {
    border-color: rgba(154, 220, 255, 0.68);
    box-shadow: 0 18px 34px rgba(8, 30, 50, 0.34);
}

.food-orders-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.34rem;
    margin-top: 0.06rem;
    width: 100%;
    padding: 0.2rem;
    border-radius: var(--radius-sm);
    border: var(--card-border-w) solid rgba(130, 204, 248, 0.4);
    background: linear-gradient(170deg, rgba(22, 62, 93, 0.96), rgba(14, 45, 68, 0.95));
    position: sticky;
    top: var(--food-orders-tabs-sticky-top);
    z-index: 12;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    box-shadow: 0 10px 16px rgba(7, 30, 49, 0.28);
    margin-bottom: 0.08rem;
}

.food-orders-tab {
    min-height: 36px;
    width: 100%;
    padding: 0.26rem 0.64rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: rgba(42, 92, 128, 0.26);
    color: #cfe8fb;
    font-weight: 700;
    transition: background-color var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}

.food-orders-tab:hover:not(.is-active) {
    border-color: rgba(140, 210, 249, 0.6);
    background: rgba(60, 113, 151, 0.34);
    color: #eaf6ff;
}

.food-orders-tab:focus-visible {
    outline: 2px solid rgba(139, 212, 255, 0.84);
    outline-offset: 1px;
}

.food-orders-tab.is-active {
    color: #ffffff;
    border-color: rgba(170, 225, 255, 0.92);
    background: linear-gradient(100deg, rgba(58, 155, 236, 0.95), rgba(222, 141, 82, 0.92));
    box-shadow: 0 10px 20px rgba(8, 30, 49, 0.28);
}

.food-orders-subhead {
    margin-top: 0.02rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.42rem 0.58rem;
    border-radius: var(--radius-sm);
    border: var(--card-border-w) solid rgba(142, 211, 251, 0.54);
    background: linear-gradient(92deg, rgba(25, 72, 105, 0.97), rgba(18, 52, 78, 0.96));
    position: relative;
    top: auto;
    z-index: 1;
    min-height: 46px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 6px 10px rgba(8, 31, 49, 0.16);
}

.food-orders-subhead h4 {
    margin: 0;
    font-size: 0.94rem;
    color: #f2f9ff;
    letter-spacing: 0.01em;
}

.food-orders-subhead small,
.food-orders-subhead-meta {
    color: #bbd9f0;
    font-size: 0.72rem;
}

.food-orders-subhead-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.food-payment-recovery-list {
    margin-top: 0.14rem;
    padding: 0.2rem;
    border-radius: var(--radius-sm);
    border: var(--card-border-w) solid rgba(133, 201, 243, 0.46);
    background: rgba(14, 47, 73, 0.42);
    max-height: none;
    overflow: visible;
}

.food-orders-list {
    margin-top: 0.14rem;
    padding: 0.2rem;
    border-radius: var(--radius-sm);
    border: var(--card-border-w) solid rgba(133, 202, 245, 0.46);
    background: rgba(14, 45, 69, 0.42);
    max-height: none;
    overflow: visible;
}

.food-payment-recovery-list .list-item,
.food-orders-list .list-item {
    transition: border-color var(--motion-fast) var(--motion-ease), background-color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}

.food-payment-recovery-list .list-item:hover,
.food-orders-list .list-item:hover {
    border-color: rgba(160, 220, 255, 0.62);
    background: rgba(55, 104, 143, 0.33);
    box-shadow: 0 8px 16px rgba(8, 32, 52, 0.24);
    transform: translateY(-1px);
}

.food-recovery-row {
    align-items: center;
}

.food-recovery-copy {
    display: grid;
    gap: 0.1rem;
}

.food-recovery-copy strong {
    font-size: 0.84rem;
}

.food-recovery-copy small {
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.25;
}

.food-order-card {
    display: block;
    position: relative;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(136, 205, 248, 0.56);
    background: linear-gradient(152deg, rgba(22, 60, 90, 0.56), rgba(10, 35, 56, 0.52));
    box-shadow: 0 8px 18px rgba(6, 27, 44, 0.24), inset 0 1px 0 rgba(181, 223, 252, 0.12);
    color: #e8f4ff;
}

.food-order-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 10px;
    background: linear-gradient(180deg, #68cbff, #339de8);
    box-shadow: 1px 0 0 rgba(148, 214, 251, 0.36);
    pointer-events: none;
    z-index: 0;
}

.food-order-card.warn {
    border-color: rgba(255, 178, 134, 0.58);
    background: linear-gradient(152deg, rgba(106, 56, 36, 0.38), rgba(66, 33, 22, 0.35));
}

.food-order-card.good {
    border-color: rgba(134, 230, 182, 0.56);
    background: linear-gradient(152deg, rgba(26, 90, 63, 0.34), rgba(14, 56, 38, 0.32));
}

.food-order-card.tone-verified {
    border-color: rgba(127, 228, 171, 0.72);
    background: linear-gradient(152deg, rgba(22, 88, 56, 0.46), rgba(12, 56, 35, 0.4));
}

.food-order-card.tone-verified::before {
    background: linear-gradient(180deg, #8df1bd, #3fcf8d);
    box-shadow: 1px 0 0 rgba(140, 238, 187, 0.42);
}

.food-order-card.tone-failed {
    border-color: rgba(255, 150, 140, 0.72);
    background: linear-gradient(152deg, rgba(109, 36, 33, 0.48), rgba(69, 22, 21, 0.44));
}

.food-order-card.tone-failed::before {
    background: linear-gradient(180deg, #ffaba3, #ef615a);
    box-shadow: 1px 0 0 rgba(255, 173, 166, 0.48);
}

.food-order-card.tone-delivered {
    border-color: rgba(247, 205, 120, 0.78);
    background: linear-gradient(152deg, rgba(110, 82, 23, 0.48), rgba(68, 49, 13, 0.42));
}

.food-order-card.tone-delivered::before {
    background: linear-gradient(180deg, #ffe59b, #e7af44);
    box-shadow: 1px 0 0 rgba(255, 223, 142, 0.44);
}

.food-order-card-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    padding: 0.62rem 0.66rem 0.64rem 0.98rem;
    display: grid;
    gap: 0.35rem;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.food-order-card-toggle:hover {
    background: rgba(77, 139, 186, 0.22);
}

.food-order-card-toggle:focus-visible {
    outline: 2px solid rgba(120, 211, 255, 0.92);
    outline-offset: -2px;
    background: rgba(84, 138, 176, 0.22);
}

.food-order-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.food-order-card-title {
    display: grid;
    gap: 0.1rem;
}

.food-order-card-title strong {
    font-size: 0.88rem;
    color: #f5fbff;
}

.food-order-card-title small {
    font-size: 0.72rem;
    color: #b7d2e8;
}

.food-order-badge {
    border: 1px solid rgba(136, 210, 255, 0.62);
    border-radius: 999px;
    padding: 0.14rem 0.52rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: rgba(34, 92, 132, 0.36);
    color: #e9f6ff;
}

.food-order-card.tone-verified .food-order-badge {
    border-color: rgba(139, 239, 187, 0.78);
    background: rgba(30, 122, 78, 0.42);
}

.food-order-card.tone-failed .food-order-badge {
    border-color: rgba(255, 171, 163, 0.82);
    background: rgba(156, 56, 47, 0.42);
}

.food-order-card.tone-delivered .food-order-badge {
    border-color: rgba(255, 223, 136, 0.82);
    background: rgba(148, 112, 26, 0.42);
}

@keyframes food-status-pulse-verified {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(112, 228, 168, 0.28), inset 0 0 0 0 rgba(124, 236, 179, 0.2);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(112, 228, 168, 0), inset 0 0 0 8px rgba(124, 236, 179, 0);
    }
}

@keyframes food-status-pulse-failed {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 143, 134, 0.32), inset 0 0 0 0 rgba(255, 161, 152, 0.22);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 143, 134, 0), inset 0 0 0 8px rgba(255, 161, 152, 0);
    }
}

@keyframes food-strip-pulse-verified {
    0%,
    100% {
        filter: saturate(1) brightness(1);
    }
    50% {
        filter: saturate(1.2) brightness(1.18);
    }
}

@keyframes food-strip-pulse-failed {
    0%,
    100% {
        filter: saturate(1) brightness(1);
    }
    50% {
        filter: saturate(1.2) brightness(1.18);
    }
}

.food-order-card.tone-verified::before {
    animation: food-strip-pulse-verified 1.85s ease-in-out infinite;
}

.food-order-card.tone-failed::before {
    animation: food-strip-pulse-failed 1.15s ease-in-out infinite;
}

.food-order-card.tone-verified .food-order-badge {
    animation: food-status-pulse-verified 1.85s ease-in-out infinite;
}

.food-order-card.tone-failed .food-order-badge {
    animation: food-status-pulse-failed 1.15s ease-in-out infinite;
}

.food-order-card-meta {
    color: #bdd8ee;
    font-size: 0.73rem;
    line-height: 1.3;
    word-break: break-word;
}

.food-order-tracker {
    display: grid;
    gap: 0.18rem;
}

.food-order-tracker small {
    color: #bdd8ee;
    font-size: 0.73rem;
}

.food-order-progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    border: 1px solid rgba(150, 205, 246, 0.5);
    background: rgba(19, 58, 87, 0.64);
    overflow: hidden;
}

.food-order-progress-fill {
    display: block;
    height: 100%;
    width: var(--food-order-progress, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, #6ee1ff, #2fa3ee);
    box-shadow: 0 0 10px rgba(87, 194, 255, 0.4);
}

.food-order-card.tone-verified .food-order-progress-fill {
    background: linear-gradient(90deg, #8cf0bb, #3bcd87);
    box-shadow: 0 0 10px rgba(102, 233, 165, 0.38);
}

.food-order-card.tone-failed .food-order-progress-fill {
    background: linear-gradient(90deg, #ff9f97, #ef5f58);
    box-shadow: 0 0 10px rgba(255, 134, 126, 0.36);
}

.food-order-card.tone-delivered .food-order-progress-fill {
    background: linear-gradient(90deg, #ffe08d, #e8aa3d);
    box-shadow: 0 0 10px rgba(248, 199, 97, 0.36);
}

.food-order-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.food-order-card-foot small {
    color: #bdd8ee;
    font-size: 0.72rem;
}

.food-order-card-chevron {
    font-size: 1rem;
    line-height: 1;
    opacity: 0.8;
    transform: rotate(0deg);
    transition: transform var(--motion-fast) var(--motion-ease);
}

.food-order-card-toggle[aria-expanded="true"] .food-order-card-chevron {
    transform: rotate(90deg);
}

.food-order-group-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 0.64rem 0.4rem 0.92rem;
    position: relative;
    z-index: 1;
}

.food-delivery-confirm-btn-group {
    min-height: 34px;
    padding: 0.36rem 0.82rem;
    font-size: 0.78rem;
    font-weight: 800;
    border-width: 1.5px;
    box-shadow: 0 8px 18px rgba(36, 138, 91, 0.24);
}

.food-order-card-details {
    border-top: 1px dashed rgba(148, 208, 248, 0.56);
    padding: 0.55rem 0.64rem 0.64rem 0.92rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
    max-height: 1200px;
    opacity: 1;
    transition: max-height var(--motion-medium) var(--motion-ease), opacity var(--motion-medium) var(--motion-ease), padding-top var(--motion-medium) var(--motion-ease), padding-bottom var(--motion-medium) var(--motion-ease), border-top-color var(--motion-medium) var(--motion-ease);
}

.food-order-card-details.is-collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-color: transparent;
    pointer-events: none;
}

.food-order-items-list {
    display: grid;
    gap: 0.42rem;
}

.food-order-item-row {
    border-radius: var(--radius-sm);
    border: var(--card-border-w) solid rgba(136, 203, 243, 0.34);
    background: rgba(33, 78, 112, 0.24);
    padding: 0.46rem 0.52rem;
    display: grid;
    gap: 0.2rem;
}

.food-order-item-row.warn {
    border-color: rgba(255, 184, 141, 0.55);
    background: rgba(120, 64, 45, 0.3);
}

.food-order-item-row.good {
    border-color: rgba(139, 232, 184, 0.52);
    background: rgba(32, 109, 75, 0.27);
}

.food-order-item-row.tone-verified {
    border-color: rgba(137, 232, 179, 0.68);
    background: rgba(24, 101, 67, 0.3);
}

.food-order-item-row.tone-failed {
    border-color: rgba(255, 165, 157, 0.72);
    background: rgba(122, 48, 42, 0.34);
}

.food-order-item-row.tone-delivered {
    border-color: rgba(247, 208, 128, 0.72);
    background: rgba(118, 88, 27, 0.34);
}

.food-order-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.food-order-item-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.food-order-item-head strong {
    font-size: 0.82rem;
}

.food-order-item-badge {
    border-radius: 999px;
    border: 1px solid rgba(145, 213, 251, 0.48);
    background: rgba(30, 87, 126, 0.34);
    padding: 0.1rem 0.46rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.food-order-item-row.warn .food-order-item-badge {
    border-color: rgba(255, 185, 144, 0.68);
    background: rgba(145, 83, 54, 0.32);
}

.food-order-item-row.good .food-order-item-badge {
    border-color: rgba(142, 234, 189, 0.68);
    background: rgba(29, 116, 80, 0.34);
}

.food-order-item-row.tone-verified .food-order-item-badge {
    border-color: rgba(146, 237, 192, 0.72);
    background: rgba(33, 123, 83, 0.38);
}

.food-order-item-row.tone-failed .food-order-item-badge {
    border-color: rgba(255, 178, 171, 0.78);
    background: rgba(158, 58, 50, 0.4);
}

.food-order-item-row.tone-delivered .food-order-item-badge {
    border-color: rgba(255, 225, 143, 0.8);
    background: rgba(150, 113, 28, 0.4);
}

.food-delivery-confirm-btn {
    min-height: 24px;
    padding: 0.16rem 0.52rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    border-color: rgba(149, 229, 184, 0.74);
    background: linear-gradient(115deg, rgba(74, 181, 128, 0.88), rgba(35, 143, 92, 0.88));
    color: #f2fffa;
}

.food-delivery-confirm-btn:hover:not(:disabled),
.food-delivery-confirm-btn:active:not(:disabled) {
    border-color: rgba(170, 241, 201, 0.86);
    background: linear-gradient(115deg, rgba(83, 191, 136, 0.92), rgba(43, 154, 102, 0.92));
}

.food-delivery-confirm-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.food-order-item-meta {
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.28;
    word-break: break-word;
}

.food-rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.1rem;
}

.food-rating-row small {
    color: var(--muted);
    font-size: 0.73rem;
}

.food-rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.food-rating-star {
    min-height: 28px;
    min-width: 28px;
    border-radius: 8px;
    border: 1px solid rgba(144, 208, 244, 0.38);
    background: rgba(37, 79, 112, 0.28);
    color: rgba(205, 226, 242, 0.75);
    cursor: pointer;
    line-height: 1;
    font-size: 0.95rem;
}

.food-rating-star.is-selected {
    color: #ffd46a;
    border-color: rgba(255, 214, 114, 0.66);
    background: rgba(121, 86, 17, 0.38);
}

.food-rating-star:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.food-order-card.warn .food-order-badge {
    border-color: rgba(255, 179, 132, 0.72);
    background: rgba(130, 63, 45, 0.4);
}

.food-order-card.good .food-order-badge {
    border-color: rgba(127, 232, 181, 0.72);
    background: rgba(28, 111, 77, 0.36);
}

.food-order-card.good .food-order-progress-fill {
    background: linear-gradient(90deg, #7de6b3, #37c889);
}

body.ums-theme #food-orders-panel {
    border-color: #8fbadd;
    background:
        radial-gradient(circle at 94% 9%, rgba(255, 196, 138, 0.26), transparent 46%),
        linear-gradient(168deg, #f6fbff 0%, #eff6ff 52%, #fff8f0 100%);
    box-shadow: 0 12px 26px rgba(18, 45, 71, 0.16);
}

body.ums-theme #food-orders-panel::before {
    background: linear-gradient(90deg, #2f9de9, #e69a55);
}

body.ums-theme #food-orders-panel .panel-head {
    border-bottom-color: #c4d9ea;
}

body.ums-theme #food-orders-panel.is-sync-pulse {
    animation-name: food-sync-pulse;
}

body.ums-theme .food-orders-scroll {
    border-top: 1px solid #d5e3ef;
    padding-top: 0.48rem;
}

body.ums-theme .food-orders-section {
    border-color: #c8ddeb;
    background: linear-gradient(170deg, #fafdff, #f4f9ff);
}

body.ums-theme .food-freshness-indicator {
    border-color: #b8d3e7;
    background: #ecf5fc;
    color: #355a78;
}

body.ums-theme .food-demand-live-compact {
    border-color: #bed4e7;
    background: linear-gradient(142deg, rgba(239, 247, 255, 0.95), rgba(252, 243, 234, 0.9));
}

body.ums-theme .food-demand-live-compact.is-live-active {
    border-color: #95cbad;
    box-shadow: 0 0 0 1px rgba(149, 203, 173, 0.24);
}

body.ums-theme #food-demand-live-compact-summary {
    color: #325775;
}

body.ums-theme .food-demand-pie-base {
    stroke: rgba(171, 203, 227, 0.34);
}

body.ums-theme .food-demand-pie-segment {
    stroke: rgba(255, 255, 255, 0.76);
}

body.ums-theme .food-demand-pie-segment.is-active {
    stroke: rgba(24, 62, 94, 0.9);
}

body.ums-theme .food-demand-pie-center {
    border-color: #bfd5e7;
    background: linear-gradient(150deg, #f7fcff, #eef6ff);
}

body.ums-theme .food-demand-pie-center small {
    color: #6484a1;
}

body.ums-theme .food-demand-pie-center strong {
    color: #1f4464;
}

body.ums-theme .food-demand-pie-center span {
    color: #6b89a6;
}

body.ums-theme .food-demand-legend-item {
    border-color: #c1d8e9;
    background: linear-gradient(160deg, #f8fcff, #eef6ff);
    color: #284d6d;
}

body.ums-theme .food-demand-legend-item:hover {
    border-color: #9dc4df;
}

body.ums-theme .food-demand-legend-item.is-active {
    border-color: #d6b275;
    box-shadow: 0 0 0 1px rgba(214, 178, 117, 0.24);
}

body.ums-theme .food-demand-legend-main {
    color: #355d7f;
}

body.ums-theme .food-demand-legend-meta {
    color: #5f7f9f;
}

body.ums-theme .food-demand-slot-detail {
    border-color: #bed5e8;
    background: linear-gradient(155deg, rgba(241, 248, 255, 0.95), rgba(252, 243, 234, 0.9));
}

body.ums-theme .food-demand-slot-detail strong {
    color: #1e4363;
}

body.ums-theme .food-demand-slot-detail span {
    color: #4d6f8e;
}

body.ums-theme .food-demand-live-strip {
    border-color: #b9d4e8;
    background: linear-gradient(145deg, rgba(239, 247, 255, 0.95), rgba(252, 242, 232, 0.92));
}

body.ums-theme .food-demand-live-strip.is-live-active {
    border-color: #91c6ab;
    box-shadow: 0 0 0 1px rgba(133, 205, 169, 0.28), 0 10px 20px rgba(22, 46, 69, 0.14);
}

body.ums-theme .food-demand-live-kpi {
    border-color: #b8d3e7;
    background: #ffffff;
}

body.ums-theme .food-demand-live-kpi small {
    color: #5f7f9e;
}

body.ums-theme .food-demand-live-kpi strong {
    color: #1a3f61;
}

body.ums-theme .food-demand-live-kpi[data-tone="orders"] {
    border-color: #9fceb2;
    background: #f2fbf6;
}

body.ums-theme .food-demand-live-kpi[data-tone="status"] {
    border-color: #9fc7e3;
    background: #f2f8fd;
}

body.ums-theme .food-demand-live-kpi[data-tone="payment"] {
    border-color: #dfc08f;
    background: #fff6e7;
}

body.ums-theme .food-demand-live-kpi[data-tone="active"] {
    border-color: #bcb8e8;
    background: #f5f3ff;
}

body.ums-theme .food-demand-live-hot-slot {
    color: #395b78;
}

body.ums-theme .food-demand-live-chip {
    border-color: #a9cae2;
    background: linear-gradient(120deg, #ecf5fd, #dbeeff);
    color: #2b5273;
    box-shadow: 0 0 calc(var(--intensity) * 0.08px) rgba(98, 168, 222, 0.35);
}

body.ums-theme .food-demand-live-chip.is-idle {
    border-color: #c4d7e7;
    background: #f3f8fd;
    color: #6682a1;
}

body.ums-theme #food-demand-chart-module .bar-col {
    border-color: #c3d8e9;
    background: linear-gradient(170deg, #f8fcff, #eef6ff);
}

body.ums-theme #food-demand-chart-module .bar-col.is-updated {
    border-color: #8dcaab;
    box-shadow: 0 0 0 1px rgba(141, 202, 171, 0.24);
}

body.ums-theme #food-demand-chart-module .bar-col.is-live-hot {
    border-color: #d7b57c;
    box-shadow: inset 0 0 0 1px rgba(215, 181, 124, 0.2);
}

body.ums-theme #food-demand-chart-module .bar-activity {
    border-color: #b4cfe3;
    background: #e9f3fd;
    color: #2f5a7d;
}

body.ums-theme #food-demand-chart-module .bar-activity.is-idle {
    border-color: #c7d7e3;
    background: #f2f7fc;
    color: #6a86a2;
}

body.ums-theme #food-section .viz-grid .viz-card {
    border-color: #bfd5e8;
    background:
        radial-gradient(circle at 88% 12%, rgba(255, 198, 145, 0.24), transparent 50%),
        linear-gradient(165deg, #f8fbff, #edf5ff);
}

body.ums-theme #food-section .viz-grid .viz-card:hover {
    border-color: #9fc5e5;
    box-shadow: 0 12px 24px rgba(20, 44, 67, 0.14);
}

body.ums-theme .food-orders-tabs {
    border-color: #c6dbee;
    background: linear-gradient(180deg, rgba(247, 251, 255, 0.98), rgba(238, 246, 253, 0.98));
    box-shadow: 0 8px 16px rgba(22, 47, 71, 0.12);
}

body.ums-theme .food-orders-tab {
    background: #f8fcff;
    color: #355474;
}

body.ums-theme .food-orders-tab:hover:not(.is-active) {
    border-color: #b9d4e8;
    background: #ecf5ff;
    color: #21486d;
}

body.ums-theme .food-orders-tab.is-active {
    color: #f8fcff;
    border-color: #4ea6e6;
    background: linear-gradient(98deg, #2f99e7, #d99252);
    box-shadow: 0 8px 18px rgba(31, 65, 96, 0.2);
}

body.ums-theme .food-orders-subhead {
    border-color: #c8dcec;
    background: linear-gradient(92deg, rgba(239, 247, 255, 0.98), rgba(255, 246, 236, 0.98));
    box-shadow: 0 6px 12px rgba(24, 52, 78, 0.1);
}

body.ums-theme .food-orders-subhead small,
body.ums-theme .food-orders-subhead-meta {
    color: #5a738d;
}

body.ums-theme .food-payment-recovery-list,
body.ums-theme .food-orders-list {
    border-color: #b9d1e4;
    background: linear-gradient(180deg, #ffffff, #f6fbff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.ums-theme .food-payment-recovery-list .list-item,
body.ums-theme .food-orders-list .list-item {
    border-color: #bfd5e7;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(34, 73, 109, 0.05);
}

body.ums-theme .food-payment-recovery-list .list-item:hover,
body.ums-theme .food-orders-list .list-item:hover {
    border-color: #8fb8d7;
    background: #f1f8ff;
    box-shadow: 0 8px 16px rgba(24, 52, 78, 0.14);
}

body.ums-theme .food-order-badge {
    border-color: #7eaed3;
    background: #dfeefe;
    color: #1e4968;
}

body.ums-theme .food-order-card {
    border-color: #aac8de;
    background: linear-gradient(160deg, #ffffff, #f5f9ff);
    box-shadow: 0 8px 16px rgba(22, 53, 80, 0.1);
}

body.ums-theme .food-order-card::before {
    background: linear-gradient(180deg, #4ea6de, #2b7fc0);
    box-shadow: 1px 0 0 rgba(117, 171, 212, 0.44);
}

body.ums-theme .food-order-card.warn {
    border-color: #e7b992;
    background: linear-gradient(160deg, #fff8f1, #fff0e5);
}

body.ums-theme .food-order-card.good {
    border-color: #9ad7b5;
    background: linear-gradient(160deg, #f2fcf6, #e7f8ef);
}

body.ums-theme .food-order-card.tone-verified {
    border-color: #8ec8a7;
    background: linear-gradient(160deg, #f0fcf4, #e2f5ea);
}

body.ums-theme .food-order-card.tone-verified::before {
    background: linear-gradient(180deg, #4fbe87, #2d9164);
    box-shadow: 1px 0 0 rgba(125, 198, 159, 0.48);
}

body.ums-theme .food-order-card.tone-failed {
    border-color: #e4aaa2;
    background: linear-gradient(160deg, #fff4f2, #ffe5e2);
}

body.ums-theme .food-order-card.tone-failed::before {
    background: linear-gradient(180deg, #e17367, #c2473b);
    box-shadow: 1px 0 0 rgba(215, 139, 131, 0.5);
}

body.ums-theme .food-order-card.tone-delivered {
    border-color: #dcb779;
    background: linear-gradient(160deg, #fff9ea, #ffefcc);
}

body.ums-theme .food-order-card.tone-delivered::before {
    background: linear-gradient(180deg, #d9ab4f, #b47c19);
    box-shadow: 1px 0 0 rgba(203, 165, 96, 0.52);
}

body.ums-theme .food-order-card.tone-verified .food-order-badge {
    border-color: #95c9aa;
    background: #dbf2e4;
    color: #1c5b3c;
}

body.ums-theme .food-order-card.tone-failed .food-order-badge {
    border-color: #deada7;
    background: #fce6e3;
    color: #81261d;
}

body.ums-theme .food-order-card.tone-delivered .food-order-badge {
    border-color: #d4b16f;
    background: #fbe9c3;
    color: #684706;
}

body.ums-theme .food-order-card-toggle:hover {
    background: rgba(100, 156, 197, 0.12);
}

body.ums-theme .food-order-card-toggle:focus-visible {
    outline-color: #4fabe7;
    background: rgba(109, 164, 202, 0.18);
}

body.ums-theme .food-order-card-details {
    border-top-color: #caddeb;
}

body.ums-theme .food-order-progress-bar {
    border-color: #b6d2e5;
    background: #e4eff9;
}

body.ums-theme .food-order-progress-fill {
    box-shadow: 0 0 0 1px rgba(88, 155, 202, 0.08);
}

body.ums-theme .food-order-item-row {
    border-color: #bfd5e5;
    background: #ffffff;
}

body.ums-theme .food-order-item-row.warn {
    border-color: #e6c39c;
    background: #fff5e9;
}

body.ums-theme .food-order-item-row.good {
    border-color: #b5dcc5;
    background: #eef9f2;
}

body.ums-theme .food-order-item-row.tone-verified {
    border-color: #abd8bf;
    background: #eaf8f0;
}

body.ums-theme .food-order-item-row.tone-failed {
    border-color: #e1b5af;
    background: #fff0ed;
}

body.ums-theme .food-order-item-row.tone-delivered {
    border-color: #e0c38b;
    background: #fff5df;
}

body.ums-theme .food-order-item-badge {
    border-color: #9fc1db;
    background: #e2effa;
    color: #254e70;
}

body.ums-theme .food-order-item-row.tone-verified .food-order-item-badge {
    border-color: #98c9ac;
    background: #dff2e7;
    color: #1a5a3a;
}

body.ums-theme .food-order-item-row.tone-failed .food-order-item-badge {
    border-color: #d8aaa4;
    background: #fbe3df;
    color: #7c261d;
}

body.ums-theme .food-order-item-row.tone-delivered .food-order-item-badge {
    border-color: #d3b16f;
    background: #f9e8c5;
    color: #66470a;
}

body.ums-theme .food-order-card-title strong {
    color: #193d5d;
}

body.ums-theme .food-order-card-title small {
    color: #45698a;
}

body.ums-theme .food-order-card-meta {
    color: #3d6588;
}

body.ums-theme .food-order-tracker small {
    color: #416a8d;
}

body.ums-theme .food-order-card-foot small {
    color: #4b7393;
}

body.ums-theme .food-order-card-chevron {
    color: #4b7393;
}

body.ums-theme .food-order-item-head strong {
    color: #173b59;
}

body.ums-theme .food-order-item-meta {
    color: #4a6f90;
}

body.ums-theme .food-delivery-confirm-btn {
    border-color: #8ecda8;
    background: linear-gradient(115deg, #54b985, #3d9f6d);
    color: #f5fffa;
}

body.ums-theme .food-delivery-confirm-btn-group {
    border-color: #78bc93;
    background: linear-gradient(112deg, #3da874, #2f8f61);
    color: #f8fff9;
    box-shadow: 0 8px 16px rgba(34, 104, 71, 0.2);
}

body.ums-theme .food-delivery-confirm-btn:hover:not(:disabled),
body.ums-theme .food-delivery-confirm-btn:active:not(:disabled) {
    border-color: #7dc19a;
    background: linear-gradient(115deg, #4dad7b, #389262);
}

body.ums-theme .food-rating-star {
    border-color: #c5d8e7;
    background: #f0f6fb;
    color: #8aa1b2;
}

body.ums-theme .food-rating-star.is-selected {
    border-color: #f0bc59;
    background: #fff1d3;
    color: #d28e17;
}

.food-ai-controls {
    margin: 0 0.72rem 0.72rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
}

.food-ai-field {
    flex: 1 1 280px;
}

.food-ai-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0;
}

.food-ai-chip {
    border-color: rgba(140, 204, 247, 0.54);
    background: rgba(26, 84, 124, 0.42);
    color: #dff2ff;
    border-radius: 999px;
    min-height: 30px;
    padding: 0.32rem 0.66rem;
    font-size: 0.74rem;
    font-weight: 700;
    transition: transform var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease);
}

.food-ai-chip:hover {
    transform: translateY(-1px);
    background: rgba(41, 104, 148, 0.52);
    border-color: rgba(180, 226, 255, 0.72);
}

.verlyn-sidebar-widget,
.support-desk-widget {
    --assist-panel-bg: linear-gradient(165deg, rgba(10, 38, 64, 0.98), rgba(8, 24, 41, 0.97));
    --assist-panel-border: rgba(132, 196, 235, 0.5);
    --assist-panel-shadow: 0 24px 42px rgba(5, 18, 31, 0.5);
    --assist-surface: linear-gradient(160deg, rgba(16, 53, 86, 0.76), rgba(11, 34, 58, 0.72));
    --assist-surface-alt: rgba(13, 44, 72, 0.58);
    --assist-surface-strong: rgba(12, 40, 67, 0.9);
    --assist-surface-mine: linear-gradient(160deg, rgba(35, 112, 177, 0.82), rgba(18, 67, 115, 0.92));
    --assist-border: rgba(131, 194, 232, 0.4);
    --assist-border-strong: rgba(164, 219, 250, 0.52);
    --assist-text: #eef8ff;
    --assist-text-soft: #c7dff0;
    --assist-text-muted: #95b7d2;
    --assist-heading: #f7fcff;
    --assist-label: #d8ebf8;
    --assist-field-bg: rgba(18, 50, 77, 0.9);
    --assist-field-border: rgba(128, 191, 229, 0.42);
    --assist-field-text: #eaf6ff;
    --assist-placeholder: rgba(176, 205, 227, 0.56);
    --assist-button-bg: rgba(230, 247, 255, 0.14);
    --assist-button-border: rgba(226, 245, 255, 0.46);
    --assist-button-text: #eff9ff;
    --assist-message-shadow: 0 8px 18px rgba(3, 16, 29, 0.24);
}

.support-desk-widget {
    position: fixed;
    right: 1.1rem;
    bottom: calc(1.05rem + env(safe-area-inset-bottom));
    z-index: 34;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.support-desk-toggle-btn {
    position: relative;
    border: 1px solid rgba(157, 217, 248, 0.78);
    border-radius: 16px;
    padding: 0.54rem 0.86rem 0.54rem 0.62rem;
    background: linear-gradient(138deg, #2e7ce1, #24b4df);
    color: #f6fbff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(11, 44, 76, 0.24);
    transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
    display: flex;
    align-items: center;
    gap: 0.58rem;
    min-width: 214px;
    min-height: 58px;
    text-align: left;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.support-desk-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(11, 44, 76, 0.3);
}

.support-desk-toggle-btn.is-active {
    background: linear-gradient(138deg, #286fd6, #1da2cf);
}

.support-desk-avatar,
.support-desk-head-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(239, 250, 255, 0.8);
    background: linear-gradient(150deg, rgba(12, 52, 82, 0.42), rgba(22, 92, 134, 0.26));
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
}

.support-desk-toggle-copy {
    display: grid;
    gap: 0.03rem;
    line-height: 1.1;
    min-width: 0;
    flex: 1 1 auto;
}

.support-desk-toggle-copy strong {
    font-size: 0.93rem;
    letter-spacing: 0.01em;
}

.support-desk-toggle-copy small {
    font-size: 0.73rem;
    color: rgba(238, 249, 255, 0.95);
    font-weight: 600;
}

.support-desk-unread {
    position: absolute;
    top: -0.38rem;
    right: -0.34rem;
    min-width: 1.36rem;
    height: 1.36rem;
    border-radius: 999px;
    border: 1px solid rgba(253, 214, 214, 0.88);
    background: #dc4a39;
    color: #fff7f6;
    font-size: 0.7rem;
    font-weight: 800;
    display: grid;
    place-items: center;
    padding: 0 0.3rem;
    box-shadow: 0 6px 14px rgba(141, 28, 21, 0.32);
}

.support-desk-panel {
    width: min(412px, calc(100vw - 1.2rem));
    border: 1px solid var(--assist-panel-border);
    border-radius: 20px;
    background: var(--assist-panel-bg);
    box-shadow: var(--assist-panel-shadow);
    transform-origin: right bottom;
    transform: translateY(12px) scale(0.92);
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.support-desk-widget.is-open .support-desk-panel {
    opacity: 1;
    pointer-events: auto;
    max-height: min(76vh, 700px);
    transform: translateY(0) scale(1);
    animation: chotu-swing-open 300ms cubic-bezier(0.2, 0.82, 0.28, 1);
    overflow: hidden;
}

.support-desk-widget.is-closing .support-desk-panel {
    animation: chotu-swing-close 280ms cubic-bezier(0.5, 0.02, 0.65, 0.16);
}

.support-desk-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.54rem;
    padding: 0.72rem 0.86rem;
    background: linear-gradient(136deg, rgba(41, 127, 218, 0.99), rgba(32, 176, 214, 0.97));
    border-bottom: 1px solid rgba(177, 229, 255, 0.56);
}

.support-desk-head-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.56rem;
}

.support-desk-head-copy {
    display: grid;
    gap: 0.03rem;
    min-width: 0;
}

.support-desk-head-copy strong {
    color: #f4fbff;
    font-size: 0.92rem;
    font-weight: 800;
}

.support-desk-head-copy small {
    color: rgba(238, 249, 255, 0.92);
    font-size: 0.72rem;
    line-height: 1.25;
}

.support-desk-minimize-btn {
    min-height: 35px;
    padding-inline: 0.74rem;
    font-size: 0.74rem;
    border-color: var(--assist-button-border);
    background: var(--assist-button-bg);
    color: var(--assist-button-text);
}

.support-desk-status {
    margin: 0.56rem 0.86rem 0;
    font-size: 0.75rem;
    line-height: 1.35;
    padding: 0.46rem 0.54rem;
    border-radius: 10px;
    border: 1px solid var(--assist-border);
    background: var(--assist-surface-alt);
    color: var(--assist-text-soft);
}

.support-desk-controls {
    margin: 0.54rem 0.86rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.56rem;
}

.support-desk-controls .field > span {
    font-size: 0.73rem;
    margin-bottom: 0.21rem;
    font-weight: 700;
    color: var(--assist-label);
}

.support-desk-controls .field select {
    width: 100%;
    min-height: 42px;
    font-size: 0.84rem;
    border-radius: 11px;
    color: var(--assist-field-text);
    background: var(--assist-field-bg);
    border: 1px solid var(--assist-field-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.support-desk-thread-meta {
    margin: 0.5rem 0.86rem 0;
    font-size: 0.75rem;
    color: var(--assist-text-muted);
    line-height: 1.34;
}

.support-desk-messages {
    margin: 0.52rem 0.86rem 0;
    border: 1px solid var(--assist-border);
    border-radius: 12px;
    background: var(--assist-surface);
    padding: 0.62rem;
    min-height: 160px;
    max-height: min(38vh, 336px);
    overflow: auto;
    display: grid;
    gap: 0.52rem;
}

.support-desk-message {
    max-width: min(92%, 326px);
    border-radius: 12px;
    padding: 0.5rem 0.62rem;
    border: 1px solid var(--assist-border);
    background: var(--assist-surface-strong);
    box-shadow: var(--assist-message-shadow);
    display: grid;
    gap: 0.22rem;
}

.support-desk-message.mine {
    margin-left: auto;
    border-color: var(--assist-border-strong);
    background: var(--assist-surface-mine);
}

.support-desk-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    font-size: 0.68rem;
    color: var(--assist-text-muted);
}

.support-desk-message-header strong {
    font-size: 0.73rem;
    color: var(--assist-heading);
}

.support-desk-message-text {
    font-size: 0.82rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--assist-text);
}

.support-desk-empty {
    font-size: 0.79rem;
    color: var(--assist-text-muted);
    text-align: center;
    padding: 0.92rem 0.48rem;
}

.support-desk-compose-field {
    margin: 0.58rem 0.86rem 0;
}

.support-desk-compose-field > span {
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--assist-label);
}

.support-desk-compose-field textarea {
    width: 100%;
    min-height: 76px;
    resize: vertical;
    font: inherit;
    font-size: 0.84rem;
    line-height: 1.4;
    border-radius: 11px;
    color: var(--assist-field-text);
    background: var(--assist-field-bg);
    border: 1px solid var(--assist-field-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.support-desk-actions {
    margin: 0.6rem 0.86rem 0.84rem;
    justify-content: flex-end;
}

.support-desk-compose-field textarea::placeholder {
    color: var(--assist-placeholder);
}

.support-desk-actions .btn {
    min-height: 40px;
    border-radius: 11px;
    padding-inline: 1.05rem;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.chotu-widget {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
}

.chotu-hint {
    max-width: 236px;
    display: grid;
    gap: 0.06rem;
    border-radius: 12px;
    padding: 0.5rem 0.7rem;
    border: 1px solid rgba(255, 187, 114, 0.92);
    background: linear-gradient(145deg, rgba(255, 170, 72, 0.98), rgba(241, 124, 47, 0.96));
    color: #fff8ee;
    font-size: 0.82rem;
    line-height: 1.25;
    box-shadow: 0 12px 24px rgba(88, 44, 14, 0.33);
    animation: chotu-hint-pulse 1.9s ease-in-out infinite;
}

.chotu-hint strong {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.chotu-hint small {
    font-size: 0.73rem;
    font-weight: 700;
    color: rgba(255, 248, 236, 0.95);
}

.chotu-toggle-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(146, 213, 255, 0.74);
    border-radius: 999px;
    padding: 0.46rem 0.66rem;
    background: linear-gradient(135deg, #2f84ff, #22c7ff);
    color: #f9fdff;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(10, 42, 71, 0.36), 0 0 0 1px rgba(97, 188, 255, 0.22), 0 0 20px rgba(50, 167, 255, 0.32);
    transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), filter var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.42rem;
    min-width: 148px;
}

.chotu-toggle-btn::before {
    content: "";
    position: absolute;
    inset: -22%;
    z-index: -1;
    background: radial-gradient(circle at 50% 45%, rgba(114, 212, 255, 0.65), rgba(114, 212, 255, 0));
    animation: chotu-launch-glow 1.9s ease-in-out infinite;
}

.chotu-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(10, 42, 71, 0.44), 0 0 0 1px rgba(97, 188, 255, 0.26), 0 0 26px rgba(50, 167, 255, 0.4);
    filter: saturate(1.08);
}

.chotu-toggle-btn.is-active {
    background: linear-gradient(135deg, #2a77ea, #1daee0);
}

.chotu-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(235, 248, 255, 0.72);
    background: rgba(7, 35, 59, 0.3);
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 800;
}

.chotu-toggle-copy {
    display: grid;
    text-align: left;
    gap: 0.05rem;
    line-height: 1.15;
}

.chotu-toggle-copy strong {
    font-size: 0.87rem;
    font-weight: 800;
}

.chotu-toggle-copy small {
    font-size: 0.67rem;
    color: rgba(235, 248, 255, 0.9);
}

.chotu-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8cffb9;
    box-shadow: 0 0 0 0 rgba(140, 255, 185, 0.6);
    animation: chotu-dot-ping 1.7s ease-out infinite;
}

.chotu-panel {
    width: min(368px, calc(100vw - 1.2rem));
    border: 1px solid rgba(133, 201, 248, 0.54);
    border-radius: 18px;
    background: linear-gradient(165deg, rgba(12, 45, 78, 0.98), rgba(13, 30, 54, 0.96));
    box-shadow: 0 20px 38px rgba(6, 20, 34, 0.5);
    transform-origin: right bottom;
    transform: translateY(16px) scale(0.84) rotate(-7deg);
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
}

.chotu-widget.is-open .chotu-panel {
    opacity: 1;
    pointer-events: auto;
    max-height: min(74vh, 640px);
    transform: translateY(0) scale(1) rotate(0deg);
    animation: chotu-swing-open 300ms cubic-bezier(0.2, 0.82, 0.28, 1);
    overflow: hidden;
}

.chotu-widget.is-closing .chotu-panel {
    animation: chotu-swing-close 280ms cubic-bezier(0.5, 0.02, 0.65, 0.16);
}

.chotu-widget.is-open .chotu-hint {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
    pointer-events: none;
    animation: none;
}

.chotu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.62rem 0.72rem;
    background: linear-gradient(135deg, rgba(38, 128, 219, 0.98), rgba(29, 181, 236, 0.95));
    border-bottom: 1px solid rgba(166, 225, 255, 0.44);
}

.chotu-head-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chotu-head-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    border: 1px solid rgba(236, 249, 255, 0.78);
    background: rgba(5, 43, 72, 0.28);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.74rem;
    color: #eff9ff;
}

.chotu-head-copy {
    min-width: 0;
    display: grid;
    line-height: 1.16;
}

.chotu-head-copy strong {
    font-size: 0.95rem;
    color: #f5fcff;
}

.chotu-head-copy small {
    font-size: 0.71rem;
    color: rgba(239, 251, 255, 0.95);
}

.chotu-minimize-btn {
    min-height: 30px;
    border-radius: 999px;
    border-color: rgba(229, 247, 255, 0.58);
    background: rgba(227, 246, 255, 0.14);
    color: #f1fbff;
    padding: 0.18rem 0.55rem;
}

.chotu-body {
    padding: 0.7rem 0.72rem 0.55rem;
    display: grid;
    gap: 0.54rem;
}

.chotu-output {
    margin-top: 0;
    min-height: 150px;
    max-height: min(34vh, 270px);
    overflow: auto;
    border-color: rgba(149, 212, 249, 0.5);
    background: linear-gradient(160deg, rgba(16, 54, 89, 0.7), rgba(15, 40, 67, 0.6));
    color: #e6f6ff;
    font-size: 0.84rem;
}

.chotu-compose-field {
    margin: 0 0.72rem 0.2rem;
}

.chotu-compose-field span {
    font-size: 0.74rem;
    font-weight: 700;
    color: #c8e6fb;
}

.chotu-compose-field input {
    min-height: 41px;
    border-radius: 12px;
}

.food-ai-controls .btn {
    border-radius: 999px;
    min-height: 38px;
    padding: 0.44rem 0.9rem;
    font-size: 0.8rem;
}

@keyframes chotu-hint-pulse {
    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 12px 24px rgba(88, 44, 14, 0.33);
    }
    50% {
        transform: translateY(-1px);
        box-shadow: 0 16px 28px rgba(88, 44, 14, 0.42);
    }
}

@keyframes chotu-dot-ping {
    0% {
        box-shadow: 0 0 0 0 rgba(140, 255, 185, 0.56);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(140, 255, 185, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(140, 255, 185, 0);
    }
}

@keyframes chotu-launch-glow {
    0%,
    100% {
        opacity: 0.44;
        transform: scale(0.94);
    }
    50% {
        opacity: 0.72;
        transform: scale(1.06);
    }
}

@keyframes chotu-swing-open {
    from {
        transform: translateY(18px) scale(0.82) rotate(-8deg);
        opacity: 0.06;
    }
    to {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes chotu-swing-close {
    from {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: translateY(15px) scale(0.84) rotate(-7deg);
        opacity: 0;
    }
}

body.ums-theme .chotu-toggle-btn {
    border-color: rgba(106, 170, 224, 0.72);
    box-shadow: 0 10px 22px rgba(34, 77, 118, 0.26), 0 0 0 1px rgba(97, 188, 255, 0.22), 0 0 18px rgba(50, 167, 255, 0.3);
}

body.ums-theme .chotu-hint {
    border-color: rgba(255, 179, 108, 0.92);
    background: linear-gradient(145deg, #ffa43d, #f07b2f);
    color: #fff7ea;
    box-shadow: 0 10px 20px rgba(157, 85, 26, 0.24);
}

body.ums-theme .chotu-panel {
    border-color: rgba(129, 185, 231, 0.58);
    background: linear-gradient(145deg, #f5faff, #ecf5ff);
    box-shadow: 0 18px 34px rgba(38, 74, 109, 0.2);
}

body.ums-theme .chotu-head {
    background: linear-gradient(135deg, #2f89ff, #1ec0ff);
    border-bottom-color: rgba(160, 217, 255, 0.64);
}

body.ums-theme .chotu-head-copy strong {
    color: #f9fdff;
}

body.ums-theme .chotu-head-copy small {
    color: rgba(248, 253, 255, 0.95);
}

body.ums-theme .chotu-minimize-btn {
    border-color: rgba(237, 250, 255, 0.6);
    background: rgba(240, 250, 255, 0.2);
    color: #f9fdff;
}

body.ums-theme .chotu-avatar {
    border-color: rgba(216, 235, 251, 0.8);
    background: rgba(29, 79, 120, 0.2);
}

body.ums-theme .chotu-output {
    border-color: rgba(154, 206, 245, 0.58);
    background: linear-gradient(160deg, rgba(228, 241, 255, 0.8), rgba(216, 233, 248, 0.68));
    color: #244765;
}

body.ums-theme .chotu-compose-field span {
    color: #2a557b;
}

body.ums-theme .support-desk-widget {
    --assist-panel-bg: linear-gradient(160deg, rgba(248, 252, 255, 0.99), rgba(235, 244, 252, 0.98));
    --assist-panel-border: rgba(137, 194, 233, 0.62);
    --assist-panel-shadow: 0 22px 38px rgba(33, 70, 102, 0.16);
    --assist-surface: linear-gradient(160deg, rgba(232, 244, 254, 0.92), rgba(222, 237, 249, 0.86));
    --assist-surface-alt: rgba(233, 245, 254, 0.84);
    --assist-surface-strong: rgba(255, 255, 255, 0.96);
    --assist-surface-mine: linear-gradient(160deg, rgba(219, 240, 255, 0.97), rgba(203, 231, 252, 0.96));
    --assist-border: rgba(156, 205, 240, 0.58);
    --assist-border-strong: rgba(134, 191, 233, 0.62);
    --assist-text: #1d3850;
    --assist-text-soft: #4f6982;
    --assist-text-muted: #6c859a;
    --assist-heading: #163754;
    --assist-label: #305979;
    --assist-field-bg: #ffffff;
    --assist-field-border: #c7d8e8;
    --assist-field-text: #27435a;
    --assist-placeholder: rgba(103, 123, 140, 0.78);
    --assist-button-bg: rgba(239, 248, 255, 0.68);
    --assist-button-border: rgba(182, 216, 239, 0.7);
    --assist-button-text: #1e5178;
    --assist-message-shadow: 0 8px 18px rgba(32, 68, 101, 0.12);
}

body.ums-theme .support-desk-toggle-btn {
    border-color: rgba(126, 190, 236, 0.72);
    background: linear-gradient(138deg, #2c7fe4, #22aedd);
    box-shadow: 0 12px 28px rgba(33, 77, 117, 0.22);
}

body.ums-theme .food-ai-chip {
    border-color: rgba(124, 184, 233, 0.56);
    background: rgba(205, 228, 247, 0.65);
    color: #215279;
}

body.ums-theme .food-ai-chip:hover {
    background: rgba(184, 218, 244, 0.86);
    border-color: rgba(87, 159, 218, 0.75);
}

.remedial-faculty-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 0.88rem;
    align-items: start;
}

.remedial-faculty-column {
    min-width: 0;
    display: grid;
    gap: 0.88rem;
    align-content: start;
}

.remedial-faculty-layout > .remedial-faculty-card {
    min-width: 0;
}

.remedial-faculty-card {
    border-radius: 16px;
    border: 1px solid rgba(140, 194, 232, 0.35);
    background: linear-gradient(160deg, rgba(18, 48, 74, 0.55), rgba(21, 54, 84, 0.45));
    padding: 0.92rem 0.96rem 0.96rem;
    box-shadow: 0 14px 30px rgba(5, 18, 31, 0.16);
}

body.ums-theme .remedial-faculty-card {
    border-color: #c5d9ec;
    background: linear-gradient(160deg, #ffffff, #f1f7ff);
    box-shadow: 0 10px 24px rgba(37, 79, 120, 0.1);
}

body.ums-theme #remedial-faculty-panel .remedial-faculty-card .field > span {
    color: #4d6880;
}

body.ums-theme #faculty-message-status {
    color: #4d6780;
}

.remedial-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.86rem;
    margin-bottom: 0.72rem;
}

.remedial-card-head h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #e9f4ff;
}

.remedial-card-head p {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: rgba(226, 239, 250, 0.8);
}

body.ums-theme .remedial-card-head h4 {
    color: #163552;
}

body.ums-theme .remedial-card-head p {
    color: #4c6985;
}

.remedial-card-head.compact {
    margin-bottom: 0.52rem;
    min-height: 0;
}

.remedial-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.62rem 0.72rem;
}

.remedial-form-grid > .field,
.remedial-attendance-controls > .field {
    min-width: 180px;
}

.remedial-custom-message-field {
    grid-column: 1 / -1;
}

.remedial-form-actions {
    margin-top: 0.66rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.68rem;
}

.remedial-classes-card,
.remedial-previous-card,
.remedial-message-card,
.remedial-attendance-card {
    display: grid;
    grid-auto-rows: min-content;
    gap: 0.58rem;
    align-content: start;
}

#remedial-faculty-panel .remedial-faculty-card {
    padding: 0.94rem 1rem;
    align-self: start;
    height: fit-content;
    min-width: 0;
}

#remedial-faculty-panel .remedial-card-head.compact {
    margin-bottom: 0.62rem;
    min-height: 0;
}

#remedial-faculty-panel .remedial-faculty-card .field > span {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

#remedial-faculty-panel .remedial-faculty-card input,
#remedial-faculty-panel .remedial-faculty-card select {
    min-height: 46px;
}

#remedial-faculty-panel .remedial-message-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem 0.82rem;
    align-items: end;
}

#remedial-faculty-panel .remedial-message-form-row > .field,
#remedial-faculty-panel .remedial-message-actions > .field,
#remedial-faculty-panel .remedial-attendance-controls > .field {
    min-width: 0;
    margin: 0;
}

#remedial-faculty-panel .remedial-message-card > .field {
    margin: 0;
}

#remedial-faculty-panel .remedial-message-actions {
    margin-top: 0.1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.7rem;
    flex-wrap: wrap;
}

#faculty-message-send-btn {
    min-height: 44px;
    min-width: 166px;
    padding-inline: 1.12rem;
}

#faculty-message-status {
    margin: 0;
    min-height: 1.2rem;
    flex: 1 1 auto;
    font-size: 0.83rem;
    line-height: 1.35;
}

#remedial-faculty-panel .remedial-attendance-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.78rem;
    align-items: end;
}

#remedial-refresh-attendance-btn {
    min-height: 44px;
    min-width: 150px;
    padding-inline: 1.08rem;
}

#remedial-attendance-list.list-wrap {
    margin-top: 0.14rem;
    max-height: 280px;
    padding: 0.48rem;
    padding-right: 0.48rem;
    border-radius: 14px;
    border: 1px solid rgba(160, 205, 239, 0.46);
    background: linear-gradient(160deg, rgba(24, 67, 100, 0.26), rgba(14, 47, 74, 0.2));
    box-shadow: inset 0 1px 0 rgba(183, 225, 252, 0.14);
}

#remedial-attendance-list .list-item {
    border-color: rgba(163, 210, 244, 0.5);
    background: rgba(41, 95, 138, 0.24);
}

.remedial-attendance-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.42rem;
}

.remedial-attendance-overview > span {
    border-radius: 11px;
    border: 1px solid rgba(162, 209, 243, 0.44);
    background: rgba(35, 89, 132, 0.28);
    color: #d7ecff;
    padding: 0.38rem 0.5rem;
    font-size: 0.78rem;
    line-height: 1.25;
}

.remedial-attendance-overview > span strong {
    color: #eff9ff;
}

.remedial-section-item {
    border-radius: 12px;
    border: 1px solid rgba(154, 206, 241, 0.46);
    background: linear-gradient(160deg, rgba(34, 88, 131, 0.28), rgba(27, 71, 109, 0.3));
    padding: 0.54rem 0.6rem;
    display: grid;
    gap: 0.42rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.remedial-section-item:hover {
    border-color: rgba(125, 194, 242, 0.72);
    box-shadow: 0 8px 18px rgba(8, 28, 45, 0.22);
    transform: translateY(-1px);
}

.remedial-section-item:focus-visible {
    outline: 2px solid #58b2f6;
    outline-offset: 2px;
}

.remedial-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.remedial-section-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #ecf8ff;
}

.remedial-section-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(133, 197, 241, 0.56);
    background: rgba(43, 115, 170, 0.34);
    color: #ecf8ff;
    font-size: 0.73rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.24rem 0.56rem;
}

.remedial-section-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.62rem;
    font-size: 0.78rem;
    color: #cbe5fa;
}

.remedial-section-meta strong {
    color: #eff9ff;
}

.remedial-section-progress {
    height: 6px;
    border-radius: 999px;
    background: rgba(10, 35, 58, 0.46);
    overflow: hidden;
}

.remedial-section-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #35a6f3, #42c4f9);
}

.remedial-attendance-modal-card {
    width: min(840px, 100%);
}

.remedial-attendance-modal-list {
    gap: 0.68rem;
}

.remedial-attendance-modal-group {
    display: grid;
    gap: 0.4rem;
}

.remedial-attendance-modal-group h4 {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #d5ebfd;
}

.remedial-attendance-modal-group-list {
    display: grid;
    gap: 0.4rem;
}

.remedial-attendance-modal-empty {
    border-radius: 11px;
    border: 1px dashed rgba(163, 212, 245, 0.45);
    background: rgba(25, 69, 104, 0.25);
    color: #c8e3f8;
    font-size: 0.8rem;
    padding: 0.5rem 0.58rem;
}

.remedial-demo-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.remedial-demo-controls small {
    margin: 0;
    color: #aac7dd;
    font-size: 0.78rem;
}

.food-demo-btn[data-active="true"],
.remedial-demo-btn[data-active="true"],
.student-attendance-demo-btn[data-active="true"] {
    border-color: rgba(106, 224, 170, 0.72);
    background: linear-gradient(140deg, rgba(29, 130, 86, 0.62), rgba(24, 107, 73, 0.66));
    color: #edfff5;
    box-shadow: 0 6px 16px rgba(15, 89, 58, 0.32);
}

body.ums-theme .remedial-demo-controls small {
    color: #50708b;
}

body.ums-theme .food-demo-btn[data-active="true"],
body.ums-theme .remedial-demo-btn[data-active="true"],
body.ums-theme .student-attendance-demo-btn[data-active="true"] {
    border-color: #89d2b0;
    background: linear-gradient(140deg, #e7fbf0, #d4f3e4);
    color: #0f7040;
    box-shadow: 0 6px 14px rgba(57, 126, 87, 0.16);
}

#remedial-classes-list.list-wrap,
#remedial-previous-classes-list.list-wrap,
#remedial-messages-list.list-wrap {
    max-height: 300px;
}

#remedial-classes-list.list-wrap,
#remedial-previous-classes-list.list-wrap,
#remedial-attendance-list.list-wrap {
    margin-top: 0.08rem;
}

body.ums-theme #remedial-faculty-panel {
    border-color: #b9d1e6;
    background:
        radial-gradient(circle at 8% 2%, rgba(173, 216, 255, 0.22), transparent 42%),
        radial-gradient(circle at 92% 8%, rgba(255, 209, 170, 0.2), transparent 42%),
        linear-gradient(165deg, #edf5ff, #f8fbff);
}

body.ums-theme .remedial-form-card {
    border-color: #b7d1e8;
    background: linear-gradient(160deg, #f9fcff, #eef6ff);
    box-shadow: inset 0 0 0 1px rgba(163, 204, 236, 0.24), 0 10px 22px rgba(52, 97, 140, 0.12);
}

body.ums-theme .remedial-form-card::before,
body.ums-theme .remedial-classes-card::before,
body.ums-theme .remedial-previous-card::before,
body.ums-theme .remedial-attendance-card::before,
body.ums-theme .remedial-message-card::before {
    content: "";
    display: block;
    height: 3px;
    border-radius: 999px;
    margin: -0.2rem -0.08rem 0.62rem;
}

body.ums-theme .remedial-form-card::before {
    background: linear-gradient(90deg, #4ea4ff, #56c4ff);
}

body.ums-theme .remedial-classes-card::before {
    background: linear-gradient(90deg, #38b9e8, #42c9c9);
}

body.ums-theme .remedial-previous-card::before {
    background: linear-gradient(90deg, #7fa4c4, #95b4cf);
}

body.ums-theme .remedial-attendance-card::before {
    background: linear-gradient(90deg, #7298f0, #75b6ff);
}

body.ums-theme .remedial-message-card::before {
    background: linear-gradient(90deg, #47c79b, #55d2a9);
}

body.ums-theme .remedial-classes-card,
body.ums-theme .remedial-attendance-card,
body.ums-theme .remedial-message-card,
body.ums-theme .remedial-previous-card {
    background: linear-gradient(160deg, #ffffff, #f3f8ff);
}

#remedial-messages-list > .remedial-message-card {
    grid-column: 1 / -1;
}

#remedial-student-panel .remedial-student-ledger-head {
    margin-top: 0.76rem;
}

#remedial-student-panel .remedial-student-ledger-head h3 {
    font-size: 1rem;
}

#remedial-student-panel .remedial-student-aggregate-panel {
    margin-top: 0.52rem;
}

#remedial-student-panel .remedial-student-ledger-note {
    margin-top: 0.52rem;
}

#remedial-student-panel .remedial-student-ledger-list.list-wrap {
    margin-top: 0.46rem;
    max-height: 340px;
}

#remedial-student-panel .remedial-student-ledger-list .list-item {
    display: grid;
    gap: 0.22rem;
}

.remedial-card {
    border-radius: 14px;
    border: 1px solid rgba(151, 205, 242, 0.36);
    background: linear-gradient(150deg, rgba(24, 64, 97, 0.48), rgba(18, 49, 76, 0.44));
    padding: 0.72rem;
    box-shadow: 0 8px 20px rgba(6, 23, 39, 0.24);
}

.remedial-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, auto);
    gap: 0.72rem;
    align-items: start;
}

.remedial-card-primary {
    min-width: 0;
    display: grid;
    gap: 0.34rem;
}

.remedial-card-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.24;
    color: #eaf7ff;
    font-weight: 800;
}

.remedial-card-subtitle {
    margin: 0;
    color: #bfdbef;
    font-size: 0.92rem;
    line-height: 1.34;
}

.remedial-card-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.34rem;
}

.remedial-meta-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(141, 202, 242, 0.46);
    background: rgba(35, 91, 135, 0.34);
    color: #d9edff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.1;
    padding: 0.2rem 0.52rem;
}

.remedial-card-message {
    margin: 0;
    color: #d2e8f8;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}

.remedial-card-secondary {
    min-width: 220px;
    display: grid;
    gap: 0.48rem;
    justify-items: end;
    align-content: start;
}

.remedial-badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.34rem;
    justify-content: flex-end;
}

.remedial-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(151, 209, 245, 0.46);
    background: rgba(38, 97, 142, 0.3);
    color: #d8ecff;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.26rem 0.62rem;
}

.remedial-chip-code {
    border-color: rgba(120, 196, 246, 0.72);
    background: rgba(44, 124, 188, 0.36);
    color: #eff9ff;
}

.remedial-chip-live {
    border-color: rgba(120, 226, 177, 0.72);
    background: rgba(25, 125, 82, 0.34);
    color: #e7fff3;
}

.remedial-chip-complete {
    border-color: rgba(118, 208, 255, 0.72);
    background: rgba(31, 115, 177, 0.33);
    color: #e9f6ff;
}

.remedial-chip-muted {
    border-color: rgba(240, 170, 160, 0.72);
    background: rgba(147, 62, 53, 0.36);
    color: #ffe7e4;
}

.remedial-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    justify-content: flex-end;
}

.remedial-card-actions .btn {
    min-height: 42px;
}

.remedial-message-card .btn {
    min-width: 170px;
}

.remedial-class-card {
    box-shadow: inset 4px 0 0 rgba(74, 196, 253, 0.58), 0 8px 20px rgba(6, 23, 39, 0.24);
}

.remedial-class-card.is-inactive {
    border-color: rgba(240, 164, 153, 0.55);
    background: linear-gradient(155deg, rgba(92, 55, 56, 0.46), rgba(71, 44, 52, 0.42));
    box-shadow: inset 4px 0 0 rgba(247, 122, 105, 0.78), 0 8px 20px rgba(39, 11, 15, 0.24);
}

.remedial-message-card {
    box-shadow: inset 4px 0 0 rgba(106, 218, 166, 0.6), 0 8px 20px rgba(6, 23, 39, 0.24);
}

.remedial-message-card-compact {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

body.ums-theme .remedial-card {
    border-color: #bfd9ed;
    background: linear-gradient(155deg, #ffffff, #edf6ff);
    box-shadow: 0 8px 20px rgba(54, 108, 153, 0.15);
}

body.ums-theme .remedial-card-title {
    color: #173a58;
}

body.ums-theme .remedial-card-subtitle {
    color: #456682;
}

body.ums-theme .remedial-meta-badge {
    border-color: #aecde8;
    background: #f1f8ff;
    color: #365a7d;
}

body.ums-theme .remedial-card-message {
    color: #4e6a83;
}

body.ums-theme .remedial-chip {
    border-color: #b8d4ea;
    background: #eef6ff;
    color: #355b7f;
}

body.ums-theme .remedial-chip-code {
    border-color: #8fc3e8;
    background: #e7f3ff;
    color: #1c507f;
}

body.ums-theme .remedial-chip-live {
    border-color: #8eddb8;
    background: #e8fbf1;
    color: #0f7b48;
}

body.ums-theme .remedial-chip-complete {
    border-color: #9dcced;
    background: #e9f5ff;
    color: #1c5f90;
}

body.ums-theme .remedial-chip-muted {
    border-color: #efb2ab;
    background: #ffeceb;
    color: #ab3f33;
}

body.ums-theme .remedial-class-card {
    box-shadow: inset 4px 0 0 rgba(69, 170, 238, 0.86), 0 8px 20px rgba(54, 108, 153, 0.15);
}

body.ums-theme .remedial-class-card.is-inactive {
    border-color: #edc2bc;
    background: linear-gradient(155deg, #fff7f6, #ffeceb);
    box-shadow: inset 4px 0 0 rgba(230, 110, 96, 0.84), 0 8px 20px rgba(142, 78, 71, 0.14);
}

body.ums-theme .remedial-message-card {
    box-shadow: inset 4px 0 0 rgba(94, 196, 143, 0.88), 0 8px 20px rgba(54, 108, 153, 0.15);
}

body.ums-theme #remedial-attendance-list.list-wrap {
    border-color: #bdd5e8;
    background: linear-gradient(165deg, #f8fbff, #edf5ff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

body.ums-theme #remedial-attendance-list .list-item {
    border-color: #c0d7ea;
    background: #f7fbff;
}

body.ums-theme .remedial-attendance-overview > span {
    border-color: #bfd7e9;
    background: #f3f9ff;
    color: #3f607e;
}

body.ums-theme .remedial-attendance-overview > span strong {
    color: #1f4d77;
}

body.ums-theme .remedial-section-item {
    border-color: #bfd8ea;
    background: linear-gradient(155deg, #ffffff, #edf6ff);
    box-shadow: 0 6px 16px rgba(57, 111, 157, 0.12);
}

body.ums-theme .remedial-section-item:hover {
    border-color: #96c5e6;
    box-shadow: 0 10px 20px rgba(50, 103, 149, 0.16);
}

body.ums-theme .remedial-section-item:focus-visible {
    outline-color: #3c9aeb;
}

body.ums-theme .remedial-section-title {
    color: #1d4a72;
}

body.ums-theme .remedial-section-pill {
    border-color: #a7cbe8;
    background: #eaf5ff;
    color: #215884;
}

body.ums-theme .remedial-section-meta {
    color: #4f6e8a;
}

body.ums-theme .remedial-section-meta strong {
    color: #1f4f79;
}

body.ums-theme .remedial-section-progress {
    background: #dceaf7;
}

body.ums-theme .remedial-section-progress > span {
    background: linear-gradient(90deg, #3a9cf1, #42b8f4);
}

body.ums-theme .remedial-attendance-modal-group h4 {
    color: #2b5478;
}

body.ums-theme .remedial-attendance-modal-empty {
    border-color: #c3d9eb;
    background: #f5faff;
    color: #4f6d89;
}

@media (max-width: 1080px) {
    .remedial-faculty-layout {
        grid-template-columns: 1fr;
    }

    .remedial-faculty-column {
        grid-column: 1 / -1;
    }

    .remedial-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #remedial-faculty-panel .remedial-attendance-controls {
        grid-template-columns: 1fr;
    }

    .remedial-attendance-overview {
        grid-template-columns: 1fr;
    }

    #remedial-refresh-attendance-btn {
        width: 100%;
        min-width: 0;
    }

    .remedial-card-grid {
        grid-template-columns: 1fr;
    }

    .remedial-card-secondary {
        min-width: 0;
        justify-items: flex-start;
    }

    .remedial-badge-group,
    .remedial-card-actions {
        justify-content: flex-start;
    }
}

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

    #remedial-faculty-panel .remedial-message-form-row {
        grid-template-columns: 1fr;
    }

    #remedial-faculty-panel .remedial-message-actions {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .remedial-card-actions .btn,
    .remedial-message-card .btn {
        width: 100%;
        min-width: 0;
    }

    .remedial-section-head,
    .remedial-section-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

.error-text {
    color: #ffb0a0 !important;
}

.inline-controls > .field {
    min-width: 170px;
}

.profile-uploader {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.photo-preview-wrap {
    margin-top: 0.72rem;
}

.photo-preview {
    width: min(100%, 260px);
    border-radius: 14px;
    border: 1px solid rgba(163, 215, 250, 0.46);
    box-shadow: 0 10px 32px rgba(8, 33, 55, 0.42);
}

.timetable-grid {
    margin-top: 0.72rem;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    position: relative;
    isolation: isolate;
    max-height: min(68vh, 760px);
    border-radius: var(--radius-sm);
    border: var(--card-border-w) solid rgba(160, 209, 245, 0.36);
    background: rgba(15, 43, 67, 0.32);
}

.weekly-calendar {
    --calendar-time-col: 92px;
    --calendar-day-col-min: 138px;
    --calendar-row-height: 86px;
    min-width: 1060px;
    display: grid;
    grid-template-columns: var(--calendar-time-col) repeat(7, minmax(var(--calendar-day-col-min), 1fr));
    grid-auto-rows: var(--calendar-row-height);
    gap: 0;
    position: relative;
    isolation: isolate;
}

.calendar-day-band {
    position: absolute;
    top: var(--calendar-row-height);
    bottom: 0;
    left: calc(var(--calendar-time-col) + (var(--calendar-band-day, 0) * ((100% - var(--calendar-time-col)) / 7)));
    width: calc((100% - var(--calendar-time-col)) / 7);
    background: linear-gradient(180deg, rgba(108, 186, 241, 0.16), rgba(86, 167, 226, 0.08));
    border-inline: 1px solid rgba(124, 193, 241, 0.24);
    pointer-events: none;
    z-index: 0;
}

.calendar-now-line {
    position: absolute;
    left: calc(var(--calendar-time-col) + (var(--calendar-now-day, 0) * ((100% - var(--calendar-time-col)) / 7)));
    width: calc((100% - var(--calendar-time-col)) / 7);
    top: calc(var(--calendar-row-height) + (var(--calendar-now-progress, 0) * var(--calendar-row-height)));
    height: 0;
    border-top: 2px solid rgba(255, 197, 124, 0.92);
    box-shadow: 0 0 0 1px rgba(255, 203, 137, 0.22), 0 0 10px rgba(255, 185, 94, 0.4);
    pointer-events: none;
    z-index: 2;
}

.calendar-now-line::before {
    content: "";
    position: absolute;
    left: -5px;
    top: -6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffc884;
    box-shadow: 0 0 0 3px rgba(255, 193, 113, 0.22);
}

.calendar-corner,
.calendar-day-header {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-bottom: 1px solid rgba(159, 208, 245, 0.34);
    background: #2a5a80;
    color: #d7ecff;
    position: sticky;
    top: 0;
    z-index: 16;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.calendar-corner {
    border-right: 1px solid rgba(159, 208, 245, 0.3);
    font-size: 0.78rem;
    z-index: 17;
}

.calendar-day-header {
    font-size: 0.92rem;
}

.calendar-day-header.current-day {
    background: linear-gradient(180deg, rgba(58, 124, 176, 0.58), rgba(45, 110, 159, 0.52));
    color: #f2fbff;
    border-bottom-color: rgba(160, 217, 255, 0.58);
}

.calendar-time-label {
    border-right: 1px solid rgba(153, 200, 236, 0.26);
    border-bottom: 1px solid rgba(153, 200, 236, 0.2);
    padding: 0.42rem 0.35rem;
    color: #a9c9e5;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    background: rgba(23, 58, 87, 0.34);
    position: relative;
    z-index: 1;
}

.calendar-cell {
    border-bottom: 1px solid rgba(153, 200, 236, 0.2);
    border-right: 1px solid rgba(153, 200, 236, 0.2);
    background: rgba(26, 67, 102, 0.12);
    position: relative;
    z-index: 1;
}

.calendar-cell.current-day {
    background: rgba(76, 139, 191, 0.12);
}

.calendar-class {
    margin: 2px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(165, 212, 246, 0.4);
    background: rgba(35, 82, 120, 0.66);
    padding: 0.32rem 0.34rem;
    display: flex;
    flex-direction: column;
    gap: 0.14rem;
    min-height: 0;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(6, 20, 34, 0.28);
    cursor: pointer;
    z-index: 2;
    transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.calendar-class:hover {
    transform: translateY(-1px);
    border-color: rgba(188, 230, 255, 0.72);
    box-shadow: 0 12px 24px rgba(8, 31, 52, 0.36);
}

.calendar-class.selected {
    outline: none;
    border-color: rgba(117, 209, 255, 0.8);
    box-shadow: 0 0 0 1px rgba(117, 209, 255, 0.34), 0 10px 24px rgba(8, 31, 52, 0.36);
}

.calendar-class:focus-visible {
    outline: 2px solid rgba(93, 198, 255, 0.95);
    outline-offset: 0;
}

.calendar-time {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.14;
    color: #f2fbff;
}

.calendar-course {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.14;
    color: #e5f4ff;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.calendar-room {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.14;
    color: #cde4f7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-status {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 0.18rem 0.56rem;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: 1px solid rgba(175, 214, 250, 0.35);
    background: rgba(53, 109, 156, 0.22);
    color: #d1e8fb;
    transition: background-color var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}

.calendar-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: flex-start;
    margin-top: 0.08rem;
    min-height: 0;
}

.slot-status.present {
    border-color: rgba(118, 252, 196, 0.62);
    background: rgba(24, 143, 95, 0.35);
    color: #e3ffef;
}

.slot-status.absent {
    border-color: rgba(255, 160, 138, 0.6);
    background: rgba(160, 59, 41, 0.34);
    color: #ffe3dc;
}

.slot-status.upcoming {
    border-color: rgba(176, 215, 247, 0.5);
    background: rgba(66, 115, 157, 0.34);
    color: #dff1ff;
}

.slot-status.mark {
    border-color: rgba(134, 248, 204, 0.62);
    background: rgba(26, 146, 99, 0.4);
    color: #ecfff7;
    animation: badge-breathe 1.6s ease-in-out infinite;
}

@keyframes badge-breathe {
    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 0 0 rgba(109, 241, 185, 0);
    }
    50% {
        transform: translateY(-1px);
        box-shadow: 0 0 0 6px rgba(109, 241, 185, 0.12);
    }
}

.attendance-pill {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 0.14rem 0.44rem;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    border: 1px solid rgba(175, 214, 250, 0.35);
    background: rgba(53, 109, 156, 0.22);
    color: #d1e8fb;
}

.attendance-pill.ok {
    border-color: rgba(137, 248, 205, 0.56);
    background: rgba(31, 148, 101, 0.25);
    color: #dcffef;
}

.attendance-pill.pending {
    border-color: rgba(255, 199, 114, 0.6);
    background: rgba(180, 122, 32, 0.24);
    color: #ffe4b9;
}

.attendance-pill.bad {
    border-color: rgba(255, 146, 129, 0.56);
    background: rgba(170, 64, 46, 0.26);
    color: #ffd4ca;
}

.calendar-class.slot-present {
    border-color: rgba(90, 229, 171, 0.6);
    background: rgba(17, 118, 77, 0.26);
    box-shadow: 0 0 20px rgba(68, 230, 165, 0.2);
}

.calendar-class.slot-absent {
    border-color: rgba(255, 150, 130, 0.4);
    background: rgba(89, 54, 59, 0.45);
}

.calendar-class.slot-upcoming {
    border-color: rgba(164, 210, 246, 0.4);
    background: rgba(35, 82, 120, 0.66);
}

.calendar-class.slot-mark {
    border-color: rgba(114, 239, 183, 0.62);
    background: rgba(17, 119, 78, 0.32);
}

.calendar-class.slot-open-window {
    box-shadow: inset 0 0 0 1px rgba(76, 229, 164, 0.38), 0 8px 20px rgba(6, 22, 37, 0.3);
}

@keyframes open-pulse {
    0%,
    100% {
        box-shadow: 0 0 18px rgba(68, 230, 165, 0.22);
    }
    50% {
        box-shadow: 0 0 30px rgba(107, 247, 191, 0.34);
    }
}

.faculty-controls {
    display: grid;
    gap: 0.64rem;
    grid-template-columns: 1.4fr 1fr auto;
    align-items: end;
}

.faculty-admin-grid {
    margin-top: 0.7rem;
    display: grid;
    gap: 0.62rem;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    align-items: end;
}

:root {
    --rms-thread-row-border: rgba(147, 190, 221, 0.3);
    --rms-thread-row-bg: linear-gradient(165deg, rgba(20, 48, 70, 0.92), rgba(10, 29, 45, 0.9));
    --rms-thread-row-pending-bg: linear-gradient(165deg, rgba(74, 58, 23, 0.46), rgba(31, 24, 10, 0.54));
    --rms-thread-row-resolved-bg: linear-gradient(165deg, rgba(17, 47, 68, 0.92), rgba(11, 31, 47, 0.9));
    --rms-thread-row-shadow: 0 14px 28px rgba(4, 16, 29, 0.22);
    --rms-thread-title: #f4f9ff;
    --rms-thread-body: #d8e7f5;
    --rms-thread-muted: #9eb7ce;
    --rms-thread-chip-bg: rgba(31, 73, 104, 0.58);
    --rms-thread-chip-border: rgba(138, 190, 230, 0.34);
    --rms-thread-chip-text: #e4f1ff;
    --rms-thread-message-bg: rgba(7, 19, 31, 0.26);
    --rms-thread-message-border: rgba(125, 178, 217, 0.24);
    --rms-thread-message-text: #ebf4fc;
    --rms-thread-registration-bg: rgba(7, 19, 31, 0.36);
    --rms-thread-registration-border: rgba(143, 192, 230, 0.34);
    --rms-thread-registration-text: #bed9f2;
    --rms-thread-pending-border: rgba(244, 196, 112, 0.66);
    --rms-thread-resolved-border: rgba(114, 224, 180, 0.45);
    --rms-thread-approved-border: rgba(101, 228, 170, 0.58);
    --rms-thread-disapproved-border: rgba(246, 134, 122, 0.58);
    --rms-thread-scheduled-border: rgba(122, 186, 246, 0.64);
    --rms-thread-badge-pending-bg: rgba(104, 74, 19, 0.34);
    --rms-thread-badge-pending-border: rgba(244, 196, 112, 0.58);
    --rms-thread-badge-pending-text: #ffd79d;
    --rms-thread-badge-approved-bg: rgba(21, 92, 64, 0.3);
    --rms-thread-badge-approved-border: rgba(101, 228, 170, 0.48);
    --rms-thread-badge-approved-text: #a7f0c9;
    --rms-thread-badge-disapproved-bg: rgba(111, 41, 37, 0.3);
    --rms-thread-badge-disapproved-border: rgba(246, 134, 122, 0.5);
    --rms-thread-badge-disapproved-text: #ffc1b8;
    --rms-thread-badge-scheduled-bg: rgba(30, 77, 122, 0.32);
    --rms-thread-badge-scheduled-border: rgba(122, 186, 246, 0.5);
    --rms-thread-badge-scheduled-text: #c3e3ff;
    --rms-thread-badge-resolved-bg: rgba(37, 63, 88, 0.32);
    --rms-thread-badge-resolved-border: rgba(143, 191, 230, 0.42);
    --rms-thread-badge-resolved-text: #d1e7fb;
    --rms-thread-badge-unread-bg: rgba(39, 87, 157, 0.32);
    --rms-thread-badge-unread-border: rgba(129, 184, 255, 0.5);
    --rms-thread-badge-unread-text: #dcebff;
}

body.ums-theme {
    --rms-thread-row-border: #bfd3e4;
    --rms-thread-row-bg: linear-gradient(165deg, #ffffff 0%, #f5faff 62%, #edf6ff 100%);
    --rms-thread-row-pending-bg: linear-gradient(165deg, #fff7ea 0%, #fffdf7 52%, #f8fbff 100%);
    --rms-thread-row-resolved-bg: linear-gradient(165deg, #fbfdff 0%, #f3f8ff 62%, #eef8f4 100%);
    --rms-thread-row-shadow: 0 12px 24px rgba(84, 108, 130, 0.12);
    --rms-thread-title: #1c394f;
    --rms-thread-body: #3d5b74;
    --rms-thread-muted: #68839a;
    --rms-thread-chip-bg: #edf5fb;
    --rms-thread-chip-border: #cadceb;
    --rms-thread-chip-text: #31536e;
    --rms-thread-message-bg: rgba(255, 255, 255, 0.78);
    --rms-thread-message-border: rgba(162, 185, 206, 0.58);
    --rms-thread-message-text: #28455d;
    --rms-thread-registration-bg: #eef4fb;
    --rms-thread-registration-border: #cadbeb;
    --rms-thread-registration-text: #4f6781;
    --rms-thread-pending-border: #e0bd7d;
    --rms-thread-resolved-border: #b9d8cb;
    --rms-thread-approved-border: #88cfac;
    --rms-thread-disapproved-border: #e1aaa2;
    --rms-thread-scheduled-border: #9fc8ea;
    --rms-thread-badge-pending-bg: #fff1d8;
    --rms-thread-badge-pending-border: #efcf93;
    --rms-thread-badge-pending-text: #8d5817;
    --rms-thread-badge-approved-bg: #e7f8ef;
    --rms-thread-badge-approved-border: #9fd7b8;
    --rms-thread-badge-approved-text: #1f724d;
    --rms-thread-badge-disapproved-bg: #fdeceb;
    --rms-thread-badge-disapproved-border: #e4b0aa;
    --rms-thread-badge-disapproved-text: #9a4136;
    --rms-thread-badge-scheduled-bg: #ebf5ff;
    --rms-thread-badge-scheduled-border: #abcff0;
    --rms-thread-badge-scheduled-text: #2d6796;
    --rms-thread-badge-resolved-bg: #eef4fb;
    --rms-thread-badge-resolved-border: #cad8e5;
    --rms-thread-badge-resolved-text: #516b82;
    --rms-thread-badge-unread-bg: #edf3ff;
    --rms-thread-badge-unread-border: #bfd3fb;
    --rms-thread-badge-unread-text: #355a97;
}

.rms-thread-list {
    display: grid;
    gap: 0.78rem;
}

.rms-thread-row {
    border: 1px solid var(--rms-thread-row-border);
    border-radius: 1rem;
    padding: 0.92rem 0.98rem;
    background: var(--rms-thread-row-bg);
    display: grid;
    gap: 0.7rem;
    box-shadow: var(--rms-thread-row-shadow);
}

.rms-thread-row.pending {
    border-color: var(--rms-thread-pending-border);
    background: var(--rms-thread-row-pending-bg);
}

.rms-thread-row.resolved {
    border-color: var(--rms-thread-resolved-border);
    background: var(--rms-thread-row-resolved-bg);
}

.rms-thread-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.rms-thread-identity {
    min-width: 0;
    display: grid;
    gap: 0.5rem;
}

.rms-thread-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.48rem;
}

.rms-thread-head-controls {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.42rem;
}

.rms-thread-head strong {
    color: var(--rms-thread-title);
    font-size: 1.03rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.rms-thread-registration {
    display: inline-flex;
    align-items: center;
    padding: 0.24rem 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--rms-thread-registration-border);
    background: var(--rms-thread-registration-bg);
    color: var(--rms-thread-registration-text);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1;
}

.rms-thread-support {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.rms-thread-chip,
.rms-thread-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0.26rem 0.68rem;
    border-radius: 999px;
    border: 1px solid var(--rms-thread-chip-border);
    background: var(--rms-thread-chip-bg);
    color: var(--rms-thread-chip-text);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
}

.rms-thread-chip--subject {
    font-weight: 800;
}

.rms-thread-badge--pending {
    background: var(--rms-thread-badge-pending-bg);
    border-color: var(--rms-thread-badge-pending-border);
    color: var(--rms-thread-badge-pending-text);
}

.rms-thread-badge--approved {
    background: var(--rms-thread-badge-approved-bg);
    border-color: var(--rms-thread-badge-approved-border);
    color: var(--rms-thread-badge-approved-text);
}

.rms-thread-badge--disapproved {
    background: var(--rms-thread-badge-disapproved-bg);
    border-color: var(--rms-thread-badge-disapproved-border);
    color: var(--rms-thread-badge-disapproved-text);
}

.rms-thread-badge--scheduled {
    background: var(--rms-thread-badge-scheduled-bg);
    border-color: var(--rms-thread-badge-scheduled-border);
    color: var(--rms-thread-badge-scheduled-text);
}

.rms-thread-badge--resolved {
    background: var(--rms-thread-badge-resolved-bg);
    border-color: var(--rms-thread-badge-resolved-border);
    color: var(--rms-thread-badge-resolved-text);
}

.rms-thread-badge--unread {
    background: var(--rms-thread-badge-unread-bg);
    border-color: var(--rms-thread-badge-unread-border);
    color: var(--rms-thread-badge-unread-text);
}

.rms-thread-message {
    padding: 0.78rem 0.86rem;
    border-radius: 0.88rem;
    border: 1px solid var(--rms-thread-message-border);
    background: var(--rms-thread-message-bg);
    color: var(--rms-thread-message-text);
    font-size: 0.9rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.rms-thread-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 0.8rem;
}

.rms-thread-meta {
    display: grid;
    gap: 0.16rem;
    color: var(--rms-thread-body);
    font-size: 0.8rem;
    line-height: 1.45;
}

.rms-thread-meta--full {
    grid-column: 1 / -1;
}

.rms-thread-meta-label {
    color: var(--rms-thread-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rms-thread-row.action-approved {
    border-color: var(--rms-thread-approved-border);
}

.rms-thread-row.action-disapproved {
    border-color: var(--rms-thread-disapproved-border);
}

.rms-thread-row.action-scheduled {
    border-color: var(--rms-thread-scheduled-border);
}

.rms-category-title {
    margin: 0.18rem 0 0.04rem;
    color: var(--rms-thread-title);
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

/* Saarthi immersive refresh */
#student-saarthi-card {
    --saarthi-accent-cyan: #12d7ff;
    --saarthi-accent-blue: #3f6dff;
    --saarthi-accent-amber: #ffb36a;
    --saarthi-accent-mint: #6cf4c4;
    --saarthi-ink: #113252;
    --saarthi-soft-ink: #365776;
    font-family: var(--font-ui);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transform-style: preserve-3d;
    border: 1px solid rgba(128, 176, 224, 0.56);
    background:
        radial-gradient(120% 100% at 0% 0%, rgba(18, 215, 255, 0.22), transparent 48%),
        radial-gradient(120% 95% at 100% 0%, rgba(255, 179, 106, 0.2), transparent 48%),
        linear-gradient(155deg, rgba(250, 254, 255, 0.96), rgba(237, 247, 255, 0.95) 48%, rgba(231, 241, 255, 0.98));
    box-shadow:
        0 28px 56px rgba(28, 62, 100, 0.2),
        0 10px 22px rgba(36, 94, 151, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

#student-saarthi-card::before,
#student-saarthi-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

#student-saarthi-card::before {
    inset: -42%;
    background: conic-gradient(
        from 90deg,
        rgba(18, 215, 255, 0.18),
        rgba(63, 109, 255, 0.14),
        rgba(255, 179, 106, 0.18),
        rgba(108, 244, 196, 0.14),
        rgba(18, 215, 255, 0.18)
    );
    filter: blur(48px);
    opacity: 0.72;
    animation: saarthi-aurora-spin 22s linear infinite;
}

#student-saarthi-card::after {
    inset: 0;
    background:
        radial-gradient(80% 60% at 50% 0%, rgba(255, 255, 255, 0.48), transparent 70%),
        radial-gradient(40% 55% at 80% 78%, rgba(63, 109, 255, 0.16), transparent 72%);
    mix-blend-mode: screen;
    opacity: 0.62;
    animation: saarthi-ambient-float 9s ease-in-out infinite;
}

#student-saarthi-card > * {
    position: relative;
    z-index: 1;
}

#student-saarthi-card .saarthi-header-section,
#student-saarthi-card .saarthi-conversation-section,
#student-saarthi-card .saarthi-input-section {
    border-color: rgba(141, 186, 228, 0.68);
    background: linear-gradient(168deg, rgba(255, 255, 255, 0.82), rgba(239, 247, 255, 0.86));
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.66),
        0 16px 28px rgba(26, 72, 120, 0.12);
    transition: transform 0.36s var(--motion-ease), box-shadow 0.36s var(--motion-ease), border-color 0.3s var(--motion-ease);
}

#student-saarthi-card .saarthi-header-section:hover,
#student-saarthi-card .saarthi-conversation-section:hover,
#student-saarthi-card .saarthi-input-section:hover {
    transform: translateY(-2px) translateZ(8px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 20px 32px rgba(30, 82, 136, 0.16);
}

#student-saarthi-card .saarthi-affirmation-band {
    position: relative;
    border-color: rgba(133, 190, 230, 0.7);
    background: linear-gradient(118deg, rgba(18, 215, 255, 0.18), rgba(255, 255, 255, 0.92) 36%, rgba(255, 179, 106, 0.22));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

#student-saarthi-card .saarthi-affirmation-band::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.64) 46%, transparent 72%);
    transform: translateX(-120%);
    animation: saarthi-band-sweep 5.6s ease-in-out infinite;
    pointer-events: none;
}

#student-saarthi-card .saarthi-affirmation-pill {
    border-color: rgba(141, 191, 230, 0.68);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(241, 248, 255, 0.94));
    color: #2a4d6e;
    box-shadow: 0 10px 18px rgba(31, 79, 129, 0.12);
    animation: saarthi-pill-float 7.2s ease-in-out infinite;
}

#student-saarthi-card .saarthi-affirmation-pill:nth-child(3n) {
    animation-delay: 1.1s;
}

#student-saarthi-card .saarthi-affirmation-pill:nth-child(4n) {
    animation-delay: 2.1s;
}

#student-saarthi-card .saarthi-welcome-card {
    border-color: rgba(129, 187, 229, 0.7);
    background:
        radial-gradient(80% 96% at 10% 4%, rgba(18, 215, 255, 0.2), transparent 56%),
        radial-gradient(90% 96% at 96% 20%, rgba(255, 179, 106, 0.2), transparent 58%),
        linear-gradient(152deg, rgba(255, 255, 255, 0.92), rgba(241, 248, 255, 0.9));
    box-shadow: 0 16px 30px rgba(28, 78, 126, 0.15);
}

#student-saarthi-card .saarthi-welcome-icon {
    --saarthi-tilt-x: 0deg;
    --saarthi-tilt-y: 0deg;
    --saarthi-aura-x: 50%;
    --saarthi-aura-y: 50%;
    --saarthi-aura-alpha: 0.62;
    --saarthi-aura-scale: 1;
    width: 66px;
    height: 66px;
    background: radial-gradient(
        circle at var(--saarthi-aura-x) var(--saarthi-aura-y),
        #f5fdff 0%,
        #b8e6ff 52%,
        #7ab4ff 100%
    );
    box-shadow:
        inset 0 2px 2px rgba(255, 255, 255, 0.76),
        0 18px 30px rgba(31, 91, 150, 0.26);
    transform-style: preserve-3d;
    transform:
        perspective(760px)
        rotateX(var(--saarthi-tilt-x))
        rotateY(var(--saarthi-tilt-y))
        translateZ(14px)
        scale(var(--saarthi-aura-scale));
    transition:
        transform 180ms var(--motion-ease),
        box-shadow 180ms var(--motion-ease),
        filter 180ms var(--motion-ease);
    will-change: transform;
}

#student-saarthi-card .saarthi-welcome-icon::before,
#student-saarthi-card .saarthi-welcome-icon::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

#student-saarthi-card .saarthi-welcome-icon::before {
    inset: -22px;
    background:
        radial-gradient(
            circle at var(--saarthi-aura-x) var(--saarthi-aura-y),
            rgba(146, 232, 255, 0.58) 0%,
            rgba(63, 109, 255, 0.22) 44%,
            rgba(18, 215, 255, 0.06) 72%,
            transparent 84%
        );
    opacity: var(--saarthi-aura-alpha);
    filter: blur(2px) saturate(130%);
    transform: translateZ(-2px);
    animation: saarthi-avatar-aura-pulse 4.6s ease-in-out infinite;
}

#student-saarthi-card .saarthi-welcome-icon::after {
    inset: -14px;
    border: 1px solid rgba(104, 180, 235, 0.48);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
    opacity: 0.72;
    transform: translateZ(-1px);
    animation:
        saarthi-halo-spin 9s linear infinite,
        saarthi-avatar-halo-breathe 3.8s ease-in-out infinite;
}

#student-saarthi-card .saarthi-welcome-icon .saarthi-welcome-orb {
    transform: translateZ(16px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 0 20px rgba(141, 218, 255, 0.42);
}

#student-saarthi-card .saarthi-welcome-icon .saarthi-welcome-ring {
    transform: translateZ(10px);
    border-color: rgba(140, 211, 246, 0.84);
}

#student-saarthi-card .saarthi-welcome-icon .saarthi-welcome-spark {
    transform: translateZ(20px) rotate(45deg);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.66), 0 0 14px rgba(138, 223, 255, 0.6);
}

#student-saarthi-card .saarthi-welcome-icon.is-interacting {
    box-shadow:
        inset 0 2px 2px rgba(255, 255, 255, 0.8),
        0 20px 34px rgba(28, 88, 145, 0.36);
    filter: saturate(1.06);
}

#student-saarthi-card .saarthi-welcome-icon.is-interacting::before {
    animation-duration: 2.4s;
}

#student-saarthi-card .saarthi-welcome-icon.is-pressed {
    transform:
        perspective(760px)
        rotateX(var(--saarthi-tilt-x))
        rotateY(var(--saarthi-tilt-y))
        translateZ(14px)
        scale(0.96);
}

#student-saarthi-card .saarthi-welcome-copy h3 {
    color: var(--saarthi-ink);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.54);
}

#student-saarthi-card .saarthi-welcome-copy p,
#student-saarthi-card .saarthi-status-line,
#student-saarthi-card .saarthi-soft-note,
#student-saarthi-card .saarthi-actions .helper-text {
    color: var(--saarthi-soft-ink);
}

#student-saarthi-card .saarthi-chip {
    border-color: rgba(133, 185, 227, 0.7);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(238, 247, 255, 0.9));
    box-shadow: 0 12px 20px rgba(35, 89, 144, 0.12);
}

#student-saarthi-card .saarthi-chip span {
    color: #345674;
}

#student-saarthi-card .saarthi-chip strong {
    color: #113a61;
}

#student-saarthi-card .saarthi-history {
    position: relative;
    border-color: rgba(131, 183, 225, 0.7);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 255, 0.9)),
        radial-gradient(120% 100% at 0% 100%, rgba(18, 215, 255, 0.08), transparent 58%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.62),
        0 16px 28px rgba(29, 78, 126, 0.12);
}

#student-saarthi-card .saarthi-history::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(30, 113, 178, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 113, 178, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.34;
    mix-blend-mode: soft-light;
}

#student-saarthi-card .saarthi-message {
    border-color: rgba(132, 185, 227, 0.66);
    background: linear-gradient(158deg, rgba(255, 255, 255, 0.94), rgba(244, 250, 255, 0.92));
    box-shadow: 0 12px 22px rgba(31, 84, 136, 0.14);
    transition: transform 0.26s var(--motion-ease), box-shadow 0.26s var(--motion-ease), border-color 0.2s var(--motion-ease);
}

#student-saarthi-card .saarthi-message:hover {
    transform: translateY(-2px) translateZ(4px);
    box-shadow: 0 18px 28px rgba(29, 80, 128, 0.18);
}

#student-saarthi-card .saarthi-message.theirs {
    border-color: rgba(99, 189, 226, 0.66);
    background: linear-gradient(158deg, rgba(240, 252, 255, 0.92), rgba(233, 246, 255, 0.9));
}

#student-saarthi-card .saarthi-message.mine {
    border-color: rgba(98, 147, 236, 0.72);
    background: linear-gradient(162deg, rgba(236, 247, 255, 0.94), rgba(228, 239, 255, 0.92));
}

#student-saarthi-card .saarthi-message-header {
    color: #6282a0;
}

#student-saarthi-card .saarthi-message-sender {
    color: #2f6898;
}

#student-saarthi-card .saarthi-message.mine .saarthi-message-sender {
    color: #2650ad;
}

#student-saarthi-card .saarthi-message-text {
    color: #1a3d60;
}

#student-saarthi-card .saarthi-typing {
    border-color: rgba(132, 185, 227, 0.66);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(239, 247, 255, 0.92));
    box-shadow: 0 10px 18px rgba(32, 85, 137, 0.12);
    color: #3c5f7f;
}

#student-saarthi-card .saarthi-empty {
    border-color: rgba(126, 181, 224, 0.62);
    background: linear-gradient(160deg, rgba(245, 252, 255, 0.9), rgba(240, 248, 255, 0.9));
    color: #3d607f;
}

#student-saarthi-card .saarthi-compose-field > span {
    color: #234b6f;
}

#student-saarthi-card .saarthi-compose-field textarea {
    border-color: rgba(122, 179, 224, 0.68);
    background: linear-gradient(178deg, rgba(255, 255, 255, 0.95), rgba(241, 248, 255, 0.95));
    color: #16395a;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 8px 18px rgba(32, 86, 138, 0.08);
}

#student-saarthi-card .saarthi-compose-field textarea:focus {
    border-color: rgba(63, 131, 210, 0.9);
    outline: none;
    box-shadow:
        0 0 0 4px rgba(63, 131, 210, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#student-saarthi-card .saarthi-compose-field textarea::placeholder {
    color: rgba(71, 110, 146, 0.74);
}

#student-saarthi-card .saarthi-new-chat-btn {
    border-color: rgba(117, 176, 222, 0.78);
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.95), rgba(231, 244, 255, 0.92));
    color: #255478;
    box-shadow: 0 10px 18px rgba(28, 83, 137, 0.12);
}

#student-saarthi-card .saarthi-new-chat-btn:hover {
    box-shadow: 0 14px 22px rgba(30, 86, 140, 0.18);
}

#student-saarthi-card .saarthi-send-btn {
    background: conic-gradient(
        from 220deg at 40% 32%,
        var(--saarthi-accent-cyan),
        var(--saarthi-accent-blue),
        var(--saarthi-accent-mint),
        var(--saarthi-accent-amber),
        var(--saarthi-accent-cyan)
    );
    border-color: rgba(101, 171, 230, 0.86);
    box-shadow:
        0 18px 30px rgba(27, 89, 147, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    overflow: hidden;
}

#student-saarthi-card .saarthi-send-btn::after {
    content: "";
    position: absolute;
    inset: -15%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.46) 0%, rgba(255, 255, 255, 0) 68%);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.25s var(--motion-ease), transform 0.25s var(--motion-ease);
    pointer-events: none;
}

#student-saarthi-card .saarthi-send-btn:hover::after,
#student-saarthi-card .saarthi-send-btn:focus-visible::after {
    opacity: 1;
    transform: scale(1);
}

#student-saarthi-card .saarthi-send-icon {
    filter: drop-shadow(0 2px 4px rgba(7, 32, 54, 0.4));
}

body:not(.ums-theme) #student-saarthi-card {
    border-color: rgba(118, 184, 235, 0.56);
    background:
        radial-gradient(120% 100% at 0% 0%, rgba(18, 215, 255, 0.2), transparent 48%),
        radial-gradient(120% 95% at 100% 0%, rgba(255, 179, 106, 0.18), transparent 48%),
        linear-gradient(154deg, rgba(14, 42, 68, 0.9), rgba(17, 52, 81, 0.9) 48%, rgba(13, 39, 63, 0.94));
    box-shadow:
        0 30px 58px rgba(4, 17, 31, 0.46),
        0 10px 20px rgba(24, 93, 150, 0.2);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-header-section,
body:not(.ums-theme) #student-saarthi-card .saarthi-conversation-section,
body:not(.ums-theme) #student-saarthi-card .saarthi-input-section {
    border-color: rgba(125, 184, 229, 0.5);
    background: linear-gradient(165deg, rgba(11, 39, 63, 0.78), rgba(17, 50, 79, 0.76));
    box-shadow:
        inset 0 1px 0 rgba(206, 236, 255, 0.12),
        0 14px 24px rgba(4, 17, 30, 0.36);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-welcome-copy h3,
body:not(.ums-theme) #student-saarthi-card .saarthi-chip strong,
body:not(.ums-theme) #student-saarthi-card .saarthi-message-text {
    color: #def3ff;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-welcome-copy p,
body:not(.ums-theme) #student-saarthi-card .saarthi-status-line,
body:not(.ums-theme) #student-saarthi-card .saarthi-soft-note,
body:not(.ums-theme) #student-saarthi-card .saarthi-message-header,
body:not(.ums-theme) #student-saarthi-card .saarthi-chip span,
body:not(.ums-theme) #student-saarthi-card .saarthi-compose-field > span,
body:not(.ums-theme) #student-saarthi-card .saarthi-actions .helper-text {
    color: #b8daee;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-compose-field textarea {
    border-color: rgba(124, 180, 226, 0.54);
    background: linear-gradient(176deg, rgba(6, 29, 50, 0.82), rgba(11, 39, 64, 0.82));
    color: #e0f4ff;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-compose-field textarea::placeholder {
    color: rgba(163, 199, 224, 0.82);
}

/* Saarthi dark-mode contrast polish */
body:not(.ums-theme) #student-saarthi-card {
    --saarthi-ink: #ebf7ff;
    --saarthi-soft-ink: #c1dff4;
    border-color: rgba(109, 181, 237, 0.62);
    background:
        radial-gradient(120% 95% at 0% 0%, rgba(18, 215, 255, 0.26), transparent 48%),
        radial-gradient(110% 92% at 100% 0%, rgba(255, 179, 106, 0.24), transparent 48%),
        radial-gradient(82% 90% at 82% 84%, rgba(88, 125, 255, 0.2), transparent 56%),
        linear-gradient(156deg, rgba(10, 33, 54, 0.96), rgba(11, 41, 66, 0.97) 50%, rgba(8, 30, 52, 0.98));
    box-shadow:
        0 34px 64px rgba(2, 12, 23, 0.56),
        0 14px 28px rgba(17, 88, 148, 0.24);
}

body:not(.ums-theme) #student-saarthi-card::before {
    opacity: 0.8;
    filter: blur(52px);
}

body:not(.ums-theme) #student-saarthi-card::after {
    opacity: 0.5;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-header-section,
body:not(.ums-theme) #student-saarthi-card .saarthi-conversation-section,
body:not(.ums-theme) #student-saarthi-card .saarthi-input-section {
    border-color: rgba(115, 183, 235, 0.56);
    background: linear-gradient(165deg, rgba(9, 39, 63, 0.9), rgba(14, 47, 75, 0.88));
    box-shadow:
        inset 0 1px 0 rgba(210, 238, 255, 0.11),
        0 16px 28px rgba(2, 12, 23, 0.42);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-affirmation-band {
    border-color: rgba(123, 187, 237, 0.62);
    background: linear-gradient(110deg, rgba(20, 93, 145, 0.56), rgba(15, 56, 89, 0.78) 42%, rgba(78, 59, 122, 0.64));
}

body:not(.ums-theme) #student-saarthi-card .saarthi-affirmation-pill {
    border-color: rgba(125, 190, 241, 0.48);
    background: linear-gradient(160deg, rgba(9, 48, 76, 0.9), rgba(13, 59, 92, 0.86));
    color: #dff2ff;
    box-shadow: 0 10px 18px rgba(3, 15, 29, 0.34);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-welcome-card {
    border-color: rgba(121, 189, 239, 0.58);
    background:
        radial-gradient(90% 96% at 8% 8%, rgba(18, 215, 255, 0.2), transparent 56%),
        radial-gradient(90% 96% at 96% 18%, rgba(255, 179, 106, 0.16), transparent 58%),
        linear-gradient(155deg, rgba(9, 42, 68, 0.92), rgba(13, 56, 88, 0.9));
    box-shadow:
        inset 0 1px 0 rgba(223, 244, 255, 0.08),
        0 14px 24px rgba(2, 12, 24, 0.4);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-welcome-icon {
    box-shadow:
        inset 0 2px 2px rgba(255, 255, 255, 0.72),
        0 18px 30px rgba(22, 122, 199, 0.34);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-welcome-copy h3 {
    color: #ecf8ff;
    text-shadow: 0 2px 8px rgba(0, 10, 19, 0.44);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-welcome-copy p,
body:not(.ums-theme) #student-saarthi-card .saarthi-soft-note,
body:not(.ums-theme) #student-saarthi-card .saarthi-actions .helper-text,
body:not(.ums-theme) #student-saarthi-card .saarthi-message-header,
body:not(.ums-theme) #student-saarthi-card .saarthi-chip span,
body:not(.ums-theme) #student-saarthi-card .saarthi-compose-field > span {
    color: #b8daef;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-status-line.ui-state[data-ui-state="neutral"] {
    color: #c9e7ff !important;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-status-line.ui-state[data-ui-state="loading"] {
    color: #8fd9ff !important;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-status-line.ui-state[data-ui-state="empty"] {
    color: #b8d7ed !important;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-status-line.ui-state[data-ui-state="error"] {
    color: #ffb6aa !important;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-status-line.ui-state[data-ui-state="success"] {
    color: #9af0c7 !important;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-chip {
    border-color: rgba(118, 184, 233, 0.58);
    background: linear-gradient(160deg, rgba(8, 39, 63, 0.92), rgba(12, 51, 80, 0.88));
    box-shadow: 0 10px 18px rgba(2, 12, 23, 0.34);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-chip strong {
    color: #e6f4ff;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-history {
    border-color: rgba(118, 183, 233, 0.56);
    background:
        linear-gradient(176deg, rgba(8, 37, 59, 0.92), rgba(10, 45, 72, 0.9) 58%, rgba(8, 33, 56, 0.94)),
        radial-gradient(120% 100% at 0% 100%, rgba(18, 215, 255, 0.12), transparent 56%);
    box-shadow:
        inset 0 1px 0 rgba(219, 243, 255, 0.08),
        0 16px 26px rgba(2, 12, 23, 0.36);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-history::before {
    opacity: 0.24;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-message {
    border-color: rgba(103, 175, 227, 0.58);
    background: linear-gradient(158deg, rgba(8, 43, 69, 0.95), rgba(11, 56, 87, 0.9));
    box-shadow: 0 14px 22px rgba(2, 12, 24, 0.34);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-message:hover {
    box-shadow: 0 20px 28px rgba(1, 10, 20, 0.44);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-message.theirs {
    border-color: rgba(96, 194, 230, 0.62);
    background: linear-gradient(158deg, rgba(10, 50, 77, 0.95), rgba(13, 63, 96, 0.9));
}

body:not(.ums-theme) #student-saarthi-card .saarthi-message.mine {
    border-color: rgba(121, 163, 243, 0.64);
    background: linear-gradient(160deg, rgba(20, 55, 89, 0.94), rgba(31, 67, 105, 0.9));
}

body:not(.ums-theme) #student-saarthi-card .saarthi-message-sender {
    color: #dff3ff;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-message.mine .saarthi-message-sender {
    color: #b9d1ff;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-message-text {
    color: #ecf8ff;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-typing {
    border-color: rgba(105, 178, 229, 0.56);
    background: linear-gradient(160deg, rgba(9, 43, 68, 0.92), rgba(13, 58, 88, 0.9));
    box-shadow: 0 12px 20px rgba(2, 12, 24, 0.34);
    color: #d9efff;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-empty {
    border-color: rgba(108, 181, 231, 0.58);
    background: linear-gradient(160deg, rgba(7, 42, 67, 0.9), rgba(11, 55, 87, 0.88));
    color: #d2eaff;
}

body:not(.ums-theme) #student-saarthi-card .saarthi-compose-field textarea {
    border-color: rgba(118, 182, 232, 0.62);
    background: linear-gradient(176deg, rgba(4, 30, 49, 0.94), rgba(8, 39, 63, 0.94));
    color: #e6f6ff;
    box-shadow:
        inset 0 1px 0 rgba(225, 246, 255, 0.08),
        0 8px 18px rgba(2, 12, 24, 0.36);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-compose-field textarea:focus {
    border-color: rgba(99, 176, 238, 0.88);
    box-shadow:
        0 0 0 4px rgba(54, 138, 205, 0.2),
        inset 0 1px 0 rgba(233, 249, 255, 0.12);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-compose-field textarea::placeholder {
    color: rgba(170, 205, 229, 0.86);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-new-chat-btn {
    border-color: rgba(108, 181, 233, 0.66);
    background: linear-gradient(155deg, rgba(9, 47, 76, 0.94), rgba(13, 61, 95, 0.9));
    color: #dff3ff;
    box-shadow: 0 12px 20px rgba(2, 12, 24, 0.34);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-new-chat-btn:hover {
    border-color: rgba(125, 195, 243, 0.84);
    box-shadow: 0 16px 24px rgba(2, 12, 24, 0.42);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-send-btn {
    border-color: rgba(127, 200, 246, 0.84);
    box-shadow:
        0 20px 32px rgba(4, 17, 32, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

@keyframes saarthi-aurora-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes saarthi-ambient-float {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-6px) scale(1.03);
    }
}

@keyframes saarthi-band-sweep {
    0%,
    12% {
        transform: translateX(-120%);
    }
    36%,
    100% {
        transform: translateX(130%);
    }
}

@keyframes saarthi-halo-spin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.04);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes saarthi-avatar-aura-pulse {
    0%,
    100% {
        opacity: var(--saarthi-aura-alpha);
        transform: translateZ(-2px) scale(0.98);
    }
    50% {
        opacity: calc(var(--saarthi-aura-alpha) + 0.16);
        transform: translateZ(-2px) scale(1.08);
    }
}

@keyframes saarthi-avatar-halo-breathe {
    0%,
    100% {
        opacity: 0.64;
    }
    50% {
        opacity: 0.95;
    }
}

@keyframes saarthi-card-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes saarthi-pill-float {
    0%,
    100% {
        transform: translateY(0) translateZ(0);
    }
    50% {
        transform: translateY(-2px) translateZ(6px);
    }
}

@media (max-width: 900px) {
    #student-saarthi-card::before {
        filter: blur(36px);
        opacity: 0.56;
    }

    #student-saarthi-card .saarthi-welcome-icon {
        width: 58px;
        height: 58px;
    }
}

@media (max-width: 700px) {
    #student-saarthi-card .saarthi-header-section:hover,
    #student-saarthi-card .saarthi-conversation-section:hover,
    #student-saarthi-card .saarthi-input-section:hover,
    #student-saarthi-card .saarthi-message:hover {
        transform: none;
    }
}

@media (max-width: 540px) {
    #student-saarthi-card .saarthi-chip-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .rms-thread-head {
        flex-direction: column;
    }

    .rms-thread-head-controls {
        justify-content: flex-start;
    }

    .rms-thread-meta-grid {
        grid-template-columns: 1fr;
    }

    .rms-thread-meta--full {
        grid-column: auto;
    }
}

.faculty-stats-grid {
    display: grid;
    gap: 0.78rem;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.review-actions {
    margin-top: 0.65rem;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
}

.checkbox-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: #b4d1e7;
    font-size: 0.82rem;
}

.checkbox-wrap input {
    width: auto;
}

.table-wrap {
    margin-top: 0.7rem;
    border-radius: 12px;
    border: 1px solid rgba(158, 208, 245, 0.38);
    overflow: auto;
    background: rgba(20, 50, 75, 0.34);
}

.submissions-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.submissions-table th,
.submissions-table td {
    text-align: left;
    padding: 0.5rem 0.54rem;
    border-bottom: 1px solid rgba(150, 201, 239, 0.15);
    font-size: 0.8rem;
    vertical-align: top;
}

.submissions-table th {
    color: #b4d3ea;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.analysis-grid {
    display: grid;
    gap: 0.82rem;
    grid-template-columns: 1.35fr 1fr;
}

.camera-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(4, 15, 28, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.camera-card {
    width: min(720px, 100%);
    padding: 0.9rem;
    border-radius: var(--radius-xl);
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow: auto;
}

.attendance-details-card {
    width: min(760px, 100%);
}

.attendance-details-list {
    margin-top: 0.65rem;
    display: grid;
    gap: 0.5rem;
    max-height: min(55vh, 520px);
    overflow: auto;
    padding-right: 0.2rem;
}

.attendance-detail-row {
    border-radius: 11px;
    border: 1px solid rgba(170, 213, 244, 0.33);
    background: rgba(38, 84, 122, 0.33);
    padding: 0.52rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.attendance-detail-row.present {
    border-left: 3px solid rgba(108, 236, 181, 0.45);
}

.attendance-detail-row.absent {
    border-left: 3px solid rgba(255, 156, 134, 0.45);
}

.attendance-detail-row.pending {
    border-left: 3px solid rgba(255, 206, 138, 0.55);
}

.attendance-detail-main {
    display: grid;
    gap: 0.12rem;
}

.attendance-detail-main strong {
    color: #edf8ff;
    font-size: 0.88rem;
}

.attendance-detail-main small {
    color: #b5d4eb;
    font-size: 0.78rem;
    font-family: var(--font-mono);
}

.attendance-detail-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    border: 1px solid rgba(175, 214, 250, 0.35);
    background: rgba(53, 109, 156, 0.22);
    color: #d1e8fb;
    min-width: 78px;
}

.attendance-detail-status.present {
    border-color: rgba(118, 252, 196, 0.62);
    background: rgba(24, 143, 95, 0.35);
    color: #e3ffef;
}

.attendance-detail-status.absent {
    border-color: rgba(255, 160, 138, 0.6);
    background: rgba(160, 59, 41, 0.34);
    color: #ffe3dc;
}

.attendance-detail-status.pending {
    border-color: rgba(255, 200, 136, 0.58);
    background: rgba(168, 110, 50, 0.32);
    color: #ffe9cd;
}

.attendance-detail-tail {
    display: grid;
    justify-items: end;
    gap: 0.34rem;
}

.attendance-detail-proof-btn {
    min-height: 30px;
    padding: 0.24rem 0.58rem;
    font-size: 0.74rem;
}

.faculty-rectification-head {
    margin-top: 0.86rem;
}

.rectification-table .field {
    margin: 0;
}

.rectification-table .field input {
    min-width: 160px;
    font-size: 0.74rem;
    padding: 0.34rem 0.42rem;
}

.rectification-action-wrap input {
    min-width: 160px;
    font-size: 0.74rem;
    padding: 0.34rem 0.42rem;
}

.rectification-action-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.rectification-action-wrap .btn {
    min-height: 30px;
    padding: 0.26rem 0.5rem;
    font-size: 0.72rem;
}

.attendance-rectification-card textarea {
    min-height: 96px;
    resize: vertical;
}

.rectification-proof-inline {
    max-width: 280px;
    display: grid;
    gap: 0.26rem;
}

.rectification-proof-inline p {
    margin: 0;
    font-size: 0.75rem;
    color: #c2ddef;
    line-height: 1.35;
}

.rectification-proof-inline small {
    color: #9fc2dc;
    font-size: 0.7rem;
}

.rectification-proof-thumb {
    width: 92px;
    height: 56px;
    border-radius: 8px;
    border: 1px solid rgba(145, 197, 236, 0.42);
    object-fit: cover;
    background: rgba(9, 24, 40, 0.62);
}

.profile-modal-card {
    width: min(760px, 100%);
}

.profile-tab-switch {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.profile-tab-btn {
    border-radius: 12px;
}

.profile-tab-btn.active {
    background: linear-gradient(130deg, #2e94f4, #4ac9ff);
    border-color: rgba(116, 208, 255, 0.9);
    color: #07111c;
    box-shadow: 0 8px 18px rgba(20, 102, 166, 0.28);
}

.profile-tab-panel {
    margin-top: 0.62rem;
    padding: 0.72rem;
    border-radius: 14px;
    border: 1px solid rgba(143, 199, 239, 0.34);
    background: rgba(14, 43, 71, 0.28);
    display: grid;
    gap: 0.5rem;
}

.profile-tab-panel .helper-text {
    margin-top: 0;
}

.profile-tab-panel .photo-preview-wrap {
    margin-top: 0.15rem;
}

.profile-tab-panel .btn {
    justify-self: flex-start;
}

.enrollment-split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.62rem;
}

.enrollment-box {
    border: 1px solid rgba(143, 199, 239, 0.34);
    border-radius: 12px;
    background: rgba(9, 34, 58, 0.34);
    padding: 0.64rem;
    display: grid;
    gap: 0.42rem;
    align-content: start;
}

.enrollment-box-title {
    margin: 0;
    font-size: 0.94rem;
    color: #e9f6ff;
    letter-spacing: 0.01em;
}

.profile-modal-grid {
    display: grid;
    gap: 0.62rem;
    margin-top: 0.6rem;
}

#camera-video,
#enrollment-video {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(153, 209, 247, 0.4);
    background: rgba(5, 14, 23, 0.8);
    max-height: 55vh;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    object-position: center center;
}

#camera-video.is-selfie,
#enrollment-video.is-selfie {
    transform: scaleX(-1);
}

.video-shell {
    position: relative;
    width: 100%;
}

#enrollment-video-demo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    border: 1px solid rgba(153, 209, 247, 0.4);
    object-fit: cover;
    object-position: center center;
    background: rgba(5, 14, 23, 0.8);
    pointer-events: none;
    z-index: 1;
}

#enrollment-video {
    position: relative;
    z-index: 2;
}

.verification-split {
    margin-top: 0.65rem;
    display: grid;
    grid-template-columns: 0.95fr 1.25fr;
    gap: 0.7rem;
    align-items: start;
}

.verification-panel {
    display: grid;
    gap: 0.45rem;
}

.verification-panel p {
    margin: 0;
    font-size: 0.76rem;
    color: #a8c6df;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.18rem 0.48rem;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid rgba(165, 214, 245, 0.34);
    background: rgba(45, 94, 137, 0.25);
}

.badge.verified,
.badge.approved {
    border-color: rgba(103, 235, 179, 0.55);
    background: rgba(29, 127, 87, 0.3);
    color: #d9ffe8;
}

.badge.pending_review,
.badge.pending {
    border-color: rgba(255, 199, 144, 0.55);
    background: rgba(169, 102, 60, 0.28);
    color: #ffe6cb;
}

.badge.rejected {
    border-color: rgba(255, 156, 136, 0.55);
    background: rgba(145, 63, 47, 0.3);
    color: #ffd2c8;
}

.admin-identity-cases-wrap {
    display: grid;
    gap: 0.75rem;
}

.admin-identity-case-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.admin-identity-case-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-identity-case-meta {
    margin-top: 0.22rem;
    font-size: 0.78rem;
    color: #9bb7cf;
}

.admin-identity-case-reason {
    margin-top: 0.45rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #e8f5ff;
}

.admin-identity-case-signals,
.admin-identity-case-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-top: 0.6rem;
}

.admin-identity-signal,
.admin-identity-case-checks span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    border: 1px solid rgba(150, 204, 244, 0.26);
    background: rgba(255, 255, 255, 0.06);
    color: #cfe6ff;
    font-size: 0.72rem;
    line-height: 1.2;
}

body.ums-theme .admin-identity-case-meta {
    color: #58708a;
}

body.ums-theme .admin-identity-case-reason {
    color: #1d3043;
}

body.ums-theme .admin-identity-signal,
body.ums-theme .admin-identity-case-checks span {
    border-color: #cad7e6;
    background: #eef4fb;
    color: #44607d;
}

.ums-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--ums-sidebar-width);
    background: linear-gradient(180deg, rgba(8, 25, 40, 0.98), rgba(10, 31, 49, 0.98));
    border-right: 1px solid rgba(132, 177, 213, 0.34);
    z-index: 8;
    display: grid;
    grid-template-rows: auto;
    align-content: start;
    gap: 0.46rem;
    padding: 0.9rem 0.7rem;
}

.ums-logo {
    margin: 0 0 0.55rem;
    padding: 0.62rem 0.5rem;
    border-radius: 10px;
    border: 1px solid rgba(141, 202, 255, 0.38);
    background: rgba(255, 255, 255, 0.08);
    color: #e4f3ff;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: grid;
    justify-items: center;
    gap: 0.38rem;
}

.ums-logo-mark-frame {
    width: 92px;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(162, 215, 251, 0.55);
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 6px;
    box-sizing: border-box;
}

.ums-logo-mark {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transform: none;
}

.ums-logo span {
    line-height: 1;
}

.ums-side-item {
    border: 1px solid rgba(164, 216, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #eaf5ff;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: left;
    padding: 0.78rem 0.72rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 0.58rem;
    transition: background var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}

.ums-side-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(172, 221, 255, 0.34);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(6, 22, 38, 0.3);
}

.ums-side-item.active {
    background: linear-gradient(120deg, rgba(40, 117, 187, 0.5), rgba(33, 86, 137, 0.56));
    border-color: rgba(146, 220, 255, 0.76);
    box-shadow: inset 3px 0 0 var(--accent), 0 12px 22px rgba(6, 21, 35, 0.34);
}

.ums-side-item:focus-visible {
    outline: 2px solid rgba(138, 219, 255, 0.95);
    outline-offset: 1px;
}

body.ums-theme .ums-sidebar {
    background: linear-gradient(180deg, #1a4f89 0%, #255c95 62%, #1f4f84 100%);
    border-right: 1px solid rgba(225, 238, 250, 0.44);
}

body.ums-theme .ums-logo {
    border-color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

body.ums-theme .ums-logo-mark-frame {
    border-color: rgba(255, 255, 255, 0.8);
}

body.ums-theme .ums-side-item {
    border-color: rgba(255, 255, 255, 0.32);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

body.ums-theme .ums-side-item:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.68);
}

body.ums-theme .ums-side-item.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(190, 228, 255, 0.28));
    border-color: rgba(255, 255, 255, 0.92);
    box-shadow: inset 3px 0 0 #ffffff, 0 10px 22px rgba(12, 35, 59, 0.22);
}

body.ums-theme .nav-glyph {
    border-color: rgba(238, 247, 255, 0.72);
    background: rgba(255, 255, 255, 0.2);
    color: #f4fbff;
}

.nav-glyph {
    width: 1.58rem;
    height: 1.58rem;
    border-radius: 10px;
    border: 1px solid rgba(176, 221, 255, 0.42);
    background: rgba(255, 255, 255, 0.09);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    flex: 0 0 1.58rem;
}

.nav-label {
    line-height: 1.1;
}

.verlyn-sidebar-widget {
    position: absolute;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.8rem;
    isolation: isolate;
    display: grid;
    gap: 0.5rem;
    padding-top: 0.36rem;
    border-top: 1px solid rgba(160, 215, 250, 0.32);
    --copilot-accent: #3292f2;
    --copilot-accent-strong: #2f6ecb;
    --copilot-accent-soft: rgba(65, 152, 236, 0.2);
    --copilot-glow: rgba(43, 122, 204, 0.34);
    --assist-panel-bg: linear-gradient(165deg, rgba(14, 32, 50, 0.98), rgba(10, 26, 42, 0.97));
    --assist-panel-border: rgba(128, 177, 214, 0.44);
    --assist-panel-shadow: 0 20px 34px rgba(5, 15, 24, 0.5);
    --assist-surface: rgba(18, 43, 64, 0.56);
    --assist-surface-alt: rgba(12, 35, 54, 0.62);
    --assist-border: rgba(127, 181, 220, 0.3);
    --assist-text: #e9f6ff;
    --assist-text-soft: #bdd6e9;
    --assist-text-muted: #91b0c8;
    --assist-heading: #f0f8ff;
    --assist-label: #d5e9f7;
    --assist-field-bg: rgba(6, 26, 43, 0.7);
    --assist-field-border: rgba(126, 177, 214, 0.42);
    --assist-field-text: #f0f9ff;
    --assist-placeholder: rgba(172, 204, 227, 0.86);
    --assist-button-bg: rgba(9, 43, 70, 0.44);
    --assist-button-border: rgba(135, 189, 226, 0.5);
    --assist-button-text: #d5ecfb;
}

.verlyn-sidebar-widget[data-module="attendance"] {
    --copilot-accent: #3292f2;
    --copilot-accent-strong: #2f6ecb;
    --copilot-accent-soft: rgba(65, 152, 236, 0.2);
}

.verlyn-sidebar-widget[data-module="saarthi"] {
    --copilot-accent: #33b6a4;
    --copilot-accent-strong: #1f8f80;
    --copilot-accent-soft: rgba(51, 182, 164, 0.22);
}

.verlyn-sidebar-widget[data-module="food"] {
    --copilot-accent: #d88a2b;
    --copilot-accent-strong: #b66a14;
    --copilot-accent-soft: rgba(216, 138, 43, 0.2);
}

.verlyn-sidebar-widget[data-module="rms"] {
    --copilot-accent: #39aa8e;
    --copilot-accent-strong: #268b73;
    --copilot-accent-soft: rgba(57, 170, 142, 0.2);
}

.verlyn-sidebar-widget[data-module="remedial"] {
    --copilot-accent: #9d62d8;
    --copilot-accent-strong: #7a42b5;
    --copilot-accent-soft: rgba(157, 98, 216, 0.2);
}

.verlyn-sidebar-widget[data-module="administrative"] {
    --copilot-accent: #6476db;
    --copilot-accent-strong: #4c5db7;
    --copilot-accent-soft: rgba(100, 118, 219, 0.2);
}

.verlyn-toggle-btn {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--copilot-accent) 44%, #ffffff);
    border-radius: 12px;
    background: linear-gradient(138deg, color-mix(in srgb, var(--copilot-accent) 72%, #12355a), color-mix(in srgb, var(--copilot-accent-strong) 76%, #0a2540));
    color: #e8f5ff;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.54rem;
    padding: 0.58rem 0.62rem;
    cursor: pointer;
    text-align: left;
    transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease);
    box-shadow: 0 10px 18px var(--copilot-glow);
}

.verlyn-toggle-btn:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--copilot-accent) 58%, #ffffff);
    box-shadow: 0 12px 22px var(--copilot-glow);
}

.verlyn-toggle-btn.is-active {
    border-color: color-mix(in srgb, var(--copilot-accent) 68%, #ffffff);
    box-shadow: 0 14px 24px var(--copilot-glow);
}

.verlyn-toggle-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--copilot-accent) 62%, #ffffff);
    background: rgba(6, 38, 64, 0.34);
    display: grid;
    place-items: center;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.verlyn-toggle-copy {
    display: grid;
    gap: 0.03rem;
    line-height: 1.12;
}

.verlyn-toggle-copy strong {
    font-size: 0.85rem;
    font-weight: 800;
}

.verlyn-toggle-copy small {
    font-size: 0.67rem;
    color: rgba(234, 246, 255, 0.94);
    font-weight: 600;
}

.verlyn-panel {
    position: absolute;
    left: calc(100% + 0.55rem);
    bottom: 0;
    width: min(392px, calc(100vw - var(--ums-sidebar-width) - 1.7rem));
    border: 1px solid var(--assist-panel-border);
    border-radius: 18px;
    background: var(--assist-panel-bg);
    box-shadow: var(--assist-panel-shadow);
    transform-origin: left bottom;
    transform: translateY(10px) scale(0.94);
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    overflow: auto;
    z-index: 18;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.verlyn-panel::before {
    content: '';
    position: sticky;
    top: 0;
    display: block;
    height: 2px;
    background: linear-gradient(90deg, var(--copilot-accent), color-mix(in srgb, var(--copilot-accent) 46%, #ffffff));
}

.verlyn-sidebar-widget.is-open .verlyn-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    max-height: min(68vh, 560px);
    animation: chotu-swing-open 260ms cubic-bezier(0.2, 0.82, 0.28, 1);
}

.verlyn-sidebar-widget.is-closing .verlyn-panel {
    animation: chotu-swing-close 230ms cubic-bezier(0.5, 0.02, 0.65, 0.16);
}

.verlyn-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.68rem 0.82rem 0.64rem;
    border-bottom: 1px solid var(--assist-border);
    background: color-mix(in srgb, var(--copilot-accent-soft) 44%, transparent);
}

.verlyn-head-copy {
    display: grid;
    gap: 0.04rem;
}

.verlyn-head-copy strong {
    color: var(--assist-heading);
    font-size: 0.9rem;
    font-weight: 800;
}

.verlyn-head-copy small {
    color: var(--assist-text-muted);
    font-size: 0.67rem;
}

.verlyn-minimize-btn {
    min-height: 30px;
    padding-inline: 0.58rem;
    font-size: 0.72rem;
    border-color: var(--assist-button-border);
    background: var(--assist-button-bg);
    color: var(--assist-button-text);
}

.verlyn-meta-row {
    margin: 0.52rem 0.82rem 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.38rem;
}

.verlyn-meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    border: 1px solid var(--assist-border);
    background: color-mix(in srgb, var(--copilot-accent-soft) 48%, var(--assist-surface));
    color: var(--assist-text-soft);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.13rem 0.56rem;
}

.verlyn-status {
    margin: 0.44rem 0.82rem 0;
    width: fit-content;
    max-width: calc(100% - 1.64rem);
    font-size: 0.69rem;
    line-height: 1.2;
    padding: 0.3rem 0.56rem;
    border-radius: 999px;
    border: 1px solid var(--assist-border);
    background: color-mix(in srgb, var(--copilot-accent-soft) 30%, var(--assist-surface-alt));
    color: var(--assist-text-soft);
}

.verlyn-quick-actions {
    margin: 0.5rem 0.82rem 0;
    display: grid;
    gap: 0.44rem;
}

.verlyn-action-card {
    display: grid;
    gap: 0.5rem;
    padding: 0.58rem 0.62rem;
    border-radius: 12px;
    border: 1px solid var(--assist-border);
    background: color-mix(in srgb, var(--copilot-accent-soft) 24%, var(--assist-surface));
}

.verlyn-action-card-compact {
    gap: 0.42rem;
}

.verlyn-action-head {
    display: grid;
    gap: 0.04rem;
}

.verlyn-action-head strong {
    color: var(--assist-heading);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 800;
}

.verlyn-action-card-inline .verlyn-action-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.verlyn-action-inline input {
    flex: 1 1 100%;
    min-height: 36px;
    border-radius: 10px;
    font-size: 0.76rem;
    color: var(--assist-field-text);
    background: var(--assist-field-bg);
    border: 1px solid var(--assist-field-border);
    padding-inline: 0.56rem;
}

.verlyn-action-inline input::placeholder {
    color: var(--assist-placeholder);
}

.verlyn-action-disclosure > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--assist-heading);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.verlyn-action-disclosure > summary::-webkit-details-marker {
    display: none;
}

.verlyn-action-disclosure > summary::after {
    content: '+';
    color: var(--assist-text-muted);
}

.verlyn-action-disclosure[open] > summary::after {
    content: '-';
}

.verlyn-action-form {
    display: grid;
    gap: 0.46rem;
    margin-top: 0.22rem;
}

.verlyn-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.verlyn-chip-btn {
    min-height: 30px;
    border-radius: 999px;
    padding: 0.32rem 0.62rem;
    font-size: 0.71rem;
    border-color: var(--assist-field-border);
    color: var(--assist-text-soft);
    background: color-mix(in srgb, var(--copilot-accent-soft) 46%, var(--assist-surface-alt));
}

.verlyn-field-grid {
    display: grid;
    gap: 0.42rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.verlyn-quick-field > span {
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--assist-label);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.verlyn-quick-field input,
.verlyn-quick-field select {
    width: 100%;
    min-height: 34px;
    border-radius: 10px;
    font-size: 0.76rem;
    color: var(--assist-field-text);
    background: var(--assist-field-bg);
    border: 1px solid var(--assist-field-border);
}

.verlyn-quick-field.is-disabled {
    opacity: 0.58;
}

.verlyn-inline-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.69rem;
    color: var(--assist-text-soft);
}

.verlyn-inline-check input {
    accent-color: var(--copilot-accent);
}

.verlyn-empty-note {
    padding: 0.62rem 0.68rem;
    border-radius: 12px;
    border: 1px dashed var(--assist-border);
    background: var(--assist-surface-alt);
    color: var(--assist-text-soft);
    font-size: 0.73rem;
    line-height: 1.38;
}

.verlyn-output {
    margin: 0.54rem 0.82rem 0;
    border: 1px solid var(--assist-border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--copilot-accent-soft) 22%, var(--assist-surface));
    padding: 0.66rem 0.68rem;
    min-height: 146px;
    max-height: min(30vh, 260px);
    overflow: auto;
    font-size: 0.79rem;
    line-height: 1.44;
    color: var(--assist-text);
    white-space: pre-wrap;
}

.verlyn-compose-field {
    margin: 0.52rem 0.82rem 0;
}

.verlyn-compose-field > span {
    font-size: 0.67rem;
    font-weight: 700;
    color: var(--assist-label);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.verlyn-compose-field input {
    width: 100%;
    min-height: 42px;
    border-radius: 11px;
    font-size: 0.8rem;
    color: var(--assist-field-text);
    background: var(--assist-field-bg);
    border: 1px solid var(--assist-field-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.verlyn-compose-field input::placeholder {
    color: var(--assist-placeholder);
}

.support-desk-controls .field select:focus,
.support-desk-compose-field textarea:focus,
.saarthi-compose-field textarea:focus,
.verlyn-action-inline input:focus,
.verlyn-quick-field input:focus,
.verlyn-quick-field select:focus,
.verlyn-compose-field input:focus {
    outline: 2px solid color-mix(in srgb, var(--copilot-accent) 72%, #ffffff);
    outline-offset: 1px;
    border-color: color-mix(in srgb, var(--copilot-accent) 64%, #ffffff);
}

.verlyn-actions {
    margin: 0.52rem 0.82rem 0.82rem;
    justify-content: stretch;
}

.admin-copilot-audit-wrap {
    display: grid;
    gap: 0.72rem;
    max-height: 520px;
    overflow: auto;
}

.admin-copilot-entry {
    border-radius: 16px;
    border: 1px solid rgba(177, 219, 250, 0.24);
    background: rgba(24, 61, 93, 0.34);
    overflow: hidden;
}

.admin-copilot-entry[open] {
    border-color: rgba(183, 225, 255, 0.38);
    box-shadow: 0 12px 24px rgba(6, 26, 42, 0.14);
}

.admin-copilot-entry summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    gap: 0.46rem;
    padding: 0.82rem 0.92rem;
}

.admin-copilot-entry summary::-webkit-details-marker {
    display: none;
}

.admin-copilot-entry-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.72rem;
}

.admin-copilot-entry-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #eef8ff;
    line-height: 1.36;
}

.admin-copilot-entry-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.34rem;
    justify-content: flex-end;
}

.admin-copilot-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(171, 216, 248, 0.4);
    background: rgba(36, 95, 136, 0.28);
    color: #dbf2ff;
    font-size: 0.71rem;
    font-weight: 700;
}

.admin-copilot-badge[data-tone="completed"] {
    border-color: rgba(117, 229, 178, 0.4);
    background: rgba(35, 111, 79, 0.32);
}

.admin-copilot-badge[data-tone="blocked"],
.admin-copilot-badge[data-tone="denied"] {
    border-color: rgba(248, 187, 125, 0.4);
    background: rgba(143, 83, 34, 0.3);
}

.admin-copilot-badge[data-tone="failed"] {
    border-color: rgba(255, 152, 152, 0.44);
    background: rgba(130, 46, 46, 0.32);
}

.admin-copilot-entry-meta,
.admin-copilot-entry-scope {
    display: flex;
    flex-wrap: wrap;
    gap: 0.56rem;
    color: #b7d7ee;
    font-size: 0.75rem;
    line-height: 1.4;
}

.admin-copilot-entry-body {
    display: grid;
    gap: 0.82rem;
    padding: 0.82rem 0.92rem 0.96rem;
    border-top: 1px solid rgba(170, 216, 248, 0.16);
    background: rgba(12, 41, 65, 0.28);
}

.admin-copilot-entry-section {
    display: grid;
    gap: 0.34rem;
}

.admin-copilot-entry-section strong {
    font-size: 0.74rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #d6ecfb;
}

.admin-copilot-entry-list {
    margin: 0;
    padding-left: 1rem;
    color: #edf8ff;
    font-size: 0.78rem;
    line-height: 1.48;
}

.admin-copilot-entry-empty {
    margin: 0;
    color: #8fb2cb;
    font-size: 0.76rem;
}

.verlyn-actions .btn {
    width: 100%;
    min-height: 39px;
    border-radius: 11px;
    font-size: 0.8rem;
    font-weight: 700;
}

body.ums-theme .verlyn-sidebar-widget {
    --assist-panel-bg: linear-gradient(160deg, rgba(250, 253, 255, 0.99), rgba(236, 244, 252, 0.98));
    --assist-panel-border: rgba(147, 198, 234, 0.64);
    --assist-panel-shadow: 0 22px 38px rgba(33, 70, 102, 0.16);
    --assist-surface: linear-gradient(160deg, rgba(235, 245, 254, 0.95), rgba(225, 238, 250, 0.9));
    --assist-surface-alt: rgba(237, 246, 253, 0.9);
    --assist-border: rgba(158, 202, 234, 0.62);
    --assist-text: #1d3850;
    --assist-text-soft: #35566f;
    --assist-text-muted: #607d95;
    --assist-heading: #163754;
    --assist-label: #305979;
    --assist-field-bg: #ffffff;
    --assist-field-border: #bfd2e4;
    --assist-field-text: #27435a;
    --assist-placeholder: rgba(103, 123, 140, 0.78);
    --assist-button-bg: rgba(239, 248, 255, 0.78);
    --assist-button-border: rgba(176, 211, 235, 0.75);
    --assist-button-text: #1e5178;
    border-top-color: rgba(255, 255, 255, 0.54);
}

body.ums-theme .verlyn-action-inline input {
    background: #ffffff;
}

@media (max-width: 1180px) {
    .verlyn-field-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.ums-top-nav {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 0.48rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ums-top-nav::-webkit-scrollbar {
    display: none;
}

.ums-module-btn {
    border: 1px solid rgba(170, 214, 245, 0.4);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #dceefd;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.4rem 0.76rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.45rem;
    transition: background var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}

.module-glyph {
    width: 1.38rem;
    height: 1.38rem;
    border-radius: 999px;
    border: 1px solid rgba(164, 217, 255, 0.48);
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.53rem;
    letter-spacing: 0.05em;
    flex: 0 0 1.38rem;
}

.module-label {
    line-height: 1;
}

.ums-module-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(191, 229, 255, 0.68);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 6px 14px rgba(8, 30, 49, 0.3);
}

.ums-module-btn.active {
    background: linear-gradient(135deg, rgba(53, 146, 255, 0.42), rgba(18, 198, 255, 0.34));
    border-color: rgba(156, 224, 255, 0.95);
    color: #f3fbff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 16px rgba(5, 26, 46, 0.34);
}

#top-nav-attendance,
#top-nav-saarthi {
    position: relative;
    overflow: hidden;
    color: #f3fbff;
    text-shadow: 0 1px 0 rgba(6, 18, 32, 0.35);
}

#top-nav-attendance {
    border-color: rgba(128, 204, 255, 0.8);
    background: linear-gradient(135deg, rgba(32, 128, 255, 0.55), rgba(66, 205, 255, 0.45));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 18px rgba(8, 48, 85, 0.35);
}

#top-nav-attendance::before {
    content: "";
    position: absolute;
    inset: -40% -10%;
    background:
        radial-gradient(circle at 20% 30%, rgba(160, 220, 255, 0.45), transparent 62%),
        radial-gradient(circle at 80% 70%, rgba(80, 180, 255, 0.4), transparent 58%);
    opacity: 0.5;
    pointer-events: none;
    transition: opacity var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}

#top-nav-attendance > *,
#top-nav-saarthi > * {
    position: relative;
    z-index: 1;
}

#top-nav-attendance .module-glyph {
    border-color: rgba(205, 242, 255, 0.9);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(138, 220, 255, 0.32));
    color: #0c4f7a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 4px 12px rgba(0, 120, 170, 0.35);
}

#top-nav-attendance:hover {
    border-color: rgba(170, 235, 255, 0.95);
    background: linear-gradient(135deg, rgba(26, 142, 255, 0.65), rgba(66, 220, 255, 0.52));
    transform: translateY(-1px);
}

#top-nav-attendance:hover::before {
    opacity: 0.72;
    transform: translateY(-2px) scale(1.02);
}

#top-nav-attendance.active {
    background: linear-gradient(135deg, rgba(18, 130, 255, 0.85), rgba(40, 214, 255, 0.7));
    border-color: rgba(175, 235, 255, 1);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 10px 20px rgba(5, 40, 70, 0.38);
}

#top-nav-saarthi {
    border-color: rgba(120, 230, 255, 0.85);
    background: linear-gradient(135deg, rgba(0, 176, 255, 0.45), rgba(0, 255, 214, 0.32));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 8px 18px rgba(14, 80, 120, 0.35);
}

#top-nav-saarthi::before {
    content: "";
    position: absolute;
    inset: -40% -10%;
    background:
        radial-gradient(circle at 18% 30%, rgba(160, 255, 245, 0.52), transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(60, 200, 255, 0.48), transparent 55%);
    opacity: 0.65;
    pointer-events: none;
    transition: opacity var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
    animation: saarthi-tab-glow 6.5s ease-in-out infinite;
}

#top-nav-saarthi .module-glyph {
    border-color: rgba(210, 255, 255, 0.92);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(132, 255, 234, 0.32));
    color: #0c566f;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 4px 12px rgba(0, 130, 170, 0.35);
}

#top-nav-saarthi:hover {
    border-color: rgba(170, 235, 255, 0.98);
    background: linear-gradient(135deg, rgba(0, 196, 255, 0.55), rgba(82, 255, 230, 0.42));
    transform: translateY(-1px);
}

#top-nav-saarthi:hover::before {
    opacity: 0.85;
    transform: translateY(-2px) scale(1.02);
}

#top-nav-saarthi.active {
    background: linear-gradient(135deg, rgba(0, 186, 255, 0.7), rgba(60, 255, 228, 0.52));
    border-color: rgba(180, 245, 255, 1);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 20px rgba(5, 40, 70, 0.38);
}

@keyframes saarthi-tab-glow {
    0%,
    100% {
        opacity: 0.45;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.85;
        transform: translateY(-2px) scale(1.03);
    }
}

.ums-module-btn:focus-visible {
    outline: 2px solid rgba(153, 223, 255, 0.95);
    outline-offset: 1px;
}

.ums-module-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.module-panel[data-module] {
    --module-accent: var(--accent);
}

.module-panel[data-module="attendance"] {
    --module-accent: #2f80ed;
}

.module-panel[data-module="food"] {
    --module-accent: #d17d2f;
}

.module-panel[data-module="administrative"] {
    --module-accent: #5f76cc;
}

.module-panel[data-module="rms"] {
    --module-accent: #2b9b8a;
}

.module-panel[data-module="saarthi"] {
    --module-accent: #25c5ff;
}

.module-panel[data-module="remedial"] {
    --module-accent: #a25bc9;
}

.module-panel[data-module] > .ops-card:first-of-type,
.module-panel[data-module] > .viz-card:first-of-type {
    position: relative;
    overflow: hidden;
}

.module-panel[data-module] > .ops-card:first-of-type::before,
.module-panel[data-module] > .viz-card:first-of-type::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--module-accent) 88%, #ffffff), var(--module-accent));
    opacity: 0.92;
}

.admin-submodule-picker {
    display: none;
    align-items: end;
    justify-content: flex-end;
    margin: 0 0 1rem;
}

.admin-submodule-picker .field {
    width: min(320px, 100%);
}

.role-admin .admin-submodule-picker {
    display: flex;
}

.role-admin .admin-submodule-panel {
    display: none;
}

.role-admin .admin-submodule-panel.is-active {
    display: block;
}

@media (max-width: 720px) {
    .admin-submodule-picker {
        justify-content: stretch;
    }

    .admin-submodule-picker .field {
        width: 100%;
    }
}

body:not(.ums-theme) #main-dashboard-header.topbar {
    border-color: rgba(142, 211, 252, 0.66);
    background:
        radial-gradient(circle at 88% 10%, rgba(255, 170, 116, 0.2), transparent 42%),
        linear-gradient(130deg, rgba(10, 40, 66, 0.9), rgba(12, 50, 79, 0.84) 52%, rgba(52, 38, 59, 0.82));
    box-shadow:
        inset 0 1px 0 rgba(187, 229, 255, 0.18),
        0 14px 30px rgba(4, 18, 33, 0.44);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
}

body:not(.ums-theme) .ums-top-nav {
    padding: 0.26rem;
    border-radius: 999px;
    border: 1px solid rgba(138, 208, 251, 0.52);
    background: linear-gradient(160deg, rgba(11, 44, 72, 0.78), rgba(10, 36, 58, 0.74));
    box-shadow: inset 0 1px 0 rgba(178, 225, 255, 0.16), 0 10px 20px rgba(6, 25, 42, 0.34);
    gap: 0.36rem;
    justify-content: flex-start;
    scroll-padding-inline: 0.3rem;
}

body:not(.ums-theme) .ums-module-btn {
    min-height: 40px;
    padding: 0.42rem 0.82rem;
    font-size: 0.9rem;
    font-weight: 760;
    color: #dff2ff;
    border-color: rgba(149, 218, 255, 0.42);
    background: linear-gradient(150deg, rgba(26, 73, 109, 0.5), rgba(14, 50, 79, 0.5));
    text-shadow: 0 1px 0 rgba(4, 14, 24, 0.46);
}

body:not(.ums-theme) .ums-module-btn:hover {
    border-color: rgba(182, 231, 255, 0.78);
    background: linear-gradient(150deg, rgba(36, 92, 133, 0.62), rgba(21, 65, 101, 0.62));
    box-shadow: 0 8px 16px rgba(6, 27, 44, 0.36);
}

body:not(.ums-theme) .ums-module-btn.active {
    border-color: rgba(168, 230, 255, 0.96);
    background: linear-gradient(112deg, rgba(67, 168, 247, 0.96), rgba(26, 190, 246, 0.9));
    color: #f4fcff;
    box-shadow:
        0 10px 20px rgba(5, 29, 47, 0.4),
        0 0 0 1px rgba(188, 233, 255, 0.44);
}

body.ums-theme {
    --bg-0: #e3edf7;
    --bg-1: #d8e5f1;
    --surface-0: #ffffff;
    --surface-1: #f7fbff;
    --surface-2: #edf4fb;
    --text: #243344;
    --muted: #5c6a79;
    --line: #c8d8e7;
    --accent: #1f79ff;
    --accent-2: #1f79ff;
    --elevation-1: 0 6px 14px rgba(29, 58, 86, 0.12);
    --elevation-2: 0 10px 22px rgba(29, 58, 86, 0.14);
    --elevation-3: 0 16px 30px rgba(25, 49, 73, 0.16);
    background:
        radial-gradient(circle at 12% -6%, #c8e2f8 0%, transparent 40%),
        radial-gradient(circle at 90% 8%, #d5e6f8 0%, transparent 34%),
        radial-gradient(circle at 70% 78%, #c7ddf0 0%, transparent 42%),
        linear-gradient(162deg, #e4edf6 0%, #dbe7f2 54%, #d4e1ee 100%);
    color: #2f3238;
}

body.ums-theme::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 52% 44% at 14% 24%, rgba(72, 156, 221, 0.34), transparent 72%),
        radial-gradient(ellipse 46% 36% at 84% 14%, rgba(255, 158, 86, 0.32), transparent 74%),
        radial-gradient(ellipse 38% 30% at 54% 8%, rgba(255, 201, 142, 0.2), transparent 74%),
        radial-gradient(ellipse 58% 48% at 68% 88%, rgba(80, 172, 209, 0.24), transparent 76%);
    opacity: 0.9;
}

body.ums-theme::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(85, 138, 186, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(85, 138, 186, 0.12) 1px, transparent 1px);
    background-size: 112px 112px;
    mask-image: radial-gradient(circle at 50% 34%, rgba(0, 0, 0, 0.52), transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 34%, rgba(0, 0, 0, 0.52), transparent 80%);
    opacity: 0.3;
}

body.ums-theme.ums-daylight-warm {
    background:
        radial-gradient(circle at 10% -10%, #c7e6ff 0%, transparent 38%),
        radial-gradient(circle at 92% 8%, #ffc18a 0%, transparent 36%),
        radial-gradient(circle at 74% 76%, #d3e8f8 0%, transparent 48%),
        radial-gradient(circle at 22% 90%, #e2effa 0%, transparent 44%),
        linear-gradient(162deg, #e0e8f2 0%, #d8e1ec 52%, #d4dde8 100%);
}

body.ums-theme.ums-daylight-warm::before {
    background:
        radial-gradient(ellipse 56% 46% at 14% 24%, rgba(78, 156, 217, 0.3), transparent 74%),
        radial-gradient(ellipse 50% 40% at 84% 14%, rgba(255, 147, 70, 0.4), transparent 76%),
        radial-gradient(ellipse 42% 34% at 56% 10%, rgba(255, 189, 120, 0.24), transparent 76%),
        radial-gradient(ellipse 60% 50% at 68% 88%, rgba(90, 171, 205, 0.2), transparent 78%);
    opacity: 0.96;
}

body.ums-theme.ums-daylight-warm .topbar {
    background:
        radial-gradient(circle at 84% 10%, rgba(255, 154, 72, 0.42), transparent 44%),
        radial-gradient(circle at 14% 0%, rgba(136, 194, 238, 0.26), transparent 44%),
        linear-gradient(145deg, rgba(244, 248, 253, 0.99), rgba(233, 239, 247, 0.97));
    border-color: #a5bfd2;
}

body.ums-theme.ums-daylight-warm .glass {
    background:
        radial-gradient(circle at 90% 8%, rgba(255, 184, 109, 0.33), transparent 44%),
        radial-gradient(circle at 12% 0%, rgba(153, 205, 243, 0.2), transparent 42%),
        linear-gradient(170deg, #fcfdff 0%, #eff4fa 58%, #fdefe1 100%);
    border-color: #a7c0d4;
}

body.ums-theme .scene {
    display: none;
}

body.ums-theme .dashboard {
    width: min(1260px, calc(100% - var(--ums-sidebar-width) - 2rem));
    max-width: none;
    margin: 0.75rem 1rem 1rem calc(var(--ums-sidebar-width) + 0.8rem);
    padding: 0;
}

body.ums-theme .glass {
    background: var(--surface-1);
    border: 1px solid var(--line);
    box-shadow: var(--elevation-1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.ums-theme .ops-card,
body.ums-theme .log-card,
body.ums-theme .viz-card {
    border-color: #aec7da;
}

body.ums-theme #student-courses-card.glass {
    background: linear-gradient(165deg, #fbfdff 0%, #f2f7ff 100%);
    border-color: #b9ccdf;
}

body.ums-theme #student-attendance-card.glass {
    background: linear-gradient(165deg, #fbfffd 0%, #f2faf6 100%);
    border-color: #b9d4c8;
}

body.ums-theme #student-ledger-card.glass {
    background: linear-gradient(165deg, #fcfdff 0%, #f3f6ff 100%);
    border-color: #c0cde0;
}

body.ums-theme #student-section .ops-card {
    background: linear-gradient(165deg, #f9fdff 0%, #edf6ff 52%, #eefbf7 100%);
    border-color: #bad2e7;
}

body.ums-theme #student-section .ops-card .panel-head,
body.ums-theme #faculty-section .ops-card .panel-head {
    padding-bottom: 0.36rem;
    border-bottom: 1px solid #c7daea;
}

body.ums-theme #student-section .panel-head small,
body.ums-theme #faculty-section .panel-head small {
    color: #51708b;
}

body.ums-theme #faculty-section .ops-card {
    background: linear-gradient(168deg, #f8fcff, #ecf5ff);
    border-color: #bbd2e6;
}

body.ums-theme #food-section > .ops-card:not(#food-orders-panel) {
    background: linear-gradient(164deg, #f8fbff 0%, #edf6ff 50%, #fff6eb 100%);
    border-color: #c6d9ea;
}

body.ums-theme #food-section > .ops-card:not(#food-orders-panel) .panel-head {
    padding-bottom: 0.34rem;
    border-bottom: 1px solid #d2dfeb;
}

body.ums-theme #food-section > .ops-card:not(#food-orders-panel) .panel-head small {
    color: #62778b;
}

body.ums-theme .log-card.glass {
    background: linear-gradient(165deg, #fffdf9 0%, #f9f6ef 100%);
    border-color: #d1c5b3;
}

body.ums-theme .control-grid:hover,
body.ums-theme .metric:hover,
body.ums-theme .viz-card:hover,
body.ums-theme .ops-card:hover,
body.ums-theme .log-card:hover {
    border-color: #d4dee8;
    box-shadow: 0 8px 22px rgba(23, 37, 51, 0.14);
}

body.ums-theme .topbar {
    position: sticky;
    top: 0.55rem;
    z-index: 7;
    padding: 0.8rem 1rem;
    align-items: center;
    border-color: var(--line);
    background: var(--surface-0);
    box-shadow: var(--elevation-3);
}

body.ums-theme .kicker {
    color: #617287;
    letter-spacing: 0.08em;
}

body.ums-theme h1 {
    color: #2d3238;
    font-size: clamp(1.45rem, 2.25vw, 2.05rem);
    margin: 0.2rem 0 0.24rem;
}

body.ums-theme .subline {
    color: #656d76;
    font-size: 0.98rem;
    line-height: 1.5;
}

body.ums-theme .live-datetime {
    color: #50616f;
    font-size: 0.84rem;
    padding: 0.34rem 0.64rem;
}

body.ums-theme .hero-kpi {
    background: #eef5fd;
    border-color: #c3d7ea;
}

body.ums-theme .hero-kpi span {
    color: #61788f;
}

body.ums-theme .hero-kpi strong {
    color: #264763;
}

body.ums-theme .chip {
    color: #3a424b;
    background: #f6f7f8;
    border-color: #dddfe1;
}

body.ums-theme .chip-live {
    border-color: #b7d9f7;
    background: #edf7ff;
    color: #195181;
}

body.ums-theme .account-trigger {
    border-color: #cfd9e5;
    background: #ffffff;
    color: #344150;
}

body.ums-theme .theme-toggle-btn {
    background: linear-gradient(140deg, #f2f8ff, #e6f1ff);
    border-color: #b8d0e4;
    color: #1f4f77;
}

body.ums-theme .ums-top-nav {
    padding: 0.25rem;
    border-radius: 999px;
    border: 1px solid #c3d6e8;
    background: #f1f7fe;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 8px 16px rgba(27, 62, 90, 0.1);
    gap: 0.36rem;
}

body.ums-theme .ums-module-btn {
    border-color: #c2d6e8;
    background: #ffffff;
    color: #35516c;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

body.ums-theme .ums-module-btn:hover {
    background: #f4f9ff;
    border-color: #aac8df;
    box-shadow: 0 6px 14px rgba(24, 48, 72, 0.15);
}

body.ums-theme .ums-module-btn.active {
    background: linear-gradient(135deg, #1f6eff, #3fc8ff);
    border-color: #1f7eff;
    color: #f4fbff;
    text-shadow: 0 1px 0 rgba(7, 18, 32, 0.28);
    box-shadow: 0 12px 22px rgba(17, 72, 122, 0.26), 0 0 0 1px rgba(157, 213, 255, 0.4);
}

body.ums-theme #top-nav-attendance {
    background: linear-gradient(135deg, #2c7aff, #35d0ff);
    border-color: #2a90ff;
    color: #ffffff;
    text-shadow: 0 1px 0 rgba(6, 18, 32, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 12px 22px rgba(20, 84, 128, 0.24);
}

body.ums-theme #top-nav-attendance::before {
    opacity: 0.72;
    background:
        radial-gradient(circle at 18% 28%, rgba(160, 225, 255, 0.55), transparent 62%),
        radial-gradient(circle at 78% 72%, rgba(80, 190, 255, 0.45), transparent 58%);
}

body.ums-theme #top-nav-attendance .module-glyph {
    border-color: rgba(214, 242, 255, 0.95);
    background: rgba(255, 255, 255, 0.86);
    color: #0f5a9a;
}

body.ums-theme #top-nav-attendance:hover {
    background: linear-gradient(135deg, #1f72ff, #26dcff);
    border-color: #2097ff;
}

body.ums-theme #top-nav-attendance.active {
    background: linear-gradient(135deg, #0f5dff, #0cc7ff);
    border-color: #1b85ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 14px 24px rgba(14, 72, 118, 0.28), 0 0 0 2px rgba(78, 196, 255, 0.32);
}

body.ums-theme #top-nav-saarthi {
    background: linear-gradient(135deg, #00b4ff, #2ff5c9);
    border-color: #4ad2ff;
    color: #ffffff;
    text-shadow: 0 1px 0 rgba(6, 18, 32, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 12px 22px rgba(18, 100, 150, 0.26);
}

body.ums-theme #top-nav-saarthi::before {
    opacity: 0.78;
    background:
        radial-gradient(circle at 18% 28%, rgba(170, 255, 245, 0.6), transparent 62%),
        radial-gradient(circle at 80% 72%, rgba(70, 190, 255, 0.55), transparent 58%);
}

body.ums-theme #top-nav-saarthi .module-glyph {
    border-color: rgba(208, 252, 255, 0.95);
    background: rgba(255, 255, 255, 0.86);
    color: #0b5f7a;
}

body.ums-theme #top-nav-saarthi:hover {
    background: linear-gradient(135deg, #00c2ff, #52ffd5);
    border-color: #3fe0ff;
    color: #ffffff;
}

body.ums-theme #top-nav-saarthi.active {
    background: linear-gradient(135deg, #0096ff, #00e3b6);
    border-color: #2ed1ff;
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 14px 24px rgba(14, 88, 132, 0.3), 0 0 0 2px rgba(72, 210, 255, 0.34);
}

body.ums-theme .module-glyph {
    border-color: rgba(189, 220, 244, 0.8);
    background: #edf5ff;
    color: #2f5f8b;
}

body.ums-theme .ums-module-btn.active .module-glyph {
    border-color: rgba(214, 236, 255, 0.9);
    background: rgba(255, 255, 255, 0.22);
    color: #f3fbff;
}

body.ums-theme .error-text {
    color: #b23322 !important;
}

body.ums-theme .account-dropdown {
    background: #ffffff;
    border-color: #d8e0ea;
    box-shadow: 0 12px 28px rgba(23, 33, 44, 0.14);
}

body.ums-theme .account-dropdown-head {
    border-bottom-color: #e4ebf1;
}

body.ums-theme .account-lines strong {
    color: #28313b;
}

body.ums-theme .account-lines small {
    color: #5e6772;
}

body.ums-theme .dropdown-item {
    background: #f7f9fc;
    border-color: #d8e1ea;
    color: #2f3844;
}

body.ums-theme .dropdown-item:hover {
    background: #edf4fb;
    border-color: #bfd3e7;
}

body.ums-theme .panel-head h3,
body.ums-theme .panel-head small,
body.ums-theme .field,
body.ums-theme .helper-text,
body.ums-theme .verification-panel p,
body.ums-theme .calendar-course,
body.ums-theme .calendar-room,
body.ums-theme .calendar-time,
body.ums-theme .list-item,
body.ums-theme .ai-output,
body.ums-theme .status-log,
body.ums-theme .legend-row {
    color: #353a40;
}

body.ums-theme .panel-head small,
body.ums-theme .helper-text {
    color: #5b6672;
}

body.ums-theme .empty-state-row {
    border-style: dashed;
    border-color: #bfd2e3;
    background: #f8fbff;
}

body.ums-theme .list-wrap:empty {
    border-color: #c6d7e7;
    background: #f7fbff;
}

body.ums-theme .list-wrap:empty::before {
    color: #577086;
}

body.ums-theme .list-wrap:empty::after,
body.ums-theme .status-log-skeleton .skeleton-line {
    background: linear-gradient(90deg, rgba(154, 190, 219, 0.22) 0%, rgba(117, 169, 209, 0.44) 50%, rgba(154, 190, 219, 0.22) 100%);
}

body.ums-theme .empty-state-row strong {
    color: #2a3f54;
}

body.ums-theme .empty-state-row small {
    color: #516679;
}

body.ums-theme .empty-state-icon {
    border-color: #bdd5e7;
    background: #ecf5fc;
    color: #3b5b77;
}

body.ums-theme input,
body.ums-theme select {
    color: #2f353c;
    background: #fbfbfb;
    border: 1px solid #d6d8da;
}

body.ums-theme .btn {
    border: 1px solid #c7d9e9;
    background: #f7fbff;
    color: #2c3f52;
    transition: background-color var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease);
}

body.ums-theme .btn:hover,
body.ums-theme .btn:active {
    transform: none;
    background: #eff7ff;
    border-color: #abc7de;
    box-shadow: 0 6px 12px rgba(18, 43, 68, 0.13);
}

body.ums-theme .btn:focus-visible {
    outline: 2px solid #429ef2;
}

body.ums-theme .btn-primary {
    background: linear-gradient(122deg, #206ff5, #3d93ff);
    border-color: #2a78f0;
    color: #f4fbff;
}

body.ums-theme .btn-secondary {
    background: #edf5ff;
    border-color: #c0d8ef;
    color: #28557c;
}

body.ums-theme .btn-secondary:hover,
body.ums-theme .btn-secondary:active {
    background: #dbeeff;
    border-color: #9ec6ea;
    color: #194267;
}

body.ums-theme .btn-ghost {
    background: #f5f5f5;
    color: #2f3238;
}

/* Auth-specific high-contrast overrides (placed after generic ums-theme controls). */
body.ums-theme .auth-card.glass {
    background:
        radial-gradient(circle at 20% 0%, rgba(108, 186, 248, 0.18), transparent 50%),
        radial-gradient(circle at 94% 8%, rgba(48, 222, 255, 0.14), transparent 38%),
        linear-gradient(132deg, rgba(14, 44, 74, 0.92), rgba(10, 35, 61, 0.96), rgba(9, 31, 54, 0.98));
    border-color: rgba(143, 202, 244, 0.46);
    box-shadow: 0 42px 84px rgba(4, 15, 28, 0.5);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.ums-theme .auth-overlay .auth-card h2 {
    color: #e8f4ff;
    background: none;
    -webkit-text-fill-color: initial;
}

body.ums-theme .auth-overlay .auth-sub {
    color: #c8ddf1;
}

body.ums-theme .auth-overlay .kicker {
    color: #9fd8ff;
}

body.ums-theme .auth-overlay .auth-section-head h3 {
    color: #edf8ff;
}

body.ums-theme .auth-overlay .auth-section-head p {
    color: #b5d4ec;
}

body.ums-theme .auth-overlay .field span {
    color: #b9d7ee;
}

body.ums-theme .auth-overlay .password-strength {
    color: #95bddf;
}

body.ums-theme .auth-overlay .auth-message {
    color: #b6d8f0;
}

body.ums-theme .auth-overlay .auth-hint {
    color: #96c2e3;
}

body.ums-theme .auth-overlay input,
body.ums-theme .auth-overlay select {
    color: #eaf6ff;
    background: rgba(9, 33, 55, 0.72);
    border: 1px solid rgba(127, 192, 236, 0.46);
}

body.ums-theme .auth-overlay input::placeholder {
    color: rgba(198, 226, 246, 0.74);
}

body.ums-theme .auth-overlay .btn {
    border-color: rgba(130, 189, 233, 0.44);
    background: rgba(20, 57, 88, 0.66);
    color: #dcedfb;
}

body.ums-theme .auth-overlay .btn:hover,
body.ums-theme .auth-overlay .btn:active {
    background: rgba(32, 77, 114, 0.84);
    border-color: rgba(142, 206, 248, 0.62);
    box-shadow: 0 8px 18px rgba(6, 24, 40, 0.34);
}

body.ums-theme .auth-overlay .btn-primary,
body.ums-theme .auth-mode-btn.active {
    background: linear-gradient(135deg, #4f7cff, #2563eb);
    border-color: rgba(130, 191, 248, 0.9);
    color: #f4fbff;
    box-shadow: 0 8px 16px rgba(36, 88, 158, 0.34);
}

body.ums-theme .auth-overlay .btn-secondary {
    background: rgba(33, 87, 129, 0.74);
    border-color: rgba(123, 188, 235, 0.62);
    color: #dff1ff;
}

body.ums-theme .metric-value {
    text-shadow: none;
    color: #2f343a;
}

body.ums-theme .ai-output,
body.ums-theme .timetable-grid,
body.ums-theme .table-wrap {
    background: linear-gradient(168deg, #f8fcff, #f1f7ff);
    border-color: #c3d3e2;
}

body.ums-theme .auth-mode-btn.active {
    background: linear-gradient(135deg, #4f7cff, #2563eb);
    border-color: rgba(130, 191, 248, 0.9);
    color: #f4fbff;
    box-shadow: 0 8px 16px rgba(36, 88, 158, 0.34);
}

body.ums-theme .calendar-corner,
body.ums-theme .calendar-day-header {
    background: linear-gradient(180deg, #f5f9ff, #e9f2fc);
    color: #35506b;
    border-bottom: 1px solid #cfdeeb;
}

body.ums-theme .calendar-day-band {
    background: linear-gradient(180deg, rgba(116, 177, 229, 0.22), rgba(116, 177, 229, 0.1));
    border-inline-color: rgba(127, 185, 233, 0.34);
}

body.ums-theme .calendar-day-header.current-day {
    background: linear-gradient(180deg, #d9ecff, #cae4ff);
    color: #134c79;
    border-bottom-color: #8db7dc;
}

body.ums-theme .calendar-time-label {
    background: linear-gradient(180deg, #f6f9fe, #edf3fb);
    color: #4c6176;
    border-right: 1px solid #d4e0eb;
    border-bottom: 1px solid #dce6ef;
}

body.ums-theme .calendar-cell {
    background: linear-gradient(180deg, #fbfdff, #f5f9fe);
    border-bottom: 1px solid #dfe8f0;
    border-right: 1px solid #dfe8f0;
}

body.ums-theme .calendar-cell.current-day {
    background: linear-gradient(180deg, #eff6ff, #e7f1ff);
}

body.ums-theme .calendar-class {
    border: 1px solid #c7d7e7;
    background: linear-gradient(165deg, #f9fcff, #f0f6fd);
    color: #2e3f4f;
    border-radius: var(--radius-sm);
    padding: 0.42rem;
    box-shadow: 0 5px 12px rgba(26, 56, 83, 0.09);
    transition: border-color var(--motion-fast) var(--motion-ease), background-color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}

body.ums-theme .calendar-class.current-day {
    border-color: #9ec3e5;
    background: #edf6ff;
}

body.ums-theme .calendar-class.slot-present {
    border-color: #2f9d5f;
    background: linear-gradient(160deg, #e7f8ef, #d8f3e6);
    box-shadow: inset 0 0 0 1px rgba(47, 157, 95, 0.25);
}

body.ums-theme .calendar-class.slot-absent {
    border-color: #e4b2ad;
    background: #fff2f1;
}

body.ums-theme .calendar-class.slot-upcoming {
    border-color: #c0d3e5;
    background: linear-gradient(165deg, #f8fbff, #edf4fc);
}

body.ums-theme .calendar-class.slot-mark {
    border-color: #79d9aa;
    background: #ebf9f1;
}

body.ums-theme .calendar-now-line {
    border-top-color: #d58f2e;
    box-shadow: 0 0 0 1px rgba(214, 150, 67, 0.2), 0 0 8px rgba(216, 155, 78, 0.24);
}

body.ums-theme .calendar-now-line::before {
    background: #dd9e45;
    box-shadow: 0 0 0 3px rgba(221, 168, 95, 0.22);
}

body.ums-theme .calendar-time {
    color: #4a4f56;
}

body.ums-theme .calendar-course {
    color: #32373e;
    font-weight: 700;
}

body.ums-theme .calendar-room {
    color: #4f5760;
    font-weight: 600;
}

body.ums-theme .slot-status {
    background: #f7f7f7;
    border-color: #d7d7d7;
    color: #4d545b;
}

body.ums-theme .slot-status.present {
    background: #1e8f50;
    border-color: #1a7944;
    color: #ffffff;
}

body.ums-theme .slot-status.absent {
    background: #cb4b3f;
    border-color: #aa3d34;
    color: #ffffff;
}

body.ums-theme .slot-status.upcoming {
    background: #6f7c8a;
    border-color: #5d6a77;
    color: #ffffff;
}

body.ums-theme .slot-status.mark {
    background: #0f9a5a;
    border-color: #0c7f4a;
    color: #ffffff;
}

body.ums-theme .attendance-pill {
    background: #f7f7f7;
    border-color: #d7d7d7;
    color: #4d545b;
}

body.ums-theme .attendance-pill.ok {
    background: #1e8f50;
    border-color: #18723f;
    color: #ffffff;
}

body.ums-theme .attendance-pill.pending {
    background: #d4932d;
    border-color: #b77d24;
    color: #ffffff;
}

body.ums-theme .attendance-pill.bad {
    background: #cb4b3f;
    border-color: #aa3d34;
    color: #ffffff;
}

body.ums-theme .list-item,
body.ums-theme .course-aggregate-item,
body.ums-theme .history-row {
    background: linear-gradient(168deg, #ffffff, #f6fbff);
    border-color: #c8d7e5;
}

body.ums-theme .student-aggregate-panel {
    gap: 0.46rem;
}

body.ums-theme .aggregate-chip {
    border-color: #c5d8ea;
    background: linear-gradient(160deg, #eef6ff, #e8f2fd);
}

body.ums-theme .aggregate-chip span {
    color: #395870;
    font-weight: 700;
}

body.ums-theme .aggregate-chip strong {
    color: #173d63;
}

body.ums-theme #student-saarthi-card {
    border-color: #56b6ea;
    background:
        radial-gradient(circle at 6% 8%, rgba(0, 200, 255, 0.55), transparent 44%),
        radial-gradient(circle at 92% 10%, rgba(255, 140, 80, 0.38), transparent 46%),
        radial-gradient(circle at 82% 86%, rgba(0, 255, 210, 0.32), transparent 48%),
        linear-gradient(154deg, #ffffff, #def4ff 50%, #e8e0ff);
    box-shadow: 0 32px 60px rgba(22, 72, 118, 0.26);
}

body.ums-theme #student-saarthi-card .saarthi-header-section,
body.ums-theme #student-saarthi-card .saarthi-conversation-section,
body.ums-theme #student-saarthi-card .saarthi-input-section {
    border-color: #8fcbee;
    background: linear-gradient(164deg, rgba(255, 255, 255, 0.98), rgba(216, 247, 255, 0.98) 56%, rgba(245, 232, 255, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.76),
        0 18px 34px rgba(34, 92, 140, 0.2);
}

body.ums-theme #student-saarthi-card .saarthi-status-line,
body.ums-theme #student-saarthi-card .saarthi-soft-note,
body.ums-theme #student-saarthi-card .saarthi-actions .helper-text {
    color: #496782;
}

body.ums-theme #student-saarthi-card .saarthi-chip {
    border-color: #93cff0;
    background: linear-gradient(160deg, #ffffff, #dff3ff 60%, #efe4ff);
}

body.ums-theme #student-saarthi-card .saarthi-chip span {
    color: #476886;
}

body.ums-theme #student-saarthi-card .saarthi-chip strong {
    color: #1f4568;
}

body.ums-theme #student-saarthi-card .saarthi-affirmation-band {
    border-color: #8fd4ef;
    background: linear-gradient(110deg, #ffe4f4, #dff7ff 44%, #efffed);
}

body.ums-theme #student-saarthi-card .saarthi-affirmation-pill {
    border-color: #91d2ef;
    background: linear-gradient(150deg, #ffffff, #e1f2ff);
    color: #215a84;
}

body.ums-theme #student-saarthi-card .saarthi-history {
    border-color: #94cde8;
    background: linear-gradient(176deg, #fffdfc, #e9f3ff 56%, #e2f9ff);
}

body.ums-theme #student-saarthi-card .saarthi-message {
    border-color: #a6d2ec;
    background: linear-gradient(160deg, #ffffff, #e7f4ff);
    box-shadow: 0 12px 20px rgba(52, 98, 138, 0.16);
}

body.ums-theme #student-saarthi-card .saarthi-message.theirs {
    border-color: #9fd5f1;
    background: linear-gradient(160deg, #f4feff, #d7f0ff);
}

body.ums-theme #student-saarthi-card .saarthi-message.mine {
    border-color: #8fbaf5;
    background: linear-gradient(160deg, #eaf6ff, #d6e6ff);
}

body.ums-theme #student-saarthi-card .saarthi-message-header {
    color: #677f95;
}

body.ums-theme #student-saarthi-card .saarthi-message-sender {
    color: #5168ab;
}

body.ums-theme #student-saarthi-card .saarthi-message.mine .saarthi-message-sender {
    color: #2f649c;
}

body.ums-theme #student-saarthi-card .saarthi-message-text {
    color: #274d71;
}

body.ums-theme #student-saarthi-card .saarthi-empty {
    color: #4e6b86;
}

body.ums-theme #student-saarthi-card .saarthi-compose-field > span {
    color: #4f647b;
}

body.ums-theme #student-saarthi-card .saarthi-compose-field textarea {
    color: #1f4568;
    background: #ffffff;
    border-color: #bdd6ea;
}

body.ums-theme #student-saarthi-card .saarthi-compose-field textarea::placeholder {
    color: #8098b0;
}

body.ums-theme #student-saarthi-card .saarthi-send-btn {
    border-color: #39b7ee;
    background: linear-gradient(145deg, #00bbff, #32ffd0);
    box-shadow:
        0 20px 32px rgba(30, 100, 160, 0.36),
        0 0 0 1px rgba(255, 255, 255, 0.28) inset;
    filter: saturate(1.18);
}

body.ums-theme #student-saarthi-card .saarthi-new-chat-btn {
    border-color: #7dc5ea;
    background: linear-gradient(145deg, #ffffff, #d7f0ff);
    color: #155c87;
}

body.ums-theme .course-aggregate-item {
    border-color: #d4dde7;
    background: #ffffff;
    gap: 0.18rem;
    padding: 0.48rem 0.58rem;
}

body.ums-theme .course-aggregate-item.course-clickable:hover {
    border-color: #9fc4e3;
    box-shadow: 0 10px 18px rgba(28, 58, 86, 0.14);
}

body.ums-theme .course-aggregate-item.course-clickable:focus-visible {
    outline: 2px solid #4ca5e7;
    border-color: #8db8da;
    box-shadow: 0 0 0 2px rgba(76, 165, 231, 0.2), 0 10px 18px rgba(28, 58, 86, 0.14);
}

body.ums-theme .course-aggregate-item.good {
    border-left: 4px solid #1e8f50;
    background: #f4fbf7;
}

body.ums-theme .course-aggregate-item.mid {
    border-left: 4px solid #d4932d;
    background: #fffbf3;
}

body.ums-theme .course-aggregate-item.low {
    border-left: 4px solid #cb4b3f;
    background: #fff8f7;
}

body.ums-theme .course-aggregate-item h4 {
    color: #28313b;
}

body.ums-theme .course-aggregate-item p {
    color: #4f5d6b;
}

body.ums-theme .course-card-hint {
    color: #5f7082;
}

body.ums-theme .recovery-plan-card,
body.ums-theme .recovery-action-row,
body.ums-theme .recovery-metric {
    background: #ffffff;
    border-color: #d4dde7;
}

body.ums-theme .recovery-plan-card.watch {
    background: #fffbf3;
    border-left-color: #d4932d;
}

body.ums-theme .recovery-plan-card.high {
    background: #fff8f7;
    border-left-color: #cb4b3f;
}

body.ums-theme .recovery-plan-card.critical {
    background: #fff2f2;
    border-left-color: #b92f37;
    box-shadow: 0 12px 22px rgba(98, 33, 39, 0.12);
}

body.ums-theme .recovery-plan-head h4,
body.ums-theme .recovery-action-title,
body.ums-theme .recovery-metric strong {
    color: #26313d;
}

body.ums-theme .recovery-plan-head p,
body.ums-theme .recovery-plan-summary,
body.ums-theme .recovery-action-description,
body.ums-theme .recovery-metric span,
body.ums-theme .recovery-action-meta small,
body.ums-theme .recovery-empty,
body.ums-theme .admin-recovery-stat span {
    color: #4f5d6b;
}

body.ums-theme .recovery-plan-risk {
    border-color: #c6d9ea;
    background: #edf4fb;
    color: #2e4f6d;
}

body.ums-theme .recovery-plan-risk.watch {
    background: #fff2d6;
    border-color: #dfb15f;
    color: #7f5311;
}

body.ums-theme .recovery-plan-risk.high {
    background: #ffe5de;
    border-color: #e09b8e;
    color: #8b362f;
}

body.ums-theme .recovery-plan-risk.critical {
    background: #ffd9d9;
    border-color: #d46b72;
    color: #8c1f28;
}

body.ums-theme .recovery-plan-risk.pending {
    background: #fff2d6;
    border-color: #dfb15f;
    color: #7f5311;
}

body.ums-theme .recovery-plan-risk.acknowledged {
    background: #dff0ff;
    border-color: #86bfe9;
    color: #23557d;
}

body.ums-theme .recovery-plan-risk.completed {
    background: #dff4e7;
    border-color: #7dc194;
    color: #1f6b3f;
}

body.ums-theme .recovery-action-row.completed {
    border-left-color: #1e8f50;
}

body.ums-theme .recovery-action-row.acknowledged {
    border-left-color: #4ca5e7;
}

body.ums-theme .recovery-action-row.pending {
    border-left-color: #d4932d;
}

body.ums-theme .admin-recovery-stat {
    background: #ffffff;
    border-color: #d4dde7;
}

body.ums-theme .admin-recovery-stat strong {
    color: #26313d;
}

body.ums-theme .admin-recovery-stat.critical {
    background: #fff1f1;
    border-color: #e0b2b5;
}

body.ums-theme .attendance-detail-row {
    border-color: #d4dde7;
    background: #ffffff;
}

body.ums-theme .attendance-detail-row.present {
    border-left-color: #1e8f50;
}

body.ums-theme .attendance-detail-row.absent {
    border-left-color: #cb4b3f;
}

body.ums-theme .attendance-detail-row.pending {
    border-left-color: #d4932d;
}

body.ums-theme .attendance-detail-main strong {
    color: #26313d;
}

body.ums-theme .attendance-detail-main small {
    color: #5f6f80;
}

body.ums-theme .attendance-detail-status {
    border-color: #c6d9ea;
    background: #edf4fb;
    color: #2e4f6d;
}

body.ums-theme .attendance-detail-status.present {
    background: #1e8f50;
    border-color: #18723f;
    color: #ffffff;
}

body.ums-theme .attendance-detail-status.absent {
    background: #cb4b3f;
    border-color: #aa3d34;
    color: #ffffff;
}

body.ums-theme .attendance-detail-status.pending {
    background: #d4932d;
    border-color: #b77d24;
    color: #ffffff;
}

body.ums-theme .rectification-proof-inline p {
    color: #4f5d6b;
}

body.ums-theme .rectification-proof-inline small {
    color: #5f7082;
}

body.ums-theme .rectification-proof-thumb {
    border-color: #c5d8ea;
    background: #eef4fa;
}

body.ums-theme .course-percent-badge {
    background: #eaf2fb;
    border-color: #bfd3e7;
    color: #234564;
}

body.ums-theme .course-percent-badge.good {
    background: #1e8f50;
    border-color: #18723f;
    color: #ffffff;
}

body.ums-theme .course-percent-badge.mid {
    background: #d4932d;
    border-color: #b77d24;
    color: #ffffff;
}

body.ums-theme .course-percent-badge.low {
    background: #cb4b3f;
    border-color: #aa3d34;
    color: #ffffff;
}

body.ums-theme .history-row {
    padding: 0.48rem 0.56rem;
}

body.ums-theme .history-row.present-row {
    border-left: 4px solid #1e8f50;
    background: #f5fbf7;
}

body.ums-theme .history-row.absent-row {
    border-left: 4px solid #cb4b3f;
    background: #fff8f7;
}

body.ums-theme .history-main strong {
    color: #29323c;
}

body.ums-theme .history-main small {
    color: #526171;
}

body.ums-theme .history-time {
    color: #1e5f9e;
    font-weight: 700;
}

body.ums-theme .history-status.present {
    background: #1e8f50;
    border-color: #18723f;
    color: #ffffff;
}

body.ums-theme .history-status.absent {
    background: #cb4b3f;
    border-color: #aa3d34;
    color: #ffffff;
}

body.ums-theme .attendance-detail-row {
    background: #ffffff;
    border-color: #d2dbe4;
}

body.ums-theme .attendance-detail-row.present {
    border-left-color: #1e8f50;
    background: #f5fbf7;
}

body.ums-theme .attendance-detail-row.absent {
    border-left-color: #cb4b3f;
    background: #fff8f7;
}

body.ums-theme .attendance-detail-main strong {
    color: #29323c;
}

body.ums-theme .attendance-detail-main small {
    color: #526171;
}

body.ums-theme .attendance-detail-status.present {
    background: #1e8f50;
    border-color: #18723f;
    color: #ffffff;
}

body.ums-theme .attendance-detail-status.absent {
    background: #cb4b3f;
    border-color: #aa3d34;
    color: #ffffff;
}

body.ums-theme .tilt {
    transform: none !important;
    transition: none !important;
    will-change: auto;
}

body.ums-theme .calendar-class:hover,
body.ums-theme .calendar-class.selected {
    transform: none;
    border-color: #9fc1df;
    box-shadow: inset 0 0 0 1px rgba(54, 130, 203, 0.16);
}

body.ums-theme .calendar-class:focus-visible {
    outline: 2px solid #429ef2;
}

.nav-anchor {
    scroll-margin-top: 5.2rem;
}

body:not(.ums-theme) .nebula {
    opacity: 0.2;
    filter: blur(104px);
}

body:not(.ums-theme) .orb {
    opacity: 0.1;
    filter: blur(16px);
}

body:not(.ums-theme) .grid-field {
    opacity: 0.05;
}

body:not(.ums-theme) #student-courses-card.glass {
    background: linear-gradient(170deg, rgba(7, 28, 46, 0.96), rgba(9, 31, 49, 0.97));
    border-color: rgba(155, 207, 242, 0.42);
    box-shadow: 0 18px 42px rgba(4, 15, 25, 0.4);
}

body:not(.ums-theme) #student-courses-card .panel-head h3 {
    color: #f0f8ff;
    text-shadow: 0 1px 0 rgba(8, 22, 36, 0.45);
}

body:not(.ums-theme) #student-courses-card .panel-head small,
body:not(.ums-theme) #student-courses-card .helper-text {
    color: #c5d9ea;
}

body:not(.ums-theme) #student-ledger-card.glass {
    background: linear-gradient(168deg, rgba(8, 31, 49, 0.96), rgba(9, 33, 52, 0.97));
    border-color: rgba(157, 208, 242, 0.44);
    box-shadow: 0 20px 42px rgba(4, 15, 25, 0.4);
}

body:not(.ums-theme) #student-ledger-card .panel-head h3 {
    color: #f2f9ff;
    text-shadow: 0 1px 0 rgba(7, 20, 32, 0.45);
}

body:not(.ums-theme) #student-ledger-card .panel-head small,
body:not(.ums-theme) #student-ledger-card .helper-text {
    color: #c8deef;
}

body:not(.ums-theme) #student-ledger-card .aggregate-chip {
    background: linear-gradient(160deg, rgba(31, 74, 108, 0.86), rgba(36, 78, 113, 0.84));
    border-color: rgba(165, 213, 244, 0.5);
    box-shadow: inset 0 1px 0 rgba(210, 232, 248, 0.18);
}

body:not(.ums-theme) #student-ledger-card .aggregate-chip span {
    color: #cfe4f5;
}

body:not(.ums-theme) #student-ledger-card .aggregate-chip strong {
    color: #f4fbff;
    text-shadow: 0 1px 0 rgba(7, 20, 32, 0.42);
}

body:not(.ums-theme) #student-saarthi-card {
    border-color: rgba(109, 196, 248, 0.96);
    background:
        radial-gradient(circle at 8% 8%, rgba(62, 220, 255, 0.42), transparent 46%),
        radial-gradient(circle at 92% 10%, rgba(123, 132, 255, 0.35), transparent 44%),
        radial-gradient(circle at 82% 86%, rgba(255, 165, 93, 0.28), transparent 48%),
        linear-gradient(155deg, #fbfdff, #e4f3ff 58%, #dcedff);
    box-shadow: 0 24px 44px rgba(28, 78, 126, 0.2);
}

body:not(.ums-theme) #student-saarthi-card .saarthi-header-section,
body:not(.ums-theme) #student-saarthi-card .saarthi-conversation-section,
body:not(.ums-theme) #student-saarthi-card .saarthi-input-section {
    border-color: rgba(139, 200, 237, 0.96);
    background: linear-gradient(164deg, rgba(255, 255, 255, 0.96), rgba(226, 244, 255, 0.98));
}

body:not(.ums-theme) #student-saarthi-card .saarthi-chip,
body:not(.ums-theme) #student-saarthi-card .saarthi-history,
body:not(.ums-theme) #student-saarthi-card .saarthi-message,
body:not(.ums-theme) #student-saarthi-card .saarthi-typing {
    box-shadow: 0 14px 24px rgba(37, 94, 147, 0.2);
}

body:not(.ums-theme) #student-ledger-card .course-aggregate-item {
    background: rgba(30, 70, 103, 0.88);
    border-color: rgba(165, 212, 244, 0.46);
    box-shadow: 0 8px 16px rgba(6, 21, 35, 0.22);
}

body:not(.ums-theme) #student-ledger-card .course-aggregate-item.good {
    border-left: 4px solid rgba(112, 241, 187, 0.92);
    background: linear-gradient(160deg, rgba(19, 106, 76, 0.44), rgba(29, 84, 95, 0.62));
}

body:not(.ums-theme) #student-ledger-card .course-aggregate-item.mid {
    border-left: 4px solid rgba(255, 208, 132, 0.9);
    background: linear-gradient(160deg, rgba(122, 93, 45, 0.44), rgba(59, 74, 97, 0.66));
}

body:not(.ums-theme) #student-ledger-card .course-aggregate-item.low {
    border-left: 4px solid rgba(246, 150, 133, 0.9);
    background: linear-gradient(160deg, rgba(121, 55, 56, 0.5), rgba(58, 71, 95, 0.7));
}

body:not(.ums-theme) #student-ledger-card .course-aggregate-item h4 {
    color: #f1f9ff;
}

body:not(.ums-theme) #student-ledger-card .course-aggregate-item p {
    color: #d5e8f7;
}

body:not(.ums-theme) #student-ledger-card .course-card-hint {
    color: #e5f2ff;
}

body:not(.ums-theme) #student-ledger-card .course-percent-badge {
    background: rgba(76, 115, 148, 0.8);
    border-color: rgba(176, 218, 247, 0.58);
    color: #f1f9ff;
}

body:not(.ums-theme) #student-ledger-card .course-percent-badge.good {
    background: rgba(28, 140, 95, 0.84);
    border-color: rgba(122, 243, 192, 0.68);
}

body:not(.ums-theme) #student-ledger-card .recovery-plan-card,
body:not(.ums-theme) #faculty-recovery-card .recovery-plan-card,
body:not(.ums-theme) #student-ledger-card .recovery-action-row,
body:not(.ums-theme) #faculty-recovery-card .recovery-action-row,
body:not(.ums-theme) #student-ledger-card .recovery-metric,
body:not(.ums-theme) #faculty-recovery-card .recovery-metric {
    background: rgba(24, 62, 92, 0.82);
    border-color: rgba(165, 212, 244, 0.4);
    box-shadow: 0 8px 16px rgba(6, 21, 35, 0.18);
}

body:not(.ums-theme) #student-ledger-card .course-percent-badge.mid {
    background: rgba(189, 132, 42, 0.82);
    border-color: rgba(255, 212, 139, 0.72);
}

body:not(.ums-theme) #student-ledger-card .course-percent-badge.low {
    background: rgba(177, 70, 57, 0.84);
    border-color: rgba(248, 170, 155, 0.72);
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-aggregate-panel .aggregate-chip {
    background: linear-gradient(160deg, rgba(31, 74, 108, 0.86), rgba(36, 78, 113, 0.84));
    border-color: rgba(165, 213, 244, 0.5);
    box-shadow: inset 0 1px 0 rgba(210, 232, 248, 0.18);
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-aggregate-panel .aggregate-chip span {
    color: #cfe4f5;
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-aggregate-panel .aggregate-chip strong {
    color: #f4fbff;
    text-shadow: 0 1px 0 rgba(7, 20, 32, 0.42);
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-ledger-list .course-aggregate-item {
    background: rgba(30, 70, 103, 0.88);
    border-color: rgba(165, 212, 244, 0.46);
    box-shadow: 0 8px 16px rgba(6, 21, 35, 0.22);
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-ledger-list .course-aggregate-item.good {
    border-left: 4px solid rgba(112, 241, 187, 0.92);
    background: linear-gradient(160deg, rgba(19, 106, 76, 0.44), rgba(29, 84, 95, 0.62));
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-ledger-list .course-aggregate-item.mid {
    border-left: 4px solid rgba(255, 208, 132, 0.9);
    background: linear-gradient(160deg, rgba(122, 93, 45, 0.44), rgba(59, 74, 97, 0.66));
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-ledger-list .course-aggregate-item.low {
    border-left: 4px solid rgba(246, 150, 133, 0.9);
    background: linear-gradient(160deg, rgba(121, 55, 56, 0.5), rgba(58, 71, 95, 0.7));
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-ledger-list .course-aggregate-item h4 {
    color: #f1f9ff;
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-ledger-list .course-aggregate-item p {
    color: #d5e8f7;
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-ledger-list .course-card-hint {
    color: #e5f2ff;
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-ledger-list .course-percent-badge {
    background: rgba(76, 115, 148, 0.8);
    border-color: rgba(176, 218, 247, 0.58);
    color: #f1f9ff;
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-ledger-list .course-percent-badge.good {
    background: rgba(28, 140, 95, 0.84);
    border-color: rgba(122, 243, 192, 0.68);
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-ledger-list .course-percent-badge.mid {
    background: rgba(189, 132, 42, 0.82);
    border-color: rgba(255, 212, 139, 0.72);
}

body:not(.ums-theme) #remedial-student-panel .remedial-student-ledger-list .course-percent-badge.low {
    background: rgba(177, 70, 57, 0.84);
    border-color: rgba(248, 170, 155, 0.72);
}

body:not(.ums-theme) .subline {
    color: #d2e7f8;
}

body:not(.ums-theme) .live-datetime {
    color: #dbeeff;
}

body:not(.ums-theme) .panel-head h3 {
    color: #eef7ff;
}

body:not(.ums-theme) .panel-head small,
body:not(.ums-theme) .helper-text {
    color: #c1d7e9;
}

body:not(.ums-theme) .timetable-grid {
    background: rgba(8, 33, 52, 0.9);
    border-color: rgba(146, 198, 233, 0.44);
}

body:not(.ums-theme) .calendar-corner,
body:not(.ums-theme) .calendar-day-header {
    background: #245072;
    color: #f0f8ff;
    border-bottom-color: rgba(166, 212, 244, 0.48);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body:not(.ums-theme) .calendar-time-label {
    background: rgba(18, 48, 74, 0.82);
    color: #d5e9f8;
    border-right-color: rgba(165, 210, 240, 0.36);
    border-bottom-color: rgba(165, 210, 240, 0.3);
}

body:not(.ums-theme) .calendar-cell {
    background: rgba(16, 44, 68, 0.52);
    border-right-color: rgba(153, 200, 236, 0.3);
    border-bottom-color: rgba(153, 200, 236, 0.27);
}

body:not(.ums-theme) .calendar-class {
    background: rgba(27, 66, 97, 0.94);
    border-color: rgba(171, 218, 248, 0.56);
    box-shadow: 0 6px 14px rgba(5, 18, 30, 0.28);
}

body:not(.ums-theme) .calendar-class.slot-upcoming {
    background: rgba(33, 75, 108, 0.92);
}

body:not(.ums-theme) .calendar-class.slot-absent {
    background: rgba(94, 53, 61, 0.68);
    border-color: rgba(244, 159, 141, 0.5);
}

body:not(.ums-theme) .calendar-class.slot-present {
    background: rgba(20, 109, 79, 0.52);
    border-color: rgba(133, 241, 194, 0.62);
}

body:not(.ums-theme) .calendar-time {
    color: #f6fbff;
    text-shadow: 0 1px 0 rgba(7, 20, 32, 0.5);
}

body:not(.ums-theme) .calendar-course {
    color: #edf7ff;
    text-shadow: 0 1px 0 rgba(7, 20, 32, 0.42);
}

body:not(.ums-theme) .calendar-room {
    color: #d4e7f6;
}

body:not(.ums-theme) .slot-status {
    border-color: rgba(193, 226, 248, 0.52);
    color: #ecf7ff;
    background: rgba(53, 104, 145, 0.56);
}

body:not(.ums-theme) .slot-status.upcoming {
    background: rgba(85, 120, 151, 0.66);
    color: #eff8ff;
}

.section-flash {
    animation: section-flash-dark 0.7s var(--motion-ease);
}

@keyframes section-flash-dark {
    from {
        box-shadow: 0 0 0 2px rgba(110, 206, 255, 0.5), var(--shadow-xl);
    }
    to {
        box-shadow: var(--shadow-xl);
    }
}

@keyframes section-flash-light {
    from {
        box-shadow: 0 0 0 2px rgba(66, 150, 223, 0.45), 0 3px 14px rgba(24, 30, 36, 0.08);
    }
    to {
        box-shadow: 0 3px 14px rgba(24, 30, 36, 0.08);
    }
}

@keyframes micro-pop {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body.ums-theme .section-flash {
    animation-name: section-flash-light;
}

body.ums-theme .calendar-class.slot-open-window {
    animation: none;
    box-shadow: inset 0 0 0 1px rgba(44, 131, 208, 0.35);
}

@media (max-width: 1120px) {
    .dashboard,
    body.ums-theme .dashboard {
        width: calc(100% - var(--ums-sidebar-width) - 1.45rem);
        margin-right: 0.7rem;
        margin-left: calc(var(--ums-sidebar-width) + 0.7rem);
    }

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

    .viz-grid .viz-card:last-child {
        grid-column: 1 / -1;
    }

    #food-section .viz-grid .viz-card:last-child {
        grid-column: auto;
    }

    #executive-section .admin-viz-grid {
        grid-template-columns: 1fr 1fr;
    }

    #executive-section .admin-telemetry-layout {
        grid-template-columns: 1fr;
    }

    #executive-section .admin-telemetry-stats {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
    }
}

@media (max-width: 940px) {
    .ums-sidebar {
        position: fixed;
        inset: auto 0 max(0px, env(safe-area-inset-bottom)) 0;
        width: 100%;
        height: auto;
        border-right: none;
        border-top: 1px solid rgba(133, 181, 217, 0.45);
        background: linear-gradient(180deg, rgba(10, 29, 45, 0.98), rgba(11, 34, 52, 0.98));
        padding: 0.48rem 0.55rem calc(0.54rem + env(safe-area-inset-bottom));
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.42rem;
        z-index: 18;
    }

    .ums-logo {
        display: none;
    }

    .verlyn-sidebar-widget {
        display: none !important;
    }

    .ums-side-item {
        text-align: center;
        justify-content: center;
        align-content: center;
        font-size: 0.82rem;
        padding: 0.52rem 0.3rem;
        border-radius: 12px;
        gap: 0.28rem;
        display: grid;
    }

    .nav-glyph {
        width: 1.32rem;
        height: 1.32rem;
        font-size: 0.5rem;
        flex-basis: 1.32rem;
    }

    .dashboard,
    body.ums-theme .dashboard {
        width: min(1220px, calc(100% - 1rem));
        margin: 0.6rem auto calc(6.2rem + env(safe-area-inset-bottom));
        padding: 0;
    }

    .ums-top-nav {
        display: flex;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.4rem;
        padding-bottom: 0.1rem;
    }

    .ums-module-btn {
        white-space: nowrap;
        font-size: 0.82rem;
        padding: 0.34rem 0.58rem;
        gap: 0.34rem;
    }

    .module-glyph {
        width: 1.24rem;
        height: 1.24rem;
        flex-basis: 1.24rem;
        font-size: 0.49rem;
    }

    .topbar {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 0.75rem;
    }

    .topbar-control-row {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
    }

    .hero-summary {
        justify-content: flex-start;
    }

    .hero-kpi {
        width: 100%;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .auth-card,
    .camera-card {
        max-height: calc(100vh - 1.2rem);
        max-height: calc(100dvh - 1.2rem);
    }

    body.auth-open.auth-signup-mode .auth-card {
        overflow: hidden;
        max-height: none;
    }

    body.auth-open:not(.auth-signup-mode) .auth-card {
        overflow: hidden;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    body.auth-open.auth-signup-mode #auth-signup-fields {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: 0;
        padding: 0.46rem;
    }

    .auth-brand-hero {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .auth-brand-topline {
        top: 0.62rem;
        left: 0.62rem;
    }

    .auth-brand-chip {
        font-size: 0.56rem;
        padding: 0.22rem 0.44rem;
    }

    .auth-brand-overlay {
        padding: 0.64rem;
    }

    .auth-brand-story {
        padding: 0.58rem 0.62rem;
    }

    .auth-brand-title {
        font-size: 0.92rem;
    }

    .auth-brand-copy,
    .auth-brand-points li {
        font-size: 0.74rem;
    }

    .auth-brand-caption {
        font-size: 0.56rem;
        padding: 0.22rem 0.46rem;
    }

    .auth-highlights {
        gap: 0.32rem;
    }

    .auth-highlight {
        font-size: 0.68rem;
    }

    .auth-journey {
        grid-template-columns: 1fr;
    }

    .auth-journey-step {
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 0.46rem;
    }

    .chip-stack {
        justify-content: flex-start;
    }

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

    #executive-section .admin-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    #executive-section .admin-refresh-btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .faculty-controls {
        grid-template-columns: 1fr 1fr;
    }

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

    .verification-split {
        grid-template-columns: 1fr;
    }

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

    #executive-section .admin-metric-grid {
        grid-template-columns: 1fr 1fr;
    }

    #executive-section .admin-viz-grid {
        grid-template-columns: 1fr;
    }

    #executive-section .admin-insights-grid {
        grid-template-columns: 1fr;
    }

    #executive-section #admin-attendance-card .admin-attendance-wrap {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    #executive-section .admin-telemetry-layout {
        grid-template-columns: 1fr;
    }

    #executive-section .admin-telemetry-stats {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
    }

    .faculty-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    #executive-section .admin-cluster-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-actions {
        grid-template-columns: 1fr 1fr;
    }

    .weekly-calendar {
        min-width: 900px;
    }

    .student-aggregate-panel {
        grid-template-columns: 1fr;
    }

    .saarthi-chip-grid {
        grid-template-columns: 1fr;
    }

    .saarthi-welcome-card {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .submissions-table {
        min-width: 690px;
    }

    .chotu-widget {
        right: 0.75rem;
        bottom: calc(6.25rem + env(safe-area-inset-bottom));
    }

    .support-desk-widget {
        right: 0.75rem;
        bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .chotu-panel {
        width: min(360px, calc(100vw - 1.1rem));
        max-width: 100%;
    }

    .support-desk-panel {
        width: min(376px, calc(100vw - 1.1rem));
        max-width: 100%;
    }

    .food-order-controls {
        align-items: stretch;
    }

    .food-order-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .food-order-controls .food-order-field {
        flex: 1 1 280px;
        max-width: unset;
    }

    .food-order-actions .btn {
        flex: 1 1 220px;
    }
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-card {
        width: min(640px, 100%);
        max-height: none;
    }
}

@media (max-width: 700px) {
    .dashboard {
        width: min(1220px, calc(100% - 1rem));
    }

    .control-grid,
    .metric-grid,
    .viz-grid,
    .faculty-stats-grid {
        grid-template-columns: 1fr;
    }

    #executive-section .admin-toolbar,
    #executive-section .admin-viz-grid,
    #executive-section .admin-ops-grid,
    #executive-section .admin-insights-grid,
    #executive-section .admin-metric-grid {
        grid-template-columns: 1fr;
    }

    #executive-section .admin-telemetry-stats {
        grid-template-columns: 1fr;
    }

    .chotu-widget {
        right: 0.58rem;
        left: auto;
    }

    .support-desk-widget {
        right: 0.58rem;
        left: auto;
        bottom: calc(0.82rem + env(safe-area-inset-bottom));
    }

    .chotu-panel {
        width: min(340px, calc(100vw - 0.9rem));
    }

    .support-desk-panel {
        width: min(350px, calc(100vw - 0.9rem));
    }

    .donut-wrap {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-actions,
    .faculty-controls {
        grid-template-columns: 1fr;
    }

    .inline-controls {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .inline-controls > .field {
        min-width: 0;
    }

    .food-order-controls {
        display: grid;
        grid-template-columns: 1fr;
    }

    .support-desk-controls {
        grid-template-columns: 1fr;
    }

    .saarthi-actions {
        display: grid;
        grid-template-columns: 1fr auto auto;
        align-items: center;
    }

    .saarthi-actions .helper-text {
        grid-column: 1 / -1;
    }

    .saarthi-send-btn {
        justify-self: end;
    }

    .food-order-actions {
        width: 100%;
    }

    .food-order-controls .food-order-field {
        min-width: 0;
        max-width: 100%;
        flex: 1 1 100%;
    }

    .food-order-actions .btn {
        width: 100%;
        flex: 1 1 100%;
    }

    .food-demand-live-compact {
        flex-direction: column;
        align-items: flex-start;
    }

    .food-demand-hot-btn {
        width: 100%;
    }

    .food-demand-pie-layout {
        grid-template-columns: 1fr;
        gap: 0.62rem;
    }

    .food-demand-pie-wrap {
        width: min(100%, 240px);
    }

    .food-demand-pie-legend {
        max-height: 212px;
    }

    .food-demand-legend-item {
        grid-template-columns: auto 1fr auto;
    }

    .auth-actions .btn {
        flex: 1 1 100%;
    }

    .topbar-actions {
        justify-content: flex-end;
        gap: 0.45rem;
    }

    .auth-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .auth-actions .btn {
        width: 100%;
    }

    .auth-section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-modal-card .auth-actions {
        gap: 0.42rem;
    }

    .enrollment-split-grid {
        grid-template-columns: 1fr;
    }

    .theme-toggle-btn {
        font-size: 0.72rem;
        padding: 0.42rem 0.64rem;
    }

    .account-trigger {
        width: 40px;
        height: 40px;
    }

    .weekly-calendar {
        min-width: 760px;
        --calendar-time-col: 66px;
        --calendar-day-col-min: 98px;
        --calendar-row-height: 82px;
    }

    .calendar-time {
        font-size: 0.72rem;
    }

    .calendar-course {
        font-size: 0.67rem;
    }

    .calendar-room {
        font-size: 0.62rem;
    }

    .slot-status,
    .attendance-pill {
        font-size: 0.6rem;
    }

    .ums-side-item {
        font-size: 0.82rem;
        padding: 0.52rem 0.2rem;
    }

    .history-row {
        grid-template-columns: auto 1fr;
    }

    .history-time {
        grid-column: 1 / -1;
    }

    .attendance-detail-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .submissions-table {
        min-width: 620px;
    }
}

@media (max-width: 480px) {
    .auth-overlay,
    .camera-modal {
        padding: 0.6rem;
    }

    .auth-card,
    .camera-card {
        padding: 0.75rem;
        border-radius: 16px;
    }

    .auth-flow-section {
        padding: 0.6rem;
    }

    .auth-modal-card {
        padding: 0.78rem;
        border-radius: 14px;
    }

    .topbar {
        padding: 0.72rem;
    }

    .live-datetime {
        font-size: 0.68rem;
        line-height: 1.3;
        padding: 0.22rem 0.48rem;
        gap: 0.3rem;
        max-width: 100%;
        white-space: normal;
    }

    .live-datetime::before {
        width: 7px;
        height: 7px;
        flex-basis: 7px;
    }

    .dashboard {
        width: calc(100% - 0.65rem);
        margin-bottom: calc(6.35rem + env(safe-area-inset-bottom));
    }

    .weekly-calendar {
        min-width: 700px;
    }

    .ums-side-item {
        font-size: 0.76rem;
    }

    .account-dropdown {
        width: min(96vw, 320px);
        right: -0.1rem;
    }

    .food-demand-pie-wrap {
        width: min(100%, 220px);
    }

    .food-demand-legend-item {
        grid-template-columns: auto 1fr;
        row-gap: 0.14rem;
    }

    .food-demand-legend-meta {
        grid-column: 1 / -1;
        justify-self: end;
    }

    #food-demand-live-compact-summary {
        font-size: 0.72rem;
    }
}

/* Canonical auth design system for body.ums-theme auth entry. */
body.ums-theme .auth-overlay {
    --auth-outer-gap: clamp(12px, 1.6vw, 20px);
    display: grid;
    place-items: center;
    overflow: auto;
    padding: var(--auth-outer-gap);
    background:
        radial-gradient(1200px 780px at 8% 10%, rgba(37, 99, 235, 0.52) 0%, transparent 54%),
        radial-gradient(760px 540px at 92% 88%, rgba(14, 165, 233, 0.16) 0%, transparent 58%),
        linear-gradient(145deg, #050b17 0%, #091224 55%, #050a14 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.ums-theme .auth-overlay::before {
    opacity: 0.1;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(circle at center, black 46%, transparent 90%);
    -webkit-mask-image: radial-gradient(circle at center, black 46%, transparent 90%);
}

body.ums-theme .auth-card,
body.ums-theme .auth-card.glass {
    width: min(1120px, calc(100vw - (var(--auth-outer-gap) * 2)));
    max-height: calc(100vh - (var(--auth-outer-gap) * 2));
    max-height: calc(100dvh - (var(--auth-outer-gap) * 2));
    margin: 0 auto;
    overflow: hidden;
    padding: clamp(14px, 1.3vw, 18px);
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.36);
    background:
        linear-gradient(180deg, rgba(7, 15, 29, 0.92), rgba(3, 10, 21, 0.94)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
    box-shadow:
        0 32px 90px rgba(2, 6, 23, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.ums-theme .auth-shell {
    display: grid;
    grid-template-columns: minmax(280px, 0.84fr) minmax(420px, 1.16fr);
    gap: clamp(14px, 1.4vw, 20px);
    align-items: stretch;
    min-height: 0;
    height: min(740px, calc(100dvh - (var(--auth-outer-gap) * 2) - clamp(28px, 2.6vw, 36px)));
}

body.ums-theme .auth-brand-panel {
    position: relative;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: clamp(14px, 1.3vw, 18px);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    overflow: hidden;
    background:
        radial-gradient(640px 420px at 50% 18%, rgba(59, 130, 246, 0.18) 0%, transparent 62%),
        linear-gradient(180deg, rgba(7, 21, 43, 0.96), rgba(4, 14, 30, 0.94));
}

body.ums-theme .auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.3;
    pointer-events: none;
}

body.ums-theme .auth-brand-panel::after {
    content: "";
    position: absolute;
    inset: auto 12% 8% 12%;
    height: 96px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.22), transparent 72%);
    filter: blur(20px);
    pointer-events: none;
}

body.ums-theme .auth-brand-hero {
    position: relative;
    z-index: 1;
    width: auto;
    max-width: 100%;
    height: min(100%, 100%);
    max-height: 100%;
    aspect-ratio: 858 / 1276;
    margin: 0;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(191, 219, 254, 0.22);
    background: linear-gradient(180deg, rgba(11, 31, 60, 0.98), rgba(7, 24, 46, 0.96));
    box-shadow:
        0 22px 42px rgba(2, 6, 23, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

body.ums-theme .auth-brand-image {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center center;
    border-radius: 16px;
}

body.ums-theme .auth-brand-hero::before,
body.ums-theme .auth-brand-hero::after,
body.ums-theme .auth-brand-topline,
body.ums-theme .auth-brand-overlay,
body.ums-theme .auth-brand-chip,
body.ums-theme .auth-brand-story,
body.ums-theme .auth-brand-eyebrow,
body.ums-theme .auth-brand-title,
body.ums-theme .auth-brand-copy {
    display: none;
}

body.ums-theme .auth-form-panel {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: clamp(14px, 1.3vw, 18px);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background:
        linear-gradient(180deg, rgba(7, 16, 31, 0.96), rgba(3, 10, 21, 0.94)),
        linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(14, 165, 233, 0.02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: auto;
    scrollbar-width: thin;
}

body.ums-theme .auth-form-panel .kicker {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #93a9c8;
    text-transform: uppercase;
}

body.ums-theme .auth-card h2,
body.ums-theme .auth-overlay .auth-card h2 {
    margin: 0;
    font-size: clamp(1.72rem, 2.2vw, 2.2rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
    font-weight: 780;
    color: #f8fafc;
    background: none;
    -webkit-text-fill-color: initial;
}

body.ums-theme .auth-sub,
body.ums-theme .auth-overlay .auth-sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    color: #a7bdd8;
    max-width: 52ch;
}

body.ums-theme .auth-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.ums-theme .auth-highlight {
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(125, 173, 214, 0.36);
    background: rgba(13, 31, 55, 0.84);
    color: #d8e7f9;
    font-size: 11px;
    font-weight: 700;
}

body.ums-theme .auth-journey {
    display: none;
}

body.ums-theme .auth-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(8, 20, 39, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.ums-theme .auth-mode-btn {
    min-height: 42px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: #9ab0cb;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

body.ums-theme .auth-mode-btn:hover {
    transform: translateY(-1px);
    color: #eff6ff;
}

body.ums-theme .auth-mode-btn.active,
body.ums-theme .auth-overlay .auth-mode-btn.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: rgba(96, 165, 250, 0.6);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.34);
}

body.ums-theme .auth-progress {
    margin: 0;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(8, 18, 36, 0.88);
    color: #a9bdd8;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: none;
    gap: 8px;
}

body.ums-theme .auth-progress-dot {
    width: 10px;
    height: 10px;
    background: rgba(148, 163, 184, 0.36);
    box-shadow: none;
}

body.ums-theme .auth-progress-dot.active {
    background: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

body.ums-theme .auth-progress-label {
    color: #a9bdd8;
    font-weight: 600;
}

body.ums-theme .auth-progress-label:first-of-type {
    color: #f8fafc;
}

body.ums-theme .auth-progress-arrow {
    color: #64748b;
    opacity: 1;
}

body.ums-theme .auth-flow-section,
body.ums-theme .auth-login-section,
body.ums-theme .auth-otp-section,
body.ums-theme .auth-signup-section {
    margin: 0;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background:
        linear-gradient(180deg, rgba(9, 22, 43, 0.86), rgba(4, 13, 28, 0.88)),
        linear-gradient(135deg, rgba(37, 99, 235, 0.03), rgba(14, 165, 233, 0.02));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 16px 30px rgba(2, 6, 23, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

body.ums-theme .auth-flow-section:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 20px 34px rgba(2, 6, 23, 0.24);
}

body.ums-theme .auth-flow-section:focus-within {
    border-color: rgba(96, 165, 250, 0.42);
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12),
        0 20px 34px rgba(2, 6, 23, 0.28);
}

body.ums-theme .auth-login-section {
    border-color: rgba(59, 130, 246, 0.34);
}

body.ums-theme .auth-otp-section {
    border-color: rgba(45, 212, 191, 0.28);
}

body.ums-theme .auth-signup-section {
    border-color: rgba(148, 163, 184, 0.24);
}

body.ums-theme .auth-login-controls {
    display: grid;
    gap: 8px;
}

body.ums-theme .auth-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

body.ums-theme .auth-section-head h3,
body.ums-theme .auth-overlay .auth-section-head h3 {
    margin: 0;
    font-size: clamp(1.28rem, 1.6vw, 1.55rem);
    font-weight: 760;
    line-height: 1.04;
    letter-spacing: -0.028em;
    color: #f8fafc;
}

body.ums-theme .auth-section-head p,
body.ums-theme .auth-overlay .auth-section-head p {
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: #98abc4;
}

body.ums-theme .auth-actions {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.ums-theme .auth-overlay .field span {
    display: inline-block;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: #b5c6db;
}

body.ums-theme .auth-overlay input,
body.ums-theme .auth-overlay select {
    background: rgba(12, 28, 49, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    padding: 10px 12px;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 550;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

body.ums-theme .auth-overlay input:hover,
body.ums-theme .auth-overlay select:hover {
    border-color: rgba(125, 173, 214, 0.42);
}

body.ums-theme .auth-overlay input::placeholder {
    color: #7f93ad;
}

body.ums-theme .auth-overlay input:focus,
body.ums-theme .auth-overlay select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
    outline: none;
    background: rgba(14, 32, 58, 0.98);
}

body.ums-theme .auth-overlay .btn {
    min-height: 40px;
    border-radius: 10px;
    padding: 9px 12px;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

body.ums-theme .auth-overlay .btn:hover,
body.ums-theme .auth-overlay .btn:active {
    transform: translateY(-1px);
}

body.ums-theme .auth-overlay .btn-primary {
    border: 1px solid rgba(96, 165, 250, 0.7);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

body.ums-theme .auth-overlay .btn-primary:hover,
body.ums-theme .auth-overlay .btn-primary:active {
    background: linear-gradient(135deg, #2458d5, #1c45bd);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
}

body.ums-theme .auth-overlay .btn-secondary,
body.ums-theme .auth-overlay .btn-ghost {
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(248, 250, 252, 0.98);
    color: #0f172a;
}

body.ums-theme .auth-overlay .btn-secondary:hover,
body.ums-theme .auth-overlay .btn-secondary:active,
body.ums-theme .auth-overlay .btn-ghost:hover,
body.ums-theme .auth-overlay .btn-ghost:active {
    border-color: rgba(96, 165, 250, 0.36);
    background: #ffffff;
}

body.ums-theme .forgot-password-toggle {
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 12px;
}

body.ums-theme .password-strength,
body.ums-theme .auth-overlay .password-strength,
body.ums-theme .checkbox-wrap span,
body.ums-theme .auth-message,
body.ums-theme .auth-overlay .auth-message,
body.ums-theme .auth-hint,
body.ums-theme .auth-overlay .auth-hint {
    margin: 0;
    font-size: 12px;
    color: #8fa4bf;
}

body.ums-theme .auth-form-panel > .auth-mode-switch,
body.ums-theme .auth-form-panel > .auth-progress,
body.ums-theme .auth-form-panel > .auth-flow-section,
body.ums-theme .auth-form-panel > .auth-login-controls,
body.ums-theme .auth-form-panel > #auth-signup-fields,
body.ums-theme .auth-form-panel > #auth-signup-actions {
    margin: 0;
}

body.ums-theme.auth-open.auth-signup-mode .auth-overlay {
    place-items: center;
}

body.ums-theme.auth-open.auth-signup-mode .auth-card {
    max-height: calc(100vh - (var(--auth-outer-gap) * 2));
    max-height: calc(100dvh - (var(--auth-outer-gap) * 2));
    overflow: hidden;
}

body.ums-theme.auth-open.auth-signup-mode .auth-form-panel {
    gap: 10px;
}

body.ums-theme.auth-open.auth-signup-mode .auth-highlights,
body.ums-theme.auth-open.auth-signup-mode .auth-progress {
    display: none;
}

body.ums-theme.auth-open.auth-signup-mode #auth-signup-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.ums-theme.auth-open.auth-signup-mode #auth-signup-fields .auth-section-head,
body.ums-theme.auth-open.auth-signup-mode #auth-signup-fields .password-strength,
body.ums-theme.auth-open.auth-signup-mode #auth-signup-fields #auth-role-wrap,
body.ums-theme.auth-open.auth-signup-mode #auth-signup-fields #auth-signup-registration-wrap,
body.ums-theme.auth-open.auth-signup-mode #auth-signup-fields #auth-signup-faculty-id-wrap,
body.ums-theme.auth-open.auth-signup-mode #auth-signup-fields #auth-parent-email-wrap {
    grid-column: 1 / -1;
}

@media (max-width: 1100px) {
    body.ums-theme .auth-card,
    body.ums-theme .auth-card.glass {
        width: min(980px, 100%);
    }

    body.ums-theme .auth-shell {
        grid-template-columns: minmax(250px, 0.76fr) minmax(400px, 1.24fr);
    }
}

@media (max-width: 900px) {
    body.ums-theme .auth-overlay {
        overflow-y: auto;
        padding: 12px;
    }

    body.ums-theme .auth-card,
    body.ums-theme .auth-card.glass {
        width: min(760px, 100%);
        max-height: none;
        overflow: visible;
        padding: 12px;
        border-radius: 20px;
    }

    body.ums-theme .auth-shell {
        grid-template-columns: 1fr;
        gap: 14px;
        height: auto;
    }

    body.ums-theme .auth-brand-panel {
        display: none;
    }

    body.ums-theme .auth-form-panel {
        padding: 12px;
        gap: 10px;
    }

    body.ums-theme .auth-card h2,
    body.ums-theme .auth-overlay .auth-card h2 {
        font-size: clamp(1.4rem, 5vw, 1.7rem);
    }

    body.ums-theme .auth-section-head h3,
    body.ums-theme .auth-overlay .auth-section-head h3 {
        font-size: clamp(1.15rem, 4.4vw, 1.35rem);
    }
}

@media (max-height: 860px) {
    body.ums-theme .auth-highlights {
        display: none;
    }

    body.ums-theme .auth-form-panel {
        gap: 8px;
    }

    body.ums-theme .auth-flow-section,
    body.ums-theme .auth-login-section,
    body.ums-theme .auth-otp-section,
    body.ums-theme .auth-signup-section {
        padding: 10px;
    }
}

@media (max-width: 640px) {
    body.ums-theme .auth-progress {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    body.ums-theme .auth-progress-arrow {
        display: none;
    }

    body.ums-theme .auth-mode-btn {
        min-height: 38px;
        padding: 8px 9px;
    }

    body.ums-theme.auth-open.auth-signup-mode #auth-signup-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    .dashboard,
    body.ums-theme .dashboard {
        width: calc(100% - 0.9rem);
        margin: 0.52rem auto calc(6.8rem + env(safe-area-inset-bottom));
    }

    .topbar,
    body.ums-theme .topbar {
        top: max(0.4rem, env(safe-area-inset-top));
        padding: 0.72rem;
        gap: 0.62rem;
    }

    .hero-summary {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .hero-primary-cta {
        width: 100%;
    }

    .ums-top-nav {
        scroll-snap-type: x proximity;
        padding-inline: 0.08rem;
    }

    .ums-module-btn {
        scroll-snap-align: start;
    }

    .topbar-actions {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .chip-stack {
        width: 100%;
    }

    .auth-overlay,
    body.ums-theme .auth-overlay {
        padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
    }

    .auth-card,
    body.ums-theme .auth-card {
        width: 100%;
        max-height: none;
        border-radius: 18px;
    }

    .auth-form-panel,
    body.ums-theme .auth-form-panel {
        overflow: visible;
    }
}

@media (max-width: 700px) {
    .kicker {
        font-size: 0.72rem;
    }

    h1,
    body.ums-theme h1 {
        font-size: clamp(1.2rem, 6vw, 1.6rem);
    }

    .subline,
    body.ums-theme .subline {
        font-size: 0.84rem;
        line-height: 1.4;
    }

    .live-datetime {
        font-size: 0.72rem;
    }

    .topbar-control-row {
        gap: 0.5rem;
    }

    .ums-top-nav {
        gap: 0.32rem;
    }

    .ums-module-btn {
        min-height: 36px;
        padding: 0.34rem 0.5rem;
        font-size: 0.76rem;
    }

    .module-glyph {
        width: 1.16rem;
        height: 1.16rem;
        flex-basis: 1.16rem;
        font-size: 0.46rem;
    }

    .topbar-actions {
        gap: 0.38rem;
    }

    .theme-toggle-btn {
        font-size: 0.68rem;
        padding: 0.36rem 0.56rem;
    }

    .account-trigger {
        width: 36px;
        height: 36px;
    }

    .auth-card,
    .camera-card,
    body.ums-theme .auth-card {
        padding: 0.62rem;
    }

    .auth-form-panel,
    body.ums-theme .auth-form-panel {
        padding: 0.62rem;
        gap: 0.56rem;
    }

    .auth-card h2,
    body.ums-theme .auth-card h2 {
        font-size: clamp(1.2rem, 7vw, 1.5rem);
    }

    .auth-sub,
    body.ums-theme .auth-sub {
        font-size: 0.8rem;
    }

    .auth-overlay input,
    .auth-overlay select,
    body.ums-theme .auth-overlay input,
    body.ums-theme .auth-overlay select {
        font-size: 16px;
    }

    .support-desk-panel,
    .chotu-panel {
        max-height: min(72vh, 560px);
    }
}

@media (max-width: 520px) {
    .ums-sidebar,
    body.ums-theme .ums-sidebar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.3rem;
        padding: 0.34rem 0.4rem calc(0.5rem + env(safe-area-inset-bottom));
    }

    .ums-side-item {
        min-height: 44px;
        padding: 0.36rem 0.22rem;
        border-radius: 10px;
    }

    .ums-side-item .nav-label {
        display: block;
        font-size: 0.64rem;
        line-height: 1.05;
        text-align: center;
    }

    .nav-glyph {
        width: 1.28rem;
        height: 1.28rem;
        flex-basis: 1.28rem;
    }

    .dashboard,
    body.ums-theme .dashboard {
        margin-bottom: calc(5.55rem + env(safe-area-inset-bottom));
    }

    .account-dropdown {
        width: min(98vw, 320px);
        right: -0.2rem;
    }

    .auth-progress-label {
        font-size: 0.66rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .parallax-layer,
    .tilt,
    .bar,
    .hbar-fill,
    .orb,
    .slot-status.mark,
    .section-flash,
    .log-line,
    .account-dropdown,
    .micro-ripple,
    .food-order-card.tone-verified .food-order-badge,
    .food-order-card.tone-failed .food-order-badge,
    .food-order-card.tone-verified::before,
    .food-order-card.tone-failed::before,
    #food-orders-panel.is-sync-pulse,
    .food-order-card-details,
    .saarthi-affirmation-track,
    .saarthi-affirmation-pill,
    .saarthi-message,
    .saarthi-typing-dots i,
    .saarthi-send-btn.is-sending,
    .saarthi-new-chat-btn.is-loading,
    #student-saarthi-card .saarthi-welcome-icon,
    .saarthi-welcome-orb,
    .saarthi-welcome-ring,
    .saarthi-welcome-spark,
    #student-saarthi-card::before,
    #student-saarthi-card::after,
    #student-saarthi-card .saarthi-affirmation-band::after,
    #student-saarthi-card .saarthi-welcome-icon::before,
    #student-saarthi-card .saarthi-welcome-icon::after,
    #student-saarthi-card {
        transition: none;
        animation: none;
    }
}

/* Final mobile polish overrides (kept at file end to beat older breakpoint collisions). */
@media (max-width: 900px) {
    .dashboard,
    body.ums-theme .dashboard {
        width: calc(100% - 0.75rem);
        margin: 0.38rem auto calc(6.7rem + env(safe-area-inset-bottom));
        gap: 0.65rem;
    }

    #main-dashboard-header.topbar,
    .topbar,
    body.ums-theme #main-dashboard-header.topbar,
    body.ums-theme .topbar {
        position: relative !important;
        top: auto !important;
        z-index: 3;
        grid-template-columns: 1fr;
        align-items: stretch;
        border-radius: 16px;
        padding: 0.68rem;
        gap: 0.56rem;
    }

    .ums-top-left {
        display: grid;
        gap: 0.34rem;
    }

    .kicker {
        font-size: 0.64rem;
        letter-spacing: 0.11em;
    }

    h1,
    body.ums-theme h1 {
        margin: 0;
        font-size: clamp(1.34rem, 6.8vw, 1.82rem);
        line-height: 1.08;
        letter-spacing: -0.012em;
    }

    .subline,
    body.ums-theme .subline {
        margin: 0;
        max-width: none;
        font-size: 0.9rem;
        line-height: 1.34;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-summary {
        margin-top: 0.28rem;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.42rem;
    }

    .hero-kpi {
        min-height: 0;
        padding: 0.44rem 0.58rem;
        border-radius: 10px;
    }

    .hero-kpi span {
        font-size: 0.6rem;
        letter-spacing: 0.09em;
    }

    .hero-kpi strong {
        font-size: 0.98rem;
    }

    .hero-primary-cta {
        width: 100%;
        min-height: 42px;
        padding-inline: 0.62rem;
        justify-content: center;
        font-size: 0.92rem;
    }

    .live-datetime {
        margin-top: 0.22rem;
        width: 100%;
        border-radius: 14px;
        white-space: normal;
        line-height: 1.3;
        font-size: 0.74rem;
        padding: 0.26rem 0.52rem;
    }

    .topbar-control-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.38rem;
    }

    .topbar-actions {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.44rem;
    }

    .theme-toggle-btn {
        min-height: 34px;
        padding: 0.34rem 0.58rem;
        font-size: 0.68rem;
    }

    .account-trigger {
        width: 34px;
        height: 34px;
    }

    .support-desk-widget,
    .chotu-widget {
        display: none !important;
    }
}

@media (max-width: 700px) {
    .dashboard,
    body.ums-theme .dashboard {
        margin-bottom: calc(6.15rem + env(safe-area-inset-bottom));
        gap: 0.6rem;
    }

    #main-dashboard-header .ums-top-nav,
    .ums-top-nav,
    body.ums-theme .ums-top-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.34rem;
        overflow: visible;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .ums-module-btn,
    body.ums-theme .ums-module-btn {
        width: 100%;
        min-height: 38px;
        padding: 0.3rem 0.34rem;
        gap: 0.3rem;
        justify-content: center;
        border-radius: 999px;
        font-size: 0.73rem;
        box-shadow: none;
    }

    .module-glyph,
    body.ums-theme .module-glyph {
        width: 1.02rem;
        height: 1.02rem;
        flex-basis: 1.02rem;
        font-size: 0.42rem;
    }

    .module-label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.71rem;
    }

    .ops-card,
    .viz-card,
    .metric,
    .log-card {
        border-radius: 14px;
    }

    .panel-head {
        gap: 0.36rem;
    }

    .panel-head h3 {
        font-size: 1rem;
    }

    .panel-head small {
        font-size: 0.77rem;
        line-height: 1.3;
    }

    .inline-controls,
    .faculty-admin-grid,
    .ops-grid,
    .metric-grid,
    .viz-grid,
    .control-grid,
    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .ums-sidebar,
    body.ums-theme .ums-sidebar {
        gap: 0.28rem;
        padding: 0.3rem 0.34rem calc(0.46rem + env(safe-area-inset-bottom));
    }

    .ums-side-item {
        min-height: 44px;
        border-radius: 11px;
        padding: 0.3rem 0.18rem;
    }

    .ums-side-item .nav-label {
        font-size: 0.63rem;
    }

    .nav-glyph {
        width: 1.16rem;
        height: 1.16rem;
        flex-basis: 1.16rem;
    }
}

@media (max-width: 520px) {
    .dashboard,
    body.ums-theme .dashboard {
        width: calc(100% - 0.52rem);
        margin-bottom: calc(5.95rem + env(safe-area-inset-bottom));
    }

    #main-dashboard-header.topbar,
    .topbar,
    body.ums-theme #main-dashboard-header.topbar,
    body.ums-theme .topbar {
        border-radius: 14px;
        padding: 0.58rem;
        gap: 0.48rem;
    }

    h1,
    body.ums-theme h1 {
        font-size: clamp(1.24rem, 7.2vw, 1.58rem);
    }

    .subline,
    body.ums-theme .subline {
        font-size: 0.83rem;
        -webkit-line-clamp: 2;
    }

    .hero-primary-cta {
        min-height: 40px;
        font-size: 0.86rem;
    }

    .live-datetime {
        font-size: 0.7rem;
        padding: 0.24rem 0.46rem;
    }

    .ums-module-btn,
    body.ums-theme .ums-module-btn {
        min-height: 36px;
        padding: 0.26rem 0.3rem;
    }

    .module-label {
        font-size: 0.68rem;
    }

    .module-glyph,
    body.ums-theme .module-glyph {
        width: 0.95rem;
        height: 0.95rem;
        flex-basis: 0.95rem;
        font-size: 0.4rem;
    }

    .account-dropdown {
        width: min(96vw, 318px);
    }
}
