/* ============================================================
   Relay glass look (v2 redesign, decided by Douglas 28 Nov 2026; mockup: design-docs/mockup-glass.html).
   Light glass in light mode, dark glass in dark mode: it follows the existing Appearance setting (look.js).
   Loaded AFTER design.css and only active under <html data-design="2">, so with the switch off nothing changes.
   It restyles the signed-in shell (background, top bar, sidebar, account card, cards, menus); the page contents
   keep their own layout. Blur is used only on the top bar and the sidebar (cheap), never on long lists.
   ============================================================ */

/* ---------- 1. Colours: one set for light, one for dark ---------- */
html[data-design="2"]{
  --d-ground:#E3F0F3; --d-field:rgba(255,255,255,.7); --d-surface:#FFFFFF; --d-panel:#F4F9FA;
  --d-ink:#0F1F26; --d-soft:#53666E; --d-line:rgba(13,92,110,.15);
  --g2-bg1:#DFF1F4; --g2-bg2:#EAF0FB; --g2-bg3:#E3F6EE; --g2-blob1:rgba(124,208,224,.55); --g2-blob2:rgba(157,180,245,.45);
  --g2-glass:rgba(255,255,255,.62); --g2-card:rgba(255,255,255,.72); --g2-edge:rgba(255,255,255,.92);
  --g2-pop:#FFFFFF; --g2-shadow:0 18px 40px -20px rgba(13,60,80,.35), 0 2px 6px rgba(13,60,80,.06);
}
html[data-design="2"][data-theme="dark"]{
  --d-ground:#07151B; --d-field:rgba(255,255,255,.07); --d-surface:#10242D; --d-panel:#0B1A24;
  --d-ink:#E9F3F6; --d-soft:#8EA6AF; --d-line:rgba(255,255,255,.11);
  --g2-bg1:#07151B; --g2-bg2:#0B1A24; --g2-bg3:#091E1D; --g2-blob1:rgba(13,92,110,.55); --g2-blob2:rgba(35,64,122,.45);
  --g2-glass:rgba(255,255,255,.06); --g2-card:rgba(255,255,255,.065); --g2-edge:rgba(255,255,255,.15);
  --g2-pop:#10242D; --g2-shadow:0 20px 44px -22px rgba(0,0,0,.75), 0 1px 0 rgba(255,255,255,.04) inset;
}
html[data-design="2"] body.in-app{
  --d-side:transparent;
  --panel:var(--g2-card); --panel-2:var(--d-field); --glass:var(--g2-card); --glass-strong:var(--g2-card);
  --shadow-pop:var(--g2-shadow);
  background-color:var(--g2-bg1);
  font-family:'Plus Jakarta Sans', var(--d-font);
}
/* The background is ONE fixed layer drawn once (a fixed background-attachment repaints on every scroll; this does not).
   design.css hides ::before, so it is switched back on here with a more specific rule. */
html[data-design="2"] body.in-app::before{
  display:block !important; content:""; position:fixed; inset:0; z-index:-1; pointer-events:none; transform:translateZ(0);
  background-image:radial-gradient(900px 520px at 18% -6%, var(--g2-blob1), transparent 62%),
                   radial-gradient(760px 520px at 96% 104%, var(--g2-blob2), transparent 62%),
                   linear-gradient(135deg, var(--g2-bg1), var(--g2-bg2) 55%, var(--g2-bg3));
}

/* ---------- 2. Top bar and sidebar: the two glass surfaces ---------- */
html[data-design="2"] body.in-app .topbar{
  background:var(--g2-glass); border-bottom:1px solid var(--g2-edge); box-shadow:none;
  -webkit-backdrop-filter:blur(16px) saturate(150%) !important; backdrop-filter:blur(16px) saturate(150%) !important;
}
html[data-design="2"] body.in-app.has-sidebar .dash-tabs, html[data-design="2"] body.in-app #adminView .dash-tabs{
  background:var(--g2-glass); border-right:1px solid var(--g2-edge); box-shadow:none;
  -webkit-backdrop-filter:blur(16px) saturate(150%) !important; backdrop-filter:blur(16px) saturate(150%) !important;
}
html[data-design="2"] body.in-app.has-sidebar .dash-tab, html[data-design="2"] body.in-app .nav-foot,
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:var(--d-ink); border-radius:14px; min-height:40px; font-weight:600;
}
html[data-design="2"] body.in-app.has-sidebar .dash-tab:hover:not(.active), html[data-design="2"] body.in-app .nav-foot:hover,
html[data-design="2"] body.in-app #adminView .dash-tab:hover:not(.active){ background:var(--d-tint); color:var(--d-ink); }
html[data-design="2"] body.in-app.has-sidebar .dash-tab.active, html[data-design="2"] body.in-app #adminView .dash-tab.active{
  background:var(--d-accent) !important; color:var(--d-on-accent) !important; font-weight:700; box-shadow:0 8px 18px -10px var(--d-accent);
}
html[data-design="2"] body.in-app #adminView .dash-tab.active .nav-ico{ color:var(--d-on-accent); }
html[data-design="2"] body.in-app .nav-group, html[data-design="2"] body.in-app #adminView .nav-group{ color:var(--d-soft); }
html[data-design="2"] body.in-app.has-sidebar.nav-collapsed .nav-group{ background:var(--d-line); }
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,
html[data-design="2"] body.in-app #adminView .req-badge, html[data-design="2"] body.in-app #adminView .nav-badge{ background:var(--d-tint); color:var(--d-accent-text); box-shadow:none; }
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:rgba(255,255,255,.28); color:var(--d-on-accent); }
html[data-design="2"] body.in-app:not(.nav-collapsed) .nav-fly{ border-left-color:var(--d-line); }
html[data-design="2"] body.in-app:not(.nav-collapsed) .nav-fly-item{ color:var(--d-soft); }
html[data-design="2"] body.in-app:not(.nav-collapsed) .nav-fly-item:hover{ background:var(--d-tint); color:var(--d-ink); }
html[data-design="2"] body.in-app:not(.nav-collapsed) .nav-fly-item.is-on{ background:var(--d-tint); color:var(--d-accent-text); font-weight:700; }
html[data-design="2"] body.in-app:not(.nav-collapsed) .nav-fly-item .nav-sub-badge{ background:var(--d-accent); color:var(--d-on-accent); }

