/* 29 Nov 2026 (Douglas: "I want the old version" of the sign-in page): the new sign-in card / teal panel rules below are scoped with [data-d2-auth],
   an attribute nothing sets, so the sign-in page looks as it always did. Set data-d2-auth on <html> to bring the new sign-in back. */
/* ============================================================
   Relay Design 2.0: the liquid kit (v2 feature 16, decided by Douglas 23–24 Nov 2026).
   Every rule here is switched OFF unless <html data-design="2"> (set by design2.js), so shops keep
   today's look until a screen is moved and the switch is on for them.
   Light and dark follow the existing Appearance setting (look.js: data-theme="dark", --accent).
   Motion: CSS only (transform, opacity, height), no blur, no WebGL. Off when data-motion="off"
   (Appearance) or the device asks for reduced motion.
   Mockup this is built from: https://claude.ai/artifact/5Qzc3nEGK3qMNQ5EJRkhsZ
   ============================================================ */

/* The title font, for pages that do not load style.css (approve, track, review). The browser only downloads it
   when something uses it, and only rules behind the switch use 'Bricolage'. */
@font-face{ font-family:'Bricolage'; font-weight:800; font-display:swap; src:url('bricolage-grotesque-latin-800-normal.woff2') format('woff2'); }

/* ---------- 1. Design settings (tokens) ---------- */
html[data-design="2"]{
  --d-ground:#E4EEF0; --d-panel:#F6F9FA; --d-surface:#FFFFFF; --d-field:#F1F6F7;
  --d-ink:#0E2A31; --d-soft:#4A6168; --d-line:#DCE6E8;
  --d-accent:var(--accent, #0D5C6E); --d-accent-2:var(--accent-2, #137A91); --d-on-accent:#FFFFFF; --d-accent-text:var(--accent, #0D5C6E);
  --d-tint:var(--accent-soft, rgba(13,92,110,.13)); --d-glow:rgba(13,92,110,.22);
  --d-liquid:linear-gradient(180deg, #2B9AAE 0%, var(--accent, #0D5C6E) 100%);
  --d-liquid-x:linear-gradient(90deg, #2B9AAE 0%, var(--accent, #0D5C6E) 100%);
  --d-liquid-soft:linear-gradient(180deg, rgba(43,154,174,.13) 0%, rgba(13,92,110,.20) 100%);
  --d-pipe-bg:#DCE7EA;
  --d-drop-glass:radial-gradient(circle at 35% 25%, #FFFFFF 0%, #CFE8ED 45%, #9FD0DA 100%);
  --d-up-bg:#DDF3E8; --d-up:#0A6B47; --d-down-bg:#FBE3DC; --d-down:#9C2A14; --d-warn-bg:#FFF1D6; --d-warn:#7A4A00;
  --d-r-sm:10px; --d-r-md:14px; --d-r-lg:18px; --d-r-xl:24px;
  --d-shadow:0 20px 40px rgba(6,30,36,.07), 0 1px 3px rgba(6,30,36,.04);
  --d-shadow-hover:0 10px 24px rgba(8,40,48,.12);
  --d-font-title:'Bricolage', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --d-font:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --d-fast:.18s; --d-fill:.7s;
}
html[data-design="2"][data-theme="dark"]{
  --d-ground:#061418; --d-panel:#0C1D22; --d-surface:#12282E; --d-field:#18323A;
  --d-ink:#E6F0F2; --d-soft:#9BB3B9; --d-line:#24434B;
  --d-accent:#3FA9BE; --d-accent-2:#57C1D4; --d-on-accent:#04191E; --d-accent-text:#6CC6D8;
  --d-tint:rgba(63,169,190,.20); --d-glow:rgba(63,169,190,.28);
  --d-liquid:linear-gradient(180deg, #57C1D4 0%, #1E8296 100%);
  --d-liquid-x:linear-gradient(90deg, #57C1D4 0%, #1E8296 100%);
  --d-liquid-soft:linear-gradient(180deg, rgba(87,193,212,.12) 0%, rgba(30,130,150,.24) 100%);
  --d-pipe-bg:#1E3A41;
  --d-drop-glass:radial-gradient(circle at 35% 25%, #DFF4F8 0%, #4E9BAA 50%, #1E5A66 100%);
  --d-up-bg:#123D2E; --d-up:#6FDDAF; --d-down-bg:#45201A; --d-down:#F7A08B; --d-warn-bg:#3A2A0A; --d-warn:#F7C977;
  --d-shadow:0 20px 40px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.3);
  --d-shadow-hover:0 10px 24px rgba(0,0,0,.4);
}

/* ---------- 2. Building blocks (class names start with d2-) ---------- */
html[data-design="2"] .d2-title{ font-family:var(--d-font-title); font-weight:800; letter-spacing:-.015em; color:var(--d-ink); }
html[data-design="2"] .d2-card{ background:var(--d-surface); border:1px solid var(--d-line); border-radius:var(--d-r-lg); box-shadow:var(--d-shadow); color:var(--d-ink); }
html[data-design="2"] .d2-lift{ transition:transform var(--d-fast) ease, box-shadow var(--d-fast) ease; }
html[data-design="2"] .d2-lift:hover{ transform:translateY(-3px); box-shadow:var(--d-shadow-hover); }

html[data-design="2"] .d2-btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:0 18px; border-radius:var(--d-r-md);
  border:0; background:var(--d-accent); color:var(--d-on-accent); font:700 15px/1 var(--d-font); cursor:pointer; position:relative; overflow:hidden; isolation:isolate; }
html[data-design="2"] .d2-btn > *{ position:relative; z-index:1; }
html[data-design="2"] .d2-btn:hover{ background:var(--d-accent-2); }
html[data-design="2"] .d2-btn:disabled, html[data-design="2"] .d2-btn[aria-disabled="true"]{ opacity:.6; cursor:not-allowed; }
html[data-design="2"] .d2-btn.ghost{ background:var(--d-surface); color:var(--d-ink); border:1px solid var(--d-line); }
/* a button that is working fills with liquid (add .d2-busy) */
html[data-design="2"] .d2-btn::after{ content:""; position:absolute; left:0; right:0; bottom:0; height:0; background:rgba(255,255,255,.26); z-index:0; }
html[data-design="2"] .d2-btn.d2-busy::after{ animation:d2Rise 1.2s ease-out forwards; }

html[data-design="2"] .d2-input{ width:100%; box-sizing:border-box; min-height:46px; padding:0 14px; border-radius:var(--d-r-md); border:1.5px solid var(--d-line);
  background:var(--d-field); color:var(--d-ink); font:500 15px var(--d-font); transition:border-color var(--d-fast), box-shadow var(--d-fast); }
html[data-design="2"] .d2-input:focus{ outline:0; border-color:var(--d-accent-text); box-shadow:0 0 0 4px var(--d-glow); background:var(--d-surface); }

html[data-design="2"] .d2-chip{ display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:999px; font:700 12px var(--d-font); background:var(--d-tint); color:var(--d-accent-text); }
html[data-design="2"] .d2-chip.up{ background:var(--d-up-bg); color:var(--d-up); }
html[data-design="2"] .d2-chip.down{ background:var(--d-down-bg); color:var(--d-down); }
html[data-design="2"] .d2-chip.warn{ background:var(--d-warn-bg); color:var(--d-warn); }

/* ---------- 3. Liquid ---------- */
/* A level: a box that fills to --level (0–100%). Put content in .d2-level-c so it sits above the liquid.
   Add .still for long lists (no wave, no bubbles). Always show the number as text too. */
html[data-design="2"] .d2-level{ position:relative; overflow:hidden; isolation:isolate; }
html[data-design="2"] .d2-level > .d2-level-c{ position:relative; z-index:1; }
html[data-design="2"] .d2-level-fill{ position:absolute; left:0; right:0; bottom:0; z-index:0; height:var(--level, 0%); background:var(--d-liquid-soft);
  transition:height var(--d-fill) cubic-bezier(.3,1.25,.5,1); pointer-events:none; }
html[data-design="2"] .d2-level-fill.strong{ background:var(--d-liquid); }
html[data-design="2"] .d2-level-fill::before{ content:""; position:absolute; left:-30%; top:-6px; width:160%; height:12px; border-radius:50%; background:inherit; animation:d2Wave 2.6s ease-in-out infinite alternate; }
html[data-design="2"] .d2-level.still .d2-level-fill::before{ animation:none; }
html[data-design="2"] .d2-bub{ position:absolute; bottom:6px; width:5px; height:5px; border-radius:50%; background:rgba(255,255,255,.65); opacity:0; animation:d2Bub 2.2s ease-in infinite; }
html[data-design="2"] .d2-bub:nth-child(2){ left:55%; width:4px; height:4px; animation-delay:.7s; }
html[data-design="2"] .d2-bub:nth-child(3){ left:78%; width:3px; height:3px; animation-delay:1.3s; }
html[data-design="2"] .d2-bub:nth-child(1){ left:22%; }
html[data-design="2"] .d2-level.still .d2-bub{ display:none; }

/* A pipe: a thin progress line that fills to --level, with bubbles moving along it. */
html[data-design="2"] .d2-pipe{ position:relative; height:8px; border-radius:999px; background:var(--d-pipe-bg); overflow:hidden; }
html[data-design="2"] .d2-pipe > i{ display:block; height:100%; width:var(--level, 0%); border-radius:999px;
  background-image:radial-gradient(circle, rgba(255,255,255,.65) 1.4px, transparent 2px), radial-gradient(circle, rgba(255,255,255,.45) 1px, transparent 1.5px), var(--d-liquid-x);
  background-size:28px 8px, 18px 8px, 100% 100%; background-repeat:repeat-x, repeat-x, no-repeat;
  transition:width .6s cubic-bezier(.4,0,.2,1); animation:d2Pipe 1.6s linear infinite; }
html[data-design="2"] .d2-pipe.still > i{ animation:none; }

/* Code boxes (sign-in codes): ONE real <input> sits over the boxes, so autofill, paste and screen readers
   work as they always did; the boxes only draw what is typed (design2.js: relayCodeBoxes). */
html[data-design="2"] .d2-code{ position:relative; display:flex; justify-content:center; gap:10px; padding:6px 0; }
html[data-design="2"] .d2-code-line{ position:absolute; left:28px; right:28px; top:50%; height:6px; margin-top:-3px; border-radius:999px; background:var(--d-pipe-bg); overflow:hidden; z-index:0; }
html[data-design="2"] .d2-code-line > i{ display:block; height:100%; width:var(--level, 0%); background:var(--d-liquid-x); border-radius:999px; transition:width .38s ease; }
html[data-design="2"] .d2-code-box{ position:relative; z-index:1; width:48px; height:60px; border-radius:var(--d-r-md); background:var(--d-surface); border:2px solid var(--d-line);
  box-shadow:0 4px 6px rgba(0,0,0,.03); overflow:hidden; display:flex; align-items:center; justify-content:center;
  transition:border-color var(--d-fast) ease, box-shadow var(--d-fast) ease, transform .25s ease, opacity .25s ease; }
html[data-design="2"] .d2-code-box b{ position:relative; z-index:2; font:800 26px var(--d-font); color:var(--d-ink); }
html[data-design="2"] .d2-code-box .d2-level-fill{ height:0; background:var(--d-liquid); transition:height .38s cubic-bezier(.3,1.4,.5,1); }
html[data-design="2"] .d2-code-box:not(.filled) .d2-level-fill::before{ display:none; }   /* an empty box shows no wave */
html[data-design="2"] .d2-code-box.filled{ border-color:transparent; }
html[data-design="2"] .d2-code-box.filled .d2-level-fill{ height:80%; }
html[data-design="2"] .d2-code-box.filled b{ color:#FFFFFF; }
html[data-design="2"] .d2-code-box.active{ border-color:var(--d-accent-text); box-shadow:0 0 0 4px var(--d-glow); }
html[data-design="2"] .d2-code.bad .d2-code-box{ border-color:var(--d-down); }
html[data-design="2"] .d2-code.bad{ animation:d2Shake .36s ease; }
html[data-design="2"] .d2-code.joining .d2-code-box{ transform:scale(.35); opacity:0; }
html[data-design="2"] .d2-code-line{ transition:opacity .25s ease; }
html[data-design="2"] .d2-code.joining .d2-code-line{ opacity:0; }
html[data-design="2"] .d2-code-input{ position:absolute; inset:0; z-index:3; width:100%; height:100%; opacity:0; border:0; padding:0; margin:0;
  font-size:16px; /* 16px stops iPhone zooming in */ color:transparent; background:transparent; caret-color:transparent; cursor:text; }

/* The drop: the one "done" moment (code accepted, invoice made, payment recorded, job finished). */
html[data-design="2"] .d2-drop{ position:relative; width:72px; height:72px; border-radius:50%; overflow:hidden; background:var(--d-drop-glass);
  box-shadow:0 12px 28px var(--d-glow), inset 0 2px 6px rgba(255,255,255,.5); animation:d2Drop .55s cubic-bezier(.3,1.5,.5,1) both; flex:none; }
html[data-design="2"] .d2-drop::before{ content:""; position:absolute; left:0; right:0; bottom:0; height:80%; background:var(--d-liquid); border-radius:0 0 50% 50% / 0 0 40% 40%; }
html[data-design="2"] .d2-drop::after{ content:""; position:absolute; left:18%; top:9%; width:40%; height:22%; border-radius:50%; background:linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,0)); }
html[data-design="2"] .d2-drop svg{ position:absolute; z-index:1; left:50%; top:54%; width:46%; height:46%; transform:translate(-50%,-50%); animation:d2Tick .35s .2s cubic-bezier(.3,1.6,.5,1) both; }
html[data-design="2"] .d2-drop.small{ width:48px; height:48px; }
html[data-design="2"] .d2-done{ display:flex; flex-direction:column; align-items:center; gap:10px; padding:8px 0; text-align:center; }
html[data-design="2"] .d2-done-text{ font:800 15px var(--d-font); color:var(--d-up); }

/* ---------- 4. Sign-in in the new style ---------- */
html[data-design="2"][data-d2-auth] #authView{ background:var(--d-ground); color:var(--d-ink); font-family:var(--d-font); }
html[data-design="2"][data-d2-auth] #authView .auth-side .auth-card{ background:var(--d-surface); border:1px solid var(--d-line); border-radius:var(--d-r-xl); box-shadow:var(--d-shadow); }
html[data-design="2"][data-d2-auth] #authView .auth-title{ font-family:var(--d-font-title); font-weight:800; letter-spacing:-.015em; color:var(--d-ink); }
html[data-design="2"][data-d2-auth] #authView .auth-sub, html[data-design="2"][data-d2-auth] #authView .auth-note{ color:var(--d-soft); }
html[data-design="2"][data-d2-auth] #authView .field label{ color:var(--d-soft); font-weight:600; }
html[data-design="2"][data-d2-auth] #authView .field input, html[data-design="2"][data-d2-auth] #authView .field select{ border-radius:var(--d-r-md); border:1.5px solid var(--d-line); background:var(--d-field); color:var(--d-ink); font-size:16px; }
html[data-design="2"][data-d2-auth] #authView .field input:focus, html[data-design="2"][data-d2-auth] #authView .field select:focus{ outline:0; border-color:var(--d-accent-text); box-shadow:0 0 0 4px var(--d-glow); background:var(--d-surface); }
html[data-design="2"][data-d2-auth] #authView .auth-submit{ position:relative; overflow:hidden; isolation:isolate; min-height:50px; border-radius:var(--d-r-md) !important; background:var(--d-accent) !important; color:var(--d-on-accent); font-size:16px; font-weight:800; }
html[data-design="2"][data-d2-auth] #authView .auth-submit:hover{ background:var(--d-accent-2) !important; }
html[data-design="2"][data-d2-auth] #authView .auth-submit::after{ content:""; position:absolute; left:0; right:0; bottom:0; height:0; background:rgba(255,255,255,.26); z-index:-1; }
html[data-design="2"][data-d2-auth] #authView .auth-submit:disabled::after{ animation:d2Rise 1.2s ease-out forwards; }
html[data-design="2"][data-d2-auth] #authView .auth-error{ color:var(--d-down); }
html[data-design="2"][data-d2-auth] #authView .auth-showcase{ position:relative; overflow:hidden; border-radius:var(--d-r-xl); background:var(--d-accent); color:#FFFFFF; isolation:isolate; padding:32px; }
html[data-design="2"][data-d2-auth] #authView .auth-showcase .auth-brand, html[data-design="2"][data-d2-auth] #authView .auth-showcase .auth-promise{ color:#FFFFFF; }   /* white on teal (the panel had dark text on no background) */
html[data-design="2"][data-theme="dark"][data-d2-auth] #authView .auth-showcase .auth-brand, html[data-design="2"][data-theme="dark"][data-d2-auth] #authView .auth-showcase .auth-promise{ color:#04191E; }
html[data-design="2"][data-d2-auth] #authView .auth-showcase::before{ content:""; position:absolute; left:-20%; right:-20%; bottom:0; height:38%; z-index:-1;
  background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.16)); border-radius:45% 55% 0 0 / 22% 22% 0 0; animation:d2Wave 6s ease-in-out infinite alternate; }
html[data-design="2"] #mfaPrompt h3{ font-family:var(--d-font-title); font-weight:800; font-size:1.5rem; text-align:center; margin:0 0 4px; color:var(--d-ink); }
html[data-design="2"] #mfaPrompt .meta{ text-align:center; color:var(--d-soft); }
html[data-design="2"] #mfaPrompt .d2-lock{ width:72px; height:72px; margin:0 auto 10px; border-radius:22px; background:var(--d-tint); color:var(--d-accent-text);
  display:flex; align-items:center; justify-content:center; box-shadow:0 0 24px var(--d-glow); }
