/* Litra look: neutrals and amber from the Litra keg & sales app (litra.arq.md),
   logo and Jost headings from litra.md. */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --text: #18181b;
  --muted: #71717a;
  --border: #e4e4e7;
  --accent: #f0b21a;
  --on-accent: #3a2607;
  --accent-strong: #8a6100;
  --accent-soft: #fdf3d7;
  --high: #b42318;
  --high-soft: #fdecea;
  --warn: #a15c07;
  --warn-soft: #fff4e0;
  --ok: #2f7d32;
  --ok-soft: #e8f5e9;
  --info-soft: #f4f4f5;
  --st-fill: #0f766e;
  --st-main: #2563eb;
  --st-secondary: #0891b2;
  --st-dryhop: #65a30d;
  --st-additions: #9333ea;
  --st-maturation: #d97706;
  --st-packaging: #475569;
  --radius: 12px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(24, 24, 27, .04);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Jost", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b; --surface: #18181b; --surface-2: #27272a; --text: #fafafa; --muted: #a1a1aa;
    --border: #3f3f46; --accent: #f0b21a; --accent-strong: #f5c542; --accent-soft: #3a2a0a;
    --high: #f07167; --high-soft: #3b1d1a; --warn: #f2b45a; --warn-soft: #3a2a14; --ok: #7fc784; --ok-soft: #1c2e1d;
    --info-soft: #27272a; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090b; --surface: #18181b; --surface-2: #27272a; --text: #fafafa; --muted: #a1a1aa;
  --border: #3f3f46; --accent: #f0b21a; --accent-strong: #f5c542; --accent-soft: #3a2a0a;
  --high: #f07167; --high-soft: #3b1d1a; --warn: #f2b45a; --warn-soft: #3a2a14; --ok: #7fc784; --ok-soft: #1c2e1d;
  --info-soft: #27272a; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font: 600 1.75rem/1.15 var(--font-brand); text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: .95rem; }
a { color: var(--accent-strong); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; min-height: 84px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 64px; height: 64px; flex: none; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(24, 24, 27, .18)); }
.logo-fallback { width: 32px; height: 32px; border-radius: 8px; flex: none; background: var(--accent); }
.brand { gap: 14px; }
.brand-name { font: 700 24px/1 var(--font-brand); letter-spacing: .06em; }
.save { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lang { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-left: 4px; }
.lang button { border: 0; background: var(--surface); color: var(--muted); padding: 5px 9px; font: 600 12px var(--font); cursor: pointer; }
.lang button + button { border-left: 1px solid var(--border); }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

.tabs {
  display: flex; gap: 2px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none; position: sticky; top: 84px; z-index: 9;
}
.tabs a {
  padding: 10px 12px; color: var(--muted); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent;
  font-weight: 500;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

main { max-width: 1640px; margin: 0 auto; padding: 20px 28px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: 0; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; min-width: 0;
}
.card > h2:first-child, .card > .card-head:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 12px; }
.kpi .value { font: 600 24px/1.2 var(--font-brand); margin-top: 2px; font-variant-numeric: tabular-nums; }
td.col-pack { min-width: 230px; }
td.col-why { min-width: 180px; }
.kpi .sub { color: var(--muted); font-size: 12px; }
.kpi.bad .value { color: var(--high); }
.kpi.good .value { color: var(--ok); }

.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface); position: sticky; top: 0; }
tbody tr:hover td { background: var(--surface-2); }
tfoot td { font-weight: 600; border-top: 2px solid var(--border); }
td.sticky, th.sticky { position: sticky; left: 0; background: var(--surface); z-index: 1; }

