/* ==========================================================================
   AdSupreme design system — v3 (dark)
   Near-black + graphite, brand red as accent, dark red for depth.
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap");

:root {
  --red: #e8192c;
  --red-hi: #ff2e42;
  --red-deep: #5a0a12;
  --red-dark: #240609;

  --bg: #0a0a0a;
  --bg-2: #0f0f0f;
  --card: #141414;
  --card-2: #1b1b1b;
  --line: #242424;
  --line-2: #333333;
  --ink: #f3f1ee;
  --ink-2: #c9c6c1;
  --muted: #8b8884;
  --faint: #5c5a57;

  --pos: #3fae76;
  --warn: #d9963f;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 12px;
  --r-lg: 20px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: var(--red); color: #fff; }

.muted { color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--red); letter-spacing: .02em; }
.title { font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -.03em; margin: 0; }
.label { font-size: 13px; color: var(--muted); }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; font-size: 17px; }
.logo svg { width: 22px; height: 22px; }
.logo img { height: 24px; width: auto; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .2s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 8px 24px -8px rgba(232,25,44,.6); }
.btn--red:hover { background: var(--red-hi); box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 10px 32px -8px rgba(232,25,44,.8); }
.btn--light { background: var(--ink); color: var(--bg); }
.btn--light:hover { background: #fff; }
.btn--line { background: rgba(255,255,255,.02); border-color: var(--line-2); color: var(--ink); }
.btn--line:hover { border-color: var(--ink-2); background: rgba(255,255,255,.05); }
.btn--sm { height: 36px; padding: 0 16px; font-size: 13.5px; }
.btn--lg { height: 52px; padding: 0 28px; font-size: 15px; }
.btn--full { width: 100%; }
.btn .arrow { width: 16px; height: 16px; }

/* inputs */
.field { display: grid; gap: 8px; }
.field > span { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.input {
  width: 100%; height: 48px; padding: 0 16px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--card); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: #444; }
.input:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(232,25,44,.15); }
.input::placeholder { color: var(--faint); }

/* surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }

/* status */
.status { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; flex: none; box-sizing: border-box; border: 1.5px solid currentColor; }
.status--on, .status--wait, .status--off { color: var(--ink-2); }
.status--on::before { background: var(--pos); border-color: var(--pos); }
.status--wait::before { border-color: var(--warn); }
.status--off::before { background: var(--red); border-color: var(--red); }
.row .status { width: 88px; }

/* list rows */
.list { display: grid; }
.row { display: flex; align-items: center; gap: 16px; padding: 18px 24px; border-top: 1px solid var(--line); transition: background .12s; }
.row:first-child { border-top: 0; }
.row:hover { background: rgba(255,255,255,.015); }
.row__main { flex: 1; min-width: 0; }
.row__title { font-weight: 500; }
.row__sub { font-size: 13.5px; color: var(--muted); }
.row__end { text-align: right; }

/* app shell (client + admin) */
.top { max-width: 1040px; margin: 0 auto; padding: 22px 24px; display: flex; align-items: center; gap: 32px; }
.tabs { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); }
.tabs a { padding: 7px 16px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--card-2); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--line-2) inset; }
.top__end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(140deg, var(--red), var(--red-deep)); color: #fff; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; }
.page { max-width: 1040px; margin: 0 auto; padding: 16px 24px 96px; display: grid; gap: 36px; }
.section { display: grid; gap: 14px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px; }
.section__head h2 { font-size: 17px; font-weight: 600; margin: 0; letter-spacing: -.015em; }

/* signature: red pixel blocks */
.blocks { position: absolute; display: grid; grid-template-columns: repeat(4, var(--b, 56px)); grid-auto-rows: var(--b, 56px); pointer-events: none; }
.blocks i { background: var(--red); }
.blocks i.d { background: var(--red-deep); }
.blocks i.k { background: var(--card-2); }
.blocks i.o { background: transparent; }

@media (max-width: 680px) {
  .top { padding: 14px 16px 10px; gap: 12px; }
  .tabs { display: flex; width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a, .tabs button { white-space: nowrap; }
  .page { padding: 8px 16px 64px; gap: 24px; }
  .row { padding: 14px 14px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* interactive 3D mark (mark3d.js) */
.mark3d { position: relative; aspect-ratio: 1; cursor: grab; touch-action: pan-y; }
.mark3d.is-drag { cursor: grabbing; }
.mark3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mark3d img { width: 100%; height: 100%; object-fit: contain; }

