/* ============================================================
   ACBIZ Connect — Auth Pages Stylesheet
   Login · Register · Forgot Password
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
    --ink:        #0a0e1a;
    --ink-2:      #131929;
    --ink-3:      #1d2540;
    --surface:    #1a2035;
    --muted:      #8892b0;
    --text:       #ccd6f6;
    --white:      #e8eeff;
    --accent:     #4f8ef7;
    --accent-2:   #7c5cfc;
    --accent-glow:#4f8ef740;
    --green:      #2dd4bf;
    --red:        #f87171;
    --border:     rgba(79,142,247,0.18);
    --border-2:   rgba(255,255,255,0.07);
    --radius:     12px;
    --font:       'Instrument Sans', sans-serif;
    --mono:       'JetBrains Mono', monospace;
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

body.auth-body {
    font-family: var(--font);
    background: var(--ink);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    overflow-x: hidden;
}

/* ── Layout: two-column split ─────────────────────────────── */
.auth-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Left panel — branding */
.auth-panel-left {
    flex: 0 0 480px;
    background: linear-gradient(160deg, var(--ink-3) 0%, var(--ink-2) 60%, rgba(79,142,247,0.05) 100%);
    border-right: 1px solid var(--border-2);
    padding: 48px 52px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Orb decorations */
.auth-panel-left::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(79,142,247,0.1) 0%, transparent 70%);
    top: -150px; right: -150px;
    pointer-events: none;
}
.auth-panel-left::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(124,92,252,0.08) 0%, transparent 70%);
    bottom: -80px; left: -60px;
    pointer-events: none;
}

/* Right panel — form */
.auth-panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: var(--ink);
}

/* ── Branding side content ───────────────────────────────── */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    position: relative;
    z-index: 1;
}
.auth-logo-mark {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -1px;
    box-shadow: 0 0 24px var(--accent-glow);
    flex-shrink: 0;
}
.auth-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.3px;
}
.auth-logo-text span { color: var(--accent); }

.auth-brand-body {
    position: relative;
    z-index: 1;
}
.auth-brand-tagline {
    font-size: 11px;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--mono);
    margin-bottom: 20px;
}
.auth-brand-headline {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: 20px;
}
.auth-brand-headline span {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-brand-desc {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 36px;
}

/* Feature bullet list */
.auth-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.auth-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--muted);
}
.auth-features li .af-icon {
    width: 28px; height: 28px;
    background: rgba(79,142,247,0.1);
    border: 1px solid rgba(79,142,247,0.2);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: var(--muted);
    font-family: var(--mono);
}

/* ── Form card ───────────────────────────────────────────── */
.auth-card {
    width: 100%;
    max-width: 440px;
    animation: fadeUp 0.5s var(--transition) both;
}

.auth-card-header {
    margin-bottom: 36px;
}
.auth-card-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--white);
    margin-bottom: 8px;
}
.auth-card-header p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

/* Flash messages */
.auth-flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}
.auth-flash.error   { background: rgba(248,113,113,0.1);  border: 1px solid rgba(248,113,113,0.25); color: #fca5a5; }
.auth-flash.success { background: rgba(45,212,191,0.1);   border: 1px solid rgba(45,212,191,0.25);  color: #6ee7b7; }
.auth-flash.warning { background: rgba(251,191,36,0.1);   border: 1px solid rgba(251,191,36,0.25);  color: #fde68a; }

/* Form elements */
.auth-form { display: flex; flex-direction: column; gap: 20px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.2px;
}
.auth-field-hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.auth-input-wrap { position: relative; }
.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
    opacity: 0.5;
}
.auth-input-wrap input {
    width: 100%;
    background: var(--ink-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    padding: 13px 14px 13px 42px;
    font-size: 15px;
    color: var(--white);
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-input-wrap input::placeholder { color: var(--muted); opacity: 0.7; }
.auth-input-wrap input:focus {
    border-color: var(--accent);
    background: var(--ink-3);
    box-shadow: 0 0 0 3px rgba(79,142,247,0.12);
}
.auth-input-wrap input:autofill,
.auth-input-wrap input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 100px var(--ink-3) inset;
    -webkit-text-fill-color: var(--white);
    caret-color: var(--white);
}

/* Password toggle */
.auth-eye-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 0;
    line-height: 1;
}
.auth-eye-btn:hover { opacity: 1; }

/* Row for label + forgot link */
.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.auth-label-row a {
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}
.auth-label-row a:hover { opacity: 0.8; }

/* Checkbox */
.auth-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}
.auth-checkbox-row input[type="checkbox"] {
    width: 16px; height: 16px;
    margin-top: 2px;
    accent-color: var(--accent);
    flex-shrink: 0;
    cursor: pointer;
}
.auth-checkbox-row a { color: var(--accent); text-decoration: none; }
.auth-checkbox-row a:hover { text-decoration: underline; }

/* Submit button */
.auth-submit {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    box-shadow: 0 0 30px var(--accent-glow), 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.2s var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 0 40px var(--accent-glow), 0 8px 20px rgba(0,0,0,0.3); }
.auth-submit:active { transform: translateY(0); }
.auth-submit.loading { opacity: 0.7; pointer-events: none; }
.auth-submit .spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: spin 0.7s linear infinite;
}
.auth-submit.loading .spinner { display: block; }
.auth-submit.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

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

/* Footer link */
.auth-card-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: var(--muted);
}
.auth-card-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.auth-card-footer a:hover { text-decoration: underline; }

/* Back to home */
.auth-back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 36px;
    transition: color 0.2s;
}
.auth-back-home:hover { color: var(--white); }

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

/* Trusted badge strip */
.auth-trust-strip {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-2);
    flex-wrap: wrap;
}
.auth-trust-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--muted);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .auth-panel-left { display: none; }
    .auth-panel-right { padding: 40px 24px; align-items: flex-start; padding-top: 60px; }
    .auth-card { max-width: 100%; }
}
@media (max-width: 480px) {
    .auth-panel-right { padding: 32px 20px; }
}