html[data-design="2"] #checkEmailPanel .ce-icon{ width:72px; height:72px; border-radius:22px; background:var(--d-tint); color:var(--d-accent-text); box-shadow:0 0 24px var(--d-glow); }
html[data-design="2"] #checkEmailPanel .ce-lead{ color:var(--d-ink); }
html[data-design="2"] .credit-form{ background:var(--d-card, transparent); border-color:var(--d-line, var(--line)); border-radius:18px; }
html[data-design="2"] .est-check{ border-radius:14px; }

/* ---------- 6. The whole signed-in app (decided by Douglas 24 Nov: "restyle every screen now") ----------
   Only for signed-in screens (body.in-app), so the landing page keeps its approved look.
   The app reads shared settings (--panel, --ink, --line, --r-md…); setting them here moves every screen at once,
   then the common building blocks get the kit's shapes. */
html[data-design="2"] body.in-app{
  --bg:var(--d-ground); --g-base:var(--d-ground); --g-base-2:var(--d-ground);
  --panel:var(--d-surface); --panel-2:var(--d-field); --glass:var(--d-surface); --glass-strong:var(--d-surface);
  --ink:var(--d-ink); --ink-soft:var(--d-soft); --ink-faint:#5B7077; --line:var(--d-line); --line-strong:#C6D5D9;
  --g-edge:var(--d-line); --g-shadow:rgba(6,30,36,.07); --accent-soft:var(--d-tint);
  --r-sm:10px; --r-md:12px; --r-lg:18px; --shadow-pop:var(--d-shadow);
  --font-display:var(--d-font-title); --font-body:var(--d-font);
  --d-side:#0D5C6E;
  background:var(--d-ground); color:var(--d-ink); font-family:var(--d-font);
}
html[data-design="2"][data-theme="dark"] body.in-app{
  --ink-faint:#8AA2A8; --line-strong:#2E4F57; --g-shadow:rgba(0,0,0,.35); --d-side:#0A3D49;
}
/* no water background and no blur in the new design (blur is slow on phones; the liquid lives in the content) */
html[data-design="2"] body.in-app::before, html[data-design="2"] body.in-app::after{ display:none !important; }
html[data-design="2"] body.in-app *{ -webkit-backdrop-filter:none !important; backdrop-filter:none !important; }

