:root {
  --ink: #17130f;
  --ink-soft: #39322b;
  --muted: #777069;
  --line: #e5ded5;
  --line-strong: #d5c9bb;
  --paper: #fbfaf7;
  --paper-warm: #f5efe7;
  --surface: #fffefb;
  --surface-soft: #f8f4ee;
  --accent: #174f46;
  --accent-ink: #0e302a;
  --gold: #a7783d;
  --terracotta: #a85f47;
  --focus: #9bd4c9;
  --radius: 8px;
  --shadow: 0 24px 80px rgba(36, 28, 18, .08);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% -10%, rgba(167, 120, 61, .16), transparent 28rem),
    linear-gradient(135deg, var(--paper) 0%, #fffefb 48%, var(--paper-warm) 100%);
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, .button {
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  padding: 13px 18px;
  min-height: 46px;
  font: inherit;
  font-weight: 760;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 12px 24px rgba(23, 79, 70, .16);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}
button:hover, .button:hover { transform: translateY(-1px); box-shadow: 0 18px 34px rgba(23, 79, 70, .2); }
button:active, .button:active { transform: scale(.985); }
.secondary, .ghost {
  background: rgba(255, 254, 251, .78);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.secondary:hover, .ghost:hover { background: #fff; box-shadow: 0 12px 30px rgba(36, 28, 18, .06); }
button:focus, a:focus, input:focus, select:focus { outline: 3px solid var(--focus); outline-offset: 2px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  color: var(--gold);
  font-weight: 850;
}
.note, small, .page-head p, .landing p, .metrics span { color: var(--muted); }
.flash {
  background: #fff8e7;
  border: 1px solid #ead8ad;
  color: #4d3920;
  padding: 13px 15px;
  border-radius: var(--radius);
  margin: 0 0 18px;
}

.public-shell { min-height: 100svh; }
.landing {
  min-height: 100svh;
  width: min(920px, 100%);
  margin: 0 auto;
  padding: max(30px, env(safe-area-inset-top)) clamp(22px, 6vw, 80px) max(34px, env(safe-area-inset-bottom));
  display: grid;
  align-content: center;
  gap: 22px;
}
.landing-intro { display: grid; gap: 12px; }
.landing h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(52px, 13vw, 104px);
  line-height: .9;
  letter-spacing: 0;
}
.landing h2 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(28px, 6vw, 48px);
  line-height: 1.02;
  color: var(--accent-ink);
}
.landing p {
  max-width: 620px;
  margin: 0;
  font-size: clamp(18px, 3vw, 22px);
  line-height: 1.55;
}
.landing-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.landing-actions .button { min-height: 52px; }
.wifi-card {
  position: relative;
  margin-top: 8px;
  padding: clamp(22px, 5vw, 34px);
  background: rgba(255, 254, 251, .82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.wifi-card:before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--terracotta));
}
.wifi-card h3 {
  margin: 8px 0 20px;
  font-size: clamp(28px, 7vw, 46px);
  line-height: 1;
}

