:root {
    --brand: #2e3192;
    --brand-dark: #1f2270;
    --brand-light: #eaebf7;
    --accent: #2a9d8f;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f6f7fb;
    --card: #ffffff;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
}

html, body {
    font-family: 'Aptos', 'Aptos Display', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: 'Aptos Display', 'Aptos', 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
    color: var(--ink);
    letter-spacing: -0.01em;
}

a, .btn-link { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.btn-primary {
    color: #fff;
    background-color: var(--brand);
    border-color: var(--brand);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
}
.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}
.btn-outline-primary:hover {
    background-color: var(--brand);
    border-color: var(--brand);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(46, 49, 146, 0.20);
    border-color: var(--brand);
}

.form-control, .form-select {
    border-color: var(--line);
    border-radius: 8px;
}
.form-label { font-weight: 500; color: #374151; margin-bottom: .25rem; }
.form-text { color: var(--muted); }

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-header {
    background: var(--brand-light);
    border-bottom: 1px solid var(--line);
    font-weight: 600;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.table {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
}
.table > :not(caption) > * > * { padding: .65rem .75rem; }
.table > thead { background: var(--brand-light); }
.table > thead th { font-weight: 600; border-bottom: 1px solid var(--line); }

.alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; border-radius: var(--radius); }
.alert-danger  { background: #fef2f2; color: #991b1b; border-color: #fecaca; border-radius: var(--radius); }
.alert-info    { background: var(--brand-light); color: var(--brand-dark); border-color: #c7d8ec; border-radius: var(--radius); }

.content { padding-top: 1.1rem; }

h1:focus { outline: none; }

.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #b91c1c; font-size: .875rem; }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
    border-radius: var(--radius);
}
.blazor-error-boundary::after { content: "An error has occurred."; }

/* Auth pages — centered single-card layout */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(1200px 600px at 20% -10%, rgba(46,49,146,.08), transparent 60%),
        radial-gradient(900px 500px at 100% 110%, rgba(46,49,146,.06), transparent 60%),
        #f6f7fb;
    padding: 2rem 1rem;
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .05);
    padding: 2rem 1.75rem;
}
.login-brand { text-align: center; margin-bottom: 1rem; }
.login-brand img { height: 80px; width: auto; max-width: 100%; }
.login-title {
    text-align: center;
    margin: .25rem 0 0;
    color: #2e3192;
    font-weight: 700;
    letter-spacing: -.01em;
    font-size: 1.6rem;
}
.login-sub {
    text-align: center;
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-size: .95rem;
}

#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;
}

.darker-border-checkbox.form-check-input { border-color: #929292; }

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--muted);
    text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder { text-align: start; }
