/* Login + Mission Control surfaces. Tokens live in app.css. */

@keyframes pulse-status {
    0%, 100% { opacity: 0.55; box-shadow: 0 0 7px rgba(127, 255, 193, 0.5); }
    50% { opacity: 1; box-shadow: 0 0 15px rgba(127, 255, 193, 0.9); }
}
@keyframes scan {
    0%, 100% { transform: translateY(0); opacity: 0.2; }
    50% { transform: translateY(530px); opacity: 0.65; }
}
@keyframes mc-arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes card-arrive {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes draw-line { to { stroke-dashoffset: 0; } }
@keyframes chart-draw { to { stroke-dashoffset: 0; } }
@keyframes area-rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes gauge-in { from { stroke-dasharray: 0 100; } }
@keyframes bar-grow { from { width: 0; } }
@keyframes rotate-orbit { to { transform: rotate(360deg); } }
@keyframes beacon-pulse {
    0%, 100% { opacity: 0.65; stroke-width: 8; }
    50% { opacity: 1; stroke-width: 14; }
}
@keyframes live-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .status-dot, .scan-line, .metric-card, .spark-path, .chart-line,
    .chart-area, .chart-beacon, .sla-progress, .capacity-progress,
    .status-orbit i, .orbit-node, .sync-state i, .capacity-bar i {
        animation: none !important;
    }
}

