/* =============================================================================
   AUTH PAGES — Shared styles for Login, Signup, Forgot Password, Reset Password
   Used by: /merchant/login.php, /merchant/reset-password.php
   Loaded AFTER public.css
   ============================================================================= */

/* ── Layout ── */
body.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ── Card ── */
.auth-container {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    padding: 36px 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

/* ── Logo block ── */
.auth-logo {
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.auth-logo-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin: 0;
}

/* ── Forms ── */
.auth-container .form-group {
    margin-bottom: 16px;
}

.auth-container .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.auth-container .form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    box-sizing: border-box;
}

.auth-container .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-dark);
}

.auth-container .form-group input::placeholder {
    color: var(--text-muted);
}

/* ── Hints ── */
.password-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.password-match {
    font-size: 0.8rem;
    margin-top: 6px;
    min-height: 1.2em;
    transition: color 0.2s;
}

.password-match.match { color: var(--success); }
.password-match.mismatch { color: #f87171; }

/* ── Buttons (full-width primary) ── */
.auth-container .btn-primary {
    width: 100%;
    padding: 13px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 4px;
}

/* ── Alerts ── */
.auth-alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
    border: 1px solid;
}

.auth-alert-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-alert--error {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.3);
    color: #fca5a5;
}

.auth-alert--success {
    background: rgba(34,197,94,0.1);
    border-color: rgba(34,197,94,0.3);
    color: #86efac;
}

/* ── Links ── */
.auth-links {
    text-align: center;
    margin-top: 16px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.auth-links a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.forgot-link {
    text-align: right;
    margin-top: -12px;
    margin-bottom: 20px;
}

.forgot-link a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}

.forgot-link a:hover {
    color: var(--primary-light);
}

/* ── Subtitle text ── */
.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

/* ── Features list (signup page) ── */
.auth-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-feature-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ── Footer ── */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.auth-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--primary-light);
}

.auth-back-link {
    text-align: center;
    margin-top: 16px;
}

.auth-back-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-back-link a:hover {
    color: var(--text-primary);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .auth-container {
        padding: 28px 20px;
    }
    .auth-logo h1 {
        font-size: 1.3rem;
    }
    .auth-features {
        grid-template-columns: 1fr;
    }
}

/* ── Selects (for auth pages with dropdowns like onboarding) ── */
.auth-container .form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.auth-container .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--bg-dark);
}
/* ── Signups closed (September 2026) ── */
.auth-alert--info {
    background: rgba(245,158,11,0.1);
    border-color: rgba(245,158,11,0.3);
    color: #fcd34d;
    margin-top: 20px;
    margin-bottom: 0;
}
.auth-alert--info a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

.auth-closed { text-align: center; }
.auth-closed h2 { font-size: 1.35rem; margin-bottom: 14px; }
.auth-closed p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin-bottom: 14px; }
.auth-closed p strong { color: var(--text-primary); }
.auth-closed .btn { margin-top: 6px; }
.auth-closed-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 12px; }
