:root {
    --auth-primary: #2196F3;
    --auth-primary-text: #ffffff;
    --auth-bg: #f4f6f9;
    --auth-card: #ffffff;
    --auth-border: #dfe7ef;
    --auth-text: #1f2933;
    --auth-text-secondary: #64748b;
}

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background:
        radial-gradient(circle at 15% 15%, rgba(33, 150, 243, 0.14) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(33, 150, 243, 0.10) 0%, transparent 50%),
        var(--auth-bg);
    color: var(--auth-text);
    min-height: 100vh;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-header {
    padding: 1.5rem 2rem;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.auth-brand img {
    height: 26px;
}

.auth-brand .auth-app-name {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--auth-text-secondary);
}

.auth-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem 3rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--auth-card);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    padding: 2.5rem 2.25rem 2rem;
}

.auth-card h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 0.5rem;
    text-align: center;
}

.auth-card .auth-subtitle {
    font-size: 0.95rem;
    color: var(--auth-text-secondary);
    line-height: 1.5;
    margin: 0 0 2rem;
    text-align: center;
}

.auth-field {
    margin-bottom: 1.25rem;
}

.auth-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 0.4rem;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--auth-border);
    background: var(--auth-card);
    color: var(--auth-text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}

.auth-field input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.auth-field small {
    display: block;
    margin-top: 0.4rem;
    color: var(--auth-text-secondary);
    font-size: 0.78rem;
    line-height: 1.4;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--auth-text);
}

.auth-remember input {
    margin: 0;
}

.auth-submit {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--auth-primary);
    color: var(--auth-primary-text);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.auth-submit:hover {
    filter: brightness(1.05);
}

.auth-errors {
    background: #fdecea;
    color: #b3261e;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
}

.auth-errors ul {
    margin: 0;
    padding-left: 1.1rem;
}

/* asp-validation-summary/asp-validation-for always render their element —
   even with nothing to show — and toggle these classes to say so. Bootstrap
   normally hides them, but auth.css loads after site.css and redefines
   .auth-errors' box unconditionally, so it has to hide the valid state itself. */
.auth-errors.validation-summary-valid {
    display: none;
}

.auth-field .text-danger.field-validation-valid {
    display: none;
}

.auth-field .text-danger {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #b3261e;
}

.auth-footnote {
    margin-top: 1.75rem;
    font-size: 0.82rem;
    color: var(--auth-text-secondary);
    text-align: center;
}

.auth-success {
    text-align: center;
}

.auth-success .auth-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 174, 96, 0.12);
    color: #2eae60;
    font-size: 1.6rem;
}

.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-link:hover {
    text-decoration: underline;
}
