/* Site Builder Builder — the side menu and the pages beside it
   (#sbnav, shell.js; body.sb-shell while one of its pages is open)

   Sites, Customers, Developer, Site Manager, CRM and Invoices open beside one
   menu in the Slashboom site's own cloth: the black room with a few stars and
   a far-off grey nebula, Michroma for the wide display lines, Manrope for
   everything else, white on black, gold for what you point at and maroon for
   the glow behind it.

   The menu is a dark sheet tipped back on its right edge — the left edge
   nearest, the right edge further away and shorter, like a page turned toward
   you. Hovering an item fades the others back and draws a gold line under it
   as it comes forward off the sheet; a click fades its page in beside the
   menu (shell.js restarts .sb-enter on the page's main block).

   The white headers stand down on these pages: what was in them is in the
   menu, and the page's own buttons float top-right — on Sites, just Settings
   and the plus for a new project. Cards and panels stay the house's white,
   brighter here (--glass) so they sit cleanly on the black. Below 900px the
   menu straightens into a bar across the top. */

/* ---- the cloth: fonts and colours, scoped to the menu and its pages ----
   Everything beside the menu wears the menu's own sheet: near-black with the
   faint 24px graph-paper grid, white-14% hairline edges, white words, gold
   for what you point at, maroon behind it — and square corners throughout. */
.sbnav, body.sb-shell .view {
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--sans);
  --wide: "Michroma", "Manrope", system-ui, sans-serif;
  --sb-grid:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 24px 24px;
  --sb-sheet: var(--sb-grid), linear-gradient(165deg, #161616 0%, #0B0B0B 55%, #0E0607 100%);
  font-family: var(--sans);
}
body.sb-shell .view {
  --ink: #F4F4F4;
  --muted: rgba(255, 255, 255, .64);
  --line: rgba(255, 255, 255, .16);
  --line-soft: rgba(255, 255, 255, .09);
  --glass: #0D0D0D;
  --glass-2: #171717;
  --raised: rgba(255, 255, 255, .06);
  --accent-deep: #F0A3B0;
  --accent-soft: rgba(123, 30, 46, .5);
  --danger-ink: #FF8F86;
  --danger-bg: rgba(220, 70, 60, .14);
  --danger-line: rgba(255, 120, 110, .45);
  --ok: #3FCF95;
  --warn: #F2B53A;
  --shadow-rest: none;
  --shadow-lift: 0 16px 34px -16px rgba(123, 30, 46, .8);
  color: var(--ink);
}
:root { --sbnav-w: 380px; }

/* ---- the ground: the black room ----
   Two tiles of scattered stars of different sizes (so the repeat never lines
   up where the eye can catch it), a grey nebula far off top-right and a
   maroon glow low behind the menu. All on the fixed layer. */