input, select, textarea, button { font: inherit; color: inherit; }
input[type="text"], input[type="number"], input[type="date"], input[type="password"], input[type="month"], select, textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px; min-width: 0;
}
input:focus-visible, select:focus-visible, button:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
input[type="number"] { width: 90px; text-align: right; }
input.cell { width: 72px; padding: 4px 6px; }
input.wide, select.wide { width: 100%; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
label.field > input, label.field > select { color: var(--text); font-size: 14px; }
label.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.fields input[type="number"] { width: 100%; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); font-weight: 500; text-decoration: none; color: var(--text);
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: #e0a40f; border-color: #e0a40f; }
.btn.danger { color: var(--high); }
.btn.small { padding: 3px 8px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.high { background: var(--high-soft); color: var(--high); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.accent { background: var(--accent-soft); color: var(--accent-strong); }
.dot { position: relative; display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 8px; vertical-align: -2px; flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), 0 1px 2px rgba(0, 0, 0, .14); }
/* soft shine, so pale beers (Pils, Brut IPA) still show as a square */
.dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(145deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 55%); pointer-events: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dot { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 1px 2px rgba(0, 0, 0, .4); } }
:root[data-theme="dark"] .dot { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 1px 2px rgba(0, 0, 0, .4); }

.banner { border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.info { background: var(--accent-soft); }
.banner.warn { background: var(--warn-soft); }
.banner.error { background: var(--high-soft); color: var(--high); }

.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.alerts li { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--info-soft); display: flex; gap: 8px; align-items: baseline; }
.alerts li.high { background: var(--high-soft); }
.alerts li.warn { background: var(--warn-soft); }

.chart-box { position: relative; height: 300px; }
.chart-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.chart-pair h3 { margin: 4px 0 8px; color: var(--muted); font-size: 13px; }

/* Tank schedule */
.gantt { position: relative; min-width: 720px; }
.gantt-scale { position: relative; height: 22px; margin-left: 110px; border-bottom: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.gantt-scale span { position: absolute; top: 3px; padding-left: 4px; border-left: 1px solid var(--border); height: 19px; white-space: nowrap; }
.gantt-row { display: flex; align-items: center; height: 36px; border-bottom: 1px solid var(--border); }
.gantt-label { width: 110px; flex: none; font-size: 12px; padding-right: 8px; }
.gantt-label b { display: block; font-size: 13px; }
.gantt-track { position: relative; flex: 1; height: 100%; }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--high); opacity: .6; }
.bar {
  position: absolute; top: 6px; height: 24px; display: flex; border-radius: 5px; overflow: hidden; cursor: default;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}
