/* =====================================================================================================
   v392 visual layer (Daniel approved the designs 19/10/2026).
   Shared pieces only: tokens, status pills, progress bars, big buttons, tiles, step tracker, allergen
   cells. Page-specific rules live in the page's own file (vz-staff.css, vz-office.css, vz-portal.css,
   vz-reports.css). Every state is an ICON PLUS A WORD, never colour alone. Touch targets: 56 px for
   staff buttons, 44 px minimum everywhere else.
   ===================================================================================================== */
:root {
  /* action teal deepened from #0C8D80 so white text passes 4.5:1 (about 5.2:1) */
  --primary: hsl(174 84% 26%);
  --primary-hover: hsl(174 84% 21%);
  --vz-ink: #1F2937;
  --vz-ink-2: #3B4656;
  --vz-muted: #5B6676;
  --vz-line: #DDE2E8;
  --vz-line-2: #B8C0CB;
  --vz-bg: #F3F5F7;
  --vz-card: #FFFFFF;
  --vz-teal: #0B7A6F;
  --vz-teal-ink: #095F57;
  --vz-teal-tint: #E3F4F1;
  --vz-teal-wash: #EAF6F4;
  --vz-green: #218355;
  --vz-green-ink: #17653F;
  --vz-green-bg: #E6F5EC;
  --vz-amber: #D9900A;
  --vz-amber-ink: #7A4F00;
  --vz-amber-bg: #FFF1D0;
  --vz-red: #C92A2A;
  --vz-red-ink: #B01E1E;
  --vz-red-bg: #FDECEC;
  --vz-grey-bg: #EEF1F4;
  --vz-dash: #6B7788;
}
@media (prefers-color-scheme: dark) { /* the platform is light-only today; nothing here changes that */ }

