:root {
    --font-body: "Manrope", "Aptos", "Segoe UI", sans-serif;
    --bg: #f3f6fb;
    --bg-deep: #eaf0f8;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --surface-soft: #f7f9fc;
    --surface-muted: #eef3f9;
    --sidebar: rgba(255, 255, 255, .94);
    --text: #101828;
    --text-strong: #0b1220;
    --muted: #667085;
    --muted-light: #98a2b3;
    --border: #e2e8f0;
    --border-strong: #d5dde8;
    --primary: #2563eb;
    --primary-strong: #1d4ed8;
    --primary-bright: #4f8cff;
    --primary-soft: #eaf2ff;
    --green: #16a34a;
    --green-soft: #eaf8ef;
    --purple: #7c3aed;
    --purple-soft: #f2ecff;
    --orange: #e98a07;
    --orange-soft: #fff4dd;
    --danger: #dc2626;
    --danger-soft: #fff0f1;
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, .06);
    --shadow-md: 0 18px 46px rgba(15, 23, 42, .09);
    --shadow-lg: 0 30px 80px rgba(15, 23, 42, .14);
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 24px;
    --sidebar-width: 264px;
}

html[data-theme="dark"] {
    --bg: #07111f;
    --bg-deep: #040b14;
    --surface: #0c1828;
    --surface-raised: #101f32;
    --surface-soft: #101d2e;
    --surface-muted: #14243a;
    --sidebar: rgba(7, 17, 31, .96);
    --text: #f2f5f9;
    --text-strong: #ffffff;
    --muted: #9aa9bd;
    --muted-light: #728197;
    --border: #213149;
    --border-strong: #2c3e58;
    --primary: #4f8cff;
    --primary-strong: #79a8ff;
    --primary-bright: #6fa2ff;
    --primary-soft: #102b50;
    --green: #4ade80;
    --green-soft: #103522;
    --purple: #a78bfa;
    --purple-soft: #2a1c4b;
    --orange: #fbbf24;
    --orange-soft: #392a0d;
    --danger: #fb7185;
    --danger-soft: #3b171f;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .18);
    --shadow-sm: 0 12px 30px rgba(0, 0, 0, .2);
    --shadow-md: 0 24px 60px rgba(0, 0, 0, .3);
    --shadow-lg: 0 36px 100px rgba(0, 0, 0, .42);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 86% 2%, color-mix(in srgb, var(--primary) 7%, transparent), transparent 25%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

svg {
    display: block;
}

.ui-icon {
    width: 18px;
    height: 18px;
}

.eyebrow,
.topbar-kicker {
    margin: 0 0 7px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.brand-mark {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 17px;
    display: grid;
    place-items: center;
    color: #fff;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .28), transparent 31%),
        linear-gradient(145deg, #1764ee, #4f8cff);
    box-shadow: 0 15px 32px rgba(37, 99, 235, .28);
}

.brand-icon {
    width: 29px;
    height: 29px;
    stroke-width: 1.75;
}

.brand-mark-small {
    width: 42px;
    height: 42px;
    border-radius: 13px;
}

.brand-mark-small .brand-icon {
    width: 23px;
    height: 23px;
}

/* Theme toggle */
.theme-toggle {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-raised);
    color: var(--text);
    box-shadow: var(--shadow-xs);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.theme-toggle:hover {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.theme-toggle-icon {
    width: 17px;
    height: 17px;
    color: var(--primary);
}

.theme-toggle-icon .ui-icon {
    width: 17px;
    height: 17px;
}

.theme-moon,
html[data-theme="dark"] .theme-sun {
    display: none;
}

html[data-theme="dark"] .theme-moon {
    display: inline-flex;
}

/* Authentication */
.auth-page {
    overflow-x: hidden;
    background: var(--bg-deep);
}

.auth-theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 20;
    border-color: rgba(255, 255, 255, .14);
    color: #edf4ff;
    background: rgba(8, 20, 36, .76);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
    backdrop-filter: blur(16px);
}

html[data-theme="light"] .auth-theme-toggle {
    border-color: var(--border);
    color: var(--text);
    background: rgba(255, 255, 255, .82);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
}

.auth-brand-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(44px, 5.3vw, 86px);
    display: flex;
    align-items: center;
    color: #fff;
    background:
        radial-gradient(circle at 13% 16%, rgba(78, 140, 255, .35), transparent 29%),
        radial-gradient(circle at 88% 78%, rgba(124, 58, 237, .22), transparent 32%),
        linear-gradient(150deg, #061225 0%, #0a2348 56%, #0d2f64 100%);
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
}

.auth-brand-panel::before {
    width: 500px;
    height: 500px;
    left: -240px;
    bottom: -250px;
}

.auth-brand-panel::after {
    width: 380px;
    height: 380px;
    right: -190px;
    top: -160px;
}

.auth-brand-inner {
    width: min(760px, 100%);
    margin: auto;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
}

.auth-brand strong,
.auth-brand small {
    display: block;
}

.auth-brand strong {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.auth-brand small {
    margin-top: 2px;
    color: #aebfda;
    font-size: 10px;
    font-weight: 600;
}

.auth-copy-block {
    margin-top: clamp(54px, 7vh, 92px);
}

.auth-brand-panel .eyebrow {
    color: #8fb7ff;
}

.auth-brand-panel h1 {
    max-width: 720px;
    margin: 0;
    color: #fff;
    font-size: clamp(39px, 4.5vw, 66px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.055em;
}

.auth-brand-copy {
    max-width: 680px;
    margin: 22px 0 0;
    color: #c7d6eb;
    font-size: 15px;
    line-height: 1.75;
}

.auth-feature-grid {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.auth-feature-grid article {
    min-height: 104px;
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 16px;
    background: rgba(255, 255, 255, .055);
    box-shadow: inset 0 1px rgba(255, 255, 255, .04);
    backdrop-filter: blur(14px);
    display: flex;
    gap: 12px;
}

.auth-feature-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 10px;
    color: #91b8ff;
    background: rgba(79, 140, 255, .12);
    display: grid;
    place-items: center;
}

.auth-feature-icon .ui-icon {
    width: 17px;
    height: 17px;
}

.auth-feature-grid strong,
.auth-feature-grid span {
    display: block;
}

.auth-feature-grid strong {
    font-size: 11px;
    font-weight: 750;
}

.auth-feature-grid article div > span {
    margin-top: 6px;
    color: #aebed5;
    font-size: 10px;
    line-height: 1.55;
}

.auth-roster-preview {
    margin-top: 26px;
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    background: rgba(4, 14, 29, .34);
    box-shadow: inset 0 1px rgba(255, 255, 255, .035);
    backdrop-filter: blur(18px);
}

.preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #c8d6e9;
    font-size: 10px;
}

.preview-toolbar span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.preview-toolbar i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 5px rgba(74, 222, 128, .1);
}

.preview-toolbar strong {
    color: #8fb7ff;
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.preview-week {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.preview-day {
    min-height: 116px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
}

.preview-day.active {
    border-color: rgba(79, 140, 255, .36);
    background: rgba(79, 140, 255, .08);
}

.preview-day span,
.preview-day b {
    display: block;
}

.preview-day span {
    color: #8da0bb;
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .08em;
}

.preview-day b {
    margin-top: 2px;
    font-size: 12px;
}

.preview-shift {
    display: block;
    height: 21px;
    margin-top: 10px;
    border-radius: 7px;
    opacity: .9;
}

.preview-shift.short {
    width: 72%;
}

.shift-blue { background: linear-gradient(135deg, #2563eb, #4f8cff); }
.shift-green { background: linear-gradient(135deg, #15803d, #34d399); }
.shift-purple { background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.shift-orange { background: linear-gradient(135deg, #c97706, #fbbf24); }

.auth-form-panel {
    position: relative;
    padding: 70px 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 80% 15%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 30%),
        var(--bg);
}

.auth-card {
    width: min(460px, 100%);
    padding: 38px;
    border: 1px solid var(--border);
    border-radius: 25px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
}

.auth-security-badge {
    width: fit-content;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid color-mix(in srgb, var(--primary) 17%, var(--border));
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-soft);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.auth-security-badge .ui-icon {
    width: 14px;
    height: 14px;
}

.auth-card-heading {
    margin-top: 25px;
}

.auth-card-heading h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 31px;
    font-weight: 800;
    letter-spacing: -.045em;
}

.auth-card-heading > p:last-child {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.auth-form {
    margin-top: 26px;
    display: grid;
    gap: 17px;
}

.form-field > span:first-child {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 11px;
    font-weight: 750;
}

.input-shell {
    position: relative;
    display: block;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    z-index: 2;
    color: var(--muted-light);
    transform: translateY(-50%);
    pointer-events: none;
}

.input-icon .ui-icon {
    width: 17px;
    height: 17px;
}

.auth-form input {
    width: 100%;
    min-height: 50px;
    padding: 0 45px 0 42px;
    border: 1px solid var(--border);
    border-radius: 13px;
    outline: none;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-form input::placeholder {
    color: var(--muted-light);
    font-weight: 500;
}

.auth-form input:hover {
    border-color: var(--border-strong);
}

.auth-form input:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted-light);
    display: grid;
    place-items: center;
    transform: translateY(-50%);
}

.password-toggle:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.password-toggle .ui-icon {
    width: 17px;
    height: 17px;
}

.password-hide-icon,
.password-toggle.is-visible .password-show-icon {
    display: none;
}

.password-toggle.is-visible .password-hide-icon {
    display: block;
}

.button {
    min-height: 48px;
    border: 0;
    border-radius: 13px;
    padding: 0 20px;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.button .ui-icon {
    width: 17px;
    height: 17px;
}

.button-primary {
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .12), transparent 45%),
        linear-gradient(135deg, var(--primary), var(--primary-bright));
    box-shadow: 0 14px 28px color-mix(in srgb, var(--primary) 30%, transparent);
}

.button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px color-mix(in srgb, var(--primary) 36%, transparent);
    filter: saturate(1.08);
}

.button-primary:active {
    transform: translateY(0);
}

.button-block {
    width: 100%;
}

.alert {
    margin-top: 21px;
    padding: 12px 14px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 11px;
    line-height: 1.55;
}

.alert-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 800;
}

.alert-error {
    border: 1px solid color-mix(in srgb, var(--danger) 24%, transparent);
    color: var(--danger);
    background: var(--danger-soft);
}

.alert-error .alert-icon {
    color: #fff;
    background: var(--danger);
}

.auth-trust-row {
    margin-top: 21px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
}

.auth-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-trust-row .ui-icon {
    width: 13px;
    height: 13px;
    color: var(--green);
}

.auth-footnote {
    margin: 20px 0 0;
    text-align: center;
    color: var(--muted-light);
    font-size: 9px;
}

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

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: var(--sidebar-width);
    padding: 20px 15px;
    border-right: 1px solid var(--border);
    background: var(--sidebar);
    box-shadow: 12px 0 35px rgba(15, 23, 42, .025);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
}

html[data-theme="dark"] .sidebar {
    box-shadow: 12px 0 42px rgba(0, 0, 0, .16);
}

.sidebar-brand {
    min-height: 64px;
    padding: 0 8px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand strong,
.sidebar-brand small {
    display: block;
}

.sidebar-brand strong {
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -.025em;
}

.sidebar-brand small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
}

.sidebar-nav {
    display: grid;
    gap: 5px;
}

.sidebar-nav a {
    position: relative;
    min-height: 43px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 11px;
    font-weight: 700;
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.sidebar-nav a:hover:not(.disabled) {
    color: var(--text);
    background: var(--surface-soft);
    transform: translateX(2px);
}

.sidebar-nav a.active {
    border-color: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--primary) 13%, transparent), color-mix(in srgb, var(--primary) 5%, transparent));
    box-shadow: inset 3px 0 0 var(--primary), var(--shadow-xs);
}

.sidebar-nav a.disabled {
    opacity: .62;
    cursor: not-allowed;
}

.sidebar-nav em {
    margin-left: auto;
    padding: 3px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted-light);
    background: var(--surface-soft);
    font-size: 7px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.nav-icon {
    flex: 0 0 auto;
    width: 20px;
    display: grid;
    place-items: center;
}

.nav-icon .ui-icon {
    width: 17px;
    height: 17px;
}

.sidebar-section {
    margin: 18px 12px 6px;
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .15em;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 10px;
}

.sidebar-system-card {
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--green) 12%, var(--border));
    border-radius: 13px;
    background: color-mix(in srgb, var(--green-soft) 58%, var(--surface));
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-system-icon {
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    border-radius: 10px;
    color: var(--green);
    background: var(--green-soft);
    display: grid;
    place-items: center;
}

.sidebar-system-icon .ui-icon {
    width: 16px;
    height: 16px;
}

.sidebar-system-card strong,
.sidebar-system-card small {
    display: block;
}

.sidebar-system-card strong {
    font-size: 9px;
    font-weight: 800;
}

.sidebar-system-card small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.user-chip {
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar,
.access-avatar {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 1px solid color-mix(in srgb, var(--primary) 15%, transparent);
    border-radius: 50%;
    color: var(--primary);
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .7), transparent 32%),
        var(--primary-soft);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
}

.user-chip-copy {
    min-width: 0;
    flex: 1;
}

.user-chip strong,
.user-chip small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip strong {
    color: var(--text);
    font-size: 9px;
    font-weight: 800;
}

.user-chip small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.user-chip-chevron {
    color: var(--muted-light);
}

.user-chip-chevron .ui-icon {
    width: 14px;
    height: 14px;
}

.logout-link {
    min-height: 39px;
    padding: 0 12px;
    border-radius: 11px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10px;
    font-weight: 750;
    transition: color .2s ease, background .2s ease;
}

.logout-link .ui-icon {
    width: 16px;
    height: 16px;
}

.logout-link:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

.sidebar-overlay {
    display: none;
}

.app-main {
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 76px;
    padding: 13px 28px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    box-shadow: 0 8px 25px rgba(15, 23, 42, .025);
    backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.035em;
}

.topbar-kicker {
    margin-bottom: 3px;
    font-size: 8px;
}

.mobile-menu-button {
    display: none;
    width: 39px;
    height: 39px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    background: var(--surface);
    place-items: center;
}

.mobile-menu-button .ui-icon {
    width: 18px;
    height: 18px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-clock {
    min-width: 158px;
    padding: 0 12px;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 9px;
}

.topbar-clock-icon {
    width: 29px;
    height: 29px;
    border-radius: 9px;
    color: var(--primary);
    background: var(--primary-soft);
    display: grid;
    place-items: center;
}

.topbar-clock-icon .ui-icon {
    width: 15px;
    height: 15px;
}

.topbar-clock strong,
.topbar-clock small {
    display: block;
}

.topbar-clock strong {
    color: var(--text);
    font-size: 10px;
    font-weight: 800;
}

.topbar-clock small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 8px;
}

.live-indicator {
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid color-mix(in srgb, var(--green) 13%, var(--border));
    border-radius: 11px;
    color: var(--muted);
    background: color-mix(in srgb, var(--green-soft) 52%, var(--surface));
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 9px;
    font-weight: 750;
}

.live-indicator > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 13%, transparent);
}

