:root {
    --surface: #f8fafc;
    --surface-strong: #ffffff;
    --ink: #0f172a;
    --muted: #475569;
    --line: rgba(15, 23, 42, 0.1);
    --brand: #2563eb;
    --brand-deep: #1e40af;
    --accent: #0f766e;
    --success: #15803d;
    --danger: #dc2626;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", Aptos, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 34%),
        radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.14), transparent 34%),
        var(--surface);
}

body {
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.admin-layout {
    min-height: 100vh;
}

.app-header {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.header-shell {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    height: 100%;
    min-height: 64px;
    padding: 0 1rem;
}

.brand-block {
    display: flex;
    flex-direction: column;
    margin-right: auto;
}

.brand-block strong {
    font-size: 1.05rem;
}

.brand-caption,
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: var(--muted);
    margin: 0;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-user__meta {
    display: flex;
    flex-direction: column;
    text-align: right;
    line-height: 1.2;
}

.header-user__meta small {
    font-weight: 600;
    color: var(--ink);
}

.header-user__meta span {
    color: var(--muted);
    font-size: 0.85rem;
}

.app-sidebar {
    background: rgba(255, 255, 255, 0.78);
    border-right: 1px solid var(--line);
}

.nav-shell {
    padding: 1rem;
}

.nav-title {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 1rem;
}

.app-menu .rz-navigation-item-link {
    border-radius: 12px;
    margin-bottom: 0.25rem;
}

.app-menu .rz-navigation-item-link.rz-state-active {
    background: rgba(37, 99, 235, 0.14);
    color: var(--brand-deep);
}

.app-body {
    background: transparent;
}

.page-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem;
}

.hero-card,
.surface-card,
.metric-card,
.login-card,
.page-card {
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 36px rgba(15, 23, 42, 0.08);
}

.hero-card {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    padding: 1.4rem;
    margin-bottom: 1rem;
}

.hero-card h1,
.page-card h1,
.login-card h1 {
    margin: 0.35rem 0 0.75rem;
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    line-height: 1.08;
}

.hero-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.hero-highlight {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    background: rgba(248, 250, 252, 0.85);
}

.hero-highlight span,
.metric-card span,
.insight-item span {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
}

.hero-highlight strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.25rem;
}

.hero-aside {
    display: grid;
    gap: 0.9rem;
    align-content: center;
}

.hero-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.metric-card {
    padding: 1rem;
}

.metric-card strong {
    display: block;
    font-size: 1.7rem;
    margin: 0.3rem 0;
}

.accent-orange {
    border-top: 3px solid #ea580c;
}

.accent-blue {
    border-top: 3px solid var(--brand);
}

.accent-green {
    border-top: 3px solid var(--success);
}

.accent-purple {
    border-top: 3px solid #7c3aed;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1.15fr;
    gap: 0.85rem;
}

.side-stack {
    display: grid;
    gap: 0.85rem;
}

.surface-card,
.page-card,
.login-card {
    padding: 1.1rem;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.section-heading h2,
.section-heading h1 {
    margin: 0.2rem 0 0;
}

.signal-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
    line-height: 1.55;
}

.priority-list li + li {
    margin-top: 0.5rem;
}

.empty-state {
    padding: 1.2rem;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.85);
    border: 1px dashed rgba(15, 23, 42, 0.12);
}

.empty-state strong {
    display: block;
    margin-bottom: 0.35rem;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.status-good {
    color: #166534;
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.24);
}

.status-warn {
    color: #92400e;
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.26);
}

.status-alert {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.24);
}

.health-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 0.95rem;
}

.health-ring {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    font-weight: 700;
    border: 8px solid rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.health-copy {
    display: grid;
    gap: 0.35rem;
}

.health-copy strong {
    font-size: 1rem;
}

.health-copy small {
    color: var(--muted);
    line-height: 1.45;
}

.health-good {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(236, 253, 245, 0.95));
}

.health-good .health-ring {
    color: #166534;
    background: rgba(255, 255, 255, 0.8);
}

.health-warn {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(255, 251, 235, 0.96));
}

.health-warn .health-ring {
    color: #92400e;
    background: rgba(255, 255, 255, 0.82);
}

.health-alert {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(254, 242, 242, 0.96));
}

.health-alert .health-ring {
    color: #b91c1c;
    background: rgba(255, 255, 255, 0.82);
}

.health-neutral {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.2), rgba(248, 250, 252, 0.98));
}

.health-neutral .health-ring {
    color: #334155;
    background: rgba(255, 255, 255, 0.82);
}

.insight-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.insight-item {
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.insight-item strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.35rem;
}

.quick-actions {
    display: grid;
    gap: 0.75rem;
}

.quick-action {
    display: block;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.78);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.quick-action strong {
    display: block;
    margin-bottom: 0.25rem;
}

.quick-action small {
    color: var(--muted);
    line-height: 1.45;
}

.quick-action:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.08);
}

.login-card {
    width: min(100%, 460px);
}

.form-stack {
    display: grid;
    gap: 0.8rem;
}

.login-note {
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--brand-deep);
}

.rz-datatable,
.rz-data-grid {
    border-radius: 12px;
    overflow: hidden;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #94a3b8;
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fef9c3;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@media (max-width: 1024px) {
    .hero-card,
    .metric-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .hero-highlights,
    .insight-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-shell {
        padding: 0.85rem;
    }

    .header-shell {
        padding: 0 0.75rem;
    }

    .header-user__meta {
        display: none;
    }

    .health-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .health-ring {
        margin: 0 auto;
    }
}