/* ---------- 3. Cards, fields, menus ---------- */
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 .an-tile,
html[data-design="2"] body.in-app .fin-card{
  background:var(--g2-card); border:1px solid var(--g2-edge); border-radius:20px; box-shadow:var(--g2-shadow);
}
html[data-design="2"] body.in-app .kanban-column{ background:var(--d-field); border:1px solid var(--g2-edge); border-radius:20px; }
/* menus and dialogs stay solid so nothing shows through */
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, html[data-design="2"] body.in-app .more-menu, html[data-design="2"] body.in-app .hdr-panel,
html[data-design="2"] body.in-app .gsearch-results{ background:var(--g2-pop) !important; border:1px solid var(--d-line); border-radius:20px; box-shadow:0 24px 50px -16px rgba(0,0,0,.45); }
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); border:1px solid var(--d-line); border-radius:14px; color:var(--d-ink); }
html[data-design="2"] body.in-app .gsearch{ background:var(--d-field); border:1px solid var(--d-line); border-radius:14px; }
html[data-design="2"] body.in-app table th{ color:var(--d-soft); }

/* ---------- 4. The account card (moved here from the top-right avatar, like other professional apps) ---------- */
html[data-design="2"] body.in-app .nav-account{ margin-top:auto; padding:8px 2px 8px; position:sticky; bottom:0; z-index:5; background:var(--g2-pop); border-top:1px solid var(--g2-edge); box-shadow:0 -10px 18px -14px rgba(0,0,0,.25); }   /* a solid footer: menu items scroll under it, never show through it */
html[data-design="2"] body.in-app .nav-account .who{ display:block !important; }
html[data-design="2"] body.in-app .nav-account .who > .name, html[data-design="2"] body.in-app .nav-account .who > .role, html[data-design="2"] body.in-app .nav-account .who > .org-badge{ display:none; }
html[data-design="2"] body.in-app .nav-account .more-menu-wrap{ position:static; display:block; }
/* beats style.css .hdr-avatar (yellow 40px circle, !important): here the button is the whole account card */
html[data-design="2"] body.in-app .nav-account #moreMenuBtn.hdr-avatar{
  width:100% !important; height:auto !important; min-height:56px; border-radius:16px !important; padding:9px 10px !important;
  background:var(--g2-card) !important; color:var(--d-ink) !important; border:1px solid var(--g2-edge) !important;
  font-size:0 !important; letter-spacing:0; justify-content:flex-start; text-align:left; box-shadow:none;
}
html[data-design="2"] body.in-app .nav-account #moreMenuBtn{
  font-size:0; display:flex; align-items:center; gap:10px; width:100%; height:auto; border-radius:16px; padding:9px 10px; text-align:left;
  background:var(--g2-card); border:1px solid var(--g2-edge); color:var(--d-ink); font:600 14px/1.15 'Plus Jakarta Sans', var(--d-font);
}
html[data-design="2"] body.in-app .nav-account #moreMenuBtn::before{
  content:attr(data-initials); flex:none; width:36px; height:36px; border-radius:50%; display:grid; place-items:center;
  background:linear-gradient(135deg,#F6C453,#E89A2C); color:#3A2500; font-weight:800; font-size:14px; line-height:1;
}
html[data-design="2"] body.in-app .nav-account #moreMenuBtn::after{ content:attr(data-who); flex:1; min-width:0; white-space:pre-line; font:600 13px/1.25 'Plus Jakarta Sans', var(--d-font); color:var(--d-soft); overflow:hidden; text-overflow:ellipsis; }
html[data-design="2"] body.in-app .nav-account .more-menu{ position:absolute; left:2px; right:2px; bottom:calc(100% - 2px); top:auto; width:auto; max-height:70vh; overflow:auto; z-index:50; }
html[data-design="2"] body.in-app.has-sidebar.nav-collapsed .nav-account{ display:none; }
html[data-design="2"] body.in-app.has-sidebar .dash-tabs{ display:flex; flex-direction:column; }
/* the top bar no longer carries the avatar when it lives in the sidebar */
html[data-design="2"] body.in-app.acct-in-side .topbar #whoBox{ display:none !important; }