/* top bar */
html[data-design="2"] body.in-app .topbar{ background:var(--d-surface); border-bottom:1px solid var(--d-line); box-shadow:0 1px 0 rgba(6,30,36,.02); }

/* the sidebar in Relay teal, like the mockup */
html[data-design="2"] body.in-app.has-sidebar .dash-tabs{ background:var(--d-side); border-right:0; padding:12px 10px 14px; }
html[data-design="2"] body.in-app.has-sidebar .dash-tab, html[data-design="2"] body.in-app .nav-foot{ color:rgba(255,255,255,.86); border-radius:10px; min-height:40px; font-weight:500; }
html[data-design="2"] body.in-app.has-sidebar .dash-tab:hover:not(.active), html[data-design="2"] body.in-app .nav-foot:hover{ background:rgba(255,255,255,.10); color:#FFFFFF; }
html[data-design="2"] body.in-app.has-sidebar .dash-tab.active{ background:rgba(255,255,255,.18) !important; color:#FFFFFF !important; font-weight:700; box-shadow:none; }
html[data-design="2"] body.in-app .nav-group{ color:rgba(255,255,255,.72); text-transform:uppercase; letter-spacing:.09em; font-size:.68rem; font-weight:700; }
html[data-design="2"] body.in-app.has-sidebar.nav-collapsed .nav-group{ background:rgba(255,255,255,.18); }
/* Relay admin: its own stylesheet (admin-v3.css) uses #adminView rules, so the kit repeats the sidebar for it */
html[data-design="2"] body.in-app #adminView{ --glass:var(--d-surface); --glass-strong:var(--d-surface); --glass-line:var(--d-line); --edge:var(--d-line);
  --blue:var(--d-accent); --blue-2:var(--d-accent-2); --blue-soft:var(--d-tint); --shadow:var(--d-shadow); }
html[data-design="2"] body.in-app #adminView .dash-tabs{ background:var(--d-side); border-right:0; box-shadow:none; }
html[data-design="2"] body.in-app #adminView .nav-group{ color:rgba(255,255,255,.72); text-transform:uppercase; letter-spacing:.09em; font-size:.68rem; font-weight:700; }
html[data-design="2"] body.in-app #adminView .dash-tab, html[data-design="2"] body.in-app #adminView .nav-foot, html[data-design="2"] body.in-app #adminView .nav-ico{ color:rgba(255,255,255,.86); }
html[data-design="2"] body.in-app #adminView .dash-tab:hover:not(.active){ background:rgba(255,255,255,.10); color:#FFFFFF; }
html[data-design="2"] body.in-app #adminView .dash-tab.active{ background:rgba(255,255,255,.18); color:#FFFFFF; box-shadow:none; font-weight:700; }
html[data-design="2"] body.in-app #adminView .dash-tab.active .nav-ico{ color:#FFFFFF; }
html[data-design="2"] body.in-app #adminView .req-badge, html[data-design="2"] body.in-app #adminView .nav-badge{ background:#FFFFFF; color:var(--d-side); box-shadow:none; }
html[data-design="2"] body.in-app #adminView .section-head h2{ font-family:var(--d-font-title); font-weight:800; }
html[data-design="2"] body.in-app #adminView .stat-box{ background:var(--d-surface); border:1px solid var(--d-line); border-radius:var(--d-r-lg); box-shadow:var(--d-shadow); }
html[data-design="2"] body.in-app #adminView .stat-box b{ font-family:var(--d-font-title); font-weight:800; }
/* the sub-items that open under a menu group (nav-subs.js) sit on the teal sidebar too (not in the collapsed flyout panel) */
html[data-design="2"] body.in-app:not(.nav-collapsed) .nav-fly{ border-left-color:rgba(255,255,255,.28); }
html[data-design="2"] body.in-app:not(.nav-collapsed) .nav-fly-item{ color:rgba(255,255,255,.82); }
html[data-design="2"] body.in-app:not(.nav-collapsed) .nav-fly-item:hover{ background:rgba(255,255,255,.10); color:#FFFFFF; }
html[data-design="2"] body.in-app:not(.nav-collapsed) .nav-fly-item.is-on{ background:rgba(255,255,255,.18); color:#FFFFFF; }
html[data-design="2"] body.in-app:not(.nav-collapsed) .nav-fly-item .nav-sub-badge{ background:#FFFFFF; color:var(--d-side); }
html[data-design="2"] body.in-app.has-sidebar .dash-tab .req-badge, html[data-design="2"] body.in-app.has-sidebar .dash-tab .new-badge{ background:rgba(255,255,255,.2); color:#FFFFFF; }
html[data-design="2"] body.in-app.has-sidebar .dash-tab.active .req-badge, html[data-design="2"] body.in-app.has-sidebar .dash-tab.active .new-badge{ background:#FFFFFF; color:var(--d-side); }

/* titles */
html[data-design="2"] body.in-app .page-title, html[data-design="2"] body.in-app .section-head h2,
html[data-design="2"] body.in-app .section-head h3, html[data-design="2"] body.in-app .rec-form-head h3{ font-family:var(--d-font-title); font-weight:800; letter-spacing:-.015em; color:var(--d-ink); }
html[data-design="2"] body.in-app .page-title{ font-size:1.75rem; }

/* cards and panels: white, rounded, a soft shadow, lift on hover where they open something */
html[data-design="2"] body.in-app .card, html[data-design="2"] body.in-app .job-card, html[data-design="2"] body.in-app .van-card,
html[data-design="2"] body.in-app .bay-card, html[data-design="2"] body.in-app .stat-box, html[data-design="2"] body.in-app .cw-wrap,
html[data-design="2"] body.in-app .request-card, html[data-design="2"] body.in-app .account-row, html[data-design="2"] body.in-app .voice-admin-row,
html[data-design="2"] body.in-app .admin-shop-row, html[data-design="2"] body.in-app .att-box, html[data-design="2"] body.in-app .complete-toast{
  background:var(--d-surface); border:1px solid var(--d-line); border-radius:var(--d-r-lg); box-shadow:var(--d-shadow); }
html[data-design="2"] body.in-app .job-card, html[data-design="2"] body.in-app .request-card, html[data-design="2"] body.in-app .stat-box{
  transition:transform var(--d-fast) ease, box-shadow var(--d-fast) ease; }
html[data-design="2"] body.in-app .job-card:hover, html[data-design="2"] body.in-app .request-card:hover, html[data-design="2"] body.in-app .stat-box:hover{
  transform:translateY(-3px); box-shadow:var(--d-shadow-hover); }
html[data-design="2"] body.in-app .stat-box b{ font-family:var(--d-font-title); font-weight:800; }
html[data-design="2"] body.in-app .stat-box::after, html[data-design="2"] body.in-app .att-box::after{ display:none; }   /* the old glass sheen */
html[data-design="2"] body.in-app .kanban-column{ background:var(--d-field); border:1px solid var(--d-line); border-radius:var(--d-r-lg); }
html[data-design="2"] body.in-app .notif-panel, html[data-design="2"] body.in-app .relay-dlg, html[data-design="2"] body.in-app .look-panel,
html[data-design="2"] body.in-app .modal-card{ background:var(--d-surface) !important; border:1px solid var(--d-line); border-radius:var(--d-r-xl); box-shadow:var(--d-shadow); }

/* fields */
html[data-design="2"] body.in-app input:not([type=checkbox]):not([type=radio]):not([type=range]):not(.d2-code-input),
html[data-design="2"] body.in-app select, html[data-design="2"] body.in-app textarea{
  background:var(--d-field); color:var(--d-ink); border:1.5px solid var(--d-line); border-radius:12px !important; box-shadow:none; }
html[data-design="2"] body.in-app input:focus, html[data-design="2"] body.in-app select:focus, html[data-design="2"] body.in-app textarea:focus{
  outline:0; border-color:var(--d-accent-text); box-shadow:0 0 0 4px var(--d-glow); background:var(--d-surface); }
html[data-design="2"] body.in-app input[type=checkbox], html[data-design="2"] body.in-app input[type=radio], html[data-design="2"] body.in-app input[type=range]{ accent-color:var(--d-accent); }

/* buttons */
html[data-design="2"] body.in-app .ghost-btn, html[data-design="2"] body.in-app .j-edit, html[data-design="2"] body.in-app .toggle-btn,
html[data-design="2"] body.in-app .btn-secondary{
  background:var(--d-surface); border:1px solid var(--d-line); color:var(--d-ink); border-radius:12px; box-shadow:none; font-weight:600; transform:none; }
html[data-design="2"] body.in-app .ghost-btn:hover, html[data-design="2"] body.in-app .j-edit:hover{ background:var(--d-field); transform:none; box-shadow:none; }
html[data-design="2"] body.in-app .primary-btn, html[data-design="2"] body.in-app .btn-primary, html[data-design="2"] body.in-app button.primary,
html[data-design="2"] body.in-app .wo-act-primary, html[data-design="2"] body.in-app .new-job-form button:not(.kind-toggle-btn), html[data-design="2"] body.in-app .comment-form button,
html[data-design="2"] body.in-app .rec-form .job-actions button:not(.ghost-btn):not(.text-btn):not(.ghost){
  position:relative; overflow:hidden; isolation:isolate; border-radius:12px; border:0; background:var(--d-accent) !important; color:var(--d-on-accent); box-shadow:none; font-weight:700; }
html[data-design="2"] body.in-app .primary-btn:hover, html[data-design="2"] body.in-app .btn-primary:hover, html[data-design="2"] body.in-app .wo-act-primary:hover{ background:var(--d-accent-2) !important; }
/* a main button that is working (disabled while saving) fills with liquid */
html[data-design="2"] body.in-app .primary-btn::after, html[data-design="2"] body.in-app .btn-primary::after, html[data-design="2"] body.in-app button.primary::after,
html[data-design="2"] body.in-app .wo-act-primary::after, html[data-design="2"] body.in-app .new-job-form button:not(.kind-toggle-btn)::after,
html[data-design="2"] body.in-app .rec-form .job-actions button:not(.ghost-btn):not(.text-btn):not(.ghost)::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:0; background:rgba(255,255,255,.26); z-index:-1; pointer-events:none; }
html[data-design="2"] body.in-app .primary-btn:disabled::after, html[data-design="2"] body.in-app .btn-primary:disabled::after, html[data-design="2"] body.in-app button.primary:disabled::after,
html[data-design="2"] body.in-app .wo-act-primary:disabled::after, html[data-design="2"] body.in-app .new-job-form button:disabled::after,
html[data-design="2"] body.in-app .rec-form .job-actions button:not(.ghost-btn):not(.text-btn):not(.ghost):disabled::after{ animation:d2Rise 1.2s ease-out forwards; }
html[data-design="2"] body.in-app .text-btn{ color:var(--d-accent-text); font-weight:700; }
/* mechanic phone: "Go live" (not live yet) and "Clock in" are Relay teal; once live, the button keeps its warning colour
   (--live) on purpose: it tells the mechanic their location is being shared */
html[data-design="2"] body.in-app .go-live-btn.offline-state, html[data-design="2"] body.in-app .clock-in-btn{
  background:var(--d-accent) !important; color:var(--d-on-accent) !important; border:0; border-radius:14px; box-shadow:0 6px 16px var(--d-glow) !important; min-height:52px; }
html[data-design="2"] body.in-app .go-live-btn{ border-radius:14px; min-height:52px; }

/* tables */
html[data-design="2"] body.in-app table th{ color:var(--d-soft); font-weight:600; font-size:.78rem; text-transform:none; border-bottom:1px solid var(--d-line); }
html[data-design="2"] body.in-app table td{ border-bottom:1px solid var(--d-line); }
html[data-design="2"] body.in-app table tbody tr:hover td{ background:var(--d-tint); }

/* tags and badges: pills */
html[data-design="2"] body.in-app .badge, html[data-design="2"] body.in-app .rec-tag{ border-radius:999px; font-weight:700; }

/* the tabs inside a screen (not the sidebar) */
html[data-design="2"] body.in-app .ws-tab, html[data-design="2"] body.in-app .look-seg button{ border-radius:999px; }

/* empty screens: calm, with one clear action */
html[data-design="2"] body.in-app .empty-note{ background:var(--d-field); border:1px dashed var(--d-line); border-radius:var(--d-r-lg); color:var(--d-soft); }

/* ---------- 7. Liquid across the app (only where it means something) ---------- */
/* bar charts (e.g. work per technician) and the inspection progress bar become liquid pipes */
html[data-design="2"] body.in-app .bar-track, html[data-design="2"] body.in-app .fw-bar{ background:var(--d-pipe-bg); border-radius:999px; overflow:hidden; }
html[data-design="2"] body.in-app .bar-fill, html[data-design="2"] body.in-app .fw-bar-fill{
  border-radius:999px;
  background-image:radial-gradient(circle, rgba(255,255,255,.65) 1.4px, transparent 2px), radial-gradient(circle, rgba(255,255,255,.45) 1px, transparent 1.5px), var(--d-liquid-x) !important;
  background-size:28px 100%, 18px 100%, 100% 100%; background-repeat:repeat-x, repeat-x, no-repeat;
  transition:width .6s cubic-bezier(.4,0,.2,1); animation:d2Pipe 1.6s linear infinite; }
/* "Get your shop ready: 4 of 6 done" fills a pipe (r6.js) */
html[data-design="2"] body.in-app .setup-pipe{ width:220px; max-width:100%; margin-top:8px; }
html:not([data-design="2"]) .setup-pipe{ display:none; }
/* every "Saved" / "Done" toast gets the small teal drop with a check: the one "done" moment, everywhere */
html[data-design="2"] body .records-toast{ display:flex; align-items:center; gap:10px; background:var(--d-surface); color:var(--d-ink); border:1px solid var(--d-line);
  border-radius:999px; padding:8px 18px 8px 8px; font-weight:700; box-shadow:var(--d-shadow); }
html[data-design="2"] body .records-toast::before, html[data-design="2"] body.in-app .complete-toast::before{
  content:""; flex:none; width:28px; height:28px; border-radius:50%; background-color:transparent;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E"), var(--d-liquid);
  background-size:62% 62%, 100% 100%; background-position:center 58%, center; background-repeat:no-repeat;
  box-shadow:0 4px 12px var(--d-glow), inset 0 2px 4px rgba(255,255,255,.45); }
html[data-design="2"] body .records-toast.show::before, html[data-design="2"] body.in-app .complete-toast::before{ animation:d2Drop .5s cubic-bezier(.3,1.5,.5,1) both; }
html[data-design="2"] body.in-app .complete-toast{ display:flex; align-items:center; gap:12px; }

/* ---------- 8. Customer pages: estimate approval, tracking, review (each <html> carries data-page) ---------- */
html[data-design="2"][data-page]{ background:var(--d-ground); }
html[data-design="2"][data-page] body{ background:var(--d-ground); color:var(--d-ink); font-family:var(--d-font); }
/* plain colours here: these pages' own --accent must not point back at the kit's --d-accent (which reads --accent) */
html[data-design="2"][data-page="approve"]{ --ink:#0E2A31; --soft:#4A6168; --line:#DCE6E8; --bg:#E4EEF0; --card:#FFFFFF; --accent:#0D5C6E; --ok:#0D5C6E; }
html[data-design="2"][data-page="track"]{ --ink:#0E2A31; --soft:#4A6168; --line:#DCE6E8; --bg:#E4EEF0; --teal:#0D5C6E; }
html[data-design="2"][data-page] .card{ background:var(--d-surface); border:1px solid var(--d-line); border-radius:var(--d-r-xl); box-shadow:var(--d-shadow); }
html[data-design="2"][data-page] h1, html[data-design="2"][data-page] h2, html[data-design="2"][data-page] .brand{ font-family:var(--d-font-title); font-weight:800; letter-spacing:-.015em; }
html[data-design="2"][data-page] input.t, html[data-design="2"][data-page] textarea{ background:var(--d-field); border:1.5px solid var(--d-line); border-radius:12px; color:var(--d-ink); }
html[data-design="2"][data-page] input.t:focus, html[data-design="2"][data-page] textarea:focus{ outline:0; border-color:var(--d-accent-text); box-shadow:0 0 0 4px var(--d-glow); }
html[data-design="2"][data-page] canvas{ background:var(--d-field); border:1.5px dashed var(--d-line); border-radius:14px; }
/* the customer's main button (Approve): Relay teal, and it fills with liquid while it sends */
html[data-design="2"][data-page] button.primary, html[data-design="2"][data-page] .btn{ position:relative; overflow:hidden; isolation:isolate; background:var(--d-accent); border-color:var(--d-accent); color:var(--d-on-accent); border-radius:14px; }
html[data-design="2"][data-page] button.primary::after{ content:""; position:absolute; left:0; right:0; bottom:0; height:0; background:rgba(255,255,255,.26); z-index:-1; }
html[data-design="2"][data-page] button.primary:disabled::after{ animation:d2Rise 1.2s ease-out forwards; }
/* "Thank you, approved": the teal drop with a check */
html[data-design="2"][data-page] .banner.ok{ display:flex; align-items:center; gap:12px; background:var(--d-tint); color:var(--d-accent-text); border-radius:var(--d-r-lg); }
html[data-design="2"][data-page] .banner.ok::before{ content:""; flex:none; width:40px; height:40px; border-radius:50%;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E"), var(--d-liquid);
  background-size:60% 60%, 100% 100%; background-position:center 58%, center; background-repeat:no-repeat;
  box-shadow:0 6px 16px var(--d-glow), inset 0 2px 4px rgba(255,255,255,.45); animation:d2Drop .55s cubic-bezier(.3,1.5,.5,1) both; }
/* tracking: finished steps fill with liquid, the current one glows */
html[data-design="2"][data-page="track"] .steps li.done .dot{ background:var(--d-liquid); border-color:transparent; }
html[data-design="2"][data-page="track"] .steps li.now .dot{ background:var(--d-accent); border-color:var(--d-accent); box-shadow:0 0 0 5px var(--d-glow); }
html[data-design="2"][data-page="track"] #map{ border-radius:var(--d-r-lg); }

/* ---------- 5. Motion ---------- */
@keyframes d2Wave{ from{ transform:translateX(-6%); } to{ transform:translateX(6%); } }
@keyframes d2Bub{ 0%{ transform:translateY(0); opacity:0; } 20%{ opacity:1; } 100%{ transform:translateY(-40px); opacity:0; } }
@keyframes d2Pipe{ from{ background-position:0 0, 14px 0, 0 0; } to{ background-position:56px 0, 70px 0, 0 0; } }
@keyframes d2Rise{ to{ height:100%; } }
@keyframes d2Shake{ 0%,100%{ transform:translateX(0); } 20%{ transform:translateX(-8px); } 40%{ transform:translateX(7px); } 60%{ transform:translateX(-5px); } 80%{ transform:translateX(3px); } }
@keyframes d2Drop{ 0%{ transform:translateY(-26px) scale(.4,.5); opacity:0; } 45%{ transform:translateY(4px) scale(1.16,.86); opacity:1; } 70%{ transform:translateY(-4px) scale(.95,1.06); } 100%{ transform:none; } }
@keyframes d2Tick{ from{ transform:translate(-50%,-50%) scale(0) rotate(-30deg); opacity:0; } to{ transform:translate(-50%,-50%) scale(1) rotate(0); opacity:1; } }
/* Off when the person turned motion off in Appearance, when the device asks for less motion,
   and while the tab is hidden (design2.js sets data-d2-paused). Levels still show, just still. */
html[data-design="2"][data-motion="off"] *, html[data-design="2"][data-d2-paused] *{ animation-play-state:paused !important; }
html[data-design="2"][data-motion="off"] .d2-drop, html[data-design="2"][data-motion="off"] .d2-drop svg,
html[data-design="2"][data-motion="off"] .d2-code.bad{ animation:none !important; }
@media (prefers-reduced-motion: reduce){
  html[data-design="2"] *{ animation:none !important; transition:none !important; }
  html[data-design="2"] .d2-btn.d2-busy::after{ height:100%; }
}

/* v2.8: choice buttons inside forms (Road service / In-shop service, Invoice / Estimate) are NOT main buttons: only the chosen one
   is filled. Before, ".new-job-form button" painted both teal, so choosing one looked like nothing happened (Douglas, 2 Dec). */
html[data-design="2"] body.in-app .new-job-form .kind-toggle-btn:not(.active){ background:var(--d-surface, #fff); color:var(--d-ink, inherit); }
html[data-design="2"] body.in-app .new-job-form .kind-toggle-btn.active{ background:var(--d-accent); color:var(--d-on-accent, #fff); }
