@import url("/static/brand/fonts/instrument-sans.css");
@import url("/static/brand/plancha-tokens.css");

/* Every colour in this file lives here and nowhere else. Below this block there is not one
   hex value and not one rgba(), which is what check_brand.py holds: a Plancha v2 is then a
   file swap in static/brand, not a hand-edit of three codebases.

   The two mappings worth knowing, because they are not the obvious ones:
   --teal was the ORDINARY primary button and links, so it is steel.
   --gold was the ONE big commit action (Finalize) and the acting-as bar, so it is copper,
   which is exactly what Plancha reserves copper for. Mapping it the other way round would
   put copper on every button on every page. */
:root {
  /* The ordinary primary action. It is a FILL, so it has to contrast with the surface it
     sits on, and that surface flips between modes. So --teal flips too, and carries its
     own ink. Pinning it to one point on the steel ramp is what shipped a Sign in button
     at 1.00:1 on a dark card: --pl-card BECOMES --pl-steel-950 in dark mode, so the
     button and the card behind it were the same colour. A ramp step is a fixed point;
     only the semantic tokens flip. */
  --teal: var(--pl-steel-950);
  --teal-dark: var(--pl-steel-800);
  --on-teal: #FFFFFF;

  /* Steel that deliberately does NOT flip: the header band, and a control sitting on
     copper. Copper is a mid-dark warm colour in both modes, so steel reads on it either
     way, and --header-ink is the warm white that goes on steel. */
  --steel-fixed: var(--pl-steel-950);
  --teal-header: var(--steel-fixed);
  --header-ink: #ECE8DF;
  --header-line: var(--pl-steel-800);

  --seafoam-d: var(--pl-rule);
  --gold: var(--pl-copper);
  --gold-dark: var(--pl-copper-press);
  --ink: var(--pl-text);
  --muted: var(--pl-text-muted);
  --line: var(--pl-rule);
  --bg: var(--pl-surface);
  --card: var(--pl-card);
  --ok: var(--pl-success);
  --warn: var(--pl-error);

  /* Washes: a hover or a pressed state is a colour decision too, so it lives up here. */
  --wash: rgba(36, 40, 44, .07);
  --wash-on-steel: rgba(244, 241, 234, .14);
  --scrim: rgba(36, 40, 44, .18);
}

/* Dark mode, written the way plancha-tokens.css writes it: the attribute selector on its
   own, and the media query SEPARATELY. Folding the two into one selector list makes
   :root:not([data-theme="light"]) match whenever the attribute is absent, which is always,
   so LIGHT mode silently took the dark wash and the dark scrim and has never had a
   visible hover. */
[data-theme="dark"] {
  --teal: var(--pl-text);
  --teal-dark: var(--pl-steel-200);
  --on-teal: var(--pl-steel-950);
  --wash: rgba(236, 232, 223, .08);
  --scrim: rgba(0, 0, 0, .45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --teal: var(--pl-text);
    --teal-dark: var(--pl-steel-200);
    --on-teal: var(--pl-steel-950);
    --wash: rgba(236, 232, 223, .08);
    --scrim: rgba(0, 0, 0, .45);
  }
}
/* ===== END OF THE TOKEN BLOCK. No hex and no rgba() below this line: check_brand.py
   2.1 and 2.2 fail if one appears, because a colour down here is a colour that will not
   move when the brand does. ===== */


* { box-sizing: border-box; }
/* The hidden attribute always wins. Without this, any class that sets display
   (a flex row, say) quietly shows an element the page has hidden. */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--pl-font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

