:root {
    color-scheme: dark;
    --ci-ink: #071412;
    --ci-panel: #0c201d;
    --ci-panel-soft: #12302a;
    --ci-line: rgba(218, 239, 221, 0.16);
    --ci-text: #f5f8ef;
    --ci-muted: #a9bcb3;
    --ci-accent: #b8f071;
    --ci-gold: #e9c46a;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--ci-ink);
    color: var(--ci-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background:
        radial-gradient(circle at 82% 8%, rgba(71, 151, 115, 0.26), transparent 28rem),
        linear-gradient(150deg, #071412 0%, #091a17 58%, #06100f 100%);
}

.ci-shell {
    min-height: 100vh;
}

.ci-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 32px;
}

.ci-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    color: var(--ci-text);
    text-decoration: none;
}

.ci-brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(184, 240, 113, 0.5);
    border-radius: 12px;
    color: var(--ci-accent);
    font-weight: 800;
    letter-spacing: -0.04em;
}

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

.ci-brand strong {
    font-size: 0.98rem;
    letter-spacing: 0.02em;
}

.ci-brand small {
    margin-top: 3px;
    color: var(--ci-muted);
    font-size: 0.74rem;
}

.ci-environment,
.ci-updated {
    color: var(--ci-muted);
    font-size: 0.78rem;
}

.ci-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
    gap: 80px;
    align-items: center;
    max-width: 1180px;
    margin: 0 auto;
    padding: 96px 32px 112px;
}

.ci-kicker,
.ci-status-eyebrow {
    color: var(--ci-accent);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.ci-hero h1 {
    max-width: 760px;
    margin: 18px 0 24px;
    color: var(--ci-text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.6rem, 7vw, 6.6rem);
    font-weight: 500;
    letter-spacing: -0.065em;
    line-height: 0.91;
}

.ci-hero > div > p {
    max-width: 620px;
    margin: 0 0 34px;
    color: var(--ci-muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

.ci-hero .k-button-solid-primary {
    --kendo-color-primary: var(--ci-accent);
    --kendo-color-on-primary: #102217;
    border-radius: 999px;
    font-weight: 750;
}

.ci-action-confirmation {
    display: block;
    margin-top: 16px;
    color: var(--ci-accent);
    font-size: 0.82rem;
}

.ci-status-card,
.ci-grid-card,
.ci-capabilities article {
    border: 1px solid var(--ci-line);
    background: rgba(12, 32, 29, 0.82);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
}

.ci-status-card {
    padding: 34px;
    border-radius: 24px;
}

.ci-status-card > strong {
    display: block;
    margin: 9px 0 28px;
    color: var(--ci-text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.85rem;
    font-weight: 500;
}

.ci-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    border-top: 1px solid var(--ci-line);
    color: #dbe7df;
    font-size: 0.86rem;
}

.ci-status-row small {
    display: block;
    margin-top: 2px;
    color: var(--ci-muted);
}

.ci-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ca786b;
    box-shadow: 0 0 0 5px rgba(202, 120, 107, 0.1);
}

.ci-status-dot.is-healthy {
    background: var(--ci-accent);
    box-shadow: 0 0 0 5px rgba(184, 240, 113, 0.1);
}

.ci-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px 100px;
}

.ci-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 22px;
}

