/* Exestruct API — auth pages (login / 2FA).
   Same tokens, font and component language as exs-panel.css; kept standalone so the
   guest pages stay light (no panel layout CSS). Class names are unchanged. */
@font-face {
  font-family: 'Public Sans'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('fonts/public-sans-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('fonts/public-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url('fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
}
:root {
  color-scheme: dark;
  --bg: #1c0509; --surface: #25070d; --inset: #170307;
  --border: rgba(255, 214, 222, 0.085); --border-strong: rgba(255, 214, 222, 0.15);
  --text-1: #fbeff1; --text-2: #dcc6cb; --text-3: #b39aa0; --text-4: #957a81;
  --brand: #ff2e54; --brand-strong: #e0244a; --brand-hover: #ec2f55; --brand-text: #ff7189;
  --success: #2ed88f; --success-dim: rgba(46, 216, 143, 0.12); --success-border: rgba(46, 216, 143, 0.28);
  --danger: #ff5470; --danger-dim: rgba(255, 84, 112, 0.13); --danger-border: rgba(255, 84, 112, 0.32);
  --font: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px rgba(255, 46, 84, 0.75);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font); color: var(--text-2); background: var(--bg);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.auth-card {
  width: 100%; max-width: 420px; padding: 36px 32px 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img { width: 44px; height: 44px; margin: 0 auto 14px; object-fit: contain; display: block; }
.auth-logo h1 { font-size: 20px; font-weight: 700; color: var(--text-1); letter-spacing: -0.02em; }
.auth-logo p { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.auth-error, .auth-success {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid; border-left-width: 3px; border-radius: 8px;
  padding: 10px 12px; font-size: 13px; margin-bottom: 18px; line-height: 1.5; color: var(--text-1);
}
.auth-error { background: var(--danger-dim); border-color: var(--danger-border); border-left-color: var(--danger); }
.auth-error i { color: var(--danger); margin-top: 3px; }
.auth-success { background: var(--success-dim); border-color: var(--success-border); border-left-color: var(--success); }
.auth-success i { color: var(--success); margin-top: 3px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.form-control {
  width: 100%; height: 42px; padding: 0 12px;
  background: var(--inset); border: 1px solid var(--border-strong); border-radius: 8px;
  color: var(--text-1); font: inherit; font-size: 14px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.form-control::placeholder { color: var(--text-4); }
.form-control:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 46, 84, 0.18); }
.form-control.otp { height: 52px; letter-spacing: 0.4em; font-size: 22px; text-align: center; font-family: var(--mono); }
.btn-primary {
  width: 100%; height: 44px; margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand-strong); color: #fff; border: 1px solid var(--brand-strong); border-radius: 8px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 120ms ease;
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.auth-foot { text-align: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); line-height: 1.6; }
.auth-foot a, .auth-foot button.link { color: var(--brand-text); text-decoration: none; cursor: pointer; background: none; border: 0; font: inherit; }
.auth-foot a:hover, .auth-foot button.link:hover { text-decoration: underline; }
.qr-box { display: flex; justify-content: center; margin: 4px 0 14px; }
.qr-box svg { background: #fff; padding: 10px; border-radius: 8px; width: 196px; height: 196px; }
.secret { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-align: center; color: var(--text-1); background: var(--inset); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 8px 10px; word-break: break-all; margin-bottom: 16px; user-select: all; }
.steps { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 16px; padding-left: 18px; display: grid; gap: 4px; }
.tg-float {
  position: fixed; right: 20px; bottom: 20px; width: 48px; height: 48px; z-index: 50;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--surface); color: var(--text-1); border: 1px solid var(--border-strong); font-size: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); text-decoration: none; transition: border-color 120ms ease, color 120ms ease;
}
.tg-float:hover { border-color: var(--brand); color: #fff; }
@media (max-width: 460px) {
  body { padding: 14px; align-items: flex-start; padding-top: 12vh; }
  .auth-card { padding: 26px 20px 22px; }
  .form-control { font-size: 16px; }
  .tg-float { right: 14px; bottom: 14px; width: 44px; height: 44px; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