.login-body { overflow: auto !important; }
.login-shell {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 28px clamp(24px, 4vw, 72px) 24px;
    background:
        radial-gradient(circle at 72% 48%, rgba(49, 116, 151, 0.13), transparent 28%),
        radial-gradient(circle at 12% 86%, rgba(91, 49, 166, 0.11), transparent 29%),
        linear-gradient(135deg, #030914 0%, #02060d 48%, #050814 100%);
    color: #ecf7ff;
}
html[data-theme="light"] .login-shell {
    background:
        radial-gradient(circle at 76% 0%, rgba(47, 177, 221, 0.13), transparent 30%),
        radial-gradient(circle at 12% 88%, rgba(122, 92, 204, 0.08), transparent 28%),
        linear-gradient(145deg, #f7fbff, #edf3f8);
    color: var(--heading);
}
.login-shell .ambient-grid {
    position: absolute;
    z-index: -5;
    inset: 0;
    opacity: 0.28;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(77, 144, 176, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(77, 144, 176, 0.09) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, transparent, #000 24%, #000 80%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 24%, #000 80%, transparent);
}
.login-shell .orbit {
    position: absolute;
    z-index: -4;
    border: 1px solid rgba(93, 220, 255, 0.12);
    border-radius: 999px;
    transform: rotate(-18deg);
}
.login-shell .orbit::after {
    content: "";
    position: absolute;
    top: 49%;
    left: -3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #58e5ff;
    box-shadow: 0 0 22px 4px rgba(88, 229, 255, 0.52);
}
.login-shell .orbit-one { width: 760px; height: 370px; right: -250px; top: 12%; }
.login-shell .orbit-two {
    width: 620px;
    height: 260px;
    left: -250px;
    bottom: -80px;
    border-color: rgba(146, 118, 255, 0.12);
}
.login-shell .orbit-two::after {
    background: #9276ff;
    box-shadow: 0 0 22px 4px rgba(146, 118, 255, 0.45);
}
.login-shell .aurora {
    position: absolute;
    z-index: -6;
    width: 28vw;
    height: 28vw;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.11;
}
.login-shell .aurora-cyan { right: 4%; top: 20%; background: #24bce8; }
.login-shell .aurora-violet { left: 7%; bottom: -8%; background: #7650ff; }

.login-topbar, .login-page-footer {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.login-topbar-actions { display: flex; align-items: center; gap: 14px; }
.login-shell .auth-theme-toggle {
    position: static;
    top: auto;
    right: auto;
    z-index: 1;
}
.login-shell .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: auto;
    flex: none;
    padding: 0;
    border: 0;
    background: transparent;
}
.login-shell .brand-mark {
    position: relative;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    filter: drop-shadow(0 0 12px rgba(88, 229, 255, 0.2));
}
.login-shell .brand-copy {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 7px;
    line-height: 1;
}
.login-shell .brand-copy strong,
.login-shell .brand-copy small {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: none;
    color: inherit;
}
.login-shell .brand-copy small {
    color: #58e5ff;
    letter-spacing: 0.08em;
}
html[data-theme="light"] .login-shell .brand-copy small { color: #08768e; }

.login-shell .system-state {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #96a8ba;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.login-shell .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7fffc1;
    box-shadow: 0 0 12px rgba(127, 255, 193, 0.8);
    animation: pulse-status 2.4s ease-in-out infinite;
}

.login-stage {
    position: relative;
    z-index: 2;
    width: min(1180px, 100%);
    margin: 32px auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.78fr);
    align-items: center;
    gap: clamp(54px, 8vw, 126px);
}
.login-info-stage { grid-template-columns: 1fr; justify-items: center; }
.mission-copy { max-width: 610px; }
.login-shell .eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #91a5b8;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    letter-spacing: 0.17em;
}
.login-shell .eyebrow span:first-child { color: #58e5ff; }
.login-shell .eyebrow-line {
    width: 42px;
    height: 1px;
    background: linear-gradient(90deg, #58e5ff, transparent);
}
.mission-copy h1 {
    margin: 23px 0 22px;
    max-width: 700px;
    font-size: clamp(48px, 6.25vw, 88px);
    line-height: 0.96;
    letter-spacing: -0.065em;
    font-weight: 620;
}
.mission-copy h1 span {
    display: block;
    color: transparent;
    background: linear-gradient(92deg, #a6efff 5%, #8bbdff 48%, #a98dff 94%);
    background-clip: text;
    -webkit-background-clip: text;
}
.mission-copy > p {
    max-width: 520px;
    margin: 0;
    color: #8292a9;
    font-size: 16px;
    line-height: 1.75;
}
.telemetry {
    display: flex;
    gap: clamp(28px, 4vw, 54px);
    margin-top: 48px;
}
.telemetry div { display: grid; gap: 6px; }
.telemetry span, .card-kicker {
    color: #65788e;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
}
.telemetry strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    font-weight: 520;
}

.login-card-wrap { width: 100%; max-width: 468px; justify-self: end; }
.login-info-stage .login-card-wrap { justify-self: center; }
.card-index {
    display: flex;
    justify-content: space-between;
    margin: 0 4px 12px;
    color: #607189;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
}
.login-card {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 4vw, 40px);
    border: 1px solid rgba(133, 206, 238, 0.18);
    border-radius: 4px;
    background:
        linear-gradient(135deg, rgba(88, 229, 255, 0.055), transparent 42%),
        rgba(8, 16, 31, 0.78);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(22px);
}
.login-card .alert { margin: 0 0 14px; }
.login-card::before, .login-card::after {
    content: "";
    position: absolute;
    width: 34px;
    height: 34px;
    pointer-events: none;
}
.login-card::before {
    top: -1px; left: -1px;
    border-top: 1px solid #58e5ff;
    border-left: 1px solid #58e5ff;
}
.login-card::after {
    right: -1px; bottom: -1px;
    border-right: 1px solid #9276ff;
    border-bottom: 1px solid #9276ff;
}
.scan-line {
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #58e5ff, transparent);
    box-shadow: 0 0 12px rgba(88, 229, 255, 0.55);
    animation: scan 5s ease-in-out infinite;
}
.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
}
.card-heading h2 {
    margin: 10px 0 0;
    font-size: clamp(25px, 3vw, 32px);
    line-height: 1.1;
    letter-spacing: -0.045em;
    font-weight: 600;
}
.secure-badge {
    width: 37px;
    height: 37px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(127, 255, 193, 0.27);
    color: #7fffc1;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 8px;
    letter-spacing: 0.08em;
    clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%);
    background: rgba(127, 255, 193, 0.04);
}
.card-intro {
    margin: 16px 0 28px;
    color: #8292a9;
    font-size: 13px;
    line-height: 1.65;
}
.login-form { display: grid; gap: 10px; }
.login-form > label, .label-row label {
    color: #aebccc;
    font-size: 11px;
    letter-spacing: 0.03em;
}
.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 7px;
}
.label-row a { color: #79dff4; font-size: 10px; }
.field-shell {
    display: flex;
    align-items: center;
    height: 51px;
    border: 1px solid rgba(128, 166, 193, 0.17);
    border-radius: 3px;
    background: rgba(1, 7, 16, 0.66);
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.field-shell:focus-within {
    border-color: rgba(88, 229, 255, 0.62);
    background: rgba(3, 13, 26, 0.86);
    box-shadow: 0 0 0 3px rgba(88, 229, 255, 0.06);
}
.field-icon {
    width: 46px;
    display: grid;
    place-items: center;
    color: #6e8298;
}
.field-icon svg, .login-button svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    stroke-width: 1.5;
}
.field-shell input, .field-shell .form-control {
    width: 100%;
    height: 100%;
    padding: 0 14px 0 0;
    border: 0 !important;
    outline: 0;
    color: #e9f5ff !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 0 !important;
    font-size: 13px;
}
.field-shell input::placeholder { color: #526277; }
.password-toggle {
    align-self: stretch;
    padding: 0 14px;
    border: 0;
    color: #6edbed;
    background: transparent;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 8px;
    letter-spacing: 0.12em;
    cursor: pointer;
}
.password-toggle:hover { color: #c4f7ff; }
.remember-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 7px 0 13px;
    color: #7c8da1 !important;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}
.remember-row input { position: absolute; opacity: 0; }
.custom-check {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(134, 172, 199, 0.28);
    border-radius: 2px;
    background: rgba(1, 7, 16, 0.7);
}
.remember-row input:checked + .custom-check {
    border-color: #58e5ff;
    background: linear-gradient(135deg, transparent 47%, #03121c 47%), #58e5ff;
    box-shadow: 0 0 12px rgba(88, 229, 255, 0.25);
}
.login-button {
    height: 53px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border: 1px solid rgba(113, 228, 255, 0.4);
    border-radius: 3px;
    color: #03111b;
    background: linear-gradient(102deg, #6ee9fb, #8cbdfc 58%, #ad91ff);
    box-shadow: 0 13px 34px rgba(73, 179, 229, 0.16);
    cursor: pointer;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}
.login-button:hover {
    color: #03111b;
    transform: translateY(-2px);
    box-shadow: 0 17px 38px rgba(73, 179, 229, 0.25);
    filter: saturate(1.1) brightness(1.04);
}
.login-button:disabled {
    cursor: wait;
    filter: saturate(0.65);
    transform: none;
}
.login-button span {
    font-size: 12px;
    font-weight: 760;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.login-button svg { width: 19px; height: 19px; stroke-width: 1.7; }
.form-feedback {
    min-height: 16px;
    margin: 0;
    color: #6d8195;
    font-size: 9px;
    line-height: 1.5;
}
.form-feedback.working { color: #8cdff0; }
.card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(128, 166, 193, 0.1);
    color: #526579;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.signal-bars { height: 14px; display: flex; align-items: flex-end; gap: 2px; }
.signal-bars i {
    width: 2px;
    background: #58e5ff;
    box-shadow: 0 0 8px rgba(88, 229, 255, 0.4);
    display: block;
}
.signal-bars i:nth-child(1) { height: 4px; opacity: 0.4; }
.signal-bars i:nth-child(2) { height: 7px; opacity: 0.55; }
.signal-bars i:nth-child(3) { height: 10px; opacity: 0.75; }
.signal-bars i:nth-child(4) { height: 14px; }
.login-page-footer {
    color: #526176;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.login-page-footer nav { display: flex; gap: 28px; }
.login-page-footer a, .label-row a { transition: color 160ms ease; }
.login-page-footer a:hover, .label-row a:hover { color: #58e5ff; }

html[data-theme="light"] .login-shell .ambient-grid { opacity: 0.4; }
html[data-theme="light"] .login-shell .orbit { border-color: rgba(8, 118, 142, 0.16); }
html[data-theme="light"] .login-shell .orbit::after {
    background: #08768e;
    box-shadow: 0 0 16px 3px rgba(8, 118, 142, 0.28);
}
html[data-theme="light"] .login-shell .orbit-two { border-color: rgba(122, 92, 204, 0.16); }
html[data-theme="light"] .login-shell .orbit-two::after {
    background: #7a5cff;
    box-shadow: 0 0 16px 3px rgba(122, 92, 204, 0.25);
}
html[data-theme="light"] .login-shell .aurora { opacity: 0.2; }
html[data-theme="light"] .login-shell .system-state { color: var(--muted); }
html[data-theme="light"] .login-shell .eyebrow { color: var(--muted); }
html[data-theme="light"] .login-shell .eyebrow span:first-child { color: #08768e; }
html[data-theme="light"] .login-shell .eyebrow-line { background: linear-gradient(90deg, #08768e, transparent); }
html[data-theme="light"] .mission-copy h1 { color: var(--heading); }
html[data-theme="light"] .mission-copy h1 span {
    background: linear-gradient(92deg, #08768e 5%, #4b6cb3 50%, #6d4bb8 94%);
    background-clip: text;
    -webkit-background-clip: text;
}
html[data-theme="light"] .mission-copy > p { color: var(--muted); }
html[data-theme="light"] .telemetry span,
html[data-theme="light"] .card-kicker { color: var(--faint); }
html[data-theme="light"] .telemetry strong { color: var(--heading); }
html[data-theme="light"] .card-index { color: var(--faint); }
html[data-theme="light"] .login-card {
    border-color: rgba(55, 103, 139, 0.16);
    background:
        linear-gradient(135deg, rgba(8, 118, 142, 0.05), transparent 42%),
        rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 64px rgba(41, 72, 94, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
html[data-theme="light"] .login-card::before { border-color: #08768e; }
html[data-theme="light"] .login-card::after { border-color: #7a5cff; }
html[data-theme="light"] .scan-line {
    background: linear-gradient(90deg, transparent, #08768e, transparent);
    box-shadow: 0 0 10px rgba(8, 118, 142, 0.28);
}
html[data-theme="light"] .card-heading h2 { color: var(--heading); }
html[data-theme="light"] .secure-badge {
    border-color: rgba(8, 118, 142, 0.28);
    color: #08768e;
    background: rgba(8, 118, 142, 0.06);
}
html[data-theme="light"] .card-intro { color: var(--muted); }
html[data-theme="light"] .login-form > label,
html[data-theme="light"] .label-row label { color: var(--heading); }
html[data-theme="light"] .label-row a { color: #08768e; }
html[data-theme="light"] .field-shell {
    border-color: rgba(55, 103, 139, 0.22);
    background: #fff;
}
html[data-theme="light"] .field-shell:focus-within {
    border-color: rgba(8, 118, 142, 0.55);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(8, 118, 142, 0.08);
}
html[data-theme="light"] .field-icon { color: var(--muted); }
html[data-theme="light"] .field-shell input,
html[data-theme="light"] .field-shell .form-control { color: var(--input-fg) !important; }
html[data-theme="light"] .field-shell input::placeholder { color: var(--placeholder); }
html[data-theme="light"] .password-toggle { color: #08768e; }
html[data-theme="light"] .password-toggle:hover { color: #065f73; }
html[data-theme="light"] .remember-row { color: var(--muted) !important; }
html[data-theme="light"] .custom-check {
    border-color: rgba(55, 103, 139, 0.28);
    background: #fff;
}
html[data-theme="light"] .remember-row input:checked + .custom-check {
    border-color: #08768e;
    background: linear-gradient(135deg, transparent 47%, #fff 47%), #08768e;
    box-shadow: 0 0 10px rgba(8, 118, 142, 0.18);
}
html[data-theme="light"] .form-feedback { color: var(--faint); }
html[data-theme="light"] .form-feedback.working { color: #08768e; }
html[data-theme="light"] .card-footer {
    border-top-color: rgba(55, 103, 139, 0.12);
    color: var(--faint);
}
html[data-theme="light"] .signal-bars i {
    background: #08768e;
    box-shadow: 0 0 6px rgba(8, 118, 142, 0.28);
}
html[data-theme="light"] .login-page-footer { color: var(--faint); }
html[data-theme="light"] .login-page-footer a:hover,
html[data-theme="light"] .label-row a:hover { color: #065f73; }

@media (max-width: 930px) {
    .login-shell { overflow-y: auto; }
    .login-stage {
        grid-template-columns: 1fr;
        gap: 48px;
        margin: 70px auto;
    }
    .mission-copy { max-width: 680px; }
    .mission-copy h1 { font-size: clamp(52px, 9.8vw, 78px); }
    .login-card-wrap { max-width: 560px; justify-self: stretch; }
}
@media (max-width: 600px) {
    .login-shell { padding: 22px 18px 20px; }
    .login-stage { gap: 40px; margin: 64px auto 52px; }
    .mission-copy h1 { margin-top: 19px; font-size: clamp(42px, 14vw, 62px); }
    .mission-copy > p { font-size: 14px; }
    .telemetry { justify-content: space-between; gap: 12px; margin-top: 34px; }
    .telemetry strong { font-size: 11px; }
    .login-card { padding: 27px 22px 25px; }
    .login-page-footer { align-items: flex-start; gap: 20px; line-height: 1.7; }
    .login-page-footer nav { gap: 16px; }
}
@media (max-height: 760px) and (min-width: 931px) {
    .login-shell { padding-top: 20px; padding-bottom: 18px; }
    .login-stage { margin: 22px auto; transform: scale(0.94); transform-origin: center; }
    .telemetry { margin-top: 34px; }
}

/* Authenticated chrome + Mission Control widgets (scoped; login is untouched). */
.app-shell {
    --sidebar-width: 252px;
    --mc-ground: #060B16;
    --mc-ground-2: #0A1120;
    --mc-surface: rgba(12, 20, 35, .78);
    --mc-surface-2: rgba(16, 26, 44, .72);
    --mc-line: rgba(122, 196, 232, .15);
    --mc-line-strong: rgba(122, 196, 232, .30);
    --mc-ink: #E8F4FF;
    --mc-ink-2: #B4CADF;
    --mc-muted: #8298AE;
    --mc-accent: #58E5FF;
    --mc-accent-soft: rgba(88, 229, 255, .10);
    --mc-accent-line: rgba(88, 229, 255, .32);
    --mc-good: #4ADE9B;
    --mc-warn: #FFB454;
    --mc-bad: #FF6B7D;
    --mc-good-soft: rgba(74, 222, 155, .14);
    --mc-warn-soft: rgba(255, 180, 84, .14);
    --mc-bad-soft: rgba(255, 107, 125, .14);
    --mc-grid-ink: rgba(122, 196, 232, .055);
    --mc-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .42);
    --mc-shadow-lift: 0 2px 6px rgba(0, 0, 0, .5), 0 20px 48px rgba(0, 0, 0, .55);
    --mc-star: rgba(150, 225, 255, .85);
    --mc-tick: rgba(88, 229, 255, .42);
    --mc-hud: rgba(122, 196, 232, .05);
    --dash-bg: var(--mc-ground);
    --dash-bg-2: var(--mc-ground-2);
    --dash-surface: var(--mc-surface);
    --dash-surface-2: var(--mc-surface-2);
    --dash-panel-soft: var(--mc-surface-2);
    --dash-line: var(--mc-line);
    --dash-line-strong: var(--mc-line-strong);
    --dash-text: var(--mc-ink);
    --dash-muted: var(--mc-muted);
    --dash-faint: var(--mc-muted);
    --dash-shadow: rgba(0, 0, 0, .36);
    --cyan: var(--mc-accent);
    --violet: #9d7cff;
    --green: var(--mc-good);
    --amber: var(--mc-warn);
    --red: var(--mc-bad);
    color: var(--mc-ink);
    background:
        radial-gradient(circle at 73% 0%, rgba(47, 139, 187, 0.1), transparent 27%),
        radial-gradient(circle at 15% 82%, rgba(111, 66, 197, 0.08), transparent 29%),
        linear-gradient(145deg, var(--mc-ground-2), var(--mc-ground) 45%, #040713);
}
html[data-theme="light"] .app-shell {
    --mc-ground: #EEF3F9;
    --mc-ground-2: #E9EFF6;
    --mc-surface: #FFFFFF;
    --mc-surface-2: #F8FAFD;
    --mc-line: rgba(24, 60, 92, .13);
    --mc-line-strong: rgba(24, 60, 92, .26);
    --mc-ink: #0E1B2A;
    --mc-ink-2: #31485F;
    --mc-muted: #5B7189;
    --mc-accent: #0B6F86;
    --mc-accent-soft: rgba(11, 111, 134, .10);
    --mc-accent-line: rgba(11, 111, 134, .28);
    --mc-good: #0F7A4C;
    --mc-warn: #8A5300;
    --mc-bad: #B4243A;
    --mc-good-soft: rgba(15, 122, 76, .12);
    --mc-warn-soft: rgba(138, 83, 0, .12);
    --mc-bad-soft: rgba(180, 36, 58, .12);
    --mc-grid-ink: rgba(24, 60, 92, .07);
    --mc-shadow: 0 1px 2px rgba(16, 42, 67, .06), 0 8px 24px rgba(16, 42, 67, .07);
    --mc-shadow-lift: 0 2px 4px rgba(16, 42, 67, .08), 0 16px 40px rgba(16, 42, 67, .12);
    --mc-star: rgba(11, 111, 134, .42);
    --mc-tick: rgba(11, 111, 134, .30);
    --mc-hud: rgba(24, 60, 92, .055);
    --violet: #5b4bc4;
    background:
        radial-gradient(circle at 88% 0%, rgba(11, 111, 134, 0.06), transparent 28%),
        linear-gradient(180deg, #f5f8fb, #eef3f7);
}
.app-shell .dashboard-grid {
    position: fixed;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    opacity: 0.16;
    background-image:
        linear-gradient(var(--dash-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--dash-line) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.86), transparent 88%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.86), transparent 88%);
}
html[data-theme="light"] .app-shell .dashboard-grid {
    opacity: 0.08;
}
.app-shell .sidebar,
.app-shell .app-main { position: relative; z-index: 1; }
.app-shell .sidebar {
    width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    flex-basis: var(--sidebar-width);
    padding: 0;
    overflow: hidden;
    border-right: 1px solid var(--dash-line);
    background: var(--dash-surface-2);
    box-shadow: none;
    backdrop-filter: none;
}
html[data-theme="dark"] .app-shell .sidebar {
    background: #07111c;
}
.app-shell .sidebar .brand {
    height: 64px;
    min-height: 64px;
    padding: 0 18px;
    border-bottom: 1px solid var(--dash-line);
    flex: 0 0 64px;
    color: var(--dash-text);
}
.app-shell .sidebar .brand:hover { color: var(--dash-text); }
.app-shell .sidebar .brand-mark {
    width: 36px;
    height: 36px;
}
.app-shell .sidebar .brand-copy strong {
    font-size: 15px;
    letter-spacing: 0.01em;
}
.app-shell .sidebar .brand-copy small {
    margin-top: 2px;
    color: var(--cyan);
    font-size: 10px;
    letter-spacing: 0.12em;
}
.app-shell .nav-group:not(:has(.nav-link)) { display: none; }
.app-shell .nav-group-label {
    margin: 0 16px 8px;
    padding: 0;
    color: var(--dash-faint);
    font-family: Inter, "Segoe UI", sans-serif;
    font-size: 11px;
    letter-spacing: 0.08em;
    font-weight: 700;
}
.app-shell .sidebar .nav,
.app-shell .sidebar .nav.flex-column {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px 10px 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.app-shell .sidebar .nav::-webkit-scrollbar,
.app-shell .sidebar .nav.flex-column::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.app-shell .nav-group { width: 100%; flex: 0 0 auto; }
.app-shell .nav-group + .nav-group { margin-top: 18px; }
.app-shell .sidebar .nav-link {
    position: relative;
    min-height: 40px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 0 0 3px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--dash-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    white-space: normal;
}
.app-shell .sidebar .nav-link i { font-size: 18px; color: inherit; }
.app-shell .sidebar .nav-link:hover {
    color: var(--dash-text);
    background: var(--dash-panel-soft);
}
.app-shell .sidebar .nav-link.active {
    border-color: var(--accent-border, rgba(11, 124, 147, 0.2));
    color: var(--accent-text, var(--cyan));
    background: var(--accent-soft, rgba(11, 124, 147, 0.1));
    box-shadow: none;
}
.app-shell .sidebar .nav-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    width: 3px;
    height: 18px;
    border-radius: 0 2px 2px 0;
    background: var(--cyan);
    box-shadow: none;
}
.app-shell .sidebar .nav-link.active i { color: inherit; }
.app-shell .nav-badge {
    min-width: 20px;
    margin-left: auto;
    padding: 2px 6px;
    border: 1px solid var(--dash-line);
    border-radius: 999px;
    background: var(--dash-panel-soft);
    color: var(--dash-muted);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}
.app-shell .sidebar-dock {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 4;
    flex: 0 0 auto;
    padding: 12px 12px 16px;
    border-top: 1px solid var(--dash-line);
    background: transparent;
    pointer-events: auto;
}
.app-shell .sidebar-dock > * { pointer-events: auto; }
.app-shell .sidebar-footer,
.app-shell .sidebar-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--dash-line);
    border-radius: 8px;
    background: var(--dash-panel-soft);
    backdrop-filter: none;
    overflow: visible;
    color: var(--dash-muted);
}
.app-shell .status-orbit {
    position: relative;
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
}
.app-shell .status-orbit::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid color-mix(in srgb, var(--green) 22%, transparent);
    border-radius: 50%;
}
.app-shell .status-orbit span {
    position: absolute;
    inset: 9px;
    display: block;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}
.app-shell .status-orbit i {
    position: absolute;
    inset: -3px;
    display: block;
    border: 0;
    border-top: 1px solid var(--green);
    border-radius: 50%;
    animation: rotate-orbit 3.4s linear infinite;
}
.app-shell .sidebar-status > div:last-child {
    display: grid;
    min-width: 0;
    gap: 1px;
    white-space: nowrap;
}
.app-shell .sidebar-status > div > span {
    color: var(--dash-faint);
    font-family: Inter, "Segoe UI", sans-serif;
    font-size: 10px;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.app-shell .sidebar-status strong {
    color: var(--dash-text);
    font-size: 12px;
    font-weight: 700;
}
.app-shell .sidebar-logout {
    margin-top: 8px;
    flex: 0 0 auto;
}
.app-shell .sidebar-logout button {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--dash-muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.app-shell .sidebar-logout button:hover {
    color: var(--red);
    background: color-mix(in srgb, var(--red) 8%, transparent);
}
body.sidebar-collapsed .app-shell { --sidebar-width: 76px; }
body.sidebar-collapsed .app-shell .sidebar .brand {
    justify-content: center;
    padding: 0 12px;
}
body.sidebar-collapsed .app-shell .sidebar .nav-link {
    grid-template-columns: 22px;
    justify-content: center;
    justify-items: center;
    padding: 10px;
}
body.sidebar-collapsed .app-shell .sidebar-status { justify-content: center; padding: 10px; }
body.sidebar-collapsed .app-shell .sidebar-status .status-orbit,
body.sidebar-collapsed .app-shell .sidebar-status .status-orbit span,
body.sidebar-collapsed .app-shell .sidebar-status .status-orbit i {
    display: block !important;
}
body.sidebar-collapsed .app-shell .sidebar-status > div:last-child,
body.sidebar-collapsed .app-shell .sidebar-logout span,
body.sidebar-collapsed .app-shell .nav-badge { display: none; }
body.sidebar-collapsed .app-shell .sidebar-logout button { justify-content: center; padding: 0; }

.app-shell .app-main { background: transparent; }
.app-shell .topbar {
    min-height: 64px;
    padding: 10px clamp(16px, 2.4vw, 28px);
    border-bottom: 1px solid var(--dash-line);
    background: var(--dash-surface-2);
    backdrop-filter: none;
    box-shadow: none;
}
html[data-theme="dark"] .app-shell .topbar {
    background: rgba(7, 17, 28, 0.96);
}
.app-shell .eyebrow {
    color: var(--dash-faint);
    font-size: 11px;
    letter-spacing: 0.08em;
}
.app-shell .page-title {
    color: var(--dash-text);
    font-size: 18px;
    font-weight: 750;
}
.app-shell .topbar-search,
.app-shell .command-search {
    height: 40px;
    border: 1px solid var(--dash-line);
    border-radius: 10px;
    color: var(--dash-faint);
    background: var(--dash-panel-soft);
}
.app-shell .topbar-search:focus-within,
.app-shell .command-search:focus-within {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 16%, transparent);
}
.app-shell .topbar-search input { color: var(--dash-text); font-size: 13px; }
.app-shell .topbar-search kbd {
    padding: 3px 7px;
    border: 1px solid var(--dash-line);
    border-radius: 6px;
    color: var(--dash-muted);
    background: color-mix(in srgb, var(--dash-surface-2) 80%, transparent);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
}
.app-shell .sync-state {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 4px;
    color: var(--dash-muted);
    font-family: Inter, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
}
.app-shell .sync-state i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent);
    animation: none;
}
.app-shell .icon-button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--dash-line);
    border-radius: 10px;
    color: var(--dash-muted);
    background: transparent;
    text-decoration: none;
    overflow: visible;
}
.app-shell .icon-button:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: var(--accent-soft, var(--dash-panel-soft));
}
.app-shell .topbar,
.app-shell .topbar-actions,
.app-shell .notif-bell {
    overflow: visible;
}
.app-shell .notif-badge,
.app-shell #js-notification-badge {
    top: -6px;
    right: -6px;
    left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 2px solid var(--dash-surface-2);
    border-radius: 999px;
    color: #fff;
    background: var(--red);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    transform: none;
}
.app-shell .profile-chip {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 4px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--dash-line);
    border-radius: 999px;
    color: var(--dash-text);
    background: var(--dash-panel-soft);
    text-decoration: none;
}
.app-shell .profile-chip:hover {
    color: var(--dash-text);
    border-color: var(--cyan);
}
.app-shell .user-chip {
    width: 32px;
    height: 32px;
    border: 1px solid var(--accent-border, rgba(11, 124, 147, 0.22));
    border-radius: 50%;
    color: var(--cyan);
    background: var(--accent-soft, rgba(11, 124, 147, 0.1));
    font-family: Inter, "Segoe UI", sans-serif;
    font-size: 11px;
    font-weight: 750;
}
.app-shell .profile-copy { line-height: 1.2; }
.app-shell .profile-copy strong { display: block; font-size: 13px; font-weight: 650; color: var(--dash-text); }
.app-shell .profile-copy small { color: var(--dash-muted); font-size: 11px; }
.app-shell .app-footer {
    color: var(--dash-faint);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 7px;
    letter-spacing: 0.1em;
    background: transparent;
    border-top: 0;
}

.mission-control-page .content-wrap { max-width: 1480px; margin: 0 auto; width: 100%; padding-top: 22px; }
.mission-control-page .dashboard-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}
.mission-control-page .section-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dash-faint);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 8px;
    letter-spacing: 0.12em;
}
.mission-control-page .section-eyebrow span { color: var(--cyan); }
.mission-control-page .section-eyebrow i {
    width: 32px;
    height: 1px;
    background: linear-gradient(90deg, var(--cyan), transparent);
}
.mission-control-page .dashboard-intro h1 {
    margin: 11px 0 7px;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1;
    letter-spacing: -0.045em;
    font-weight: 620;
    color: var(--dash-text);
}
.mission-control-page .dashboard-intro p { margin: 0; color: var(--dash-muted); font-size: 12px; }
.mission-control-page .new-action {
    min-width: 128px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 14px;
    border: 1px solid rgba(88, 229, 255, 0.35);
    border-radius: 4px;
    color: #04111b !important;
    background: linear-gradient(110deg, #65e5f8, #83b7ff 58%, #a88bff);
    box-shadow: 0 13px 30px rgba(63, 184, 225, 0.14);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.03em;
    cursor: pointer;
    list-style: none;
}
.mission-control-page .new-action span { font-size: 16px; font-weight: 400; }
.mission-control-page .new-action:hover { transform: translateY(-1px); filter: brightness(1.05); }
.mission-control-page .create-new { position: relative; }
.mission-control-page .create-new-menu {
    position: absolute;
    right: 0;
    top: 110%;
    min-width: 140px;
    background: var(--dash-surface-2);
    border: 1px solid var(--dash-line);
    border-radius: 5px;
    padding: 8px;
    z-index: 5;
}
.mission-control-page .create-new-menu a { display: block; padding: 8px; color: var(--dash-text); border-radius: 4px; }
.mission-control-page .create-new-menu a:hover { background: var(--dash-panel-soft); }

.mission-control-page .mc-dashboard,
.mc {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.mc-band { min-width: 0; }
.mc-band-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 2px 11px;
}
.mc-band-head h2 {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .17em;
    text-transform: uppercase;
    color: var(--mc-muted);
    white-space: nowrap;
    margin: 0;
}
.mc-band-head .rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--mc-line), transparent);
}
.mc-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
    min-width: 0;
}
.mc-band--health { --body: 168px; }
.mc-cell {
    flex: 1 1 var(--basis, 300px);
    min-width: 0;
    display: flex;
}
.mc-cell--wide { flex-basis: calc(var(--basis, 300px) * 2 + 12px); }
.mc-cell > * { width: 100%; }
@media (max-width: 760px) {
    .mc-cell, .mc-cell--wide { flex-basis: 100%; }
}
.mission-control-page .metric-card,
.mission-control-page .dash-panel {
    position: relative;
    border: 1px solid var(--dash-line);
    border-radius: 8px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--cyan) 5%, transparent), transparent 42%),
        linear-gradient(320deg, color-mix(in srgb, var(--violet) 4%, transparent), transparent 38%),
        var(--dash-surface);
    box-shadow:
        0 14px 36px var(--dash-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
    min-width: 0;
}
.mission-control-page .metric-card { overflow: hidden; }
.mission-control-page .dash-panel { overflow: hidden; }
.mission-control-page a.metric-card {
    color: inherit;
    text-decoration: none;
}
.mission-control-page .mc-cell--hero .metric-card {
    border-color: color-mix(in srgb, var(--cyan) 38%, var(--dash-line));
    box-shadow:
        0 16px 40px var(--dash-shadow),
        0 0 0 1px color-mix(in srgb, var(--cyan) 16%, transparent),
        0 0 28px color-mix(in srgb, var(--cyan) 12%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.mission-control-page .metric-card::after,
.mission-control-page .dash-panel::after {
    content: "";
    position: absolute;
    top: 0;
    left: 18%;
    right: 18%;
    height: 1px;
    width: auto;
    border-radius: 0;
    background: linear-gradient(90deg, transparent, rgba(88, 229, 255, 0.42), transparent);
    opacity: 0.45;
}
.mission-control-page .metric-card {
    --tone: var(--cyan);
    min-height: 118px;
    padding: 14px 15px 12px;
    animation: card-arrive 520ms cubic-bezier(.2,.8,.2,1) both;
    animation-delay: calc(var(--i, 0) * 45ms);
}
.mission-control-page .metric-card.tone-cyan { --tone: var(--cyan); }
.mission-control-page .metric-card.tone-green { --tone: var(--green); }
.mission-control-page .metric-card.tone-violet { --tone: var(--violet); }
.mission-control-page .metric-card.tone-amber { --tone: var(--amber); }
.mission-control-page .metric-card.tone-red { --tone: var(--red); }
.mission-control-page .metric-card:hover,
.mission-control-page .dash-panel:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--cyan) 42%, var(--dash-line));
    box-shadow:
        0 22px 48px var(--dash-shadow),
        0 0 0 1px color-mix(in srgb, var(--cyan) 18%, transparent),
        0 0 36px color-mix(in srgb, var(--cyan) 10%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.mission-control-page .metric-card-top,
.mission-control-page .metric-value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mission-control-page .metric-card-top > span {
    color: var(--mc-muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.mission-control-page .metric-card-top > i {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--tone) 24%, transparent);
    border-radius: 4px;
    color: var(--tone);
    background: color-mix(in srgb, var(--tone) 7%, transparent);
    font-size: 14px;
}
.mission-control-page .metric-value-row { align-items: flex-end; margin: 12px 0 6px; }
.mission-control-page .metric-card strong {
    font-size: 28px;
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 620;
    color: var(--dash-text);
}
.mission-control-page .metric-card > small {
    display: block;
    color: var(--mc-muted);
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
}
.mission-control-page .metric-card > small a { color: inherit; text-decoration: none; }
.mission-control-page .metric-card > small a:hover { color: var(--dash-text); }
.mission-control-page .js-spark { width: 92px; height: 32px; overflow: hidden; color: var(--tone); }
.mission-control-page .spark-path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-dasharray: 150;
    stroke-dashoffset: 150;
    animation: draw-line 1.2s ease forwards;
    animation-delay: calc(var(--i, 0) * 45ms + 300ms);
}

.mission-control-page .primary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(290px, 0.72fr);
    gap: 12px;
    margin: 12px 0 0;
}
.mission-control-page .dash-panel {
    padding: 14px 15px 12px;
    animation: card-arrive 640ms cubic-bezier(.2,.8,.2,1) both;
    animation-delay: calc(var(--i, 0) * 45ms);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.mission-control-page .panel-heading {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.mission-control-page .panel-kicker {
    color: var(--cyan);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 7px;
    letter-spacing: 0.16em;
}
.mission-control-page .panel-heading h2 {
    margin: 4px 0 0;
    font-size: 14px;
    letter-spacing: -0.02em;
    font-weight: 650;
    color: var(--dash-text);
}
.mission-control-page .panel-heading > a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--cyan);
    font-size: 8px;
}
.mission-control-page .range-switch {
    display: flex;
    padding: 3px;
    border: 1px solid var(--dash-line);
    border-radius: 4px;
    background: var(--dash-panel-soft);
    gap: 0;
}
.mission-control-page .range-switch button {
    min-width: 38px;
    height: 25px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    color: var(--dash-faint);
    background: transparent;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 7px;
}
.mission-control-page .range-switch button.active {
    color: #07111a;
    background: var(--cyan);
    box-shadow: 0 0 13px rgba(88, 229, 255, 0.24);
}
.mission-control-page .chart-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 8px 0 0;
}
.mission-control-page .chart-summary > div:not(.chart-legend) { display: grid; gap: 2px; }
.mission-control-page .chart-summary strong { font-size: 17px; font-weight: 620; color: var(--dash-text); }
.mission-control-page .chart-summary span { color: var(--dash-muted); font-size: 8px; }
.mission-control-page .chart-legend { display: flex; gap: 14px; margin-left: auto; font-size: inherit; color: inherit; }
.mission-control-page .chart-legend span { display: flex; align-items: center; gap: 6px; }
.mission-control-page .chart-legend i { display: inline-block; width: 14px; height: 2px; margin-right: 0; }
.mission-control-page .chart-legend .cyan { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.mission-control-page .chart-legend .violet { background: var(--violet); box-shadow: 0 0 6px var(--violet); }
.mission-control-page .service-chart { margin: 6px -1px 0; }
.mission-control-page .service-chart svg { width: 100%; height: 168px; overflow: visible; }
.mission-control-page .chart-grid-line {
    stroke: var(--dash-line);
    stroke-width: 0.8;
    stroke-dasharray: 2 5;
}
.mission-control-page .chart-area-primary { fill: url(#serviceArea); }
.mission-control-page .chart-area-secondary { fill: url(#violetArea); }
.mission-control-page .chart-line {
    fill: none;
    stroke-linecap: round;
    stroke-width: 2;
    stroke-dasharray: 850;
    stroke-dashoffset: 850;
    animation: chart-draw 1.55s cubic-bezier(.2,.7,.2,1) forwards;
}
.mission-control-page .chart-line-primary {
    stroke: var(--cyan);
    filter: drop-shadow(0 0 4px rgba(88, 229, 255, 0.7));
}
.mission-control-page .chart-line-secondary {
    stroke: var(--violet);
    stroke-width: 1.5;
    opacity: 0.8;
    animation-delay: 140ms;
}
.mission-control-page .chart-area { opacity: 0; animation: area-rise 900ms ease 450ms forwards; }
.mission-control-page .chart-beacon {
    fill: var(--cyan);
    stroke: color-mix(in srgb, var(--cyan) 20%, transparent);
    stroke-width: 12;
    animation: beacon-pulse 1.8s ease-in-out infinite;
}
.mission-control-page .chart-labels {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    padding: 4px 8px 0 10px;
    color: var(--dash-faint);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 7px;
}
.mission-control-page .chart-labels span {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
.mission-control-page .chart-labels span[aria-hidden="true"] { visibility: hidden; }

.mission-control-page .sla-panel { min-height: 0; }
.mission-control-page .sla-orbit {
    position: relative;
    width: 148px;
    height: 148px;
    display: grid;
    place-items: center;
    margin: 4px auto 8px;
}
.mission-control-page .sla-orbit svg {
    position: absolute;
    inset: 4px;
    width: 140px;
    height: 140px;
    transform: rotate(-90deg);
}
.mission-control-page .sla-track,
.mission-control-page .sla-inner-track {
    fill: none;
    stroke: var(--dash-line);
    stroke-width: 6;
}
.mission-control-page .sla-inner-track { stroke-width: 1; stroke-dasharray: 2 5; }
.mission-control-page .sla-progress {
    fill: none;
    stroke: var(--cyan);
    stroke-width: 7;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(88, 229, 255, 0.55));
    animation: gauge-in 1.4s cubic-bezier(.2,.8,.2,1) forwards;
    transform: none;
}
.mission-control-page .sla-progress--violet { stroke: var(--violet); }
.mission-control-page .sla-orbit > div {
    position: relative;
    z-index: 2;
    display: grid;
    place-content: unset;
    inset: auto;
    gap: 5px;
    text-align: center;
}
.mission-control-page .sla-orbit strong { font-size: 30px; line-height: 1; letter-spacing: -0.06em; font-weight: 600; color: var(--dash-text); }
.mission-control-page .sla-orbit span {
    color: var(--dash-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 7px;
    letter-spacing: 0.14em;
}
.mission-control-page .orbit-node {
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    animation: rotate-orbit 7s linear infinite;
}
.mission-control-page .orbit-node::after {
    content: "";
    position: absolute;
    top: 15px;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
}
.mission-control-page .sla-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.mission-control-page .sla-stats > div {
    display: grid;
    gap: 5px;
    padding: 9px;
    border: 1px solid var(--dash-line);
    border-radius: 4px;
    background: var(--dash-panel-soft);
}
.mission-control-page .sla-stats span { color: var(--dash-faint); font-size: 7px; }
.mission-control-page .sla-stats strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.mission-control-page .amber-text { color: var(--amber); }
.mission-control-page .red-text { color: var(--red); }
.mission-control-page .sla-note {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    color: var(--green);
    font-size: 8px;
}

.mission-control-page .operations-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
    gap: 12px;
    margin-top: 12px;
}
.mission-control-page .attention-list { display: grid; gap: 6px; margin-top: 4px; }
.mission-control-page .attention-item {
    position: relative;
    min-height: 59px;
    display: grid;
    grid-template-columns: 28px 8px 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--dash-line);
    border-radius: 4px;
    color: var(--dash-text);
    background: var(--dash-panel-soft);
    text-align: left;
    box-shadow: none;
    text-decoration: none;
}
.mission-control-page .attention-item:hover {
    background: var(--dash-surface-2);
    border-color: var(--dash-line-strong);
    transform: translateX(2px);
}
.mission-control-page .attention-index {
    color: var(--dash-faint);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 8px;
}
.mission-control-page .attention-pulse {
    width: 6px;
    height: 27px;
    border-radius: 999px;
    background: var(--red);
    box-shadow: 0 0 11px rgba(255, 111, 125, 0.3);
}
.mission-control-page .attention-item.warning .attention-pulse { background: var(--amber); box-shadow: 0 0 11px rgba(255, 189, 99, 0.3); }
.mission-control-page .attention-item.critical .attention-pulse { background: var(--red); }
.mission-control-page .attention-item > div { display: grid; gap: 5px; }
.mission-control-page .attention-item strong { font-size: 10px; font-weight: 600; }
.mission-control-page .attention-item div span { color: var(--dash-muted); font-size: 8px; }
.mission-control-page .attention-item time {
    color: var(--dash-faint);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 8px;
}

.mission-control-page .draft-badge,
.mission-control-page .project-status {
    padding: 4px 8px;
    border: 1px solid rgba(157, 124, 255, 0.24);
    border-radius: 999px;
    color: var(--violet);
    background: rgba(157, 124, 255, 0.07);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 7px;
    letter-spacing: 0.1em;
}
.mission-control-page .capacity-main {
    display: grid;
    grid-template-columns: 130px 1fr;
    align-items: center;
    gap: 16px;
    margin-top: 13px;
}
.mission-control-page .capacity-ring { position: relative; width: 130px; height: 130px; display: grid; place-items: center; }
.mission-control-page .capacity-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.mission-control-page .capacity-track,
.mission-control-page .capacity-progress { fill: none; stroke: var(--dash-line); stroke-width: 7; }
.mission-control-page .capacity-progress {
    stroke: var(--violet);
    stroke-linecap: round;
    filter: drop-shadow(0 0 5px rgba(157, 124, 255, 0.55));
    animation: gauge-in 1.35s ease forwards;
    transform: none;
}
.mission-control-page .capacity-ring > div { position: relative; inset: auto; display: grid; place-content: unset; text-align: center; }
.mission-control-page .capacity-ring strong { font-size: 23px; line-height: 1; font-weight: 600; color: var(--dash-text); }
.mission-control-page .capacity-ring span { margin-top: 3px; color: var(--dash-muted); font-size: 8px; }
.mission-control-page .capacity-copy { display: grid; gap: 7px; }
.mission-control-page .capacity-copy > span {
    color: var(--dash-faint);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 7px;
    letter-spacing: 0.12em;
}
.mission-control-page .capacity-copy > strong { font-size: 16px; font-weight: 600; }
.mission-control-page .capacity-bar {
    height: 3px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--dash-line);
    margin: 0;
}
.mission-control-page .capacity-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    box-shadow: 0 0 7px var(--violet);
    animation: bar-grow 1.2s ease forwards;
}
.mission-control-page .capacity-copy small { color: var(--dash-muted); font-size: 8px; }
.mission-control-page .panel-action {
    width: 100%;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 0 12px;
    border: 1px solid var(--dash-line);
    border-radius: 4px;
    color: var(--cyan);
    background: var(--dash-panel-soft);
    font-size: 8px;
    text-decoration: none;
}

.mission-control-page .pipeline-panel { margin-top: 12px; padding-bottom: 16px; }
.mission-control-page .pipeline-filters { display: flex; gap: 6px; }
.mission-control-page .pipeline-filters select {
    min-width: 82px;
    height: 25px;
    border: 1px solid var(--dash-line);
    border-radius: 3px;
    background: var(--dash-panel-soft);
    color: var(--dash-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 7px;
    padding: 0 8px;
}
.mission-control-page .pipeline-rail {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin: 28px 2px 20px;
    overflow: visible;
    padding: 0;
}
.mission-control-page .pipeline-line {
    position: absolute;
    top: 13px;
    left: 8.4%;
    right: 8.4%;
    height: 1px;
    background: linear-gradient(90deg, var(--cyan), var(--violet) 74%, var(--green));
    opacity: 0.35;
}
.mission-control-page .pipeline-stage {
    --stage-color: var(--cyan);
    position: relative;
    display: grid;
    grid-template-columns: 28px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 4px 10px;
    min-width: 0;
    min-height: 74px;
    padding: 0 10px 0 0;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--dash-text);
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.mission-control-page .pipeline-stage > i {
    position: relative;
    z-index: 2;
    grid-row: 1 / 3;
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    margin: 0;
    border: 1px solid color-mix(in srgb, var(--stage-color) 50%, transparent);
    border-radius: 50%;
    background: var(--dash-bg);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--stage-color) 4%, transparent);
}
.mission-control-page .pipeline-stage > i span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--stage-color);
    box-shadow: 0 0 8px var(--stage-color);
}
.mission-control-page .pipeline-stage small {
    align-self: end;
    color: var(--dash-faint);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 7px;
}
.mission-control-page .pipeline-stage strong { align-self: end; font-size: 22px; line-height: 0.8; font-weight: 600; }
.mission-control-page .pipeline-stage > span { grid-column: 2; color: var(--dash-muted); font-size: 8px; }
.mission-control-page .pipeline-stage:hover,
.mission-control-page .pipeline-stage.active {
    color: var(--dash-text);
    border-color: color-mix(in srgb, var(--stage-color) 22%, transparent);
    background: color-mix(in srgb, var(--stage-color) 5%, transparent);
    transform: translateY(-2px);
}
.mission-control-page .pipeline-insight {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--dash-line);
    border-radius: 4px;
    color: var(--dash-muted);
    background: var(--dash-panel-soft);
    font-size: 8px;
}
.mission-control-page .pipeline-insight a { color: var(--cyan); }

.mission-control-page .workstreams-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0 0;
}
.mission-control-page .workstream-card {
    --workstream-tone: var(--cyan);
    position: relative;
    overflow: hidden;
    padding: 17px;
    border: 1px solid var(--dash-line);
    border-radius: 6px;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--workstream-tone) 9%, transparent), transparent 42%),
        var(--dash-surface);
    box-shadow: 0 18px 48px var(--dash-shadow);
}
.mission-control-page .workstream-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--workstream-tone), transparent);
    opacity: 0.7;
}
.mission-control-page .workstream-violet { --workstream-tone: var(--violet); }
.mission-control-page .workstream-amber { --workstream-tone: var(--amber); }
.mission-control-page .workstream-green { --workstream-tone: var(--green); }
.mission-control-page .workstream-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}
.mission-control-page .workstream-heading > div { display: flex; align-items: center; gap: 9px; }
.mission-control-page .workstream-heading i { color: var(--workstream-tone); font-size: 15px; }
.mission-control-page .workstream-heading h2 { margin: 0; font-size: 12px; font-weight: 600; color: var(--dash-text); }
.mission-control-page .workstream-heading > span {
    padding: 3px 6px;
    border: 1px solid color-mix(in srgb, var(--workstream-tone) 24%, transparent);
    border-radius: 999px;
    color: var(--workstream-tone);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 6px;
    letter-spacing: 0.1em;
}
.mission-control-page .workstream-card dl { display: grid; gap: 0; margin: 15px 0 12px; grid-template-columns: 1fr; }
.mission-control-page .workstream-card dl > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 28px;
    border-bottom: 1px solid var(--dash-line);
}
.mission-control-page .workstream-card dl > div:last-child { border-bottom: 0; }
.mission-control-page .workstream-card dt { color: var(--dash-muted); font-size: 8px; }
.mission-control-page .workstream-card dd {
    margin: 0;
    color: var(--dash-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
    font-weight: 600;
}
.mission-control-page .workstream-card > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--workstream-tone);
    font-size: 8px;
    text-decoration: none;
}

