/* FDFE.IR Auth Styles */

:root {
    --primary: #00A86B;
    --primary-dark: #008f5a;
    --secondary: #C9A227;
    --bg: #f0f4f8;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-border: rgba(255, 255, 255, 0.5);
    --text: #1a1a2e;
    --text-muted: #64748b;
    --error: #ef4444;
    --success: #22c55e;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', 'Vazirmatn', system-ui, sans-serif;
}

[data-theme="dark"] {
    --bg: #0f1419;
    --surface: rgba(30, 35, 50, 0.8);
    --surface-border: rgba(255, 255, 255, 0.08);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
}

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

body.auth-body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
}

[dir="rtl"] body.auth-body { font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif; }

.auth-ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.auth-orb--1 {
    width: 350px; height: 350px;
    background: var(--primary);
    top: -5%; right: 10%;
}

.auth-orb--2 {
    width: 280px; height: 280px;
    background: var(--secondary);
    bottom: 5%; left: 5%;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    overflow: hidden;
}

.auth-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--surface-border);
}

.auth-card__body { padding: 2rem 1.5rem; }

.auth-card__footer {
    padding: 1rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--surface-border);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 800;
}

.logo-dot { color: var(--primary); }

.auth-controls { display: flex; gap: 0.5rem; }

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border: 1px solid var(--surface-border);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-icon:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun { display: none; }

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-desc {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.auth-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.5);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

[data-theme="dark"] .form-input { background: rgba(0,0,0,0.2); }

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.15);
}

.form-input.is-invalid { border-color: var(--error); }

.form-error {
    font-size: 0.8rem;
    color: var(--error);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-hint strong { color: var(--primary); }

.password-requirements {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: grid;
    gap: 0.25rem;
}

.password-requirements li::before {
    content: '○';
    margin-inline-end: 0.4rem;
    color: var(--text-muted);
}

.password-requirements li.met {
    color: var(--primary);
}

.password-requirements li.met::before {
    content: '●';
    color: var(--primary);
}

.input-prefix {
    display: flex;
    align-items: center;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(255,255,255,0.5);
}

[data-theme="dark"] .input-prefix { background: rgba(0,0,0,0.2); }

.input-prefix__text {
    padding: 0.75rem 0 0.75rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
    font-family: monospace;
}

[dir="rtl"] .input-prefix__text {
    padding: 0.75rem 1rem 0.75rem 0;
}

.input-prefix .form-input {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.input-password {
    position: relative;
    display: flex;
}

.input-password .form-input { padding-inline-end: 2.75rem; }

.btn-toggle-password {
    position: absolute;
    top: 50%;
    inset-inline-end: 0.75rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
}

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

.icon-eye-off { display: none; }
.btn-toggle-password.active .icon-eye { display: none; }
.btn-toggle-password.active .icon-eye-off { display: block; }

.password-strength { margin-top: 0.25rem; }

.strength-bar {
    height: 4px;
    background: var(--surface-border);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width var(--transition), background var(--transition);
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: block;
}

.form-row { display: flex; align-items: center; }

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}

.form-checkbox input { accent-color: var(--primary); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 168, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 168, 107, 0.4);
}

.btn-glass {
    background: transparent;
    border: 1px solid var(--surface-border);
    color: var(--text);
}

.btn-glass:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-block { width: 100%; }

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

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

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

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

/* Verify states */
.verify-state { text-align: center; }

.verify-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px; height: 80px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.verify-icon--success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.verify-icon--pending {
    background: rgba(0, 168, 107, 0.12);
    color: var(--primary);
}

.verify-email {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: rgba(0, 168, 107, 0.06);
    border-radius: var(--radius-sm);
}