:root {
    --color-primary: #6750A4;
    --color-primary-container: #EADDFF;
    --color-coral: #E89274;
    --color-coral-dim: rgba(232, 146, 116, .16);
    --color-mint: #4FBFA1;
    --color-amber: #E1A954;
    --color-on-surface: #1D1B20;
    --color-on-surface-variant: #49454F;
    --color-outline-variant: #CAC4D0;
    --slot-morning: #E1A954;
    --slot-afternoon: #6750A4;
    --slot-evening: #4A5C8A;
    --shadow-card: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(103,80,164,.06);
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.e-sidebar {
    background: #f8f7fa !important;
}

h1:focus {
    outline: none;
}

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

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    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 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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2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ggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

/* ── Splash Screen ───────────────────────────────────────────────────── */
@keyframes bloomIn {
    0%   { transform: scale(.6);   opacity: 0 }
    60%  { transform: scale(1.06); opacity: 1 }
    100% { transform: scale(1);    opacity: 1 }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px) }
    to   { opacity: 1; transform: none }
}
@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(.6); opacity: .4 }
    40%           { transform: scale(1);  opacity: 1  }
}
@keyframes shine {
    0%   { transform: translateX(-120%) }
    100% { transform: translateX(220%)  }
}

/* ── Mobile layout (default) ─────────────────────────────────────────── */
.splash-screen {
    min-height: 100vh;
    width: 100%;
    background: radial-gradient(circle at 50% 36%, #EADDFF 0%, #F7F2FB 60%, #FEF7FF 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 120px 24px 48px;
    position: relative;
    overflow: hidden;
    font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

/* Decorative floating orbs */
.splash-orb {
    position: absolute;
    border-radius: 50%;
}
.splash-orb-1 { top: 64px;     left: 36px;  width: 14px; height: 14px; background: #E1A954; opacity: .55; filter: blur(.3px); }
.splash-orb-2 { top: 110px;    right: 48px; width: 10px; height: 10px; background: #4A5C8A; opacity: .55; }
.splash-orb-3 { bottom: 240px; left: 56px;  width:  8px; height:  8px; background: #E89274; opacity: .55; }

/* Hero block (icon + wordmark, animated together) */
.splash-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    animation: bloomIn .8s cubic-bezier(.2,.7,.2,1) both;
}

.splash-icon-wrap {
    width: 144px;
    height: 144px;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(103,80,164,.33), 0 6px 16px rgba(79,55,138,.20);
    position: relative;
    flex-shrink: 0;
}

.splash-svg {
    width: 144px;
    height: 144px;
    display: block;
}

/* Shine overlay — hidden on mobile, animated on desktop */
.splash-shine {
    display: none;
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
    animation: shine 2.4s ease-in-out 1.2s infinite;
}

.splash-wordmark {
    text-align: center;
    animation: fadeUp .7s ease .35s both;
}

.splash-wordmark h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -.6px;
    color: #1D1B20;
    line-height: 1.05;
}

.splash-wordmark p {
    margin: 8px 0 0;
    font-size: 13px;
    color: #49454F;
    letter-spacing: 1.5px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Desktop right-column wordmark — hidden on mobile */
.splash-wordmark-d { display: none; }

/* Desktop right column — hidden on mobile (also hides inner dots) */
.splash-side { display: none; }

/* Feature bullets — hidden on mobile */
.splash-features { display: none; }

/* Bottom section: dots + version / label */
.splash-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.splash-dots {
    display: flex;
    gap: 8px;
}

.splash-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.splash-dots .dot-1 { background: #E1A954; animation: dotPulse 1.4s ease-in-out 0s    infinite; }
.splash-dots .dot-2 { background: #6750A4; animation: dotPulse 1.4s ease-in-out .16s  infinite; }
.splash-dots .dot-3 { background: #4A5C8A; animation: dotPulse 1.4s ease-in-out .32s  infinite; }

.splash-version {
    font-size: 11px;
    color: #49454F;
    font-family: 'Roboto Mono', ui-monospace, monospace;
    letter-spacing: 1px;
    opacity: .7;
}

/* Desktop loading label — hidden on mobile */
.splash-loading-label { display: none; }

/* ── Desktop layout (≥ 900 px) ───────────────────────────────────────── */
@media (min-width: 900px) {
    .splash-screen {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
        padding: 0;
        align-items: stretch;
        font-family: "Segoe UI Variable", "Segoe UI", Roboto, system-ui, sans-serif;
    }

    /* Hide mobile-only elements */
    .splash-orb-1, .splash-orb-2, .splash-orb-3 { display: none; }
    .splash-wordmark { display: none; }
    .splash-version { display: none; }

    /* Left column: icon centred */
    .splash-hero {
        grid-column: 1;
        grid-row: 1;
        justify-content: center;
        padding-top: 32px;
        gap: 0;
    }

    .splash-icon-wrap {
        width: 280px;
        height: 280px;
        border-radius: 64px;
        box-shadow: 0 32px 80px rgba(103,80,164,.27), 0 8px 24px rgba(79,55,138,.20);
    }

    .splash-svg { width: 280px; height: 280px; }
    .splash-shine { display: block; }

    /* Right column: wordmark + features + dots */
    .splash-side {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 32px 80px 0 0;
        gap: 28px;
        animation: fadeUp .7s ease .35s both;
    }

    .splash-wordmark-d {
        display: block;
        text-align: left;
    }

    .splash-wordmark-d h1 {
        margin: 0;
        font-size: 56px;
        font-weight: 600;
        letter-spacing: -1.5px;
        color: #1D1B20;
        line-height: 1;
    }

    .splash-wordmark-d p {
        margin: 12px 0 0;
        font-size: 14px;
        color: #49454F;
        letter-spacing: 2px;
        font-weight: 600;
        text-transform: uppercase;
    }

    .splash-features {
        display: flex;
        flex-direction: column;
        gap: 12px;
        list-style: none;
        margin: 8px 0 0;
        padding: 0;
    }

    .splash-features li {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 14px;
        color: #49454F;
    }

    .splash-features li .feat-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .splash-bottom {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        margin-top: 20px;
    }

    .splash-loading-label {
        display: block;
        font-size: 12px;
        color: #49454F;
        font-family: 'Roboto Mono', ui-monospace, monospace;
        letter-spacing: 1px;
    }

    /* Hide the mobile-only footer dots */
    .splash-screen > .splash-bottom { display: none; }
}
/* ── end Splash Screen ───────────────────────────────────────────────── */

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.nav-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 4px 10px;
    overflow-y: auto;
    gap: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-left: 3px solid transparent;
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
    background: rgba(103, 80, 164, 0.06);
    color: #333;
    text-decoration: none;
}

.nav-link.active {
    border-left-color: var(--color-primary, #6750A4);
    background: rgba(103, 80, 164, 0.09);
    color: var(--color-primary, #6750A4);
    font-weight: 600;
}