.mission-control-page .project-panel { margin-top: 0; padding: 14px 15px 12px; }
.mission-control-page .project-panel > .panel-heading { padding: 0; }
.mission-control-page .project-table-wrap { margin-top: 8px; overflow-x: auto; }
.mission-control-page .project-table-wrap table { width: 100%; border-collapse: collapse; min-width: 640px; }
.mission-control-page .project-table-wrap th {
    padding: 6px 10px;
    border-top: 0;
    border-bottom: 1px solid var(--dash-line);
    color: var(--dash-faint);
    background: transparent;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 7px;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-align: left;
    text-transform: uppercase;
}
.mission-control-page .project-table-wrap th:first-child,
.mission-control-page .project-table-wrap td:first-child { padding-left: 2px; }
.mission-control-page .project-table-wrap td {
    padding: 8px 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--dash-line) 70%, transparent);
    color: var(--dash-muted);
    font-size: 12px;
}
.mission-control-page .project-table-wrap td:first-child { color: var(--dash-text); font-weight: 600; }
.mission-control-page .project-beacon {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 9px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
}
.mission-control-page .project-status { border-color: var(--dash-line); color: var(--dash-muted); letter-spacing: 0; text-transform: uppercase; }
.mission-control-page .project-status.healthy { border-color: rgba(127, 255, 193, 0.2); color: #55d99c; background: rgba(127, 255, 193, 0.06); }
.mission-control-page .project-status.attention { border-color: rgba(255, 189, 99, 0.24); color: #e7a743; background: rgba(255, 189, 99, 0.07); }

.mission-control-page .dash-panel .data-table,
.mission-control-page .dash-panel table.data-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}
.mission-control-page .dash-panel .data-table thead th,
.mission-control-page .dash-panel table.data-table thead th {
    padding: 6px 8px;
    color: var(--dash-faint);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 7px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--dash-line);
    background: transparent;
    font-weight: 650;
}
.mission-control-page .dash-panel .data-table tbody td,
.mission-control-page .dash-panel table.data-table tbody td {
    padding: 8px;
    border-bottom: 1px solid color-mix(in srgb, var(--dash-line) 65%, transparent);
    color: var(--dash-muted);
    font-size: 12px;
    vertical-align: middle;
    background: transparent;
}
.mission-control-page .dash-panel .data-table tbody tr:last-child td,
.mission-control-page .dash-panel table.data-table tbody tr:last-child td { border-bottom: 0; }
.mission-control-page .dash-panel .data-table a { color: var(--cyan); text-decoration: none; font-weight: 600; }
.mission-control-page .dash-panel .data-table a:hover { color: var(--dash-text); }
.mission-control-page .dash-panel > p {
    margin: 0 0 8px;
    color: var(--dash-muted);
    font-size: 12px;
}
.mission-control-page .dash-panel > ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}
.mission-control-page .dash-panel > ul li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--dash-line);
    border-radius: 5px;
    background: var(--dash-panel-soft);
    color: var(--dash-muted);
    font-size: 12px;
}
.mission-control-page .dash-panel > ul li a { color: var(--cyan); font-weight: 650; text-decoration: none; }
.mission-control-page .dash-panel > ul li::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px color-mix(in srgb, var(--cyan) 55%, transparent);
    flex: 0 0 auto;
}

