/* Brand tokens - tweak these once the Creatix Group branding lands in assets/branding */
:root {
  --brand: #1e9bff;
  --brand-contrast: #fff;
  --bg: #0d1318;
  --panel: #171c24;
  --panel-2: #1f2630;
  --line: #2b3441;
  --text: #e8ecf1;
  --muted: #8b97a7;
  --ok: #2ecc71;
  --warn: #f5b942;
  --danger: #ff4d4f;
  --radius: 10px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { line-height: 1.45; }
a { color: var(--brand); }
h1, h2, h3 { margin: 0 0 .5rem; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: .02em; }
.brand img { height: 36px; width: auto; }
.brand .beta { background: var(--brand); color: var(--brand-contrast); font-size: .65rem; padding: .1rem .4rem; border-radius: 4px; }
.brand small { font-weight: 400; color: var(--muted); }

.shell { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.card + .card { margin-top: 1rem; }
.center-card { max-width: 420px; margin: 8vh auto 0; }

label { display: block; font-size: .85rem; color: var(--muted); margin: .75rem 0 .25rem; }
input[type=text], input[type=password], select {
  width: 100%; padding: .6rem .7rem; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; font: inherit;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.code-input { text-transform: uppercase; letter-spacing: .3em; font-size: 1.4rem; text-align: center; }

button, .btn {
  font: inherit; cursor: pointer; padding: .55rem .9rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); text-decoration: none; display: inline-block;
}
button:hover:not(:disabled) { border-color: var(--muted); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); font-weight: 600; }
button.danger { color: var(--danger); }
button.active { background: var(--danger); border-color: var(--danger); color: #fff; }
button.block { width: 100%; margin-top: 1rem; }
.error { color: var(--danger); min-height: 1.3em; font-size: .9rem; margin-top: .5rem; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row > input { flex: 1; min-width: 0; }
.tabs { display: flex; gap: .5rem; margin-bottom: .5rem; }
.tabs button.on { border-color: var(--brand); }

/* ---------- auth pages (split screen) ---------- */
body.auth { min-height: 100vh; }
.auth-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }

.auth-hero {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 2rem;
  padding: 3.5rem; min-height: 100vh; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(8, 14, 20, .35) 0%, rgba(8, 14, 20, .15) 35%, rgba(8, 14, 20, .88) 100%),
    linear-gradient(135deg, rgba(30, 155, 255, .28), rgba(13, 19, 24, .35)),
    url('/branding/background-web.jpg') center 38% / cover no-repeat;
  background-color: #0a1117;
}
.hero-copy { max-width: 34rem; }
.hero-pill {
  display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; border-radius: 99px;
  background: rgba(13, 19, 24, .55); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(8px);
  font-size: .75rem; font-weight: 700; letter-spacing: .08em;
}
.hero-pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(30, 155, 255, .25); }
.auth-hero h2 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); line-height: 1.05; margin: 1.1rem 0 .9rem; letter-spacing: -.02em; text-shadow: 0 2px 24px rgba(0, 0, 0, .5); }
.auth-hero p { margin: 0; font-size: 1.05rem; color: rgba(255, 255, 255, .85); max-width: 30rem; }
.credit { font-size: .75rem; color: rgba(255, 255, 255, .7); }
.credit a { color: #fff; }

.auth-panel { display: grid; place-items: center; padding: 2rem 1.5rem; background: var(--bg); }
.auth-box { width: 100%; max-width: 400px; }
.auth-logo { display: block; width: 100%; max-width: 280px; height: auto; margin: 0 0 2.5rem; }
.auth-box h1 { font-size: 1.6rem; margin-bottom: .25rem; letter-spacing: -.01em; }
.auth-box form { margin-top: 1.25rem; }
.auth-box label { color: var(--text); font-weight: 600; font-size: .85rem; margin-top: 1rem; }
.auth-box input[type=text], .auth-box input[type=password] { padding: .8rem .9rem; border-radius: 10px; background: #141c23; }
.auth-box input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(30, 155, 255, .25); }
.auth-box button.primary { padding: .85rem; border-radius: 10px; font-size: 1rem; margin-top: 1.25rem; box-shadow: 0 8px 24px -8px rgba(30, 155, 255, .6); transition: filter .15s, transform .15s; }
.auth-box button.primary:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.auth-alt { text-align: center; font-size: .9rem; margin: 1.1rem 0 0; color: var(--muted); }
.auth-tip { font-size: .8rem; color: var(--muted); margin: 1.1rem 0 0; }
.auth-foot { text-align: center; font-size: .75rem; color: var(--muted); margin-top: 2.5rem; }

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-hero { min-height: 220px; padding: 1.5rem; }
  .auth-hero p, .auth-hero .credit { display: none; }
  .auth-hero h2 { font-size: 1.8rem; margin-bottom: 0; }
  .auth-logo { margin-bottom: 1.5rem; }
}
