/* Halimbawa Builders demo: the look shared by every page in this folder.
   Same look as the landing page: cream paper, deep green, gold labels, serif headings.
   Chart colours are checked for contrast on each surface, so change them as a set.

   index.html (tracker and minutes) still carries its own copy of the first part of
   this file in its <style> block. It loads this file after that block, so a change
   made here applies there too. Rules that belong to one page stay in that page. */

:root {
  color-scheme: light;
  --page: #fbf8f1; --surface: #ffffff; --ink: #15201b; --ink-2: #4c5a52; --muted: #5f6b64;
  --grid: #e6dfd0; --axis: #cdc5b3; --border: rgba(21,32,27,.12);
  --series-1: #1f8a67; --good: #0ca30c; --critical: #d03b3b; --neutral: #898781;
  --brand: #0e4334; --brand-wash: #e6f0eb; --wash: #f3efe6; --paper: #ffffff;
  --label: #8a5f17; --gold: #b9832b; --deep: #0e4334; --on-deep: #d5e5dd;
  --warning: #fab219; --on-warning: #0b0b0b; /* status amber: always with an icon and a label */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0f1412; --surface: #171d1a; --ink: #eef1ec; --ink-2: #c2cac4; --muted: #98a29b;
    --grid: #28302c; --axis: #3a443e; --border: rgba(255,255,255,.10);
    --series-1: #199e70; --good: #0ca30c; --critical: #d03b3b; --neutral: #898781;
    --brand: #7fcfb1; --brand-wash: #17302a; --wash: #222a26; --paper: #1c2320;
    --label: #e9c98b;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.5 var(--sans); accent-color: var(--series-1); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
a { color: var(--brand); }
h1, h2, h3, p { margin: 0; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--series-1); outline-offset: 2px; }

.notice { background: var(--brand-wash); color: var(--ink); font-size: .85rem; padding: 8px 0; border-bottom: 1px solid var(--border); }
.notice b { color: var(--brand); }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding: 28px 0 8px; }
.top .eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--label); }
.top .eyebrow::before { content: ""; flex: none; width: 26px; height: 2px; background: var(--gold); }
.top h1 { font-family: var(--serif); font-size: clamp(1.65rem, 4.6vw, 2.2rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }
.top p { color: var(--ink-2); font-size: .92rem; margin-top: 6px; }
.back { flex: none; font-size: .9rem; font-weight: 600; text-decoration: none; border: 1.5px solid var(--brand); padding: 8px 16px; border-radius: 999px; }
.back:hover { background: var(--brand-wash); }

/* The row of screens. Tabs on a wide screen; on a phone they wrap as pills so none is hidden. */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--grid); margin-top: 14px; }
.tabs a { font-weight: 600; color: var(--ink-2); text-decoration: none; border-bottom: 2.5px solid transparent; margin-bottom: -1px; padding: 10px 14px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.tabs .s { display: none; }
@media (max-width: 800px) {
  .tabs { flex-wrap: wrap; gap: 8px; border-bottom: 0; }
  .tabs a { margin: 0; padding: 7px 14px; font-size: .88rem; border: 1px solid var(--axis); border-radius: 999px; }
  .tabs a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--page); }
  .tabs .l { display: none; }
  .tabs .s { display: inline; }
}
.panel { padding: 20px 0 40px; }
.panel[hidden] { display: none; }