.mission-control-page .mc-bar-row {
    display: grid;
    grid-template-columns: minmax(72px, 120px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 28px;
    margin: 0 0 8px;
}
.mission-control-page .mc-bar-row:last-child { margin-bottom: 0; }
.mission-control-page .mc-bar-row > span {
    color: var(--dash-muted);
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mission-control-page .mc-bar-row > strong,
.mission-control-page .mc-bar-row > a {
    color: var(--dash-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    min-width: 2.5rem;
    text-align: right;
}
.mission-control-page .mc-bar-row .capacity-bar {
    height: 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--dash-line) 80%, transparent);
    overflow: hidden;
}
.mission-control-page .mc-bar-row .capacity-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    box-shadow: 0 0 10px color-mix(in srgb, var(--cyan) 35%, transparent);
    animation: bar-grow 900ms cubic-bezier(.2,.8,.2,1) both;
}

.mission-control-page .no-results { min-height: 120px; display: grid; place-items: center; color: var(--dash-muted); }

@media (max-width: 1250px) {
    .mission-control-page .primary-grid,
    .mission-control-page .operations-grid { grid-template-columns: 1fr; }
    .mission-control-page .workstreams-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .mission-control-page .attention-item time { display: none; }
    .mission-control-page .dashboard-intro { align-items: flex-start; flex-direction: column; }
    .mc-command { align-items: flex-start; }
    .mc-hero { min-width: 0; flex: 1 1 140px; }
}
@media (max-width: 560px) {
    .mission-control-page .workstreams-grid { grid-template-columns: 1fr; }
    .mission-control-page .new-action {
        min-width: 44px;
        min-height: 44px;
        width: auto;
        padding: 0 12px;
        font-size: 13px;
    }
    .mission-control-page .new-action span { font-size: 16px; }
    .mission-control-page .capacity-main { grid-template-columns: 1fr; justify-items: center; }
}

