/* ============================================================
   EduPortal — Auth Pages Stylesheet
   Token-driven design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-wrapper { min-height: 100vh; display: flex; }

/* ─── Left Panel ─── */
.auth-panel {
    flex: 1;
    background: linear-gradient(135deg, #2b2c40 0%, #1a1b2e 100%);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 48px;
    position: relative; overflow: hidden;
}
.auth-panel::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(115,103,240,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0,195,209,0.1) 0%, transparent 50%);
}
.auth-panel-content { position: relative; z-index: 2; text-align: center; max-width: 380px; }
.auth-panel-logo {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; margin-bottom: 36px;
}
.auth-panel-logo .logo-icon {
    width: 42px; height: 42px;
    background: var(--primary);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 6px rgba(115,103,240,0.3);
}
.auth-panel-logo span { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }

.auth-panel h2 { font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 12px; line-height: 1.25; }
.auth-panel p { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.65; }

.auth-features { margin-top: 40px; text-align: left; }
.auth-feature-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }
.auth-feature-icon {
    width: 34px; height: 34px; min-width: 34px;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
}
.auth-feature-item h4 { font-size: 13.6px; font-weight: 600; color: rgba(255,255,255,0.9); margin-bottom: 2px; }
.auth-feature-item p { font-size: 12.8px; color: rgba(255,255,255,0.4); }

.auth-decor-circle {
    position: absolute; border-radius: 50%;
    border: 1px solid rgba(115,103,240,0.08);
}
.auth-decor-circle:nth-child(1) { width: 280px; height: 280px; top: -70px; right: -50px; }
.auth-decor-circle:nth-child(2) { width: 180px; height: 180px; bottom: -30px; left: -30px; }
.auth-decor-circle:nth-child(3) { width: 100px; height: 100px; top: 40%; right: 10%; }

/* ─── Right Panel ─── */
.auth-form-side {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 48px;
    background: var(--bg);
}
.auth-form-wrapper { width: 100%; max-width: 420px; }

.auth-lang-switch { display: flex; justify-content: flex-end; margin-bottom: 28px; }
.auth-lang-switch .lang-switch { 
    display: flex; 
    background: #f1f5f9; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    padding: 4px; 
}
.auth-lang-switch .lang-switch a { 
    padding: 6px 14px; 
    font-size: 12px; 
    font-weight: 600; 
    text-decoration: none; 
    color: var(--text-muted); 
    border-radius: 6px; 
    transition: all 0.2s;
}
.auth-lang-switch .lang-switch a.active { 
    background: var(--primary); 
    color: #fff; 
    box-shadow: 0 2px 4px rgba(115,103,240,0.3);
}

.auth-form-wrapper h1 {
    font-size: 24px; font-weight: 700; color: var(--dark);
    margin-bottom: 4px; letter-spacing: -0.01em;
}
.auth-form-wrapper .subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }

/* ─── Form Elements ─── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 12.8px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font);
    color: var(--text);
    background: #fff;
    transition: border-color 200ms, box-shadow 200ms;
    outline: none;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(115,103,240,0.12);
}
.form-control::placeholder { color: var(--text-muted); opacity: 0.7; }
.form-control.error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.08);
}
.form-error { font-size: 12px; color: #EF4444; margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12.8px; color: var(--text-muted); margin-top: 5px; display: flex; justify-content: flex-end; }
.form-hint a { color: var(--primary); font-weight: 600; }
.form-hint a:hover { text-decoration: underline; }

.btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }

.auth-divider {
    display: flex; align-items: center; gap: 14px;
    margin: 20px 0; color: var(--text-muted); font-size: 12.8px; font-weight: 500;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.auth-footer { text-align: center; margin-top: 20px; font-size: 13.6px; color: var(--text-muted); }
.auth-footer a { color: var(--primary); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* Flash */
.flash {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: 8px;
    margin-bottom: 16px; font-size: 13.6px; font-weight: 500;
    animation: slideDown 250ms ease;
}
.flash-success { background: #E8F8EF; color: #1B7A41; border: 1px solid #B7E9C8; }
.flash-error { background: #FEF1F1; color: #C62828; border: 1px solid #F5C6C6; }
.flash-icon { font-size: 16px; }
.flash-close { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 16px; opacity: 0.5; color: inherit; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Responsive ─── */
@media (max-width: 900px) { .auth-panel { display: none; } .auth-form-side { padding: 28px 20px; } }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } .auth-form-wrapper h1 { font-size: 22px; } }