.card { background: var(--surface); border: 1px solid var(--grid); border-radius: 18px; padding: 18px; }
.card h2 { font-size: .98rem; font-weight: 600; }
.card .sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.filters label { display: grid; gap: 3px; font-size: .75rem; color: var(--muted); }
.filters select, .filters input { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--axis); border-radius: 10px; padding: 8px 12px; min-width: 150px; }
.filters button { font: inherit; font-weight: 600; color: var(--ink-2); background: none; border: 1px solid var(--axis); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.filters button:hover { background: var(--wash); }
.filters .count { margin-left: auto; font-size: .85rem; color: var(--ink-2); }

/* stat tiles (figures stay in the plain text face, like the charts) */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile .label { font-size: .82rem; color: var(--ink-2); }
.tile .value { font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; }
.tile .hint { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
@media (max-width: 800px) { .tiles { grid-template-columns: 1fr 1fr; } }

/* bar charts */
.charts { display: grid; grid-template-columns: 1.2fr .8fr; gap: 12px; margin-top: 12px; }
@media (max-width: 800px) { .charts { grid-template-columns: 1fr; } }
.bars { margin-top: 14px; display: grid; gap: 4px; }
.barrow { display: grid; grid-template-columns: minmax(96px, 168px) 1fr; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 6px; cursor: pointer; background: none; border: 0; font: inherit; color: inherit; text-align: left; width: 100%; }
.barrow:hover, .barrow:focus-visible { background: var(--wash); outline: none; }
.barrow .name { font-size: .85rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barrow .track { display: flex; align-items: center; gap: 8px; border-left: 1px solid var(--axis); min-height: 22px; }
.barrow .bar { height: 16px; border-radius: 0 4px 4px 0; background: var(--series-1); min-width: 2px; transition: width .25s, opacity .2s; }
.barrow .bar.late { background: var(--critical); }
.barrow .val { font-size: .82rem; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.barrow.dim .bar { opacity: .3; }
.empty { color: var(--muted); font-size: .88rem; padding: 18px 4px; }
#tip { position: fixed; z-index: 70; pointer-events: none; background: var(--ink); color: var(--page); font-size: .78rem; padding: 6px 9px; border-radius: 6px; max-width: 240px; opacity: 0; transition: opacity .1s; }

/* tables. Each page sets its own minimum width, so a wide table scrolls inside its card. */
.tablecard { margin-top: 12px; padding: 0; overflow: hidden; }
.tablecard .head { padding: 16px 18px 10px; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .86rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; padding: 8px 12px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--grid); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 99px; border: 1px solid var(--border); background: var(--wash); white-space: nowrap; font-size: .8rem; }
.chip .ic { width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .62rem; font-weight: 800; line-height: 1; }
.chip.good .ic { background: var(--good); }
.chip.late .ic { background: var(--critical); }
.chip.plain .ic { background: none; color: var(--ink-2); border: 1.5px solid var(--neutral); }
.chip.late { font-weight: 600; }

/* closing block: the same dark green one as the landing page, in both light and dark */
.cta { margin-top: 28px; padding: 48px 24px; text-align: center; border: 0; border-radius: 28px; color: #fff; background: var(--deep) radial-gradient(circle at 0% 100%, rgba(255,255,255,.12), transparent 46%); }
.cta h2 { font-family: var(--serif); font-size: clamp(1.5rem, 3.6vw, 2.1rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }
.cta .sub { margin-top: 10px; font-size: 1rem; color: var(--on-deep); }
.cta a { display: inline-block; margin-top: 22px; padding: 12px 24px; border-radius: 999px; background: #fff; color: var(--deep); font-weight: 600; text-decoration: none; }
.cta a:hover { background: #f3efe6; }
.cta a:focus-visible { outline-color: #fff; }

/* ======== Below here: pieces the newer screens share (inventory, weekly meeting, daily briefing) ======== */

/* Anything marked hidden stays hidden, even where a rule below gives it a layout of its own. */
[hidden] { display: none !important; }
textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--series-1); outline-offset: 2px; }
.chip.warn .ic { background: var(--warning); color: var(--on-warning); }
.chip.crit .ic { background: var(--critical); }
.chip.crit { font-weight: 600; }

/* a card heading with something on its right (a button, a count) */
.head-row { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 10px 16px; }
.head-row > :first-child { flex: 1 1 200px; min-width: 0; } /* the words give way first, so the button or count stays on the right */
.head-row .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stack { display: grid; gap: 12px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.cols > * { min-width: 0; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

/* pill buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: .86rem; font-weight: 600; line-height: 1.3; color: var(--brand); background: none; border: 1.5px solid var(--brand); border-radius: 999px; padding: 7px 15px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--brand-wash); }
.btn.solid { background: var(--brand); color: var(--page); }
.btn.solid:hover { background: var(--brand); filter: brightness(1.12); }
.btn.quiet { border-color: var(--axis); border-width: 1px; color: var(--ink-2); }
.btn.quiet:hover { background: var(--wash); }
.btn.small { padding: 4px 12px; font-size: .8rem; }
.btn[disabled] { opacity: .5; cursor: default; }

/* a line of text with a tick box in front and a note or a button behind */
.rows { margin-top: 10px; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: start; padding: 11px 0; border-top: 1px solid var(--grid); }
.row:first-child { border-top: 0; }
.row > input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; cursor: pointer; }
.row .t { font-size: .92rem; font-weight: 600; }
.row .m { font-size: .82rem; color: var(--ink-2); margin-top: 2px; }
.row .side { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.row.done .t { font-weight: 500; text-decoration: line-through; color: var(--muted); }
.row.done .m { color: var(--muted); }
.row.done .late-text { color: inherit; font-weight: inherit; } /* once it is dealt with, it stops shouting */
.late-text { color: var(--critical); font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .late-text { color: #f08a8a; } }
.tag { display: inline-block; font-size: .72rem; line-height: 1.5; padding: 0 8px; border-radius: 99px; border: 1px solid var(--border); background: var(--wash); color: var(--ink-2); white-space: nowrap; }

/* meter: how much is left against a level. The track is a pale step of the fill colour. */
.meter { position: relative; height: 8px; border-radius: 99px; background: var(--wash); background: color-mix(in srgb, var(--m, var(--series-1)) 20%, var(--surface)); }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--m, var(--series-1)); transition: width .25s; }
.meter > b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink-2); }
.meter.warn { --m: var(--warning); }
.meter.crit { --m: var(--critical); }

/* fields inside a form */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fields .wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }
.field { display: grid; gap: 3px; font-size: .75rem; color: var(--muted); min-width: 0; }
.field input, .field select, .field textarea { font: inherit; font-size: .92rem; color: var(--ink); background: var(--surface); border: 1px solid var(--axis); border-radius: 10px; padding: 8px 12px; width: 100%; min-width: 0; }
.field .note { font-size: .78rem; color: var(--ink-2); }
.formerr { margin-top: 12px; font-size: .86rem; font-weight: 600; color: var(--critical); }
.formerr:empty { display: none; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .formerr { color: #f08a8a; } }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--grid); }
.inline-form input[type="text"] { flex: 1 1 200px; }
.inline-form input, .inline-form select { font: inherit; font-size: .9rem; color: var(--ink); background: var(--surface); border: 1px solid var(--axis); border-radius: 10px; padding: 7px 12px; min-width: 0; }
@media (max-width: 560px) { .inline-form input[type="text"] { flex-basis: 100%; } } /* phone: the words on one line, who and the button on the next */

/* a tick box sitting in the filter row */
.filters label.check { display: flex; align-items: center; gap: 8px; padding: 9px 2px; font-size: .88rem; color: var(--ink); cursor: pointer; }
.filters label.check input { min-width: 0; width: 18px; height: 18px; padding: 0; margin: 0; }

/* pick one of a few: a row of pills over hidden radio buttons */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--axis); border-radius: 999px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span { display: block; padding: 6px 14px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.seg input:checked + span { background: var(--brand); color: var(--page); }
.seg input:focus-visible + span { outline: 3px solid var(--series-1); outline-offset: 2px; }

/* pop-up sheet (a native dialog) */
dialog.sheet { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--grid); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
dialog.sheet.narrow { width: min(560px, calc(100vw - 24px)); }
dialog.sheet::backdrop { background: rgba(10,16,13,.55); }
.sheet .sh-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; background: var(--surface); border-bottom: 1px solid var(--grid); }
.sheet .sh-head h2 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.sheet .sh-head p { font-size: .82rem; color: var(--ink-2); margin-top: 3px; }
.sheet .sh-body { padding: 16px 20px 20px; }
.sheet h3 { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--label); margin: 20px 0 8px; }
.sheet h3:first-child { margin-top: 0; }
.sheet .sh-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.xbtn { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--axis); background: none; color: var(--ink-2); font: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.xbtn:hover { background: var(--wash); }

/* the card that opens a screen: a serif line, a note, and the main button */
.lead-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 12px; }
.lead-card > :first-child { flex: 1 1 300px; min-width: 0; }
.lead-card h2 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.lead-card .sub { font-size: .86rem; color: var(--ink-2); margin-top: 4px; }
.lead-card .actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.lead-card .actions label { display: grid; gap: 3px; font-size: .75rem; color: var(--muted); }
.lead-card .actions select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--axis); border-radius: 10px; padding: 7px 12px; }
/* text made ready to paste into a chat */
.pasteable { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--wash); font: .84rem/1.55 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.count-note { font-size: .82rem; color: var(--ink-2); white-space: nowrap; }

/* short message after an action */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; width: max-content; max-width: min(520px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--page); font-size: .88rem; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.show { opacity: 1; }
