/* Dalleth Business: loads after ../css/app.css (the Kitchen app's stylesheet: fonts, theme colours, cards, rows,
   chips, buttons, bottom bar and the category colours). Only Business-specific pieces live here. */

/* Extra category colours for stock, orders and recipes. Same rule as the Kitchen app: white label on the colour,
   each 4.5:1 or more. Fish, shellfish, meat, game, veg, fruit, fungi and wild come from ../css/app.css unchanged. */
:root {
  --cat-dairy: #7D6B12;      /* dairy and eggs: butter yellow, darkened */
  --cat-dry: #7A5C3A;        /* dry store: sacking brown */
  --cat-pastry: #A0506A;     /* pastry and bakery: soft rose */
  --cat-wine: #7A2E4A;       /* wine: claret */
  --cat-beer: #8A5A12;       /* beer and cider: amber */
  --cat-spirits: #4F4A7A;    /* spirits: indigo */
  --cat-soft: #2C7465;       /* soft drinks and mixers: mint teal */
  --cat-hot: #5C4033;        /* tea and coffee: roast brown */
  --cat-chemicals: #4A6670;  /* cleaning and chemicals: slate */
  --cat-guest: #6A5A8A;      /* guest supplies: lavender */
  --cat-linen: #6E6A62;      /* linen: warm grey */
  --cat-parts: #55595C;      /* parts and tools: steel */
  --ok: #2F6B2F; --ok-wash: #EAF4E6;
  --side-w: 236px;
}
.cat-veg { --cat: var(--cat-veg); } .cat-fruit { --cat: var(--cat-fruit); } .cat-meat { --cat: var(--cat-meat); }
.cat-game { --cat: var(--cat-game); } .cat-fish { --cat: var(--cat-fish); } .cat-shellfish { --cat: var(--cat-shellfish); }
.cat-fungi { --cat: var(--cat-fungi); } .cat-wild { --cat: var(--cat-wild); } .cat-garden { --cat: var(--cat-wild); }
.cat-dairy { --cat: var(--cat-dairy); } .cat-dry { --cat: var(--cat-dry); } .cat-pastry { --cat: var(--cat-pastry); }
.cat-wine { --cat: var(--cat-wine); } .cat-beer { --cat: var(--cat-beer); } .cat-spirits { --cat: var(--cat-spirits); }
.cat-soft { --cat: var(--cat-soft); } .cat-hot { --cat: var(--cat-hot); } .cat-chemicals { --cat: var(--cat-chemicals); }
.cat-guest { --cat: var(--cat-guest); } .cat-linen { --cat: var(--cat-linen); } .cat-parts { --cat: var(--cat-parts); }

/* top bar: Preview as pill */
.pv-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 4px 4px 4px 0; padding: 0 12px 0 10px; border-radius: 99px;
  border: 1px solid var(--brand-rule); background: var(--field); color: var(--brand); font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; }
.pv-pill .i { width: 18px; height: 18px; flex: none; }
.pv-pill.l3 { background: var(--chef-wash); border-color: var(--chef-rule); color: var(--chef); }
.pv-pill.auditor { background: var(--accent-wash); border-color: var(--accent); color: var(--accent); }
.pv-pill.admin { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* banners */
.pv-banner { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r); background: var(--brand-wash); color: var(--brand); font-size: 14.5px; margin: 0 0 16px; }
.pv-banner .i { width: 20px; height: 20px; flex: none; }
.pv-banner .grow { flex: 1; min-width: 0; }
.pv-banner a { font-weight: 600; white-space: nowrap; }
.pv-banner.auditor { background: var(--accent-wash); color: var(--accent); }
.skel-note { font-size: 13.5px; color: var(--mute); font-style: italic; text-align: center; margin: 26px 0 0; }

/* home */
.biz-hero { display: flex; align-items: center; gap: 14px; margin: 2px 0 16px; }
.biz-hero img { width: 64px; height: 64px; object-fit: contain; }
.biz-hero h1 { font-size: 30px; }
.biz-hero .tagline { font-size: 14.5px; color: var(--mute); margin: 2px 0 0; }
.quick.dept { min-height: 96px; }
.quick.dept.mine { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }

