/* Evenkeel - one look for every page (docs/UI_GUIDE.md, "The look"). The same parts as Legacy Grain Books.
   Every color is a name below; a page never types a color of its own. Two looks share every part:
     evenkeel   - Evenkeel navy and teal (the default): a white menu with navy words, white cards, teal main
                  buttons, red only for a real problem. The colors of Daryl's books' "Evenkeel" look.
     fantastech - Fantastech red and black: the look the app had through Oct 23, 2026 (red #D2103E, ink #13161B).
   <html data-look="..."> picks one (core/context_processors.py: the company's look, or the one a person picked
   under their name at the top right). The company name and logo stay Fantastech in both. */
:root {
  /* sizes and type - the same in both looks */
  --side-w: 248px; --top-h: 60px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  /* evenkeel: navy #1B2A41, teal #2A9D8F (buttons #1F7A6F, white words 5.2:1), gray #6B7280 */
  --red: #D03B3B; --red-deep: #A32424; --red-tint: #FDE3E3;       /* red: problems only */
  --act: #1F7A6F; --act-deep: #18665D; --act-tint: #E3F4F1; --act-ink: #1F7A6F; --on-act: #FFFFFF;
  --mark: #2A9D8F; --focus: #2A78D6; --link: #1F7A6F; --link-hover: #134F48;
  --black: #1B2A41; --ink: #17212F; --ink-2: #4B5563; --muted: #6B7280;
  --bg: #F7F9FC; --panel: #FFFFFF; --surface-2: #F7F9FB; --surface-3: #EEF2F6;
  --line: #E1E6EC; --line-strong: #C7D0DA;
  --good: #0B6B2B; --good-bg: #DFF3E4; --warn: #8A5300; --warn-bg: #FDEFD2; --warn-line: #FAB219;
  --bad: #A32424; --bad-bg: #FDE3E3; --bad-line: #D03B3B;
  --soon: #9AA3AE;
  --radius: 10px; --radius-lg: 12px; --pill-radius: 999px;
  --shadow: 0 1px 2px rgba(23, 33, 47, .06), 0 4px 16px rgba(23, 33, 47, .06);
  --h1-size: 26px; --head-weight: 700; --h1-bar: 0px; --h1-pad: 0px;
  --card-top: var(--line); --card-top-w: 1px; --tile-top: var(--line); --tile-top-w: 1px;
  --th-bg: #F7F9FB; --th-ink: #6B7280;
  --btn-bw: 1.5px; --btn2-ink: #17212F; --btn2-line: #C7D0DA; --btn2-hover-bg: #EEF2F6; --btn2-hover-ink: #17212F;
  --danger-bg: #FFFFFF; --danger-ink: #A32424; --danger-line: #A32424; --danger-hover-bg: #FDE3E3; --danger-hover-ink: #A32424;
  --avatar-bg: #1B2A41; --role-bg: #EEF2F6; --role-ink: #1B2A41; --role-admin-bg: #1B2A41; --role-admin-ink: #FFFFFF;
  --banner-bg: #FDEFD2; --banner-ink: #8A5300; --banner-line: #FAB219;
  --claude-bg: #FFD54A;   /* the Claude switch bar: the same yellow in both looks */
  /* the company band: the strip the logo sits on (menu head, phone screens, sign-in) */
  --band-bg: #1B2A41; --band-line: #2A9D8F; --on-band: #F5F8FB; --band-dim: #C3CCD6; --band-hover: #243650;
  --band-rule: rgba(255, 255, 255, .28);
  /* the side menu */
  --side-bg: #FFFFFF; --side-edge: #E1E6EC; --side-line: #E8EDF2; --side-hover: #EEF3F6; --side-active: #E3F4F1;
  --side-active-ink: #134F48; --side-text: #1B2A41; --side-strong: #1B2A41; --side-dim: #1F7A6F;
  --side-soon: #9AA3AE; --side-soon-line: #C7D0DA; --side-test: #8A5300; --side-focus: #2A78D6;
}
:root[data-look="fantastech"] {
  --red: #D2103E; --red-deep: #A00B2E; --red-tint: #FCE8ED;
  --act: #D2103E; --act-deep: #A00B2E; --act-tint: #FCE8ED; --act-ink: #A00B2E; --on-act: #FFFFFF;
  --mark: #D2103E; --focus: #D2103E; --link: #A00B2E; --link-hover: #D2103E;
  --black: #0B0D10; --ink: #13161B; --ink-2: #2B2F36; --muted: #63676F;
  --bg: #F4F4F5; --panel: #FFFFFF; --surface-2: #FAFAFB; --surface-3: #ECEDEF;
  --line: #E2E3E6; --line-strong: #C9CBD0;
  --good: #1D6B3A; --good-bg: #E6F4EB; --warn: #835400; --warn-bg: #FFF2D9; --warn-line: #E3A13C;
  --bad: #A00B2E; --bad-bg: #FCE8ED; --bad-line: #D2103E;
  --soon: #8D929B;
  --radius: 4px; --radius-lg: 4px; --pill-radius: 2px;
  --shadow: 0 1px 2px rgba(11, 13, 16, .06), 0 8px 24px -16px rgba(11, 13, 16, .35);
  --h1-size: 28px; --head-weight: 800; --h1-bar: 4px; --h1-pad: 12px;
  --card-top: #13161B; --card-top-w: 3px; --tile-top: #D2103E; --tile-top-w: 4px;
  --th-bg: #13161B; --th-ink: #FFFFFF;
  --btn-bw: 1px; --btn2-ink: #13161B; --btn2-line: #13161B; --btn2-hover-bg: #13161B; --btn2-hover-ink: #FFFFFF;
  --danger-bg: #13161B; --danger-ink: #FFFFFF; --danger-line: #13161B; --danger-hover-bg: #0B0D10; --danger-hover-ink: #FFFFFF;
  --avatar-bg: #13161B; --role-bg: #2B2F36; --role-ink: #FFFFFF; --role-admin-bg: #D2103E; --role-admin-ink: #FFFFFF;
  --banner-bg: #A00B2E; --banner-ink: #FFFFFF; --banner-line: #A00B2E;
  --claude-bg: #FFD54A;
  --band-bg: #0B0D10; --band-line: #D2103E; --on-band: #FFFFFF; --band-dim: #C9CBD0; --band-hover: #181B21;
  --band-rule: #3A3F47;
  --side-bg: #0B0D10; --side-edge: #000000; --side-line: #23272E; --side-hover: #181B21; --side-active: #1E2128;
  --side-active-ink: #FFFFFF; --side-text: #C9CBD0; --side-strong: #FFFFFF; --side-dim: #7D828B;
  --side-soon: #8D929B; --side-soon-line: #3A3F47; --side-test: #F0426B; --side-focus: #FFFFFF;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 var(--font); }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
strong { font-weight: 700; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: #fff;
  padding: 8px 12px; border-radius: var(--radius); }
.skip:focus { top: 8px; color: #fff; }

/* ---------------------------------------------------------------- side menu */
.side { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: var(--side-w);
  display: flex; flex-direction: column; background: var(--side-bg); color: var(--side-text);
  border-right: 1px solid var(--side-edge); }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: var(--top-h); padding: 0 14px 0 18px; background: var(--band-bg); border-bottom: 3px solid var(--band-line);
  flex: none; }
.side-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 8px 0; }
.side-brand img { height: 38px; width: auto; display: block; }
.side-brand .appname { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--on-band); border-left: 1px solid var(--band-rule); padding-left: 10px; }
.side-close { display: none; color: var(--on-band); padding: 8px; border-radius: var(--radius); }
.side-nav { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 0 16px;
  scrollbar-width: thin; scrollbar-color: var(--side-soon-line) transparent; }
.side-group + .side-group { margin-top: 6px; }
.side-heading { padding: 10px 20px 4px; font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--side-dim); }
.side-nav ul { list-style: none; margin: 0; padding: 0; }

/* ---------------------------------------------------------------- side menu: folding groups
   A group heading is a <button data-fold> that folds its lines (static/js/app.js, and the inline script after
   the menu in base.html). The caret points down when open, right when folded. No new colors. */
.side-fold { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0 14px 0 0; background: none;
  border: 0; cursor: pointer; font: inherit; text-align: left; color: var(--side-dim); }
.side-fold .side-heading { flex: 1; min-width: 0; }
.side-fold:hover, .side-fold:hover .side-heading { color: var(--side-text); }
.side-fold .caret { width: 14px; height: 14px; margin-top: 6px; stroke-width: 2.2; transition: transform .15s ease-out; }
.side-group.is-folded > ul { display: none; }
.side-group.is-folded .side-fold .caret { transform: rotate(-90deg); }
@media (prefers-reduced-motion: reduce) {
  .side-fold .caret { transition: none; }
}
/* ---------------------------------------------------------------- end of side menu: folding groups */

.side-link { display: flex; align-items: center; gap: 11px; min-height: 36px; padding: 6px 14px 6px 17px;
  border-left: 3px solid transparent; color: var(--side-text); text-decoration: none; font-size: 14.5px;
  font-weight: 600; line-height: 1.2; }
.side-link .ico { width: 19px; height: 19px; opacity: .85; }
.side-link .side-label { flex: 1; min-width: 0; }
.side-link:hover { background: var(--side-hover); color: var(--side-strong); }
.side-link.active, .side-link[aria-current="page"] { background: var(--side-active); color: var(--side-active-ink);
  border-left-color: var(--mark); }