.mission-control-page .metrics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@keyframes mc-orbit-spin { to { transform: rotate(360deg); } }
@keyframes mc-live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mc-accent) 55%, transparent); opacity: 1; }
    70% { box-shadow: 0 0 0 8px transparent; opacity: 0.72; }
}

.mc-sky {
    --mc-tick: rgba(11, 111, 134, .30);
    --mc-hud: rgba(24, 60, 92, .055);
    --mc-star: rgba(11, 111, 134, .42);
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
html[data-theme="dark"] .mc-sky {
    --mc-tick: rgba(88, 229, 255, .42);
    --mc-hud: rgba(122, 196, 232, .05);
    --mc-star: rgba(150, 225, 255, .85);
}
.mc-stars {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .72;
}
.mc-hud {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--mc-hud) 1px, transparent 1px),
        linear-gradient(90deg, var(--mc-hud) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at 50% 25%, #000 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 25%, #000 0%, transparent 80%);
}
.mc-ring {
    position: absolute;
    border: 1px solid var(--mc-accent-line);
    border-radius: 50%;
    animation: mc-orbit-spin 130s linear infinite;
}
.mc-ring--a { width: 720px; height: 720px; right: -280px; top: -180px; opacity: .35; }
.mc-ring--b {
    width: 420px; height: 420px; left: -180px; bottom: -80px;
    animation-duration: 190s; animation-direction: reverse; opacity: .28;
}

