/* Candidate auth screens — lean shell (no side/bottom nav) */

:root {
    --auth-primary: #2563eb;
    --auth-primary-hover: #1d4ed8;
    --auth-singpass: #e11d48;
    --auth-singpass-border: #fda4af;
    --auth-text: #111111;
    --auth-muted: #6b7280;
    --auth-border: #e5e7eb;
    --auth-surface: #ffffff;
    --auth-danger-bg: #fff1f2;
    --auth-danger-text: #be123c;
    --auth-danger-border: #fecdd3;
    --auth-success: #16a34a;
    --auth-radius: 12px;
    --auth-font-weight: 500;
}

.auth-body {
    background: var(--auth-surface);
    font-weight: var(--auth-font-weight);
    color: var(--auth-text);
}

.auth-shell {
    min-height: 100dvh;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: var(--auth-surface);
}

.auth-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    margin-bottom: 8px;
}

.auth-topbar-title {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--auth-text);
}

.auth-topbar-spacer {
    width: 40px;
}

.auth-lang {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 6px 10px;
    border: 1px solid var(--auth-border);
    border-radius: 999px;
    background: var(--auth-surface);
    color: var(--auth-muted);
    font-size: 0.875rem;
    font-weight: var(--auth-font-weight);
    cursor: default;
}

.auth-lang-caret {
    font-size: 0.7rem;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--auth-text);
    text-decoration: none;
}

.auth-back:hover {
    background: #f3f4f6;
    color: var(--auth-text);
}

.auth-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 0 32px;
}

.auth-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin-bottom: 20px;
    border-radius: 22px;
    background: #eff6ff;
    color: var(--auth-primary);
    font-size: 2.25rem;
}

.auth-brand-title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--auth-text);
}

.auth-brand-sub,
.auth-lead {
    margin: 0;
    max-width: 28rem;
    color: var(--auth-muted);
    font-size: 0.95rem;
    font-weight: var(--auth-font-weight);
    line-height: 1.45;
}

.auth-heading {
    margin: 12px 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--auth-text);
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: var(--auth-radius);
    border: 1px solid transparent;
    font-size: 1rem;
    font-weight: var(--auth-font-weight);
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.auth-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.auth-btn-primary {
    background: var(--auth-primary);
    color: #fff;
}

.auth-btn-primary:hover {
    background: var(--auth-primary-hover);
    color: #fff;
}

.auth-btn-secondary {
    background: var(--auth-surface);
    border-color: var(--auth-border);
    color: var(--auth-text);
}

.auth-btn-secondary:hover {
    background: #f9fafb;
    color: var(--auth-text);
}

.auth-btn-singpass {
    background: var(--auth-surface);
    border-color: var(--auth-singpass-border);
    color: var(--auth-text);
}

.auth-btn-singpass:hover {
    background: #fff1f2;
    color: var(--auth-text);
}

.auth-btn-singpass i {
    color: var(--auth-singpass);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
    color: var(--auth-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.auth-label {
    font-size: 0.875rem;
    font-weight: var(--auth-font-weight);
    color: var(--auth-text);
}

.auth-required {
    font-size: 0.75rem;
    font-weight: var(--auth-font-weight);
    color: var(--auth-singpass);
    letter-spacing: 0.02em;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap > i:first-child {
    position: absolute;
    left: 14px;
    color: var(--auth-muted);
    pointer-events: none;
}

.auth-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    background: var(--auth-surface);
    color: var(--auth-text);
    font-size: 1rem;
    font-weight: var(--auth-font-weight);
    outline: none;
}

.auth-input-wrap .auth-input {
    padding-left: 42px;
}

.auth-input-wrap.has-toggle .auth-input {
    padding-right: 44px;
}

.auth-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-input.is-invalid {
    border-color: var(--auth-singpass);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.auth-toggle-password {
    position: absolute;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
}

.auth-field-error {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: var(--auth-font-weight);
    color: var(--auth-danger-text);
}

.auth-field-hint {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: var(--auth-font-weight);
    color: var(--auth-muted);
}

.auth-alert {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--auth-danger-border);
    border-radius: var(--auth-radius);
    background: var(--auth-danger-bg);
    color: var(--auth-danger-text);
}

.auth-alert-title {
    margin: 0 0 2px;
    font-size: 0.9375rem;
    font-weight: 600;
}

.auth-alert-text {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: var(--auth-font-weight);
    line-height: 1.4;
}

.auth-link-row {
    display: flex;
    justify-content: flex-end;
}

.auth-link {
    color: var(--auth-primary);
    font-size: 0.875rem;
    font-weight: var(--auth-font-weight);
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
    color: var(--auth-primary-hover);
}

.auth-hint {
    margin: 0;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.8125rem;
    font-weight: var(--auth-font-weight);
    line-height: 1.4;
}

.auth-footer-text {
    margin: 20px 0 0;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.875rem;
    font-weight: var(--auth-font-weight);
}

.auth-password-rules {
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--auth-radius);
    background: #f3f4f6;
    list-style: none;
}

.auth-password-rules-title {
    margin: 0 0 8px;
    font-size: 0.8125rem;
    font-weight: var(--auth-font-weight);
    color: var(--auth-muted);
}

.auth-password-rules ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-password-rules li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: var(--auth-font-weight);
    color: var(--auth-success);
}

.auth-password-rules li + li {
    margin-top: 4px;
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    background: rgba(17, 24, 39, 0.45);
}

.auth-modal.is-open {
    display: flex;
}

.auth-modal-card {
    width: 100%;
    max-width: 420px;
    padding: 28px 22px 22px;
    border-radius: 20px 20px 16px 16px;
    background: var(--auth-surface);
    text-align: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.auth-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: #dcfce7;
    color: var(--auth-success);
    font-size: 1.75rem;
}

.auth-modal-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 700;
}

.auth-modal-text {
    margin: 0 0 20px;
    color: var(--auth-muted);
    font-size: 0.9rem;
    font-weight: var(--auth-font-weight);
    line-height: 1.45;
}

@media (min-width: 768px) {
    .auth-shell {
        max-width: 440px;
        min-height: calc(100dvh - 48px);
        margin: 24px auto;
        border: 1px solid var(--auth-border);
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    }

    .auth-modal {
        align-items: center;
    }

    .auth-modal-card {
        border-radius: 16px;
    }
}
