/* ==========================================================================
   Auth pages (login / register / forgot-password / reset-password)
   "Minimal centered" — plain centered form, no card, Commissioner type.
   ========================================================================== */

:root {
    --auth-navy: #0c2a63;
    --auth-navy-hover: #0a2252;
    --auth-gold: #c8871a;
    --auth-bg: #faf9f7;
    --auth-text: #12151a;
    --auth-text-secondary: #6d7280;
    --auth-border: #d8d5d1;
    --auth-border-light: #e0dedb;
    --auth-error-text: #b3261e;
    --auth-error-bg: #fdecea;
    --auth-error-border: #f3c9c4;
    --auth-success-text: #2b5a25;
    --auth-success-bg: #eef4ec;
    --auth-success-border: #cbe0c6;
}

.auth-shell {
    font-family: 'Commissioner', system-ui, sans-serif;
    width: 100%;
    min-height: 660px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 40px;
    box-sizing: border-box;
    background-color: var(--auth-bg);
    background-image:
        radial-gradient(circle at 18% 22%, rgba(12, 42, 99, .05), transparent 42%),
        radial-gradient(circle at 84% 76%, rgba(200, 135, 26, .07), transparent 45%);
}

.auth-col {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-heading {
    margin: 0;
    color: var(--auth-text);
    font-size: 36px;
    line-height: 1.15;
    letter-spacing: -0.028em;
    text-wrap: balance;
}

.auth-heading-thin { font-weight: 300; }
.auth-heading-bold { font-weight: 600; margin-left: 0.3ch; }

.auth-brand-letters { color: var(--auth-navy); }
.auth-brand-digits { color: var(--auth-gold); }

.auth-subtitle {
    margin: 0;
    color: var(--auth-text-secondary);
    font-size: 15px;
    line-height: 1.5;
}

.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    border-radius: 999px;
    border: 1px solid var(--auth-text);
    background: transparent;
    color: var(--auth-text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.auth-google-btn:hover,
.auth-google-btn:focus-visible {
    background: var(--auth-text);
    color: #fff;
}
.auth-google-btn img { width: 18px; height: 18px; }

.auth-magic-icon {
    font-size: 17px;
    line-height: 1;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9aa0a6;
    font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border-light);
}

.auth-form { display: flex; flex-direction: column; gap: 20px; }

.auth-fields { display: flex; flex-direction: column; gap: 16px; }

.auth-field { position: relative; }

.auth-input {
    width: 100%;
    height: 50px;
    padding: 0 2px;
    box-sizing: border-box;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid var(--auth-border);
    border-radius: 0;
    font-family: inherit;
    font-size: 16px;
    color: var(--auth-text);
    outline: none;
    transition: border-color .15s ease;
}
.auth-input::placeholder { color: #9aa0a6; }
.auth-input:focus { border-bottom-color: var(--auth-navy); }
.auth-input.is-invalid { border-bottom-color: var(--auth-error-text); }

.auth-password-field .auth-input { padding-right: 80px; }

.auth-password-toggle {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px 0;
    font-family: inherit;
    font-size: 13px;
    color: var(--auth-text-secondary);
    cursor: pointer;
    white-space: nowrap;
}
.auth-password-toggle:hover { color: var(--auth-text); }

.auth-field-error {
    display: none;
    margin-top: 6px;
    font-size: 13px;
    color: var(--auth-error-text);
}
.auth-field-error.is-visible { display: block; }

.auth-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-text);
    cursor: pointer;
}
.auth-checkbox-label input[type="checkbox"] {
    accent-color: var(--auth-navy);
    width: 16px;
    height: 16px;
    margin: 0;
}

.auth-link {
    color: var(--auth-text-secondary);
    text-decoration: none;
}
.auth-link:hover { color: var(--auth-navy); text-decoration: underline; }

.auth-forgot-short { display: none; }

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 999px;
    background: var(--auth-navy);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease;
}
.auth-submit:hover:not(:disabled) { background: var(--auth-navy-hover); }
.auth-submit:disabled { background: #4a6494; cursor: default; }

.auth-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.5;
}
.auth-banner-error {
    background: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    color: #8c1d18;
}
.auth-banner-success {
    background: var(--auth-success-bg);
    border: 1px solid var(--auth-success-border);
    color: var(--auth-success-text);
}

.auth-footer-text {
    text-align: center;
    font-size: 14px;
    color: var(--auth-text-secondary);
}
.auth-footer-text a {
    font-weight: 600;
    color: var(--auth-text);
    text-decoration: none;
    border-bottom: 1px solid var(--auth-gold);
}
.auth-footer-text a:hover { color: var(--auth-navy); }

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--auth-text-secondary);
    text-decoration: none;
}
.auth-back-link:hover { color: var(--auth-navy); }

/* Magic-link request page: input + button share one row (per mockup) */
.magic-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.magic-row .auth-field { flex: 1; }
.magic-row .auth-input {
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    padding: 0 14px;
}
.magic-row .auth-input:focus { border-color: var(--auth-navy); }
.magic-row .auth-submit {
    width: auto;
    flex-shrink: 0;
    height: 50px;
    padding: 0 22px;
    border-radius: 10px;
}

@media (max-width: 480px) {
    .magic-row { flex-direction: column; }
    .magic-row .auth-submit { width: 100%; height: 52px; }
}

/* Password strength meter (register) */
.auth-strength { display: flex; flex-direction: column; gap: 6px; margin-top: -6px; }
.auth-strength-bars { display: flex; gap: 6px; }
.auth-strength-bar {
    width: 34px;
    height: 4px;
    border-radius: 2px;
    background: var(--auth-border-light);
    transition: background-color .15s ease;
}
.auth-strength-bar.is-weak { background: var(--auth-error-text); }
.auth-strength-bar.is-medium { background: var(--auth-gold); }
.auth-strength-bar.is-strong { background: #3f7d34; }
.auth-strength-label { font-size: 12.5px; color: var(--auth-text-secondary); }

.auth-legal {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--auth-text-secondary);
    text-align: center;
}
.auth-legal a { color: var(--auth-text-secondary); text-decoration: underline; }
.auth-legal a:hover { color: var(--auth-navy); }

/* ---- Mobile (<=480px) ---- */
@media (max-width: 480px) {
    .auth-shell {
        min-height: 0;
        padding: 34px 26px 24px;
        align-items: flex-start;
    }
    .auth-col { gap: 18px; }
    .auth-heading { font-size: 30px; }
    .auth-google-btn,
    .auth-submit { height: 54px; }
    .auth-input { height: 50px; }
    .auth-password-toggle { padding: 8px; }
    .auth-forgot-full { display: none; }
    .auth-forgot-short { display: inline; }
    body.auth-page #site-footer { display: none; }
}

/* ---- Tablet (481px - 1023px) ---- */
@media (min-width: 481px) and (max-width: 1023px) {
    .auth-shell { padding: 56px 24px; }
    .auth-col { max-width: min(400px, calc(100% - 48px)); }
}