.mc-command {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    min-width: 0;
}
.mc-command-copy { flex: 1 1 240px; min-width: 0; }
.mc-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--mc-muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.mc-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--mc-accent);
    animation: mc-live-pulse 2.4s ease-out infinite;
}
.mc-command h1 {
    margin: 11px 0 7px;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1;
    font-weight: 620;
    color: var(--mc-ink);
}
.mc-command h1 em { font-style: normal; color: var(--mc-accent); }
.mc-command p { margin: 0; color: var(--mc-muted); font-size: 12px; }
.mc-hero {
    min-width: 132px;
    padding: 10px 14px;
    border: 1px solid var(--mc-line);
    border-radius: 10px;
    background: var(--mc-surface);
    box-shadow: var(--mc-shadow);
}
.mc-hero .cap {
    display: block;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mc-muted);
}
.mc-hero .fig { display: block; font-size: 28px; font-weight: 600; color: var(--mc-ink); line-height: 1.1; }
.mc-hero small { color: var(--mc-muted); font-size: 12px; }
.mc-hero.is-bad { border-color: var(--mc-bad); }
.mc-hero.is-warn { border-color: var(--mc-warn); }
.mc-actions { display: flex; align-items: center; gap: 14px; }
.mc-ghost {
    color: var(--mc-muted);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}