.ci-section-heading h2 {
    margin: 8px 0 0;
    color: var(--ci-text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.035em;
}

.ci-grid-card {
    overflow: hidden;
    padding: 8px;
    border-radius: 20px;
}

.ci-grid-card .k-grid {
    border: 0;
    border-radius: 14px;
}

.ci-capabilities {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 18px;
}

.ci-capabilities article {
    padding: 28px;
    border-radius: 18px;
}

.ci-capabilities article > span {
    color: var(--ci-gold);
    font-size: 0.75rem;
    font-weight: 800;
}

.ci-capabilities h3 {
    margin: 18px 0 10px;
    color: var(--ci-text);
    font-size: 1.05rem;
}

.ci-capabilities p {
    margin: 0;
    color: var(--ci-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

@media (max-width: 840px) {
    .ci-hero {
        grid-template-columns: 1fr;
        gap: 46px;
        padding-top: 60px;
    }

    .ci-capabilities {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .ci-header,
    .ci-hero,
    .ci-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .ci-environment,
    .ci-updated {
        display: none;
    }

    .ci-hero {
        padding-top: 42px;
    }

    .ci-hero h1 {
        font-size: 3.7rem;
    }
}

h1:focus {
    outline: none;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0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ODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Authenticated application shell */
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    background: #f3f6f2;
    color: #14211e;
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 28px 20px;
    background:
        radial-gradient(circle at 50% 0, rgba(90, 167, 128, .2), transparent 23rem),
        #071412;
    border-right: 1px solid rgba(218, 239, 221, .12);
}

.app-brand {
    padding: 0 8px 30px;
}

.app-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.app-nav-heading {
    margin: 24px 12px 7px;
    color: #78958a;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .17em;
}

.app-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 13px;
    border-radius: 10px;
    color: #b9cbc3;
    text-decoration: none;
    font-size: .9rem;
    transition: .15s ease;
}

.app-nav a:hover,
.app-nav a.active {
    color: #f5f8ef;
    background: rgba(184, 240, 113, .11);
}

.app-nav a.active {
    box-shadow: inset 3px 0 var(--ci-accent);
}

.sidebar-security {
    display: flex;
    gap: 11px;
    align-items: center;
    margin-top: auto;
    padding: 15px;
    border: 1px solid var(--ci-line);
    border-radius: 12px;
    color: #b9cbc3;
}

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

.sidebar-security strong {
    color: #e8f0eb;
    font-size: .78rem;
}

.sidebar-security small {
    margin-top: 2px;
    font-size: .68rem;
}

.app-main {
    min-width: 0;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 0 32px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid #dce4df;
    backdrop-filter: blur(16px);
}

.app-topbar > div:first-child strong {
    display: block;
    margin-top: 3px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
}

.app-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.app-user > span strong,
.app-user > span small {
    display: block;
}

.app-user > span strong {
    font-size: .82rem;
}

.app-user > span small {
    margin-top: 2px;
    color: #64766f;
    font-size: .7rem;
}

.app-user form {
    margin: 0 0 0 8px;
}

.user-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: #173d34;
    color: var(--ci-accent);
    font-size: .74rem;
    font-weight: 800;
}

.app-content {
    min-height: calc(100vh - 73px);
}

.dashboard-page {
    color: var(--ci-text);
    background:
        radial-gradient(circle at 82% 8%, rgba(71, 151, 115, .26), transparent 28rem),
        linear-gradient(150deg, #071412 0%, #091a17 58%, #06100f 100%);
}

.dashboard-page .ci-hero {
    padding-top: 76px;
}

/* Login and registration */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1.05fr) minmax(480px, .95fr);
    background: #f2f5f2;
}

.auth-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 52px clamp(42px, 7vw, 110px);
    color: var(--ci-text);
    background:
        linear-gradient(150deg, rgba(7, 20, 18, .4), rgba(7, 20, 18, .9)),
        radial-gradient(circle at 75% 22%, rgba(108, 190, 143, .35), transparent 24rem),
        #071412;
}

.auth-brand {
    align-self: flex-start;
}

.auth-promise {
    max-width: 640px;
}

.auth-promise h1 {
    margin: 18px 0 25px;
    color: #f5f8ef;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.4rem, 6vw, 6.2rem);
    font-weight: 500;
    letter-spacing: -.06em;
    line-height: .93;
}

.auth-promise p {
    max-width: 510px;
    color: #aec0b8;
    font-size: 1.05rem;
    line-height: 1.65;
}