/* ---------- 5. Smoothness first ---------- */
/* Blur is the only costly thing here and it is on just two surfaces. On phones, and for anyone who asks for less
   transparency, it is off and the surfaces are a little more solid. Nothing here runs script or animates on scroll. */
@media (max-width:860px), (prefers-reduced-transparency: reduce){
  html[data-design="2"] body.in-app .topbar,
  html[data-design="2"] body.in-app.has-sidebar .dash-tabs, html[data-design="2"] body.in-app #adminView .dash-tabs{
    -webkit-backdrop-filter:none !important; backdrop-filter:none !important; background:var(--g2-pop);
  }
}

/* ---------- 6. Sidebar headings and the account card's menu ---------- */
html[data-design="2"] body.in-app .nav-heading{ font:700 11px/1 'Plus Jakarta Sans', var(--d-font); letter-spacing:.08em; text-transform:uppercase; color:var(--d-soft); padding:14px 12px 5px; }
html[data-design="2"] body.in-app .nav-heading-gap{ padding:6px 0 0; }
html[data-design="2"] body.in-app.has-sidebar.nav-collapsed .nav-heading{ display:none; }
html[data-design="2"] body.in-app .nav-account .acct-head{ min-width:0; }

/* ---- 7. Estimates & invoices: summary cards, one Filters menu, ⋯ row menu (Design 2 only) ---- */
html[data-design="2"] .doc-cards{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:4px 0 14px; }
html[data-design="2"] .doc-card{ display:flex; flex-direction:column; gap:2px; text-align:left; padding:14px 16px; border-radius:16px; border:1px solid var(--g2-edge); background:var(--g2-card); color:var(--d-ink); cursor:pointer; font:inherit; box-shadow:var(--g2-shadow); }
html[data-design="2"] .doc-card .dc-l{ font-size:.8rem; color:var(--d-soft); font-weight:600; }
html[data-design="2"] .doc-card .dc-v{ font-size:1.35rem; letter-spacing:-.01em; }
html[data-design="2"] .doc-card .dc-n{ font-size:.78rem; color:var(--d-soft); }
html[data-design="2"] .doc-card.bad .dc-v{ color:#d64545; } html[data-design="2"] .doc-card.good .dc-v{ color:#1f9d6b; }
html[data-design="2"] .doc-card.on{ outline:2px solid var(--accent, #0D5C6E); }
html[data-design="2"] #shop-invoices .fd-bar{ display:flex; gap:10px; align-items:center; position:relative; }
html[data-design="2"] #shop-invoices .fd-search{ flex:1; min-width:0; }
html[data-design="2"] .doc-filters{ position:relative; }
html[data-design="2"] .doc-filters > summary{ list-style:none; cursor:pointer; padding:9px 14px; border-radius:12px; border:1px solid var(--g2-edge); background:var(--g2-card); font-weight:600; color:var(--d-ink); }
html[data-design="2"] .doc-filters > summary::-webkit-details-marker{ display:none; }
html[data-design="2"] .doc-filters-pop{ position:absolute; right:0; top:calc(100% + 6px); z-index:40; width:min(380px,86vw); padding:14px; border-radius:16px; background:var(--g2-pop) !important; border:1px solid var(--g2-edge); box-shadow:var(--g2-shadow); display:flex; flex-direction:column; gap:8px; }
html[data-design="2"] .doc-filters-pop .df-h{ font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; color:var(--d-soft); font-weight:700; }
html[data-design="2"] .doc-filters-pop .fd-label{ display:none; }
html[data-design="2"] #shop-invoices .fd-active{ display:flex; gap:8px; flex-wrap:wrap; margin:10px 0; }
html[data-design="2"] #shop-invoices .row-more > summary::after{ content:''; }
html[data-design="2"] #shop-invoices .row-more > summary{ font-size:1.2rem; line-height:1; padding:4px 10px; }
@media (max-width:700px){ html[data-design="2"] .doc-cards{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; } html[data-design="2"] .doc-card{ padding:10px 10px; border-radius:14px; } html[data-design="2"] .doc-card .dc-v{ font-size:1rem; } html[data-design="2"] .doc-card .dc-l{ font-size:.68rem; } html[data-design="2"] .doc-card .dc-n{ font-size:.66rem; } }
html[data-design="2"] #shop-invoices .cw-wrap{ overflow:visible; }

/* ---- 8. Finance (4 tabs + More, one Expense menu) and Messages (one list filter) — Design 2 only ---- */
html[data-design="2"] .fin-more, html[data-design="2"] .fin-addmenu, html[data-design="2"] .ib-filter{ position:relative; display:inline-block; }
html[data-design="2"] .fin-more > summary, html[data-design="2"] .fin-addmenu > summary, html[data-design="2"] .ib-filter > summary{ list-style:none; cursor:pointer; }
html[data-design="2"] .fin-more > summary::-webkit-details-marker, html[data-design="2"] .fin-addmenu > summary::-webkit-details-marker, html[data-design="2"] .ib-filter > summary::-webkit-details-marker{ display:none; }
html[data-design="2"] .fin-more-menu, html[data-design="2"] .ib-filter .ib-boxes{ position:absolute; left:0; top:calc(100% + 6px); z-index:40; min-width:190px; display:flex; flex-direction:column; gap:2px; padding:6px; border-radius:14px; background:var(--g2-pop) !important; border:1px solid var(--g2-edge); box-shadow:var(--g2-shadow); }
html[data-design="2"] .fin-addmenu .fin-more-menu{ left:auto; right:0; }
html[data-design="2"] .fin-more-menu .fleet-tab, html[data-design="2"] .fin-more-menu .text-btn, html[data-design="2"] .ib-filter .ib-box{ text-align:left; width:100%; border-radius:10px; padding:8px 10px; }
html[data-design="2"] .ib-filter > summary{ padding:8px 12px; border-radius:12px; border:1px solid var(--g2-edge); background:var(--g2-card); color:var(--d-ink); font-size:.9rem; }
html[data-design="2"] .ib-tools{ flex-wrap:wrap; }

/* ---- 9. "..." menus for secondary buttons, and pill rows turned into one menu (made by glass2.js) ---- */
html[data-design="2"] .g2-more, html[data-design="2"] .g2-pick{ position:relative; display:inline-block; }
html[data-design="2"] .g2-more > summary, html[data-design="2"] .g2-pick > summary{ list-style:none; cursor:pointer; }
html[data-design="2"] .g2-more > summary::-webkit-details-marker, html[data-design="2"] .g2-pick > summary::-webkit-details-marker{ display:none; }
html[data-design="2"] .g2-more-menu{ position:absolute; left:0; top:calc(100% + 6px); z-index:40; min-width:200px; display:flex; flex-direction:column; gap:2px; padding:6px; border-radius:14px; background:var(--g2-pop) !important; border:1px solid var(--g2-edge); box-shadow:var(--g2-shadow); }
html[data-design="2"] .g2-more-menu .g2-item, html[data-design="2"] .g2-more-menu .fleet-tab{ width:100%; text-align:left; justify-content:flex-start; border:0; background:transparent; border-radius:10px; padding:8px 10px; box-shadow:none; }
html[data-design="2"] .g2-more-menu .g2-item:hover, html[data-design="2"] .g2-more-menu .fleet-tab:hover{ background:rgba(127,127,127,.12); }
html[data-design="2"] .g2-more-menu .fleet-tab.active{ background:var(--accent, #0D5C6E); color:#fff; }
html[data-design="2"] .g2-pick .g2-more-menu.fleet-tabs, html[data-design="2"] .g2-more-menu > .fleet-tabs{ display:flex; flex-direction:column; gap:2px; }
html[data-design="2"] .g2-more[open], html[data-design="2"] .g2-pick[open]{ z-index:60; }
html[data-design="2"] .g2-more > .g2-more-menu{ left:auto; right:0; }
html[data-design="2"] body.in-app.has-sidebar .dash-tabs > *{ flex-shrink:0; }   /* a tall sidebar scrolls; its headings must not be squashed to nothing */

/* ---- 10. Phones: pop-up menus open as a sheet at the bottom of the screen, so they can never run off the edge ---- */
@media (max-width:700px){
  html[data-design="2"] .g2-more-menu, html[data-design="2"] .fin-more-menu, html[data-design="2"] .ib-filter .ib-boxes{
    position:fixed; left:12px !important; right:12px !important; top:auto !important; bottom:12px; width:auto; min-width:0; max-height:70vh; overflow:auto; z-index:80; }
  html[data-design="2"] .doc-filters-pop{ position:fixed; left:12px; right:12px; top:auto; bottom:12px; width:auto; max-height:80vh; overflow:auto; z-index:80; }
}

@media (max-width:860px){ html[data-design="2"] #shop-invoices .row-menu{ left:0; right:auto; max-width:calc(100vw - 32px); } }

/* ---- 11. every pop-up menu is solid, never see-through (the row ⋯ menu was missed first) ---- */
html[data-design="2"] .row-menu, html[data-design="2"] .ux-pop, html[data-design="2"] [class*="-menu"]:not(.nav-groups):not(.more-menu-wrap){ background-clip:padding-box; }
html[data-design="2"] .row-menu{ background:var(--g2-pop) !important; border:1px solid var(--g2-edge); box-shadow:var(--g2-shadow); z-index:60; }
html[data-design="2"] .row-more[open]{ z-index:60; position:relative; }

/* ---- 12. Fixes from Douglas's screenshot (28 Nov) ---- */
/* short windows: the account card shrinks to one line so the menu keeps its room */
@media (max-height:760px){
  html[data-design="2"] body.in-app .nav-account #moreMenuBtn.hdr-avatar{ min-height:44px; padding:6px 8px !important; }
  html[data-design="2"] body.in-app .nav-account #moreMenuBtn::before{ width:30px; height:30px; font-size:12px; }
  html[data-design="2"] body.in-app .nav-account #moreMenuBtn::after{ display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:1; white-space:normal; }
}
/* every text box gets inner spacing and the app font (zero weight: any screen's own box style still wins) */
:where(html[data-design="2"] body.in-app) :where(input:not([type=checkbox],[type=radio],[type=color],[type=range],[type=file],[type=hidden]), textarea){ padding:8px 12px; font-family:inherit; font-size:inherit; box-sizing:border-box; }
:where(html[data-design="2"] body.in-app) :where(textarea){ padding:10px 12px; line-height:1.4; }
/* the round "Ask Natasha" button floats bottom-right: leave room under every page so it never covers the last button */
html[data-design="2"] body.in-app main{ padding-bottom:84px; }
/* the card sits flush on the bottom edge (the sidebar keeps 14px of bottom padding, which left a strip where items showed under the card) */
html[data-design="2"] body.in-app.acct-in-side.has-sidebar .dash-tabs{ padding-bottom:0; }
html[data-design="2"] body.in-app .nav-account{ margin-left:-10px; margin-right:-10px; padding-left:12px; padding-right:12px; padding-bottom:14px; }

/* ======================================================================================================
   13. "Water accents" (option C, chosen by Douglas 28 Nov) and more colour.
   Frosted glass everywhere; water only where it means something: the main buttons are glass capsules of water
   (the surface ripples only while the mouse is on them), and every number card has a thin water line in its colour.
   Each sidebar section has its own colour. NOTHING moves on its own: no background motion, no bubbles (smoothness first).
   ====================================================================================================== */
html[data-design="2"]{
  --wa-1:#7fe8f2; --wa-2:#16a5bc; --wa-3:var(--accent, #0D5C6E);
  --c-work:#14b8c8; --c-cust:#8b5cf6; --c-money:#22c55e; --c-shop:#f97316; --c-misc:#64748b;
  --g2-blob1:rgba(80,215,230,.50); --g2-blob2:rgba(255,170,130,.38);
  --g2-blob3:rgba(167,139,250,.40); --g2-blob4:rgba(110,230,170,.30);
}
html[data-design="2"][data-theme="dark"]{ --g2-blob1:rgba(40,190,210,.22); --g2-blob2:rgba(255,140,100,.14); --g2-blob3:rgba(139,92,246,.20); --g2-blob4:rgba(34,197,94,.12); }
/* colourful underwater light: still one fixed layer, drawn once */
html[data-design="2"] body.in-app::before{
  background-image:radial-gradient(760px 460px at 12% -4%, var(--g2-blob1), transparent 62%),
                   radial-gradient(680px 460px at 92% 6%, var(--g2-blob3), transparent 62%),
                   radial-gradient(720px 520px at 88% 104%, var(--g2-blob2), transparent 62%),
                   radial-gradient(620px 420px at 22% 96%, var(--g2-blob4), transparent 62%),
                   linear-gradient(135deg, var(--g2-bg1), var(--g2-bg2) 55%, var(--g2-bg3));
}

/* -- thick glass: a soft gloss across the top of panels and cards, a bright top rim, a little depth at the bottom -- */
html[data-design="2"] body.in-app :is(.card,.job-card,.van-card,.bay-card,.cw-wrap,.request-card,.account-row,.today-tile,.doc-card,.fin-card,.an-tile,.stat-box){
  background-image:linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0) 46%);
  box-shadow:var(--g2-shadow), inset 0 1px 0 rgba(255,255,255,.85), inset 0 -10px 18px rgba(13,92,110,.05);
}
html[data-design="2"][data-theme="dark"] body.in-app :is(.card,.job-card,.van-card,.bay-card,.cw-wrap,.request-card,.account-row,.today-tile,.doc-card,.fin-card,.an-tile,.stat-box){
  background-image:linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 46%);
  box-shadow:var(--g2-shadow), inset 0 1px 0 rgba(180,240,250,.16), inset 0 -10px 18px rgba(0,0,0,.18);
}

/* -- main buttons: a glass capsule of water. The wave only shows and moves while hovered. -- */
html[data-design="2"] body.in-app :is(.dash-panel, .section, .fleet-main) :is(button:not([class]):not([role]), .btn-primary, #docNewBtn){
  position:relative; color:#fff !important; border:0 !important; text-shadow:0 1px 2px rgba(0,0,0,.22);
  background-color:var(--wa-3) !important;
  background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 6"><path d="M0 3 Q10 0 20 3 T40 3 V6 H0Z" fill="%23bff4f9" fill-opacity=".55"/></svg>'),
                   linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0) 48%),
                   linear-gradient(180deg, color-mix(in srgb, var(--wa-3) 35%, var(--wa-1)), color-mix(in srgb, var(--wa-3) 70%, var(--wa-2)) 52%, var(--wa-3)) !important;
  background-repeat:repeat-x, no-repeat, no-repeat; background-size:40px 6px, 100% 100%, 100% 100%; background-position:0 -8px, 0 0, 0 0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65), inset 0 -6px 12px rgba(0,0,0,.18), 0 8px 18px -6px color-mix(in srgb, var(--wa-3) 70%, transparent) !important;
  transition:background-position .35s ease, transform .12s ease;
}
html[data-design="2"] body.in-app :is(.dash-panel, .section, .fleet-main) :is(button:not([class]):not([role]), .btn-primary, #docNewBtn):hover:not(:disabled){ background-position:0 2px, 0 0, 0 0; animation:g2Ripple 1.6s linear infinite; }
html[data-design="2"] body.in-app :is(.dash-panel, .section, .fleet-main) :is(button:not([class]):not([role]), .btn-primary, #docNewBtn):active:not(:disabled){ transform:scale(.97); }
html[data-design="2"] body.in-app :is(.dash-panel, .section, .fleet-main) :is(button:not([class]):not([role]), .btn-primary, #docNewBtn):disabled{ filter:grayscale(.5) opacity(.6); }
@keyframes g2Ripple{ from{ background-position:0 2px, 0 0, 0 0; } to{ background-position:40px 2px, 0 0, 0 0; } }

/* -- the sidebar: each section has its own colour; the selected item is a light glass pill with a coloured edge -- */
html[data-design="2"] body.in-app .dash-tabs{ --nc:var(--c-work); }
html[data-design="2"] body.in-app .nav-heading[data-group-title="Work"]{ color:var(--c-work); }
html[data-design="2"] body.in-app .nav-heading[data-group-title="Customers"]{ color:var(--c-cust); }
html[data-design="2"] body.in-app .nav-heading[data-group-title="Money"]{ color:#16a34a; }
html[data-design="2"] body.in-app .nav-heading[data-group-title="Shop"]{ color:var(--c-shop); }
html[data-design="2"] body.in-app :is([data-navgroup="overview"],[data-navgroup="work"],[data-navgroup="schedule"],[data-navgroup="dispatch"]){ --nc:var(--c-work); }
html[data-design="2"] body.in-app :is([data-navgroup="customers"],[data-navgroup="messages"],[data-navgroup="vin"]){ --nc:var(--c-cust); }
html[data-design="2"] body.in-app :is([data-navgroup="money"],[data-navgroup="finance"],[data-navgroup="reports"]){ --nc:var(--c-money); }
html[data-design="2"] body.in-app :is([data-navgroup="parts"],[data-navgroup="team"],[data-navgroup="settings"]){ --nc:var(--c-shop); }
html[data-design="2"] body.in-app [data-navgroup="trash"]{ --nc:var(--c-misc); }
/* the icon sits in a small glass chip of that colour */
html[data-design="2"] body.in-app .dash-tabs .dash-tab .nav-ico{
  width:28px !important; height:28px !important; padding:5px; border-radius:9px; flex:none; box-sizing:border-box; color:#fff !important;
  background:linear-gradient(180deg, color-mix(in srgb, var(--nc) 55%, white), color-mix(in srgb, var(--nc) 88%, black 6%));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65), inset 0 -3px 6px rgba(0,0,0,.14), 0 3px 8px -2px color-mix(in srgb, var(--nc) 55%, transparent);
}
html[data-design="2"] body.in-app.has-sidebar .dash-tab.active, html[data-design="2"] body.in-app #adminView .dash-tab.active{
  background:linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.48)) !important; color:color-mix(in srgb, var(--nc) 70%, #0d2a33) !important;
  box-shadow:inset 3px 0 0 var(--nc), inset 0 1px 0 #fff, 0 6px 14px -6px color-mix(in srgb, var(--nc) 45%, transparent) !important;
}
html[data-design="2"][data-theme="dark"] body.in-app.has-sidebar .dash-tab.active, html[data-design="2"][data-theme="dark"] body.in-app #adminView .dash-tab.active{
  background:linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05)) !important; color:color-mix(in srgb, var(--nc) 55%, white) !important;
  box-shadow:inset 3px 0 0 var(--nc), inset 0 1px 0 rgba(255,255,255,.18), 0 6px 14px -6px rgba(0,0,0,.4) !important;
}
html[data-design="2"] body.in-app #adminView .dash-tab.active .nav-ico{ color:#fff; }
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:var(--d-tint); color:var(--d-accent-text); }