.mc-ghost:hover { color: var(--mc-accent); }

.mc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--mc-line);
    border-radius: 10px;
    background: var(--mc-surface);
    box-shadow: var(--mc-shadow);
    backdrop-filter: blur(14px);
    padding: 15px 16px 14px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    animation: mc-arrive .5s cubic-bezier(.2, .8, .2, 1) both;
    animation-delay: calc(var(--i, 0) * 45ms);
}
.mc-card::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-top: 1px solid var(--mc-tick);
    border-left: 1px solid var(--mc-tick);
    opacity: .5;
    pointer-events: none;
}
.mc-card::after {
    content: "";
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 1px;
    opacity: .55;
    background: linear-gradient(90deg, transparent, var(--mc-accent-line), transparent);
}
.mc-card:hover { border-color: var(--mc-line-strong); box-shadow: var(--mc-shadow-lift); transform: translateY(-2px); }
.mc-cell.is-hero .mc-card {
    border-color: var(--mc-accent-line);
    box-shadow: var(--mc-shadow), 0 0 0 1px var(--mc-accent-soft);
}
.mc-card.mc-alert { color: var(--mc-warn); }

.mc-card .c-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    min-height: 20px;
}
.mc-card .c-head h3 { margin: 0; font-size: 14px; font-weight: 650; color: var(--mc-ink); }
.mc-card .c-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: var(--body, 142px);
    font-variant-numeric: tabular-nums;
}
.mc-card .c-foot {
    margin-top: auto;
    padding-top: 10px;
    font-size: 12px;
    color: var(--mc-muted);
}
.mc-card .c-foot a { color: var(--mc-accent); text-decoration: none; font-weight: 650; }
.mc-card .c-foot a:hover { text-decoration: underline; }
.mc-card .badge {
    height: 22px;
    padding: 0 8px;
    border-radius: 99px;
    border: 1px solid var(--mc-line);
    background: var(--mc-surface-2);
    color: var(--mc-ink-2);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}
.mc-card .badge.is-warn { color: var(--mc-warn); border-color: var(--mc-warn); }
.orbit .c-body { align-items: center; justify-content: center; }
.orbit .orbit-cap { margin: 8px 0 0; font-size: 12px; color: var(--mc-muted); text-align: center; }

.mc-kpi { min-height: 126px; }
.mc-kpi .c-body { min-height: 46px; overflow: hidden; }
.mc-kpi .kpi-row {
    height: 46px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    margin: 0;
}
.mc-kpi .fig { font-size: 31px; line-height: 1; font-weight: 600; letter-spacing: -.035em; color: var(--mc-ink); font-variant-numeric: normal; flex: 0 1 auto; min-width: 0; }
.mc-kpi .spark {
    width: 92px;
    height: 32px;
    flex: 0 0 92px;
    display: block;
    overflow: hidden;
    color: var(--mc-accent);
    align-self: center;
}
.mc-kpi .spark-path { filter: none; }
.mc-kpi .spark-dot { fill: currentColor; }
.mc-kpi .foot .alarm,
.alarm { color: var(--mc-bad); font-weight: 500; }
a.mc-kpi { text-decoration: none; color: inherit; }

.mc-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.mc-card-head .k {
    display: block;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--mc-accent);
}
.mc-card-head h3 { margin: 4px 0 0; font-size: 14px; font-weight: 650; color: var(--mc-ink); }
.mc-head-actions { display: flex; align-items: center; gap: 10px; }
.mc-tbl-toggle {
    height: 26px;
    padding: 0 10px;
    border: 1px solid var(--mc-line);
    border-radius: 4px;
    background: var(--mc-surface-2);
    color: var(--mc-ink-2);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}
