/* =============================================
   AUTH PAGES — Abak Market
   ============================================= */

.auth-page {
    min-height: calc(100vh - var(--header-h) - var(--bottom-nav-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
    padding-bottom: calc(var(--bottom-nav-h) + var(--sp-6));
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--clr-card);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-raised);
    padding: var(--sp-8) var(--sp-6);
    border: 1.5px solid var(--clr-border);
}

/* ── Header ── */
.auth-card__header {
    text-align: center;
    margin-bottom: var(--sp-6);
}

.auth-card__icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--sp-4);
    box-shadow: 0 4px 16px rgba(166, 119, 82, .3);
}

.auth-card__icon svg {
    width: 28px;
    height: 28px;
    stroke: white;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-card__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 800;
    margin-bottom: var(--sp-1);
    color: var(--clr-text);
}

.auth-card__subtitle {
    font-size: var(--text-sm);
    color: var(--clr-text-light);
    line-height: 1.5;
}

/* ── Form Fields ── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}

.auth-field label {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--clr-text-mid);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--clr-border-mid);
    border-radius: var(--r-md);
    font-size: var(--text-base);
    font-family: var(--font-main);
    color: var(--clr-text);
    background: var(--clr-bg);
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
    outline: none;
}

.auth-input:focus {
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 3px rgba(166, 119, 82, .15);
}

.auth-input::placeholder {
    color: var(--clr-text-light);
}

/* ── Buttons ── */
.auth-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--r-md);
    font-size: var(--text-base);
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--dur-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
}

.auth-btn:active {
    transform: scale(0.98);
}

.auth-btn--primary {
    background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-dark));
    color: white;
    box-shadow: 0 4px 16px rgba(166, 119, 82, .3);
}

.auth-btn--primary:hover {
    box-shadow: 0 6px 20px rgba(166, 119, 82, .4);
}

.auth-btn--google {
    background: var(--clr-card);
    color: var(--clr-text);
    border: 1.5px solid var(--clr-border-mid);
    box-shadow: var(--shadow-card);
}

.auth-btn--google:hover {
    background: var(--clr-bg);
    border-color: var(--clr-border);
}

.auth-btn--google svg {
    width: 20px;
    height: 20px;
}

.auth-btn--outline {
    background: transparent;
    color: var(--clr-accent);
    border: 1.5px solid var(--clr-accent);
}

.auth-btn--outline:hover {
    background: rgba(166, 119, 82, .05);
}

.auth-btn--danger {
    background: var(--clr-red);
    color: white;
}

.auth-btn--link {
    background: none;
    border: none;
    color: var(--clr-accent);
    font-weight: 700;
    font-size: var(--text-sm);
    padding: var(--sp-2);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin: var(--sp-2) 0;
    color: var(--clr-text-light);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--clr-border-mid);
}

/* ── Links ── */
.auth-links {
    text-align: center;
    margin-top: var(--sp-4);
    font-size: var(--text-sm);
    color: var(--clr-text-light);
}

.auth-links a {
    color: var(--clr-accent);
    font-weight: 700;
    text-decoration: none;
    transition: color var(--dur-fast);
}

.auth-links a:hover {
    color: var(--clr-accent-dark);
    text-decoration: underline;
}

/* ── Errors ── */
.auth-errors {
    background: #fff5f5;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: var(--r-sm);
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--text-xs);
    font-weight: 600;
    margin-bottom: var(--sp-2);
}

.auth-errors ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.auth-errors li {
    margin-bottom: 4px;
}

.auth-errors li:last-child {
    margin-bottom: 0;
}

.field-error {
    color: var(--clr-red);
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
}

.auth-input.is-invalid {
    border-color: var(--clr-red);
}

/* ── Messages / Alerts ── */
.auth-messages {
    margin-bottom: var(--sp-4);
}

.auth-message {
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    margin-bottom: var(--sp-2);
}

.auth-message--success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.auth-message--info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.auth-message--warning {
    background: #fffbeb;
    color: #a16207;
    border: 1px solid #fde68a;
}

.auth-message--error {
    background: #fff5f5;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ── Verification banner ── */
.email-verify-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1.5px solid #f59e0b;
    border-radius: var(--r-md);
    padding: var(--sp-4);
    margin-bottom: var(--sp-4);
    text-align: center;
}

.email-verify-banner__icon {
    font-size: 32px;
    margin-bottom: var(--sp-2);
}

.email-verify-banner__text {
    font-size: var(--text-sm);
    font-weight: 600;
    color: #92400e;
    margin-bottom: var(--sp-3);
}

.email-verify-banner__btn {
    display: inline-flex;
    padding: 8px 16px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: var(--r-sm);
    font-size: var(--text-xs);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--dur-fast);
}

.email-verify-banner__btn:hover {
    background: #d97706;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .auth-card {
        padding: var(--sp-6) var(--sp-4);
        border-radius: var(--r-lg);
    }
}
