/* The Pass · caterer Owner's Desk. Porcelain working surface, black rail, bottle-green accents, glass where it earns it. */
:root {
  --ink: #0b0c0b; --ink-2: #222522; --porcelain: #f6f4ef; --paper: #fffefb; --line: #e6e1d6; --mute: #6f6c64;
  --bottle: #0e2a21; --bottle-2: #1f4a3b; --mint: #e3efe8; --gold: #c8a96a; --gold-2: #f3e7cb; --red: #b5452f; --red-2: #f7e3dd;
  --amber: #a7741c; --amber-2: #f6ead2; --r: 18px;
  --display: "Bodoni Moda", Georgia, serif; --text: "Hanken Grotesk", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--porcelain); color: var(--ink); font: 15.5px/1.5 var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
svg { width: 20px; height: 20px; flex: 0 0 auto; }
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }

/* rail */
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 22px 16px; background: var(--ink); color: #e8e6df; }
.rail__brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.rail__brand b { font-family: var(--display); font-weight: 500; font-size: 22px; display: block; line-height: 1; }
.rail__brand small { color: #9b988f; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.mark { width: 40px; height: 43px; background: currentColor; -webkit-mask: url(../brand/logo-roundel.svg) center/contain no-repeat; mask: url(../brand/logo-roundel.svg) center/contain no-repeat; }
.rail__nav { display: grid; gap: 2px; }
.rail__nav button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 12px; border: 0; border-radius: 12px;
  background: none; color: #cfccc4; cursor: pointer; text-align: left; font-weight: 500; }
.rail__nav button:hover { background: rgba(255,255,255,.06); }
.rail__nav button[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 2px 0 0 var(--gold); }
.rail__nav .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--gold); color: var(--ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.rail__demo { margin-top: auto; font-size: 12.5px; color: #8e8b83; padding: 12px; border: 1px dashed rgba(255,255,255,.18); border-radius: 12px; }

/* main */
.main { padding: 26px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.top__hello { margin: 0; color: var(--mute); }
.top__title { margin: 2px 0 0; font-family: var(--display); font-weight: 500; font-size: 40px; line-height: 1.05; }
.top__right { display: flex; gap: 10px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--bottle); color: #e8f1ec; font-size: 13.5px; font-weight: 600; }
.pill--warn { background: var(--amber-2); color: var(--amber); } .pill--ok { background: var(--mint); color: var(--bottle-2); } .pill--bad { background: var(--red-2); color: var(--red); }
.pill--muted { background: #ece8de; color: var(--mute); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--green { background: var(--bottle); } .btn--gold { background: var(--gold); color: var(--ink); }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }

/* building blocks */
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 18px 40px -34px rgba(0,0,0,.4); min-width: 0; }
.card h2 { font-family: var(--display); font-weight: 500; font-size: 22px; margin: 0 0 12px; }
.card h3 { font-size: 15px; margin: 0 0 6px; }
.card--dark { background: linear-gradient(160deg, #13362b, #0b231b); color: #eaf2ed; border-color: #0b231b; }
.card--dark .muted { color: #a9c0b4; }
.stat__n { font-family: var(--display); font-size: 40px; line-height: 1; margin: 6px 0 4px; }
.stat__l { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.card--dark .stat__l { color: #a9c0b4; }
.muted { color: var(--mute); } .small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 12px; } .row--between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.tag { display: inline-flex; padding: 3px 9px; border-radius: 999px; background: #efebe1; font-size: 12px; font-weight: 600; color: #5d5a52; white-space: nowrap; }
.tag--owner { background: var(--amber-2); color: var(--amber); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tick { width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid #cfc8b8; background: #fff; display: inline-grid; place-items: center; cursor: pointer; color: transparent; }
.tick[aria-pressed="true"] { background: var(--bottle); border-color: var(--bottle); color: #fff; }
.tick svg { width: 16px; height: 16px; }
.field { display: grid; gap: 5px; margin-bottom: 12px; font-size: 13px; color: var(--mute); }
.field input, .field select, .field textarea { min-height: 42px; border: 1px solid var(--line); border-radius: 11px; padding: 8px 12px; background: #fff; color: var(--ink); font-size: 15px; }
.field textarea { min-height: 130px; resize: vertical; }

/* pipeline */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #efebe2; border-radius: var(--r); padding: 12px; min-height: 300px; }
.col h3 { margin: 4px 6px 12px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); display: flex; justify-content: space-between; }
.dk { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 14px; padding: 14px; margin-bottom: 10px; cursor: pointer; }
.dk:hover { border-color: #cbbf9f; }
.dk__budget { font-family: var(--display); font-size: 24px; line-height: 1; }
.dk__budget small { font-family: var(--text); font-size: 12px; color: var(--mute); margin-left: 6px; }
.dk__occ { font-weight: 600; margin: 8px 0 2px; }
.dk__meta { font-size: 13px; color: var(--mute); }
.dk__flag { margin-top: 8px; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal__h { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); text-align: center; padding: 4px; }
.cal__d { min-height: 104px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px; font-size: 12.5px; min-width: 0; }
.cal__d.is-out { opacity: .4; } .cal__d.is-today { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.cal__n { font-weight: 700; font-size: 13px; }
.ev { display: block; margin-top: 4px; padding: 3px 6px; border-radius: 6px; background: var(--mint); color: var(--bottle-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev--sun { background: var(--gold-2); color: #6e5520; } .ev--clash { background: var(--red-2); color: var(--red); }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 20; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(11,12,11,.4); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.drawer__panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(620px, 100vw); overflow-y: auto; background: var(--porcelain); padding: 28px; box-shadow: -30px 0 60px -30px rgba(0,0,0,.4); }
.drawer__x { position: absolute; right: 18px; top: 18px; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; }
.drawer h2 { font-family: var(--display); font-weight: 500; font-size: 30px; margin: 0 0 4px; }
.steps { display: flex; gap: 6px; margin: 16px 0 20px; flex-wrap: wrap; }
.steps button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.steps button[aria-pressed="true"] { background: var(--bottle); border-color: var(--bottle); color: #fff; }
.qline { display: grid; grid-template-columns: minmax(0, 1fr) 90px 110px 36px; gap: 8px; margin-bottom: 8px; }
.qline input { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff; }
.qline button { border: 0; background: none; cursor: pointer; color: var(--mute); }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.total b { font-family: var(--display); font-size: 28px; }
.tpl { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tpl button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 11px; font-size: 13px; cursor: pointer; }
.bar { height: 10px; border-radius: 6px; background: #ece7dc; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--bottle-2); }
.kit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kit__tile { border-radius: 14px; border: 1px solid var(--line); overflow: hidden; background: #fff; }
.kit__art { aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 18px; }
.kit__art span { width: 80%; height: 70%; background: currentColor; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.kit__tile p { margin: 0; padding: 10px 12px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); }
.swatch { height: 70px; border-radius: 12px; display: flex; align-items: flex-end; padding: 8px 10px; font-size: 12px; font-weight: 600; }
.empty { padding: 28px; text-align: center; color: var(--mute); border: 1px dashed var(--line); border-radius: var(--r); }

/* phone: rail becomes a bottom tab bar; headings centred (house rule) */
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; z-index: 10; top: auto; bottom: 0; left: 0; right: 0; height: auto; padding: 6px 6px max(6px, env(safe-area-inset-bottom)); flex-direction: row; gap: 0; }
  .rail__brand, .rail__demo { display: none; }
  .rail__nav { display: flex; overflow-x: auto; width: 100%; gap: 2px; scrollbar-width: none; }
  .rail__nav button { flex-direction: column; gap: 2px; min-height: 54px; min-width: 70px; font-size: 11px; justify-content: center; text-align: center; padding: 0 6px; }
  .rail__nav .badge { position: absolute; margin: -30px 0 0 26px; height: 18px; min-width: 18px; font-size: 11px; }
  .rail__nav button { position: relative; }
  .main { padding-bottom: 110px; }
  .top { flex-direction: column; align-items: center; text-align: center; }
  .top__title { font-size: 32px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3, .g2 { grid-template-columns: minmax(0, 1fr); }
  .card h2 { text-align: center; } .stat { text-align: center; }
  .board { grid-template-columns: repeat(5, 82vw); scroll-snap-type: x mandatory; } .col { scroll-snap-align: start; }
  .cal { gap: 3px; } .cal__d { min-height: 64px; padding: 4px; } .ev { font-size: 10px; padding: 2px 4px; }
  .kit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table { font-size: 13px; } .table th:nth-child(n+5), .table td:nth-child(n+5) { display: none; }
  .qline { grid-template-columns: minmax(0, 1fr) 64px 90px 30px; }
  .drawer__panel { padding: 22px 16px; }
}

/* money + counts: the sans, tabular. Bodoni's hairline 4 reads as 1 at small sizes. */
.stat__n, .dk__budget, .total b, .cal__n { font-family: var(--text); font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; }
.stat__n { font-size: 34px; } .dk__budget { font-size: 22px; }