/* section letter badge + headers */
.letter { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--brand-ink);
  font-family: var(--serif); font-weight: 600; font-size: 21px; flex: none; }
.page-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 6px; }
.page-head .ph-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-wash); color: var(--brand); flex: none; }
.page-head .ph-ico .i { width: 26px; height: 26px; }
.page-head h1 { font-size: 30px; }
.page-desc { font-size: 17px; color: var(--ink-2); margin: 8px 0 12px; }

/* list rows with a lock / tier tag */
.row .tagrow { margin-top: 4px; }
.row .i.lead-ico { color: var(--brand); width: 24px; height: 24px; }
.tag.lock { color: var(--brand-2); border-color: var(--brand-rule); background: var(--brand-wash); }
.tag.tier { color: var(--accent); border-color: var(--accent); background: var(--accent-wash); }
.tag.soon { color: var(--mute); border-color: var(--rule); border-style: dashed; background: transparent; }
.tag.example { color: var(--accent); border-color: var(--accent); border-style: dashed; background: transparent; }
.tag.ok { color: var(--ok); border-color: var(--ok); background: var(--ok-wash); }
.tag.bad { color: var(--warn); border-color: var(--warn); background: var(--warn-wash); }

/* "what it will hold" list */
.feats { list-style: none; margin: 0; padding: 0; }
.feats li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 11px 2px; border-top: 1px solid var(--rule); font-size: 16px; }
.feats li:last-child { border-bottom: 1px solid var(--rule); }
.feats li .ft { flex: 1; min-width: 0; }
.feats li .tagrow { flex: none; justify-content: flex-end; }
.hidden-note { font-size: 13.5px; color: var(--mute); background: var(--wash); border-radius: 8px; padding: 9px 12px; margin-top: 12px; display: flex; gap: 8px; }
.hidden-note .i { width: 17px; height: 17px; flex: none; margin-top: 2px; }

/* example blocks */
.demo { border: 1.5px dashed var(--brand-rule); border-radius: var(--r); padding: 14px; background: var(--card-veil); margin: 16px 0; }
.demo-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.demo-head h3 { font-size: 20px; }
.xrows { list-style: none; margin: 0; padding: 0; }
.xrow { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--card); border: 1px solid var(--rule); border-left: 5px solid var(--cat, var(--rule)); border-radius: 8px; }
.xrow + .xrow { margin-top: 7px; }
.xrow .grow { flex: 1; min-width: 0; }
.xrow .t { font-weight: 600; color: var(--ink); line-height: 1.25; }
.xrow .s { font-size: 13.5px; color: var(--mute); }
.xrow .r { font-weight: 600; font-size: 14.5px; text-align: right; white-space: nowrap; }
.xrow .r.ok { color: var(--ok); } .xrow .r.warn { color: var(--accent); } .xrow .r.bad { color: var(--warn); }
.catlab { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; background: var(--cat); color: var(--cat-ink); border-radius: 3px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px; }
.demo .field:first-of-type { margin-top: 0; }
.photo-btn { display: flex; gap: 8px; align-items: center; justify-content: center; min-height: 64px; border: 1.5px dashed var(--brand-rule); border-radius: 8px; color: var(--brand); background: var(--field); width: 100%; }
.demo .btn-row { margin-top: 14px; }