body.dash { background-color: #000; }
body.dash::before {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1100' height='900'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='356' cy='136' r='0.93' fill-opacity='0.34'/%3E%3Ccircle cx='589' cy='329' r='0.63' fill-opacity='0.55'/%3E%3Ccircle cx='41' cy='390' r='0.63' fill-opacity='0.35'/%3E%3Ccircle cx='467' cy='744' r='0.66' fill-opacity='0.41'/%3E%3Ccircle cx='690' cy='853' r='0.89' fill-opacity='0.50'/%3E%3Ccircle cx='1074' cy='42' r='1.03' fill-opacity='0.44'/%3E%3Ccircle cx='159' cy='106' r='0.75' fill-opacity='0.71'/%3E%3Ccircle cx='199' cy='523' r='0.92' fill-opacity='0.49'/%3E%3Ccircle cx='603' cy='57' r='0.63' fill-opacity='0.40'/%3E%3Ccircle cx='748' cy='385' r='0.76' fill-opacity='0.59'/%3E%3Ccircle cx='499' cy='270' r='1.00' fill-opacity='0.65'/%3E%3Ccircle cx='269' cy='517' r='0.86' fill-opacity='0.74'/%3E%3Ccircle cx='802' cy='259' r='1.09' fill-opacity='0.36'/%3E%3Ccircle cx='460' cy='681' r='0.68' fill-opacity='0.54'/%3E%3Ccircle cx='43' cy='601' r='0.98' fill-opacity='0.59'/%3E%3Ccircle cx='963' cy='282' r='0.95' fill-opacity='0.60'/%3E%3Ccircle cx='638' cy='411' r='1.02' fill-opacity='0.77'/%3E%3Ccircle cx='522' cy='598' r='0.63' fill-opacity='0.65'/%3E%3Ccircle cx='712' cy='894' r='1.01' fill-opacity='0.44'/%3E%3Ccircle cx='424' cy='602' r='0.61' fill-opacity='0.53'/%3E%3Ccircle cx='185' cy='105' r='0.63' fill-opacity='0.68'/%3E%3Ccircle cx='142' cy='223' r='0.80' fill-opacity='0.74'/%3E%3Ccircle cx='89' cy='404' r='0.87' fill-opacity='0.74'/%3E%3Ccircle cx='901' cy='778' r='0.74' fill-opacity='0.51'/%3E%3Ccircle cx='395' cy='796' r='1.08' fill-opacity='0.38'/%3E%3Ccircle cx='194' cy='209' r='0.72' fill-opacity='0.54'/%3E%3Ccircle cx='648' cy='236' r='0.60' fill-opacity='0.51'/%3E%3Ccircle cx='406' cy='510' r='1.08' fill-opacity='0.65'/%3E%3Ccircle cx='567' cy='556' r='0.94' fill-opacity='0.33'/%3E%3Ccircle cx='989' cy='702' r='1.04' fill-opacity='0.70'/%3E%3Ccircle cx='432' cy='359' r='0.65' fill-opacity='0.62'/%3E%3Ccircle cx='68' cy='61' r='0.70' fill-opacity='0.38'/%3E%3Ccircle cx='374' cy='47' r='0.60' fill-opacity='0.38'/%3E%3Ccircle cx='112' cy='327' r='0.61' fill-opacity='0.74'/%3E%3Ccircle cx='675' cy='134' r='0.73' fill-opacity='0.47'/%3E%3Ccircle cx='401' cy='111' r='1.02' fill-opacity='0.80'/%3E%3Ccircle cx='513' cy='435' r='0.64' fill-opacity='0.35'/%3E%3Ccircle cx='377' cy='238' r='1.01' fill-opacity='0.38'/%3E%3Ccircle cx='25' cy='856' r='0.86' fill-opacity='0.37'/%3E%3Ccircle cx='597' cy='24' r='0.86' fill-opacity='0.79'/%3E%3Ccircle cx='950' cy='627' r='0.73' fill-opacity='0.48'/%3E%3Ccircle cx='184' cy='695' r='0.87' fill-opacity='0.69'/%3E%3Ccircle cx='363' cy='201' r='1.01' fill-opacity='0.79'/%3E%3Ccircle cx='938' cy='725' r='1.01' fill-opacity='0.67'/%3E%3Ccircle cx='249' cy='466' r='0.78' fill-opacity='0.31'/%3E%3Ccircle cx='31' cy='251' r='0.73' fill-opacity='0.65'/%3E%3Ccircle cx='1052' cy='403' r='1.07' fill-opacity='0.79'/%3E%3Ccircle cx='1051' cy='328' r='0.71' fill-opacity='0.41'/%3E%3Ccircle cx='216' cy='184' r='0.91' fill-opacity='0.75'/%3E%3Ccircle cx='924' cy='432' r='0.93' fill-opacity='0.70'/%3E%3Ccircle cx='93' cy='595' r='1.05' fill-opacity='0.69'/%3E%3Ccircle cx='825' cy='430' r='0.69' fill-opacity='0.69'/%3E%3Ccircle cx='366' cy='721' r='1.09' fill-opacity='0.50'/%3E%3Ccircle cx='442' cy='852' r='0.96' fill-opacity='0.39'/%3E%3Ccircle cx='140' cy='136' r='1.05' fill-opacity='0.70'/%3E%3Ccircle cx='161' cy='744' r='1.09' fill-opacity='0.63'/%3E%3Ccircle cx='385' cy='494' r='0.67' fill-opacity='0.31'/%3E%3Ccircle cx='1068' cy='585' r='0.86' fill-opacity='0.77'/%3E%3Ccircle cx='477' cy='785' r='1.01' fill-opacity='0.41'/%3E%3Ccircle cx='277' cy='264' r='0.72' fill-opacity='0.59'/%3E%3Ccircle cx='285' cy='377' r='0.67' fill-opacity='0.76'/%3E%3Ccircle cx='389' cy='412' r='0.89' fill-opacity='0.75'/%3E%3Ccircle cx='463' cy='826' r='0.85' fill-opacity='0.57'/%3E%3Ccircle cx='576' cy='17' r='0.82' fill-opacity='0.39'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1500' height='1300'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='1016' cy='1020' r='1.26' fill-opacity='0.75'/%3E%3Ccircle cx='590' cy='1296' r='1.14' fill-opacity='0.61'/%3E%3Ccircle cx='392' cy='339' r='1.16' fill-opacity='0.66'/%3E%3Ccircle cx='161' cy='423' r='1.16' fill-opacity='0.78'/%3E%3Ccircle cx='302' cy='92' r='1.10' fill-opacity='0.77'/%3E%3Ccircle cx='583' cy='954' r='1.40' fill-opacity='0.72'/%3E%3Ccircle cx='149' cy='946' r='1.38' fill-opacity='0.71'/%3E%3Ccircle cx='987' cy='389' r='1.46' fill-opacity='0.88'/%3E%3Ccircle cx='1188' cy='1240' r='1.12' fill-opacity='0.77'/%3E%3Ccircle cx='1097' cy='1042' r='1.20' fill-opacity='0.61'/%3E%3Ccircle cx='939' cy='136' r='1.35' fill-opacity='0.55'/%3E%3Ccircle cx='682' cy='624' r='1.06' fill-opacity='0.74'/%3E%3Ccircle cx='750' cy='480' r='1.45' fill-opacity='0.90'/%3E%3Ccircle cx='1336' cy='318' r='1.01' fill-opacity='0.70'/%3E%3Ccircle cx='170' cy='917' r='1.13' fill-opacity='0.60'/%3E%3Ccircle cx='426' cy='524' r='1.37' fill-opacity='0.73'/%3E%3Ccircle cx='452' cy='881' r='1.02' fill-opacity='0.63'/%3E%3Ccircle cx='1031' cy='978' r='1.05' fill-opacity='0.58'/%3E%3Ccircle cx='759' cy='853' r='1.01' fill-opacity='0.72'/%3E%3Ccircle cx='412' cy='111' r='1.09' fill-opacity='0.66'/%3E%3Ccircle cx='701' cy='146' r='1.31' fill-opacity='0.90'/%3E%3Ccircle cx='1026' cy='88' r='1.32' fill-opacity='0.80'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(1000px 640px at 94% -14%, rgba(150, 150, 150, .16), transparent 70%),
    radial-gradient(520px 380px at 70% 8%, rgba(212, 212, 212, .05), transparent 70%),
    radial-gradient(820px 680px at -12% 108%, rgba(123, 30, 46, .3), transparent 70%),
    radial-gradient(640px 420px at 62% 124%, rgba(178, 58, 78, .12), transparent 70%),
    linear-gradient(180deg, #060606 0%, #000 60%);
  background-size: 1100px 900px, 1500px 1300px, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}
body.sb-shell ::selection { background: var(--gold); color: #000; }

/* ---- the menu ---- */
/* The box runs past the sheet so the glow behind it has room; it lets every
   click through but the sheet's. */
.sbnav {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: calc(var(--sbnav-w) + 140px);
  padding: 22px 0 22px 22px;
  perspective: 1400px; perspective-origin: 0 50%;
  pointer-events: none;
}
.sbnav-panel {
  pointer-events: auto; position: relative; height: 100%; width: calc(var(--sbnav-w) - 22px);
  display: flex; flex-direction: column; gap: 34px;
  padding: 32px 22px 26px 24px;
  /* the tip: left edge nearest, right edge turned gently away */
  transform: rotateY(9deg); transform-origin: 0 50%; transform-style: preserve-3d;
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(130% 55% at 0% 0%, rgba(255, 255, 255, .09), transparent 62%),
    radial-gradient(120% 50% at 0% 100%, rgba(123, 30, 46, .32), transparent 70%),
    linear-gradient(165deg, #161616 0%, #0B0B0B 55%, #0E0607 100%);
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 6px;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .08);
  animation: sbnav-in .8s var(--ease-out) both;
}
/* its glow lives on the flat layer behind it: a shadow on the tipped sheet is
   cut off square at the edge of the browser's 3D layer */
.sbnav::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: calc(var(--sbnav-w) + 110px); z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 34% at 46% 88%, rgba(123, 30, 46, .34), transparent 72%),
    radial-gradient(50% 40% at 40% 20%, rgba(255, 255, 255, .035), transparent 70%);
}
@keyframes sbnav-in { from { opacity: 0; transform: rotateY(30deg); } }
/* a light that runs down the far edge now and then */
.sbnav-panel::after {
  content: ''; position: absolute; right: -1px; top: 0; width: 1px; height: 22%;
  background: linear-gradient(180deg, transparent, rgba(245, 197, 24, .85), transparent);
  box-shadow: 0 0 10px rgba(245, 197, 24, .5);
  opacity: 0; animation: sbnav-scan 7s var(--ease-out) 1.2s infinite;
  pointer-events: none;
}
@keyframes sbnav-scan {
  0% { opacity: 0; transform: translateY(-10%); }
  8% { opacity: 1; }
  38% { opacity: 1; }
  46%, 100% { opacity: 0; transform: translateY(380%); }
}

.sbnav-brand { display: block; width: fit-content; padding: 4px 2px; border-radius: 2px; transform: translateZ(10px); }
.sbnav-brand .brand-logo { height: 25px; filter: invert(1); transition: opacity .24s var(--ease-out); }
.sbnav-brand:hover .brand-logo { opacity: .82; }
.sbnav-brand:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.sbnav-items { display: flex; flex-direction: column; gap: 4px; transform-style: preserve-3d; }
.sbnav-item {
  position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 12px;
  padding: 13px 10px 13px 14px; border-radius: 3px;
  color: #FFFFFF; text-decoration: none;
  opacity: .7;
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out), background-color .5s var(--ease-out);
}
/* the icons are for the narrow bar; on the sheet the numbers lead */
.sbnav-item > svg, .sbnav-item > img { display: none; width: 16px; height: 16px; color: rgba(255, 255, 255, .85); transition: color .4s var(--ease-out); }
.sbnav-num { font: 400 9.5px var(--wide); letter-spacing: .06em; color: rgba(255, 255, 255, .5); transition: color .4s var(--ease-out); }
.sbnav-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sbnav-txt b {
  position: relative; width: fit-content; max-width: 100%;
  font: 400 12px/1.25 var(--wide); letter-spacing: .03em; text-transform: uppercase; font-synthesis: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-bottom: 3px;
}
/* the Slashboom site's underline: a short stub that runs out in gold on hover */
.sbnav-txt b::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; opacity: 0; transform: scaleX(.3); transform-origin: left;
  transition: transform .45s var(--ease-out), opacity .45s var(--ease-out), background-color .45s var(--ease-out);
}
.sbnav-txt small { font: 500 11px/1.3 var(--sans); color: rgba(255, 255, 255, .58); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the gold bar at the near edge marks the page you are on */
.sbnav-item::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 2px; border-radius: 2px;
  background: var(--gold); box-shadow: 0 0 12px rgba(245, 197, 24, .7);
  transform: scaleY(0); transition: transform .45s var(--ease-out);
}

