:root {
  --bg: #08060a;
  --text: #f7f3ee;
  --muted: #9b9188;
  --accent: #ff8a2a;
  --accent-2: #ffc14a;
  --line: rgba(255,236,210,.1);
  --bad: #ff6b6b;
  --ok: #3dd68c;
  --font: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  --display: "Syne", "Outfit", sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { margin: 0; min-height: 100%; }
body.auth-body {
  font-family: var(--font);
  background: #08060a;
  color: var(--text);
  min-height: 100svh;
  position: relative;
  overflow-x: hidden;
}
.auth-glow {
  position: fixed; width: 520px; height: 520px; border-radius: 50%;
  filter: blur(90px); pointer-events: none; z-index: 0;
}
.auth-glow.a { background: rgba(255,122,26,.22); left: -160px; bottom: -120px; }
.auth-glow.b { background: rgba(255,193,74,.12); right: -140px; top: -80px; }
.auth-split {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 480px) 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 56px;
  position: relative;
  z-index: 1;
}
.auth-slogan {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: .95;
  margin: 0;
}
.auth-card {
  width: 100%;
  background: rgba(16, 14, 20, 0.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 40px 80px rgba(0,0,0,.45);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; margin-bottom: 22px; color: inherit; text-decoration: none; }
.brand img { border-radius: 9px; object-fit: contain; }
.brand-fyren { color: #fff; }
.brand-pay {
  background: linear-gradient(165deg, #ffc14a 0%, #ff8a2a 42%, #e84d0a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
h1 { font-family: var(--display); letter-spacing: -.04em; font-size: 28px; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 18px; font-size: 14.5px; }
label { display: block; font-size: 12px; color: #d4ccc3; margin: 0 0 6px; font-weight: 650; }
.field { margin-bottom: 14px; }
input, select, textarea {
  width: 100%; background: #1c1c24; border: 1px solid #3a3944; border-radius: 12px;
  padding: 12px 14px; outline: none; color: #fff8ee; -webkit-text-fill-color: #fff8ee; caret-color: #ffc14a;
}
input::placeholder { color: #c4bbb0; -webkit-text-fill-color: #c4bbb0; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,138,42,.12); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; border-radius: 12px; padding: 13px 16px; font-weight: 800; font-size: 14px;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a0c04;
  box-shadow: 0 10px 28px rgba(255,122,26,.28);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: .65; cursor: wait; transform: none; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-block { width: 100%; }
.alert { padding: 10px 12px; border-radius: 12px; margin-bottom: 14px; font-size: 13px; }
.alert.bad { background: rgba(255,107,107,.12); }
.alert.ok { background: rgba(61,214,140,.12); }
.alert.warn { background: rgba(245,193,90,.12); }
.switch-auth { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.switch-auth a { color: var(--text); font-weight: 700; }
.muted { color: var(--muted); font-size: 12px; }
.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 4px; background: #16161e; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 16px;
}
.seg label { margin: 0; padding: 10px 8px; border-radius: 10px; text-align: center; cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 700; }
.seg label input { display: none; }
.seg label:has(input:checked) { background: rgba(255,138,42,.16); color: var(--text); }
.hint { display: block; margin-top: 6px; color: #6c655c; font-size: 12px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 78px; }
.pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 12px; font-weight: 700; padding: 6px 8px;
}
.pw-toggle:hover { color: var(--text); }
.pw-meter {
  margin-top: 8px; height: 4px; border-radius: 99px;
  background: rgba(255,255,255,.08); overflow: hidden;
}
.pw-meter i {
  display: block; height: 100%; width: 0;
  border-radius: 99px;
  background: var(--bad);
  transition: width .2s ease, background .2s ease;
}
.pw-meter.s1 i { background: var(--bad); }
.pw-meter.s2 i { background: #f5c15a; }
.pw-meter.s3 i { background: var(--ok); }
.auth-steps {
  display: flex; gap: 8px; margin-bottom: 18px;
}
.auth-steps span {
  flex: 1; text-align: center; padding: 8px 10px;
  border-radius: 10px; font-size: 12px; font-weight: 700;
  color: var(--muted); background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
}
.auth-steps span.is-on {
  color: #1a0c04;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}
.auth-step-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
}
.code-input {
  letter-spacing: 0.35em;
  font-size: 22px;
  text-align: center;
  font-weight: 700;
}
.field-extra { display: flex; justify-content: flex-end; margin-top: 8px; }
.field-extra a { color: var(--muted); font-size: 12.5px; text-decoration: none; }
.field-extra a:hover { color: var(--accent-2); }
.check {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 4px 0 16px; font-size: 13px; color: var(--muted); line-height: 1.45;
}
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; }
.check a { color: var(--text); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.toast {
  position: fixed; top: 18px; right: 18px; z-index: 100;
  min-width: 260px; max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: #16161e; box-shadow: 0 20px 50px rgba(0,0,0,.45);
  display: grid; gap: 4px; font-size: 13px;
}
.toast strong { font-size: 13.5px; }
.toast.ok { border-color: rgba(61,214,140,.35); background: rgba(16,40,30,.95); }
.toast.bad { border-color: rgba(255,107,107,.35); background: rgba(48,18,18,.95); }
.toast.warn { border-color: rgba(245,193,90,.35); background: rgba(42,32,12,.95); }
.auth-card form { margin: 0; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.65);
  display: grid; place-items: center; padding: 20px;
}
.modal-backdrop[hidden] { display: none !important; }
.modal-box {
  width: min(640px, 100%); max-height: min(80vh, 720px); overflow: auto;
  background: #121218; border: 1px solid var(--line); border-radius: 18px; padding: 22px;
}
.modal-box h3 { font-family: var(--display); margin: 0 0 12px; }
.modal-box p, .modal-box li { color: var(--muted); font-size: 13.5px; }
.modal-box .close-modal {
  margin-top: 16px; width: 100%;
}
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; padding: 28px 18px 48px; }
  .auth-slogan { text-align: center; font-size: 36px; order: -1; }
  .row-2 { grid-template-columns: 1fr; }
  .toast { left: 16px; right: 16px; top: 12px; min-width: 0; }
  .auth-step-actions { grid-template-columns: 1fr; }
}