/* whiteboard */
.wb { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 6px 12px; box-shadow: inset 0 0 0 4px var(--wash); }
.wb-line { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--rule); }
.wb-line:last-child { border-bottom: 0; }
.wb-line .hand { font-family: var(--serif); font-size: 21px; font-style: italic; color: var(--ink); line-height: 1.15; }
.wb-line .who { font-size: 12.5px; color: var(--mute); }
.wb-line .grow { flex: 1; min-width: 0; }
.wb-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cat, var(--rule)); margin-top: 8px; flex: none; }
.flag { display: inline-flex; gap: 4px; align-items: center; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; border: 1px solid; white-space: nowrap; }
.flag .i { width: 13px; height: 13px; }
.flag.f1 { color: var(--accent); border-color: var(--accent); background: var(--accent-wash); }
.flag.f2 { color: var(--warn); border-color: var(--warn); background: var(--warn-wash); }
.flag.f3 { color: #fff; border-color: #B00000; background: #B00000; }
.wb-write { display: flex; gap: 8px; margin-top: 10px; }
.wb-write .input { flex: 1; }
.supplier { margin-top: 12px; }
.supplier h4 { font-family: var(--sans); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 6px; }

/* flagged whiteboard lines: the whole line is filled in its flag colour (like the Temperatures alert), tap for details */
button.wb-line { width: 100%; border: 0; border-bottom: 1px dashed var(--rule); background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.wb-line.flagged { margin: 6px -6px; padding: 10px 10px 10px 8px; border-radius: 8px; border: 1px solid; border-left-width: 5px; align-items: center; }
.wb-line.flagged .chev { width: 18px; height: 18px; flex: none; opacity: .7; }
.wb-line.flagged.f1 { background: #FBF0D2; border-color: #C08A1E; }
.wb-line.flagged.f1 .who { color: #6E4E0E; }
.wb-line.flagged.f2 { background: var(--warn-wash); border-color: var(--warn); }
.wb-line.flagged.f2 .who { color: var(--warn-ink); }
.wb-line.flagged.f3 { background: #B00000; border-color: #7A0000; color: #fff; }
.wb-line.flagged.f3 .hand, .wb-line.flagged.f3 .who { color: #fff; }
.wb-line.flagged.f3 .wb-dot { box-shadow: 0 0 0 2px #fff; }
.flag-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font-size: 12.5px; color: var(--ink-2); }
.flag-key .fk { display: inline-flex; align-items: center; gap: 6px; }
.flag-key .fk i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid; display: inline-block; }
.flag-key .f1 i { background: #FBF0D2; border-color: #C08A1E; } .flag-key .f2 i { background: var(--warn-wash); border-color: var(--warn); } .flag-key .f3 i { background: #B00000; border-color: #7A0000; }
.flag-band { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; border: 1px solid; }
.flag-band .i { width: 14px; height: 14px; }
.flag-band.f1 { background: #FBF0D2; border-color: #C08A1E; color: #6E4E0E; }
.flag-band.f2 { background: var(--warn-wash); border-color: var(--warn); color: var(--warn-ink); }
.flag-band.f3 { background: #B00000; border-color: #7A0000; color: #fff; }
.flag-sheet.f1 .sheet-head { border-top: 6px solid #C08A1E; border-radius: 18px 18px 0 0; }
.flag-sheet.f2 .sheet-head { border-top: 6px solid var(--warn); border-radius: 18px 18px 0 0; }
.flag-sheet.f3 .sheet-head { border-top: 6px solid #B00000; border-radius: 18px 18px 0 0; }

/* temperatures */
.temp-group { margin-top: 14px; }
.temp-group h4 { font-family: var(--sans); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin: 0 0 6px; }

/* dish */
.dish-safety { border: 1.5px solid var(--warn-rule); background: var(--warn-wash); border-radius: var(--r); padding: 12px 14px; }
.dish-safety h4 { font-family: var(--sans); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--warn-ink); margin: 0 0 6px; }
.dish-safety .al-chip { border-color: var(--warn); color: var(--warn-ink); background: #fff; margin: 0 6px 6px 0; }   /* shape comes from recipes.css */
.dish-block { margin-top: 14px; }
.dish-block h4 { font-family: var(--sans); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin: 0 0 6px; }

/* allergy search */
.al-pick .chip { min-height: 38px; font-size: 14.5px; }
.al-dish.safe { border-left-color: var(--ok); }
.al-dish.no { opacity: .62; border-left-color: var(--warn); }

/* labels */
.labels { display: grid; grid-template-columns: 1fr; gap: 10px; }
.lbl-card { background: #fff; border: 1px solid #222; border-radius: 4px; padding: 10px 12px; font-family: var(--sans); color: #111; }
.lbl-card .lt { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 2px 6px; display: inline-block; color: #fff; background: #222; margin-bottom: 6px; }
.lbl-card.defrost .lt { background: #1F5FA0; } .lbl-card.freezer .lt { background: #3F6E9A; }
.lbl-card b { font-size: 19px; display: block; }
.lbl-card .kv { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; font-size: 14px; margin-top: 4px; }

/* tables (rota) */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); }
.tbl { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: left; white-space: nowrap; }
.tbl th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); background: var(--wash); }
.tbl td:first-child { font-weight: 600; color: var(--ink); }
.tbl td.off { color: var(--faint); }

/* who sees what */
.matrix { min-width: 520px; }
.matrix td { text-align: center; }
.matrix td:first-child { text-align: left; white-space: normal; font-weight: 400; }
.yes { color: var(--ok); font-weight: 600; } .read { color: var(--accent); font-weight: 600; } .no { color: var(--faint); }

/* preview switcher */
.lvl-opt { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--rule); background: var(--card); color: inherit; }
.lvl-opt + .lvl-opt { margin-top: 8px; }
.lvl-opt[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); background: var(--brand-wash); }
.lvl-opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--brand-rule); flex: none; margin-top: 3px; }
.lvl-opt[aria-pressed="true"] .radio { border-color: var(--brand); background: radial-gradient(var(--brand) 45%, transparent 50%); }
.lvl-opt b { font-family: var(--serif); font-size: 20px; color: var(--brand); display: block; line-height: 1.15; }
.lvl-opt small { display: block; color: var(--mute); font-size: 13.5px; line-height: 1.35; margin-top: 2px; }
.lvl-opt .sees { color: var(--ink-2); font-size: 14px; margin-top: 4px; display: block; }

/* branding + picker */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.sw i { width: 22px; height: 22px; border-radius: 5px; border: 1px solid rgba(0,0,0,.12); display: inline-block; }
.catkey { display: flex; flex-wrap: wrap; gap: 6px; }
.catkey span { font-size: 12px; font-weight: 600; letter-spacing: .06em; padding: 4px 9px; border-radius: 4px; background: var(--cat); color: var(--cat-ink); }
.pick-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); }
.switch { min-width: 64px; min-height: 36px; border-radius: 99px; border: 1.5px solid var(--brand-rule); background: var(--field); color: var(--mute); font-weight: 600; font-size: 13.5px; }
.switch[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* event function sheet */
.ev-dept { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 15px; }

/* ---------- wide screens (reception desk, writing rotas): side bar instead of bottom bar ---------- */
@media (min-width: 900px) {
  body.biz .bottomnav { top: 0; bottom: 0; right: auto; width: var(--side-w); height: auto; grid-auto-flow: row; grid-auto-rows: 56px; align-content: start;
    padding: 84px 10px 20px; border-top: 0; border-right: 1px solid var(--rule); }
  body.biz .bottomnav a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 14px; font-size: 15px; border-radius: 10px; }
  body.biz .bottomnav a.active { background: var(--brand-wash); }
  body.biz .bottomnav a.active::before { display: none; }
  body.biz .topbar { padding-left: calc(var(--side-w) + 8px); }
  body.biz .view { margin-left: var(--side-w); max-width: none; padding: 26px 40px 60px; }
  body.biz .view > * { max-width: 1060px; }
  body.biz .quick-grid { grid-template-columns: repeat(4, 1fr); }
  body.biz .toast { bottom: 24px; }
  .labels { grid-template-columns: repeat(3, 1fr); }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: start; }
}
.lv-sec { margin: 16px 0 6px; font-size: 18px; }
.lv-tbl td, .lv-tbl th { font-size: 13.5px; vertical-align: top; }
.lv-tbl td:first-child { min-width: 150px; }
.lv-tbl { table-layout: fixed; width: 100%; }
.lv-tbl td, .lv-tbl th { white-space: normal !important; word-break: normal; overflow-wrap: anywhere; }
.lv-tbl th:first-child, .lv-tbl td:first-child { width: 48%; min-width: 0; }
.lv-tbl small { font-size: 11.5px; line-height: 1.3; margin-top: 2px; }
.lv-list { list-style: none; margin: 0; padding: 0; background: var(--card, #fff); border: 1px solid var(--rule); border-radius: 12px; }
.lv-list li { padding: 10px 14px; } .lv-list li + li { border-top: 1px solid var(--rule); }
.lv-list b { display: block; font-size: 15px; }
.lv-who { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--mute); margin-top: 2px; }
.lv-who em { font-style: normal; font-weight: 700; color: var(--ink-2); }
.lv-list small { display: block; font-size: 12.5px; color: var(--mute); margin-top: 3px; line-height: 1.35; }

/* ---------- section boxes (js/boxes.js): every page split by section uses these ---------- */
.sb-rota { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--brand-wash); font-size: 14.5px; color: var(--brand); line-height: 1.35; }
.sb-team, .pp-team { margin: 14px 2px 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sb-team:first-child { margin-top: 0; }
.sb-rota > svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.sb-rota .linkish { font-weight: 700; }
.sbox { margin: 0 0 10px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); overflow: hidden; }
.sbox.has-cat { border-left: 6px solid var(--cat, var(--rule)); }
.sbox-h { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 68px; padding: 10px 14px; border: 0; background: none; font: inherit; text-align: left; color: var(--ink); cursor: pointer; }
.sbox-ico { flex: none; width: 26px; height: 26px; color: var(--brand); }
.sbox-h .grow { flex: 1; min-width: 0; }
.sbox-h b { display: block; font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.15; color: var(--brand); }
.sbox-h small { display: block; margin-top: 2px; font-size: 13px; color: var(--mute); }
.sbox-chev { flex: none; width: 20px; height: 20px; color: var(--faint); transform: rotate(90deg); transition: transform .15s; }
.sbox.open .sbox-chev { transform: rotate(-90deg); }
.sbox-c { flex: none; display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 99px; font-size: 14px; font-weight: 800; }
.sbox-c.r { background: #E9897C; color: #3E0F09; } .sbox-c.y { background: #F7DE82; color: #4F3A00; }
.sbox-pct { flex: none; min-width: 48px; padding: 4px 8px; border-radius: 99px; text-align: center; font-size: 14px; font-weight: 800; background: var(--wash-2); color: var(--ink-2); }
.sbox-pct.ok { background: var(--ok-wash, #E3F0DF); color: var(--ok, #2E6B2A); } .sbox-pct.part { background: var(--accent-wash); color: var(--accent); }
.sbox-body { padding: 4px 12px 12px; border-top: 1px solid var(--rule); }
.sb-rota.quiet { background: transparent; border: 1px dashed var(--rule); color: var(--mute); font-size: 13.5px; padding: 8px 12px; }
.perm-card h3 { margin: 0 0 4px; } .perm-card p { margin: 0 0 6px; }
.perm-list { list-style: none; margin: 8px 0; padding: 0; } .perm-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); }
.perm-list .grow { flex: 1; min-width: 0; } .perm-list small { display: block; color: var(--mute); font-size: 12.5px; }
.perm-add { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.sb-sign { margin-top: 10px; }
.sb-signed { display: flex; align-items: center; gap: 6px; margin: 10px 0 2px; font-size: 13.5px; font-weight: 700; color: var(--ok, #2f7d4f); } .sb-signed svg { width: 16px; height: 16px; }
.sb-signwho { margin: 8px 0 0; }
.ds-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.ds-row .grow { flex: 1; min-width: 0; } .ds-short { display: block; width: 100%; margin-top: 4px; font-size: 14px; padding: 6px 8px; } .ds-row b { font-size: 14.5px; margin-right: 6px; } .ds-row select { width: 172px; flex: none; font-size: 14px; padding-right: 26px; }
