/* The 2026-10 look. Loaded after app.css, and changing only how things look: every rule in app.css
   that places, sizes or hides something is left to do its work.

   Most of it is done by the tokens: app.css draws nearly everything from --leather, --paper, --line
   and the rest, so giving those names new values re-colours the pages without touching them. The
   rules underneath are the shared pieces — buttons, fields, panels, tables, pop-ups, the sign-in
   page — and the handful of places that had a colour written in by hand. */

:root{
  --gh-bg:#F7F3EC; --gh-surface:#FFFFFF; --gh-subtle:#FBF8F3; --gh-hover:#F3EEE5;
  --gh-line:#EAE3D7; --gh-line-strong:#DACFBF;
  --gh-ink:#2A1C12; --gh-ink-2:#5E5045; --gh-ink-3:#93857A;
  /* The gold of the GoldenHide mark. --gh-accent fills (buttons, the chosen tab) and --gh-on-accent
     is what is written on it; --gh-accent-strong is the same gold where it is the writing itself. */
  --gh-accent:#A47428; --gh-accent-strong:#86601F; --gh-accent-soft:#F8F1E4; --gh-accent-ring:rgba(164,116,40,.22);
  --gh-on-accent:#FFFFFF; --gh-gold-text:#94691F; --gh-glow:rgba(217,174,98,.2);
  --gh-ok:#2E7D4F; --gh-warn:#B7791F; --gh-bad:#C2412D;
  --gh-radius:12px;
  --gh-shadow:0 1px 2px rgba(28,25,23,.04),0 2px 8px rgba(28,25,23,.04);
  --gh-shadow-lg:0 16px 40px rgba(28,25,23,.16),0 2px 8px rgba(28,25,23,.06);
  --gh-font:'Lexend',ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;

  /* app.css's own names, pointed at the new values. */
  --leather:var(--gh-accent); --leather-dark:var(--gh-ink); --tan:var(--gh-line-strong); --tan-pale:var(--gh-hover);
  --paper:var(--gh-bg); --panel:var(--gh-surface); --ink:var(--gh-ink); --ink-soft:var(--gh-ink-2);
  --brass:var(--gh-accent); --ok:var(--gh-ok); --warn:var(--gh-warn); --bad:var(--gh-bad);
  --line:var(--gh-line); --radius:var(--gh-radius);
  --paper-2:#F1EEE8; --table-head:#F7F5F1; --table-alt:#FCFBF9; --table-hover:#F5F2EC;
}

/* Dark mode: the same names with night values. It is switched by data-theme="dark" on <html> (the
   sun / moon button; remembered on each PC), and only on screen — a printed sheet is always the
   light one. These are the tokens; every colour app.css wrote in by hand has its night value in
   dark.css, which tools/make_dark_css.py works out from app.css. */
@media screen{
:root[data-theme="dark"]{
  color-scheme:dark;
  --gh-bg:#16110D; --gh-surface:#1E1A16; --gh-subtle:#241D17; --gh-hover:#2D251D;
  --gh-line:#342C25; --gh-line-strong:#4B4137;
  --gh-ink:#F2EDE5; --gh-ink-2:#B9AFA2; --gh-ink-3:#8C8377;
  --gh-accent:#D2A557; --gh-accent-strong:#E3BC76; --gh-accent-soft:#33291A; --gh-accent-ring:rgba(210,165,87,.32);
  --gh-on-accent:#1B1611; --gh-gold-text:#E3BC76; --gh-glow:rgba(217,174,98,.09);
  --gh-ok:#63C08B; --gh-warn:#E3B34F; --gh-bad:#F0776A;
  --gh-shadow:0 1px 2px rgba(0,0,0,.3),0 2px 8px rgba(0,0,0,.22);
  --gh-shadow-lg:0 18px 44px rgba(0,0,0,.55),0 2px 8px rgba(0,0,0,.35);
  --paper-2:#1B1713; --table-head:#262019; --table-alt:#221D18; --table-hover:#2C261F;
}
}