a { color: var(--pl-copper-text); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.topbar {
  background: var(--teal-header);
  /* Steel, so everything on it is the warm white of the reverse lockup. */
  color: var(--header-ink);
  border-bottom: 1px solid var(--header-line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--header-ink); }
/* The brand slot. Empty until the platform mark exists: what used to be here was
   one customer's wordmark. These rules stay so the mark drops in without new CSS. */
.topbar .brand img { height: 26px; width: auto; display: block; }
/* The nav is one list that reads two ways. On a laptop the links sit in a
   row and the Menu button does not exist. On a phone the row becomes a sheet
   behind that button, because eight links at 12.5px wrapped to three rows and
   pushed the first vendor card 333px down an 812px screen.

   A checkbox drives it rather than <details>: a closed details element has
   its contents hidden by the browser's own stylesheet, which author CSS
   cannot override, so the links disappeared on a laptop. */
/* flex, not block: an inline-flex label inside a block sits on a text
   baseline and the descender space adds 14px to the header for nothing. */
.navwrap { margin-left: auto; display: flex; align-items: center; }
.navwrap .navtoggle, .navwrap .menubtn { display: none; }
.navwrap .sheet { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.navwrap a { color: var(--header-ink); padding: 6px 10px; border-radius: 6px; font-size: 14px; }
.navwrap a:hover { background: var(--wash-on-steel); text-decoration: none; color: var(--header-ink); }
.navwrap a[aria-current] { background: var(--wash-on-steel); font-weight: 600; }
.topbar .who { color: var(--header-ink); opacity: .75; font-size: 13px; }
/* Receiving and the shopping list have their own buttons on the home screen,
   where there is room. The phone has none, so the menu carries them. */
.navwrap a.phone-only { display: none; }
/* Log out is a button inside a form (it is a POST), made to look like its
   neighbours. display: contents lets the button sit in the row as if the form
   were not there. */
.navwrap .logoutform { display: contents; margin: 0; }
.navwrap button.logout {
  font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer;
  /* On the steel header, so warm white. Left as teal-dark it measured 1.44:1 against
     the header, which is invisible, and the browser's own default button colour is the
     reason a button needs saying where a link does not. */
  color: var(--header-ink); padding: 6px 10px; border-radius: 6px;
}
.navwrap button.logout:hover { background: var(--wash-on-steel); }

@media (max-width: 640px) {
  .topbar { padding: 8px 12px; gap: 6px; }
  .topbar .brand { font-size: 15px; }
  .topbar .brand img { height: 22px; }
  .topbar .brand .hide-sm { display: none; }

  .navwrap { position: relative; }
  /* Shown but off screen rather than display:none, which would take it out
     of the tab order and leave the menu unreachable by keyboard. */
  .navwrap .navtoggle {
    display: block; position: absolute; opacity: 0;
    width: 1px; height: 1px; margin: 0; pointer-events: none;
  }
  .navwrap .menubtn {
    display: inline-flex; align-items: center; gap: 6px;
    /* 44px tall: the smallest target a thumb reliably hits. margin:0 because
       the form-label rule above gives every label 10px/4px, which was adding
       14px to the header for nothing. */
    margin: 0; padding: 11px 16px; min-height: 44px;
    border-radius: 8px; cursor: pointer;
    font-size: 15px; font-weight: 600; color: var(--header-ink);
    background: var(--wash-on-steel);
  }
  .navwrap .menubtn::after { content: "\25be"; font-size: 12px; }
  .navwrap .navtoggle:checked ~ .menubtn::after { content: "\25b4"; }
  .navwrap .navtoggle:focus-visible ~ .menubtn { outline: 2px solid var(--header-ink); }

  .navwrap .sheet {
    display: none; position: absolute; right: 0; top: calc(100% + 8px);
    z-index: 20; min-width: 230px; flex-direction: column; align-items: stretch;
    gap: 0; padding: 6px; background: var(--card);
    border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--pl-shadow-3);
  }
  .navwrap .navtoggle:checked ~ .sheet { display: flex; }
  /* 44px rows: the size a thumb actually hits. The old nav was 32px. */
  .navwrap .sheet a {
    padding: 12px 14px; font-size: 16px; border-radius: 8px; min-height: 44px;
    display: flex; align-items: center;
    /* The sheet is a card, not the steel header: ink, not header-ink. */
    color: var(--ink);
  }
  .navwrap .sheet a:hover, .navwrap .sheet a[aria-current],
  .navwrap .sheet button.logout:hover { background: var(--wash); color: var(--ink); }
  .navwrap a.phone-only { display: flex; }
  /* A rule between the daily screens and the desk ones, and another above
     Log out so it is never what a thumb lands on by accident. */
  .navwrap .sheet a.group-start,
  .navwrap .sheet button.logout {
    border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px;
  }
  .navwrap .sheet button.logout {
    color: var(--pl-text-muted); width: 100%; text-align: left; padding: 14px 14px 12px;
    font-size: 16px; min-height: 44px; border-radius: 8px; display: flex; align-items: center;
  }
  .topbar .who {
    display: block; padding: 10px 14px 4px; font-size: 12px;
    text-transform: uppercase; letter-spacing: .05em;
    /* In the sheet, which is a card: ink, and full strength. */
    color: var(--pl-text-muted); opacity: 1;
  }
  .topbar .who a { color: var(--pl-text-muted); }
}

/* Tables are the one thing on a phone that cannot be made narrower: a
   comparison with five columns of numbers needs the width it needs. Left
   alone they escape the card they sit in and drag the whole page sideways:
   the Products table was 551px inside a 375px screen and the document
   scrolled to 637px.

   display:block turns the table itself into the scroll container, so the
   spill is contained without wrapping every table in every template in a
   div, and a new table is never the one somebody forgot to wrap. */
@media (max-width: 640px) {
  main table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  /* Only the number columns refuse to wrap. Everything else is prose, and
     letting it wrap is what takes a table from scrolling to fitting: the
     plan's status column alone ("will not deliver under 15 cases") was
     130px of unbreakable text. */
  main table th.num, main table td.num { white-space: nowrap; }
  main table th:not(.num), main table td:not(.num) { white-space: normal; }
  .grouptable th, .grouptable td { padding: 5px 4px; font-size: 13px; }
  /* Four decimals is right on a laptop where there is room to compare. On a
     phone the column it needs is the difference between fitting and not. */
  .grouptable th:first-child, .grouptable td:first-child { padding-right: 0; }
  /* Columns and controls that belong at a desk. Hiding them is what takes
     these tables from scrolling to fitting; everything hidden here is
     reachable on a laptop and none of it is needed standing in a kitchen. */
  /* Element selectors in front so these beat .inlineform, which is defined
     further down the file and would otherwise win on source order. */
  main table .desk-only, main table th.desk-only, main table td.desk-only {
    display: none;
  }
  main table .phone-only-cell { display: inline; }
  .grouptable input[type=number], .grouptable input[type=text] { max-width: 76px; }
}

.wrap { max-width: 880px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 4px 0 2px; }
h2 { font-size: 17px; margin: 18px 0 8px; color: var(--ink); }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; }

