/* ============================================================
   Tokens — shared + dark theme (default)
   ============================================================ */
:root {
  /* Accent — coral. All RGBA-based glows reference --accent-rgb
     so changing one value recolors the entire UI. */
  --accent: #ff7f50;
  --accent-2: #ff9e7a;
  --accent-rgb: 255, 127, 80;

  /* Dark theme (default) — matte black */
  --bg: #131417;
  --surface: #1a1c21;
  --surface-2: #22252b;
  --text: #e9ecf3;
  --muted: #8a93a5;

  --sh-dark: rgba(0, 0, 0, 0.7);
  --sh-light: rgba(255, 255, 255, 0.05);
  --shadow1: 10px 10px 24px var(--sh-dark);
  --shadow2: -10px -10px 24px var(--sh-light);
  --inset: inset 4px 4px 9px var(--sh-dark), inset -4px -4px 9px var(--sh-light);
  --inset-soft: inset 3px 3px 7px var(--sh-dark), inset -3px -3px 7px var(--sh-light);

  --radius: 22px;

  /* Semantic status colors */
  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
}

/* ============================================================
   Tokens — light theme (matte white)
   ============================================================ */
:root[data-theme="light"] {
  --bg: #eef1f6;
  --surface: #eef1f6;
  --surface-2: #e4e8ef;
  --text: #18202a;
  --muted: #6b7789;

  --sh-dark: rgba(163, 174, 190, 0.55);
  --sh-light: rgba(255, 255, 255, 0.9);

  --ok: #166534;
  --warn: #92400e;
  --danger: #b91c1c;
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

/* ============================================================
   Auth (login / register)
   ============================================================ */
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(var(--accent-rgb), .10), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(var(--accent-rgb), .06), transparent 60%),
    var(--bg);
}
.auth .card {
  width: min(460px, 100%);
  padding: 38px;
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow1), var(--shadow2);
}
.auth .brand {
  font-weight: 800;
  letter-spacing: -.04em;
  font-size: 25px;
  margin-bottom: 8px;
}
.auth .subtitle { color: var(--muted); margin: 0 0 28px; }

.field { margin: 15px 0; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--muted);
}
.field input,
.field select {
  width: 100%;
  border: 0; outline: 0;
  padding: 14px 16px;
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--inset);
  color: var(--text);
  font: inherit;
  font-size: .92rem;
  transition: box-shadow .18s ease;
}
.field input:focus,
.field select:focus {
  box-shadow: var(--inset), 0 0 0 3px rgba(var(--accent-rgb), .18);
}

button,
.btn {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  padding: 14px 18px;
  border-radius: 15px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-family: inherit;
  box-shadow: 6px 6px 14px var(--sh-dark), -6px -6px 14px var(--sh-light);
  transition: box-shadow .18s ease, transform .18s ease;
}
button:hover, .btn:hover {
  box-shadow: 3px 3px 8px var(--sh-dark), -3px -3px 8px var(--sh-light);
  transform: translateY(1px);
}
button:active, .btn:active {
  box-shadow: var(--inset);
  transform: translateY(0);
}
.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 6px 6px 14px var(--sh-dark), -6px -6px 14px var(--sh-light),
              0 0 18px rgba(var(--accent-rgb), .35);
}
.primary:hover {
  box-shadow: 3px 3px 9px var(--sh-dark), -3px -3px 9px var(--sh-light),
              0 0 26px rgba(var(--accent-rgb), .5);
}
.full { width: 100%; margin-top: 10px; }
.links { display: flex; justify-content: space-between; gap: 15px; margin-top: 22px; font-size: 13px; }
.links a { color: var(--accent); font-weight: 700; text-decoration: none; }
.links a:hover { text-decoration: underline; }

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--danger);
  box-shadow: var(--inset);
  margin-bottom: 16px;
}
.success { color: var(--ok); }

.top { display: flex; justify-content: space-between; align-items: center; padding: 22px 28px; }
.shell { min-height: 100vh; }
.content { padding: 25px; max-width: 1200px; margin: auto; }
.welcome {
  padding: 35px;
  border-radius: 30px;
  box-shadow: var(--shadow1), var(--shadow2);
}

/* ============================================================
   RESPONSIVE BASE — prevents narrow-screen text compression
   ============================================================ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  width: 100%;
  min-width: 320px;
  overflow-x: hidden;
  writing-mode: horizontal-tb;
}
.auth, .shell, .content, .welcome, .top, .card { min-width: 0; max-width: 100%; }
.auth { padding: clamp(14px, 4vw, 30px); }
.auth .card { padding: clamp(20px, 5vw, 38px); }
.content { width: 100%; padding: clamp(14px, 3vw, 25px); }
.welcome { padding: clamp(18px, 4vw, 35px); }
.top { gap: 14px; flex-wrap: wrap; padding: clamp(14px, 3vw, 22px) clamp(14px, 4vw, 28px); }
.links { flex-wrap: wrap; }
.field, .field label, .field input, .field select { min-width: 0; max-width: 100%; }
button, .btn { max-width: 100%; white-space: normal; line-height: 1.25; }
img, svg, video, canvas { max-width: 100%; }

@media (max-width: 600px) {
  .auth { padding: 14px; }
  .auth .card { border-radius: 22px; }
  .top { align-items: flex-start; }
  .top > * { min-width: 0; max-width: 100%; }
  .links { justify-content: flex-start; gap: 12px 18px; }
}
@media (max-width: 360px) {
  .auth .card { padding: 18px; }
  .content { padding: 12px; }
}