.bar.planned { box-shadow: 0 0 0 2px var(--accent); }
.bar .seg { height: 100%; }
.bar .tag {
  position: absolute; inset: 0; color: #fff; font-size: 11px; font-weight: 600; padding: 4px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,.5); pointer-events: none;
}
.seg.fill { background: var(--st-fill); } .seg.main { background: var(--st-main); } .seg.secondary { background: var(--st-secondary); }
.seg.dryhop { background: var(--st-dryhop); } .seg.additions { background: var(--st-additions); }
.seg.cooling { background: var(--st-secondary); } .seg.maturation { background: var(--st-maturation); } .seg.filtration { background: var(--st-additions); }
.seg.bottling, .seg.kegging, .seg.packaging { background: var(--st-packaging); }
.seg.clean { background: repeating-linear-gradient(45deg, var(--surface-2) 0 4px, var(--border) 4px 8px); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.stagebar { display: flex; height: 10px; border-radius: 4px; overflow: hidden; margin: 6px 0 4px; }

.fields > label.field { justify-content: space-between; }
.season-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.8fr); }
.season-fields select { min-width: 0; }
.fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.beer-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 28px; align-items: start; }
.beer-process { border-left: 1px solid var(--border); padding-left: 28px; }
.beer-side .pk-list { display: flex; flex-wrap: wrap; gap: 6px 16px; }
@media (max-width: 1100px) {
  .beer-body { grid-template-columns: 1fr; gap: 14px; }
  .beer-process { border-left: 0; padding-left: 0; }
}
.beer-card .card-head input[type="text"].title { font-size: 16px; font-weight: 600; }
/* Beer cards fold to one line; the chevron opens the details */
.beer-card:not(.open) .beer-details { display: none; }
.beer-card:not(.open) .card-head { margin-bottom: 0; }
.beer-card.open .beer-brief { display: none; }
.beer-toggle { width: 26px; height: 26px; flex: none; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; color: var(--text); font-size: 15px; line-height: 1; padding: 0; }
.beer-toggle::before { content: "▸"; }
.beer-card.open .beer-toggle::before { content: "▾"; }
.beer-toggle:hover { background: var(--surface-2); color: var(--text); }
.beer-card .card-head { flex-wrap: wrap; row-gap: 8px; }
.avail { display: inline-flex; gap: 2px; padding: 3px 4px; border: 1px solid var(--border); border-radius: 8px; }
.avail .check { padding: 1px 6px; border-radius: 6px; }
.avail .check:has(input:checked) { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.beer-title { flex: 1 1 520px; min-width: 0; flex-wrap: nowrap; }
.beer-title > input { flex: none; }
.beer-brief { cursor: pointer; margin-left: 4px; min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.beer-card .card-head > .row:last-child { flex: none; }
details.beer-group { margin: 18px 0; }
details.beer-group > summary { list-style: none; cursor: pointer; padding: 10px 0; border-top: 1px solid var(--border); color: var(--text); }
details.beer-group > summary::before { content: "▸ "; color: var(--muted); }
details.beer-group[open] > summary::before { content: "▾ "; }
.pk-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.split-inputs { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.split-inputs label { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.split-inputs input { width: 56px; }

.year-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.year-tabs button { border: 1px solid var(--border); background: var(--surface); padding: 4px 12px; border-radius: 999px; cursor: pointer; }
/* Forecast & plan period: one joined group of buttons, same height and corners as .btn */
.period-picker { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.period-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.segmented button { border: 0; background: transparent; color: var(--text); font: 500 14px var(--font); padding: 7px 14px; cursor: pointer; line-height: 1.5; }
.segmented button + button { border-left: 1px solid var(--border); }
.segmented button:hover { background: var(--surface-2); }
.segmented button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.page-head > .row, .page-head > .period-picker { align-items: center; gap: 12px; }
.year-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-sm); transition: .2s; max-width: calc(100vw - 32px); z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.error { background: var(--high); color: #fff; }

details > summary { cursor: pointer; color: var(--accent-strong); }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
ol.steps { padding-left: 20px; margin: 6px 0; }
ol.steps li { margin: 3px 0; }

/* Tank calendar (layout of the brewery's Excel plan) */
.cal-card { padding: 12px; }
.cal-wrap { overflow: auto; max-height: 75vh; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.cal { border-collapse: separate; border-spacing: 0; width: max-content; font-size: 11px; }
.cal th, .cal td { padding: 0; border: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); height: 22px; }
.cal td { width: 26px; min-width: 26px; max-width: 26px; position: relative; overflow: visible; white-space: nowrap; }
.cal tbody tr:hover td { background-color: inherit; }
/* Crosshair: hovered row and hovered day column get a light amber wash over the cell colours. */
.cal tbody tr:not(.cal-group):hover td::after,
.cal td.col-hl::after { content: ""; position: absolute; inset: 0; background: rgba(240, 178, 26, .16); pointer-events: none; }
.cal tbody tr:not(.cal-group):hover td.col-hl::after { background: rgba(240, 178, 26, .32); }
.cal tbody tr:not(.cal-group):hover th.cal-name { background: var(--accent-soft); }
.cal th.col-hl { background: var(--accent-soft); color: var(--text); }
.cal th.col-hl.today { background: var(--accent); color: var(--on-accent); }
.cal .cal-name {
  position: sticky; left: 0; z-index: 3; background: var(--surface); text-align: left; padding: 0 10px; min-width: 170px;
  font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; border-right: 2px solid var(--border);
}
.cal thead th { position: sticky; z-index: 2; background: var(--surface); color: var(--muted); font-weight: 600; text-align: center; }
.cal thead .cal-name { z-index: 4; }
.cal .cal-months th { top: 0; height: 24px; color: var(--text); text-align: left; padding-left: 6px; border-left: 2px solid var(--border); font-size: 12px; }
.cal .cal-days th { top: 24px; height: 30px; line-height: 1.1; font-weight: 600; }
.cal .cal-days th span { display: block; font-size: 9px; font-weight: 500; color: var(--muted); }
.cal .cal-group th, .cal .cal-group td { background: var(--surface-2); height: 20px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cal td.we, .cal th.we { background-color: var(--surface-2); }
.cal td.closed, .cal th.closed { background-image: repeating-linear-gradient(45deg, transparent 0 4px, var(--border) 4px 6px); }
.cal th.today { background: var(--accent); color: var(--on-accent); }
.cal th.today span { color: var(--on-accent); }
.cal td.today { box-shadow: inset 2px 0 0 var(--high); }
.cal td.off { background-color: var(--surface-2); opacity: .5; }
.cal td.on { border-right-color: transparent; }
.cal td.st { box-shadow: inset 1px 0 0 rgba(0, 0, 0, .35); }
.cal td.rec, .cal-key.rec { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .45) 0 3px, transparent 3px 8px); }
.cal td.clean, .cal-key.clean { background-image: repeating-linear-gradient(45deg, var(--surface-2) 0 3px, var(--border) 3px 6px); }
.cal .lab { position: absolute; left: 3px; top: 4px; z-index: 1; font-weight: 700; pointer-events: none; text-shadow: none; }
.cal-legend { display: grid; gap: 12px; margin-top: 14px; }
.cal-legend h3 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.cal-key { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }

/* Expected-sales months after the plan period: shown lighter */
table.grouped th.beyond, table.grouped td.beyond { background-image: linear-gradient(var(--surface-2), var(--surface-2)); }
table.grouped td.beyond b { font-weight: 600; color: var(--muted); }

/* Same month last year, under each expected-sales figure */
.yoy { font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.yoy.up { color: var(--ok); }
.yoy.down { color: var(--high); }

/* Dashboard */
.kpis-6 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpi .sub .pill { font-size: 11px; padding: 0 6px; }
.dash-tables { display: grid; grid-template-columns: minmax(300px, 2fr) minmax(0, 5fr); gap: 16px; align-items: start; }
.dash-tables.single { grid-template-columns: 1fr; }
/* Both dashboard tables have the same fixed height; longer lists scroll inside the box. */
.dash-tables > .card { height: 480px; display: flex; flex-direction: column; margin-bottom: 0; }
.dash-tables > .card > .table-wrap { flex: 1; min-height: 0; overflow: auto; }
.dash-tables > .card > p { flex: none; margin-bottom: 0; }
@media (max-width: 1100px) { .dash-tables { grid-template-columns: 1fr; } }
.pk-line { display: flex; justify-content: space-between; gap: 12px; white-space: nowrap; font-size: 13px; }
.pk-line b { font-variant-numeric: tabular-nums; }

table.compact th, table.compact td { padding: 6px 6px; }
table.compact .yoy { font-size: 10px; }

.dash-warnings { margin-top: 16px; }
.warn-scroll { overflow-y: auto; position: relative; }

/* Dashboard top: squares (3 + 3) left, month calendar right */
.dash-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.dash-top > .kpis { margin-bottom: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.dash-top > .mc-card { margin-bottom: 0; }
@media (max-width: 1200px) { .dash-top { grid-template-columns: 1fr; } }
.mc-card { padding: 12px 14px; }
.mc-card .card-head { margin-bottom: 6px; }
.mc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mc-head { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; padding: 2px 0 4px; }
.mc-day { min-height: 66px; border: 1px solid var(--border); border-radius: 6px; padding: 3px 4px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.mc-day.blank { border: 0; background: transparent; }
.mc-day.we { background: var(--surface-2); }
.mc-day.closed { background-image: repeating-linear-gradient(45deg, transparent 0 4px, var(--border) 4px 6px); }
.mc-day.past { opacity: .55; }
.mc-day.today { border: 2px solid var(--accent); }
.mc-num { font-size: 11px; font-weight: 700; color: var(--muted); }
.mc-day.today .mc-num { color: var(--accent-strong); }
.mc-ev { display: flex; align-items: flex-start; gap: 3px; font-size: 10.5px; line-height: 1.2; border-radius: 4px; padding: 1px 3px; background: var(--surface-2); }
.mc-ev .dot { width: 9px; height: 9px; border-radius: 3px; margin: 2px 0 0; flex: none; }
.mc-ev b, .mc-tag { font-size: 9px; font-weight: 700; padding: 0 3px; border-radius: 3px; color: #fff; flex: none; }
.ev-brew > b, b.ev-brew { background: var(--accent); color: var(--on-accent); }
.ev-dryhop > b, b.ev-dryhop { background: var(--st-dryhop); }
.ev-additions > b, b.ev-additions { background: var(--st-additions); }
.ev-filtration > b, b.ev-filtration { background: var(--st-additions); }
.ev-bottling > b, b.ev-bottling { background: var(--st-main); }
.ev-kegging > b, b.ev-kegging { background: var(--st-packaging); }
.mc-ev.rec, .mc-tag.rec-sample { background-image: repeating-linear-gradient(135deg, rgba(240, 178, 26, .28) 0 3px, transparent 3px 7px); }
.mc-tag.rec-sample { display: inline-block; width: 18px; height: 11px; border: 1px solid var(--border); vertical-align: -1px; }
.mc-ev .nm { min-width: 0; overflow-wrap: break-word; }
.mc-more { font-size: 10px; color: var(--muted); }
.mc-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); margin-top: 8px; }

/* Grouped tables: one row per beer, click to open its packaging rows */
table.grouped tbody.grp .grp-row { display: none; }
table.grouped tbody.grp.open .grp-row { display: table-row; }
table.grouped .grp-head { cursor: pointer; }
table.grouped .grp-head td { border-top: 1px solid var(--border); }
table.grouped .grp-head:hover td { background: var(--accent-soft); }
table.grouped .grp-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
table.grouped .caret { display: inline-block; width: 14px; color: var(--muted); transition: transform .15s; }
table.grouped tbody.grp.open .caret { transform: rotate(90deg); }
table.grouped tbody.grp.open .grp-head td { background: var(--surface-2); }
table.grouped .grp-row td { background: var(--surface); font-size: 13px; }
table.grouped .grp-row td.sub { padding-left: 38px; color: var(--muted); }
table.grouped tbody.grp + tbody.grp .grp-head td { border-top-color: var(--border); }

@media (max-width: 640px) {
  main { padding: 16px; }
  .logo { width: 48px; height: 48px; }
  .brand-name { font-size: 19px; }
  .topbar { padding: 10px 16px; }
  .tabs { padding: 0 8px; top: 0; position: relative; }
  .topbar { position: relative; }
  .grid.two { grid-template-columns: 1fr; }
  .chart-box { height: 240px; }
}

/* Quick tooltip on calendar cells */
.tip { position: fixed; z-index: 100; display: none; pointer-events: none; max-width: 260px; padding: 6px 9px; border-radius: 8px; background: #18181b; color: #fafafa; font-size: 12px; line-height: 1.35; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.tip b { display: block; font-weight: 700; }

/* Schedule & Beer in Tanks: one row per batch, opens to its form */
table.batch-list { width: 100%; }
table.batch-list .batch-row { cursor: pointer; }
table.batch-list .batch-row:hover td { background: var(--surface-2); }
table.batch-list .caret { width: 18px; color: var(--muted); }
table.batch-list .caret::before { content: "▸"; }
table.batch-list .open .caret::before { content: "▾"; }
table.batch-list .batch-detail { display: none; }
table.batch-list .open .batch-detail { display: table-row; }
table.batch-list .batch-detail > td { background: var(--surface-2); padding: 12px; }
table.batch-list .done .batch-row { opacity: .55; }
.stage-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; background: var(--muted); white-space: nowrap; }
.stage-pill.st-wait { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.stage-pill.st-fill { background: var(--st-fill); }
.stage-pill.st-main { background: var(--st-main); }
.stage-pill.st-secondary { background: var(--st-secondary); }
.stage-pill.st-dryhop { background: var(--st-dryhop); }
.stage-pill.st-additions, .stage-pill.st-filtration { background: var(--st-additions); }
.stage-pill.st-cooling { background: var(--st-secondary); }
.stage-pill.st-maturation { background: var(--st-maturation); }
.stage-pill.st-packaging { background: var(--st-packaging); }
.stage-pill.st-ready { background: var(--accent); color: var(--on-accent); }
.stage-pill.st-done { background: var(--surface-2); color: var(--muted); }

/* Stage labels all as wide as the widest one (the column shrinks to it), text and
   day count centred under each other */
table.batch-list .stage-cell { width: 1%; text-align: center; }
table.batch-list .stage-cell .stage-pill { display: block; text-align: center; box-sizing: border-box; padding: 2px 10px; }
table.batch-list .stage-cell .small { margin-top: 2px; }
table.batch-list .stage-cell .stage-pill.stage-sizer { display: block; height: 0; padding-top: 0; padding-bottom: 0; border: 0; overflow: hidden; visibility: hidden; }

/* Batch box: aligned rows of equal-height fields */
.batch-form { display: flex; flex-direction: column; gap: 14px; }
.batch-form input[type="text"], .batch-form input[type="number"], .batch-form input[type="date"], .batch-form select { height: 36px; box-sizing: border-box; width: 100%; font-size: 14px; color: var(--text); }
.bf-row { display: grid; gap: 12px 16px; align-items: start; }
.bf-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bf-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bf-span2 { grid-column: span 2; }
.bf-row .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.bf-value { height: 36px; display: flex; align-items: center; font-size: 14px; color: var(--text); font-weight: 600; }
.brew-days { display: flex; flex-direction: column; gap: 6px; }
.brew-day { display: grid; grid-template-columns: minmax(0, 1fr) 56px 32px; gap: 6px; align-items: center; width: 100%; }
.brew-day .bd-brews { display: flex; align-items: center; gap: 6px; color: var(--text); }
.brew-day .bd-brews input { width: 64px; }
.btn.icon { width: 32px; height: 32px; padding: 0; justify-content: center; font-size: 16px; line-height: 1; }
.bf-block { display: flex; flex-direction: column; gap: 6px; }
.split-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px 12px; }
.split-grid .field { text-align: center; }
.split-grid input { text-align: center; }
.stage-line { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
.stage-chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); white-space: nowrap; }
.stage-chip b { font-weight: 700; margin-right: 2px; }
.stage-chip.st-main b { color: var(--st-main); } .stage-chip.st-secondary b { color: var(--st-secondary); } .stage-chip.st-dryhop b { color: var(--st-dryhop); }
.stage-chip.st-additions b, .stage-chip.st-filtration b { color: var(--st-additions); } .stage-chip.st-maturation b { color: var(--st-maturation); } .stage-chip.st-packaging b { color: var(--st-packaging); }
.bf-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; }
.bf-ready { margin-right: auto; font-size: 13px; color: var(--muted); }
.bf-ready b { color: var(--text); }
@media (max-width: 900px) { .bf-4, .bf-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bf-span2 { grid-column: span 2; } }

/* Record filling */
.fill-card { border-color: var(--accent); }
.fill-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.fill-grid .rec { font-size: 11px; color: var(--accent-strong); font-weight: 600; min-height: 14px; }
.fill-foot { justify-content: space-between; align-items: center; }
.fill-left { display: flex; flex-direction: column; gap: 6px; }

.fill-inline { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 12px; background: var(--surface); }
.fills-table { width: 100%; background: var(--surface); border-radius: 8px; }
.fills-table th, .fills-table td { padding: 6px 10px; }

.fill-date { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 8px; align-items: center; }
.fill-date:not(:has(button)) { grid-template-columns: minmax(0, 1fr); }
.bf-note { min-height: 36px; display: flex; align-items: center; }
.pill.small { font-size: 10px; padding: 0 6px; }
.brew-day input[type="number"] { text-align: center; padding: 6px 4px; }
.fill-date .btn.icon, .brew-day .btn.icon { height: 36px; width: 32px; }

/* Production plan: What to produce (left) and ON SCHEDULE (right), same height, tables scroll inside */
.plan-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-bottom: 16px; }
.plan-top > .card { margin-bottom: 0; display: flex; flex-direction: column; max-height: 720px; min-height: 0; }
.plan-top > .card > .table-wrap { flex: 1; min-height: 0; overflow: auto; }
.plan-top thead th { position: sticky; top: 0; z-index: 2; }
.produce-card table td, .produce-card table th { padding-left: 6px; padding-right: 6px; }
.produce-card table .pill { padding: 1px 6px; }
@media (max-width: 1280px) { .plan-top { grid-template-columns: 1fr; } .plan-top > .card { max-height: none; } }

/* Page head with controls on one line, all the same height */
.plan-head { align-items: center; }
.plan-head h1 { margin: 0; }
.head-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.head-controls .btn, .head-controls input, .head-controls .segmented { height: 38px; box-sizing: border-box; }
.head-controls .segmented button { height: 36px; }
.head-controls .segmented button { padding-top: 0; padding-bottom: 0; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; }
.inline-field input[type="number"] { width: 70px; text-align: center; }
.produce-card thead th { white-space: normal; vertical-align: bottom; line-height: 1.25; }
.section-title { margin: 28px 0 12px; font-size: 20px; }

/* Settings: cards in pairs, fields on an even grid, all the same height */
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; margin-bottom: 16px; }
.set-grid > .card { margin-bottom: 0; }
.set-card h2 { margin: 0 0 12px; }
.set-card .card-head h2 { margin: 0; }
.set-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; align-items: end; }
.set-fields .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); justify-content: flex-end; }
.set-span2 { grid-column: span 2; } .set-span4 { grid-column: 1 / -1; }
.set-card input[type="text"], .set-card input[type="number"], .set-card input[type="date"], .set-card input[type="month"], .set-card input[type="password"], .set-card select {
  height: 36px; box-sizing: border-box; width: 100%; font-size: 14px; color: var(--text); }
