:root {
    color-scheme: light;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #1f2a24;
    background: #f3efe5;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 10%, rgba(215, 231, 206, 0.9), transparent 32rem),
        radial-gradient(circle at 92% 4%, rgba(241, 211, 176, 0.58), transparent 30rem),
        #f3efe5;
}

button,
a {
    font: inherit;
}

.site-shell {
    width: min(1180px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.site-header,
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header {
    min-height: 88px;
    border-bottom: 1px solid rgba(31, 42, 36, 0.14);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #1f2a24;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #f8f6ef;
    background: #264c3b;
    border-radius: 10px 10px 10px 3px;
}

.environment-label,
.eyebrow,
.panel-kicker {
    color: #627065;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

main {
    flex: 1;
}

.hero {
    min-height: 590px;
    padding: 82px 0 68px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    gap: clamp(48px, 8vw, 110px);
    align-items: center;
}

.hero h1 {
    max-width: 720px;
    margin: 18px 0 24px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: clamp(3rem, 6vw, 5.6rem);
    font-weight: 800;
    letter-spacing: -0.065em;
    line-height: 0.98;
}

.hero h1:focus {
    outline: none;
}

.hero-description {
    max-width: 620px;
    margin: 0 0 32px;
    color: #536057;
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.75;
}

.refresh-button {
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    color: #f8f6ef;
    background: #264c3b;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(38, 76, 59, 0.2);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.refresh-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(38, 76, 59, 0.25);
}

.refresh-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.status-panel {
    padding: 30px;
    border: 1px solid rgba(38, 76, 59, 0.14);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 28px 70px rgba(54, 64, 56, 0.12);
    backdrop-filter: blur(18px);
}

.status-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(31, 42, 36, 0.12);
}

.panel-kicker {
    margin: 0 0 9px;
}

.status-heading h2 {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.overall-indicator {
    width: 16px;
    height: 16px;
    margin-top: 8px;
    border-radius: 50%;
    background: #b8b5ab;
    box-shadow: 0 0 0 7px rgba(184, 181, 171, 0.18);
}

.overall-indicator.healthy,
.status-dot.healthy {
    background: #3b8c64;
}

.overall-indicator.healthy {
    box-shadow: 0 0 0 7px rgba(59, 140, 100, 0.16);
}

.overall-indicator.unhealthy,
.status-dot.unhealthy {
    background: #c7674f;
}

.overall-indicator.unhealthy {
    box-shadow: 0 0 0 7px rgba(199, 103, 79, 0.16);
}

.overall-indicator.checking {
    animation: pulse 1.4s ease-in-out infinite;
}

.status-list {
    padding: 12px 0 2px;
}

.status-row {
    min-height: 66px;
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 14px;
    align-items: center;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.status-row div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.status-row strong {
    font-size: 0.95rem;
}

.status-row span:last-child {
    color: #6c756e;
    font-size: 0.86rem;
    text-align: right;
}

.status-loading {
    min-height: 212px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6c756e;
    text-align: center;
}

.status-loading strong {
    color: #263c31;
    font-size: 1rem;
}

.status-loading span {
    max-width: 32ch;
    font-size: 0.86rem;
    line-height: 1.55;
}

.checked-at {
    margin: 18px 0 0;
    color: #858b86;
    font-size: 0.76rem;
    text-align: right;
}

.foundation-grid {
    padding: 34px 0 72px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid rgba(31, 42, 36, 0.14);
}

.foundation-grid article {
    padding: 12px 34px 12px 0;
}

.foundation-grid article + article {
    padding-left: 34px;
    border-left: 1px solid rgba(31, 42, 36, 0.12);
}

.feature-number {
    color: #8b927f;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
}

.foundation-grid h2 {
    margin: 18px 0 10px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 1.18rem;
}

.foundation-grid p {
    margin: 0;
    color: #687169;
    line-height: 1.65;
}

.site-footer {
    min-height: 72px;
    color: #7a817b;
    border-top: 1px solid rgba(31, 42, 36, 0.14);
    font-size: 0.78rem;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    inset: auto 18px 18px 18px;
    z-index: 1000;
    padding: 14px 48px 14px 18px;
    color: #fff;
    background: #8d3e32;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

#blazor-error-ui .reload {
    color: inherit;
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: 16px;
    cursor: pointer;
}

.loading-progress {
    position: absolute;
    width: 7rem;
    height: 7rem;
    inset: 28vh 0 auto;
    margin: auto;
}

.loading-progress circle {
    fill: none;
    stroke: rgba(38, 76, 59, 0.14);
    stroke-width: 0.55rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #264c3b;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
}

.loading-progress-text {
    position: absolute;
    inset: calc(28vh + 2.85rem) 0 auto;
    color: #536057;
    text-align: center;
    font-weight: 700;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Loading");
}

@keyframes pulse {
    50% { opacity: 0.35; }
}

.auth-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 48px;
    align-items: center;
    margin: 10px 0 64px;
    padding: 36px;
    border: 1px solid rgba(31, 42, 36, 0.12);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.68);
}

.auth-panel h2 {
    margin: 6px 0 10px;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.auth-panel p {
    color: #536057;
}

.auth-form {
    display: grid;
    gap: 10px;
}

.auth-form label {
    margin-top: 4px;
    color: #34473c;
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-form input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(31, 42, 36, 0.2);
    border-radius: 12px;
    background: #fff;
    color: #1f2a24;
    font: inherit;
}

.auth-form input:focus {
    border-color: #264c3b;
    outline: 3px solid rgba(38, 76, 59, 0.12);
}

.otp-input {
    letter-spacing: 0.22em;
    font-weight: 800;
}

.text-button {
    border: 0;
    background: transparent;
    color: #264c3b;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.auth-message {
    margin: 4px 0 0;
    font-size: 0.9rem;
}

.auth-message.error { color: #9f332b; }
.auth-message.success { color: #26613f; }

@media (max-width: 820px) {
    .site-shell {
        width: min(100% - 28px, 680px);
    }

    .hero {
        min-height: auto;
        padding: 56px 0;
        grid-template-columns: 1fr;
        gap: 46px;
    }

    .hero h1 {
        font-size: clamp(3rem, 13vw, 4.8rem);
    }

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

    .auth-panel {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 28px 22px;
    }

    .foundation-grid article,
    .foundation-grid article + article {
        padding: 26px 0;
        border-left: 0;
        border-top: 1px solid rgba(31, 42, 36, 0.1);
    }

    .foundation-grid article:first-child {
        border-top: 0;
    }
}

@media (max-width: 520px) {
    .environment-label,
    .site-footer span:last-child {
        display: none;
    }

    .status-panel {
        padding: 24px 20px;
        border-radius: 22px;
    }

    .status-row div {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .status-row span:last-child {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
