/* ═══════════════════════════════════════════════════════════════
   ACBIZ GLOBAL — Auth Pages Stylesheet v2.1
   Mobile-first · No @import dependencies
   ═══════════════════════════════════════════════════════════════ */

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

:root {
    --blue:      #1d4ed8;
    --blue-l:    #3b82f6;
    --accent:    #06b6d4;
    --dark:      #0a0e1a;
    --white:     #ffffff;
    --bg:        #f1f5f9;
    --card:      #ffffff;
    --text:      #0f172a;
    --text-2:    #475569;
    --text-3:    #94a3b8;
    --border:    #e2e8f0;
    --radius:    12px;
    --font-head: 'Syne', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
}

html, body { height: 100%; font-family: var(--font-body); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }

/* ── Mobile: single column ───────────────────────────────────── */
.auth-shell { min-height: 100vh; display: flex; align-items: stretch; }

.auth-panel-left { display: none; } /* hidden on mobile */

.auth-panel-right {
    flex: 1;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    min-height: 100vh;
}

.apr-inner { width: 100%; max-width: 440px; display: flex; flex-direction: column; }

.apr-mobile-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.apr-mobile-brand .apl-brand-name { font-family: var(--font-head); font-weight: 800; font-size: 16px; color: var(--text); letter-spacing: -0.2px; display: block; }