.weekdays { display: flex; gap: 4px; height: 36px; }
.day-chip { flex: 1; display: flex; }
.day-chip input { position: absolute; opacity: 0; pointer-events: none; }
.day-chip span { flex: 1; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text); cursor: pointer; background: var(--surface); }
.day-chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.day-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.set-table { width: 100%; border-collapse: collapse; }
.set-table th { font-size: 12px; text-align: left; padding: 4px 6px; }
.set-table th.num { text-align: right; }
.set-table td { padding: 3px 6px; border: 0; vertical-align: middle; }
.set-table tbody tr:hover td { background: transparent; }
.set-table td input[type="number"] { text-align: right; }
.set-table.times td input { text-align: center; }
.set-table .act { width: 1%; }
.made-from { display: flex; align-items: center; gap: 6px; }
.made-from input { width: 56px !important; flex: none; }
.set-note { margin: 10px 0 0; }
@media (max-width: 1100px) { .set-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .set-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.set-table td { padding: 2px 4px; }
.set-table th { padding: 4px 4px; }
.set-card .set-table input, .set-card .set-table select { height: 30px; padding-top: 2px; padding-bottom: 2px; }
.set-table .btn.icon { width: 30px; height: 30px; }
.set-grid.equip { align-items: start; }

/* Table titles and menu in capitals */
h2 { text-transform: uppercase; letter-spacing: .02em; }
.tabs a { text-transform: uppercase; letter-spacing: .03em; font-size: 13px; }
.set-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.set-col > .card { margin-bottom: 0; }
td.short { color: var(--high); }

/* Menu starts under the word LITRA: header padding 20 + logo 64 + gap 14, minus the link's own 12 px padding */
.tabs { padding-left: calc(20px + 64px + 14px - 12px); }
@media (max-width: 640px) { .tabs { padding-left: 8px; } }

/* Current stock table: even number columns, Current stock lightly highlighted */
.stock-table { table-layout: fixed; width: 100%; }
.stock-table col.c-beer { width: 22%; }
.stock-table col.c-out { width: 9%; }
.stock-table th, .stock-table td { overflow: hidden; text-overflow: ellipsis; }
.stock-table th.num, .stock-table td.num { padding-left: 6px; padding-right: 10px; }
.stock-table thead th { white-space: normal; vertical-align: bottom; line-height: 1.25; }
.stock-table .now { background: var(--accent-soft); }
.stock-table tbody tr:hover td.now { background: var(--accent-soft); filter: brightness(.97); }
.stock-table td.now input { width: 100%; max-width: 110px; text-align: right; background: var(--surface); }

.fd-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; white-space: nowrap; }
.reset-link { border: 0; background: var(--accent-soft); color: var(--accent-strong); font: 600 11px var(--font); border-radius: 999px; padding: 1px 8px; cursor: pointer; }
.reset-link:hover { filter: brightness(.95); }
.batch-form input[type="date"].is-set { border-color: var(--accent); }
.move-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 6px; align-items: center; width: 100%; }

