
:root {
  --bg: #ffffff;              /* light background */
  --surface: #f6f9ff;         /* light card */
  --text: #0b1220;            /* dark text */
  --muted: #5b6b88;           /* secondary text */
  --border: #d9e1f2;          /* borders */
  --accent: #1677ff;          /* primary blue */
  --accent-2: #0040ff;        /* deeper blue */
}

html[data-theme="dark"] {
  --bg: #0a0f18;              /* near black */
  --surface: #0f1626;         /* dark card */
  --text: #edf2ff;            /* light text */
  --muted: #9fb0cc;           /* muted light */
  --border: #1e2a44;          /* dark border */
  --accent: #3b82f6;          /* bright blue */
  --accent-2: #60a5fa;        /* light blue */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.auth-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid var(--border); backdrop-filter: saturate(140%) blur(8px); position:sticky; top:0; background: color-mix(in srgb, var(--bg) 85%, transparent); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; }
.brand-text { letter-spacing: 0.3px; }
.theme-toggle { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 10px; border-radius: 10px; cursor: pointer; }

.auth-main { max-width: 960px; margin: 28px auto; padding: 0 16px; display: grid; gap: 16px; grid-template-columns: 1fr; }
.card { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 22px; }
.hint { color: var(--muted); }

h1, h2 { margin: 0 0 8px; }
.muted { color: var(--muted); margin: 0 0 16px; }

.field { display:grid; gap:6px; margin: 10px 0; }
.label { font-size: 13px; font-weight: 700; color: var(--muted); }
.input-row { display:flex; align-items:center; gap:8px; }
.prefix { padding: 12px 12px; border:1px solid var(--border); border-radius: 12px; background: var(--bg); font-weight:700; }
input[type="text"], input[type="tel"], input[type="email"] { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); }
input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.check { display:flex; align-items:center; gap:10px; margin: 8px 0 4px; font-size: 14px; }
.check a { color: var(--accent); text-decoration: none; }

.btn { border: 1px solid var(--border); background: var(--bg); color: var(--text); padding: 12px 16px; border-radius: 12px; font-weight: 700; cursor: pointer; }
.btn.primary { background: var(--accent); color: #fff; border-color: color-mix(in srgb, var(--accent) 80%, black); }
.btn.outline { background: transparent; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.form-msg { min-height: 20px; font-size: 14px; color: var(--muted); margin-top: 8px; }
.switch { margin-top: 12px; }
.link { background:none; border:none; color: var(--accent); cursor:pointer; font-weight:700; }

/* OTP input grid */
.otp-grid { display:grid; grid-template-columns: repeat(4, 54px); gap: 10px; margin: 12px 0 10px; }
.otp { text-align:center; font-size: 22px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); }
.otp:focus { outline: 2px solid var(--accent); }

.auth-footer { text-align:center; padding: 20px; color: var(--muted); border-top:1px solid var(--border); margin-top: 20px; }

/* Small screens */
@media (max-width: 520px) {
  .otp-grid { grid-template-columns: repeat(4, 1fr); }
}

