/* Auth CSS — login público WSSH */

[data-theme="dark"] {
  --bg:         #0A0A0A;
  --bg-mid:     #111111;
  --bg-card:    #181818;
  --bg-surface: #1E1E1E;
  --bg-raised:  #252525;
  --bg-deep:    #0A0A0A;
  --accent:        #F2F2F2;
  --accent-glow:   rgba(242,242,242,.08);
  --accent-dim:    rgba(242,242,242,.06);
  --accent-border: rgba(242,242,242,.16);
  --amber:  #FB923C; --amber-dim:  rgba(251,146,60,.12);
  --green:  #4ADE80; --green-dim:  rgba(74,222,128,.08);
  --red:    #F05252; --red-dim:    rgba(240,82,82,.12);
  --blue:   #60A5FA; --blue-dim:   rgba(96,165,250,.08);
  --purple: #A78BFA; --purple-dim: rgba(167,139,250,.08);
  --orange: #FB923C;
  --yellow: #FCD34D;
  --text-1: #F2F2F2; --text-2: #7A7A7A; --text-3: #4A4A4A;
  --border: rgba(255,255,255,.10); --border-2: rgba(255,255,255,.07); --border-3: rgba(255,255,255,.04);
  --shadow-card:   0 4px 20px rgba(0,0,0,.60);
  --shadow-modal:  0 24px 80px rgba(0,0,0,.80);
  --shadow-accent: 0 0 20px rgba(242,242,242,.06);
  --gradient-a: #F2F2F2; --gradient-b: #FB923C; --gradient-c: #4ADE80;
  --font-display: 'Syne', sans-serif;
  --font-body:    'Source Sans 3', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;
  --orb1-color: rgba(242,242,242,.07);
  --orb2-color: rgba(251,146,60,.08);
  --orb3-color: rgba(74,222,128,.06);
  --grid-line: rgba(255,255,255,.028);
  --card-bg: rgba(24,24,24,.96);
  --input-bg: rgba(255,255,255,.04);
}

[data-theme="light"] {
  --bg:         #F5F6FA;
  --bg-mid:     #FFFFFF;
  --bg-card:    #FFFFFF;
  --bg-surface: #F0F1F6;
  --bg-raised:  #E8EAF0;
  --bg-deep:    #ECEDF5;
  --accent:        #2563EB;
  --accent-glow:   rgba(37,99,235,.15);
  --accent-dim:    rgba(37,99,235,.08);
  --accent-border: rgba(37,99,235,.22);
  --amber:  #F59E0B; --amber-dim:  rgba(245,158,11,.12);
  --green:  #10B981; --green-dim:  rgba(16,185,129,.10);
  --red:    #EF4444; --red-dim:    rgba(239,68,68,.10);
  --blue:   #3B82F6; --blue-dim:   rgba(59,130,246,.10);
  --purple: #8B5CF6; --purple-dim: rgba(139,92,246,.10);
  --orange: #F97316;
  --yellow: #EAB308;
  --text-1: #1E293B; --text-2: #64748B; --text-3: #94A3B8;
  --border: rgba(37,99,235,.14); --border-2: rgba(0,0,0,.08); --border-3: rgba(0,0,0,.04);
  --shadow-card:   0 1px 8px rgba(0,0,0,.06);
  --shadow-modal:  0 16px 56px rgba(0,0,0,.16);
  --shadow-accent: 0 0 20px rgba(37,99,235,.14);
  --gradient-a: #2563EB; --gradient-b: #3B82F6; --gradient-c: #10B981;
  --font-display: 'Outfit', sans-serif;
  --font-body:    'Nunito Sans', sans-serif;
  --font-mono:    'Roboto Mono', monospace;
  --orb1-color: rgba(37,99,235,.12);
  --orb2-color: rgba(16,185,129,.10);
  --orb3-color: rgba(245,158,11,.08);
  --grid-line: rgba(37,99,235,.06);
  --card-bg: rgba(255,255,255,.96);
  --input-bg: rgba(0,0,0,.02);
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text-1); font-family: var(--font-body); -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }

.auth-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); animation: drift 14s ease-in-out infinite alternate; }
.orb1 { width: 500px; height: 500px; background: radial-gradient(circle, var(--orb1-color) 0%, transparent 70%); top: -160px; left: -100px; animation-duration: 16s; }
.orb2 { width: 340px; height: 340px; background: radial-gradient(circle, var(--orb2-color) 0%, transparent 70%); bottom: -100px; right: -80px; animation-duration: 19s; animation-delay: -6s; }
.orb3 { width: 260px; height: 260px; background: radial-gradient(circle, var(--orb3-color) 0%, transparent 70%); top: 45%; left: 52%; animation-duration: 22s; animation-delay: -11s; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(28px,18px) scale(1.07); } }
.auth-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent); }

.theme-toggle { position: fixed; top: 18px; right: 18px; z-index: 200; width: 38px; height: 38px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s, transform .15s; }
.theme-toggle:hover { background: var(--bg-raised); transform: scale(1.06); }
.theme-toggle svg { width: 16px; height: 16px; stroke: var(--text-2); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.theme-toggle:hover svg { stroke: var(--text-1); }
.icon-moon { display: block; } .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; } [data-theme="light"] .icon-sun { display: block; }

#auth-screen { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }

