/* =========================================================
   NXT MEDIA — Client Dashboard
   Reuses marketing brand (black + cyan, Satoshi + Inter)
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; line-height: 1.55; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Tokens ---------- */
:root {
  --bg:            #0A0A0A;
  --bg-elev:       #111111;
  --surface:       rgba(255,255,255,0.04);
  --surface-hi:    rgba(255,255,255,0.07);
  --border:        rgba(255,255,255,0.08);
  --border-hi:     rgba(255,255,255,0.16);

  --text:          #FAFAFA;
  --text-muted:    #8A8A8A;
  --text-dim:      #5A5A5A;

  --accent:        #00D9FF;
  --accent-soft:   rgba(0,217,255,0.14);
  --accent-glow:   rgba(0,217,255,0.35);

  --success:       #4ADE80;
  --warning:       #FBBF24;
  --danger:        #F87171;

  --radius-sm:     8px;
  --radius:        14px;
  --radius-lg:     22px;
  --radius-xl:     32px;

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 96px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-display: 'Satoshi', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  overflow-x: hidden;
  position: relative;
}

/* Subtle ambient cyan glow background for auth pages */
body.auth-page::before {
  content: "";
  position: fixed;
  inset: -20% -20% auto auto;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 55%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
body.auth-page::after {
  content: "";
  position: fixed;
  inset: auto auto -20% -20%;
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, rgba(110,0,255,0.16) 0%, transparent 55%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.015em; }
h4 { font-size: 1rem; font-weight: 700; }

p { color: var(--text-muted); line-height: 1.6; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: 0.78rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  border-radius: 999px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ---------- Brand mark (top of auth pages) ---------- */
.brand-mark {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.brand-mark .dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 16px var(--accent-glow); }
.brand-mark .name .accent { color: var(--accent); }

/* ---------- Auth shell ---------- */
.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-aside {
  padding: var(--space-7);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border-right: 1px solid var(--border);
}
.auth-aside .pitch {
  display: flex; flex-direction: column; gap: var(--space-5);
  margin-top: auto; margin-bottom: var(--space-7);
}
.auth-aside .pitch h1 { font-size: clamp(2rem, 3.4vw, 2.6rem); }
.auth-aside .features {
  display: flex; flex-direction: column; gap: var(--space-3);
  margin-top: var(--space-4);
}
.auth-aside .features li {
  display: grid; grid-template-columns: 22px 1fr; gap: var(--space-3);
  color: var(--text-muted);
  font-size: 0.96rem;
}
.auth-aside .features svg {
  width: 18px; height: 18px;
  color: var(--accent);
  margin-top: 4px;
}
.auth-aside .foot {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.auth-aside .foot a { color: var(--text-muted); }
.auth-aside .foot a:hover { color: var(--accent); }

.auth-main {
  padding: var(--space-7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  display: flex; flex-direction: column;
  gap: var(--space-5);
}
.auth-card .head h1 {
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  margin-bottom: var(--space-2);
}
.auth-card .head p { font-size: 0.96rem; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: var(--space-5);
  }
  .auth-aside .pitch h1 { font-size: 1.8rem; }
  .auth-aside .features { display: none; }
  .auth-aside .foot { display: none; }
  .auth-main { padding: var(--space-5) var(--space-4) var(--space-7); }
}

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 600;
}
.field input {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input::placeholder { color: var(--text-dim); }
.field input:hover { border-color: var(--border-hi); }
.field input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0,217,255,0.04);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field .err {
  font-size: 0.82rem;
  color: var(--danger);
  display: none;
}
.field.is-error .err { display: block; }
.field.is-error input { border-color: rgba(248,113,113,0.6); background: rgba(248,113,113,0.04); }

.form-group { display: flex; flex-direction: column; gap: var(--space-4); }

.fine {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.fine a { color: var(--text-muted); text-decoration: underline; text-decoration-color: var(--border-hi); }
.fine a:hover { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3);
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.3s var(--ease), background 0.2s var(--ease), box-shadow 0.3s var(--ease), opacity 0.2s var(--ease);
  width: 100%;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent); box-shadow: 0 0 32px var(--accent-glow); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-hi);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: var(--surface-hi); border-color: var(--accent); }

.btn-google {
  background: #FFFFFF;
  color: #1A1A1A;
  font-weight: 600;
}
.btn-google:hover { background: #F5F5F5; }
.btn-google .gicon { width: 18px; height: 18px; }

.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-row { display: flex; flex-direction: column; gap: var(--space-3); }

/* ---------- Divider ---------- */
.divider-or {
  display: flex; align-items: center; gap: var(--space-4);
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.divider-or::before, .divider-or::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

/* ---------- Status banner ---------- */
.alert {
  padding: var(--space-4);
  border-radius: 12px;
  font-size: 0.92rem;
  display: none;
}
.alert.is-visible { display: block; }
.alert-error   { background: rgba(248,113,113,0.10); border: 1px solid rgba(248,113,113,0.4); color: #FECACA; }
.alert-success { background: rgba(74,222,128,0.10);  border: 1px solid rgba(74,222,128,0.4);  color: #BBF7D0; }
.alert-info    { background: var(--accent-soft); border: 1px solid var(--accent); color: var(--text); }

/* ---------- Link row ---------- */
.link-row {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: center;
}
.link-row a { color: var(--accent); font-weight: 600; }
.link-row a:hover { text-decoration: underline; }

/* ---------- Loading spinner ---------- */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Selection ---------- */
::selection { background: var(--accent); color: var(--bg); }
