/* ===========================================================================
   QUENCH NIGHTLIFE — shared styles
   One dark palette, committed. A nightclub site should look like the room.
   =========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&family=Syne:wght@600;700;800&display=swap');

:root {
  --bg:        #100A15;
  --surface:   #1A1122;
  --surface-2: #241830;
  --line:      #33243D;
  --line-soft: #241931;

  --text:      #F2EAF3;
  --text-soft: #B0A0B4;
  --text-dim:  #7B6B82;

  --accent:    #D9A356;
  --gold:      #D9A356;
  --room-bg:   #17101F;
  --room-line: #3B2749;
  --room-zone: #241634;
  --room-text: #9C86AD;
  --wood:      #4A3624;
  --wood-line: #6B4F33;
  --counter:   #1D3B58;
  --counter-l: #2E5C86;

  --open:      #4FC46F;
  --open-ink:  #06240F;
  --held:      #E9AC3E;
  --held-ink:  #2A1D07;
  --sold:      #E05068;
  --seated:    #5AA9E6;
  --seated-ink:#06202F;

  --radius:    6px;
  --maxw:      1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Archivo, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: Syne, Georgia, serif; font-weight: 800; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.02; }
h2 { font-size: clamp(24px, 3.6vw, 34px); line-height: 1.1; }
h3 { font-size: 20px; font-weight: 700; }
p  { margin: 0 0 1em; max-width: 68ch; }
a  { color: var(--accent); }

.mono   { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.eyebrow {
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
}
.lede { color: var(--text-soft); font-size: 18px; max-width: 62ch; }
.dim  { color: var(--text-dim); }

/* ------------------------------------------------------------------ nav -- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(16,10,21,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; height: 62px; }
.brand {
  font-family: Syne, serif; font-weight: 800; font-size: 19px;
  letter-spacing: .02em; text-decoration: none; color: var(--text); white-space: nowrap;
}
.brand span { color: var(--accent); }
.site-nav { display: flex; gap: 20px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.site-nav a {
  font-size: 14px; color: var(--text-soft); text-decoration: none;
  padding: 4px 0; border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* --------------------------------------------------------------- layout -- */
section.band { padding: 56px 0; border-bottom: 1px solid var(--line-soft); }
section.band:last-of-type { border-bottom: none; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row   { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.grid  { display: grid; gap: 14px; }
.grid.cols { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* --------------------------------------------------------------- pieces -- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
}
.card h3 { margin-bottom: 4px; }

.btn {
  font-family: Archivo, sans-serif; font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: filter .15s ease, background .15s ease;
}
.btn.primary { background: var(--accent); color: #21160A; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 5px; }
label .req { color: var(--sold); }
input[type=text], input[type=tel], input[type=number], input[type=email], select, textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 13px; font-family: Archivo, sans-serif; font-size: 15px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field { margin-bottom: 14px; }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.fields-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; align-items: end; }
/* Controls in a row keep their labels above them and their boxes on one line. */
.fields-3 .field, .fields-2 .field { min-width: 0; }
.fields-3 input, .fields-3 select { width: 100%; }
@media (max-width: 560px) { .fields-2 { grid-template-columns: 1fr; } }
.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--text-soft); }
.checkline input { margin-top: 4px; }

.pill {
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 4px; font-weight: 600;
}
.pill.p-open { background: var(--open); color: var(--open-ink); }
.pill.p-held { background: var(--held); color: var(--held-ink); }
.pill.p-sold { background: var(--sold); color: #fff; }

.notice {
  border-radius: var(--radius); padding: 13px 16px; font-size: 14.5px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-soft);
}
.notice.good { border-color: var(--open); color: var(--open); background: rgba(79,196,111,.08); }
.notice.bad  { border-color: var(--sold); color: var(--sold); background: rgba(224,80,104,.08); }
.notice[hidden] { display: none !important; }

.hostbar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 11px 16px; font-size: 14.5px; color: var(--text-soft);
}
.hostbar b { font-family: "IBM Plex Mono", monospace; color: var(--accent); font-weight: 600; }

/* --------------------------------------------------------------- footer -- */
.site-foot {
  border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 0 50px;
  font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--text-dim); line-height: 1.9;
}
.site-foot a { color: var(--text-soft); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }

/* ------------------------------------------------------------ skeletons -- */
.skeleton { color: var(--text-dim); font-family: "IBM Plex Mono", monospace; font-size: 13px; }

/* =========================================================== floor plan == */

.room {
  background: var(--room-bg); border: 1px solid var(--room-line);
  border-radius: 10px; padding: 8px; overflow-x: auto;
}
.room svg { display: block; width: 100%; min-width: 880px; height: auto; }