/* login page (online database) */
.login-card { max-width: 380px; margin: 40px auto; }
.login-card h2 { margin-top: 0; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form input { padding: 8px 10px; }
.login-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.login-msg { background: var(--warn-soft); color: var(--warn); padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; }
.login-qr { display: block; margin: 8px auto; background: #fff; padding: 8px; border-radius: var(--radius-sm); }
.btn.link { background: none; border-color: transparent; color: var(--muted); padding-left: 0; padding-right: 0; }
.btn.link:hover { color: var(--text); text-decoration: underline; }

/* ---------- phone version (js/mobile.js) ---------- */
b.ev-count { background: var(--ok); }
body.phone .topbar, body.phone .tabs { display: none; }
body.phone main#app { padding: 0; max-width: none; }
.m-app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.m-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--surface); border-bottom: 1px solid var(--border); }
.m-brand { font-family: var(--font-brand); font-weight: 700; letter-spacing: .08em; display: flex; align-items: center; gap: 8px; margin-right: auto; }
.m-logo { width: 28px; height: 28px; background: url('img/litra-logo.svg') center / contain no-repeat; }
.m-seeas { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.m-seeas select { font-size: 13px; padding: 4px 6px; max-width: 150px; }
.m-asnote { background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; padding: 6px 16px; }
.m-main { padding: 12px 16px; }
.m-h1 { font-family: var(--font-brand); font-size: 22px; margin: 6px 0 10px; }
.m-h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.m-empty { color: var(--muted); font-size: 14px; margin: 4px 0 8px; }
.m-note { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
.m-when { font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.m-task, .m-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; }
.m-task .mc-tag { font-size: 10px; padding: 2px 5px; min-width: 34px; text-align: center; }
.m-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m-tx[data-action] { cursor: pointer; }
.m-tx b { font-size: 15px; font-weight: 600; }
.m-tx span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.m-tx .m-by { color: var(--ok); font-size: 12px; }
.m-task.done .m-tx b { text-decoration: line-through; color: var(--muted); }
.m-task.rec { border-style: dashed; background-image: repeating-linear-gradient(135deg, rgba(240, 178, 26, .10) 0 4px, transparent 4px 9px); }
.m-tick { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); color: transparent; font-size: 20px; font-weight: 700; cursor: pointer; }
.m-tick[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.m-stock { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.m-stock b { font-size: 16px; }
.m-row .dot, .m-count .dot { width: 12px; height: 12px; margin: 0; }
.m-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
.m-nav button { flex: 1; max-width: 140px; background: none; border: 0; color: var(--muted); font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; cursor: pointer; }
.m-nav button[aria-current="page"] { color: var(--text); font-weight: 600; }
.m-nav button[aria-current="page"] .m-nav-ic { background: var(--accent); }
.m-nav-ic { width: 22px; height: 22px; border-radius: 6px; background: var(--muted); -webkit-mask: var(--ic) center / 22px no-repeat; mask: var(--ic) center / 22px no-repeat; }
.m-ic-today { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3 8-8'/%3E%3Cpath d='M20 12v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h9'/%3E%3C/svg%3E"); }
.m-ic-calendar { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='4' y='5' width='16' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M4 11h16'/%3E%3C/svg%3E"); }
.m-ic-record { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E"); }
.m-ic-stock { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 4.5v9L12 21l-8-4.5v-9z'/%3E%3Cpath d='M12 12l8-4.5M12 12v9M12 12L4 7.5'/%3E%3C/svg%3E"); }
.m-month { display: flex; align-items: center; justify-content: space-between; }
.m-month .btn { width: 40px; height: 36px; font-size: 18px; justify-content: center; }
.m-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.m-wd { text-align: center; font-size: 11px; color: var(--muted); padding: 2px 0; }
.m-day { aspect-ratio: 1 / 1.05; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 14px; cursor: pointer; padding: 0; color: var(--text); }
.m-day.we { background: var(--surface-2); }
.m-day.past { color: var(--muted); }
.m-day.today { border-color: var(--accent); font-weight: 700; }
.m-day.sel { background: var(--accent-soft); border-color: var(--accent); }
.m-dots { display: flex; gap: 2px; height: 6px; }
.m-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.m-dots i.ev-brew { background: var(--accent); }
.m-dots i.ev-brew.rec { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); }
.m-dots i.ev-dryhop { background: var(--st-dryhop); }
.m-dots i.ev-additions, .m-dots i.ev-filtration { background: var(--st-additions); }
.m-dots i.ev-bottling { background: var(--st-main); }
.m-dots i.ev-kegging { background: var(--st-packaging); }
.m-dots i.ev-count { background: var(--ok); }
.m-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); margin: 14px 0 4px; }
.m-tiles { display: grid; gap: 10px; }
.m-tile { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; color: var(--text); }
.m-tile b { font-size: 17px; }
.m-tile span { font-size: 13px; color: var(--muted); }
.m-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.m-field select, .m-field input { font-size: 16px; padding: 10px; color: var(--text); width: 100%; box-sizing: border-box; }
.m-num { display: flex; align-items: center; gap: 10px; }
.m-num input { flex: 1; }
.m-rec { white-space: nowrap; font-size: 13px; }
.m-count { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; color: var(--text); font-size: 14px; }
.m-count > span { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.m-count input { width: 110px; flex: none; }
.m-check { display: flex; align-items: center; gap: 10px; font-size: 15px; margin: 4px 0 14px; }
.m-check input { width: 22px; height: 22px; }
.m-wide { width: 100%; justify-content: center; margin-bottom: 10px; }
.m-big { font-size: 17px; padding: 14px; }
.m-foot { text-align: center; font-size: 13px; margin: 24px 0 8px; }
.m-foot a { color: var(--muted); }

/* pop-up: add a recommended brew to the plan */
table.cal td.pick { cursor: pointer; }
table.cal td.pick:hover { outline: 2px solid var(--text); outline-offset: -2px; }
.dlg { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 12px 40px rgba(0, 0, 0, .2); }
.dlg::backdrop { background: rgba(0, 0, 0, .35); }
.dlg h2 { margin: 0 0 10px; font-size: 16px; }
.dlg-beer { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 14px; }
.dlg-beer .dot { margin-right: 0; }
.dlg-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dlg-fields input, .dlg-fields select { width: 100%; box-sizing: border-box; }
.dlg-info { margin: 14px 0 4px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.dlg-warn { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 13px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* special orders */
table.orders td { vertical-align: middle; }
table.orders input[type="text"] { min-width: 150px; }
table.orders input[type="number"] { width: 90px; }
table.orders tr.past td { opacity: .6; }
.login-add { display: flex; justify-content: center; margin: 4px 0 14px; padding: 12px; font-size: 16px; }
