/* Caly-Quiz Cloud — Auth pages styling */

:root {
    --primary: #f59e0b;
    --primary-hover: #d97706;
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --error: #ef4444;
    --success: #22c55e;
    --border: #475569;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border);
}

.auth-card h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

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

.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}

.auth-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

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

.auth-divider {
    margin: 0.75rem 0;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 768px) {
    body { padding: 16px 0; }
    .auth-container { padding: 1.25rem; max-width: 100%; }
    .auth-logo { margin-bottom: 1.5rem; }
    .auth-logo h1 { font-size: 1.6rem; }
    .auth-card { padding: 1.75rem 1.5rem; border-radius: 14px; }
    .auth-card h2 { font-size: 1.3rem; margin-bottom: 1.25rem; }
    .form-group input {
        font-size: 16px; /* prevent iOS zoom on focus */
        padding: 0.85rem 1rem;
        min-height: 48px;
    }
    .btn-primary {
        padding: 0.9rem;
        font-size: 1rem;
        min-height: 50px;
    }
    .auth-links { font-size: 0.88rem; margin-top: 1.25rem; }
    .auth-error, .auth-success { font-size: 0.82rem; padding: 0.7rem 0.9rem; }
}

@media (max-width: 480px) {
    .auth-container { padding: 1rem; }
    .auth-logo h1 { font-size: 1.4rem; }
    .auth-logo p { font-size: 0.85rem; }
    .auth-card { padding: 1.5rem 1.25rem; }
}

/* Touch optimization */
@media (hover: none) and (pointer: coarse) {
    .form-group input { min-height: 48px; font-size: 16px; }
    .btn-primary { min-height: 48px; }
    .auth-links a { display: inline-block; padding: 4px 0; }
}