/* Buttons */
.btn {
  display: inline-block; border: 1px solid var(--teal); background: var(--teal);
  color: var(--on-teal); padding: 9px 14px; border-radius: 8px; font-size: 15px; cursor: pointer;
  text-align: center;
}
.btn:hover { background: var(--teal-dark); text-decoration: none; }
.btn.secondary { background: var(--pl-card); color: var(--ink); border-color: var(--line); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--pl-on-copper); font-weight: 600; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.sm { padding: 5px 9px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; margin-bottom: 12px;
}
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

.pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--pl-sunken); color: var(--muted); }
.pill.draft { background: var(--pl-warning-tint); color: var(--pl-warning); }
.pill.finalized { background: var(--pl-success-tint); color: var(--ok); }
.pill.cat { background: var(--pl-module-purchasing-tint); color: var(--pl-text-body); text-transform: uppercase; letter-spacing: .03em; }

.ok { color: var(--ok); font-weight: 600; }
.warn { color: var(--warn); font-weight: 600; }
.muted { color: var(--muted); }

/* Tables / item lists */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 15px; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; }

/* Browsers do not inherit the page font into form controls, which is why the
   date picker on the home screen rendered in Chrome's own font. */
input, select, textarea, button { font-family: inherit; }

input[type=text], input[type=number], input[type=password], input[type=email], input[type=tel], select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; background: var(--pl-card); color: var(--ink);
}

/* Date inputs are sized by their content, so they get the look without the
   width: 100% the block above applies. */
input[type=date] {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; background: var(--pl-card); color: var(--ink);
}
label { font-size: 13px; color: var(--muted); display: block; margin: 10px 0 4px; }
.field { margin-bottom: 4px; }
.price-input { max-width: 110px; }
.qty-input { max-width: 84px; text-align: right; }

.noprice { color: var(--warn); font-size: 12px; }

/* Order entry: dense two-column layout */
.oe-cat { margin: 14px 0 6px; }
.oe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
@media (max-width: 640px) { .oe-grid { grid-template-columns: 1fr; } }
.oe-row {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  padding: 5px 8px; border-bottom: 1px solid var(--line);
}
.oe-row:hover { background: var(--pl-sunken); }
.oe-name { font-size: 14px; line-height: 1.25; }
.oe-price { color: var(--muted); font-size: 12px; margin-left: 4px; white-space: nowrap; }