.page-content {
    flex: 1;
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 26px 28px 32px;
}

.hero-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 184px;
    padding: 31px 34px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 23px;
    color: #fff;
    background:
        radial-gradient(circle at 86% 10%, rgba(255, 255, 255, .18), transparent 21%),
        radial-gradient(circle at 76% 98%, rgba(124, 58, 237, .34), transparent 31%),
        linear-gradient(126deg, #0e3d91 0%, #1764ee 49%, #4f8cff 100%);
    box-shadow: 0 22px 48px rgba(37, 99, 235, .22);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.hero-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 360px;
    height: 360px;
    right: -130px;
    top: -180px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
}

.hero-content {
    min-width: 0;
    max-width: 760px;
}

.hero-label-row {
    display: flex;
    align-items: center;
    gap: 13px;
}

.hero-card .eyebrow {
    margin: 0;
    color: #c8dcff;
}

.hero-date {
    padding-left: 13px;
    border-left: 1px solid rgba(255, 255, 255, .22);
    color: #c9daf4;
    font-size: 9px;
    font-weight: 650;
}

.hero-card h1 {
    margin: 12px 0 0;
    font-size: clamp(29px, 3.4vw, 45px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.05em;
}

.hero-card p:not(.eyebrow) {
    max-width: 650px;
    margin: 12px 0 0;
    color: #dce8fb;
    font-size: 12px;
    line-height: 1.7;
}

.hero-actions {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.foundation-status,
.hero-release {
    min-height: 32px;
    padding: 0 11px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 9px;
    font-weight: 750;
}

.foundation-status {
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

.hero-release {
    color: #bfd4f5;
    background: rgba(7, 24, 57, .18);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #55e488;
    box-shadow: 0 0 0 5px rgba(85, 228, 136, .15);
}

.hero-visual {
    position: relative;
    flex: 0 0 275px;
    height: 130px;
}

.hero-visual-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 68px;
    height: 68px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 22px;
    background: rgba(255, 255, 255, .12);
    box-shadow: 0 18px 38px rgba(4, 22, 60, .22), inset 0 1px rgba(255, 255, 255, .16);
    backdrop-filter: blur(15px);
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
}

.hero-visual-icon .ui-icon {
    width: 30px;
    height: 30px;
}

.hero-orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.hero-orbit-one {
    width: 130px;
    height: 130px;
}

.hero-orbit-two {
    width: 205px;
    height: 205px;
}

.hero-mini-card {
    position: absolute;
    min-width: 115px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    background: rgba(5, 22, 55, .26);
    box-shadow: 0 12px 26px rgba(4, 22, 60, .16);
    backdrop-filter: blur(12px);
}

.hero-mini-card-one {
    left: 0;
    top: 1px;
}

.hero-mini-card-two {
    right: 0;
    bottom: 1px;
}

.hero-mini-card i {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 5px;
    border-radius: 50%;
    background: #55e488;
}

.hero-mini-card span,
.hero-mini-card b {
    display: block;
}

.hero-mini-card span {
    color: #c8d9f0;
    font-size: 7px;
}

.hero-mini-card b {
    margin-top: 3px;
    font-size: 10px;
}

.metric-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric-card {
    position: relative;
    min-height: 114px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 13px;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.metric-card:hover {
    border-color: color-mix(in srgb, var(--primary) 17%, var(--border));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.metric-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: var(--primary);
    background: var(--primary-soft);
    display: grid;
    place-items: center;
}

.metric-icon .ui-icon {
    width: 20px;
    height: 20px;
}

.metric-green { color: var(--green); background: var(--green-soft); }
.metric-purple { color: var(--purple); background: var(--purple-soft); }
.metric-orange { color: var(--orange); background: var(--orange-soft); }

.metric-copy {
    min-width: 0;
    flex: 1;
}

.metric-copy > span,
.metric-copy strong,
.metric-copy small {
    display: block;
}

.metric-copy > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
}

.metric-copy strong {
    margin-top: 2px;
    color: var(--text-strong);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.metric-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.45;
}

.metric-state {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
}

.state-blue { color: var(--primary); background: var(--primary-soft); }
.state-green { color: var(--green); background: var(--green-soft); }
.state-purple { color: var(--purple); background: var(--purple-soft); }
.state-orange { color: var(--orange); background: var(--orange-soft); }

.dashboard-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
    gap: 16px;
}

.panel {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.panel-heading.compact {
    align-items: center;
}

.panel-heading h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.panel-heading div > p:last-child {
    max-width: 680px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.badge {
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.badge .ui-icon {
    width: 12px;
    height: 12px;
}

.badge-success {
    color: var(--green);
    background: var(--green-soft);
}

.badge-success i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
}

.badge-preview {
    color: var(--purple);
    background: var(--purple-soft);
}

.roadmap-list {
    margin-top: 20px;
    display: grid;
}

.roadmap-item {
    position: relative;
    min-height: 66px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.roadmap-item:last-child {
    border-bottom: 0;
}

.roadmap-marker {
    width: 31px;
    height: 31px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--muted-light);
    background: var(--surface-soft);
    display: grid;
    place-items: center;
    font-size: 8px;
    font-weight: 800;
}

.roadmap-marker .ui-icon {
    width: 15px;
    height: 15px;
}

.roadmap-item.completed .roadmap-marker {
    border-color: color-mix(in srgb, var(--green) 18%, transparent);
    color: var(--green);
    background: var(--green-soft);
}

.roadmap-item.current .roadmap-marker {
    border-color: color-mix(in srgb, var(--primary) 20%, transparent);
    color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 7%, transparent);
}

.roadmap-item strong,
.roadmap-item small {
    display: block;
}

.roadmap-item strong {
    color: var(--text);
    font-size: 10px;
    font-weight: 800;
}

.roadmap-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.roadmap-item > span:last-child {
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 750;
}

.roadmap-item.completed > span:last-child {
    color: var(--green);
}

.roadmap-item.current > span:last-child {
    color: var(--primary);
}

.access-avatar {
    width: 42px;
    height: 42px;
}

.account-list {
    margin: 18px 0 0;
    display: grid;
}

.account-list > div {
    min-height: 46px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.account-list > div:last-child {
    border-bottom: 0;
}

.account-list dt {
    color: var(--muted);
    font-size: 9px;
}

.account-list dd {
    max-width: 64%;
    margin: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 9px;
    font-weight: 750;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.security-note {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--primary) 11%, var(--border));
    border-radius: 13px;
    background: color-mix(in srgb, var(--primary-soft) 48%, var(--surface));
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-note > span {
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    border-radius: 10px;
    color: var(--primary);
    background: var(--primary-soft);
    display: grid;
    place-items: center;
}

.security-note .ui-icon {
    width: 15px;
    height: 15px;
}

.security-note strong,
.security-note small {
    display: block;
}

.security-note strong {
    font-size: 9px;
    font-weight: 800;
}

.security-note small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.roster-preview-panel {
    margin-top: 18px;
}

.roster-preview-heading {
    align-items: center;
}

.roster-preview-shell {
    min-height: 260px;
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background:
        linear-gradient(var(--border) 1px, transparent 1px) 0 44px / 100% 44px,
        var(--surface-soft);
    display: grid;
    grid-template-columns: 58px repeat(5, minmax(120px, 1fr));
}

.roster-time-column,
.roster-day-column {
    min-width: 0;
    border-right: 1px solid var(--border);
}

.roster-day-column:last-child {
    border-right: 0;
}

.roster-time-column {
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    display: grid;
    grid-template-rows: 44px repeat(5, 44px);
}

.roster-time-column span {
    padding: 9px 8px;
    color: var(--muted-light);
    font-size: 7px;
    text-align: right;
}

.roster-day-column {
    position: relative;
    padding: 0 8px 10px;
}

.roster-day-column.selected-day {
    background: color-mix(in srgb, var(--primary) 4%, transparent);
}

.roster-day-column header {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.roster-day-column header strong,
.roster-day-column header small {
    font-size: 8px;
}

.roster-day-column header strong {
    color: var(--text);
    font-weight: 800;
}

.roster-day-column header small {
    color: var(--muted);
}

.preview-event {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 52px;
    min-height: 74px;
    padding: 9px;
    border: 1px solid;
    border-radius: 10px;
    box-shadow: var(--shadow-xs);
}

.preview-event.middle {
    top: 96px;
}

.preview-event.low {
    top: 166px;
}

.preview-event strong,
.preview-event span,
.preview-event small {
    display: block;
}

.preview-event strong {
    font-size: 8px;
    font-weight: 800;
}

.preview-event span {
    margin-top: 4px;
    font-size: 7px;
}

.preview-event small {
    margin-top: 6px;
    font-size: 7px;
    font-weight: 750;
}

.event-blue {
    border-color: color-mix(in srgb, var(--primary) 42%, transparent);
    color: var(--primary);
    background: color-mix(in srgb, var(--primary-soft) 88%, var(--surface));
}

.event-green {
    border-color: color-mix(in srgb, var(--green) 42%, transparent);
    color: var(--green);
    background: color-mix(in srgb, var(--green-soft) 88%, var(--surface));
}

.event-purple {
    border-color: color-mix(in srgb, var(--purple) 42%, transparent);
    color: var(--purple);
    background: color-mix(in srgb, var(--purple-soft) 88%, var(--surface));
}

.event-orange {
    border-color: color-mix(in srgb, var(--orange) 42%, transparent);
    color: var(--orange);
    background: color-mix(in srgb, var(--orange-soft) 88%, var(--surface));
}

.app-footer {
    min-height: 54px;
    padding: 0 28px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.footer-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
}

@media (max-width: 1180px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .hero-visual {
        flex-basis: 230px;
    }

    .roster-preview-shell {
        overflow-x: auto;
        grid-template-columns: 58px repeat(5, minmax(145px, 1fr));
    }
}

@media (max-width: 1050px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: 680px;
    }

    .auth-form-panel {
        min-height: 620px;
    }

    .auth-theme-toggle {
        color: var(--text);
        border-color: var(--border);
        background: color-mix(in srgb, var(--surface) 88%, transparent);
    }
}

@media (max-width: 900px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        width: 264px;
        transform: translateX(-102%);
        transition: transform .25s ease;
    }

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

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(4, 11, 20, .52);
        backdrop-filter: blur(3px);
    }

    .sidebar-open .sidebar-overlay {
        display: block;
    }

    .app-main {
        width: 100%;
        margin-left: 0;
    }

    .mobile-menu-button {
        display: grid;
    }

    .topbar-clock {
        display: none;
    }
}

@media (max-width: 720px) {
    .auth-theme-toggle {
        top: 16px;
        right: 16px;
    }

    .auth-theme-toggle [data-theme-label] {
        display: none;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        min-height: 100vh;
        padding: 70px 20px 32px;
        background:
            radial-gradient(circle at 20% 8%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 30%),
            radial-gradient(circle at 90% 90%, color-mix(in srgb, var(--purple) 8%, transparent), transparent 30%),
            var(--bg);
    }

    .auth-card {
        padding: 29px 24px;
        border-radius: 21px;
    }

    .auth-card-heading h2 {
        font-size: 28px;
    }

    .topbar {
        min-height: 70px;
        padding: 12px 16px;
    }

    .topbar h2 {
        font-size: 17px;
    }

    .topbar-kicker,
    .live-indicator,
    .theme-toggle [data-theme-label] {
        display: none;
    }

    .topbar .theme-toggle {
        width: 39px;
        padding: 0;
        justify-content: center;
    }

    .page-content {
        padding: 18px 16px 24px;
    }

    .hero-card {
        min-height: 235px;
        padding: 25px;
        align-items: flex-start;
    }

    .hero-visual {
        display: none;
    }

    .hero-label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .hero-date {
        padding-left: 0;
        border-left: 0;
    }

    .hero-card h1 {
        font-size: 30px;
    }

    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .panel {
        padding: 18px;
    }

    .panel-heading,
    .roster-preview-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .roadmap-item {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .roadmap-item > span:last-child {
        grid-column: 2;
    }

    .app-footer {
        padding: 0 16px;
    }
}

@media (max-width: 460px) {
    .auth-card {
        padding: 27px 20px;
    }

    .auth-trust-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-state {
        display: none;
    }

    .topbar-actions {
        gap: 6px;
    }
}
