html, body {
    margin: 0;
    min-height: 100%;
    background: #060606;
    color: #f3f3f3;
    font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
}

body {
    background-image:
        radial-gradient(circle at top right, rgba(255,255,255,0.035), transparent 30%),
        radial-gradient(circle at top left, rgba(255,255,255,0.025), transparent 24%),
        linear-gradient(180deg, #090909 0%, #050505 100%);
}

a, .btn-link {
    color: #d7d7d7;
}

.topbar-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem 0.8rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(6, 6, 6, 0.78);
}

.brand-link {
    text-decoration: none;
    color: #f5f5f5;
    font-family: Consolas, "SFMono-Regular", "Liberation Mono", Menlo, monospace;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.brand-cursor {
    display: inline-block;
    width: 0.68rem;
    height: 1.1rem;
    margin-left: 0.18rem;
    transform: translateY(0.12rem);
    background: #f2f2f2;
    animation: blink-cursor 1s steps(1) infinite;
}

@keyframes blink-cursor {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.topbar-actions {
    display: flex;
    gap: 0.55rem;
}

.topbar-action,
.nav-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.52rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.025);
    color: #d9d9d9;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 10px 30px rgba(0,0,0,0.18);
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, color 120ms ease;
    font-size: 0.8rem;
}

.topbar-action:hover,
.nav-chip:hover,
.nav-chip.active {
    color: #ffffff;
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.14);
    transform: translateY(-1px);
}

.floating-nav-shell {
    padding: 0 1.5rem;
}

.nav-chip-stack {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.25rem 0 1rem 0;
}

.layout-main-shell {
    padding: 0 1.5rem 2rem 1.5rem;
}

.dashboard-page-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-loading,
.dashboard-alert-shell {
    border-radius: 24px;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #d8d8d8;
}

.dashboard-alert-shell.danger {
    border-color: rgba(255,255,255,0.12);
    color: #ffffff;
}

.hero-panel-shell,
.panel-shell {
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(24,24,24,0.88), rgba(10,10,10,0.88));
    box-shadow: 0 20px 80px rgba(0,0,0,0.28);
}

.hero-panel-shell {
    display: grid;
    gap: 1rem;
    padding: 1.4rem 1.4rem 1.2rem 1.4rem;
}

.hero-panel-soft {
    grid-template-columns: minmax(0, 1fr) auto;
}

.hero-panel-grid-shell {
    grid-template-columns: minmax(0, 1fr) auto;
}

.eyebrow-shell,
.panel-kicker-shell,
.hero-meta-label,
.telemetry-label-shell {
    color: #8c8c8c;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-title-shell {
    margin: 0.55rem 0 0.35rem 0;
    font-size: clamp(1.9rem, 3vw, 3.2rem);
    line-height: 1;
    color: #fafafa;
    font-weight: 600;
}

.hero-copy-shell,
.panel-shell p {
    margin: 0;
    color: #a6a6a6;
    line-height: 1.55;
}

.hero-meta-shell,
.hero-telemetry-shell {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.hero-meta-value,
.telemetry-value-shell {
    margin-top: 0.35rem;
    font-family: Consolas, "SFMono-Regular", "Liberation Mono", Menlo, monospace;
    color: #f1f1f1;
}

.telemetry-chip-shell {
    min-width: 9rem;
    padding: 0.85rem 1rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.console-grid-shell,
.launchpad-grid-shell {
    display: grid;
    gap: 1rem;
}

.console-grid-shell {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.project-panel-shell { grid-column: span 6; }
.health-panel-shell { grid-column: span 3; }
.cost-panel-shell { grid-column: span 3; }
.subagent-panel-shell { grid-column: span 12; }

.launchpad-grid-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-shell {
    padding: 1.2rem;
}

.panel-shell h2 {
    margin: 0.45rem 0 0.8rem 0;
    font-size: 1.35rem;
    color: #f7f7f7;
}

.panel-row-shell,
.metric-line-shell {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #cfcfcf;
    padding: 0.32rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 0.28rem;
}

.panel-row-shell strong,
.metric-line-shell {
    font-weight: 500;
}

.panel-spotlight-shell {
    min-height: 20rem;
}

@media (max-width: 991.98px) {
    .launchpad-grid-shell,
    .hero-panel-soft,
    .hero-panel-grid-shell {
        grid-template-columns: 1fr;
    }

    .console-grid-shell {
        grid-template-columns: 1fr;
    }

    .project-panel-shell,
    .health-panel-shell,
    .cost-panel-shell,
    .subagent-panel-shell {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .topbar-shell,
    .floating-nav-shell,
    .layout-main-shell {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .topbar-shell {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.8rem;
    }

    .topbar-actions,
    .nav-chip-stack {
        width: 100%;
        flex-wrap: wrap;
    }

    .topbar-action,
    .nav-chip {
        flex: 1 1 auto;
    }
}

h1:focus {
    outline: none;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #000, 0 0 0 0.25rem rgba(255,255,255,0.15);
}

#blazor-error-ui {
    background: #181818;
    color: #fff;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
}

code {
    color: #d6d6d6;
}