.mc-tbl-toggle[aria-expanded="true"] { border-color: var(--mc-accent-line); color: var(--mc-accent); }
.mc-tbl-wrap.hidden { display: none; }
.mc-tbl {
    width: 100%;
    border-collapse: collapse;
}
.mc-tbl th {
    padding: 6px 8px;
    color: var(--mc-muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-align: left;
    border-bottom: 1px solid var(--mc-line);
    font-weight: 650;
}
.mc-tbl td {
    padding: 8px;
    border-bottom: 1px solid var(--mc-line);
    color: var(--mc-ink-2);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.mc-tbl td:last-child, .mc-tbl th:last-child { text-align: right; }
.mc-tbl a { color: var(--mc-accent); text-decoration: none; font-weight: 600; }

.mc-bars { display: grid; gap: 8px; }
.mc-bar {
    display: grid;
    grid-template-columns: minmax(72px, 140px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 28px;
}
.mc-bar .nm { color: var(--mc-ink-2); font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-bar .track { height: 6px; border-radius: 99px; background: var(--mc-line); overflow: hidden; }
.mc-bar .fill {
    display: block; height: 100%; width: 0;
    border-radius: inherit;
    background: var(--mc-accent);
    animation: bar-grow .9s cubic-bezier(.2, .8, .2, 1) both;
}
.mc-bar .fill { width: var(--w, 0); }
.mc-bar .val { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; font-weight: 700; color: var(--mc-ink); font-variant-numeric: tabular-nums; min-width: 2.5rem; text-align: right; }
.mc-bar.is-good .fill { background: var(--mc-good); }
.mc-bar.is-warn .fill { background: var(--mc-warn); }
.mc-bar.is-bad .fill { background: var(--mc-bad); }
.mc-bar.is-accent .fill { background: var(--mc-accent); }
.mc-bar[data-step="1"] .fill { opacity: .32; }
.mc-bar[data-step="2"] .fill { opacity: .5; }
.mc-bar[data-step="3"] .fill { opacity: .68; }
.mc-bar[data-step="4"] .fill { opacity: .86; }
.mc-bar[data-step="5"] .fill { opacity: 1; }
.mc-legend { display: flex; gap: 14px; font-size: 12px; color: var(--mc-muted); margin: 0 0 8px; }
.mc-legend span { display: flex; align-items: center; gap: 6px; }
.mc-legend i { display: inline-block; width: 14px; height: 2px; }
.mc-legend .accent { background: var(--mc-accent); }
.mc-legend .muted { background: var(--mc-muted); }
.mc-line { width: 100%; min-height: 160px; }
.mc-backlog-plot {
    position: relative;
    width: 100%;
    min-height: 160px;
    cursor: crosshair;
}
.mc-backlog-plot svg { width: 100%; height: 160px; display: block; overflow: visible; }
.mc-backlog-guide {
    stroke: var(--mc-accent-line);
    stroke-width: 1;
    stroke-dasharray: 3 4;
    pointer-events: none;
}
.mc-backlog-dot {
    position: absolute;
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    border-radius: 50%;
    border: 2px solid var(--mc-surface);
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--mc-accent) 35%, transparent);
}
.mc-backlog-dot.is-opened { background: var(--mc-accent); }
.mc-backlog-dot.is-closed {
    background: var(--violet, #9d7cff);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--violet, #9d7cff) 35%, transparent);
}
.mc-backlog-tip {
    position: absolute;
    z-index: 3;
    min-width: 118px;
    padding: 8px 10px;
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--mc-surface) 94%, #000);
    box-shadow: var(--mc-shadow);
    color: var(--mc-ink);
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 14px));
    white-space: nowrap;
}
.mc-backlog-tip.is-low { transform: translate(-50%, 14px); }
.mc-backlog-tip em {
    display: block;
    font-style: normal;
    color: var(--mc-muted);
    font-size: 11px;
    margin-bottom: 4px;
}
.mc-backlog-tip span {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--mc-ink-2);
    line-height: 1.45;
}
.mc-backlog-tip span i {
    width: 10px;
    height: 2px;
    border-radius: 1px;
    display: inline-block;
}
.mc-backlog-tip span i.accent { background: var(--mc-accent); }
.mc-backlog-tip span i.muted { background: var(--violet, #9d7cff); }
.mc-backlog-tip b {
    color: var(--mc-ink);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    min-width: 1.25ch;
}
.mc-empty {
    flex: 1;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 9px;
    text-align: center;
    padding: 8px 0;
}
.mc-empty svg { width: 26px; height: 26px; color: var(--mc-muted); opacity: .55; }
.mc-empty p { margin: 0; font-size: 12.5px; color: var(--mc-muted); max-width: 24ch; line-height: 1.45; }
.mc-lead { color: var(--mc-muted); font-size: 12px; margin: 0 0 8px; }
.mc-lead b { color: var(--mc-ink); }
.mc-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.mc-list li {
    padding: 8px 10px;
    border: 1px solid var(--mc-line);
    border-radius: 5px;
    background: var(--mc-surface-2);
    color: var(--mc-muted);
    font-size: 12px;
}
.mc-list a { color: var(--mc-accent); font-weight: 650; text-decoration: none; }
.mc-dl { display: grid; gap: 0; margin: 0 0 12px; }
.mc-dl > div {
    display: flex; justify-content: space-between; align-items: center;
    min-height: 28px; border-bottom: 1px solid var(--mc-line);
}
.mc-dl dt { color: var(--mc-muted); font-size: 12px; }
.mc-dl dd { margin: 0; color: var(--mc-ink); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

.mc-page .sla-orbit strong { color: var(--mc-ink); }
.mc-page .sla-progress { stroke: var(--mc-accent); }
.mc-page .capacity-bar i {
    display: block; height: 100%; width: var(--w, 0);
    background: var(--mc-accent);
}
.mc-page .is-stale { opacity: .45; }

/* Restore mobile drawer + compact chrome. MC chrome rules above use higher
   specificity than app.css and otherwise leave a 252px hole + untappable nav. */
@media (max-width: 991.98px) {
    .app-shell {
        --sidebar-width: min(280px, 92vw);
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: none;
        overflow-x: hidden;
    }
    body.sidebar-collapsed .app-shell { --sidebar-width: min(280px, 92vw); }
    .app-shell .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 30;
        width: min(280px, 92vw);
        max-width: 280px;
        flex: 0 0 auto;
        flex-basis: auto;
        height: 100vh;
        height: 100dvh;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 8px 0 32px rgba(0, 0, 0, .35);
        padding-top: env(safe-area-inset-top, 0);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    body.sidebar-open .app-shell .sidebar { transform: translateX(0); }
    .app-shell .app-main {
        position: relative;
        z-index: 1;
        width: 100%;
        max-width: 100vw;
        flex: 1 1 100%;
        min-width: 0;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: none;
    }
    .app-shell .topbar {
        min-height: 52px;
        padding: 8px 12px;
        padding-left: max(12px, env(safe-area-inset-left, 0));
        padding-right: max(12px, env(safe-area-inset-right, 0));
        padding-top: max(8px, env(safe-area-inset-top, 0));
    }
    .app-shell .icon-button {
        width: 44px;
        height: 44px;
    }
    .app-shell .sync-state,
    .app-shell .topbar-search kbd {
        display: none !important;
    }
    body.sidebar-collapsed .app-shell .sidebar .brand {
        justify-content: flex-start;
        padding: 0 18px;
    }
    body.sidebar-collapsed .app-shell .sidebar .nav-link {
        grid-template-columns: 22px 1fr auto;
        justify-content: start;
        justify-items: start;
        padding: 10px 12px;
    }
    body.sidebar-collapsed .app-shell .sidebar-status { justify-content: flex-start; padding: 10px 12px; }
    body.sidebar-collapsed .app-shell .sidebar-status > div:last-child,
    body.sidebar-collapsed .app-shell .sidebar-logout span,
    body.sidebar-collapsed .app-shell .nav-badge { display: revert; }
}

@media (max-width: 760px) {
    .mc-command {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .mc-command-copy { flex: 1 1 auto; order: 1; width: 100%; }
    .mc-actions { order: 2; }
    .mc-hero { order: 3; }
    .mc-command h1 { font-size: clamp(24px, 7vw, 30px); }
    .mc-hero {
        min-width: 0;
        width: 100%;
        flex: 1 1 auto;
    }
    .mc-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }
    .mission-control-page .create-new-menu {
        right: 0;
        left: auto;
        min-width: 160px;
    }
    .mission-control-page .create-new-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 10px 12px;
    }
    .mc-kpi .kpi-row {
        height: auto;
        min-height: 46px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .mc-kpi .fig { font-size: clamp(24px, 8vw, 31px); }
    .mc-kpi .spark,
    .mission-control-page .js-spark {
        width: 84px;
        height: 28px;
        flex: 0 0 84px;
    }
    .mc-bar,
    .mission-control-page .mc-bar-row {
        grid-template-columns: minmax(52px, 28%) minmax(0, 1fr) auto;
        gap: 8px;
    }
    .mission-control-page .chart-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .mission-control-page .chart-legend { margin-left: 0; }
    .mission-control-page .range-switch button,
    .mission-control-page .pipeline-filters select,
    .mc-tbl-toggle {
        min-height: 44px;
        height: auto;
        padding: 0 12px;
        font-size: 12px;
        letter-spacing: .04em;
    }
    .mission-control-page .pipeline-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 12px;
        margin: 16px 0 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .mission-control-page .pipeline-line { display: none; }
    .mission-control-page .pipeline-stage {
        font-size: 12px;
    }
    .mc-tbl-wrap,
    .mc-card .c-body:has(> .mc-tbl),
    .project-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    .mc-tbl { min-width: 420px; }
    .mc-backlog-plot { cursor: default; }
    .mc-backlog-tip {
        min-width: 0;
        max-width: min(220px, 70vw);
        white-space: normal;
    }
    .mc-ring--a,
    .mc-ring--b { opacity: .18; }
}

@media (max-width: 560px) {
    .mission-control-page .pipeline-rail {
        grid-template-columns: 1fr;
    }
    .mc-kpi .spark {
        display: none;
    }
    .mc-actions .new-action {
        min-width: 44px;
        min-height: 44px;
        width: auto;
        padding: 0 12px;
        font-size: 13px;
    }
    .mc-actions .new-action span { font-size: 16px; }
    .mc-card { padding: 13px 12px 12px; }
    .mc-dl { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .mc *, .mc *::before, .mc *::after,
    .mc-sky *, .mc-sky *::before, .mc-sky *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .mc-stars { display: none; }
}