/* Stepper quantity control */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; background: var(--pl-card); }
.stepper .step {
  width: 42px; height: 42px; border: none; background: var(--pl-sunken); color: var(--ink);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; -webkit-user-select: none; user-select: none;
}
.stepper .step:hover { background: var(--teal); color: var(--on-teal); }
.stepper .step:active { background: var(--teal-dark); color: var(--on-teal); }
.stepper .step:disabled { opacity: .4; cursor: not-allowed; }
.stepper .qty-input {
  width: 52px; height: 42px; text-align: center; border: none; border-left: 1px solid var(--line);
  border-right: 1px solid var(--line); border-radius: 0; font-size: 16px; padding: 0 4px;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper .qty-input:focus { outline: none; background: var(--pl-card); }
/* hide native number spinners so only the big -/+ buttons drive it */
.stepper .qty-input::-webkit-outer-spin-button,
.stepper .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Item-management: category blocks + reorder controls */
.catblock { margin-bottom: 14px; }
.cathead { display: flex; align-items: center; gap: 8px; background: var(--pl-sunken);
  border: 1px solid var(--line); border-bottom: none; border-radius: 8px 8px 0 0; padding: 5px 8px; }
.catname { margin: 0; flex: 1; }
.catname input { font-weight: 700; color: var(--teal-dark); border: 1px solid transparent;
  background: transparent; padding: 4px 6px; text-transform: uppercase; letter-spacing: .02em; font-size: 14px; }
.catname input:hover, .catname input:focus { border-color: var(--line); background: var(--pl-card); }
.catctl { display: flex; gap: 2px; }
.ic { border: 1px solid var(--line); background: var(--pl-card); color: var(--muted); border-radius: 6px;
  width: 26px; height: 26px; font-size: 11px; line-height: 1; cursor: pointer; padding: 0; }
.ic:hover { background: var(--teal); color: var(--on-teal); border-color: var(--teal); }
.ic.danger:hover { background: var(--warn); border-color: var(--warn); }
table.itemtbl { border: 1px solid var(--line); border-top: none; border-radius: 0 0 8px 8px; overflow: hidden; }
table.itemtbl td { padding: 4px 6px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
table.itemtbl tr:last-child td { border-bottom: none; }
.itemtbl td.ord { white-space: nowrap; width: 58px; }
.itemtbl td.nm strong { font-weight: 600; }
.itemtbl td.nm small { display: block; font-size: 11px; }
.itemtbl td.nm .pill { font-size: 10px; padding: 1px 6px; }
.itemtbl td.pr { white-space: nowrap; width: 130px; }
.itemtbl td.pr .price-input { max-width: 84px; padding: 5px 6px; }
.itemtbl td.pr .unit { font-size: 11px; margin-left: 4px; }
.itemtbl td.mv { width: 150px; }
.itemtbl td.mv select { padding: 4px 6px; font-size: 12px; }
.itemtbl td.ed { width: 150px; text-align: right; white-space: nowrap; }

/* Tabs (Items / Archived) */
.tabs { display: flex; align-items: center; gap: 6px; margin: 4px 0 14px; border-bottom: 1px solid var(--line); }
.tabs .tab { padding: 8px 14px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs .tab:hover { color: var(--teal-dark); text-decoration: none; }
.tabs .tab.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--teal); }

/* Minimum check banner */
.checkbar { position: sticky; bottom: 0; background: var(--pl-card); border-top: 2px solid var(--teal);
  padding: 12px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.checkbar .status { font-weight: 600; }
.checkbar .status .sep { color: var(--muted); margin: 0 2px; font-weight: 400; }
.checkbar #oe-total { color: var(--ink); font-size: 17px; }
.checkbar #oe-missing { font-weight: 400; font-size: 13px; }
@media (max-width: 640px) { .checkbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .checkbar .status { font-size: 14px; } }

/* Ticket card */
.ticket {
  max-width: 360px; margin: 0 auto; background: var(--pl-card); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px; box-shadow: var(--pl-shadow-1);
}
.ticket .thead { text-align: center; border-bottom: 2px solid var(--teal); padding-bottom: 10px; margin-bottom: 10px; }
.ticket .thead img { height: 34px; margin-bottom: 6px; }
.ticket .title { font-weight: 700; color: var(--teal-dark); }
.ticket .date { color: var(--muted); font-size: 14px; }
.ticket .contact { font-size: 13px; margin-top: 6px; padding: 6px 8px; background: var(--pl-sunken);
  border-radius: 6px; color: var(--ink); }
.ticket .contact .clink { display: inline-block; color: var(--teal); font-weight: 600;
  text-decoration: none; padding: 3px 2px; }
.ticket .contact .clink:active { color: var(--teal-dark); }
.ticket .cat { font-weight: 700; font-size: 12px; letter-spacing: .04em; color: var(--teal);
  margin: 12px 0 4px; text-transform: uppercase; }
.ticket .line { display: grid; grid-template-columns: 26px 1fr; gap: 8px; font-size: 14px; padding: 2px 0; }
.ticket .line .q { font-weight: 700; text-align: right; }
.ticket .tfoot { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px;
  font-size: 14px; display: flex; justify-content: space-between; align-items: center; }

.login-wrap { max-width: 360px; margin: 8vh auto; text-align: center; }
.login-wrap img { height: 64px; margin-bottom: 8px; }
.login-wrap .card { text-align: left; }
.error { background: var(--pl-error-tint); color: var(--pl-error); padding: 8px 10px; border-radius: 8px; font-size: 14px; margin-bottom: 10px; }
.flash { background: var(--pl-success-tint); color: var(--ok); padding: 8px 10px; border-radius: 8px; font-size: 14px; margin-bottom: 10px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.savedmsg { color: var(--ok); font-size: 13px; opacity: 0; transition: opacity .2s; }
.savedmsg.show { opacity: 1; }
.savestate { margin-left: 8px; font-size: 12px; color: var(--muted); font-style: italic; }

/* Cash calendar (/cashflow) */
.card.week.current { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.card.week.past { opacity: .7; }
.card.amber { border-color: var(--gold); background: var(--pl-warning-tint); }
.card.draftblock { border-style: dashed; }
.wk-total { font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.cashrow {
  display: flex; align-items: baseline; gap: 8px;
  margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); font-size: 15px;
}
.cashrow .pill { flex: 0 0 auto; white-space: nowrap; }
.cashrow .nm { flex: 1; min-width: 0; }
.cashrow .from { display: block; color: var(--muted); font-size: 12px; }
.cashrow .amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.cashrow.catering .amt { font-weight: 500; color: var(--muted); }
.cashrow.catering .nm { color: var(--muted); font-size: 14px; }
/* A delivery fee, under the order it rode in with. */
.cashrow.fees { padding-left: 14px; }
.cashrow.fees .nm, .cashrow.fees .amt { color: var(--muted); font-size: 14px; font-weight: 500; }

.pill.cod { background: var(--pl-module-purchasing-tint); color: var(--pl-text-body); }
.pill.net { background: var(--pl-warning-tint); color: var(--gold-dark); }
.pill.missing { background: var(--pl-error-tint); color: var(--warn); }

/* Standing inside somebody else's account, or unable to write in your own */
.actingbar, .readonlybar {
  padding: 8px 16px; font-size: 14px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.actingbar { background: var(--gold); color: var(--pl-on-copper); font-weight: 600; }
/* --pl-on-copper is the INK that goes on copper, #FFFFFF in light mode. Using it as a
   BACKGROUND here made a white button with a white label. It is steel, like the header. */
.actingbar .btn { background: var(--steel-fixed); border-color: var(--steel-fixed);
                  color: var(--header-ink); }
.readonlybar { background: var(--pl-error-tint); color: var(--warn); }

/* What the person is told about the trial and the card. Quiet at first, louder as
   the date nears. Never dismissible: it is the one notice that stops being true. */
.billingbar {
  padding: 8px 16px; font-size: 14px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.billingbar form { margin: 0; }
.billingbar.quiet { background: var(--pl-sunken); color: var(--ink); }
.billingbar.soon { background: var(--pl-warning-tint); color: var(--pl-warning); }
.billingbar.urgent { background: var(--pl-warning-tint); color: var(--pl-warning); font-weight: 600; }
.billingbar.bad { background: var(--pl-error-tint); color: var(--warn); font-weight: 600; }

/* Catering: a switch above the items, never a second control on the row */
.chanswitch { margin: -4px 0 10px; }
.otherchan {
  display: inline-block; font-size: 11px; color: var(--gold-dark);
  background: var(--pl-warning-tint); border-radius: 999px; padding: 0 6px; margin-left: 6px;
}


/* Receiving: "as ordered" has to fit, and the number has to be tappable */
.itemtbl input[type=number].price-input { max-width: 100%; min-width: 92px; text-align: right; }
.recvrow:hover { background: var(--pl-sunken); }

/* Receiving: adding something that was never ordered, in one row */
.extrarow { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.extrarow select { flex: 2 1 180px; width: auto; }
.extrarow input[type=number] { flex: 0 0 120px; }
.extrarow input[type=text] { flex: 1 1 140px; width: auto; }

/* Settings: a switch, not a checkbox. Both post the same value; a switch reads
   as on/off from across a phone, where a checkbox reads as one more form field
   waiting to be filled in. The input stays a checkbox so the form is unchanged. */
.switchrow { margin-top: 16px; }
.switch {
  display: flex; align-items: center; gap: 11px; cursor: pointer;
  margin: 0; font-size: 15px; color: var(--ink);
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  flex: 0 0 auto; width: 46px; height: 28px; border-radius: 999px;
  background: var(--pl-sunken); border: 1px solid var(--line); position: relative;
  transition: background .15s ease, border-color .15s ease;
}
.switch .knob {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--pl-card); box-shadow: var(--pl-shadow-2);
  transition: transform .15s ease;
}
.switch input:checked + .track { background: var(--teal); border-color: var(--teal); }
.switch input:checked + .track .knob { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Settings: the account id. It is the one string support asks for, so it has to
   be readable and obviously not a typo-able form field. */
.accountid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; background: var(--pl-card); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 6px; color: var(--ink);
}

/* Vendor schedule: the days a vendor delivers. Pills, not a text box, because
   the text box accepted "Weds" and then silently matched nothing. */
.daypills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.daypill { display: inline-block; margin: 0; cursor: pointer; }
.daypill input { position: absolute; opacity: 0; width: 0; height: 0; }
.daypill span {
  display: inline-block; padding: 8px 13px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--pl-card); font-size: 14px; color: var(--muted);
  user-select: none; transition: background .12s ease, color .12s ease;
}
.daypill input:checked + span { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.daypill input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Shopping list: the weeks there is no truck. One big tap target per row,
   because it is used one-handed in a store aisle. */
.pill.moved { background: var(--pl-module-purchasing-tint); color: var(--teal-dark); }
.card.shoplist { padding: 0 12px; }
.shoprow { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.shoprow:last-child { border-bottom: none; }
.shoptick { flex: 1; margin: 0; min-width: 0; }
.tick {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 54px;
  background: none; border: 0; padding: 10px 2px; text-align: left; cursor: pointer;
  font-size: 16px; color: var(--ink);
}
.tick .box {
  flex: 0 0 26px; height: 26px; border: 2px solid var(--teal); border-radius: 7px;
  background: var(--pl-card); position: relative;
}
.tick .nm { flex: 1; min-width: 0; line-height: 1.3; }
.tick .pack { display: block; color: var(--muted); font-size: 13px; }
.tick .qty { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shoprow.got .box { background: var(--teal); }
.shoprow.got .box::after {
  content: ""; position: absolute; left: 7px; top: 2px; width: 7px; height: 13px;
  border: solid var(--on-teal); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.shoprow.got .nm, .shoprow.got .qty { color: var(--muted); text-decoration: line-through; }
.shopremove { margin: 0; }
.card.shopcard { border-color: var(--teal); }

/* Done shopping: one price per ticked line, typed from the receipt */
.payrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.payrow .nm { flex: 1; min-width: 0; font-size: 15px; }
.payrow .from { display: block; color: var(--muted); font-size: 12px; }
.payrow input.price-input { flex: 0 0 110px; max-width: 110px; text-align: right; }
.payrow .payinputs { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 60%; }
.payrow .payinputs .unit { align-self: center; font-size: 14px; color: var(--muted); margin: 0 4px 0 -2px; }
.payrow { flex-wrap: wrap; }
.payrow .bywt { flex: 1 0 100%; display: flex; align-items: center; gap: 8px; margin: 2px 0 0;
  font-size: 14px; color: var(--ink); cursor: pointer; }
.payrow .bywt input { width: 20px; height: 20px; margin: 0; accent-color: var(--teal); }
.payrow .wtfields { flex: 1 0 100%; background: var(--pl-sunken); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; }
.payrow .wtline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 3px 0; }
.payrow .wtline input.price-input { flex: 0 0 84px; max-width: 84px; text-align: right; padding: 7px 8px; }
.payrow .wtsum { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* Settings: what a staff account may change, one switch at a time */
.perms { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px 0; }
.permswitch { display: inline-block; margin: 0; cursor: pointer; }
.permswitch input { position: absolute; opacity: 0; width: 0; height: 0; }
.permswitch span {
  display: inline-block; padding: 5px 11px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--pl-card); font-size: 13px; color: var(--muted); user-select: none;
}
.permswitch input:checked + span { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.permswitch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }


/* Product groups: one product as carried by several vendors. */
.grouptable { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.grouptable th { text-align: left; font-weight: 600; color: var(--muted);
                 font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.grouptable th, .grouptable td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.grouptable td.num, .grouptable th.num { text-align: right; font-variant-numeric: tabular-nums; }
.grouptable tr.preferred td { background: var(--bg); }
.inlineform { display: inline-flex; gap: 4px; align-items: center; }
.btn.tiny { padding: 2px 8px; font-size: 12px; }
/* Shown only where the desk-only controls are hidden, which is phones. */
.phone-only-cell { display: none; }


/* The weekly plan. */
.movelist { margin: 4px 0 0; padding-left: 20px; font-size: 14px; }
.movelist li { margin: 2px 0; }
.skiplist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px; }
.skiprow { display: flex; gap: 6px; align-items: baseline; font-size: 14px; }
.ok-banner { border-color: var(--ok); }


/* The three ways an invoice gets in. Side by side on a laptop, stacked on a
   phone, where the photograph is the one that matters anyway. */
.invoice-ways { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.invoice-ways .way {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.invoice-ways .way p.muted { font-size: 13px; margin: 0; flex: 1; }
.invoice-ways .way input[type=file] { font-size: 13px; }
.invoice-ways .way button { align-self: flex-start; }
@media (max-width: 640px) {
  .invoice-ways { grid-template-columns: 1fr; }
}


/* A file input's own control says "Choose File", which is not what taking a
   photograph looks like. Hide it and drive it from a label big enough to hit
   with a thumb. The input stays focusable so a keyboard still reaches it. */
.filehidden { position: absolute; opacity: 0; width: 1px; height: 1px; }
.btn.bigfile {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; width: 100%; font-size: 16px; cursor: pointer; margin: 0;
}
.filehidden:focus-visible + .btn.bigfile { outline: 2px solid var(--teal-dark); }
/* A camera, drawn rather than fetched: a body and a lens. */
.btn.bigfile .cam {
  width: 20px; height: 15px; border: 2px solid currentColor; border-radius: 3px;
  position: relative; display: inline-block; flex: 0 0 auto;
}
.btn.bigfile .cam::before {
  content: ""; position: absolute; left: 5px; top: 3px;
  width: 6px; height: 6px; border: 2px solid currentColor; border-radius: 50%;
}
.btn.bigfile .cam::after {
  content: ""; position: absolute; left: 4px; top: -5px;
  width: 7px; height: 3px; border: 2px solid currentColor;
  border-bottom: none; border-radius: 2px 2px 0 0;
}


/* Vendors nobody has finished. Amber rather than red: most of these are
   merely unverified, and a thing that shouts every day stops being read. */
.card.setupnudge { border-left: 3px solid var(--gold); }
.card.setupnudge .cashrow .from { display: block; font-size: 12px; }

/* Accounts: people, invitations, links */
.notice { background: var(--pl-success-tint); color: var(--ok); padding: 8px 10px; border-radius: 8px;
  font-size: 14px; margin: 8px 0 10px; }
.peopleacts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px 0; }
.peopleacts form { margin: 0; }
.inviteform { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.invitefields { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.invitefields input, .invitefields select { flex: 1 1 150px; min-width: 0; margin: 0; }
.topbar .who a { color: inherit; }

/* First run: the three steps a restaurant that has never ordered sees on Home. */
.firstrun ol { list-style: none; margin: 12px 0 0; padding: 0; }
.firstrun li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.firstrun li:first-child { border-top: 0; }
.firstrun .mark {
  flex: 0 0 30px; height: 30px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: 600; font-size: 14px;
  background: var(--pl-sunken); color: var(--muted);
}
.firstrun li.now .mark { background: var(--teal); color: var(--on-teal); }
.firstrun li.done .mark { background: var(--pl-success-tint); color: var(--ok); }
.firstrun li.done strong { color: var(--muted); font-weight: 500; }
.firstrun li.later { opacity: .85; }
.firstrun .body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.firstrun .detail { font-size: 14px; }
.firstrun .firstactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.firstrun .firstactions .btn { min-height: 44px; display: inline-flex; align-items: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