.apr-back { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-3); }
.apr-back a { color: #64748b; transition: color .2s; display: inline-flex; align-items: center; gap: 5px; }
.apr-back a:hover { color: var(--blue); }

/* ── Form Wrap ───────────────────────────────────────────────── */
.auth-form-wrap {
    background: var(--card);
    border-radius: 18px;
    padding: 28px 24px 24px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #e8edf3;
}

.afh { text-align: center; margin-bottom: 28px; }
.afh-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, rgba(29,78,216,0.1), rgba(6,182,212,0.08));
    border: 1px solid rgba(29,78,216,0.15);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--blue);
    margin: 0 auto 16px;
}
.afh-icon-reg { background: linear-gradient(135deg, rgba(5,150,105,0.1), rgba(16,185,129,0.06)); border-color: rgba(5,150,105,0.15); color: #059669; }
.afh h2 { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 5px; letter-spacing: -0.3px; }
.afh p  { font-size: 14px; color: var(--text-3); }

/* Groups */
.af-group { margin-bottom: 16px; }
.af-group label { display: block; font-size: 12.5px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.af-optional { font-weight: 400; color: var(--text-3); font-size: 12px; }
.af-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.af-label-row label { margin-bottom: 0; }
.af-forgot { font-size: 12.5px; color: var(--blue); font-weight: 500; transition: color .2s; }
.af-forgot:hover { color: #1e3a8a; }

.af-input-wrap { position: relative; display: flex; align-items: center; }
.af-input-icon { position: absolute; left: 12px; color: #94a3b8; font-size: 13px; pointer-events: none; transition: color .2s; z-index: 1; }
.af-input-wrap input {
    width: 100%; padding: 11px 40px 11px 38px;
    border: 1.5px solid var(--border); border-radius: var(--radius);
    font-size: 14px; font-family: var(--font-body); color: var(--text);
    background: #f8fafc; outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none;
}
.af-input-wrap input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(29,78,216,0.1); }
.af-input-wrap input::placeholder { color: #cbd5e1; }
.af-toggle-pw { position: absolute; right: 12px; background: none; border: none; cursor: pointer; color: #94a3b8; font-size: 14px; padding: 0; transition: color .2s; display: flex; align-items: center; }
.af-toggle-pw:hover { color: #475569; }
.af-pw-match { position: absolute; right: 12px; color: #22c55e; font-size: 14px; }

.af-select-wrap { position: relative; display: flex; align-items: center; }
.af-select-wrap select { width: 100%; padding: 11px 36px 11px 12px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 14px; font-family: var(--font-body); color: var(--text); background: #f8fafc; outline: none; cursor: pointer; appearance: none; transition: border-color .2s; }
.af-select-wrap select:focus { border-color: var(--blue); }
.af-select-arrow { position: absolute; right: 12px; color: #94a3b8; font-size: 11px; pointer-events: none; }

.af-row-2 { display: grid; grid-template-columns: 1fr; gap: 0; }

.af-remember, .af-terms { margin-bottom: 18px; }
.af-check-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13.5px; color: #475569; line-height: 1.5; }
.af-check-label input[type="checkbox"] { display: none; }
.af-checkmark { width: 18px; height: 18px; border: 1.5px solid #cbd5e1; border-radius: 5px; background: #f8fafc; flex-shrink: 0; margin-top: 1px; transition: all .2s; position: relative; }
.af-check-label input:checked + .af-checkmark { background: var(--blue); border-color: var(--blue); }
.af-check-label input:checked + .af-checkmark::after { content: ''; display: block; position: absolute; top: 2px; left: 5px; width: 5px; height: 9px; border: 2px solid #fff; border-top: none; border-left: none; transform: rotate(45deg); }
.af-check-label a { color: var(--blue); font-weight: 500; }

/* Password strength */
.pw-strength { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.pw-bar { flex: 1; height: 4px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.pw-fill { height: 100%; border-radius: 4px; transition: width .3s, background .3s; width: 0; }
.pw-label { font-size: 11px; font-weight: 600; white-space: nowrap; }
.pw-weak   .pw-fill { width: 30%; background: #ef4444; }
.pw-weak   .pw-label { color: #ef4444; }
.pw-fair   .pw-fill { width: 55%; background: #f59e0b; }
.pw-fair   .pw-label { color: #f59e0b; }
.pw-good   .pw-fill { width: 80%; background: #3b82f6; }
.pw-good   .pw-label { color: #3b82f6; }
.pw-strong .pw-fill { width: 100%; background: #22c55e; }
.pw-strong .pw-label { color: #22c55e; }

/* Submit */
.af-submit { width: 100%; padding: 13px; background: linear-gradient(135deg, var(--blue), #2563eb); color: #fff; border: none; border-radius: var(--radius); font-size: 15px; font-weight: 700; font-family: var(--font-body); cursor: pointer; transition: opacity .2s; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 18px; box-shadow: 0 4px 20px rgba(29,78,216,0.3); }
.af-submit:hover { opacity: 0.92; }
.af-submit-reg { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 4px 20px rgba(5,150,105,0.3); }

/* Divider */
.af-divider { text-align: center; position: relative; margin: 4px 0 14px; }
.af-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: #e2e8f0; }
.af-divider span { position: relative; background: #fff; padding: 0 14px; font-size: 12.5px; color: #94a3b8; }

/* Social */
.af-socials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.af-social-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 1.5px solid #e2e8f0; border-radius: var(--radius); background: #f8fafc; font-size: 13.5px; font-weight: 600; color: #374151; font-family: var(--font-body); cursor: pointer; transition: border-color .2s, background .2s; }
.af-social-btn:hover { border-color: #cbd5e1; background: #fff; }

/* Trust */
.af-trust { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.af-trust span { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: #94a3b8; }
.af-trust i { color: #22c55e; font-size: 11px; }

/* Switch */
.af-switch { text-align: center; font-size: 14px; color: #64748b; margin-top: 18px; }
.af-switch a { color: var(--blue); font-weight: 600; transition: color .2s; }
.af-switch a:hover { color: #1e3a8a; }

/* Flash inside auth */
.flash-msg { padding: 12px 16px; border-radius: var(--radius); font-size: 13.5px; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.flash-msg.flash-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flash-msg.flash-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.flash-msg.flash-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.flash-msg.flash-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Left panel (desktop only) ───────────────────────────────── */
.apl-brand { display: flex; align-items: center; margin-bottom: auto; padding-bottom: 40px; }
.apl-brand-name { font-family: var(--font-head); font-weight: 800; font-size: 17px; color: #fff; letter-spacing: -0.2px; }
.apl-headline { margin-bottom: 40px; }
.apl-headline h1 { font-family: var(--font-head); font-size: clamp(28px, 3vw, 42px); font-weight: 800; line-height: 1.1; letter-spacing: -1px; margin-bottom: 14px; color: #fff; }
.apl-highlight { background: linear-gradient(135deg, #60a5fa, #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.apl-headline p { font-size: 15px; color: rgba(255,255,255,0.45); line-height: 1.7; max-width: 360px; }
.apl-features { display: flex; flex-direction: column; gap: 18px; margin-bottom: 40px; }
.apl-feat { display: flex; align-items: flex-start; gap: 14px; }
.apl-feat-icon { width: 38px; height: 38px; background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.2); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--blue-l); flex-shrink: 0; }
.apl-feat strong { display: block; font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,0.85); margin-bottom: 2px; }
.apl-feat span   { font-size: 12.5px; color: rgba(255,255,255,0.38); line-height: 1.5; }
.apl-stats { display: flex; align-items: center; gap: 24px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.06); }
.apl-stat { text-align: center; }
.apl-stat strong { display: block; font-family: var(--font-head); font-size: 20px; font-weight: 800; color: #fff; }
.apl-stat span   { font-size: 11px; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.5px; }
.apl-stat-div { width: 1px; height: 28px; background: rgba(255,255,255,0.08); }

/* Orbs */
.apl-bg { position: absolute; inset: 0; }
.apl-orb { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.apl-orb-1 { width: 400px; height: 400px; background: rgba(29,78,216,0.2); top: -100px; left: -80px; }
.apl-orb-2 { width: 300px; height: 300px; background: rgba(6,182,212,0.1); bottom: 40px; right: -60px; }
.apl-orb-3 { width: 200px; height: 200px; background: rgba(124,58,237,0.1); bottom: 160px; left: 80px; }

/* ══════════════════════════════════════════════════════════
   TABLET+ — show left panel
══════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .auth-shell { grid-template-columns: 1fr 1fr; display: grid; }
    .auth-panel-left {
        display: flex; flex-direction: column;
        position: relative;
        background: linear-gradient(155deg, #0d1635 0%, #0a0e1a 60%, #060c1a 100%);
        overflow: hidden;
    }
    .apl-content { position: relative; z-index: 2; display: flex; flex-direction: column; height: 100%; padding: 40px 48px; }
    .apr-mobile-brand { display: none; }
    .auth-panel-right { min-height: 0; }
    .af-row-2 { grid-template-columns: 1fr 1fr; }
    .auth-form-wrap { padding: 36px 36px 28px; }
}

@media (min-width: 1100px) {
    .auth-shell { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   AUTH RESPONSIVE AUDIT — v48
   ══════════════════════════════════════════════════════════════ */

/* ── Below 768px: mobile-only form ─────────────────────────── */
@media (max-width: 767px) {
    .auth-shell      { grid-template-columns: 1fr; min-height: 100svh; }
    .auth-panel-left { display: none; }
    .auth-panel-right{
        min-height: 100svh; display: flex;
        align-items: flex-start;
        padding: 0;
    }
    .auth-form-wrap  { width: 100%; max-width: 100%; padding: 28px 20px 24px; border-radius: 0; border: none; box-shadow: none; min-height: 100svh; }
    .af-row-2        { grid-template-columns: 1fr; }
    /* Mobile brand at top of form */
    .apr-mobile-brand { display: flex; }
}

/* ── 375px: very small phones ──────────────────────────────── */
@media (max-width: 374px) {
    .auth-form-wrap  { padding: 20px 14px 20px; }
    .af-input        { font-size: 15px; } /* prevents iOS zoom */
    .af-input-wrap input { font-size: 15px; }
    .af-btn          { font-size: 14px; padding: 13px; }
    .af-title        { font-size: 22px; }
}

/* ── Prevent iOS input zoom (font-size must be >= 16px) ──────── */
@media (max-width: 767px) {
    .af-input-wrap input,
    .af-input-wrap textarea,
    .af-input-wrap select { font-size: 16px; }
}

/* ── Focus ring for accessibility ───────────────────────────── */
.af-input-wrap input:focus-visible { outline: 2px solid #3b82f6; outline-offset: 1px; }
.af-btn:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