.side-link.active .ico { opacity: 1; color: var(--side-active-ink); }
.side-link.is-coming { color: var(--side-soon); font-weight: 500; }
.side-link.is-coming:hover { color: var(--side-text); }
.side-link.is-coming.active { color: var(--side-active-ink); }
.side-link.is-test { color: var(--side-test); }
.side-link.is-test:hover, .side-link.is-test.active { color: var(--side-strong); }
.side-link .soon { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--side-soon); border: 1px solid var(--side-soon-line); border-radius: var(--pill-radius); padding: 1px 6px; }
.side-link .count { min-width: 22px; text-align: center; font-size: 12px; font-weight: 800; color: var(--on-act);
  background: var(--act); border-radius: 10px; padding: 1px 7px; }
.side-foot { display: none; flex: none; border-top: 1px solid var(--side-line); padding: 12px 18px 16px;
  font-size: 14px; color: var(--side-text); }
.side-foot a, .side-foot .linkbtn { color: var(--side-text); display: block; margin-top: 6px; }
.side-who { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--side-strong); font-weight: 600; }
.side-backdrop { display: none; }

/* ---------------------------------------------------------------- shell and top bar */
.shell { min-width: 0; }
body.has-side .shell { margin-left: var(--side-w); }
/* One banner for both frames: the test-copy line and a shop screen's own heads-up (.ph-banner). */
.test-banner, .ph-banner { background: var(--banner-bg); color: var(--banner-ink); border-bottom: 1px solid var(--banner-line);
  text-align: center; padding: 5px 12px; font-size: 13px; font-weight: 600; letter-spacing: .02em; }
/* The Claude switch (core/claude_switch.py): a yellow bar on every page while it is on, and the top bar's
   button. Off, the button hides on a phone (Claude works at a computer); on, it always shows. */
.claude-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  background: var(--claude-bg); color: var(--black); border-bottom: 2px solid var(--warn); padding: 7px 12px;
  font-size: 14px; text-align: center; }
.claude-bar a { color: var(--black); font-weight: 700; }
.top-claude { display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.top-claude.is-on { background: var(--claude-bg); color: var(--black); border-radius: var(--radius); padding: 3px 4px 3px 10px;
  font-size: 14px; font-weight: 700; }
.top-claude .btn.small { padding: 5px 10px; }
@media (max-width: 640px) {
  .top-claude:not(.is-on) { display: none; }
  .top-claude-words { display: none; }
}
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px 16px;
  min-height: var(--top-h); padding: 8px 24px; background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(11, 13, 16, .03); }
.topbar-plain { position: static; background: var(--band-bg); border-bottom: 3px solid var(--band-line); }
.menu-btn { display: none; align-items: center; gap: 6px; color: var(--ink); text-decoration: none;
  font-weight: 700; padding: 8px 10px; margin-left: -10px; border-radius: var(--radius); }
