/* ==========================================================================
   COVERS. — restaurant floor & seating manager.
   Design category: DARK ELEGANT. Espresso ground, brass accent, Playfair
   Display against Jost. Hairlines instead of shadows, restrained motion.
   Structurally different too: the centrepiece is a live floor plan, not a list.
   ========================================================================= */

:root {
  --espresso: #14100d;
  --char: #1c1613;
  --char-2: #251d18;
  --char-3: #2f251e;
  --brass: #c9a96a;
  --brass-dim: #8f7a4d;
  --brass-glow: rgba(201, 169, 106, 0.16);
  --cream: #f5efe6;
  --muted: rgba(245, 239, 230, 0.52);
  --line: rgba(245, 239, 230, 0.12);
  --line-soft: rgba(245, 239, 230, 0.07);
  --sage: #7e9a72;
  --clay: #b4674a;

  --display: "Playfair Display", Georgia, serif;
  --ui: "Jost", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --gutter: 26px;
  --max: 1340px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--espresso);
  color: var(--cream);
  font-family: var(--ui);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 1.5px solid var(--brass); outline-offset: 3px; }
::selection { background: var(--brass); color: var(--espresso); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* -------------------------------------------------------------------- TYPE */
.display { font-family: var(--display); font-weight: 400; letter-spacing: -0.015em; line-height: 1.06; margin: 0; }
.serif { font-family: var(--display); font-weight: 400; }

.kicker {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0;
}

.lede { font-size: 16.5px; line-height: 1.65; color: rgba(245, 239, 230, 0.72); margin: 0; }
.small { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ BUTTON */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--ui);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color 260ms ease, border-color 260ms ease,
              color 260ms ease, letter-spacing 260ms ease;
}

.btn--brass { background: var(--brass); color: var(--espresso); }
.btn--brass:hover { background: #d8bc82; letter-spacing: 0.14em; }

.btn--outline { background: transparent; border-color: var(--line); color: var(--cream); }
.btn--outline:hover { border-color: var(--brass); color: var(--brass); }

.btn--ghost { background: transparent; border-color: transparent; color: var(--muted); padding-inline: 8px; }
.btn--ghost:hover { color: var(--cream); }

.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.35; pointer-events: none; }

/* ------------------------------------------------------------------ TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 16, 13, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar__inner { display: flex; align-items: center; gap: 26px; padding-block: 18px; }

.logo {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo span { color: var(--brass); }

.topbar__mid {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar__mid b { color: var(--cream); font-weight: 500; }

/* -------------------------------------------------------------------- HERO */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: min(54vh, 460px); display: flex; align-items: flex-end; }

.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; animation: drift 30s ease-in-out infinite alternate; }

@keyframes drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.1) translate3d(-1%, -1.4%, 0); }
}

.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,16,13,0.72) 0%, rgba(20,16,13,0.34) 40%,
                              rgba(20,16,13,0.9) 82%, var(--espresso) 100%);
}

.hero__body { padding-block: 56px 34px; width: 100%; }
.hero h1 { font-family: var(--display); font-size: clamp(38px, 5.6vw, 76px); font-weight: 400; line-height: 1.02; letter-spacing: -0.02em; margin: 16px 0 0; max-width: 18ch; }
.hero h1 em { font-style: italic; color: var(--brass); }
.hero .lede { margin-top: 16px; max-width: 46ch; }

.hero__stats {
  display: flex; flex-wrap: wrap; gap: 12px 40px;
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--line);
}

.stat { display: flex; flex-direction: column; }
.stat b { font-family: var(--display); font-size: 27px; font-weight: 400; line-height: 1.1; }
.stat small { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------------- BOARD */
.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 34px;
  align-items: start;
  padding-block: 44px 30px;
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  padding-bottom: 14px; margin-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}