.auth-card { position: relative; z-index: 1; background: var(--card-bg); border: 1px solid var(--border); border-radius: 22px; padding: 36px 32px 28px; width: 100%; max-width: 408px; box-shadow: var(--shadow-modal); backdrop-filter: blur(24px); animation: cardIn .45s cubic-bezier(.22,1,.36,1) both; transition: background .3s, border-color .3s; }
@keyframes cardIn { from { opacity:0; transform: translateY(22px) scale(.96); } to { opacity:1; transform: translateY(0) scale(1); } }

.auth-logo { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; }
.auth-logo-icon { width: 44px; height: 44px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-card); }
.auth-logo-icon svg { width: 20px; height: 20px; stroke: var(--accent); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.auth-logo-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--text-1); letter-spacing: .2px; }
.auth-logo-sub { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); letter-spacing: .6px; margin-top: 1px; }

.step-indicator { display: flex; gap: 6px; margin-bottom: 24px; }
.step-dot { height: 3px; border-radius: 2px; background: var(--border); transition: background .3s, flex .3s; flex: 1; }
.step-dot.active { background: var(--accent); flex: 2; }
.step-dot.done { background: var(--accent); opacity: .4; }

.auth-step { display: none; }
.auth-step.active { display: block; animation: stepIn .3s ease both; }
@keyframes stepIn { from { opacity:0; transform: translateX(10px); } to { opacity:1; transform: translateX(0); } }

.auth-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.auth-sub { font-size: 13.5px; color: var(--text-2); line-height: 1.5; margin-bottom: 22px; }

.afield { margin-bottom: 14px; }
.alabel { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 7px; font-family: var(--font-mono); }
.ainput-wrap { position: relative; }
.ainput { width: 100%; background: var(--input-bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; color: var(--text-1); font-size: 14px; font-family: var(--font-body); outline: none; transition: border-color .2s, box-shadow .2s, background .3s; }
.ainput::placeholder { color: var(--text-3); }
.ainput:focus { border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-dim); }
.ainput-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 4px; color: var(--text-3); transition: color .2s; }
.ainput-icon:hover { color: var(--text-1); }
.ainput-icon svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.auth-row { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.alink { font-size: 12.5px; color: var(--accent); cursor: pointer; text-decoration: none; transition: opacity .2s; }
.alink:hover { opacity: .7; }

.btn-auth { width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px; background: var(--accent); color: var(--bg); border: none; border-radius: 10px; font-size: 14px; font-weight: 700; font-family: var(--font-display); letter-spacing: .3px; cursor: pointer; transition: opacity .2s, transform .15s, box-shadow .2s; box-shadow: var(--shadow-accent); margin-bottom: 16px; }
.btn-auth svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn-auth:hover { opacity: .88; box-shadow: var(--shadow-accent), 0 4px 20px var(--accent-glow); }
.btn-auth:active { transform: scale(.98); }
.btn-auth:disabled, .btn-auth.loading { opacity: .55; pointer-events: none; }

.btn-auth-outline { width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 12px; background: transparent; color: var(--text-2); border: 1px solid var(--border); border-radius: 10px; font-size: 14px; font-weight: 600; font-family: var(--font-display); letter-spacing: .3px; cursor: pointer; transition: all .2s; text-decoration: none; margin-bottom: 16px; }
.btn-auth-outline svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn-auth-outline:hover { border-color: var(--accent-border); color: var(--accent); background: var(--accent-dim); }

.auth-back { display: flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; color: var(--text-2); font-size: 12.5px; font-family: var(--font-body); padding: 0; margin-bottom: 18px; transition: color .2s; }
.auth-back:hover { color: var(--text-1); }
.auth-back svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; font-size: 11px; color: var(--text-3); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-2); }

.auth-footer { text-align: center; font-size: 11px; color: var(--text-3); font-family: var(--font-mono); letter-spacing: .3px; }

.otp-hint { font-size: 13.5px; color: var(--text-2); margin-bottom: 22px; line-height: 1.6; }
.otp-wrap { display: flex; gap: 8px; justify-content: center; margin-bottom: 22px; }
.otp-input { width: 46px; height: 54px; text-align: center; font-size: 20px; font-weight: 600; font-family: var(--font-mono); background: var(--input-bg); border: 1px solid var(--border); border-radius: 10px; color: var(--text-1); outline: none; caret-color: var(--accent); transition: border-color .2s, box-shadow .2s, background .3s; }
.otp-input:focus { border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-dim); }
.otp-input.filled { border-color: var(--accent-border); background: var(--accent-dim); }

.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; font-size: 13px; color: var(--text-1); box-shadow: var(--shadow-card); pointer-events: auto; animation: toastIn .3s cubic-bezier(.22,1,.36,1) both; max-width: 300px; font-family: var(--font-body); }
.toast.out { animation: toastOut .25s ease forwards; }
.toast-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.toast-dot.success { background: var(--green); }
.toast-dot.error { background: var(--red); }
.toast-dot.warn { background: var(--amber); }
.toast-dot.info { background: var(--blue); }

@keyframes toastIn { from { opacity:0; transform: translateY(8px) scale(.97); } }
@keyframes toastOut { to { opacity:0; transform: translateY(4px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .65s linear infinite; display: inline-block; line-height: 1; }

@media (max-width: 480px) { .auth-card { padding: 28px 20px 22px; } .otp-input { width: 40px; height: 48px; font-size: 18px; } }
