/* ===========================================================================
   Advaxx AI — design system
   Tokens + components shared across login, register and dashboard.
   =========================================================================== */

:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --ink: #14152a;
  --muted: #5c5f76;
  --faint: #9aa0b4;
  --line: #ecedf4;
  --line-2: #e5e7f0;
  --primary: #2d3bf0;
  --primary-soft: #eef0fe;
  --purple: #7b36f0;
  --purple-soft: #f1eafe;
  --green: #0e7a41;
  --green-soft: #e5f6ec;
  --amber: #9a5b00;
  --amber-soft: #fcf1dc;
  --slate: #5c6679;
  --slate-soft: #eef1f6;
  --red: #b11f31;
  --red-soft: #fce7ea;
  --grad: linear-gradient(135deg, #2d3bf0, #7b36f0);
  --grad-brand: linear-gradient(150deg, #231cc4 0%, #2d3bf0 45%, #7b36f0 100%);
  --shadow-card: 0 1px 2px rgba(20, 21, 42, 0.04);
  --shadow-pop: 0 24px 60px rgba(20, 21, 42, 0.18);
  --radius: 16px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus { outline: none; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #dcdfea; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.font-display { font-family: var(--display); letter-spacing: -0.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

@keyframes advFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes advPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.82); } }

/* ----------------------------------------------------------------- brand mark */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.brand-glyph {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand-glyph i { width: 12px; height: 12px; background: #fff; border-radius: 3px; transform: rotate(45deg); }
.brand-name { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -0.4px; }
.brand-name span { color: var(--purple); }

/* ===========================================================================
   AUTH (login / register)
   =========================================================================== */
.auth-body { min-height: 100vh; }
.auth-shell { min-height: 100vh; display: flex; background: var(--bg); }

.auth-aside {
  width: 46%; max-width: 620px; position: relative; overflow: hidden;
  background: var(--grad-brand);
  padding: 48px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-aside .blob {
  position: absolute; border-radius: 50%; pointer-events: none;
}
.auth-aside .blob.a { width: 480px; height: 480px; top: -160px; right: -120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 65%); }
.auth-aside .blob.b { width: 360px; height: 360px; bottom: -120px; left: -80px;
  background: radial-gradient(circle, rgba(123, 54, 240, 0.55), transparent 68%); }
.auth-aside .brand-name { color: #fff; }
.auth-aside .brand-name span { color: rgba(255, 255, 255, 0.62); font-weight: 500; }
.auth-aside .brand-glyph { background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28); }
.auth-aside .brand-glyph i { width: 14px; height: 14px; background: #fff; border-radius: 4px; }

.aside-pill {
  display: inline-flex; align-items: center; gap: 7px; position: relative;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 6px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 600; margin-bottom: 26px;
}
.aside-pill i { width: 14px; height: 14px; }
.auth-aside h1 { font-family: var(--display); font-size: 42px; line-height: 1.08; font-weight: 700;
  letter-spacing: -1.4px; margin: 0 0 16px; text-wrap: balance; position: relative; }
.auth-aside p.lead { font-size: 15.5px; line-height: 1.6; color: rgba(255, 255, 255, 0.82);
  margin: 0 0 34px; max-width: 420px; position: relative; }
.aside-stats { display: flex; gap: 12px; flex-wrap: wrap; position: relative; }
.aside-stat { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px; padding: 15px 18px; backdrop-filter: blur(8px); min-width: 138px; }
.aside-stat b { font-family: var(--display); font-size: 24px; font-weight: 700; display: block; }
.aside-stat span { font-size: 12.5px; color: rgba(255, 255, 255, 0.75); margin-top: 2px; display: block; }
.aside-foot { position: relative; font-size: 12.5px; color: rgba(255, 255, 255, 0.66); }

.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 404px; animation: advFade 0.5s ease both; }
.auth-card .brand { margin-bottom: 30px; }
.auth-card h2 { font-family: var(--display); font-size: 27px; font-weight: 700; letter-spacing: -0.8px; margin: 0 0 6px; }
.auth-card .sub { font-size: 14.5px; color: var(--muted); margin: 0 0 28px; }

.field { margin-bottom: 18px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: #3a3d52; margin-bottom: 7px; }
.input-wrap { position: relative; }
.input-wrap > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--faint); }
.input {
  width: 100%; height: 48px; border: 1.5px solid var(--line-2); border-radius: 13px;
  padding: 0 14px; font-size: 14.5px; color: var(--ink); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input.has-icon { padding-left: 42px; }
.input.has-trail { padding-right: 44px; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(45, 59, 240, 0.12); }
.input.error { border-color: var(--red); }
.eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--faint);
}
.eye:hover { background: #f2f3f8; color: #3a3d52; }
.eye i { width: 17px; height: 17px; }
.err-text { font-size: 12.5px; color: var(--red); margin-top: 6px; font-weight: 600; }

.form-alert {
  display: flex; align-items: center; gap: 9px; background: var(--red-soft);
  color: var(--red); border-radius: 11px; padding: 12px 14px; font-size: 13px; font-weight: 600;
  margin-bottom: 18px;
}
.form-alert i { width: 16px; height: 16px; flex-shrink: 0; }

.row-between { display: flex; align-items: center; justify-content: space-between; }
.check {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); cursor: pointer; user-select: none;
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box {
  width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.12s; background: #fff;
}
.check .box i { width: 12px; height: 12px; color: #fff; opacity: 0; }
.check input:checked + .box { background: var(--grad); border-color: transparent; }
.check input:checked + .box i { opacity: 1; }
.link { color: var(--primary); font-weight: 600; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 12px; font-size: 14.5px; font-weight: 700;
  transition: transform 0.14s, box-shadow 0.14s, background 0.14s, border-color 0.14s; white-space: nowrap;
}
.btn i { width: 17px; height: 17px; }
.btn-primary { width: 100%; background: var(--grad); color: #fff; box-shadow: 0 12px 26px -10px rgba(78, 52, 224, 0.7); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -10px rgba(78, 52, 224, 0.85); }
.btn-ghost { border: 1px solid var(--line-2); background: #fff; color: #3a3d52; }
.btn-ghost:hover { background: #f6f7fb; border-color: #e2e4ef; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 13.5px; border-radius: 11px; }
.btn-block { width: 100%; }

.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--faint); font-size: 12.5px; font-weight: 600; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.social-row { display: flex; gap: 12px; }
.social {
  flex: 1; height: 46px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff;
  display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: #3a3d52;
}
.social:hover { background: #f6f7fb; border-color: #e2e4ef; }
.social i { width: 17px; height: 17px; }

.auth-foot { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 26px; }

@media (max-width: 860px) {
  .auth-aside { display: none; }
}

/* ===========================================================================
   Lucide renders <i data-lucide> as an <svg>; these mirror the icon
   sizing/positioning rules above so they survive that replacement.
   (.brand-glyph i is a styled square, NOT a lucide icon — left untouched.)
   =========================================================================== */
.aside-pill svg { width: 14px; height: 14px; }
.input-wrap > svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--faint); pointer-events: none;
}
/* select field (e.g. country on register) */
.select-field { appearance: none; -webkit-appearance: none; -moz-appearance: none; padding-right: 40px; cursor: pointer; }
select.select-field:invalid { color: var(--faint); }
.select-field option { color: var(--ink); }
.input-wrap > i.select-caret, .input-wrap > svg.select-caret { left: auto; right: 14px; width: 16px; height: 16px; }
.eye svg { width: 17px; height: 17px; }
.btn svg { width: 17px; height: 17px; }
.btn-sm svg { width: 16px; height: 16px; }
.social svg { width: 17px; height: 17px; }
.form-alert svg { width: 16px; height: 16px; flex-shrink: 0; }
.check .box svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.check input:checked + .box svg { opacity: 1; }
