:root {
    --oa-bg: #f7f9fc;
    --oa-surface: #ffffff;
    --oa-text: #163844;
    --oa-muted: #567884;
    --oa-primary: #196176;
    --oa-primary-strong: #104b5d;
    --oa-accent: #28a1c7;
    --oa-success: #239766;
    --oa-danger: #b43434;
}

html, body {
    font-family: "Segoe UI", "Trebuchet MS", Tahoma, sans-serif;
    background-color: var(--oa-bg);
    color: var(--oa-text);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 0.7rem 1rem;
    background: #ffffff;
    color: #0f5264;
    border: 1px solid #0f5264;
    border-radius: 0 0 8px 8px;
    font-weight: 700;
}

.skip-link:focus {
    left: 1rem;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--oa-primary);
}

a:hover, .btn-link:hover {
    color: var(--oa-primary-strong);
}

.btn-primary {
    color: #fff;
    background-color: var(--oa-primary);
    border-color: var(--oa-primary-strong);
}

.card {
    border: 1px solid #d7e2e8;
    box-shadow: 0 8px 24px rgba(20, 53, 65, 0.08);
}

.card-title {
    color: var(--oa-primary-strong);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(40, 161, 199, 0.45);
}

:focus-visible {
    outline: 2px solid #0f5264;
    outline-offset: 2px;
}

.content {
    padding-top: 1.2rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--oa-success);
}

.invalid {
    outline: 1px solid var(--oa-danger);
}

.validation-message {
    color: var(--oa-danger);
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fff1f1;
    border-top: 2px solid #e57373;
    bottom: 0;
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.7rem 3rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 0.875rem;
    color: #7a1f1f;
    display: none;
    align-items: center;
    gap: 0.75rem;
}

#blazor-error-ui .reload {
    color: #b43434;
    font-weight: 600;
    text-decoration: underline;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7a1f1f;
    font-size: 1rem;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

#blazor-error-ui .dismiss:hover {
    background: rgba(180, 52, 52, 0.1);
}

.blazor-error-boundary {
    background: #8e2c2c;
    padding: 1rem;
    color: white;
    border-radius: 0.5rem;
}

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

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #d5dfe4;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--oa-accent);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

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

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 700;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    color: var(--oa-muted);
}

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

code {
    color: #9b2f57;
}

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

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

/* ── Auth screens (Login / Register / ForgotPassword) ─────────────── */
.oa-auth-screen {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(145deg, #eaf4f8 0%, var(--oa-bg) 60%);
}

.oa-auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--oa-surface);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    border: 1px solid rgba(25, 97, 118, 0.10);
}

.oa-auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--oa-primary) 0%, var(--oa-accent) 100%);
    color: #fff;
}

@media (max-width: 480px) {
    .oa-auth-card {
        padding: 2rem 1.25rem;
        border-radius: 12px;
    }
}