.auth-card {
  width: min(460px, calc(100% - 32px));
  margin: 8vh auto;
  padding: clamp(26px, 5vw, 38px);
  background: rgba(255, 254, 251, .9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.auth-card h1 { margin: 16px 0 8px; font-size: clamp(34px, 7vw, 48px); line-height: .95; }
.auth-card p { color: var(--muted); line-height: 1.5; }
.stack { display: grid; gap: 16px; margin-top: 22px; }

.admin-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  padding: 24px;
  background: #15120f;
  color: #fffaf2;
  display: flex;
  flex-direction: column;
}
.brand {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
}
.brand strong { display: block; font-size: 13px; letter-spacing: .08em; }
.brand small { display: block; margin-top: 2px; color: #bcb1a4; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(145deg, #f4e6cf, #b98b54);
  color: #20160d;
  font-weight: 900;
  letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}
.sidebar nav {
  display: grid;
  gap: 7px;
  margin-top: 38px;
}
.sidebar nav a {
  color: #efe8df;
  padding: 12px 13px;
  border-radius: var(--radius);
  transition: background .18s ease, transform .18s ease;
}
.sidebar nav a:hover {
  background: rgba(255,255,255,.09);
  transform: translateX(2px);
}
.ghost { width: 100%; margin-top: auto; color: #fffaf2; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.admin-main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 56px);
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.page-head h1 {
  margin: 4px 0 8px;
  max-width: 12ch;
  font-size: clamp(42px, 7vw, 72px);
  line-height: .9;
}
.page-head p { max-width: 680px; margin: 0; font-size: 17px; line-height: 1.5; }
.section-title { margin: 30px 0 12px; }
.section-title h2 { margin: 4px 0 0; font-size: 26px; }

.hero-panel {
  background: rgba(255, 254, 251, .82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 36px);
  margin-bottom: 22px;
  box-shadow: 0 18px 70px rgba(36, 28, 18, .055);
}
.dashboard-hero { background: linear-gradient(135deg, rgba(255,254,251,.95), rgba(247,241,232,.82)); }
.panel-kicker { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; color: var(--muted); }
.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(23, 79, 70, .1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hero-panel h2 { margin: 0 0 10px; font-size: clamp(30px, 5vw, 48px); line-height: .98; }
.hero-panel p { line-height: 1.55; }
.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin: 24px 0;
}
.metrics article {
  min-height: 116px;
  padding: 17px;
  border-radius: var(--radius);
  background: rgba(248, 244, 238, .92);
  border: 1px solid rgba(229, 222, 213, .72);
  display: grid;
  align-content: space-between;
}
.metrics strong { display: block; font-size: clamp(30px, 4vw, 42px); line-height: 1; }

.table-list { display: grid; gap: 9px; }
.table-list a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  background: rgba(255, 254, 251, .74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.table-list a:hover { transform: translateY(-1px); background: #fff; border-color: var(--line-strong); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: clamp(20px, 4vw, 30px);
  background: rgba(255, 254, 251, .86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 70px rgba(36, 28, 18, .05);
}
label { display: grid; gap: 8px; font-weight: 760; color: var(--ink-soft); }
input, select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  background: #fffdfa;
  color: var(--ink);
  padding: 12px 13px;
  border-radius: var(--radius);
  font: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:hover, select:hover { border-color: var(--line-strong); background: #fff; }
input.is-highlighted { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(23, 79, 70, .12); }
button.is-done { background: var(--gold); }
.check { display: flex; align-items: center; gap: 10px; }
.check input, .checklist input { width: auto; min-height: auto; accent-color: var(--accent); }
.form-actions, .inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.form-actions { grid-column: 1 / -1; padding-top: 8px; }

.prep-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 18px;
  align-items: start;
}
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 20px 0 26px;
  display: grid;
  gap: 12px;
}
.steps li {
  position: relative;
  padding: 14px 14px 14px 54px;
  background: rgba(248,244,238,.72);
  border: 1px solid rgba(229,222,213,.72);
  border-radius: var(--radius);
  line-height: 1.4;
}
.steps li:before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 850;
}
.copy-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.copy-row span { color: var(--muted); font-weight: 800; }
.copy-row code {
  word-break: break-all;
  color: var(--accent-ink);
  background: var(--surface-soft);
  padding: 9px 10px;
  border-radius: 7px;
}
.qr-panel { text-align: center; }
.qr-panel img, .reception img {
  width: min(360px, 100%);
  margin: 16px auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 16px 50px rgba(36, 28, 18, .08);
}
.checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.checklist label {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(248,244,238,.7);
  border: 1px solid rgba(229,222,213,.8);
  border-radius: var(--radius);
  padding: 12px;
}
.checklist button { width: max-content; }
.material { margin: 22px 0; }

.reception {
  min-height: calc(100svh - 120px);
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px;
  align-items: center;
  text-align: center;
}
.reception h2, .reception p { grid-column: 1 / -1; }
.reception h2 { font-size: clamp(36px, 7vw, 76px); line-height: .9; margin: 0; }

.print-body { background: #ddd8d0; padding: 24px; }
.poster {
  width: 8.5in;
  min-height: 11in;
  margin: 0 auto;
  padding: .72in;
  background:
    linear-gradient(#fffefa, #fffefa) padding-box,
    linear-gradient(135deg, var(--accent), var(--gold), var(--terracotta)) border-box;
  border: 10px solid transparent;
  color: #17130f;
  text-align: center;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
}
.poster-mark { font-size: 12px; letter-spacing: .18em; font-weight: 900; color: var(--accent); }
.poster h1 { max-width: 9ch; margin: 0; font-size: 58px; line-height: .92; }
.poster h2 { margin: 0; font-size: 30px; }
.poster p { max-width: 440px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.45; }
.poster img {
  width: 4.65in;
  background: white;
  border: 1px solid var(--line);
  padding: .18in;
  border-radius: var(--radius);
}

@media print {
  .poster button { display: none; }
  .print-body { padding: 0; background: white; }
  .poster { box-shadow: none; border-color: transparent; }
}

@media (max-width: 1020px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prep-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 10;
    height: auto;
    padding: 9px max(10px, env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    display: block;
    border-top: 1px solid rgba(255,255,255,.12);
  }
  .brand, .sidebar form { display: none; }
  .sidebar nav {
    margin: 0;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .sidebar nav a {
    min-height: 48px;
    display: grid;
    place-items: center;
    padding: 8px 4px;
    text-align: center;
    font-size: 13px;
  }
  .sidebar nav a:hover { transform: none; }
  .admin-main { padding: 24px 18px 92px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head h1 { font-size: clamp(44px, 13vw, 64px); }
  .metrics, .form-grid, .checklist, .reception, .landing-actions { grid-template-columns: 1fr; }
  .table-list a { flex-direction: column; }
  .copy-row { grid-template-columns: 1fr; }
  .copy-row button, .form-actions button, .form-actions .button, .inline-actions button, .inline-actions .button { width: 100%; }
  .landing { align-content: start; padding-top: 44px; }
  .landing h1 { font-size: clamp(54px, 17vw, 78px); }
  .poster { width: 100%; min-height: 100svh; border-width: 6px; padding: 36px 20px; }
  .poster h1 { font-size: 44px; }
  .poster img { width: min(80vw, 4.4in); }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
