/* Authentication Pages Styles — with Dark Mode */

/* ── Dark mode card/form overrides ─────────────────────────── */
[data-theme="dark"] .auth-card {
    background: var(--surface-card);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

[data-theme="dark"] .auth-title  { color: var(--text-primary); }
[data-theme="dark"] .auth-subtitle { color: var(--text-secondary); }
[data-theme="dark"] .form-field label { color: var(--text-secondary); }

[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after { border-color: var(--surface-border); }
[data-theme="dark"] .auth-divider span   { color: var(--text-muted); }
[data-theme="dark"] .auth-footer         { border-color: var(--surface-border); }
[data-theme="dark"] .auth-footer p       { color: var(--text-secondary); }

/* ════════════════════════════════════════
   STRUCTURE (same as before)
════════════════════════════════════════ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    position: relative;
}

.auth-container {
    max-width: 480px;
    width: 100%;
    animation: fadeIn 0.6s ease-out;
}

.auth-card {
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--surface-border);
    transition: background 0.3s, box-shadow 0.3s;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-orange));
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto var(--space-lg);
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.auth-title {
    font-size: 2rem;
    color: var(--dark-blue);
    margin-bottom: var(--space-xs);
    transition: color 0.3s;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    transition: color 0.3s;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-field {
    position: relative;
    margin-bottom: 0.5rem;
}

.form-field label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.625rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.form-field input,
.form-field select {
    width: 100%;
    font-family: var(--font-display);
    font-size: 1rem;
    padding: 1rem 1.25rem;
    border: 2px solid var(--surface-border);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all var(--transition-base);
    outline: none;
}

.form-field input::placeholder { color: var(--text-muted); }
.form-field input:focus,
.form-field select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30,136,229,0.15);
}

.form-field input:hover:not(:disabled),
.form-field select:hover:not(:disabled) { border-color: var(--primary-blue); }

.form-field input:disabled,
.form-field select:disabled { background: var(--light-gray); cursor: not-allowed; opacity: 0.6; }

.form-field small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: var(--space-lg) 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid var(--surface-border);
    transition: border-color 0.3s;
}

.auth-divider span {
    padding: 0 var(--space-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 2px solid var(--surface-border);
    transition: border-color 0.3s;
}

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

/* ── Error / Success ────────────────────────────────────────── */
.auth-error {
    background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(220,38,38,0.05));
    color: var(--error);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--error);
    font-weight: 500;
    margin-bottom: var(--space-lg);
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9375rem;
}

.auth-error::before { content: '⚠'; font-size: 1.25rem; flex-shrink: 0; }

.auth-success {
    background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(5,150,105,0.05));
    color: var(--success);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--success);
    font-weight: 500;
    margin-bottom: var(--space-lg);
    animation: slideIn 0.3s ease-out;
    font-size: 0.9375rem;
}

/* ── Settings-specific styles ───────────────────────────────── */
.settings-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-blue);
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--surface-border);
    margin-bottom: 0.25rem;
}

/* ── Password toggle ────────────────────────────────────────── */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    transition: color var(--transition-fast);
}

.password-toggle:hover { color: var(--primary-blue); }

.forgot-password { text-align: right; margin-top: calc(-1 * var(--space-sm)); }
.forgot-password a { font-size: 0.875rem; color: var(--primary-blue); font-weight: 500; }

/* ── Decorative blobs ───────────────────────────────────────── */
.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(30,136,229,0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,109,0,0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .auth-wrapper  { padding: var(--space-md); }
    .auth-card     { padding: var(--space-xl); }
    .auth-logo     { max-width: 160px; }
    .auth-title    { font-size: 1.5rem; }
    .form-field input,
    .form-field select { padding: 0.875rem 1rem; }
}

@media (max-width: 480px) {
    .auth-card  { padding: var(--space-lg); }
    .auth-title { font-size: 1.375rem; }
    .auth-form  { gap: var(--space-md); }
}
/* Fix logo vertical shift between light/dark */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-logo {
    height: 80px;          /* lock height */
    width: auto;
    display: block;
    object-fit: contain;
}