/* Brand themes for the in-app look: Navy (default, no attribute), Black and White, chosen per person in the
   account menu. The page's <html data-theme> is set by the Worker from the user's saved choice (src/index.ts).
   Only in-app pages are themed: client pages, reports, briefs, PDFs and emails keep their own fixed look. */

html[data-theme="black"] {
  --navy:#000000; --navy-2:#0b0b0b; --bg-rgb:0,0,0; --ink-rgb:255,255,255;
  --muted:#a3a3a3; --on-gold:#000000; --line:rgba(255,255,255,.1);
  color-scheme:dark;
}
/* True black, no warm or blue cast: flat black page and header, neutral grey panels. */
html[data-theme="black"], html[data-theme="black"] body { background:#000; }
html[data-theme="black"] body { background:linear-gradient(160deg,#000 0%,#0b0b0b 100%); }
html[data-theme="black"] header { background:#000; }

html[data-theme="white"] {
  --navy:#ffffff; --navy-2:#f4f1ea; --bg-rgb:255,255,255; --ink-rgb:12,34,56;
  --muted:#556578; --on-gold:#0c2238; --line:rgba(12,34,56,.12); --error:#c62d20;
  color-scheme:light;
}
html[data-theme="white"], html[data-theme="white"] body { background:#faf8f4; }
html[data-theme="white"] body { background:linear-gradient(160deg,#ffffff 0%,#f4f1ea 100%); }
/* The white logo would vanish: use the navy one. */
html[data-theme="white"] header img[src$="logo-vantier-white.png"], html[data-theme="white"] img.logo[src$="logo-vantier-white.png"] { content:url(/assets/img/logo-vantier.png); }
/* Light panels need a touch more edge and lift than on navy. */
html[data-theme="white"] header { background:#fff; border-bottom-color:rgba(183,137,71,.45); box-shadow:0 1px 0 rgba(12,34,56,.04); }
html[data-theme="white"] input, html[data-theme="white"] select, html[data-theme="white"] textarea { background-color:#fff; border-color:rgba(12,34,56,.22); }
html[data-theme="white"] body::after { opacity:.08; }
html[data-theme="white"] .btn.ghost, html[data-theme="white"] .signout { color:var(--c-gold); border-color:rgba(183,137,71,.75); }

/* Quick theme switch in the header (nav.js): three swatches, one click. */
.vt-qtheme { display:flex; align-items:center; gap:6px; padding:5px 8px; border:1px solid rgba(183,137,71,.4); border-radius:999px; }
.vt-qtheme button { width:18px; height:18px; padding:0; border-radius:50%; border:1px solid rgba(183,137,71,.7); cursor:pointer; }
.vt-qtheme button[data-t="navy"] { background:linear-gradient(160deg,#0c2238,#173a5e); }
.vt-qtheme button[data-t="black"] { background:#000; }
.vt-qtheme button[data-t="white"] { background:#fff; }
.vt-qtheme button.on { box-shadow:0 0 0 2px var(--navy,#0c2238), 0 0 0 3.5px #b78947; }
.vt-qtheme button:focus-visible { outline:2px solid #b78947; outline-offset:2px; }
@media (max-width:700px){ .vt-qtheme { display:none; } } /* phones: in the account menu instead */

/* Phones: theme row at the top of the ☰ menu (nav.js). */
.vt-mtheme { display:none; }
@media (max-width:700px){
  header.vt-open nav .vt-mtheme { display:flex; align-items:center; gap:8px; padding:6px 4px 12px; margin-bottom:6px; border-bottom:1px solid rgba(var(--ink-rgb,255,255,255),.1); }
  .vt-mtheme span { font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin-right:auto; }
  .vt-mtheme button { display:flex; align-items:center; gap:7px; min-height:44px; padding:0 12px; font:inherit; font-size:14px; color:var(--c-ffffff,#fff);
    background:none; border:1px solid rgba(var(--ink-rgb,255,255,255),.16); border-radius:10px; cursor:pointer; }
  .vt-mtheme button.on { border-color:#b78947; background:rgba(183,137,71,.15); }
  .vt-mtheme i { width:18px; height:18px; border-radius:50%; border:1.5px solid #b78947; }
  .vt-mtheme [data-t="navy"] i { background:linear-gradient(160deg,#0c2238,#173a5e); }
  .vt-mtheme [data-t="black"] i { background:#000; }
  .vt-mtheme [data-t="white"] i { background:#fff; }
}
/* iPhone app on White: until the app is reopened the status bar text is still white, so keep a navy strip behind it.
   Once reopened the bar is a normal one (no space under the notch) and the strip has zero height. */
@media (display-mode: standalone) {
  html[data-theme="white"] header { background:linear-gradient(#0c2238 0 env(safe-area-inset-top), #fff 0); }
}

/* Theme picker in the account menu (nav.js). */
.vt-themes { display:flex; gap:6px; padding:4px 10px 8px; }
.vt-themes button { flex:1; display:flex !important; flex-direction:column; align-items:center; gap:5px; padding:8px 4px !important; border:1px solid rgba(var(--ink-rgb,255,255,255),.14) !important;
  border-radius:10px !important; font-size:11.5px !important; text-align:center !important; }
.vt-themes button.on { border-color:#b78947 !important; background:rgba(183,137,71,.14) !important; }
.vt-themes i { display:block; width:26px; height:26px; border-radius:50%; border:2px solid #b78947; }
.vt-themes [data-t="navy"] i { background:linear-gradient(160deg,#0c2238,#173a5e); }
.vt-themes [data-t="black"] i { background:#000; }
.vt-themes [data-t="white"] i { background:linear-gradient(160deg,#fff,#efe9dd); }
.vt-tlabel { padding:6px 10px 0; font-size:11px !important; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }

/* ---- generated: start ---- */
/* Made by scripts/themeify.py from the colours used in the pages. Do not edit by hand: re-run the script. */
html[data-theme="black"] {
  --c-7f93ab:#939597;
  --c-9cc5ff:#cacdd1;
  --c-9fb0c3:#b0b1b2;
  --c-9fb2c8:#b2b3b5;
  --c-a9d1f5:#cccfd2;
  --c-c3d0de:#cfd0d2;
  --c-c9d6e3:#d5d6d7;
  --c-cfd9e4:#d9d9da;
  --c-d5dee8:#dededf;
  --c-dfe7f0:#e7e7e8;
  --c-e6edf5:#ededee;
  --b-0a1c2e:#111111;
  --b-0a1d30:#121212;
  --b-0a1d31:#121212;
  --b-0c2238:#151515;
  --b-0f2742:#191919;
  --b-0f2a45:#1a1a1a;
  --b-10283f:#181818;
  --b-10294a:#1c1c1c;
  --b-102b46:#1b1b1b;
  --b-13304d:#1e1e1e;
  --b-173a5e:#242424;
  --b-1f3d5f:#272727;
}
html[data-theme="white"] {
  --c-6fd3a3:#24764e;
  --c-7f93ab:#4d6b89;
  --c-7fdcb0:#20744c;
  --c-7fe0b2:#1d764c;
  --c-8fd9b0:#28744a;
  --c-8fe0b8:#20744a;
  --c-9cc5ff:#005ee3;
  --c-9fb0c3:#4d6b89;
  --c-9fb2c8:#4e6c8a;
  --c-a9d1f5:#156bb8;
  --c-a9e6c8:#22744b;
  --c-b78947:#846233;
  --c-b9ecb5:#26791f;
  --c-c3d0de:#3d546c;
  --c-c99c5b:#87622d;
  --c-c9d6e3:#395066;
  --c-cfd9e4:#374d62;
  --c-d5dee8:#34495d;
  --c-dfe7f0:#2f4153;
  --c-e0675a:#ad463b;
  --c-e07a6a:#a84b3c;
  --c-e07a7a:#b14343;
  --c-e0a85c:#8d5d1b;
  --c-e0b56d:#88601d;
  --c-e0c08c:#866124;
  --c-e6aa3c:#8c6112;
  --c-e6d3b3:#83622b;
  --c-e6edf5:#2b3c4d;
  --c-e8c891:#875f1c;
  --c-e9c58a:#885e1a;
  --c-f0c36a:#8a610e;
  --c-f0d29c:#885f15;
  --c-f2cf7c:#85620d;
  --c-f3c56f:#8a5e0c;
  --c-f3dcb4:#885e16;
  --c-ff8a7a:#c1331f;
  --c-ff8a80:#c62d20;
  --c-ff9b8f:#c1311f;
  --c-ff9c8f:#c1321f;
  --c-ff9d92:#c43020;
  --c-ffaaa2:#c42e20;
  --c-ffb4a8:#c1361f;
  --c-ffb4ab:#c33120;
  --c-ffb86b:#9e5200;
  --c-ffc48a:#a35100;
  --c-ffc966:#8f5c00;
  --c-ffcf8a:#945700;
  --c-ffffff:#0c2238;
  --b-0a1c2e:#faf9f6;
  --b-0a1d30:#faf8f6;
  --b-0a1d31:#faf8f5;
  --b-0c2238:#f9f7f4;
  --b-0f2742:#f8f6f2;
  --b-0f2a45:#f8f6f1;
  --b-10283f:#f8f6f2;
  --b-10294a:#f7f5f0;
  --b-102b46:#f7f5f1;
  --b-13304d:#f7f4ef;
  --b-173a5e:#f5f2ec;
  --b-1f3d5f:#f4f1eb;
  --b-3a2a12:#f6ebdb;
  --c-gold:#846233;
  --c-gold2:#87622d;
}
/* ---- generated: end ---- */

/* After the generated block so it wins: the amber warning strip reads brown on black, so it goes neutral there. */
html[data-theme="black"] { --b-3a2a12:#141414; }
