/* ===== Look E, "Dashboard" (owner, Nov 22 2026: "design the website to have more elements like in the picture … simple, clean,
   organized", with five dashboard pictures; "It should have a light/dark mode switch as it does now"). Loaded after the page's own
   styles and layered over Look D: rounded cards on a soft background, number boxes with an icon badge and the first one tinted,
   a side menu with icons and a filled green pill on the open page, plain sans page titles, airy tables with small grey column
   names, round status pills. Every rule stays off the CAD (.skcad). Light/dark comes from the same Look switch (data-look). */

:root:not(#ipb):not(#ipb2):not(#ipb3){
  --bg:#0e1311; --surface:#161c19; --sunk:#121714; --card:#161c19; --line:#242c28; --line-hi:#323c37;
  --r:10px; --r-sm:8px; --r-xs:6px; --r-lg:14px; --pill:999px;
  --e-card:#161c19; --e-cardhi:#1b231f; --e-shadow:0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.18);
  --e-grad:linear-gradient(135deg,#2f9a66 0%,#1f7a8c 100%); --e-tint:linear-gradient(135deg,rgba(76,195,138,.16),rgba(31,122,140,.10) 70%,transparent);
  --e-thead:#8e9a94; --e-rowhover:rgba(255,255,255,.025);
}
:root[data-look="light"]:not(#ipb):not(#ipb2):not(#ipb3){
  --bg:#f3f5f4; --surface:#ffffff; --sunk:#eef1ef; --card:#ffffff; --line:#e3e8e5; --line-hi:#d3dad6;
  --e-card:#ffffff; --e-cardhi:#fbfcfb; --e-shadow:0 1px 2px rgba(16,40,28,.05), 0 6px 20px rgba(16,40,28,.06);
  --e-grad:linear-gradient(135deg,#2f9a66 0%,#2a8f9e 100%); --e-tint:linear-gradient(135deg,rgba(47,154,102,.12),rgba(42,143,158,.06) 70%,transparent);
  --e-thead:#6b7570; --e-rowhover:rgba(16,40,28,.025);
}

/* ---- page titles: plain bold sans, no ruler ticks ---- */
.pagehead h2{font-family:var(--body)!important;font-weight:700!important;letter-spacing:-.02em!important;background:none!important;padding-bottom:0!important}
.pagehead h2::after,.pagehead h2::before{display:none!important}

/* ---- side menu: icons on the left, a filled green pill on the open page ---- */
#sections > button > svg.ni{display:inline-block!important;order:0!important;margin:0 10px 0 0!important;width:18px;height:18px;flex:none;color:var(--muted);opacity:.9}
.shell.withside #sections > button{border-radius:var(--r-sm)!important;padding:9px 12px!important;gap:0;font-weight:500;transition:background .12s}
.shell.withside #sections > button:hover{background:color-mix(in srgb,var(--ink) 5%,transparent)!important}
html:not(#ipb):not(#ipb2) .shell.withside #sections > button[aria-selected="true"]{background:var(--e-grad)!important;color:#fff!important;box-shadow:0 4px 14px rgba(47,154,102,.28)}
html:not(#ipb):not(#ipb2) .shell.withside #sections > button[aria-selected="true"] > svg.ni{color:#fff!important;opacity:1}
.shell.withside #sections > button[aria-selected="true"]::before{display:none!important}
.shell.withside #sections .sidesub button{border-radius:var(--r-xs)!important}
.shell.withside #sections .sidesub button[aria-selected="true"],.shell.withside #sections .sidesub button[aria-pressed="true"]{background:color-mix(in srgb,var(--ok) 12%,transparent)!important;color:var(--ink)!important}

/* ---- number boxes: rounded cards, the first one tinted, numbers big ---- */
#app .tiles{gap:14px}
#app .tile:not(.skcad *){border-radius:var(--r-lg)!important;border:1px solid var(--line)!important;background:var(--e-card)!important;box-shadow:var(--e-shadow);padding:16px 18px!important}
#app .tiles > .tile:first-child:not(.skcad *){background:var(--e-tint),var(--e-card)!important;border-color:color-mix(in srgb,var(--ok) 30%,var(--line))!important}
#app .tile > b:first-child,#app .tile .val{font-weight:700!important;letter-spacing:-.02em}

/* ---- cards and boxes ---- */
#app .hcard:not(.skcad *),#app .babox:not(.skcad *),#app .recsec > article,#app .subcard,#app .svccard{border-radius:var(--r-lg)!important;border:1px solid var(--line)!important;background:var(--e-card)!important;box-shadow:var(--e-shadow)}
#app .hcard > h3:first-child,#app .hcard > header h3{font-weight:600}

/* ---- tables: small grey column names, airy rows, soft lines, a card around them ---- */
#app .tscroll:not(.skcad *){border:1px solid var(--line);border-radius:var(--r-lg);background:var(--e-card);box-shadow:var(--e-shadow)}
#app .rtable:not(.skcad *){border-collapse:separate!important;border-spacing:0!important}
#app .rtable:not(.skcad *) th{font-size:var(--t-1)!important;font-weight:600!important;text-transform:uppercase!important;letter-spacing:.06em!important;color:var(--e-thead)!important;background:transparent!important;border-bottom:1px solid var(--line)!important;padding:12px 14px!important}
#app .rtable:not(.skcad *) td{border-top:0!important;border-bottom:1px solid var(--line)!important;border-left:0!important;border-right:0!important;padding:12px 14px!important}
#app .rtable:not(.skcad *) tbody tr:last-child td{border-bottom:0!important}
#app .rtable:not(.skcad *) tbody tr:hover td{background:var(--e-rowhover)}

/* ---- status pills: round, tinted, no border ---- */
#app .status:not(.skcad *),#app .pill:not(.skcad *){border-radius:999px!important;border-color:transparent!important;text-transform:none!important;letter-spacing:0!important;font-weight:600!important;padding:3px 10px!important}

/* ---- buttons and boxes ---- */
#app button:not(.skcad *):not(#sections button),#app .btn:not(.skcad *),.modal button{border-radius:var(--r-sm)}
#app button.primary:not(.skcad *),.modal button.primary{background:var(--e-grad)!important;border-color:transparent!important;color:#fff!important}
#app input:not([type=checkbox]):not([type=radio]):not(.skcad *),#app select:not(.skcad *),#app textarea:not(.skcad *),.modal input:not([type=checkbox]):not([type=radio]),.modal select,.modal textarea{border-radius:var(--r-sm)!important}
#app .seg:not(.skcad *){border-radius:var(--r-sm)!important;overflow:hidden}
#app .softwarn:not(.skcad *){border-radius:var(--r)!important}

/* ---- windows ---- */
.modal:not(.skcad *){border-radius:18px!important;box-shadow:0 24px 64px rgba(0,0,0,.35)!important}

/* ---- top search box like the pictures: a soft rounded field ---- */
#gsearch{border-radius:var(--r)!important}

/* ---- plain bold sans for the greeting, the company name and window titles (the pictures use no serif) ---- */
#side .brand h1,.side .brand h1,#app .hero h2{font-family:var(--body)!important;font-weight:700!important;letter-spacing:-.02em!important}
#side .brand h1,.side .brand h1{font-size:var(--t-5)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---- charts inside number boxes: a ring for a share, a small line for the recent weeks (drawn by tileDress) ---- */
#app .tile{position:relative}
#app .tile.hasgfx{padding-right:124px!important;min-height:104px}
#app .tile .tring{position:absolute;right:16px;bottom:14px;width:54px;height:54px;display:grid;place-items:center}
#app .tile .tring svg{position:absolute;inset:0;transform:rotate(-90deg)}
#app .tile .tring circle{fill:none;stroke-width:5}
#app .tile .tring .tr-bg{stroke:color-mix(in srgb,var(--ink) 9%,transparent)}
#app .tile .tring .tr-on{stroke:var(--ok);stroke-linecap:round}
#app .tile .tring.alert .tr-on{stroke:var(--watch)}
#app .tile .tring b{position:relative;font:700 var(--t-1)/1 var(--body);color:var(--ink);letter-spacing:0}
#app .tile .tspark{position:absolute;right:14px;bottom:16px;width:100px;height:36px}
#app .tile .tspark svg{width:100%;height:100%;overflow:visible}
#app .tile .tspark .ts-line{fill:none;stroke:var(--ok);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
#app .tile .tspark .ts-area{fill:color-mix(in srgb,var(--ok) 14%,transparent);stroke:none}
#app .tile .tspark .ts-dot{fill:var(--ok);stroke:var(--e-card);stroke-width:2}
@media (max-width:640px){#app .tile.hasgfx{padding-right:16px!important}#app .tile .tring,#app .tile .tspark{position:static;margin-top:8px}}

/* Invoices list on Invoices & payments */
#app .invsec{margin:14px 0}#app .invsec .seg{margin:6px 0 10px}#app .invacts{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
#app .invtbl tr.invopen td{background:color-mix(in srgb,var(--ok) 8%,transparent)}
/* phones (owner's picture, Nov 22 2026: number boxes three across cut off "Won this y…", "$5,176…", and the win-rate ring covered its box):
   two across, labels wrap clear of the icon, numbers shrink to fit, the ring and the small line sit under the number */
@media (max-width:640px){
  #app .tiles:not(.skcad *),#app .tiles.four:not(.skcad *){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
  #app .tile:not(.skcad *){padding:12px 14px!important;min-width:0;min-height:0}
  #app .tile .lbl{display:block;padding-right:34px;white-space:normal;overflow-wrap:anywhere}
  #app .tile .val{font-size:clamp(22px,7.2vw,30px)!important;line-height:1.1;overflow-wrap:anywhere}
  #app .tile .tring{position:relative;right:auto;bottom:auto}
  #app .tile .tspark{width:100%;max-width:140px}
}

/* shop worker: a work order job can be tapped */
#app .worder li[data-wjob]{cursor:pointer}#app .worder li[data-wjob]:hover{background:color-mix(in srgb,var(--ok) 6%,transparent)}

/* the Office / Shop / Field switch stays hidden for people with only one view; the demo keeps just its ● Live tab (ease-of-use review, Nov 23 2026) */
#side-switch[hidden]:has(#demo-livetab) > button:not(#demo-livetab){display:none!important}

/* client / contractor picker: a find box beside a long list (ease-of-use review #20) */
.cpickrow{display:flex;gap:6px;min-width:0}.cpickrow select{flex:1;min-width:0}.cpickrow .cfind{flex:0 0 42%;min-width:0}

/* crew phone: later days fold to one line (ease-of-use review #19) */
#app details.jfold{border:1px solid var(--line);border-radius:var(--r);background:var(--e-card);margin:8px 0}
#app details.jfold > summary{padding:12px 14px;cursor:pointer;list-style-position:inside}
#app details.jfold > article.job{margin:0 8px 8px}
#app .jlater{margin:6px 0 0}

/* Project managers → Waiting on you: the steps row (owner, Nov 23 2026) */
#app .pmsteps{display:flex;flex-wrap:wrap;gap:8px}
#app .pmstep{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:110px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--r);background:var(--e-card);text-align:left}
#app .pmstep b{font-size:var(--t-5);line-height:1}#app .pmstep span{font-size:var(--t-1);color:var(--muted)}
#app .pmstep[aria-pressed="true"]{border-color:var(--ok);background:color-mix(in srgb,var(--ok) 10%,var(--e-card))}
#app .pmwait .toolbar{display:flex;align-items:center;gap:8px;margin:8px 0}
#app .pmw .hrow{flex-wrap:wrap}#app .pmw .hrow .hmain{flex:1 1 0;min-width:140px}#app .pmw .hrow .hside{margin-left:auto}
#app .pmwait .toolbar select{width:auto;min-width:220px;max-width:100%}

/* Cabinet standards: a heading row per builder or customer (owner, Nov 23 2026) */
#or-list tr.orhead th{text-align:left;font-size:var(--t-1);text-transform:uppercase;letter-spacing:.06em;color:var(--e-thead,var(--muted));padding:14px 8px 6px;background:transparent;border-bottom:1px solid var(--line)}
.kchip-rule{margin:6px 0;padding:8px 10px;border-radius:8px;background:color-mix(in srgb,var(--ok) 10%,transparent);font-weight:600}