.wall           { fill: none; stroke: var(--room-line); stroke-width: 2; }
.boh            { fill: var(--room-zone); stroke: var(--room-line); stroke-width: 1.5; stroke-dasharray: 6 5; opacity: .7; }
.floorzone      { fill: var(--room-zone); stroke: var(--room-line); stroke-width: 1.5; }
.djbooth        { fill: #35214D; stroke: #4E3268; stroke-width: 1.5; }
.deck           { fill: var(--wood); stroke: var(--wood-line); stroke-width: 1.5; }
.counter-shape  { fill: var(--counter); stroke: var(--counter-l); stroke-width: 1.5; }
.fixture        { fill: none; stroke: var(--room-line); stroke-width: 1.5; stroke-dasharray: 5 5; }
.ftext          { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .14em; fill: var(--room-text); }
.doorlab        { font-family: "IBM Plex Mono", monospace; font-size: 8.5px; letter-spacing: .05em; fill: var(--room-text); }
.zlabel         { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .18em; fill: var(--room-text); text-transform: uppercase; }

g.t                    { cursor: pointer; }
g.t .shape             { stroke-width: 2; }
g.t .lab               { font-family: "IBM Plex Mono", monospace; font-weight: 600; text-anchor: middle; dominant-baseline: central; pointer-events: none; }

/* Reservation status on the floor. Open is the quiet background state; the
   eye should go to money and to people who have arrived. */
g.t.st-open .shape      { fill: none; stroke: var(--room-line); stroke-width: 2; }
g.t.st-open .lab        { fill: var(--room-text); }

g.t.st-held .shape      { fill: none; stroke: var(--held); stroke-dasharray: 5 4; }
g.t.st-held .lab        { fill: var(--held); }

g.t.st-confirmed .shape { fill: var(--held); stroke: var(--held); fill-opacity: .22; }
g.t.st-confirmed .lab   { fill: var(--held); }

g.t.st-paid .shape      { fill: var(--open); stroke: var(--open); }
g.t.st-paid .lab        { fill: var(--open-ink); }

g.t.st-seated .shape    { fill: var(--seated); stroke: var(--seated); }
g.t.st-seated .lab      { fill: var(--seated-ink); }

g.t.st-completed .shape { fill: var(--open); stroke: var(--open); opacity: .3; }
g.t.st-completed .lab   { fill: var(--open); opacity: .85; }

g.t .ring              { fill: none; stroke: none; }
g.t:hover .ring, g.t:focus-visible .ring { stroke: #fff; stroke-width: 2; }
g.t.sel .ring          { stroke: #fff; stroke-width: 2.5; }
g.t:focus-visible      { outline: none; }

/* legend + counter */
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.key { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-soft); }
.sw { width: 15px; height: 15px; border-radius: 4px; flex: 0 0 auto; }
.sw.k-open      { background: transparent; border: 2px solid var(--room-line); }
.sw.k-held      { background: transparent; border: 2px dashed var(--held); }
.sw.k-confirmed { background: var(--held); opacity: .5; }
.sw.k-paid      { background: var(--open); }
.sw.k-seated    { background: var(--seated); }

.tally {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 20px; text-align: right; min-width: 160px;
}
.tally .n {
  font-family: Syne, serif; font-weight: 800; font-size: 42px; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--open); display: block;
}
.tally .n.low { color: var(--sold); }
.tally .lbl {
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim);
}

.sec-card .nm  { font-family: Syne, serif; font-weight: 700; font-size: 16px; display: block; }
.sec-card .min { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--text-soft); display: block; }
.sec-card .left { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; margin-top: 5px; display: block; }
.sec-card .left.has  { color: var(--open); }
.sec-card .left.none { color: var(--sold); }

/* ============================================================== tables ===== */
/* Operations screens are mostly tables. They were unstyled until phase 3. */

.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tw table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14.5px; }
.tw th, .tw td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tw th {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim);
  background: var(--surface-2); border-bottom-color: var(--line); white-space: nowrap;
}
.tw tbody tr:last-child td { border-bottom: 0; }
.tw tbody tr:hover td { background: rgba(255,255,255,.02); }
.tw td.num, .tw th.num { text-align: right; font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; }
.tw td.code { font-family: "IBM Plex Mono", monospace; letter-spacing: .04em; }
.tw td.skeleton, .tw td.dim { color: var(--text-dim); }
.tw .btn { padding: 5px 12px; font-size: 12.5px; }

/* Ageing: how long money has been outside the building. */
.age { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .06em; }
.age.a0 { color: var(--text-soft); }
.age.a1 { color: var(--held); }
.age.a2 { color: var(--sold); font-weight: 600; }

/* Figure blocks on the close and debtors screens. */
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fig { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
/* Mono, not Syne: naira figures run long, and a display face at 24px overflowed
   the card into its neighbour. Tabular digits also line up down the row. */
.fig .n {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 600;
  font-size: clamp(16px, 2.1vw, 21px); letter-spacing: -.02em;
  display: block; line-height: 1.25; overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.fig .n.warn { color: var(--held); }
.fig .n.bad  { color: var(--sold); }
.fig .lbl {
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim); display: block; margin-top: 3px;
}

/* A drop target that doesn't pretend to be a button. */
.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 30px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--surface-2); }
.drop input[type=file] { display: none; }
.drop .big { font-family: Syne, serif; font-weight: 700; font-size: 17px; display: block; margin-bottom: 4px; }

@media (max-width: 640px) {
  .fields-2 { grid-template-columns: 1fr; }
  .tw table { font-size: 13.5px; }
  .tw th, .tw td { padding: 8px 10px; }
}
