/* ═══════════════════════════════════════════════════════════
   UMWEKA ACADEMY — Auth Pages (Login / Register / Forgot)
═══════════════════════════════════════════════════════════ */

/* ── Layout ──────────────────────────────────── */
.auth-body {
    min-height: 100vh;
    background: var(--dark);
}

.auth-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ── Left Panel ───────────────────────────────── */
.auth-panel {
    position: relative;
    background: var(--dark-2);
    overflow: hidden;
    border-right: 1px solid var(--border);
}

/* Ambient glow */
.auth-panel::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(13,110,253,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.auth-panel::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -60px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(111,66,193,0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Grid texture */
.auth-panel-inner {
    position: relative;
    z-index: 2;
    padding: 48px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

.auth-panel-logo { margin-bottom: auto; text-decoration: none; }

.auth-panel-content {
    margin-top: auto;
    padding-top: 48px;
}

.auth-panel-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 400;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 16px;
}
.auth-panel-title em { font-style: italic; color: var(--accent); }

.auth-panel-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 380px;
    margin-bottom: 32px;
}

.auth-panel-stats {
    display: flex;
    gap: 28px;
    margin-bottom: 36px;
}
.ap-stat { display: flex; flex-direction: column; }
.ap-stat-num {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}
.ap-stat-lbl { font-size: 11px; color: var(--text-muted); font-weight: 500; }

.auth-panel-testimonial {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.apt-quote {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 14px;
}
.apt-author { display: flex; align-items: center; gap: 10px; }
.apt-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #6f42c1);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.apt-name { font-size: 12px; font-weight: 700; color: #fff; }
.apt-role { font-size: 11px; color: var(--text-muted); }

/* Decorative floating emojis */
.auth-panel-deco {
    position: absolute;
    font-size: 28px;
    opacity: 0.12;
    pointer-events: none;
    user-select: none;
}
.deco-1 { top: 20%; right: 12%; animation: float-a 5s ease-in-out infinite; }
.deco-2 { top: 40%; right: 6%; animation: float-b 7s ease-in-out infinite; }
.deco-3 { top: 60%; right: 16%; animation: float-a 6s ease-in-out infinite reverse; }

/* ── Right Panel (Form) ───────────────────────── */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    overflow-y: auto;
}

.auth-form-inner {
    width: 100%;
    max-width: 420px;
}

/* Mobile logo — hidden on desktop */
.auth-mobile-logo {
    display: none;
    text-decoration: none;
    margin-bottom: 32px;
}

/* ── Form Box ─────────────────────────────────── */
.auth-box {
    background: var(--dark-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    position: relative;
    overflow: hidden;
}
.auth-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(13,110,253,0.4), transparent);
}

.auth-box-title {
    font-family: 'DM Serif Display', serif;
    font-size: 26px;
    font-weight: 400;
    color: #fff;
    margin-bottom: 6px;
}

.auth-box-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.6;
}

/* ── Form Fields ──────────────────────────────── */
.af-group {
    margin-bottom: 18px;
}

.af-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 7px;
    letter-spacing: 0.3px;
}

.af-input-wrap {
    position: relative;
}

.af-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 14px;
    color: #fff;
    font-family: 'Sora', sans-serif;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    outline: none;
}

.af-input::placeholder { color: rgba(255,255,255,0.25); }

.af-input:focus {
    border-color: var(--primary);
    background: rgba(13,110,253,0.06);
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

/* Input with icon */
.af-input-wrap .af-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.25);
    display: flex;
    pointer-events: none;
}
.af-input-wrap .af-icon + .af-input { padding-left: 40px; }

/* Password toggle */
.af-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 2px;
    transition: color 0.2s;
}
.af-pw-toggle:hover { color: rgba(255,255,255,0.7); }
.af-input-wrap .af-pw-toggle ~ .af-input { padding-right: 42px; }

/* select */
.af-select {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 14px;
    color: #fff;
    font-family: 'Sora', sans-serif;
    transition: border-color 0.2s;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
}
.af-select:focus {
    border-color: var(--primary);
    background-color: rgba(13,110,253,0.06);
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}
.af-select option { background: #1a2236; color: #fff; }

/* Inline row (two fields side by side) */
.af-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Field hint */
.af-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ── Submit Button ────────────────────────────── */
.af-submit {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    box-shadow: 0 4px 14px rgba(13,110,253,0.3);
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.af-submit:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(13,110,253,0.4);
}
.af-submit:active { transform: scale(0.98); }

.af-submit-accent {
    background: var(--accent);
    color: #0a0e1a;
    box-shadow: 0 4px 14px rgba(245,166,35,0.3);
}
.af-submit-accent:hover {
    background: var(--accent-dark);
    box-shadow: 0 6px 20px rgba(245,166,35,0.4);
}

/* ── Divider ──────────────────────────────────── */
.af-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
}
.af-divider::before,
.af-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.af-divider span {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Footer links ─────────────────────────────── */
.af-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
    color: var(--text-muted);
}
.af-footer a {
    color: #60a5fa;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.af-footer a:hover { color: var(--primary); }

/* Forgot password link */
.af-forgot {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    margin-top: -10px;
    margin-bottom: 20px;
    transition: color 0.2s;
}
.af-forgot:hover { color: #60a5fa; }

/* ── Terms notice ─────────────────────────────── */
.af-terms {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    text-align: center;
    margin-top: 18px;
    line-height: 1.6;
}
.af-terms a { color: rgba(255,255,255,0.45); text-decoration: underline; }

/* ── Flash message overrides for dark ────────── */
.auth-form-inner .alert-success {
    background: rgba(74,222,128,0.1);
    border: 1px solid rgba(74,222,128,0.25);
    color: #4ade80;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
}
.auth-form-inner .alert-error {
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.25);
    color: #f87171;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* Flash override: helpers.php outputs inline styles, we patch them here */
.auth-form-inner div[style*="d4edda"] {
    background: rgba(74,222,128,0.1) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(74,222,128,0.25) !important;
    border-radius: 10px !important;
}
.auth-form-inner div[style*="f8d7da"] {
    background: rgba(248,113,113,0.1) !important;
    color: #f87171 !important;
    border: 1px solid rgba(248,113,113,0.25) !important;
    border-radius: 10px !important;
}

/* ── Password strength ────────────────────────── */
.pw-strength {
    margin-top: 6px;
    display: none;
}
.pw-strength.visible { display: block; }
.pw-strength-bar {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 4px;
}
.pw-strength-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.3s, background 0.3s;
}
.pw-strength-label {
    font-size: 11px;
    font-weight: 600;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-panel { display: none; }
    .auth-form-panel { padding: 32px 24px; min-height: 100vh; }
    .auth-mobile-logo { display: flex; }
}