/* -- number cards: tinted glass with a thin water line at the bottom, in the card's colour -- */
html[data-design="2"] body.in-app :is(.today-tile,.doc-card,.fin-card,.an-tile,.stat-box){
  --wl:var(--c-work); position:relative; overflow:hidden;
  background-image:linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0) 46%),
                   linear-gradient(160deg, color-mix(in srgb, var(--wl) 16%, transparent), transparent 70%) !important;
}
html[data-design="2"] body.in-app :is(.today-tile,.doc-card,.fin-card,.an-tile,.stat-box)::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:6px; pointer-events:none;
  background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 4"><path d="M0 2 Q10 0 20 2 T40 2 V4 H0Z" fill="white" fill-opacity=".35"/></svg>') 0 0 / 40px 3px repeat-x,
             linear-gradient(180deg, color-mix(in srgb, var(--wl) 55%, white), var(--wl));
}
html[data-design="2"] body.in-app :is(.today-tile,.fin-card,.an-tile,.stat-box):nth-child(6n+1){ --wl:#3b82f6; }
html[data-design="2"] body.in-app :is(.today-tile,.fin-card,.an-tile,.stat-box):nth-child(6n+2){ --wl:#8b5cf6; }
html[data-design="2"] body.in-app :is(.today-tile,.fin-card,.an-tile,.stat-box):nth-child(6n+3){ --wl:#14b8c8; }
html[data-design="2"] body.in-app :is(.today-tile,.fin-card,.an-tile,.stat-box):nth-child(6n+4){ --wl:#f59e0b; }
html[data-design="2"] body.in-app :is(.today-tile,.fin-card,.an-tile,.stat-box):nth-child(6n+5){ --wl:#f97316; }
html[data-design="2"] body.in-app :is(.today-tile,.fin-card,.an-tile,.stat-box):nth-child(6n+6){ --wl:#22c55e; }
html[data-design="2"] body.in-app .doc-card{ --wl:#3b82f6; } html[data-design="2"] body.in-app .doc-card.bad{ --wl:#ef4444; } html[data-design="2"] body.in-app .doc-card.good{ --wl:#22c55e; }

/* -- counts are little glossy drops; status labels get a glass gloss -- */
html[data-design="2"] body.in-app :is(.notif-count,.nav-badge,.nav-sub-badge){
  background:radial-gradient(circle at 35% 28%, rgba(255,255,255,.75) 0 14%, transparent 38%), linear-gradient(180deg,#ff8a7a,#dc2626) !important; color:#fff !important;
  box-shadow:inset 0 -2px 4px rgba(0,0,0,.22), 0 3px 8px -2px rgba(220,38,38,.55) !important; border:0 !important;
}
html[data-design="2"] body.in-app .badge{ box-shadow:inset 0 1px 0 rgba(255,255,255,.75), inset 0 -3px 6px rgba(0,0,0,.06); }
html[data-design="2"] body.in-app .nav-account #moreMenuBtn::before{ background:radial-gradient(circle at 35% 28%, rgba(255,255,255,.85) 0 14%, transparent 40%), linear-gradient(180deg,#ffc56e,#ff7b54); }
@media (prefers-reduced-motion:reduce){ html[data-design="2"] body.in-app :is(button,.btn-primary){ animation:none !important; transition:none !important; } }
html[data-design="2"] body.in-app :is(.nav-badge,.nav-sub-badge):not(.hidden){ display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 6px; border-radius:999px; font:700 11px/1 'Plus Jakarta Sans', var(--d-font); box-sizing:border-box; }

/* ---- 14. Fixes from the live site (29 Nov, Douglas's screenshots) ---- */
/* the account menu: plain, calm rows (no capsule buttons), clear spacing */
html[data-design="2"] body.in-app .more-menu{ padding:8px; border-radius:18px; min-width:250px; }
html[data-design="2"] body.in-app .more-menu button, html[data-design="2"] body.in-app .more-menu .acct-loc-opt{
  display:block; width:100%; text-align:left; padding:10px 12px; border-radius:10px; border:0; background:transparent !important; color:var(--d-ink) !important;
  box-shadow:none !important; font-weight:600; text-shadow:none; }
html[data-design="2"] body.in-app .more-menu button:hover{ background:var(--d-tint) !important; }
html[data-design="2"] body.in-app .more-menu #logoutBtn{ color:#d64545 !important; border-top:1px solid var(--g2-edge); border-radius:0 0 10px 10px; margin-top:4px; }
/* Finance: the "More" menu must open fully on top of the page content (it was clipped by the tab row) */
html[data-design="2"] #finRoot, html[data-design="2"] #finRoot .fin-head, html[data-design="2"] #finRoot .fin-tabs{ overflow:visible !important; }
html[data-design="2"] .fin-more[open]{ z-index:70; }
html[data-design="2"] #finRoot .fin-tabs{ position:relative; z-index:5; flex-wrap:wrap; }
html[data-design="2"] .fin-more-menu{ z-index:70; }

/* ---- 15. Invoice / estimate window: one main action + a "More" menu; payment form folded; solid footer ---- */
html[data-design="2"] .pay-form.pay-collapsed{ display:none; }
html[data-design="2"] .est-actions{ background:var(--g2-pop) !important; backdrop-filter:none !important; -webkit-backdrop-filter:none !important; border-top:1px solid var(--g2-edge);
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 16px; position:sticky; bottom:0; z-index:6; }
html[data-design="2"] .est-more{ position:relative; margin-left:auto; }
html[data-design="2"] .est-more > summary{ list-style:none; cursor:pointer; }
html[data-design="2"] .est-more > summary::-webkit-details-marker{ display:none; }
html[data-design="2"] .est-more-menu{ position:absolute; right:0; bottom:calc(100% + 8px); z-index:80; min-width:210px; display:flex; flex-direction:column; gap:2px; padding:6px;
  border-radius:14px; background:var(--g2-pop) !important; border:1px solid var(--g2-edge); box-shadow:var(--g2-shadow); max-height:60vh; overflow:auto; }
html[data-design="2"] .est-more-menu button{ width:100%; text-align:left; justify-content:flex-start; border:0 !important; background:transparent !important; color:var(--d-ink) !important;
  box-shadow:none !important; padding:9px 12px; min-height:0 !important; border-radius:10px; font-weight:600; text-shadow:none; }
html[data-design="2"] .est-more-menu button:hover{ background:var(--d-tint) !important; }
html[data-design="2"] .est-more-menu .est-del{ color:#d64545 !important; }

/* ---- 16. Work order window: calmer (one main action, four tabs + More, a one-line summary) ---- */
html[data-design="2"] .g2-water{
  position:relative; color:#fff !important; border:0 !important; text-shadow:0 1px 2px rgba(0,0,0,.22); background-color:var(--wa-3) !important;
  background-image:linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0) 48%), linear-gradient(180deg, color-mix(in srgb, var(--wa-3) 35%, var(--wa-1)), color-mix(in srgb, var(--wa-3) 70%, var(--wa-2)) 52%, var(--wa-3)) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65), inset 0 -6px 12px rgba(0,0,0,.18), 0 8px 18px -6px color-mix(in srgb, var(--wa-3) 70%, transparent) !important; }
html[data-design="2"] .wo-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
html[data-design="2"] .wo-actions .g2-more{ margin-left:auto; }
html[data-design="2"] .g2-tabmore{ position:relative; display:inline-block; }
html[data-design="2"] .g2-tabmore > summary{ list-style:none; cursor:pointer; }
html[data-design="2"] .g2-tabmore > summary::-webkit-details-marker{ display:none; }
html[data-design="2"] .g2-tabmore.on > summary{ color:var(--accent, #0D5C6E); font-weight:700; }
html[data-design="2"] .g2-tabmore .g2-more-menu{ left:0; right:auto; min-width:190px; }
html[data-design="2"] .g2-tabmore .g2-more-menu .wo-tab{ width:100%; text-align:left; border-radius:10px; padding:9px 12px; }
html[data-design="2"] .g2-wo-more .g2-more-menu{ bottom:auto; top:calc(100% + 6px); right:0; left:auto; }
/* the 6 boxes become one quiet line of 4 figures (Inspection and Approval live in their own tabs) */
html[data-design="2"] .wo-summary{ display:flex !important; flex-wrap:wrap; gap:6px 22px; border:0 !important; background:transparent !important; box-shadow:none !important; padding:4px 2px !important; margin:6px 0 !important; }
html[data-design="2"] .wo-summary > *{ border:0 !important; padding:0 !important; background:transparent !important; flex:none !important; min-width:0 !important; }
html[data-design="2"] .wo-summary > :nth-child(3), html[data-design="2"] .wo-summary > :nth-child(5){ display:none; }
/* the side panel repeats the Overview tab; keep it only when there is plenty of room */
@media (max-width:1100px){ html[data-design="2"] .wo-layout.has-side .wo-side{ display:none !important; } html[data-design="2"] .wo-layout.has-side{ display:block !important; } }
html[data-design="2"] .g2-water{ padding:0 18px; min-height:44px; border-radius:14px; font:700 .9rem var(--d-font, inherit); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
html[data-design="2"] .g2-water:hover{ filter:brightness(1.06); }

/* ---- 17. Every floating box is solid (the tour box, Natasha's panel, notices, suggestion lists and small menus were see-through) ---- */
/* v2.9: .nav-fly only when it really floats (the collapsed menu). In the open menu the sub-pages are plain menu lines, not a white box (Douglas, 2 Dec). */
html[data-design="2"] :is(.tour-pop, .assist-panel, .complete-toast, .address-suggestions, .wo-move-menu, .rss-list, body.nav-collapsed .nav-fly, .map-satellite-toggle){
  background:var(--g2-pop) !important; backdrop-filter:none !important; -webkit-backdrop-filter:none !important; border:1px solid var(--g2-edge); box-shadow:var(--g2-shadow); }

/* the boxes that use --card (Messages list and conversation, small pills) follow the glass card colour */
html[data-design="2"] body.in-app{ --card:var(--g2-card); }

/* safety net: a plain button takes the text colour of its surroundings (browsers paint button text black, which is invisible in dark mode).
   Zero weight: any button that sets its own colour keeps it. */
:where(html[data-design="2"] body.in-app) :where(button, summary){ color:inherit; }

/* ---- 18. Dark mode readability (found with a contrast check of every screen on 29 Nov) ---- */
html[data-design="2"][data-theme="dark"] .ro-head-num{ color:#7fe3ee; }
/* muted text is lighter on dark glass (it was grey on near-black: hard to read) */
html[data-design="2"][data-theme="dark"]{ --ink-soft:#BFD0D6; --ink-faint:#A3B6BD; --d-soft:#BFD0D6; }
html[data-design="2"][data-theme="dark"] .neg, html[data-design="2"][data-theme="dark"] .fin-bar-net.neg{ color:#FF8F85; }

/* ---- 19. The "More" tab in the work order window opens fully (the tab row clipped its menu, so clicking did nothing visible) ---- */
html[data-design="2"] nav.wo-tabs{ overflow:visible !important; position:relative; z-index:6; flex-wrap:wrap; }
html[data-design="2"] .g2-tabmore[open]{ z-index:70; }
html[data-design="2"] .g2-tabmore .g2-more-menu{ z-index:80; top:calc(100% + 4px); }
html[data-design="2"] .wo-actions{ position:relative; z-index:7; overflow:visible !important; }

/* v2.9: the account card is the menu's footer (sticky at the bottom). A sticky footer stops at the menu's bottom PADDING, so any
   bottom padding left a strip under the card where menu items scrolled by (Admin: 18px from admin-v3.css, "VIN lookup" showed
   under the card; the collapsed menu: 10px). Menus with the account card have no bottom padding. */
html[data-design="2"] body.in-app .dash-tabs:has(.nav-account),
html[data-design="2"] body.in-app #adminView .dash-tabs:has(.nav-account),
html[data-design="2"] body.has-sidebar.nav-collapsed .dash-tabs:has(.nav-account){ padding-bottom:0 !important; }
