@font-face {
  font-family: Outfit;
  src: url("../fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("../fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("../fonts/outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("../fonts/outfit-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("../fonts/outfit-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("../fonts/source-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("../fonts/source-serif-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("../fonts/source-serif-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --navy: #1b2a4a;
  --navy-2: #243656;
  --ink: #152033;
  --coral: #e25748;
  --coral-d: #c94436;
  --gold: #e0a82e;
  --gold-s: #fff3cf;
  --teal: #1f8f84;
  --cream: #f4eee4;
  --paper: #fffdf8;
  --line: #e5d9c8;
  --muted: #6b7284;
  --ok: #2c8a68;
  --warn: #c47b12;
  --bad: #c2413b;
  --shadow: 0 14px 40px rgba(27, 42, 74, 0.08);
  --r: 20px;
  --sidebar: 268px;
  --safe-t: env(safe-area-inset-top);
  --safe-b: env(safe-area-inset-bottom);
  --safe-l: env(safe-area-inset-left);
  --safe-r: env(safe-area-inset-right);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Outfit, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #ffe8c8 0%, transparent 50%),
    radial-gradient(900px 400px at 100% 0%, #ffd8d0 0%, transparent 46%),
    var(--cream);
  min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.app {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100dvh;
}
.app.kiosk { display: block; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: calc(22px + var(--safe-t)) 18px calc(18px + var(--safe-b));
  background: var(--navy);
  color: #f6efe4;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 8px 18px;
}
.brand img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f6efe4;
  object-fit: cover;
}
.brand h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.brand p {
  margin: 3px 0 0;
  font-size: 12px;
  opacity: 0.62;
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 12px 12px;
  border-radius: 14px;
  color: #d9d2c6;
  min-height: 48px;
}
.nav a svg { flex: none; }
.nav a.active, .nav a:hover { background: #31476d; color: #fff; }
.nav .badge {
  margin-left: auto;
  background: var(--coral);
  color: #fff;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.side-foot { margin-top: auto; padding: 10px 8px 0; font-size: 12px; opacity: 0.55; line-height: 1.45; }

.main {
  padding: calc(22px + var(--safe-t)) 28px calc(32px + var(--safe-b));
  min-width: 0;
}
.toprow {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
}
.toprow h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.toprow .sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 1fr 1fr 1fr; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.span2 { grid-column: span 2; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card.flat { box-shadow: none; }
.card h3 { margin: 0 0 10px; font-size: 16px; letter-spacing: -0.02em; }
.clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.clickable:active { transform: scale(0.985); }

.stat {
  padding: 16px 16px 14px;
}
.stat .k { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.stat .v { font-size: 28px; font-weight: 750; letter-spacing: -0.04em; margin-top: 4px; }
.stat.coral { background: linear-gradient(180deg, #fff, #fff3ef); }
.stat.teal { background: linear-gradient(180deg, #fff, #eef8f5); }
.stat.gold { background: linear-gradient(180deg, #fff, #fff7e4); }

.btn {
  border: 0;
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
  padding: 12px 16px;
  min-height: 48px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.coral { background: var(--coral); }
.btn.teal { background: var(--teal); }
.btn.ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn.soft { background: #efe7da; color: var(--navy); }
.btn.warn { background: #fff1e8; color: var(--coral-d); }
.btn.lg { min-height: 56px; padding: 14px 20px; font-size: 17px; }
.btn.xl { min-height: 64px; width: 100%; font-size: 18px; border-radius: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; pointer-events: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 650;
  background: #efe7da;
}
.chip.gold { background: var(--gold-s); color: #8a5b00; }
.chip.teal { background: #dff3ee; color: #14665d; }
.chip.coral { background: #ffe3de; color: #9d2c22; }
.chip.ok { background: #ddf3e8; color: #176646; }
.chip.muted { background: #ececec; color: #555; }
.chip.bad { background: #fde2e1; color: #9b1c1c; }

.list { display: flex; flex-direction: column; gap: 10px; }
.job {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
}
.job .actions { margin-top: 10px; }
.when {
  background: #f3ebe0;
  border-radius: 14px;
  text-align: center;
  padding: 8px 4px;
}
.when b { display: block; font-size: 20px; letter-spacing: -0.04em; line-height: 1.1; }
.when span { font-size: 12px; color: var(--muted); }
.job h4 { margin: 0 0 4px; font-size: 17px; letter-spacing: -0.02em; }
.job p { margin: 0; color: var(--muted); font-size: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; font-weight: 600; color: #4b5568; }
.field input:not([type="radio"]):not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 12px;
  min-height: 48px;
  outline: none;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus,
.field textarea:focus {
  border-color: #9bb0d4;
  box-shadow: 0 0 0 4px rgba(36, 54, 86, 0.08);
}
.field .req { color: var(--coral); font-style: normal; font-weight: 800; }
.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice.g3 { flex-wrap: wrap; }
.section-label {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--navy);
}
.choice label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}
.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.choice label:has(input:checked) {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}
.need-list { margin-top: 12px; font-size: 13px; line-height: 1.45; }
.need-list p { margin: 0; opacity: .85; }
.need-list .ready { color: #b7e0c8; opacity: 1; }
.intake-intro { background: #fff7e4; }
.lead { color: var(--muted); font-size: 16px; line-height: 1.45; }
.fixed-fee {
  margin: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 750;
  color: var(--navy);
}
.waiver { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.waiver-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
}
.waiver-opt input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--navy); }
.waiver-opt span { display: flex; flex-direction: column; gap: 4px; }
.waiver-opt b { font-size: 16px; }
.waiver-opt small { color: var(--muted); font-size: 13.5px; line-height: 1.4; font-weight: 500; }
.waiver-opt.on { border-color: var(--navy); background: #eef2f8; }
.search {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  min-height: 48px;
}

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.table td { padding: 12px 10px; border-bottom: 1px solid #f0e8dc; vertical-align: middle; }
.table tr.clickable:hover { background: #fbf6ee; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
  font-weight: 600;
  color: var(--muted);
}
.tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }

.item-pick {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0e8dc;
}
.qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #efe7da;
  font-size: 20px;
}

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, .45);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 40;
}
.modal {
  width: min(560px, 100%);
  background: var(--paper);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
}

/* Signing / kiosk */
.kiosk-wrap {
  min-height: 100dvh;
  padding: calc(16px + var(--safe-t)) 20px calc(20px + var(--safe-b));
}
.kiosk-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.steps {
  display: flex;
  gap: 6px;
  flex: 1;
  max-width: 520px;
  margin: 0 16px;
}
.steps i {
  height: 6px;
  flex: 1;
  border-radius: 99px;
  background: #e5d9c8;
}
.steps i.on { background: var(--coral); }
.sign-card {
  max-width: 980px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.sign-card h2 {
  margin: 0 0 8px;
  font-size: 34px;
  letter-spacing: -0.045em;
}
.sign-card .lead { color: var(--muted); font-size: 17px; margin: 0 0 22px; }
.rules { display: grid; gap: 10px; }
.rule {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f7f1e8;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.4;
}
.rule b {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 13px;
}
.agb-box {
  height: min(46vh, 420px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  background: #fff;
  font-family: "Source Serif", Georgia, serif;
  font-size: 15.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.check {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
  accent-color: var(--navy);
}

.sig-wrap {
  border: 2px dashed #cfc1ad;
  border-radius: 18px;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 31px, #f3ebe0 32px),
    #fff;
  overflow: hidden;
  touch-action: none;
}
.sig-wrap canvas { width: 100%; height: 240px; display: block; touch-action: none; }
.sig-hint { color: var(--muted); font-size: 13px; margin-top: 8px; }

.price-box {
  background: #1b2a4a;
  color: #fff;
  border-radius: 18px;
  padding: 16px 18px;
}
.price-box .line { display: flex; justify-content: space-between; margin: 4px 0; opacity: .85; }
.price-box .sum { display: flex; justify-content: space-between; margin-top: 10px; font-size: 22px; font-weight: 750; }

.empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-b));
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  z-index: 50;
  box-shadow: var(--shadow);
}

.legal-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.staff-card h3 { letter-spacing: -0.03em; }

.hamburger { display: none; }
.scrim { display: none; }

@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    transform: translateX(-105%);
    transition: transform .2s ease;
    z-index: 30;
  }
  .sidebar.open { transform: none; }
  .scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 25;
  }
  .scrim.on { display: block; }
  .hamburger { display: inline-flex; }
  .g2, .g3, .g4 { grid-template-columns: 1fr 1fr; }
  .job { grid-template-columns: 64px 1fr; }
  .main { padding: calc(14px + var(--safe-t)) 14px calc(24px + var(--safe-b)); }
  .toprow h2 { font-size: 26px; }
  .sign-card { padding: 18px; border-radius: 20px; }
  .sign-card h2 { font-size: 26px; }
}

@media (max-width: 640px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .choice label { white-space: normal; }
}

@media print {
  .sidebar, .toprow .row, .no-print, .hamburger { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
