/* ═══════════════════════════════
   StaffAdmin — Auth Pages CSS
   ═══════════════════════════════ */

:root {
    --accent:  #4f6ef7;
    --accent2: #7c3aed;
    --glow:    rgba(79,110,247,.22);
    --text:    #0f172a;
    --muted:   #64748b;
    --border:  #e2e8f0;
    --bg:      #f8fafc;
    --card:    #ffffff;
    --success: #10b981;
    --danger:  #ef4444;
    --warning: #f59e0b;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
select { color-scheme: light; background-color: #ffffff !important; color: #1e293b !important; }
select option, select optgroup { background-color: #ffffff; color: #1e293b; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
}

/* ─── Layout ─── */
.auth-wrap {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ─── Left brand panel ─── */
.auth-brand {
    width: 480px;
    flex-shrink: 0;
    background: linear-gradient(145deg, #1e1b4b 0%, #312e81 35%, #4338ca 65%, #4f6ef7 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}
.auth-brand::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.auth-brand::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px; border-radius: 50%;
    background: rgba(255,255,255,.04);
    bottom: -100px; right: -100px;
}

.brand-top { position: relative; z-index: 1; }
.brand-logo {
    display: inline-flex; align-items: center; gap: 10px;
    text-decoration: none; margin-bottom: 3rem;
}
.brand-logo-icon {
    width: 40px; height: 40px; border-radius: 11px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px;
    border: 1px solid rgba(255,255,255,.2);
}
.brand-logo-text { font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }

.brand-headline { font-size: 1.85rem; font-weight: 800; color: #fff; line-height: 1.25; letter-spacing: -.03em; margin-bottom: 1rem; }
.brand-headline span { color: #a5b4fc; }
.brand-sub { font-size: .9rem; color: rgba(255,255,255,.65); line-height: 1.6; margin-bottom: 2rem; }

.brand-features { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.brand-feature {
    display: flex; align-items: center; gap: 10px;
    font-size: .84rem; color: rgba(255,255,255,.8);
}
.brand-feature-icon {
    width: 30px; height: 30px; border-radius: 8px;
    background: rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; flex-shrink: 0;
}

.brand-bottom { position: relative; z-index: 1; }
.brand-stats { display: flex; gap: 24px; margin-bottom: 1.5rem; }
.brand-stat-val { font-size: 1.35rem; font-weight: 800; color: #fff; }
.brand-stat-lbl { font-size: .72rem; color: rgba(255,255,255,.55); margin-top: 1px; }
.brand-testimonial {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px; padding: 14px 16px;
    backdrop-filter: blur(8px);
}
.brand-testimonial p { font-size: .82rem; color: rgba(255,255,255,.8); margin: 0 0 10px; font-style: italic; line-height: 1.5; }
.brand-testimonial-author { display: flex; align-items: center; gap: 8px; }
.brand-testimonial-author .av { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg,#a5b4fc,#818cf8); display: flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 700; color: #fff; }
.brand-testimonial-author span { font-size: .75rem; color: rgba(255,255,255,.65); }
.brand-testimonial-author strong { color: rgba(255,255,255,.9); font-weight: 600; }

/* ─── Right form panel ─── */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: var(--bg);
    overflow-y: auto;
}
.auth-form-box {
    width: 100%;
    max-width: 420px;
}

/* ─── Form header ─── */
.auth-header { margin-bottom: 2rem; }
.auth-header h1 { font-size: 1.5rem; font-weight: 800; color: var(--text); letter-spacing: -.02em; margin: 0 0 6px; }
.auth-header p  { font-size: .875rem; color: var(--muted); margin: 0; }

/* ─── Step indicator ─── */
.auth-steps { display: flex; align-items: center; gap: 0; margin-bottom: 1.75rem; }
.auth-step {
    display: flex; align-items: center; gap: 8px;
    font-size: .78rem; font-weight: 600; flex: 1;
    position: relative;
}
.auth-step:not(:last-child)::after {
    content: '';
    flex: 1; height: 1px;
    background: var(--border);
    margin: 0 8px;
}
.auth-step.active:not(:last-child)::after { background: var(--accent); }
.step-num {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 700; flex-shrink: 0;
    background: var(--border); color: var(--muted);
    transition: background .2s, color .2s;
}
.auth-step.active .step-num, .auth-step.done .step-num {
    background: var(--accent); color: #fff;
}
.auth-step.active .step-label { color: var(--text); }
.step-label { color: var(--muted); white-space: nowrap; }

/* ─── Form fields ─── */
.form-group { margin-bottom: 1.1rem; }
.form-label {
    display: block; font-size: .8rem; font-weight: 600;
    color: var(--text); margin-bottom: 5px;
}
.form-label span { color: var(--danger); }
.form-input {
    width: 100%; padding: 10px 14px;
    border-radius: 10px; border: 1.5px solid var(--border);
    background: var(--card); color: var(--text);
    font-size: .875rem; font-family: 'Inter', sans-serif;
    outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79,110,247,.12);
}
.form-input::placeholder { color: #94a3b8; }
.form-input.error { border-color: var(--danger); }
.form-input.error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.12); }
.field-error { font-size: .72rem; color: var(--danger); margin-top: 4px; display: block; }

.input-icon-wrap { position: relative; }
.input-icon-wrap .form-input { padding-left: 38px; }
.input-icon-wrap .fi { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .9rem; pointer-events: none; }
.input-icon-wrap .fi-right { left: auto; right: 12px; cursor: pointer; pointer-events: auto; transition: color .15s; }
.input-icon-wrap .fi-right:hover { color: var(--text); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-select {
    width: 100%; padding: 10px 32px 10px 14px;
    border-radius: 10px; border: 1.5px solid var(--border);
    background: var(--card); color: var(--text);
    font-size: .875rem; font-family: 'Inter', sans-serif;
    outline: none; appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    transition: border-color .2s, box-shadow .2s;
}
.form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,110,247,.12); }

/* ─── Checkbox ─── */
.form-check { display: flex; align-items: flex-start; gap: 9px; }
.form-check input[type=checkbox] {
    width: 16px; height: 16px; border-radius: 4px;
    accent-color: var(--accent); flex-shrink: 0; margin-top: 2px; cursor: pointer;
}
.form-check label { font-size: .82rem; color: var(--muted); cursor: pointer; line-height: 1.5; }
.form-check label a { color: var(--accent); text-decoration: none; font-weight: 500; }
.form-check label a:hover { text-decoration: underline; }

/* ─── Submit button ─── */
.btn-auth {
    width: 100%; padding: 11px;
    border-radius: 10px; border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff; font-size: .9rem; font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer; letter-spacing: .01em;
    box-shadow: 0 4px 16px var(--glow);
    transition: transform .18s, box-shadow .18s, opacity .18s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-auth:hover  { transform: translateY(-2px); box-shadow: 0 8px 24px var(--glow); }
.btn-auth:active { transform: scale(.98); opacity: .9; }
.btn-auth:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.btn-auth-outline {
    width: 100%; padding: 10px;
    border-radius: 10px; border: 1.5px solid var(--border);
    background: var(--card); color: var(--text);
    font-size: .875rem; font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer; transition: border-color .18s, background .18s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-auth-outline:hover { border-color: var(--accent); background: #f8f9ff; }

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

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

/* ─── Alert / Flash ─── */
.auth-alert {
    padding: 10px 14px; border-radius: 10px;
    font-size: .82rem; display: flex; align-items: center; gap: 9px;
    margin-bottom: 1.1rem; font-weight: 500;
}
.auth-alert-danger  { background: rgba(239,68,68,.08);  color: var(--danger);  border: 1px solid rgba(239,68,68,.2); }
.auth-alert-success { background: rgba(16,185,129,.08); color: #059669;        border: 1px solid rgba(16,185,129,.2); }
.auth-alert-warning { background: rgba(245,158,11,.08); color: #d97706;        border: 1px solid rgba(245,158,11,.2); }

/* ─── Role badge ─── */
.role-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 10px; border-radius: 99px;
    font-size: .68rem; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase;
}
.role-super-admin  { background: rgba(139,92,246,.12); color: #7c3aed; }
.role-admin        { background: rgba(79,110,247,.12);  color: #4f6ef7; }
.role-manager      { background: rgba(16,185,129,.12);  color: #059669; }
.role-bench        { background: rgba(245,158,11,.12);  color: #d97706; }

/* ─── Password strength ─── */
.pw-strength { margin-top: 6px; }
.pw-strength-bars { display: flex; gap: 4px; margin-bottom: 4px; }
.pw-bar { flex: 1; height: 3px; border-radius: 99px; background: var(--border); transition: background .3s; }
.pw-bar.weak   { background: var(--danger); }
.pw-bar.fair   { background: var(--warning); }
.pw-bar.good   { background: #3b82f6; }
.pw-bar.strong { background: var(--success); }
.pw-label { font-size: .72rem; color: var(--muted); }

/* ─── Animations ─── */
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.anim { opacity: 0; animation: fade-up .45s cubic-bezier(.4,0,.2,1) forwards; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .auth-brand { display: none; }
    .auth-form-panel { padding: 2rem 1.25rem; }
}
@media (max-width: 480px) {
    .form-row { grid-template-columns: 1fr; }
}