/* ---------- cards and headings ---------- */
.vz-card { background: var(--vz-card); border: 1px solid var(--vz-line); border-radius: 16px; padding: 20px 22px; }
.vz-card.flat { padding: 16px 18px; border-radius: 14px; }
.vz-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vz-muted); }
.vz-h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.vz-sub { font-size: 16px; color: var(--vz-muted); }
.vz-num { font-variant-numeric: tabular-nums; }
.vz-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.vz-grow { flex: 1 1 0; min-width: 0; }
.vz-stack { display: flex; flex-direction: column; gap: 14px; }
.vz-link-reset { color: inherit; text-decoration: none; }
.vz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- status pill: icon + word ---------- */
.vz-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; background: var(--vz-grey-bg); color: var(--vz-ink-2); }
.vz-pill i { font-size: 16px; }
.vz-pill.done, .vz-pill.ok { background: var(--vz-green-bg); color: var(--vz-green-ink); }
.vz-pill.due, .vz-pill.warn { background: var(--vz-amber-bg); color: var(--vz-amber-ink); }
.vz-pill.overdue, .vz-pill.bad { background: var(--vz-red-bg); color: var(--vz-red-ink); }
.vz-pill.info { background: var(--vz-teal-tint); color: var(--vz-teal-ink); }
.vz-pill.unknown { background: #fff; color: var(--vz-ink-2); border: 1.5px dashed var(--vz-dash); }
.vz-pill.none { background: var(--vz-grey-bg); color: var(--vz-ink-2); }

/* ---------- buttons ---------- */
.vz-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border: 0; border-radius: 12px; background: var(--vz-teal); color: #fff; font: inherit; font-size: 19px; font-weight: 700; text-decoration: none; cursor: pointer; }
.vz-btn:hover { background: var(--primary-hover); color: #fff; }
.vz-btn i { font-size: 24px; }
.vz-btn.sec { background: #fff; color: var(--vz-ink); border: 1.5px solid var(--vz-line-2); font-weight: 600; }
.vz-btn.sec:hover { background: var(--vz-bg); color: var(--vz-ink); }
.vz-btn.office { min-height: 44px; padding: 0 18px; font-size: 16px; border-radius: 10px; }
.vz-btn.office i { font-size: 20px; }
.vz-btn:focus-visible, .vz-tilebtn:focus-visible, .vz-tile:focus-visible, .vz-job a:focus-visible { outline: 3px solid var(--vz-teal); outline-offset: 2px; }

/* square quick-action tile (icon over a word) */
.vz-tilebtn { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 14px; min-height: 104px; padding: 16px; border: 1px solid var(--vz-line); border-radius: 14px; background: #fff; color: var(--vz-ink); font: inherit; font-size: 18px; font-weight: 700; text-align: left; text-decoration: none; }
.vz-tilebtn i { font-size: 30px; color: var(--vz-teal); }
.vz-tilebtn:hover { border-color: var(--vz-teal); background: var(--vz-teal-wash); }
.vz-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ---------- progress ---------- */
.vz-bar { display: flex; gap: 5px; }
.vz-bar > span { flex: 1; height: 16px; border-radius: 8px; background: var(--vz-line); }
.vz-bar > span.on { background: var(--vz-teal); }
.vz-bar > span.part { background: var(--vz-amber); }
.vz-bar > span.bad { background: var(--vz-red); }
.vz-meter { height: 14px; border-radius: 7px; background: var(--vz-line); overflow: hidden; display: flex; }
.vz-meter > span { display: block; height: 100%; }
.vz-meter .g { background: var(--vz-green); } .vz-meter .a { background: var(--vz-amber); } .vz-meter .r { background: var(--vz-red); } .vz-meter .k { background: var(--vz-line-2); }
.vz-ring { --pct: 0; --ring: var(--vz-teal); width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--ring) calc(var(--pct) * 1%), var(--vz-line) 0); }
.vz-ring > div { width: 100px; height: 100px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; }
.vz-ring b { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.vz-ring small { display: block; font-size: 12px; font-weight: 600; color: var(--vz-muted); margin-top: 2px; }

/* ---------- 7-day strip (one dot per day: icon colour AND a title) ---------- */
.vz-days { display: flex; gap: 4px; }
.vz-days > span { flex: 1; height: 10px; border-radius: 3px; background: var(--vz-line); }
.vz-days > span.ok { background: var(--vz-green); }
.vz-days > span.warn { background: var(--vz-amber); }
.vz-days > span.bad { background: var(--vz-red); }
.vz-days > span.gap { background: repeating-linear-gradient(135deg, #fff 0 3px, var(--vz-line-2) 3px 5px); border: 1px solid var(--vz-line-2); }

/* ---------- area tile ---------- */
.vz-tile { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; background: #fff; border: 1px solid var(--vz-line); border-left-width: 6px; border-radius: 14px; color: var(--vz-ink); text-decoration: none; }
.vz-tile.ok { border-left-color: var(--vz-green); } .vz-tile.warn { border-left-color: var(--vz-amber); } .vz-tile.bad { border-left-color: var(--vz-red); } .vz-tile.none { border-left-color: var(--vz-line-2); }
.vz-tile:hover { box-shadow: 0 2px 10px rgba(16, 24, 40, .1); }
.vz-tile h3 { margin: 0; font-size: 18px; font-weight: 700; }
.vz-tile .meta { font-size: 14px; color: var(--vz-muted); }
.vz-tilegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }

/* ---------- step tracker ---------- */
.vz-steps { display: flex; align-items: flex-start; }
.vz-step { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; font-size: 13px; font-weight: 600; color: var(--vz-muted); }
.vz-step::before { content: ""; position: absolute; top: 14px; left: -50%; right: 50%; height: 3px; background: var(--vz-line); z-index: 0; }
.vz-step:first-child::before { display: none; }
.vz-step .dot { width: 30px; height: 30px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 3px solid var(--vz-line-2); display: grid; place-items: center; position: relative; z-index: 1; color: #fff; font-size: 16px; }
.vz-step.done { color: var(--vz-ink); } .vz-step.done .dot { background: var(--vz-teal); border-color: var(--vz-teal); } .vz-step.done::before { background: var(--vz-teal); }
.vz-step.cur { color: var(--vz-teal-ink); font-weight: 800; } .vz-step.cur .dot { border: 6px solid var(--vz-teal); } .vz-step.cur::before { background: var(--vz-teal); }

/* ---------- allergen cell: Contains / No / May contain / Not confirmed (never blank) ---------- */
.vz-al { width: 42px; height: 42px; box-sizing: border-box; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex: none; }
.vz-al.c { background: var(--vz-ink); color: #fff; }
.vz-al.n { background: var(--vz-green-bg); color: var(--vz-green-ink); }
.vz-al.m { background: var(--vz-amber-bg); color: var(--vz-amber-ink); border: 1.5px solid var(--vz-amber); }
.vz-al.q { background: #fff; color: var(--vz-ink-2); border: 1.5px dashed var(--vz-dash); }

/* ---------- misc ---------- */
.vz-kpi { padding: 10px 12px; border-radius: 10px; background: var(--vz-grey-bg); color: var(--vz-ink-2); min-width: 0; }
.vz-kpi b { display: block; font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.vz-kpi span { font-size: 14px; font-weight: 600; }
.vz-kpi.warn { background: var(--vz-amber-bg); color: var(--vz-amber-ink); } .vz-kpi.bad { background: var(--vz-red-bg); color: var(--vz-red-ink); } .vz-kpi.ok { background: var(--vz-green-bg); color: var(--vz-green-ink); }
.vz-classic { font-size: 14px; color: var(--vz-muted); }
@media (max-width: 860px) { .vz-h1 { font-size: 26px; } .vz-btn { width: 100%; } .vz-ring { width: 112px; height: 112px; } .vz-ring > div { width: 84px; height: 84px; } .vz-ring b { font-size: 24px; } }
@media print { .vz-noprint { display: none !important; } }

/* ---------- v393: banner shown while an administrator is viewing as someone else ---------- */
.vzn-viewas { position: sticky; top: 0; z-index: 90; min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 4px 20px; background: #FFF1D0; color: #7A4F00; border-bottom: 2px solid #D9900A; font-size: 14px; }
.vzn-viewas-ic { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vzn-viewas-t { flex: 1; min-width: 0; line-height: 1.3; }
.vzn-viewas-t span { font-weight: 500; }
.vzn-viewas form { margin: 0; }
.vzn-viewas button { min-height: 40px; margin: 0; padding: 0 16px; font-size: 14px; font-weight: 700; background: #7A4F00; border-color: #7A4F00; color: #fff; }
.vzn-viewas button:hover { background: #5F3E00; border-color: #5F3E00; }
@media (max-width: 640px) { .vzn-viewas-t span { display: none; } .vzn-viewas { padding: 4px 12px; } }
@media print { .vzn-viewas { display: none; } }