/* ---------- type ---------- */
body{font-family:var(--gh-font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
h1,h2,h3,.statCard .value,.authBrand .mark,.drStoresBox summary,#topbar .brand{font-family:var(--gh-font)}
h1,h2,h3{font-weight:700;letter-spacing:-.018em;color:var(--gh-ink)}
button,input,select,textarea{font-family:var(--gh-font)}
::selection{background:var(--gh-accent-ring)}
*{scrollbar-width:thin;scrollbar-color:#CFC8BC transparent}

/* ---------- buttons ---------- */
button{border-radius:8px;font-weight:600;transition:background-color .12s ease,border-color .12s ease,color .12s ease,box-shadow .12s ease,transform .08s ease}
button.primary{background:var(--gh-accent);color:var(--gh-on-accent);box-shadow:0 1px 2px rgba(110,70,32,.28),inset 0 1px 0 rgba(255,255,255,.12)}
button.primary:hover{background:var(--gh-accent-strong)}
button.ghost{background:var(--gh-surface);color:var(--gh-ink);border:1px solid var(--gh-line-strong);box-shadow:0 1px 1px rgba(28,25,23,.03)}
button.ghost:hover{background:var(--gh-hover);border-color:#C9C2B6}
button.danger{background:var(--gh-surface);color:var(--gh-bad);border:1px solid #E6B5AC}
button.danger:hover{background:#FDF1EF;border-color:var(--gh-bad)}
/* A button with no class of its own (or only "small") is the plain secondary button. :where() keeps
   this as weak as app.css's own `button` rule, so any page that styles its buttons still wins. */
button:where(:not([class]),[class="small"]){background:var(--gh-surface);color:var(--gh-ink);border:1px solid var(--gh-line-strong);box-shadow:0 1px 1px rgba(28,25,23,.03)}
button:where(:not([class]),[class="small"]):hover{background:var(--gh-hover)}
/* A button whose own class sets no colour would fall back to the browser's grey, which is a different
   grey in dark mode; this is the system's own, and weak enough that any rule of a page replaces it. */
:where(button){background-color:var(--gh-hover);color:var(--gh-ink)}
button:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
button:focus-visible{outline:2px solid var(--gh-accent);outline-offset:2px}

/* ---------- fields ---------- */
input,select,textarea{border:1px solid var(--gh-line-strong);border-radius:8px;color:var(--gh-ink)}
input::placeholder,textarea::placeholder{color:var(--gh-ink-3)}
input:focus,select:focus,textarea:focus{border-color:var(--gh-accent)}
/* The soft ring is for forms and tool bars; the boxes inside a sheet keep their own outline. */
.field input:focus,.field select:focus,.field textarea:focus,.lpToolbar input:focus,.lpToolbar select:focus,
.authCard input:focus,.modal>input:focus,.pageHead input:focus,.pageHead select:focus{box-shadow:0 0 0 3px var(--gh-accent-ring)}
input[readonly],input:disabled,select:disabled,textarea:disabled{background:var(--gh-subtle);color:var(--gh-ink-2)}
label{color:var(--gh-ink-2);font-weight:600}
input[type="checkbox"],input[type="radio"]{accent-color:var(--gh-accent)}

/* ---------- page ---------- */
#main{background:var(--gh-bg)}
.pageHead{align-items:center;margin-bottom:22px}
.pageHead h2{font-size:24px;line-height:1.2}
.pageHead p{font-size:13.5px;color:var(--gh-ink-2)}
.panel{border:1px solid var(--gh-line);border-radius:var(--gh-radius);box-shadow:var(--gh-shadow)}
.panel h3{font-size:15.5px;letter-spacing:-.012em}
.joHint,.lpMuted{color:var(--gh-ink-2)}
/* app.css writes these in --tan, which was a tan ink and is now the colour of a border. The small
   capital line on a card is the gold of the theme; the "nothing here" marks are the quiet ink. */
.pbChoiceWho,.msPlanWhat,.clBookNo{color:var(--gh-gold-text);font-weight:600}
/* The lines of a card sit together at its top, however tall the tallest card in the row makes it. */
.pbChoice{align-content:start}
.bsNil,.orGrid.erTable .erNil,.orXl.orTheme td.orSame,.orXl.orTheme td.orSame input{color:var(--gh-ink-3)}
.orXl.orTheme tr.orNew td input::placeholder{color:var(--gh-ink-3)}
.empty{color:var(--gh-ink-3)}

.statCard{border:1px solid var(--gh-line);border-radius:var(--gh-radius);box-shadow:var(--gh-shadow);padding:16px 18px 18px}
.statCard .label{font-size:11px;letter-spacing:.06em;color:var(--gh-ink-3)}
.statCard .value{font-size:28px;font-weight:700;letter-spacing:-.025em;line-height:1.15;color:var(--gh-ink);font-variant-numeric:tabular-nums}

/* ---------- tables ---------- */
th{font-weight:600;letter-spacing:.05em;color:var(--gh-ink-2);border-bottom:1px solid var(--gh-line)}
table thead th{color:var(--gh-ink-2)}
.pill{font-weight:600;letter-spacing:.01em}
.pill.instock,.pill.active{background:#E7F4EC;color:#216A40}
.pill.low,.pill.pending{background:#FDF3DC;color:#8A5A00}
.pill.out{background:#FCEBE8;color:#A5301F}
.pill.inactive{background:#EFEDE8;color:var(--gh-ink-2)}

/* ---------- job order board ---------- */
.col{background:#EFEDE8;border-radius:12px}
.joCard{border:1px solid var(--gh-line);border-radius:10px;box-shadow:0 1px 2px rgba(28,25,23,.05)}
.joCard:hover{border-color:var(--gh-accent);box-shadow:0 3px 10px rgba(28,25,23,.08)}

/* ---------- pop-ups ---------- */
.modalOverlay{background:rgba(28,25,23,.42);backdrop-filter:blur(3px)}
.modal{border-radius:16px;border:1px solid var(--gh-line);box-shadow:var(--gh-shadow-lg)}
.modal h3{font-size:18px}
.modalClose{border-radius:8px}
.modalClose:hover{background:var(--gh-hover);color:var(--gh-ink)}
.toast{background:var(--gh-ink);border-radius:10px;font-weight:500;box-shadow:var(--gh-shadow-lg)}
.notifPanel{border:1px solid var(--gh-line);border-radius:12px;box-shadow:var(--gh-shadow-lg);padding:8px}
.notifItem{border-bottom:1px solid var(--gh-line)}
#stockAlertPopup{border:1px solid var(--gh-line);border-top:1px solid var(--gh-line);border-left:4px solid #E0A91B;border-radius:12px;box-shadow:var(--gh-shadow-lg)}
#taskPopup{border-radius:12px;box-shadow:var(--gh-shadow-lg)}

/* ---------- sign-in ---------- */
/* While the scripts load (index.html sets ghBoot), so the old card never flashes before the new page. */
html.ghBoot #loginScreen>.authCard{visibility:hidden}
#loginScreen{background:
  radial-gradient(900px 520px at 12% -8%,#F3E4CF 0%,transparent 62%),
  radial-gradient(820px 520px at 108% 108%,#EFE2CF 0%,transparent 58%),
  var(--gh-bg)}
.authCard{background:var(--gh-surface);width:400px;border:1px solid var(--gh-line);border-radius:18px;padding:36px 34px 30px;box-shadow:var(--gh-shadow-lg)}
.authBrand{align-items:center;gap:12px;margin-bottom:4px}
.authBrand .mark{width:40px;height:40px;border-radius:11px;background:linear-gradient(145deg,var(--gh-accent),var(--gh-accent-strong));color:#fff;font-size:15px;letter-spacing:.02em;box-shadow:0 2px 6px rgba(110,70,32,.3)}
.authBrand h1{font-size:21px}
.authSub{margin:0 0 26px 52px;color:var(--gh-ink-2)}
.authTabs{background:var(--gh-hover);border-radius:10px;padding:4px}
/* Accounts are made in Manage Users, so "Create Account" is hidden — and a row of one tab is not a choice. */
.authTabs:has(#tabSignup[style*="none"]){display:none}
.authTab{border-radius:7px;color:var(--gh-ink-2)}
.authTab.active{color:var(--gh-ink);box-shadow:0 1px 2px rgba(28,25,23,.12)}
.authCard .field input{height:42px}
.authCard button.primary{height:44px;font-size:14.5px;margin-top:4px}
.authMsg{border-radius:10px}
.authMsg.err{background:#FCEBE8;color:#A5301F}
.authMsg.ok{background:#E7F4EC;color:#216A40}
.seedNote{color:var(--gh-ink-3);border-top:1px solid var(--gh-line)}

@media(max-width:900px){
 .pageHead{align-items:flex-start}
 .pageHead h2{font-size:21px}
 /* The open menu drawer is not covered by the stock and task pop-ups. */
 body.navOpen #stockAlertPopup,body.navOpen #taskPopup{display:none}
}
