/* Auth pages (sign in, password reset, setup): same palette and fonts as the dashboard
   (see app.php and includes/theme_head.php). */

:root {
    --lg-ink: #17212b;
    --lg-muted: #687581;
    --lg-paper: #f3f6f7;
    --lg-panel: #ffffff;
    --lg-line: #e2e8eb;
    --lg-teal: #087f8c;
    --lg-teal-dark: #075f69;
    --lg-deep: #13252b;
    --lg-gold: #d5a844;
    --lg-danger-bg: #fdf0f0;
    --lg-danger-border: #f1c4c4;
    --lg-danger-text: #9b2c2c;
    --lg-success-bg: #e8f4f4;
    --lg-success-border: #b7dcdd;
}

* {
    box-sizing: border-box;
}

body.auth-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Dashboard hero gradient as a top band, fading into the light page background. */
    background:
        linear-gradient(120deg, #0f343b 0%, #176d73 60%, #d2a849 180%) top / 100% 320px no-repeat,
        var(--lg-paper);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--lg-ink);
    padding: 24px;
}

.auth-shell {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-brand {
    text-align: center;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #fff;
}

.auth-brand-mark {
    font-family: 'Space Grotesk', 'DM Sans', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.auth-brand-sub {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.auth-card {
    width: 100%;
    background: var(--lg-panel);
    border: 1px solid var(--lg-line);
    border-radius: 18px;
    padding: 36px 32px;
    box-shadow: 0 18px 40px rgba(19, 37, 43, 0.12);
}

.auth-title {
    font-family: 'Space Grotesk', 'DM Sans', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--lg-ink);
}

.auth-subtitle {
    margin: 0 0 24px;
    color: var(--lg-muted);
    font-size: 14px;
}

.auth-alert {
    background: var(--lg-danger-bg);
    border: 1px solid var(--lg-danger-border);
    color: var(--lg-danger-text);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
}

.auth-field {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-size: 13px;
    font-weight: 600;
    color: #33434d;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
    background: #fff;
    border: 1px solid #cfd8dc;
    border-radius: 10px;
    padding: 11px 12px;
    color: var(--lg-ink);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus {
    border-color: #75bfc3;
    box-shadow: 0 0 0 0.2rem rgba(8, 127, 140, 0.13);
}

.auth-submit {
    width: 100%;
    background: var(--lg-teal);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s ease;
}

.auth-submit:hover {
    background: var(--lg-teal-dark);
}

.auth-submit:focus-visible,
.auth-links a:focus-visible,
.auth-note a:focus-visible {
    outline: 3px solid rgba(8, 127, 140, 0.35);
    outline-offset: 2px;
}

.auth-links {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
}

.auth-links a,
.auth-note a {
    color: var(--lg-teal);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover,
.auth-note a:hover {
    color: var(--lg-teal-dark);
    text-decoration: underline;
}

.auth-link-button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--lg-teal);
    cursor: pointer;
}

.auth-link-button:hover:not(:disabled) {
    color: var(--lg-teal-dark);
    text-decoration: underline;
}

.auth-link-button:disabled {
    color: var(--lg-muted);
    cursor: default;
}

.auth-note {
    margin: 0 0 16px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--lg-teal-dark);
    background: var(--lg-success-bg);
    border: 1px solid var(--lg-success-border);
    border-radius: 10px;
}

.auth-footer {
    margin-top: 28px;
    font-size: 11px;
    color: var(--lg-muted);
    letter-spacing: 0.05em;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px;
        border-radius: 14px;
    }
}