.section-head h2 { font-family: var(--display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 400; margin: 0; }

/* -------------------------------------------------------------- FLOOR PLAN */
.floor {
  position: relative;
  aspect-ratio: 16 / 11;
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, var(--line-soft) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--line-soft) 39px 40px),
    linear-gradient(160deg, #1a1512, #14100d);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.floor__legend {
  position: absolute; left: 14px; bottom: 14px; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  background: rgba(20, 16, 13, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 9px 14px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.legend { display: flex; align-items: center; gap: 7px; }

.legend i { width: 10px; height: 10px; border-radius: 3px; display: block; flex: none; }
.legend b { color: var(--cream); font-weight: 500; margin-left: 1px; }
.legend .k-free { background: #2b2421; box-shadow: inset 0 0 0 2px rgba(245, 239, 230, 0.34); }
.legend .k-seated { background: var(--brass); }
.legend .k-reserved { background: #3d6a68; }
.legend .k-dirty { background: var(--clay); }

.floor__bar {
  position: absolute; top: 14px; left: 14px; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}

.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 0 rgba(126, 154, 114, 0.7);
  animation: ping 2.6s ease-out infinite;
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(126, 154, 114, 0.55); }
  70% { box-shadow: 0 0 0 11px rgba(126, 154, 114, 0); }
  100% { box-shadow: 0 0 0 0 rgba(126, 154, 114, 0); }
}

/* tables — status is carried by a FILLED surface, not a hairline outline, so a
   full room can be read at a glance from across the pass */
.tbl {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: var(--w);
  height: var(--h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  background: #2b2421;
  color: var(--cream);
  box-shadow: inset 0 0 0 2px rgba(245, 239, 230, 0.34);
  transition: transform 260ms cubic-bezier(0.2, 0.9, 0.3, 1.2), box-shadow 260ms ease,
              background-color 260ms ease, color 260ms ease;
}

.tbl[data-shape="round"] { border-radius: 50%; }

.tbl:hover { transform: translate(-50%, -50%) scale(1.08); z-index: 4; }

.tbl__id {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1;
}

.tbl__seats { font-size: 9.5px; letter-spacing: 0.06em; line-height: 1; opacity: 0.68; }

/* status fills */
.tbl[data-status="seated"] {
  background: var(--brass);
  color: #1a1410;
  box-shadow: inset 0 0 0 2px var(--brass);
}
.tbl[data-status="seated"] .tbl__seats { opacity: 0.7; }

.tbl[data-status="reserved"] {
  background: #3d6a68;
  color: #eef7f6;
  box-shadow: inset 0 0 0 2px #6d9d9a;
}

.tbl[data-status="dirty"] {
  background: var(--clay);
  color: #fdf2ed;
  box-shadow: inset 0 0 0 2px #cd8a68;
}

/* selection ring sits outside the fill so it reads on every status */
.tbl[aria-pressed="true"] {
  box-shadow: 0 0 0 3px var(--espresso), 0 0 0 6px var(--cream);
}

/* ------------------------------------------------------------------- PANEL */
.panel {
  background: var(--char);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 26px;
}

.panel + .panel { margin-top: 22px; }

.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel h3 { font-family: var(--display); font-size: 21px; font-weight: 400; margin: 0; }

.tag {
  font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line);
  color: var(--muted);
}

.tag--seated { background: var(--brass); border-color: var(--brass); color: var(--espresso); }
.tag--reserved { border-color: var(--sage); color: var(--sage); }
.tag--dirty { background: var(--char-3); border-color: transparent; }

.rows { display: grid; gap: 0; }

.row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  padding-block: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
}

.row__key { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.row__val { color: rgba(245, 239, 230, 0.86); margin: 0; }

.actions { display: grid; gap: 9px; margin-top: 20px; }

/* ----------------------------------------------------------------- SERVICE */
.service-bars { display: grid; gap: 11px; }

.bar-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 40px; gap: 14px; align-items: center; font-size: 12.5px; }

.bar {
  height: 7px;
  background: var(--line-soft);
  border-radius: 4px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brass-dim), var(--brass));
  border-radius: 4px;
  transition: width 1000ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.bar-row--peak .bar span { background: linear-gradient(90deg, var(--clay), #d98a63); }
.bar-row small { text-align: right; color: var(--muted); }

/* ------------------------------------------------------------ RESERVATIONS */
.bookings { display: grid; }

.booking {
  display: grid;
  grid-template-columns: 74px 1.1fr 1fr 110px 96px;
  gap: 18px;
  align-items: center;
  padding-block: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 14.5px;
  transition: background-color 240ms ease;
}

.booking:hover { background: rgba(245, 239, 230, 0.02); }

.booking__time { font-family: var(--display); font-size: 19px; }
.booking__name { font-weight: 400; color: var(--cream); }
.booking__name small { display: block; color: var(--muted); font-size: 12.5px; }
.booking__note { color: var(--muted); font-size: 13px; }
.booking__table { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass); }

/* ------------------------------------------------------------------- STAFF */
.staff { display: flex; flex-wrap: wrap; gap: 26px; }

.person { display: flex; align-items: center; gap: 13px; }

.person__ini {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 14px;
  color: var(--brass);
  letter-spacing: 0.04em;
}

.person b { display: block; font-size: 14px; font-weight: 400; }
.person small { display: block; color: var(--muted); font-size: 11.5px; letter-spacing: 0.06em; }

/* ------------------------------------------------------------------- TOAST */
.toast {
  position: fixed; left: 50%; bottom: 30px;
  transform: translate(-50%, 16px);
  z-index: 90;
  background: var(--brass);
  color: var(--espresso);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: var(--r-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease, transform 320ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.toast[data-show="true"] { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ FOOTER */
.foot { border-top: 1px solid var(--line-soft); padding-block: 30px 44px; }
.foot__row { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; font-size: 12.5px; color: var(--muted); }

/* ----------------------------------------------------------------- REVEAL */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.9, 0.3, 1); }
.reveal[data-shown="true"] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------- RESPONSIVE */
@media (max-width: 1080px) {
  .board { grid-template-columns: 1fr; gap: 26px; }
  .topbar__mid { display: none; }
  .booking { grid-template-columns: 66px 1fr 96px; gap: 12px; }
  .booking__note, .booking__table { grid-column: 2 / -1; }
}

@media (max-width: 680px) {
  :root { --gutter: 16px; }
  .hero { min-height: auto; }
  .hero__body { padding-block: 40px 28px; }
  .floor { aspect-ratio: 4 / 5; }
  .floor__legend { font-size: 9.5px; gap: 5px 11px; padding: 7px 10px; }
  .staff { gap: 18px; }
  .foot__row { flex-direction: column; gap: 8px; }
}