.menu-btn:hover { background: var(--bg); color: var(--ink); }
.top-search { position: relative; flex: 1; max-width: 620px; display: flex; align-items: center; }
.top-search .ico { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.top-search input[type=search] { width: 100%; font-size: 16px; padding: 9px 40px 9px 40px;
  background: var(--bg); border: 1px solid var(--line); min-width: 0; }
.top-search input[type=search]:focus { background: #fff; }
.key-hint { position: absolute; right: 10px; font: 600 12px/1 system-ui, sans-serif; color: var(--muted);
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 3px; padding: 3px 6px;
  background: #fff; pointer-events: none; }
.top-search input:focus ~ .key-hint, .top-search input:not(:placeholder-shown) ~ .key-hint { display: none; }
.top-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
/* The quick clock button beside the initials (hours, H39): the status in a few words, then one small button. */
.top-clock { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); white-space: nowrap; margin: 0; }
.top-clock-words { display: inline-flex; align-items: center; gap: 5px; }
.top-clock-words .ico { width: 16px; height: 16px; color: var(--muted); }
.top-clock-words.is-in { color: var(--good); font-weight: 700; }
.top-clock-words.is-in .ico { color: var(--good); }
.top-clock .btn.small { padding: 5px 10px; }
.who { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.who-link { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; border-radius: 18px; padding: 2px 8px 2px 2px; }
.who-link:hover { background: var(--bg); color: inherit; }
.who-name { font-weight: 700; color: var(--ink); max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 50%; background: var(--avatar-bg); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .02em; flex: none; }
.side-who .avatar { background: var(--act); color: var(--on-act); }
.role { background: var(--role-bg); color: var(--role-ink); padding: 2px 8px; border-radius: var(--pill-radius); font-size: 11px;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.role-admin { background: var(--role-admin-bg); color: var(--role-admin-ink); }
.inline { display: inline; }
.linkbtn { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* "+ New" and other drop-down menus (a <details> with class="dropdown") */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.new-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px 8px 12px; border-radius: 18px; }
.new-btn .ico { width: 18px; height: 18px; stroke-width: 2.4; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 240px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 0;
  box-shadow: 0 12px 32px -12px rgba(11, 13, 16, .45); }
.dropdown-menu a, .dropdown-menu .is-disabled { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px; color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.dropdown-menu a:hover, .dropdown-menu a:focus-visible { background: var(--act-tint); color: var(--act-ink); }
.dropdown-menu .is-disabled { color: var(--soon); cursor: default; font-weight: 500; }
/* Your own menu under your name (top right): the password page and the colors for this computer. */
.who-menu > summary { cursor: pointer; }
.dropdown-label { padding: 10px 16px 4px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; }
.look-pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 16px;
  background: none; border: 0; font: inherit; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; white-space: nowrap; }
.look-pick:hover, .look-pick:focus-visible { background: var(--act-tint); color: var(--act-ink); }
.look-pick[aria-pressed="true"]::after { content: "\2713"; color: var(--act-ink); font-weight: 800; }
.dropdown-menu .soon { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-3); border-radius: var(--pill-radius); padding: 2px 6px; }

/* ---------------------------------------------------------------- page bones */
.page { max-width: 1320px; margin: 0 auto; padding: 18px 28px 40px; }
.page:focus { outline: none; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; font-size: 14px; color: var(--muted);
  margin: 0 0 10px; min-height: 20px; overflow-wrap: anywhere; }
.crumbs > * { min-width: 0; }
.crumbs:empty { display: none; }
.crumbs > a { color: var(--muted); text-decoration: none; }
.crumbs > a:hover { color: var(--link); text-decoration: underline; }
.crumbs > * + *::before { content: "\203A"; display: inline-block; margin: 0 8px; color: var(--line-strong);
  text-decoration: none; }
.crumbs > :last-child { color: var(--ink-2); font-weight: 600; }
.pagehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.pagehead .pagetitle { margin: 4px 0 14px; min-width: 0; }
.pagetitle:empty, .pageactions:empty, .pagesub:empty { display: none; }
.pageactions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.pagesub { color: var(--muted); margin: -6px 0 16px; }
h1 { font-size: var(--h1-size); font-weight: var(--head-weight); letter-spacing: -.01em; margin: 4px 0 16px;
  padding-left: var(--h1-pad); border-left: var(--h1-bar) solid var(--mark); line-height: 1.15;
  overflow-wrap: anywhere; }   /* a long name with no spaces breaks instead of pushing a phone page sideways */
h2 { font-size: 19px; font-weight: var(--head-weight); margin: 26px 0 10px; letter-spacing: -.005em; }
h3 { font-size: 16px; font-weight: var(--head-weight); }
.sub { color: var(--muted); margin-top: -8px; }
.titlebar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.titlebar h1 { margin-bottom: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.note { background: var(--panel); border-left: 3px solid var(--ink); padding: 10px 14px; color: var(--ink-2); }

/* Panels and cards */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 14px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-top: var(--card-top-w) solid var(--card-top);
  border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card .num, .bignum { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }
.card .lbl { color: var(--muted); font-size: 14px; margin: 2px 0 8px; }
.card .when { font-weight: 700; }
.go { font-weight: 700; text-decoration: none; }
.go::after { content: " \2192"; }
.flags { margin: 8px 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }

/* Tables. Headers stay at the top while the page scrolls (under the top bar). A table too wide
   for its box gets class "is-wide" (static/js/app.js) and slides sideways inside the box instead. */
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
td { overflow-wrap: break-word; }
th { background: var(--th-bg); color: var(--th-ink); font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; position: sticky; top: var(--top-h); z-index: 2; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:hover td { background: var(--surface-2); }
tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--mark); }
.tablewrap { border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tablewrap > table { border-radius: var(--radius-lg); }
.tablewrap > table > thead > tr:first-child > th:first-child { border-top-left-radius: var(--radius-lg); }
.tablewrap > table > thead > tr:first-child > th:last-child { border-top-right-radius: var(--radius-lg); }
.tablewrap.is-wide { overflow-x: auto; }
.tablewrap.is-wide th { top: 0; }
.count-line { color: var(--muted); margin: 0 0 10px; }

/* Forms */
.searchbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
input[type=text], input[type=search], input[type=number], input[type=email], input[type=password],
input[type=url], input[type=tel], input[type=date], select, textarea {
  font: inherit; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; color: var(--ink); min-width: 0; max-width: 100%; box-sizing: border-box; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
input[type=search] { flex: 1; min-width: min(240px, 100%); font-size: 18px; }
textarea { width: 100%; min-height: 80px; }
input[type=checkbox], input[type=radio] { accent-color: var(--act); width: 16px; height: 16px; vertical-align: -2px; }
form.stack p, form.stack .field { margin: 0 0 14px; }
form.stack label { display: block; font-weight: 700; margin-bottom: 4px; }
/* A group of radios or tick boxes under one label (the Percent off form). */
form.stack fieldset.field { border: 0; padding: 0; min-width: 0; }
form.stack fieldset.field > legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
form.stack .checklist label { display: flex; font-weight: 500; margin: 0; }
.helptext { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.errorlist { color: var(--bad); margin: 4px 0; padding-left: 18px; font-weight: 600; }
.formbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px;
  padding-top: 14px; border-top: 1px solid var(--line); }

/* Buttons */
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit;
  font-weight: 700; padding: 9px 16px; border-radius: var(--radius); border: var(--btn-bw) solid var(--act); background: var(--act);
  color: var(--on-act); text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover, button.btn:hover { background: var(--act-deep); border-color: var(--act-deep); color: var(--on-act); }
.btn.secondary { background: var(--panel); color: var(--btn2-ink); border-color: var(--btn2-line); }
.btn.secondary:hover { background: var(--btn2-hover-bg); color: var(--btn2-hover-ink); border-color: var(--btn2-line); }
.btn.danger { background: var(--danger-bg); color: var(--danger-ink); border-color: var(--danger-line); }
.btn.danger:hover { background: var(--danger-hover-bg); color: var(--danger-hover-ink); border-color: var(--danger-line); }
.btn.small { padding: 6px 12px; font-size: 14px; }
/* A step already done (Derek, 2026-10-26): dark, and clicking it again takes it back with a reason. */
.btn.done { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.btn.done:hover { background: var(--black); border-color: var(--black); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* Pills and messages */
.pill { display: inline-block; padding: 2px 8px; border-radius: var(--pill-radius); font-size: 12px; font-weight: 700; line-height: 1.4; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.muted { background: var(--surface-3); color: var(--muted); }
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { padding: 11px 14px; border-radius: var(--radius); margin-bottom: 6px; background: var(--panel);
  border: 1px solid var(--line); border-left: 4px solid var(--ink); }
.messages .msg-success { border-left-color: var(--good); }
.messages .msg-error { border-left-color: var(--bad-line); background: var(--bad-bg); color: var(--bad); }
.messages .msg-warning { border-left-color: var(--warn-line); }

/* Pictures */
.thumb { width: 64px; height: 64px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.photo { max-width: 100%; max-height: 360px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.photos { display: flex; flex-wrap: wrap; gap: 10px; }
form.upload { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Detail lists */
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 7px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.pager { margin: 14px 0; display: flex; gap: 8px; align-items: center; }
.muted { color: var(--muted); }
.right { text-align: right; }

/* Small shared helpers - a page uses these instead of typing its own style="..." (one look, one place). */
.narrow { max-width: 640px; }
.wide-form { max-width: 780px; }
.preview-slot { max-width: 900px; margin-top: 16px; }
.nowrap { white-space: nowrap; }
.fine { font-size: 13px; }
.lead { font-size: 20px; margin-top: 0; }
.m0 { margin: 0; }
.tight { margin: 0 0 6px; }
.gap-above { margin-top: 16px; }
.gap-below { margin-bottom: 18px; }
.hrow { display: flex; gap: 10px; flex-wrap: wrap; }
.pre-words { white-space: pre-wrap; font-family: inherit; }
.wide-box { width: 100%; }
.mono { font-family: ui-monospace, Consolas, "Courier New", monospace; }
/* A count or a cost typed in a table cell (the PO draft). */
input.qty-box { width: 6.5em; text-align: right; }
input.cost-box { width: 7.5em; text-align: right; }
/* More helpers for the pages main added after the one-look pass (restyled at the merge, 2026-11-02). */
.tiny { font-size: 12px; }
.no-top { margin-top: 0; }
.gap-above-sm { margin-top: 10px; }
.gap-left { margin-left: 8px; }
.pre-wrap { white-space: pre-wrap; }
.pill.pill-wrap { white-space: normal; }
input.reason-box { width: 16em; max-width: 100%; }
input.note-box { width: 260px; max-width: 100%; }
input.minutes-box { width: 6em; }
pre.raw-json { font-size: 12px; overflow: auto; }
td.cell-note { max-width: 420px; font-size: 13px; }
/* A QuickBooks error under a line or a panel row: the problem red, small. */
.msg-error.err-box { display: block; margin-top: 6px; padding: 6px 8px; border-left: 3px solid var(--bad-line);
  border-radius: var(--radius); background: var(--bad-bg); color: var(--bad); }
/* A home card that needs a look: its top edge in the warning or the problem color. */
.card.is-warn { border-top-color: var(--warn-line); }
.card.is-bad { border-top-color: var(--bad-line); }
/* Detail lists that keep the line breaks typed in the record (old records). */
.kv.kv-lines dd { white-space: pre-line; }

/* Shadow books and the month compare (templates/books/). */
td.ok { color: var(--good); }
td.bad { color: var(--bad); font-weight: 600; }
tr.other td { color: var(--muted); }
.streak { font-size: 28px; font-weight: 700; }
.streak small { font-size: 14px; font-weight: 400; color: var(--muted); display: block; }
.checks span.pill { margin-right: 4px; }
.assume { background: var(--warn-bg); border-left: 3px solid var(--warn-line); padding: 6px 10px; margin: 6px 0; font-size: 14px; }

/* A new customer filled from a picture or the directory (templates/customers/customer_form.html). */
#customer-form .filled { background: var(--warn-bg); }
.fill-note { background: var(--warn-bg); }
.fill-note p { margin: 0 0 6px; }
.suggest-note.is-warn { color: var(--ink); background: var(--warn-bg); }
ul.spaced { padding-left: 18px; margin: 0; }
ul.spaced > li { margin-bottom: 8px; }
.cards-gap { margin-bottom: 16px; }
/* A panel's own heading row: the name on the left, its button on the right (Prices to check). */
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 6px; }
.panel-head > h2, .panel-head > h3 { margin: 0; }
form.upload input[type=file] { max-width: 230px; }

/* The sign-in card (registration/login.html; the 2-step page uses it too). */
.signin { max-width: 420px; margin: 40px auto; }
.signin h1 { font-size: 30px; }
.signin label { font-size: 18px; }
.signin input[type=text], .signin input[type=password] { width: 100%; font-size: 20px; padding: 12px; }
.signin .btn { width: 100%; font-size: 20px; padding: 12px; margin-top: 6px; }
.signin .signin-or { text-align: center; margin: 14px 0 4px; }
/* 2-step sign-in (templates/registration/two_step.html): the code box, the QR picture, the setup key. */
.signin.two-step { max-width: 440px; }
.signin.two-step input[type=text] { font-size: 28px; letter-spacing: 6px; text-align: center; }
.signin .qr { background: #fff; padding: 8px; width: 240px; margin: 0 auto; }
.signin .qr svg { width: 100%; height: auto; display: block; }
.signin .setup-key { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 18px; word-break: break-all; }

/* The product page (templates/catalog/product_detail.html). */
.photos figure { margin: 0; }
.photos figcaption { font-size: 13px; color: var(--muted); }
.photo.photo-sm { max-height: 240px; }
.headsup ul { margin: 0; padding-left: 20px; }
.headsup li + li { margin-top: 6px; }

/* The product list (templates/catalog/product_list.html). A label in a search row stays on one line with its box. */
.searchbar label { white-space: nowrap; }
.pname .pill { margin-left: 4px; }
.unitwords { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }

/* Add or change a product (templates/catalog/product_form.html): the parts of the form, the short add page with
   "More boxes" folded, and "Fill it in for me" (2026-10-23). A box the app filled in is yellow. */
fieldset.formpart { border: 0; border-top: 1px solid var(--line); margin: 0 0 6px; padding: 12px 0 0; }
fieldset.formpart:first-of-type { border-top: 0; padding-top: 0; }
fieldset.formpart legend { font-weight: 800; font-size: 15px; padding: 0 6px 0 0; }
.twins ul { margin: 6px 0 10px; padding-left: 20px; }
.guessed, #product-form .guessed { background: var(--warn-bg); }
#product-form [hidden], #product-form .fillpics [hidden] { display: none; }
details.formpart.more { border-top: 1px solid var(--line); margin: 6px 0 12px; padding: 12px 0 0; }
details.formpart.more > summary { font-weight: 800; font-size: 15px; cursor: pointer; margin: 0 0 12px; }
details.formpart.more fieldset.formpart:first-of-type { border-top: 0; padding-top: 0; }
.fillpart { border-top: 1px solid var(--line); margin: 0 0 12px; padding: 12px 0 0; }
.fillpart p { margin: 6px 0; }
.fillrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.fillpics { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
#product-form .fillpics label { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; max-width: 130px; }
.fillpics img { max-width: 120px; max-height: 120px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius); }

/* A kit's page and a kit line's picks (templates/kits/kit_detail.html, line_kit.html). */
.kit-grid input[type=text], .kit-grid input[type=number] { width: 100%; min-width: 70px; }
.kit-grid .pos { width: 56px; min-width: 56px; }
.kit-grid select { min-width: 150px; }
.kit-thumb { display: block; margin: 0 0 10px; }
.kit-line input[type=text] { width: 90px; }
.kit-picks fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.kit-picks legend { font-weight: 600; margin-bottom: 4px; }
.kit-picks label { display: block; margin: 2px 0; }

/* The buy list (templates/buying/list.html). */
.buyhead p { margin: 4px 0; }
.buyline .why { font-size: 14px; }
.buyline tr.detailrow td { border-top: 0; padding-top: 0; }
.buyline tr.detailrow + tr td { border-top: 2px solid var(--line); }
.buyline .flags { margin: 4px 0 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.buyline input.qty { width: 6.5em; text-align: right; }
.buyline details.box { margin-top: 6px; }
.buyline details.box form { margin-top: 6px; max-width: 520px; }
.buyline details.box textarea { width: 100%; }
.fillbar { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.notebox { background: var(--warn-bg); border-left: 3px solid var(--warn-line); padding: 4px 8px; margin: 4px 0; font-size: 14px;
  border-radius: 0 var(--radius) var(--radius) 0; }

/* ---------------------------------------------------------------- home page */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin: 4px 0 22px; }
.shortcut { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; text-align: center; font-size: 14px; font-weight: 700; line-height: 1.25; }
.shortcut .ico { width: 26px; height: 26px; padding: 9px; box-sizing: content-box; border-radius: 50%;
  background: var(--act-tint); color: var(--act-ink); }
.shortcut:hover { border-color: var(--act); color: var(--act-ink); }
.home-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.home-grid > section > h2:first-child { margin-top: 0; }
.looklist { list-style: none; margin: 0; padding: 0; }
.looklist > li { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start;
  padding: 12px 0; border-bottom: 1px solid var(--line); }
.looklist > li:last-child { border-bottom: 0; padding-bottom: 0; }
.looklist > li:first-child { padding-top: 0; }
.looklist .n { font-size: 26px; font-weight: 800; line-height: 1.1; text-align: right; font-variant-numeric: tabular-nums; }
.looklist .n.zero { color: var(--good); }
.looklist .what { font-weight: 700; }
.looklist .what .helptext { font-weight: 400; }
.looklist .flags { margin: 4px 0 0; }
.looklist .clear { color: var(--good); font-weight: 700; font-size: 14px; white-space: nowrap; }

/* ---------------------------------------------------------------- search and coming-soon pages */
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.results h2 { margin-top: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.results h2 .muted { font-size: 14px; font-weight: 600; }
.reslist { list-style: none; margin: 0; padding: 0; }
.reslist li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.reslist li:last-child { border-bottom: 0; }
.reslist a.name { font-weight: 700; }
.reslist .meta { color: var(--muted); font-size: 14px; }
.coming { max-width: 760px; }
.coming .phase { display: inline-block; margin-bottom: 12px; }
.coming .what { font-size: 18px; line-height: 1.5; }
.coming ul { padding-left: 20px; }

/* ---------------------------------------------------------------- focus you can see */
a:focus-visible, button:focus-visible, summary:focus-visible, .btn:focus-visible, .linkbtn:focus-visible,
[tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.side a:focus-visible, .side button:focus-visible { outline: 2px solid var(--side-focus); outline-offset: -2px; }
th a { color: var(--th-ink); }

/* ---------------------------------------------------------------- old menu blocks
   A page whose address is not on the menu can still light its line the old way,
   with {% block nav_products %}active{% endblock %} (core/nav.py lights the rest). */
body[data-nav-test="active"] .side-link[data-key="test"],
body[data-nav-products="active"] .side-link[data-key="products"],
body[data-nav-customers="active"] .side-link[data-key="customers"],
body[data-nav-vendors="active"] .side-link[data-key="vendors"],
body[data-nav-pricing="active"] .side-link[data-key="prices"],
body[data-nav-pictures="active"] .side-link[data-key="pictures"],
body[data-nav-log="active"] .side-link[data-key="edit-log"],
body[data-nav-inflow="active"] .side-link[data-key="inflow"],
body[data-nav-users="active"] .side-link[data-key="users"] {
  background: var(--side-active); color: var(--side-active-ink); border-left-color: var(--mark); }

/* ---------------------------------------------------------------- tablets and phones */
@media (max-width: 1180px) {
  .page { padding: 16px 20px 36px; }
  .who-name { display: none; }
}
@media (max-width: 959px) {
  :root { --top-h: 56px; }
  body.has-side .shell { margin-left: 0; }
  .side { width: min(300px, 86vw); transform: translateX(-102%); visibility: hidden;
    transition: transform .18s ease-out, visibility 0s linear .18s; box-shadow: 0 0 40px rgba(0, 0, 0, .5); }
  body.side-open .side, .side:target { transform: none; visibility: visible; transition: transform .18s ease-out; }
  body.side-open { overflow: hidden; }
  .side-close { display: inline-flex; }
  .side-foot { display: block; }
  body.side-open .side-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(11, 13, 16, .5); }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 6px 16px; gap: 10px; }
  .who .role, .signout { display: none; }
  /* Wide tables slide sideways inside their own box; the page itself never does. */
  .tablewrap { overflow-x: auto; }
  th { top: 0; }
  .home-grid, .results { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .page { padding: 12px 14px 32px; }
  .kv { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  .topbar { padding: 6px 12px; gap: 8px; }
  .menu-btn span { display: none; }
  .menu-btn { margin-left: -4px; padding: 8px; }
  .top-search input[type=search] { padding-right: 10px; }
  .key-hint { display: none; }
  .new-btn { padding: 8px 10px; border-radius: 50%; }
  .new-btn span { display: none; }
  .who { display: none; }     /* name, role and Sign out sit at the foot of the menu on a phone */
  .top-clock-words { display: none; }   /* the clock button alone on a phone; its status is its title */
  .shortcuts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .shortcut { padding: 10px 4px; gap: 6px; font-size: 13px; }
  .shortcut .ico { width: 20px; height: 20px; padding: 7px; }
  .looklist > li { grid-template-columns: 56px minmax(0, 1fr); }
  .looklist > li > :last-child { grid-column: 2; }
  .looklist .n { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .side { transition: none; }
}
@media print {
  .side, .side-backdrop, .topbar, .test-banner, .actions, .pageactions, .searchbar, .crumbs, .skip { display: none !important; }
  body.has-side .shell { margin-left: 0; }
  body { background: #fff; }
  .panel, .card, .tablewrap { box-shadow: none; }
  th { position: static; }
}

/* ---------------------------------------------------------------- the Clock in box (templates/hours/_clock_box.html)
   A plain block at the top of the page; its script adds .is-open and it covers the page, 16px from the sides. */
.clock-box { margin: 0 0 16px; }
.clock-box-card { background: var(--panel); border: 1px solid var(--line-strong); border-top: 4px solid var(--act);
  border-radius: var(--radius); padding: 18px 20px 20px; box-shadow: var(--shadow); }
.clock-box-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 24px; line-height: 1.2; }
.clock-box-title .ico { width: 28px; height: 28px; color: var(--act); }
.clock-box p { margin: 0 0 6px; font-size: 17px; }
.clock-box .clock-box-also { color: var(--muted); font-size: 15px; }
.clock-box .clock-box-msg { padding: 8px 12px; border-left: 4px solid var(--red); background: var(--red-tint);
  color: var(--red-deep); font-size: 15px; }
.clock-box-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.clock-box-actions form { flex: 1 1 140px; margin: 0; }
.clock-box-btn, button.clock-box-btn { width: 100%; min-height: 56px; font-size: 20px; }
.clock-box.is-open { position: fixed; inset: 0; z-index: 90; margin: 0; padding: 16px; overflow-y: auto;
  display: flex; justify-content: center; background: rgba(11, 13, 16, .6); }
.clock-box.is-open .clock-box-card { width: 100%; max-width: 440px; margin: auto 0; }
html.clock-box-open, html.clock-box-open body { overflow: hidden; }
@media print { .clock-box { display: none !important; } }

/* A long list of tick boxes (price sheet categories): columns, scrolls inside its own box. */
.checklist, div.checklist { list-style: none; padding: 6px 8px; margin: 4px 0; max-height: 220px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--radius); columns: 2 220px; column-gap: 16px; }
.checklist li, .checklist div { break-inside: avoid; padding: 2px 0; }
.checklist label { font-weight: normal; display: flex; gap: 6px; align-items: flex-start; }
/* "Did you mean" box on the search pages. */
.didyoumean { border-left: 4px solid var(--act); }

/* ---- sales (phase 2) ---- quote and order pages (templates/sales/*). No new colors. */
.sales-title-name { font-size: .6em; font-weight: 600; margin-left: 6px; }
.sales-alert { border-left: 4px solid var(--bad-line); }
.sales-alert-text { margin: 12px 0; }
.sales-list { margin: 6px 0; padding-left: 18px; }
.sales-list li { margin: 3px 0; }
.sales-lines-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sales-lines-head h2 .muted { font-size: 15px; font-weight: 600; }
.sales-lines td { vertical-align: top; }
.sales-lines .pill { margin-top: 3px; }
.sales-desc { max-width: 280px; font-size: 14px; color: var(--ink-2); }
/* A kit we build: its picks and parts under its quote line, and on the shop board card (kits app). */
.kit-on-line { margin-top: 6px; }
.kit-parts-short, .board-kit { margin: 4px 0 6px; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.kit-parts-short li + li, .board-kit li + li { margin-top: 2px; }
/* The line editor's "Kit choices" box on a new kit line (templates/sales/line_form.html): one short row of
   radios per choice, so the picks stay on one screen. */
form.stack fieldset.kit-choices { background: var(--bg); border-radius: var(--radius); padding: 8px 12px 10px; }
form.stack fieldset.kit-choices > legend { float: left; width: 100%; margin-bottom: 4px; }
form.stack fieldset.kit-choices > div { clear: both; }
.kit-choice-group + .kit-choice-group { margin-top: 6px; }
.kit-choice-title { margin: 0 0 2px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.kit-choice-row { display: flex; flex-wrap: wrap; gap: 0 18px; }
.kit-choice-row .sales-radio { margin: 2px 0; }
.kit-now { margin: 0; }
.sales-linkcell { white-space: nowrap; }
.sales-linkcell a + a { margin-left: 10px; }
/* Price and No charge right in the line list (Derek, 2026-11-02). */
.calm-price { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin: 0; }
.calm-price + .calm-price, .sales-lines td .calm-price:not(:first-child) { margin-top: 4px; }
.calm-price input[name="price"] { width: 7.5em; text-align: right; }
.sales-under-lines { margin-top: 16px; }
.sales-totals .kv { grid-template-columns: 1fr auto; }
.sales-totals .kv dd { text-align: right; font-variant-numeric: tabular-nums; }
.sales-totals .sales-total { font-size: 20px; font-weight: 800; color: var(--ink); border-top: 1px solid var(--line); padding-top: 6px; }
.sales-actions { margin-top: 16px; }
.sales-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sales-buttons form { margin: 0; }
.sales-saved { min-height: 1.2em; }
.sales-bad { color: var(--bad); font-weight: 600; }
.sales-radio { display: block; font-weight: 500 !important; margin: 4px 0; }
.sales-row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 10px; }
.sales-find { position: relative; }
.sales-find input[type=text] { width: 100%; font-size: 18px; }
.sales-chosen { margin-top: 6px; }
.sales-results { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; max-height: 340px; overflow-y: auto; box-shadow: var(--shadow); }
.sales-results li { border-bottom: 1px solid var(--line); padding: 0; }
.sales-results li:last-child { border-bottom: 0; }
.sales-results li.muted, .sales-results li.sales-fix, .sales-results li.sales-bad { padding: 8px 10px; }
.sales-results .sales-pick { display: block; width: 100%; text-align: left; font: inherit; background: none; border: 0;
  padding: 8px 10px; cursor: pointer; color: var(--ink); }
.sales-results .sales-pick:hover, .sales-results .sales-pick:focus { background: var(--act-tint); outline: none; }
.sales-choices li { padding: 6px 10px; }
.sales-live { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; margin: 4px 0 14px; }
.sales-eq { font-size: 20px; font-weight: 800; margin: 4px 0; font-variant-numeric: tabular-nums; }
.sales-offer { background: var(--warn-bg); border-radius: var(--radius); padding: 8px 10px; margin: 8px 0; }
.sales-offer p { margin: 0 0 6px; }
@media (max-width: 640px) {
  .sales-row3 { grid-template-columns: 1fr; }
  .sales-desc { max-width: none; }
}

/* ---- live suggestions under a search box (static/js/suggest.js, core/views_suggest.py). The list
   sits on the page body, placed under the box by the script, above the top bar and the side menu. */
.suggest { position: absolute; z-index: 60; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow-y: auto; overscroll-behavior: contain; font-size: 15px; line-height: 1.3; }
.suggest[hidden] { display: none; }
.suggest-group { padding: 7px 12px 3px; font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--line); }
.suggest-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px;
  cursor: pointer; border-bottom: 1px solid var(--line); }
.suggest-row:last-child { border-bottom: 0; }
.suggest-row.is-active { background: var(--act-tint); }
.suggest-pic { width: 36px; height: 36px; flex: none; object-fit: contain; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); }
.suggest-words { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.suggest-words strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-note { flex: none; font-size: 11px; font-weight: 700; color: var(--good); background: var(--good-bg);
  border-radius: 2px; padding: 2px 6px; white-space: nowrap; }
.suggest-row.is-fix strong, .suggest-more .suggest-words { color: var(--act-ink); }
.suggest-more .suggest-words { font-weight: 700; }
.suggest-empty { padding: 10px 12px; color: var(--muted); }
/* "Add new ..." rows, always last (core/addnew.py, Derek 2026-10-26). */
.suggest-adds { position: sticky; bottom: 0; background: var(--bg); border-top: 2px solid var(--line-strong); }
.suggest-add { background: var(--bg); min-height: 38px; }
.suggest-add .suggest-words strong { color: var(--act-ink); }
.suggest-add-plus { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--act);
  color: var(--on-act); font-weight: 700; line-height: 22px; text-align: center; }
.add-new-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
/* Phones and tablets: taller rows for a thumb, bigger pictures. */
body.phone .suggest { font-size: 17px; }
body.phone .suggest-row { min-height: 52px; }
body.phone .suggest-pic { width: 44px; height: 44px; }
body.phone .suggest-sub { font-size: 14px; white-space: normal; }
@media print { .suggest { display: none !important; } }

/* ================================================================ the shop frame (phone screens)
   Was static/css/phone.css until the one-look pass (2026-10-23): the tile home, the boards, the counter sale,
   photo to order, count mode, job notes and Lens (templates/phone/base.html), plus the office pages of install
   jobs and support cases. Same color names as the office pages. */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- the frame */
body.phone { background: var(--bg); }
.ph-top { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 88px 1fr 88px;
  align-items: center; min-height: 56px; padding: 4px 8px; background: var(--band-bg); color: var(--on-band);
  border-bottom: 3px solid var(--band-line); }
.ph-title { text-align: center; font-weight: 800; font-size: 18px; line-height: 1.2; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ph-back, .ph-office { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px;
  color: var(--on-band); text-decoration: none; font-weight: 700; font-size: 15px; border-radius: var(--radius); }
.ph-office { justify-self: end; color: var(--band-dim); font-weight: 600; }
.ph-back:hover, .ph-office:hover { background: var(--band-hover); color: var(--on-band); }
.ph-back .ico { width: 22px; height: 22px; stroke-width: 2.4; }
.ph-main { max-width: 760px; margin: 0 auto; padding: 14px 14px 48px; }
.ph-main:focus { outline: none; }
.ph-hello { font-size: 18px; margin: 4px 0 14px; }
.ph-h2 { font-size: 18px; margin: 22px 0 10px; }
.ph-small { font-size: 14px; margin-top: -4px; }
.ph-banner { padding: 8px 14px; font-weight: 700; font-size: 15px; }

/* ---------------------------------------------------------------- big buttons */
.ph-btn, button.ph-btn { min-height: 52px; padding: 12px 20px; font-size: 19px; }
.ph-btn-wide { width: 100%; }
.ph-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.ph-form .formbar { gap: 12px; }
.ph-form input[type=text], .ph-form input[type=number], .ph-form input[type=search], .ph-form select,
.ph-form textarea { width: 100%; font-size: 18px; padding: 12px; }

/* ---------------------------------------------------------------- tiles */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 136px; padding: 16px 8px; background: var(--panel); border: 1px solid var(--line);
  border-top: var(--tile-top-w) solid var(--tile-top); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; text-align: center; }
.tile .ico { width: 34px; height: 34px; padding: 10px; box-sizing: content-box; border-radius: 50%;
  background: var(--act-tint); color: var(--act-ink); }
.tile-label { font-size: 19px; font-weight: 800; line-height: 1.15; }
.tile-help { font-size: 13px; color: var(--muted); line-height: 1.25; }
a.tile:hover, a.tile:focus-visible { border-color: var(--act); color: var(--act-ink); }
.tile.is-coming { border-top-color: var(--line-strong); background: var(--surface-2); color: var(--soon); box-shadow: none; }
.tile.is-coming .ico { background: var(--surface-3); color: var(--soon); }
.tile-soon { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  background: var(--surface-3); border-radius: var(--pill-radius); padding: 2px 6px; }
.tiles-small .tile { min-height: 96px; }
.tiles-small .tile .ico { width: 24px; height: 24px; padding: 8px; }
.tiles-small .tile-label { font-size: 16px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ph-howto { margin-top: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 12px 14px; }
.ph-howto summary { font-weight: 700; cursor: pointer; }

/* ---------------------------------------------------------------- office board */
.ph-headline { font-size: 22px; margin: 2px 0 6px; }
.who-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.who-row { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--line-strong);
  border-radius: var(--radius-lg); padding: 12px; box-shadow: var(--shadow); }
.who-row.status-here, .who-row.status-phone { border-left-color: var(--good); }
.who-row.status-meeting { border-left-color: var(--warn-line); }
.who-row.status-job { border-left-color: var(--ink); }
.who-row.status-out { border-left-color: var(--bad-line); }
.who-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.who-name-big { font-size: 22px; font-weight: 800; color: var(--ink); text-decoration: none; }
.who-pill { font-size: 14px; padding: 4px 10px; }
.who-extra { margin: 6px 0 2px; font-size: 16px; }
.who-buttons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 10px 0 6px; }
.who-btn { font: inherit; font-size: 13px; font-weight: 700; line-height: 1.15; min-height: 46px; padding: 4px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); color: var(--ink); cursor: pointer; }
.who-btn:hover { border-color: var(--ink); }
.who-btn.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.who-foot { font-size: 13px; }
.ph-admin summary { font-weight: 700; cursor: pointer; }
.ph-admin form.inline { display: inline-block; margin: 6px 6px 0 0; }
.ph-inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.ph-choices { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.ph-choices legend { font-weight: 800; font-size: 18px; margin-bottom: 8px; }
.ph-choice { display: flex !important; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 18px;
  font-weight: 700 !important; cursor: pointer; }
.ph-choice input { width: 22px; height: 22px; }
.ph-choice:has(input:checked) { border-color: var(--act); background: var(--act-tint); }

/* ---------------------------------------------------------------- find a part, product rows */
.ph-search { display: flex; gap: 8px; margin: 4px 0 12px; }
.ph-search input[type=search] { font-size: 19px; padding: 12px; }
.part-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.part-row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.part-pic { width: 88px; height: 88px; object-fit: contain; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); }
.part-nopic { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px;
  color: var(--muted); background: var(--bg); }
.part-name { font-weight: 800; font-size: 17px; color: var(--ink); text-decoration: none; }
.part-words { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 420px) {
  .who-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-top { grid-template-columns: 76px 1fr 64px; }
}
@media print {
  .ph-top, .ph-banner, .test-banner, .who-buttons, .ph-admin { display: none !important; }
}

/* ---------------------------------------------------------------- the shop board (APP-01) */
.board-card { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--line-strong);
  border-radius: var(--radius-lg); padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.board-card.is-ready { border-left-color: var(--good); }
.board-card.is-waiting { border-left-color: var(--bad-line); }
.board-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.board-customer { font-size: 20px; font-weight: 800; line-height: 1.2; }
.board-contact { color: var(--muted); font-size: 14px; }
.board-num { text-align: right; font-weight: 700; white-space: nowrap; font-size: 15px; }
.board-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.board-note { margin: 6px 0; font-size: 15px; color: var(--ink-2); background: var(--bg); padding: 6px 8px;
  border-radius: var(--radius); }
.board-lines { list-style: none; margin: 6px 0 0; padding: 0; }
.board-lines li { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 2px 10px; padding: 7px 0;
  border-top: 1px solid var(--line); align-items: baseline; }
.board-qty { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.board-qty small { font-weight: 600; color: var(--muted); }
.board-item { font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.board-bin { font-weight: 800; font-size: 14px; white-space: nowrap; }
.board-short { grid-column: 2 / -1; color: var(--bad); font-weight: 800; font-size: 14px; }
.board-lines li.is-short .board-qty { color: var(--bad); }
.board-foot { margin-top: 8px; font-size: 14px; text-align: right; }

/* ---------------------------------------------------------------- install jobs, support cases, pick a customer */
.when { font-weight: 700; }
.when-today, .when-tomorrow { color: var(--good); }
.when-overdue { color: var(--bad); }
.when-tbd { color: var(--muted); }
.note-list { list-style: none; margin: 12px 0; padding: 0; }
.note-list li { padding: 8px 0; border-top: 1px solid var(--line); }
.pick-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.ph-btn-small { white-space: nowrap; }

/* ---------------------------------------------------------------- counter sale (APP-05) */
.ph-or { margin: 14px 0 6px; color: var(--muted); font-weight: 700; }
.counter-qty { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.counter-qty input[type=number] { width: 96px; font-size: 18px; padding: 8px; }
.counter-totals .kv { grid-template-columns: 1fr auto; }
.counter-totals dd { text-align: right; font-variant-numeric: tabular-nums; }
.counter-totals .counter-total { font-size: 22px; font-weight: 800; color: var(--ink); }
.counter-small { font-size: 12px; text-align: left; max-width: 280px; }
.counter-totals .ph-btn { margin-top: 12px; }
.counter-due { font-size: 22px; margin: 4px 0; }
.counter-change { background: var(--good-bg); color: var(--good); font-size: 24px; padding: 14px; border-radius: var(--radius);
  margin-bottom: 12px; text-align: center; }
.counter-startover { margin: 18px 0; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- photo to order (APP-06, APP-10) */
.intake-photo { display: block; max-width: 100%; max-height: 420px; margin: 8px auto; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; }
.intake-line { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--line-strong);
  border-radius: var(--radius-lg); padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.intake-line.sure-sure { border-left-color: var(--good); }
.intake-line.sure-check { border-left-color: var(--warn-line); }
.intake-line.sure-none { border-left-color: var(--bad-line); }
.intake-line.is-done { border-left-color: var(--good); background: var(--good-bg); }
.intake-line.is-off { opacity: .7; }
.intake-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.intake-read { font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.intake-qty { font-size: 16px; font-weight: 700; margin-top: 2px; }
.intake-why { font-size: 14px; margin: 6px 0; }
.intake-choices { margin-top: 8px; }
.intake-find { margin-top: 8px; }
.intake-more { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.intake-retype { margin-top: 8px; font-size: 14px; }

/* ---------------------------------------------------------------- count mode (APP-08) */
.bin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.bin-btn { display: flex; align-items: center; justify-content: center; min-height: 52px; background: var(--panel);
  border: 1px solid var(--line-strong); border-radius: var(--radius); font-weight: 800; font-size: 17px;
  color: var(--ink); text-decoration: none; }
.bin-btn:hover { border-color: var(--act); color: var(--act-ink); }
.part-pic-big { width: 120px; height: 120px; }
.part-row:has(.part-pic-big) { grid-template-columns: 120px minmax(0, 1fr); }
.count-row.is-done { background: var(--good-bg); }
.count-row .ph-btn { margin-top: 8px; }
.count-photo { display: block; width: 100%; max-height: 340px; object-fit: contain; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); }
.count-nopic { border-left: 4px solid var(--bad-line); }
.count-name { font-size: 22px; margin: 12px 0 2px; }
.count-how { font-size: 18px; background: var(--warn-bg); color: var(--warn); padding: 10px 12px; border-radius: var(--radius); }
.count-input { font-size: 30px !important; text-align: center; font-weight: 800; }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0 14px; }
.key { font: inherit; font-size: 28px; font-weight: 800; min-height: 64px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--panel); color: var(--ink); cursor: pointer; }
.key:active { background: var(--ink); color: #fff; }
.kv.counter-totals { grid-template-columns: 1fr auto; }
.kv.counter-totals dd { text-align: right; font-variant-numeric: tabular-nums; }
.what-diff { font-size: 15px; font-weight: 700; color: var(--ink-2); margin: 4px 0 6px; }

/* ---------------------------------------------------------------- job notes (APP-09) */
.jn-job { display: block; width: 100%; min-height: 64px; padding: 12px 14px; text-align: left; font: inherit;
  color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--line-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); cursor: pointer; }
.jn-job:hover, .jn-job:focus-visible { border-color: var(--act); }
.jn-job.when-row-today, .jn-job.when-row-tomorrow { border-left-color: var(--good); }
.jn-job.when-row-overdue { border-left-color: var(--bad-line); }
.jn-job-who { display: block; font-size: 20px; font-weight: 800; line-height: 1.2; }
.jn-job-meta { display: block; font-size: 15px; margin: 2px 0 0; }
.jn-job-started { display: block; font-size: 14px; font-weight: 700; color: var(--good); margin-top: 4px; }
.jn-totals { font-size: 20px; font-weight: 800; margin: 4px 0 0; }
a.part-row.jn-pick { color: var(--ink); text-decoration: none; min-height: 88px; }
a.part-row.jn-pick:hover, a.part-row.jn-pick:focus-visible { border-color: var(--act); }
.jn-pick .part-name, .jn-pick .muted, .jn-pick .what-diff { display: block; }
.jn-qty { font-size: 18px; font-weight: 800; margin: 2px 0; }
.jn-line-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.jn-line.is-typed { border-left: 4px solid var(--warn-line); }
.jn-ico { width: 40px; height: 40px; }
.jn-cant summary { font-weight: 700; cursor: pointer; }
.jn-hours-btn { margin: 4px 0 8px; }
.jn-off { margin: 8px 0 16px; }
.jn-off summary { font-weight: 700; cursor: pointer; }
.jn-people { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.jn-people .ph-choice { justify-content: center; padding: 8px; }
.jn-key-wide { grid-column: 1 / -1; }

/* Lens (APP-11): the product card, the choices, the count with + and -. */
.lens-card { margin: 4px 0 12px; }
.lens-card .count-photo { max-height: 200px; }
.lens-card .count-name { margin-top: 10px; }
.lens-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 8px 0; font-size: 17px; }
.lens-facts dt { color: var(--muted); }
.lens-facts dd { margin: 0; font-weight: 700; }
.lens-weak { border-left: 4px solid var(--warn); background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.lens-weak p { margin: 4px 0; }
.lens-section { margin: 12px 0; }
.lens-section h2 { margin-top: 0; }
.lens-do { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.lens-do .is-coming { opacity: .55; pointer-events: none; text-align: center; }
.lens-do form { display: contents; }
.lens-count { display: grid; grid-template-columns: 76px minmax(0, 1fr) 76px; gap: 8px; align-items: stretch; margin: 8px 0; }
.lens-count .key { min-height: 76px; font-size: 38px; }
.lens-count .count-input { width: 100%; min-height: 76px; box-sizing: border-box; }
.lens-said { font-size: 15px; }
.lens-others .ph-btn { margin-top: 6px; }

/* ---------------------------------------------------------------- clock in / out (templates/hours/clock_in.html) */
.ci-status { font-size: 20px; font-weight: 700; margin: 6px 0 16px; }
.ci-btn { min-height: 96px; font-size: 28px; font-weight: 800; width: 100%; margin: 6px 0 10px; }
.ci-btn[disabled] { opacity: .6; }
.ci-where { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.ci-today { list-style: none; padding: 0; margin: 0; }
.ci-today li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.ci-today .pill.warn { margin-left: 4px; }
.ci-now { color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- load trailer, pick an order (docs/LOADING_2026-10-29.md) */
.ld-line { grid-template-columns: 72px minmax(0, 1fr); align-items: start; }
.ld-line.is-checked { border-left: 6px solid var(--good); background: var(--good-bg); }
.ld-line.is-short { border-left-color: var(--warn-line); }
.ld-tick-form { margin: 0; }
.ld-tick { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; padding: 0;
  border: 3px solid var(--line-strong); border-radius: var(--radius); background: #fff; color: transparent; cursor: pointer; }
.ld-tick .ico { width: 44px; height: 44px; }
.ld-tick[aria-pressed="true"], .is-checked span.ld-tick { background: var(--good); border-color: var(--good); color: #fff; }
.ld-tick:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ld-body { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.ld-pic { width: 56px; height: 56px; object-fit: contain; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); flex: none; }
.ld-scan-row { display: flex; gap: 8px; margin: 4px 0 8px; }
.ld-scan { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 56px; }
.ld-camera video { width: 100%; max-height: 50vh; background: #000; border-radius: var(--radius); }
.ld-scan-msg { font-weight: 700; }
button.ld-pick { width: 100%; text-align: left; font: inherit; cursor: pointer; }

/* ---------------------------------------------------------------- camera (static/js/camera.js): opens the camera straight away */
.cam-take { margin-bottom: 12px; }
.cam-msg { font-weight: 700; margin: -4px 0 12px; }
.cam-open, .cam-open body { overflow: hidden; }
.cam-view { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: #000; color: #fff; }
.cam-video { flex: 1; min-height: 0; width: 100%; object-fit: contain; background: #000; }
.cam-bar { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
.cam-hint { margin: 0 0 10px; text-align: center; font-weight: 700; font-size: 17px; }
.cam-buttons { display: flex; gap: 12px; }
.cam-buttons .ph-btn { flex: 1; }

/* ================================================================ photos of the job (APP-12)
   Was static/css/jobphotos.css: the photos screen, and the photos on the job page and in Job notes. */
.jp-seen { display: block; }
.jp-seen-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.jp-seen-photos a { display: block; color: var(--ink); text-decoration: none; font-size: 13px; text-align: center; }
.jp-mini { display: block; width: 120px; height: 90px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); }
.jp-warn { margin: 6px 0; padding: 6px 8px; border-left: 4px solid var(--warn-line); background: var(--warn-bg); font-weight: 700; }
.jp-form { margin-top: 8px; }
.jp-qty { width: 100%; max-width: 220px; font-size: 22px; padding: 8px 10px; }
.jp-ask { font-weight: 700; margin: 8px 0 4px; }
.jp-choice { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 8px 0;
  border-top: 1px solid var(--line); }
.jp-choice .part-pic { width: 72px; height: 72px; }
.jp-choice .part-name, .jp-choice .muted, .jp-choice .what-diff { display: block; }
.jp-add { display: block; width: 100%; margin-top: 6px; min-height: 44px; }
.jp-drop { margin-top: 10px; min-height: 44px; }
.jp-other summary { font-weight: 700; cursor: pointer; padding: 8px 0; }
.jp-find { margin-top: 8px; }
.jp-status { font-weight: 700; min-height: 1em; margin: 0; }
.jp-never { border-left: 4px solid var(--warn-line); }
.jp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 8px 0; }
.jp-thumb-link { display: block; color: var(--ink); text-decoration: none; font-size: 13px; }
.jp-thumb { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel); }

/* kit build time */
.board-lines li > .board-build { grid-column: 1 / -1; }
.board-lines .board-kit li { display: list-item; padding: 0; border-top: 0; }
.board-clock { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.board-clock-now, .board-clock-type { margin: 0; flex-basis: 100%; }

/* Hours payroll view: a red line on anyone with a missing punch, kept red on paper too. */
tr.payroll-fix td { background: var(--red-tint); color: var(--red-deep); }
@media print {
  tr.payroll-fix td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .messages .msg-error { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .noprint { display: none !important; }      /* the QuickBooks column and the send panel stay off the paper */
}

/* The open-quote bar (sales/open_quotes.py, static/js/quote_bar.js): fixed at the bottom, right of the side
   menu on a desktop, under the open menu on a phone. */
.quote-bar { position: fixed; z-index: 32; left: 0; right: 0; bottom: 0; max-height: 50vh; overflow-y: auto;
  background: var(--panel); color: var(--ink); border-top: 3px solid var(--act);
  box-shadow: 0 -8px 24px -16px rgba(11, 13, 16, .45); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.quote-bar[hidden] { display: none; }
body.has-side .quote-bar { left: var(--side-w); }
@media (max-width: 959px) { body.has-side .quote-bar { left: 0; } }
.quote-bar-head { display: flex; align-items: flex-start; gap: 12px; }
.quote-bar-title { margin: 0; flex: 1; font-weight: 700; }
.quote-bar-hide { flex: none; width: 40px; height: 40px; background: none; border: 1px solid var(--line-strong);
  border-radius: var(--radius); color: var(--ink); font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.quote-bar-hide:hover { background: var(--ink); color: #fff; }
.quote-bar-list { list-style: none; margin: 8px 0 0; padding: 0; }
.quote-bar-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.quote-bar-note { margin: 6px 0 0; font-size: 14px; }
@media print { .quote-bar { display: none !important; } }

/* ===== calm: home + menu ===== */
/* docs/CALM_PAGES_CHECKLIST.md (W3C COGA). Home opens on "Today": at most five lines, most urgent first, each a
   color dot, one sentence with its number and one button (core/home_today.py). red = needs you now, amber =
   waiting on someone, green = all clear: the same three dots everywhere, never decoration. Only the first line's
   button is filled (the next step). The side menu shows each role's most-used lines, then one "More" fold
   (core/nav.py Nav.menu). Color names only, so both looks work. */

/* -- Today */
.today { background: var(--panel); border: 1px solid var(--line); border-top: var(--card-top-w) solid var(--card-top);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 14px 18px 12px; margin: 4px 0 18px; }
.today > h2 { margin: 0 0 4px; }
.today-list { list-style: none; margin: 0; padding: 0; }
.today-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 6px 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line); }
.today-list > .today-row:first-child { border-top: 0; }
.today-row .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--soon); }
.today-row.is-red .dot { background: var(--bad-line); }
.today-row.is-amber .dot { background: var(--warn-line); }
.today-row.is-green .dot { background: var(--good); }
.today-words { font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.today-row.is-green .today-words { color: var(--good); }
.today-go { white-space: nowrap; }
.today-detail > summary { list-style: none; white-space: nowrap; }
.today-detail > summary::-webkit-details-marker { display: none; }
.today-detail[open] { grid-column: 2 / -1; }
.today-detail p { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }
.today-more { border-top: 1px solid var(--line); padding-top: 8px; }
.today-more > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--link); }

/* -- shortcuts: at most six; the rest under "More shortcuts" */
.more-tiles { margin: -12px 0 22px; }
.more-tiles > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--link); padding: 4px 0; }
.more-tiles > .shortcuts { margin: 10px 0 0; }
.more-tiles-what { font-weight: 500; color: var(--muted); }

/* -- the clean-up list: one closed fold at the bottom; each reason list folds under its own line */
.cleanup { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 12px 18px; margin: 8px 0 18px; }
.cleanup > summary { cursor: pointer; }
.cleanup-title { font-weight: 800; font-size: 16px; color: var(--ink); }
.cleanup-what { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.cleanup-list { list-style: none; margin: 10px 0 0; padding: 0; }
.cleanup-list > li { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 4px 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.cleanup-words { flex: 1 1 260px; min-width: 0; }
.cleanup-sub { margin: 16px 0 0; font-size: 15px; }
.cleanup .why { margin-top: 4px; }
.cleanup .why > summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; }
.cleanup .why .flags { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }

/* -- the side menu's "More" fold */
.side-top { margin-bottom: 4px; }
.side-more { margin-top: 6px; border-top: 1px solid var(--side-line); padding-top: 4px; }
.side-more-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 14px 8px 20px;
  background: none; border: 0; cursor: pointer; font: inherit; text-align: left; color: var(--side-text); }
.side-more-btn:hover { background: var(--side-hover); color: var(--side-strong); }
.side-more-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.side-more-title { font-size: 14.5px; font-weight: 700; }
.side-more-what { font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--side-dim); }
.side-more-btn .caret { width: 14px; height: 14px; stroke-width: 2.2; transition: transform .15s ease-out; }
.side-more.is-folded > .side-more-list { display: none; }
.side-more.is-folded .side-more-btn .caret { transform: rotate(-90deg); }
@media (prefers-reduced-motion: reduce) {
  .side-more-btn .caret { transition: none; }
}
@media (max-width: 640px) {
  .today { padding: 12px 14px 10px; }
  .today-row { grid-template-columns: 14px minmax(0, 1fr); }
  .today-go, .today-detail { grid-column: 2; justify-self: start; }
}
@media print {
  .side-more-btn { display: none; }
}
/* ===== calm: sales pages ===== */
/* Calm pages for the quote and order pages, Add a line, and the quote and order lists (docs/CALM_PAGES_CHECKLIST.md,
   2026-11-02). Color names only, so both looks work. */

/* The one status chip in the title row (rules 1, 6): a little bigger than a table pill. */
.calm-chip { font-size: 14px; padding: 3px 10px; vertical-align: middle; margin-left: 6px; }

/* The step bar (rules 1, 10, 16): done steps checked, the next one marked, the rest quiet. */
.calm-steps { margin: 0 0 12px; }
.calm-steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 0; }
.calm-step { display: flex; align-items: center; gap: 6px; padding: 6px 14px 6px 8px; color: var(--muted);
  font-size: 14px; font-weight: 600; }
.calm-step + .calm-step::before { content: ""; width: 18px; height: 2px; background: var(--line-strong); margin-right: 8px; }
.calm-step-mark { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; border: 2px solid var(--line-strong); background: var(--panel); font-size: 13px; font-weight: 800;
  flex: none; }
.calm-step.is-done { color: var(--good); }
.calm-step.is-done .calm-step-mark { border-color: var(--good); background: var(--good-bg); color: var(--good); }
.calm-step.is-now { color: var(--ink); }
.calm-step.is-now .calm-step-words { border-bottom: 3px solid var(--mark); padding-bottom: 1px; }
.calm-step.is-now .calm-step-mark { border-color: var(--act); background: var(--act); color: var(--on-act); }
.calm-step.is-todo .calm-step-mark { color: var(--muted); }

/* "What to do next" sits right under the step bar (rule 2). */
.calm-next { padding: 12px 18px; }
.calm-next h2 { margin: 0; font-size: 17px; }
.calm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 8px; }
.calm-head > h2, .calm-head > h3, .calm-head > p { margin: 0; }
.calm-jump { font-weight: 700; font-size: 14px; }

/* A small "?" that opens its help in place (rule 8); a plain <details>, so keyboard and touch work as is. */
.calm-help { display: inline-block; vertical-align: middle; }
.calm-help > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--muted);
  font-size: 13px; font-weight: 800; line-height: 1; background: var(--panel); }
.calm-help > summary::-webkit-details-marker { display: none; }
.calm-help > summary:hover, .calm-help[open] > summary { border-color: var(--ink-2); color: var(--ink); }
.calm-help > p, .calm-help > div { margin: 6px 0 0; padding: 8px 10px; max-width: 520px; font-size: 14px; font-weight: 400;
  color: var(--ink-2); background: var(--surface-2); border-left: 3px solid var(--line-strong); border-radius: var(--radius); }
.calm-head > .calm-help[open] { flex-basis: 100%; }

/* The detail boxes: only rows with something in them (rule 7), a little tighter. */
.calm-details .panel { padding: 14px 18px; }
.calm-details h2 { font-size: 17px; margin-bottom: 8px; }
.calm-details h3 { margin: 12px 0 6px; font-size: 15px; }
.calm-kv { grid-template-columns: 170px 1fr; gap: 4px 14px; }
.calm-kv:empty { display: none; }
.calm-flags { padding: 10px 16px; font-size: 14px; }
.calm-flags .pill { white-space: normal; }

/* A line just added: lit until the next page (rules 11, 13). */
tr.calm-lit > td { background: var(--act-tint); }
tr.calm-lit > td:first-child { box-shadow: inset 4px 0 0 var(--mark); }

/* A long line description: two lines, then "more" (rule 8). */
.calm-more > summary { list-style: none; cursor: pointer; }
.calm-more > summary::-webkit-details-marker { display: none; }
.calm-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.calm-more[open] .calm-clamp { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
.calm-more-word { display: inline-block; margin-top: 2px; color: var(--link); font-weight: 700; font-size: 13px; text-decoration: underline; }
.calm-more[open] .calm-more-word { display: none; }

/* Quick add, right under the lines (rules 11, 14). */
.calm-quick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: -1px 0 16px; padding: 12px 16px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.calm-quick label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 3px; }
.calm-quick-find { flex: 1 1 280px; min-width: 0; }
.calm-quick-find input { width: 100%; }
.calm-quick-qty input { width: 6em; text-align: right; }
.calm-quick-more { font-size: 14px; align-self: center; }

/* Notes stay open but small. */
.calm-notes textarea { min-height: 54px; }
.calm-notes form.stack .field { margin-bottom: 10px; }

/* A fold with a one-line summary (rule 5): QuickBooks, revisions, the edit log, more filters. */
.calm-fold { margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); }
.calm-fold > summary { cursor: pointer; padding: 12px 16px; list-style-position: inside; }
.calm-fold > summary:hover { background: var(--surface-2); }
.calm-fold-title { font-weight: 700; color: var(--ink); }
.calm-fold[open] > summary { border-bottom: 1px solid var(--line); }
.calm-fold > .panel { margin: 0; border: 0; box-shadow: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.calm-fold > .tablewrap { margin: 0; border: 0; box-shadow: none; }
.calm-fold > .helptext { padding: 0 16px 12px; }

/* The open-quote notice on a record's own pages: in the page, under the title, never over it (rule 12). */
.quote-bar.calm-notice { position: static; z-index: auto; max-height: none; overflow: visible; margin: 0 0 12px;
  border: 1px solid var(--line); border-left: 4px solid var(--warn-line); border-radius: var(--radius-lg);
  box-shadow: none; padding: 10px 14px; }
body.has-side .quote-bar.calm-notice { left: auto; }
.quote-bar.calm-notice .quote-bar-title { font-weight: 600; }
.quote-bar.calm-notice .quote-bar-hide { width: 32px; height: 32px; font-size: 18px; }

/* Add a line: what is already on it, above the form (rule 11). */
.calm-have { padding: 12px 16px; }
.calm-have h2 { font-size: 17px; }
.calm-have h2 .muted { font-size: 14px; font-weight: 600; }
.calm-have-sub { margin-left: auto; }
.calm-have-scroll { max-height: min(30vh, 160px); overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.calm-have-table th { position: sticky; top: 0; }
.calm-have-table th, .calm-have-table td { padding: 5px 10px; font-size: 14px; }

/* The lists: quick filter chips (rules 4, 10). */
.calm-listbar .searchbar { margin-bottom: 10px; }
.calm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.calm-chip-link { display: inline-block; padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: var(--pill-radius);
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; background: var(--panel); }
.calm-chip-link:hover { background: var(--surface-3); color: var(--ink); }
.calm-chip-link[aria-current="true"] { background: var(--act-tint); border-color: var(--act); color: var(--act-ink); }
.calm-filters { margin: 0; border: 0; }
.calm-filters > summary { padding: 4px 0; font-size: 14px; }
.calm-filters[open] > summary { border-bottom: 0; }
.calm-filters > .searchbar { margin: 6px 0; }
.calm-hidden-empty { margin-left: 6px; }

@media (max-width: 640px) {
  .calm-kv { grid-template-columns: 1fr; gap: 0 8px; }
  .calm-kv dd { margin-bottom: 6px; }
  .calm-step { padding: 4px 8px 4px 0; }
  .calm-step + .calm-step::before { width: 10px; margin-right: 6px; }
  .calm-quick-qty input { width: 5em; }
}
@media print {
  .calm-steps, .calm-next, .calm-quick, .calm-help, .calm-chips { display: none !important; }
}
/* Tighter: the next-step box on one row, the open-quote notice small, no second QuickBooks heading under its fold. */
.calm-next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.calm-next > .calm-head { margin: 0; }
.quote-bar.calm-notice .quote-bar-title { font-size: 15px; }
.quote-bar.calm-notice .quote-bar-list { margin-top: 4px; }
.quote-bar.calm-notice .quote-bar-list li { padding: 3px 0; font-size: 14px; }
.calm-fold > .panel > h2:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.calm-lines-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.calm-more-actions { flex-basis: 100%; }
.calm-more-actions > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 2px 0; }
.calm-more-actions[open] > summary { margin-bottom: 8px; }
.calm-quick-done { flex-basis: 100%; margin: 0; font-size: 14px; }
/* After the ADHD review (2026-11-02). Mark shipped in the next-step box, with its one line about no undo. */
.calm-ship label { font-size: 14px; font-weight: 600; }
.calm-ship-note { flex-basis: 100%; margin: 0; }
/* Mark reviewed by Sending when it is not the next step. */
.calm-review { margin: 0 0 8px; }
/* The record's notes: what to do in plain sentences; what came over from inFlow folded. */
.calm-flag-one { margin: 4px 0 0; }
.calm-flags .sales-list { margin: 4px 0 0; }
.calm-flag-more { margin-top: 6px; }
.calm-flag-more > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); }
/* Add a line: Save stays in view at the bottom of the screen while the form runs past it (rule 2). */
.calm-savebar { position: sticky; bottom: 0; z-index: 5; background: var(--bg); padding-bottom: 12px; }
/* A near miss in the product list is a hint, so grey: green means done (rule 6). */
.suggest-note.is-near { color: var(--muted); background: var(--surface-3); }
@media print { .calm-savebar { position: static; } }
/* ===== end calm: sales pages ===== */
