/* ============================================================
   AUTH PAGES — Login, Register, Forgot Password
   Yuva Career Club Course Marketplace
   ============================================================ */

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

:root {
    --auth-primary:   #6c63ff;
    --auth-dark:      #1e1b4b;
    --auth-text:      #1f2937;
    --auth-muted:     #6b7280;
    --auth-border:    #e5e7eb;
    --auth-bg:        #f5f5ff;
    --auth-white:     #ffffff;
    --auth-error:     #ef4444;
    --auth-success:   #10b981;
    --auth-radius:    12px;
    --auth-shadow:    0 20px 60px rgba(108,99,255,.12);
}

/* ── Body ── */
body.auth-body {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--auth-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    color: var(--auth-text);
}

/* ── Wrapper: two-column on desktop ── */
.auth-wrapper {
    display: flex;
    width: 100%;
    max-width: 960px;
    min-height: 560px;
    background: var(--auth-white);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    overflow: hidden;
}

/* ── Left panel: branding ── */
.auth-brand {
    flex: 1;
    background: linear-gradient(145deg, var(--auth-primary) 0%, #4f46e5 60%, var(--auth-dark) 100%);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.auth-brand::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    top: -80px; right: -80px;
}
.auth-brand::after {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
    bottom: -60px; left: -40px;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    text-decoration: none;
}
.auth-brand-logo img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}
.auth-brand-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.auth-brand-logo-text span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    opacity: .75;
    letter-spacing: .5px;
}

.auth-brand-heading {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 16px;
    position: relative;
}

.auth-brand-sub {
    font-size: 15px;
    opacity: .85;
    line-height: 1.6;
    margin-bottom: 36px;
    position: relative;
}

.auth-brand-features {
    list-style: none;
    position: relative;
}
.auth-brand-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    opacity: .9;
    margin-bottom: 12px;
}
.auth-brand-features li i {
    background: rgba(255,255,255,.2);
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

/* ── Right panel: form ── */
.auth-card {
    flex: 1;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 480px;
}

.auth-card-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 6px;
}
.auth-card-subtitle {
    font-size: 14px;
    color: var(--auth-muted);
    margin-bottom: 32px;
}
.auth-card-subtitle a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
}
.auth-card-subtitle a:hover { text-decoration: underline; }

/* ── Alert ── */
.auth-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.auth-alert i { flex-shrink: 0; margin-top: 1px; }
.auth-alert.success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.auth-alert.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.auth-alert.info    { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }

/* ── Form Groups ── */
.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.auth-form-group {
    margin-bottom: 18px;
}
.auth-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 6px;
}
.auth-input-wrap {
    position: relative;
}
.auth-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-muted);
    font-size: 14px;
    pointer-events: none;
}
.auth-input-wrap .toggle-pass {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-muted);
    font-size: 14px;
    cursor: pointer;
    pointer-events: all;
    background: none;
    border: none;
    padding: 0;
}
.auth-input-wrap .toggle-pass:hover { color: var(--auth-primary); }

.auth-input {
    width: 100%;
    height: 46px;
    border: 1.5px solid var(--auth-border);
    border-radius: 8px;
    padding: 0 42px;
    font-size: 14px;
    font-family: inherit;
    color: var(--auth-text);
    background: #fafafa;
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
}
.auth-input:focus {
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108,99,255,.12);
}
.auth-input.is-error { border-color: var(--auth-error); }
.auth-field-error {
    font-size: 12px;
    color: var(--auth-error);
    margin-top: 4px;
}

/* ── Extras ── */
.auth-form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
}
.auth-form-meta label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: var(--auth-muted);
}
.auth-form-meta a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
}
.auth-form-meta a:hover { text-decoration: underline; }

/* ── Submit Button ── */
.auth-btn {
    width: 100%;
    height: 48px;
    background: var(--auth-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s, transform .1s, box-shadow .2s;
}
.auth-btn:hover {
    background: #5a52d5;
    box-shadow: 0 4px 16px rgba(108,99,255,.35);
}
.auth-btn:active { transform: scale(.98); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: var(--auth-muted);
    font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

/* ── Terms / Footer note ── */
.auth-terms {
    font-size: 12px;
    color: var(--auth-muted);
    text-align: center;
    margin-top: 16px;
    line-height: 1.6;
}
.auth-terms a { color: var(--auth-primary); text-decoration: none; }
.auth-terms a:hover { text-decoration: underline; }

/* ── Password strength ── */
.pass-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--auth-border);
    margin-top: 6px;
    overflow: hidden;
}
.pass-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width .3s, background .3s;
}
.pass-strength-label {
    font-size: 11px;
    margin-top: 3px;
    color: var(--auth-muted);
}

/* ── Top back link ── */
.auth-back-home {
    position: fixed;
    top: 16px;
    left: 20px;
    font-size: 13px;
    color: var(--auth-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    transition: color .2s;
}
.auth-back-home:hover { color: var(--auth-primary); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
        max-width: 480px;
        min-height: unset;
    }
    .auth-brand {
        padding: 32px 28px;
    }
    .auth-brand-heading { font-size: 22px; }
    .auth-brand-sub { display: none; }
    .auth-brand-features { display: none; }
    .auth-card {
        padding: 32px 28px;
        max-width: 100%;
    }
    .auth-form-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 420px) {
    body.auth-body { padding: 0; align-items: flex-start; }
    .auth-wrapper { border-radius: 0; box-shadow: none; min-height: 100vh; }
    .auth-brand { padding: 20px; }
    .auth-brand-logo-text { font-size: 17px; }
    .auth-card { padding: 24px 20px; }
}