.auth-security {
    max-width: 500px;
    color: #82988e;
    line-height: 1.5;
}

.auth-form-panel {
    display: grid;
    place-items: center;
    padding: 42px;
}

.auth-card {
    width: min(100%, 440px);
    padding: 46px;
    border: 1px solid #dde6df;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 70px rgba(17, 47, 38, .1);
    color: #14211e;
}

.auth-card h1,
.auth-card h2 {
    margin: 10px 0 9px;
    color: #10251f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.35rem;
    font-weight: 500;
}

.ci-muted {
    color: #64766f;
}

.auth-card > p {
    margin: 0 0 27px;
    line-height: 1.55;
}

.sso-button {
    margin-top: 2px;
    width: 100%;
}

.auth-submit {
    width: 100%;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 24px 0;
    color: #7b8984;
    font-size: .72rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #dde4e0;
}

.auth-form,
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form label,
.admin-form label {
    margin-top: 6px;
    color: #2c3f38;
    font-size: .78rem;
    font-weight: 750;
}

.auth-form .k-input {
    width: 100%;
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 24px;
    color: #6b7d76;
    font-size: .76rem;
}

.auth-links a,
.auth-back {
    color: #286a57;
    font-weight: 700;
    text-decoration: none;
}

.auth-alert,
.success-alert {
    margin: 15px 0;
    padding: 12px 14px;
    border: 1px solid #e9b3ad;
    border-radius: 9px;
    background: #fff0ee;
    color: #873a32;
    font-size: .82rem;
    line-height: 1.45;
}

.success-alert {
    border-color: #add9bd;
    background: #ecf9f0;
    color: #24643a;
}

.auth-page-compact {
    display: block;
}

.auth-page-compact .auth-form-panel {
    min-height: 100vh;
    box-sizing: border-box;
}

.auth-back {
    display: block;
    margin-bottom: 28px;
}

/* Administration and profile */
.admin-page {
    padding: 42px 36px 70px;
    color: #14211e;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto 24px;
}

.page-heading h1 {
    margin: 7px 0 8px;
    color: #10251f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.65rem;
    font-weight: 500;
    letter-spacing: -.035em;
}

.page-heading p {
    margin: 0;
    color: #64766f;
}

.admin-card {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #dce4df;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 15px 45px rgba(23, 61, 52, .06);
}

.admin-card .k-grid {
    border: 0;
}

.admin-form {
    padding: 4px;
}

.admin-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 8px 0;
}

.admin-checks label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.window-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .65fr);
    gap: 22px;
    max-width: 1000px;
    margin: 0 auto;
}

.profile-grid .admin-card {
    width: 100%;
    box-sizing: border-box;
}

.profile-facts h2 {
    margin: 2px 0 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
}

.profile-facts dl,
.profile-facts dl div {
    margin: 0;
}

.profile-facts dl div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 0;
    border-top: 1px solid #e4e9e6;
}

.profile-facts dt {
    color: #64766f;
}

.profile-facts dd {
    margin: 0;
    text-align: right;
    font-weight: 700;
}

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

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

    .auth-security {
        display: none;
    }

    .app-shell {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .app-sidebar {
        padding-inline: 12px;
    }

    .app-brand span:last-child,
    .app-nav a:not(.active) span,
    .sidebar-security span,
    .app-nav-heading {
        display: none;
    }

    .app-nav a {
        justify-content: center;
    }
}

@media (max-width: 680px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: static;
        width: auto;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 10px 14px;
    }

    .app-brand {
        margin-right: auto;
        padding: 0;
    }

    .app-nav {
        flex-direction: row;
    }

    .sidebar-security,
    .app-user > span:not(.user-avatar) {
        display: none;
    }

    .app-topbar,
    .admin-page {
        padding-inline: 18px;
    }

    .page-heading,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-form-panel {
        padding: 20px;
    }

    .auth-card {
        box-sizing: border-box;
        padding: 30px 24px;
    }
}
