:root {
    --mud-palette-primary: #0f766e;
    --mud-palette-secondary: #f97316;
    --mud-palette-tertiary: #f59e0b;
    --mud-palette-background: #f7f4ef;
    --mud-palette-surface: #ffffff;
    --mud-palette-text-primary: #1f2937;
    --mud-palette-text-secondary: #52606d;
    --mud-typography-default-family: "Gill Sans", "Trebuchet MS", "Candara", "Segoe UI", sans-serif;
    --auth-display-font: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Garamond, serif;
    --auth-body-font: "Gill Sans", "Trebuchet MS", "Candara", "Segoe UI", sans-serif;
    --auth-ink: var(--mud-palette-text-primary);
    --auth-muted: var(--mud-palette-text-secondary);
    --auth-teal: var(--mud-palette-primary);
    --auth-amber: var(--mud-palette-secondary);
    --auth-sand: var(--mud-palette-background);
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
}

.px-4 {
    padding-left: calc(1.5rem + var(--safe-area-left));
    padding-right: calc(1.5rem + var(--safe-area-right));
}

html, body {
    font-family: var(--auth-body-font);
    color: var(--mud-palette-text-primary);
    background-color: var(--mud-palette-background);
    transition: background-color 0.25s ease, color 0.25s ease;
}

a, .btn-link {
    color: var(--auth-teal);
}

.btn-primary {
    color: #fff;
    background-color: var(--auth-teal);
    border-color: #0b5f58;
}

.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;
}

.policy-shell {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 0 2.5rem;
}

.policy-meta {
    color: var(--mud-palette-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.policy-section {
    margin-top: 1.75rem;
}

.policy-section h2 {
    margin-bottom: 0.65rem;
}

.policy-section h3 {
    margin-top: 1rem;
    font-size: 1.05rem;
    color: var(--mud-palette-text-primary);
}

.policy-shell ul {
    padding-left: 1.25rem;
}

.policy-shell li {
    margin-bottom: 0.35rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    padding-top: calc(3.5rem + var(--safe-area-top));
    padding-right: calc(1.75rem + var(--safe-area-right));
    padding-bottom: 3.5rem;
    padding-left: calc(1.75rem + var(--safe-area-left));
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 15% 20%, rgba(15, 118, 110, 0.22), transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(249, 115, 22, 0.22), transparent 40%),
        linear-gradient(130deg, #f8f4ef 0%, #eef5f7 45%, #f7efe7 100%);
    overflow: hidden;
}

.auth-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    z-index: 1;
}

.auth-backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.auth-backdrop::before,
.auth-backdrop::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(15, 118, 110, 0.18);
    background: radial-gradient(circle, rgba(15, 118, 110, 0.2), rgba(15, 118, 110, 0.02));
    filter: blur(0.2px);
    animation: auth-drift 12s ease-in-out infinite;
}

.auth-backdrop::before {
    width: 520px;
    height: 520px;
    top: -160px;
    right: -140px;
}

.auth-backdrop::after {
    width: 420px;
    height: 420px;
    bottom: -180px;
    left: -140px;
    animation-delay: 1.5s;
}

.auth-stage {
    position: relative;
    width: min(1100px, 100%);
    z-index: 1;
}

.auth-wrapper {
    width: 100%;
}

.auth-grid {
    align-items: center;
}

.auth-hero {
    max-width: 520px;
    animation: auth-rise 0.9s ease-out both;
}

.auth-brand {
    font-family: var(--auth-display-font);
    font-size: 0.95rem;
    letter-spacing: 0.24rem;
    text-transform: uppercase;
    color: rgba(15, 118, 110, 0.7);
    margin-bottom: 1.5rem;
}

.auth-title {
    font-family: var(--auth-display-font);
    font-weight: 700;
    font-size: clamp(2.4rem, 2.8vw, 3.2rem);
    color: var(--auth-ink);
    margin-bottom: 1rem;
}

.auth-subtitle {
    color: var(--auth-muted);
    font-size: 1.05rem;
    max-width: 420px;
}

.auth-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.auth-feature {
    background: rgba(15, 118, 110, 0.12);
    color: var(--auth-teal);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    animation: auth-rise 0.8s ease-out both;
}

.auth-feature:nth-child(1) {
    animation-delay: 0.15s;
}

.auth-feature:nth-child(2) {
    animation-delay: 0.25s;
}

.auth-feature:nth-child(3) {
    animation-delay: 0.35s;
}

.auth-card {
    border-radius: 26px;
    padding: 2.5rem;
    border: 1px solid rgba(15, 118, 110, 0.12);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 30px 80px rgba(31, 41, 55, 0.12);
    backdrop-filter: blur(8px);
    animation: auth-rise 1s ease-out both;
    animation-delay: 0.2s;
}

.auth-shell.theme-dark {
    background:
        radial-gradient(circle at 15% 20%, rgba(45, 212, 191, 0.18), transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(251, 146, 60, 0.18), transparent 40%),
        linear-gradient(130deg, #0b1114 0%, #0f171a 45%, #0f1417 100%);
}

.auth-shell.theme-dark .auth-card {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(17, 24, 27, 0.9);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.auth-shell.theme-dark .auth-feature {
    background: rgba(45, 212, 191, 0.18);
    color: var(--mud-palette-primary);
}

.auth-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-card-title {
    font-family: var(--auth-display-font);
    margin-bottom: 0.35rem;
}

.auth-muted {
    color: var(--auth-muted);
}

.auth-alert {
    border-radius: 14px;
}

.auth-note {
    color: rgba(31, 41, 55, 0.55);
    margin-top: 0.35rem;
}

.auth-row {
    margin-top: 0.5rem;
}

.auth-link {
    color: var(--auth-teal);
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-submit {
    height: 3rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.auth-submit .mud-button-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.auth-spinner {
    color: rgba(255, 255, 255, 0.85);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(31, 41, 55, 0.45);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.25rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.15), rgba(249, 115, 22, 0.2));
}

.auth-divider span {
    padding: 0 0.2rem;
}

.auth-idp {
    border-width: 2px;
    font-weight: 700;
    height: 3rem;
}

.auth-idp .mud-button-label {
    gap: 0.5rem;
}

.auth-footnote {
    color: rgba(31, 41, 55, 0.45);
    margin-top: 0.5rem;
}

.auth-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-align: center;
}

.auth-dot {
    color: rgba(31, 41, 55, 0.35);
    font-size: 0.9rem;
}

.welcome-card {
    max-width: 560px;
    padding: 2.5rem;
    border-radius: 24px;
}

.welcome-subtitle {
    color: var(--auth-muted);
    margin-top: 0.75rem;
    margin-bottom: 1.75rem;
}

.welcome-cta {
    height: 3rem;
    font-weight: 700;
}

@keyframes auth-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes auth-drift {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(16px);
    }
}

@media (max-width: 900px) {
    .auth-shell {
        padding-top: calc(2.5rem + var(--safe-area-top));
        padding-right: calc(1.25rem + var(--safe-area-right));
        padding-bottom: 2.5rem;
        padding-left: calc(1.25rem + var(--safe-area-left));
    }

    .auth-hero {
        text-align: center;
        margin: 0 auto;
    }

    .auth-features {
        justify-content: center;
    }

    .auth-card {
        padding: 2rem;
    }
}

@media (max-width: 600px) {
    .auth-card {
        padding: 1.75rem;
    }

    .auth-divider {
        letter-spacing: 0.18rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-hero,
    .auth-feature,
    .auth-card,
    .auth-backdrop::before,
    .auth-backdrop::after {
        animation: none;
    }
}