.sbnav-item.is-on {
  opacity: 1;
  background-color: rgba(123, 30, 46, .32);
  background-image: linear-gradient(90deg, rgba(123, 30, 46, .55), rgba(123, 30, 46, 0) 92%);
}
.sbnav-item.is-on::before { transform: scaleY(1); }
.sbnav-item.is-on .sbnav-num { color: var(--gold); }

/* hover: the rest fade back, the one under the pointer comes forward */
.sbnav-items:hover .sbnav-item { opacity: .3; }
.sbnav-items:hover .sbnav-item.is-on { opacity: .55; }
.sbnav-items .sbnav-item:hover, .sbnav-items .sbnav-item:focus-visible {
  opacity: 1; transform: translateZ(22px) translateX(6px);
  background-color: rgba(255, 255, 255, .07);
}
.sbnav-item:hover .sbnav-num, .sbnav-item:focus-visible .sbnav-num { color: var(--gold); }
.sbnav-item:hover > svg, .sbnav-item:focus-visible > svg { color: #FFFFFF; }
.sbnav-item:hover .sbnav-txt b::after, .sbnav-item:focus-visible .sbnav-txt b::after { opacity: 1; transform: scaleX(1); background-color: var(--gold); }
.sbnav-items .sbnav-item:active { transform: translateZ(8px) translateX(4px) scale(.98); transition-duration: .06s; }
.sbnav-item:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Site Manager's count: the sites that need a look */
.sbnav-item .cat-count {
  position: absolute; right: 10px; top: 50%; margin-top: -8px;
  font: 700 10.5px/15px var(--sans); min-width: 19px; padding: 0 6px; border-radius: 999px; text-align: center;
  color: var(--gold); background: rgba(245, 197, 24, .14); border: 1px solid rgba(245, 197, 24, .4);
}
/* Search Console stands in for Site Manager only while Site Manager is off */
.sbnav-gsc { display: none; }
#care-btn[hidden] + .sbnav-gsc { display: grid; }
body:has(#care-btn[hidden]) .gsc-crumbs { display: none; }

.sbnav-foot {
  margin-top: auto; display: flex; align-items: flex-start; gap: 10px;
  font: 400 8.5px/1.7 var(--wide); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .4);
}
/* the Slashboom full stop */
.sbnav-foot i { flex: none; width: 7px; height: 7px; margin-top: 3px; background: var(--gold); box-shadow: 0 0 10px rgba(245, 197, 24, .55); }

/* ---- the pages beside it ---- */
body.sb-shell .view { padding-left: var(--sbnav-w); animation: none; }
body.sb-shell #view-home:has(#home-sites) { background: transparent; }
body.sb-shell .app-banner { padding-left: calc(var(--sbnav-w) + 20px); }

/* the page fades in beside the menu, drifting off it */
@keyframes sb-enter { from { opacity: 0; transform: translateX(-24px); filter: blur(5px); } }
body.sb-shell .sb-enter { animation: sb-enter .6s var(--ease-out) both; }

/* the white bar stands down: the page's own buttons float top-right over a
   band of black that the page scrolls away under */
body.sb-shell .view > .home-head {
  position: sticky; top: 0; z-index: 25;
  justify-content: flex-end; min-height: 74px; padding: 18px 34px 14px;
  background: none; border-bottom: 0; pointer-events: none;
}
/* the band runs on under the menu, so it never ends in a line at its edge */
body.sb-shell .view > .home-head::before {
  content: ''; position: absolute; inset: 0 0 0 calc(-1 * var(--sbnav-w)); z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, .94) 0%, rgba(0, 0, 0, .7) 58%, transparent 100%);
}
body.sb-shell .home-head .head-actions { pointer-events: auto; gap: 10px; }
body.sb-shell .home-head .btn[aria-label="Settings"] { order: -1; }
body.sb-shell .home-head .btn:not(.gsc-btn) {
  background: rgba(0, 0, 0, .5); color: #FFFFFF; border-color: rgba(255, 255, 255, .5);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 32px -16px rgba(123, 30, 46, .75);
}
body.sb-shell .home-head .btn:not(.gsc-btn):hover {
  background: var(--gold); color: #000; border-color: var(--gold);
  transform: translateY(-2px); box-shadow: 0 18px 36px -16px rgba(178, 58, 78, .85);
}
body.sb-shell .home-head .btn:not(.gsc-btn):active { transform: translateY(0) scale(.95); transition-duration: .06s; }
body.sb-shell .home-head .btn.primary { background: #FFFFFF; color: #000; border-color: #FFFFFF; }
body.sb-shell .home-head .btn.icon { width: 42px; height: 42px; padding: 0; justify-content: center; }
body.sb-shell .home-head .btn.icon svg { width: 17px; height: 17px; }
body.sb-shell .home-head .btn.new-plus svg { width: 19px; height: 19px; }
body.sb-shell .home-head .btn:not(.icon) { min-height: 42px; padding: 0 18px; }
body.sb-shell .home-head .gsc-btn { min-height: 42px; }

/* the mains start under the band */
body.sb-shell .home-main { max-width: 1440px; padding: 2px 40px 64px; }
body.sb-shell .dev-main, body.sb-shell .crm-main, body.sb-shell .inv-main, body.sb-shell .gsc-main { padding-top: 2px; padding-left: 40px; padding-right: 40px; }
body.sb-shell .care-shell { padding-top: 2px; }

/* headings in the wide face, white on the black */
body.sb-shell :is(#home-title, #cust-rail-title, .dev-main > h1, .crm-main > h1, .inv-main > h1, .gsc-title, .care-top h1) {
  font: 400 clamp(25px, 2.3vw, 38px)/1.18 var(--wide); letter-spacing: -.01em; font-synthesis: none;
  color: #FFFFFF; margin: 0 0 10px;
}
body.sb-shell :is(.home-main, .dev-main, .crm-main, .inv-main, .gsc-main) > .sub,
body.sb-shell #home-sites .sub, body.sb-shell .care-top .sub {
  color: rgba(255, 255, 255, .72); font-size: 14.5px;
}
body.sb-shell .view .empty, body.sb-shell .crm-none:not(.crm-drawer .crm-none) { color: rgba(255, 255, 255, .7); }
body.sb-shell .view .empty b { color: #FFFFFF; }
body.sb-shell :is(.cat-name, #unsorted-title, #home-drafts-title) {
  font: 400 16px/1.3 var(--wide); letter-spacing: .02em; text-transform: uppercase; font-synthesis: none;
}

/* ---- Sites ---- */
.home-title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.home-title-row h1 { margin-right: auto; }
body.sb-shell :is(#archive-btn, .home-plan-btn) { color: rgba(255, 255, 255, .78); border-color: rgba(255, 255, 255, .2); }
body.sb-shell :is(#archive-btn, .home-plan-btn):hover { color: #000; background: var(--gold); border-color: var(--gold); box-shadow: 0 14px 30px -16px rgba(178, 58, 78, .85); }
body.sb-shell :is(#archive-btn, .home-plan-btn).on { color: #FFFFFF; background: rgba(123, 30, 46, .55); border-color: rgba(245, 197, 24, .55); box-shadow: 0 0 18px rgba(123, 30, 46, .45); }
body.sb-shell :is(#archive-btn, .home-plan-btn).on:hover { color: #000; background: var(--gold); }
#archive-btn .cat-count { font-size: 10.5px; line-height: 15px; padding: 0 6px; min-width: 19px; color: inherit; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); }
body.sb-shell #home-sites .pcard h3 { font-weight: 700; letter-spacing: -.005em; }
@media (max-width: 1560px) { body.sb-shell #home-sites .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1180px) { body.sb-shell #home-sites .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* the two columns: In progress on the left, Published on the right, each two
   cards wide — four across on a laptop. Narrower, they stack. */
.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 34px; align-items: start; margin-top: 22px; }
.home-cols.is-archive { grid-template-columns: minmax(0, 1fr); }
.home-col { min-width: 0; }
.home-col[hidden], #home-sites :is(.pcard, .cat)[hidden] { display: none; }
#col-pub { padding-left: 34px; margin-left: -34px; border-left: 1px solid rgba(255, 255, 255, .12); }
.home-col-head {
  position: relative; z-index: 5; display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.home-col-head h2 { margin: 0; color: #FFFFFF; font: 400 18px/1.3 var(--wide); letter-spacing: .02em; text-transform: uppercase; font-synthesis: none; }
.home-col-head .cat-count { color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); }
.home-col-head .home-search { margin-left: auto; flex: 1 1 160px; max-width: 260px; }
.home-col-head .home-search input { width: 100%; }
.home-plan { position: relative; margin-left: auto; }
.home-plan:not([hidden]) + .home-search { margin-left: 0; }
.home-plan-btn { gap: 7px; }
.home-plan-btn svg { width: 15px; height: 15px; }
.home-plan .care-fl-menu { left: auto; right: 0; min-width: 190px; }
#col-work .home-drafts.open { margin-bottom: 18px; }
.home-col > .project-grid { margin-top: 20px; }
.home-col > .empty { margin-top: 22px; }
@media (min-width: 1181px) {
  body.sb-shell #home-cols:not(.is-archive) .project-grid,
  body.sb-shell #home-cols:not(.is-archive) .draft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  /* four across: a tighter card */
  body.sb-shell #home-cols:not(.is-archive) .pcard-body { padding: 12px 14px 14px; }
  body.sb-shell #home-cols:not(.is-archive) .pcard h3 { font-size: 15px; }
  body.sb-shell #home-cols:not(.is-archive) .pcard .meta { font-size: 12px; }
  body.sb-shell #home-cols:not(.is-archive) .pcard-actions { margin-top: 10px; }
  body.sb-shell #home-cols:not(.is-archive) .pcard-actions .btn { padding: 5px 10px; }
}
@media (max-width: 1180px) {
  .home-cols { grid-template-columns: minmax(0, 1fr); }
  #col-pub { padding-left: 0; margin-left: 0; border-left: 0; margin-top: 40px; }
}

/* ---- the other pages: what sits straight on the black goes light ---- */
body.sb-shell .care-crumbs, body.sb-shell .care-crumbs a { color: #FFFFFF; }
body.sb-shell .care-crumbs [aria-hidden] { color: rgba(255, 255, 255, .5); }
body.sb-shell .cust-rail .sub { color: rgba(255, 255, 255, .72); font-size: 14.5px; }
/* Site Manager's notes and empty lines that sit on the page itself (or in a
   page's body holder), not inside one of its cards */
body.sb-shell :is(.care-main, .care-main > [id]) > :is(.care-empty, .care-hint, .care-foot),
body.sb-shell :is(.care-main, .care-main > [id]) > .care-notes :is(li, p),
body.sb-shell :is(#gsc-connect, #gsc-sites) > :is(.gsc-note, p:not([class])) { color: rgba(255, 255, 255, .72); }
body.sb-shell :is(.care-main, .care-main > [id]) > :is(.care-empty, .care-hint) b { color: #FFFFFF; }
body.sb-shell :is(.care-main, .care-main > [id]) > .care-notes li { border-left-color: rgba(255, 255, 255, .25); }
/* the tab tracks that sit straight on the black: a smoked track, the picked
   tab a white thumb with black words */
body.sb-shell :is(#crm-section, #crm-view, #inv-tabs, .care-tabs) {
  background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .5);
}
body.sb-shell :is(#crm-section, #crm-view, #inv-tabs) .btn:not(.active), body.sb-shell .care-tab:not(.is-on) { color: rgba(255, 255, 255, .78); }
body.sb-shell :is(#crm-section, #crm-view, #inv-tabs) .btn:not(.active):hover, body.sb-shell .care-tab:not(.is-on):hover { color: #FFFFFF; background: rgba(255, 255, 255, .1); }
body.sb-shell :is(#crm-section, #crm-view, #inv-tabs) .btn.active, body.sb-shell :is(#crm-section, #crm-view, #inv-tabs) .btn.active:hover, body.sb-shell .care-tab.is-on {
  background: #FFFFFF; color: #000; border-color: #FFFFFF; box-shadow: 0 0 18px rgba(255, 255, 255, .12);
}
body.sb-shell :is(.inv-pane-note, .inv-tax-note) { color: rgba(255, 255, 255, .78); }
body.sb-shell .inv-ed-paper { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }

/* ---- every surface in the sheet's cloth ---- */
/* no rounded corners anywhere beside the menu (a spinner stays a ring) */
body.sb-shell .view *, body.sb-shell .view *::before, body.sb-shell .view *::after,
.sbnav *, .sbnav *::before, .sbnav-panel { border-radius: 0 !important; }
body.sb-shell .view .btn.loading::before { border-radius: 50% !important; }
/* the GitHub / Netlify / Firebase marks on the home cards stay circles */
body.sb-shell .view .pcard-links .pl { border-radius: 50% !important; }

/* panels and cards: the sheet itself */
body.sb-shell .view :is(.pcard, .dcard, .cust-item, .crm-stat, .crm-seg, .crm-table-wrap, .crm-col, .crm-card,
  .care-menu, .care-tile, .care-card, .care-table-wrap, .care-banner, .gsc-site, .gsc-account, .inv-card,
  .crm-drawer, .field-group) {
  background: var(--sb-sheet); border-color: rgba(255, 255, 255, .14); color: var(--ink);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .06), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
body.sb-shell .view :is(.pcard, .dcard, .cust-item, .crm-seg, .crm-card, .care-tile[href]):hover {
  background: var(--sb-grid), linear-gradient(165deg, #1D1D1D 0%, #111 55%, #170A0C 100%);
  border-color: rgba(245, 197, 24, .55); box-shadow: var(--shadow-lift);
}
body.sb-shell .view .crm-drawer { background: var(--sb-grid), #0B0B0B; border-color: rgba(255, 255, 255, .16); }
body.sb-shell .view :is(.crm-stat, .care-tile, .care-figure) b { color: #FFFFFF; }
body.sb-shell .view .crm-stat.is-forecast { background: var(--sb-grid), linear-gradient(165deg, #2A0E14 0%, #13070A 70%); border-color: rgba(178, 58, 78, .55); }
body.sb-shell .view .crm-stat.is-forecast b { color: #F0A3B0; }
body.sb-shell .view .cust-item.is-open, body.sb-shell .view .crm-card.is-open { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
body.sb-shell .view .cust-item .crm-avatar { background: #000; }
/* a draft whose client has sent their answers keeps its red edge on the black */
body.sb-shell .view .dcard.has-news { border-color: #E2343F; box-shadow: 0 0 0 1px #E2343F; }

/* the site cards: the thumbnail fades into the dark body, not into white */
body.sb-shell #home-sites .pcard { background: var(--sb-sheet); border-color: rgba(255, 255, 255, .14); }
body.sb-shell #home-sites .pcard:hover { border-color: rgba(245, 197, 24, .6); }
/* the In progress cards too (app.css's older white rule is an id rule, so it needs naming here) */
body.sb-shell #home-sites .dcard { background: var(--sb-sheet); border: 1px dashed rgba(255, 255, 255, .28); }
body.sb-shell #home-sites .dcard:hover { background: var(--sb-grid), linear-gradient(165deg, #1D1D1D 0%, #111 55%, #170A0C 100%); border-color: rgba(245, 197, 24, .6); }
body.sb-shell #home-sites .dcard .pill.draft { background: #0B0B0B; color: var(--gold); border-color: rgba(245, 197, 24, .45); }
body.sb-shell #home-sites .dcard.has-news { border: 1px solid #E2343F; box-shadow: 0 0 0 1px #E2343F; }
body.sb-shell .view .pthumb { background: #0B0B0B; border-bottom-color: rgba(255, 255, 255, .1); }
body.sb-shell .view .pthumb::after { background: linear-gradient(180deg, rgba(11, 11, 11, 0) 0%, rgba(11, 11, 11, .85) 100%); }
body.sb-shell .view .pthumb.empty-thumb::before { background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .04) 0 8px, transparent 8px 16px); }
body.sb-shell .view .pcard .pill { background: rgba(0, 0, 0, .78); }

/* small pieces: chips, pills, counts, notes inside the panels */
body.sb-shell .view :is(.pill, .cat-count, .inv-pill, .inv-chip, .chk, .crm-step, .crm-comm, .care-st, .care-rs, .care-rq,
  .care-risk, .care-result, .care-draft, .care-claude p, .care-choice, .care-integ, .care-tick, .cust-stat, .cust-site,
  .cust-pay-state, .gsc-chip, .cust-tag, .cust-due, .care-note, .care-badge) {
  background-color: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .16);
}
body.sb-shell .view :is(.inv-chip, .chk, .crm-step, .crm-comm, .care-choice, .cust-pay-state):hover { background-color: rgba(255, 255, 255, .1); border-color: rgba(245, 197, 24, .55); }
body.sb-shell .view :is(.inv-chip.is-on, .chk:has(input:checked)) { background-color: rgba(123, 30, 46, .5); border-color: rgba(245, 197, 24, .6); color: #FFFFFF; }
body.sb-shell .view .inv-chip.is-on span { color: #FFFFFF; }

/* table heads and row hovers */
body.sb-shell .view :is(.crm-table th, .care-table th, .crm-table thead, .care-table thead) { background: rgba(255, 255, 255, .04); color: var(--muted); }
body.sb-shell .view :is(.crm-row, .care-row):hover td { background: rgba(255, 255, 255, .06); }
body.sb-shell .view .inv-tax-table .inv-total-row td { background: rgba(255, 255, 255, .05); }

/* fields */
body.sb-shell .view :is(input, textarea, select) {
  background-color: rgba(255, 255, 255, .04); color: #FFFFFF; border-color: rgba(255, 255, 255, .2);
}
body.sb-shell .view :is(input, textarea)::placeholder { color: rgba(255, 255, 255, .45); }
body.sb-shell .view :is(input, textarea, select):focus {
  background-color: rgba(255, 255, 255, .07); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 197, 24, .16);
}
body.sb-shell .view select option { background: #111; color: #FFFFFF; }
body.sb-shell .view input[type=checkbox], body.sb-shell .view input[type=radio] { accent-color: var(--gold); }
body.sb-shell .view input[type=date] { color-scheme: dark; }

/* buttons: the Slashboom site's — black with a white edge, gold on hover; the
   primary white with black words */
body.sb-shell .view .btn:not(.gsc-btn) {
  background: #0B0B0B; color: #FFFFFF; border-color: rgba(255, 255, 255, .4); box-shadow: none;
}
body.sb-shell .view .btn:not(.gsc-btn):hover { background: var(--gold); color: #000; border-color: var(--gold); box-shadow: 0 16px 34px -16px rgba(178, 58, 78, .85); }
body.sb-shell .view .btn.primary { background: #FFFFFF; color: #000; border-color: #FFFFFF; }
body.sb-shell .view .btn.primary:hover { background: var(--gold); border-color: var(--gold); }
body.sb-shell .view .btn.ghost { background: transparent; border-color: transparent; color: rgba(255, 255, 255, .72); }
body.sb-shell .view .btn.danger { background: rgba(220, 70, 60, .12); color: #FF8F86; border-color: rgba(255, 120, 110, .45); }
body.sb-shell .view .btn.danger:hover { background: #C03A31; color: #FFFFFF; border-color: #C03A31; }
body.sb-shell .view .btn:disabled, body.sb-shell .view .btn:disabled:hover { background: #0B0B0B; color: rgba(255, 255, 255, .5); border-color: rgba(255, 255, 255, .2); box-shadow: none; }
body.sb-shell .view .btn.on { background: rgba(123, 30, 46, .55); color: #FFFFFF; border-color: rgba(245, 197, 24, .55); }

/* segmented tracks: a smoked track, the picked part white with black words */
body.sb-shell .view :is(.mode-group, .care-tabs) { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .16); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .5); }
body.sb-shell .view .mode-group .btn:not(.active), body.sb-shell .view .care-tab:not(.is-on) { background: transparent; border-color: transparent; color: rgba(255, 255, 255, .78); }
body.sb-shell .view .mode-group .btn:not(.active):hover, body.sb-shell .view .care-tab:not(.is-on):hover { background: rgba(255, 255, 255, .1); color: #FFFFFF; box-shadow: none; }
body.sb-shell .view :is(.mode-group .btn.active, .mode-group .btn.active:hover, .care-tab.is-on) { background: #FFFFFF; color: #000; border-color: #FFFFFF; box-shadow: none; }

/* Site Manager's own menu, in the side menu's manner */
body.sb-shell .view .care-mi { color: rgba(255, 255, 255, .78); }
body.sb-shell .view .care-mi svg { color: rgba(255, 255, 255, .6); }
body.sb-shell .view .care-mi:hover { background: rgba(255, 255, 255, .07); color: #FFFFFF; }
body.sb-shell .view .care-mi.is-on { background: linear-gradient(0deg, rgba(123, 30, 46, .6), rgba(123, 30, 46, .1)); border-color: transparent; color: #FFFFFF; box-shadow: inset 0 -2px 0 var(--gold); }
body.sb-shell .view .care-menu-head { border-right-color: rgba(255, 255, 255, .14); }
body.sb-shell .view .care-mi.is-on svg { color: var(--gold); }
body.sb-shell .view .care-menu-head svg { color: var(--gold); }

/* the invoice editor's bar; the invoice sheet itself stays paper-white */
body.sb-shell .view .inv-ed-bar { background: var(--sb-grid), rgba(11, 11, 11, .94); border-bottom-color: rgba(255, 255, 255, .14); }

/* ---- the iPad's home-screen app: clear the status bar ---- */
html.standalone .sbnav { padding-top: calc(22px + env(safe-area-inset-top)); }
html.standalone body.sb-shell .view > .home-head { padding-top: calc(18px + env(safe-area-inset-top)); }

/* ---- narrow windows: the menu straightens into a bar across the top ---- */
@media (max-width: 900px) {
  :root { --sbnav-h: calc(108px + env(safe-area-inset-top)); }
  .sbnav { inset: 0 0 auto 0; width: auto; padding: 0; perspective: none; pointer-events: auto; }
  html.standalone .sbnav { padding-top: 0; }
  .sbnav-panel {
    height: auto; width: auto; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) 0 8px;
    transform: none; border-radius: 0; border-width: 0 0 1px;
    background: rgba(0, 0, 0, .86); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
    box-shadow: 0 10px 30px -18px rgba(123, 30, 46, .8);
    animation: none;
  }
  .sbnav::before, .sbnav-panel::after, .sbnav-foot { display: none; }
  .sbnav-brand { margin-left: 16px; padding: 9px 2px; transform: none; }
  .sbnav-brand .brand-logo { height: 18px; }
  .sbnav-items { flex-direction: row; gap: 2px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
  .sbnav-items::-webkit-scrollbar { display: none; }
  .sbnav-item { flex: none; grid-template-columns: auto auto auto; gap: 8px; padding: 9px 12px; border-radius: 999px; }
  .sbnav-item .cat-count { position: static; margin: 0; }
  .sbnav-item > svg, .sbnav-item > img { display: block; }
  .sbnav-num, .sbnav-txt small { display: none; }
  .sbnav-txt b { font-size: 10.5px; padding-bottom: 0; }
  .sbnav-txt b::after { display: none; }
  .sbnav-item::before { left: 14px; right: 14px; top: auto; bottom: 2px; width: auto; height: 2px; transform: scaleX(0); }
  .sbnav-item.is-on::before { transform: scaleX(1); }
  .sbnav-items .sbnav-item:hover, .sbnav-items .sbnav-item:focus-visible { transform: none; }

  body.sb-shell .view { padding-left: 0; padding-top: var(--sbnav-h); }
  body.sb-shell .app-banner { padding-left: 16px; }
  /* the page's buttons sit in the bar's top row, across from the logo */
  body.sb-shell .view > .home-head,
  html.standalone body.sb-shell .view > .home-head {
    position: fixed; top: env(safe-area-inset-top); right: 0; z-index: 31; min-height: 0;
    padding: 7px 12px; background: none;
  }
  body.sb-shell .home-head .btn.icon { width: 36px; height: 36px; }
  body.sb-shell .home-head .btn:not(.icon) { min-height: 36px; padding: 0 12px; }
  body.sb-shell .home-head .gsc-btn { min-height: 36px; }
  body.sb-shell .home-head .head-actions .hl { display: none; }
  body.sb-shell #inv-editor .inv-ed-bar { top: var(--sbnav-h); }
  body.sb-shell .home-main, body.sb-shell .dev-main, body.sb-shell .crm-main, body.sb-shell .inv-main, body.sb-shell .gsc-main {
    padding: 20px 16px 64px;
  }
  body.sb-shell .care-shell { padding-top: 16px; }
  body.sb-shell #home-sites .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  body.sb-shell #home-sites .project-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .sbnav-panel, .sbnav-panel::after, body.sb-shell .sb-enter { animation: none; }
  .sbnav-items .sbnav-item:hover, .sbnav-items .sbnav-item:focus-visible, .sbnav-items .sbnav-item:active { transform: none; }
  body.sb-shell .home-head .btn:hover, body.sb-shell .home-head .btn:active { transform: none; }
}
