/* Divine Air ERP - "Pro" theme (17 Nov 2026). Loaded AFTER app.css and only overrides looks:
   calm slate + navy, thin borders instead of heavy shadows, one blue accent, tighter type.
   To go back to the old look: remove the theme_pro.css <link> from index.html. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #f4f6f9; --bg2: #f4f6f9; --panel: #ffffff; --card: #ffffff;
  --ink: #0f172a; --muted: #5b6678; --line: #e5e9f0; --line-strong: #cfd6e0;
  --brand: #1d4ed8; --brand-dark: #1e40af; --brand-ink: #ffffff; --brand-soft: #eaf0fe; --accent: #c8102e;
  --hover: #f1f4f8; --btn2: #ffffff; --btn2-hover: #f1f4f8;
  --row-alt: #fafbfd; --sel: #eaf0fe; --ok: #15803d; --warn: #b45309; --bad: #dc2626; --radius: 12px;
  --shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 0 0 1px var(--line), 0 16px 40px rgba(15, 23, 42, .14);
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
body { letter-spacing: -.005em; }
a, button, summary, .nlink, .ltile, .nrow { cursor: pointer; }

/* ---------- login ---------- */
.login { background: linear-gradient(180deg, #eef2f8 0%, #f8fafc 100%); }
.login form { border-radius: 16px; padding: 32px 28px; }
.login h1 { font-size: 30px; letter-spacing: -.6px; }

/* ---------- side menu ---------- */
@media (min-width: 861px) { .shell:not(.nav-mini) { grid-template-columns: 264px minmax(0, 1fr); } }
.side { box-shadow: none; border-right: 1px solid var(--line); }
.side .logo { font-size: 21px; letter-spacing: -.5px; padding: 16px 18px 12px; }
.side .logo small { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.nlink, .nscreens > summary { font-size: 14px; min-height: 40px; padding: 4px 8px; gap: 10px; border-radius: 8px; color: #334155; }
.nlink:hover, .nscreens > summary:hover { color: var(--ink); }
.nhead { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 12px 8px 6px; }
.nbub { width: 30px; height: 30px; padding: 6px; border-radius: 8px; background: transparent; color: #64748b; }
.nlink:hover .nbub { color: var(--ink); }
.nlink.on { background: var(--brand-soft); color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.nlink.on .nbub { background: transparent; color: var(--brand); }
.nlink.sm { min-height: 32px; font-size: 13.5px; padding-left: 48px; color: #475569; }
.nlink.sm::before { left: 21px; width: 5px; height: 5px; margin-top: -2.5px; }
.ncount { background: var(--hover); font-weight: 600; }
.side .foot.ucard { border-top: 1px solid var(--line); }
.ucard-btns .btn { min-height: 36px; font-size: 13px; }

/* ---------- top bar ---------- */
.top { box-shadow: none; border-bottom: 1px solid var(--line); padding: 0 24px; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px); }
.top .row { min-height: 60px; gap: 8px; }
.top h2 { font-size: 18px; letter-spacing: -.2px; }
.iconbtn { border-radius: 10px; }
.top .iconbtn { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); width: 38px; height: 38px; }
.top .iconbtn:hover { background: var(--hover); }
.tsearch { background: var(--panel); border-radius: 10px; height: 38px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.tsearch:focus-within { box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 3px var(--brand-soft); }
.avatar { border-radius: 10px; width: 38px; height: 38px; background: #0f172a; }
.avatar.sm { border-radius: 9px; background: var(--brand-soft); }
.ucard-who .avatar { width: 38px; height: 38px; }

/* ---------- buttons ---------- */
.btn, .tile-btn, .toolbar .dd > button { border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--panel); font-weight: 600; }
.btn:hover, .tile-btn:hover, .toolbar .dd > button:hover, .toolbar .dd.open > button { background: var(--hover); }
.btn.primary { box-shadow: 0 1px 2px rgba(29, 78, 216, .35); background: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { box-shadow: inset 0 0 0 1px #f3c4c4; }
.tile-btn { padding: 8px 12px; }
.chip { border-radius: 8px; }

/* ---------- content, cards ---------- */
.content { padding: 24px 28px 56px; }
.card, .gridwrap { border-radius: var(--radius); }
.card { padding: 18px 20px; }
.card h3 { font-size: 14px; font-weight: 700; letter-spacing: -.1px; color: #1e293b; }
.card .big { font-size: 34px; font-weight: 800; letter-spacing: -.8px; }
/* the page grid itself comes from app.css (2 columns on laptops, 3 on wide desktops); here only the spacing */
@media (min-width: 1025px) { .dash, .dash.no-side { gap: 16px; max-width: 1680px; margin: 0 auto; } .dsec { gap: 16px; } .dsec > .dsec-h { font-size: 13px; margin: 12px 0 0; } .need-h h2 { font-size: 15px; } .need-h { padding: 16px 20px 8px; } .nrow { padding: 8px 12px; min-height: 50px; } .compose { padding: 14px 16px; } }
.dsec-h { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* home: section tiles */
.launch { padding: 16px; }
.launch-h { padding: 0 4px 12px; }
.launch-h > b { font-size: 14px; font-weight: 700; }
.launch-grid { gap: 10px; }
.ltile { min-height: 104px; padding: 16px 6px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); background: var(--panel); transition: box-shadow .15s, background-color .15s, transform .15s; }
.ltile:hover, .ltile:focus-visible { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-strong), 0 6px 16px rgba(15, 23, 42, .07); transform: translateY(-1px); }
.licon { width: 46px; height: 46px; border-radius: 12px; }
.licon > .ico { width: 24px; height: 24px; }
.licon.sm { width: 34px; height: 34px; border-radius: 9px; }
.llabel { font-size: 13px; font-weight: 600; color: #1e293b; }
.lbadge { top: -7px; right: -9px; min-width: 20px; height: 20px; line-height: 20px; font-size: 11px; border-radius: 10px; }
[data-tint=blue] { --t-bg: #eaf0fe; --t-fg: #1d4ed8; }
[data-tint=green] { --t-bg: #e7f6ec; --t-fg: #15803d; }
[data-tint=teal] { --t-bg: #e2f5f3; --t-fg: #0f766e; }
[data-tint=orange] { --t-bg: #fff3e2; --t-fg: #b45309; }
[data-tint=purple] { --t-bg: #f1ebfd; --t-fg: #6d28d9; }
[data-tint=brown] { --t-bg: #f5ede4; --t-fg: #855b32; }
[data-tint=indigo] { --t-bg: #eaecfd; --t-fg: #4338ca; }
[data-tint=pink] { --t-bg: #fdebf3; --t-fg: #be185d; }
[data-tint=red] { --t-bg: #fdecec; --t-fg: #b91c1c; }
[data-tint=cyan] { --t-bg: #e3f5fb; --t-fg: #0e7490; }
[data-tint=slate], [data-tint=grey] { --t-bg: #eef1f5; --t-fg: #475569; }

/* home: needs action */
.need-h { padding: 16px 20px 8px; }
.need-h h2 { font-size: 15px; font-weight: 700; }
.need-h small { font-size: 12px; }
.nrows { padding: 0 8px 8px; }
.nrow { min-height: 52px; padding: 8px 12px; gap: 12px; }
.nrow + .nrow { box-shadow: inset 0 1px 0 var(--line); border-radius: 0; }
a.nrow:hover { border-radius: 8px; box-shadow: none; }
a.nrow:hover + .nrow { box-shadow: none; }
.nrow .nbub { border-radius: 9px; width: 34px; height: 34px; padding: 7px; background: var(--brand-soft); color: var(--brand); }
.nt { font-size: 14px; }
.nt small { font-size: 12.5px; }
.ncount-big { font-size: 13px; font-weight: 700; min-width: 30px; padding: 2px 9px; border-radius: 8px; background: #fdecec; color: #b91c1c; }
.nrow:not(.warn) .ncount-big { background: var(--brand-soft); color: var(--brand); }

/* KPIs and tables */
.kpi { padding: 16px 20px; }
.kpi .kl { font-size: 12px; letter-spacing: .02em; }
.kpi .kv { font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.dtable thead th, .grid th { background: #f8fafc; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; }
.grid td { padding: 10px 8px; }
.search { border-radius: 10px; }
.field input, .field select, .field textarea, .own-field input:not([type=checkbox]) { border-radius: 9px; }

/* big desktop screens: use the width */
@media (min-width: 1500px) {
  .content { padding: 28px 40px 64px; }
}
/* laptops (1280-1440 wide): keep everything comfortable */
@media (max-width: 1366px) and (min-width: 861px) {
  .shell:not(.nav-mini) { grid-template-columns: 240px minmax(0, 1fr); }
  .content { padding: 20px 20px 48px; }
  .top { padding: 0 16px; }
}
@media (max-width: 860px) {
  .top { padding: 0 12px; }
  .content { padding: 16px 12px 48px; }
  .nlink, .nscreens > summary { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .ltile { transition: none; } .ltile:hover { transform: none; } }

/* =====================================================================================
   v2 (17 Nov 2026, owner: "much better please"): dark navy menu, vivid app-style icons,
   soft floating cards, stronger numbers. Still looks only - no behaviour changes.
   ===================================================================================== */
:root {
  --bg: #eef1f6; --bg2: #eef1f6; --radius: 16px; --brand: #2563eb; --brand-dark: #1d4ed8; --brand-soft: #e8effe;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, .06), 0 24px 48px -12px rgba(15, 23, 42, .25);
}
body { background: radial-gradient(1200px 500px at 70% -10%, #e3eafc 0%, rgba(227, 234, 252, 0) 60%), var(--bg); background-attachment: fixed; }

/* ---------- dark side menu: the menu re-defines the colour tokens for everything inside it ---------- */
.side {
  --panel: #0c1322; --bg: #161f33; --ink: #f1f5f9; --muted: #8391a7; --line: #1e293d; --line-strong: #2b3850;
  --hover: #17213a; --btn2: #17213a; --btn2-hover: #1f2b47; --brand-soft: #1b2a52; --brand: #7aa2ff;
  background: linear-gradient(180deg, #0c1322 0%, #0f182b 100%); color: var(--ink); border-right: 0;
}
.side .logo { color: #fff; }
.side .logo::first-line { color: #fff; }
.side .logo small { color: #ff5c6c; }
.side .nlink, .side .nscreens > summary { color: #c5cedb; }
.side .nlink:hover, .side .nscreens > summary:hover { color: #fff; }
.side .nlink.sm { color: #a3afc2; }
.side .nbub { color: #8fa0bb; background: transparent; }
.side .nlink:hover .nbub { color: #fff; }
.side .nlink.on { background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%); color: #fff; box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .7); }
.side .nlink.on .nbub, .side .nlink.on .nl { color: #fff; }
.side .nlink.sm.on::before { background: #fff; }
.side .nhead { color: #6f7d95; }
.side .nhead:hover { color: #fff; }
.side .nfind { background: #161f33; box-shadow: inset 0 0 0 1px #24304a; border-radius: 10px; }
.side .nfind input::placeholder { color: #8391a7; }
.side .ncount { background: #1b2640; color: #a3afc2; }
.side .nstar { color: #3a4864; }
.side .nstar.on { color: #fbbf24; }
.side .foot.ucard { border-top: 1px solid #1e293d; background: rgba(255, 255, 255, .02); }
.side .ucard-btns .btn { background: #17213a; color: #dbe3ee; box-shadow: inset 0 0 0 1px #26334f; }
.side .ucard-btns .btn:hover { background: #1f2b47; color: #fff; }
.side .avatar { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.side .iconbtn, .side .mini-toggle { color: #8fa0bb; }
.side .iconbtn:hover { background: #17213a !important; color: #fff; }
.side nav { scrollbar-color: #2b3850 transparent; }
.side .ngrp.home { border-bottom-color: #1e293d; }

/* ---------- top bar ---------- */
.top { background: rgba(255, 255, 255, .82); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(15, 23, 42, .06); }
.top h2 { font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.top .avatar { background: linear-gradient(135deg, #2563eb, #7c3aed); border-radius: 12px; }
.btn.primary { background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 14px -6px rgba(37, 99, 235, .7); }
.btn.primary:hover { background: linear-gradient(180deg, #2f74ee 0%, #1d4ed8 100%); }

/* ---------- cards float on the page ---------- */
.card, .gridwrap { border-radius: var(--radius); box-shadow: var(--shadow); }
.card h3 { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #64748b; }
.card .big { font-size: 40px; background: linear-gradient(135deg, #0f172a, #2563eb); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- home: section tiles with vivid app-style icons ---------- */
.launch { padding: 20px; }
.launch-h > b { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.launch-grid { gap: 12px; }
.ltile { min-height: 116px; padding: 18px 6px 14px; gap: 10px; border-radius: 14px; background: #f8fafc; box-shadow: inset 0 0 0 1px #e8edf4; }
.ltile:hover, .ltile:focus-visible { background: #fff; box-shadow: inset 0 0 0 1px #dbe4f0, 0 14px 28px -14px rgba(15, 23, 42, .28); transform: translateY(-3px); }
.licon { width: 52px; height: 52px; border-radius: 15px; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--t-fg, #2563eb) 72%, #fff) 0%, var(--t-fg, #2563eb) 100%);
  box-shadow: 0 8px 16px -8px var(--t-fg, #2563eb), inset 0 1px 0 rgba(255, 255, 255, .35); }
.licon > .ico { width: 26px; height: 26px; }
.licon > .ico svg { stroke-width: 2; }
.licon.sm { width: 32px; height: 32px; border-radius: 10px; box-shadow: none; }
.licon.sm > .ico { width: 18px; height: 18px; }
.llabel { font-size: 13.5px; font-weight: 700; color: #0f172a; }
.lbadge { background: #ef4444; box-shadow: 0 0 0 3px #f8fafc; }
[data-tint=blue] { --t-fg: #2563eb; } [data-tint=green] { --t-fg: #16a34a; } [data-tint=teal] { --t-fg: #0d9488; }
[data-tint=orange] { --t-fg: #f59e0b; } [data-tint=purple] { --t-fg: #8b5cf6; } [data-tint=brown] { --t-fg: #b0703c; }
[data-tint=indigo] { --t-fg: #6366f1; } [data-tint=pink] { --t-fg: #ec4899; } [data-tint=red] { --t-fg: #ef4444; }
[data-tint=cyan] { --t-fg: #06b6d4; } [data-tint=slate], [data-tint=grey] { --t-fg: #64748b; }

/* ---------- needs action ---------- */
.need-h h2 { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.need-h h2 .ico { color: #2563eb; }
.nrow .nbub { width: 38px; height: 38px; padding: 9px; border-radius: 11px; background: linear-gradient(135deg, #60a5fa, #2563eb); color: #fff; }
.nrow.warn .nbub { background: linear-gradient(135deg, #fbbf24, #f97316); color: #fff; }
.nt { font-weight: 700; }
.nt small { font-weight: 500; }
.ncount-big { background: #fee2e2; color: #b91c1c; border-radius: 999px; min-width: 34px; padding: 3px 10px; }
.nrow:not(.warn) .ncount-big { background: #dbeafe; color: #1d4ed8; }
.quiet { background: #f8fafc; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- numbers ---------- */
.kpi .kv { font-size: 28px; font-weight: 800; }
a.kpi .kv { color: #2563eb; }
.kpi .kl { text-transform: uppercase; letter-spacing: .05em; font-size: 11px; color: #64748b; }
.tile-btn { background: #f1f5f9; box-shadow: none; border-radius: 999px; padding: 7px 14px; }
.tile-btn:hover { background: #e2e8f0; }
.compose-h .avatar.sm { background: linear-gradient(135deg, #60a5fa, #2563eb); color: #fff; }

/* ---------- tables and tabs ---------- */
.grid th, .dtable thead th { background: #f8fafc; color: #64748b; }
.grid tbody tr:nth-child(even) { background: #fbfcfe; }
.grid tbody tr:hover { background: #f1f6ff; }
.chip { background: #e8effe; color: #1d4ed8; }
@media (max-width: 860px) { .side { box-shadow: var(--shadow-lg); } }
/* menu icons on the dark menu: soft glass squares instead of pale pastel ones */
.side .npins .nbub, .side .nrecent .nbub, .side .nhead .nbub, .side .nhead .licon, .side .licon.sm, .side .ngrp:not(.home) .nbub {
  background: rgba(255, 255, 255, .07) !important; color: color-mix(in srgb, var(--t-fg, #8fa0bb) 55%, #fff) !important; box-shadow: none !important; border-radius: 9px; }
.side .nlink.on .nbub { background: rgba(255, 255, 255, .18) !important; color: #fff !important; }
.side .gicon { background: rgba(255, 255, 255, .07) !important; color: color-mix(in srgb, var(--t-fg, #8fa0bb) 55%, #fff) !important; border-radius: 9px; }
.side .nhead .nl { color: #9aa7bc; }
.side .nhead:hover .nl { color: #fff; }

/* =====================================================================================
   v3 (17 Nov 2026, owner: "so much white empty space"): dense home page.
   Greeting + quick create + 8 live numbers, sections in ONE compact row, equal-height cards.
   ===================================================================================== */
.hero { display: grid; gap: 14px; min-width: 0; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.hero-hi h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.6px; color: #0f172a; line-height: 1.15; }
.hero-hi p { margin: 2px 0 0; color: #64748b; font-size: 13.5px; font-weight: 500; }
.hero-new { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-new .tile-btn { background: #fff; box-shadow: var(--shadow); font-size: 13.5px; }
.hero-new .tile-btn:hover { background: #fff; box-shadow: 0 0 0 1px #c7d7fb, 0 8px 18px -10px rgba(37, 99, 235, .5); color: #1d4ed8; }
.hero-new .tile-btn:first-child { background: linear-gradient(180deg, #3b82f6, #2563eb); color: #fff; box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .7); }
.hero-new .tile-btn:first-child .ico { color: #fff; }
.hero-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.hero-kpis:empty { display: none; }
.hkpi { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px 13px; border-radius: 14px; background: #fff; box-shadow: var(--shadow);
  text-decoration: none; color: inherit; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.hkpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--t-fg, #2563eb); }
a.hkpi:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 16px 28px -14px rgba(15, 23, 42, .28); }
.hkpi-l { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hkpi-i { width: 22px; height: 22px; padding: 4px; border-radius: 7px; flex: none; color: var(--t-fg, #2563eb); background: color-mix(in srgb, var(--t-fg, #2563eb) 13%, #fff); }
.hkpi-v { font-size: 25px; font-weight: 800; letter-spacing: -.7px; line-height: 1.15; color: #0f172a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hkpi small { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* compact section tiles */
.launch { padding: 14px 16px 16px; }
.launch-h { padding: 0 2px 10px; }
.ltile { min-height: 0; padding: 12px 4px 10px; gap: 7px; border-radius: 12px; }
.licon { width: 42px; height: 42px; border-radius: 12px; }
.licon > .ico { width: 22px; height: 22px; }
.llabel { font-size: 12.5px; }
.lbadge { top: -6px; right: -8px; }

@media (min-width: 1025px) {
  .dash:has(> .dash-feed.home) { align-items: stretch; gap: 14px; }
  .dash > .dash-feed.home > .hero { grid-column: 1 / -1; order: -1; margin-bottom: 2px; }
  .dash > .dash-feed.home > .launch { grid-column: 1 / -1; }
  .dash:has(> .dash-feed.home) > .dash-side > .card { display: flex; flex-direction: column; justify-content: center; }
  .dash:has(> .dash-feed.home) > .dash-side > .card h3 { margin-bottom: auto; }
  .content { padding-top: 18px; }
}
@media (min-width: 1200px) { .launch-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; } }
@media (min-width: 1025px) and (max-width: 1439px) { .hero-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1440px) { .hero-kpis { grid-template-columns: repeat(8, minmax(0, 1fr)); } .hkpi-v { font-size: 23px; } }
@media (max-width: 860px) { .hero-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .hero-hi h1 { font-size: 20px; } .hkpi-v { font-size: 21px; } }
@media (prefers-reduced-motion: reduce) { .hkpi { transition: none; } a.hkpi:hover { transform: none; } }
.hkpi { padding: 13px 12px 12px 15px; }
.hkpi-l { font-size: 10.5px; letter-spacing: .02em; gap: 6px; }
.hkpi-i { width: 20px; height: 20px; padding: 3.5px; }
/* home, row 3: "Needs action" on the left (rows in two columns on wide screens), Technicians + Margin stacked on the right - no tall empty cards */
@media (min-width: 1025px) {
  .dash > .dash-feed.home > .need { grid-row: span 2; }
  .dash:has(> .dash-feed.home) > .dash-side > .card { justify-content: flex-start; }
  .dash:has(> .dash-feed.home) > .dash-side > .card h3 { margin-bottom: 12px; }
}
@media (min-width: 1440px) {
  .dash > .dash-feed.home > .need { grid-column: span 2; }
  .dash-feed.home > .need .nrows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; align-content: start; }
  .dash-feed.home > .need .nrow + .nrow { box-shadow: none; border-radius: 8px; }
  .dash-feed.home > .need .nrow { background: #f8fafc; box-shadow: inset 0 0 0 1px #eef2f7; border-radius: 12px; margin: 3px 0; }
  .dash-feed.home > .need a.nrow:hover { background: #fff; box-shadow: inset 0 0 0 1px #dbe4f0, 0 8px 18px -12px rgba(15, 23, 42, .3); }
  .dash-feed.home > .need { display: flex; flex-direction: column; }
  .dash-feed.home > .need .quiet { margin-top: auto; }
}

/* v4: the lower half of Home - no stretched gaps, tables side by side and filling the row */
@media (min-width: 1025px) {
  .dash > .dash-feed > .dsec, .dash:has(> .dash-feed.home) > .dash-feed > .billing-card { align-self: start; align-content: start; }
  /* each section is its own auto-fitting grid: cards share the row and always fill it */
  .dash > .dash-feed > .dsec:not([data-solo="1"]) { grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); }
  .dash > .dash-feed > .dsec:not([data-solo="1"]) > * { grid-column: span 1; }
  .dash > .dash-feed > .dsec:not([data-solo="1"]) > .dsec-h, .dash > .dash-feed > .dsec > .tcard.xwide { grid-column: 1 / -1; }
  .dsec > .kpis:has(> .kgrid:empty):has(> .quiet[hidden]) { display: none; }
  .dsec > .dsec-h { margin: 6px 0 -4px; }
  .tcard > summary { padding: 12px 18px; }
  .tcard .tt { font-size: 14.5px; }
  .tscroll { max-height: 300px; }
  .dtable th, .dtable td { padding: 9px 14px; }
  .kpis .quiet { border-radius: 0 0 var(--radius) var(--radius); }
  .kpis.only-quiet .quiet { border-radius: var(--radius); background: #fff; }
}
@media (min-width: 1025px) {
  /* the short row (Billing alerts + one-line sections): same height, compact */
  .dash:has(> .dash-feed.home) > .dash-feed > .billing-card { align-self: stretch; padding: 14px 18px; }
  .dash:has(> .dash-feed.home) .billing-card h3 { margin-bottom: 6px; }
  .dash:has(> .dash-feed.home) .billing-card .money-sub { margin: 0 0 2px; font-size: 12.5px; }
  .dash:has(> .dash-feed.home) .billing-card .btn { padding: 5px 10px; font-size: 12.5px; min-height: 0; margin-top: 6px; }
  .dash > .dash-feed > .dsec[data-solo="1"] { align-self: stretch; grid-template-rows: auto 1fr; }
  .dash > .dash-feed > .dsec[data-solo="1"] > .kpis { display: flex; align-items: center; }
  .dash > .dash-feed > .dsec[data-solo="1"] > .kpis .quiet { border: 0; background: none; width: 100%; }
}
@media (min-width: 1025px) {
  /* sections that only say "nothing pending" add nothing on Home (Needs action already lists what is clear) */
  .dash > .dash-feed.home > .dsec[data-solo="1"]:has(> .kpis.only-quiet) { display: none; }
  /* Billing alerts: one slim bar across the page */
  .dash:has(> .dash-feed.home) .billing-card { grid-column: 1 / -1; order: 2; display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; padding: 10px 18px; }
  .dash:has(> .dash-feed.home) .billing-card h3 { margin: 0; flex: none; }
  .dash:has(> .dash-feed.home) .billing-card > div { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; flex: 1; min-width: 0; }
  .dash:has(> .dash-feed.home) .billing-card .money-sub { margin: 0; }
  .dash:has(> .dash-feed.home) .billing-card > div > div { margin-left: auto; }
  .dash:has(> .dash-feed.home) .billing-card .btn { margin-top: 0; }
  .dash:has(> .dash-feed.home) .billing-card pre { flex-basis: 100%; }
  .dtable { font-size: 12.5px; }
  .dtable th, .dtable td { padding: 8px 10px; }
  .dtable thead th { font-size: 10.5px; letter-spacing: .02em; }
}
@media (min-width: 1025px) {
  /* tables need the full row to show every column without a scroll bar; small cards share a row */
  .dash > .dash-feed > .dsec:not([data-solo="1"]) > .tcard.twide { grid-column: 1 / -1; }
  .dash:has(> .dash-feed.home) .billing-card .btn { padding: 5px 12px; font-size: 12.5px; min-height: 32px !important; }
}
@media (min-width: 1025px) {
  .dash:has(> .dash-feed.home) .billing-card { flex-wrap: nowrap; }
  .dash:has(> .dash-feed.home) .billing-card > div { flex-wrap: wrap; }
  /* a closed (collapsed) table is only a title bar: let it share the row with the numbers card */
  .dash > .dash-feed > .dsec:not([data-solo="1"]) > .tcard.twide:not([open]):not(.xwide) { grid-column: span 1; }
  .dash > .dash-feed > .dsec > .kpis { align-self: stretch; }
}

/* section pages (#/x/sec/...): screens grouped under Overview / Daily work / Records */
.sec-page { padding-bottom: 10px; }
.sec-grp { padding: 4px 12px 8px; }
.sec-grp-h { display: flex; align-items: baseline; gap: 10px; padding: 10px 8px 6px; }
.sec-grp-h b { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #334155; }
.sec-grp-h small { color: #64748b; font-size: 12.5px; flex: 1; }
.sec-page .nrows { padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.sec-page .nrow, .sec-page .nrow + .nrow { min-height: 50px; padding: 8px 10px; border-radius: 12px; background: #f8fafc; box-shadow: inset 0 0 0 1px #eaeff5; }
.sec-page a.nrow:hover { background: #fff; box-shadow: inset 0 0 0 1px #d5e0ee, 0 10px 20px -14px rgba(15, 23, 42, .35); }
.sec-page .nrow .nbub { width: 34px; height: 34px; padding: 8px; border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--t-fg, #2563eb) 70%, #fff), var(--t-fg, #2563eb)); }
.sec-page .nt { font-size: 13.5px; font-weight: 600; }
.sec-page .ngo { color: #94a3b8; }
/* the pin star on the dark menu: clearly visible when you point at a row; gold when pinned */
.side .nstar { color: #b6c2d6; }
.side .nstar:hover { color: #fbbf24; background: rgba(255, 255, 255, .1); }
.side .nstar.on { color: #fbbf24; }
.side .nlink.on .nstar { color: #fff; }
.side .nlink.on .nstar.on { color: #fde68a; }

/* inner pages (Owner View, Service, Store, AMC, Tap pages ...): use the full width, number tiles stretch to fill each row */
@media (min-width: 1025px) {
  .content .own-wrap, .content .service-wrap, .content .tap-wrap, .content .amc-wrap { max-width: 1680px; margin-inline: auto; }
  .content .own-tiles, .content .store-kpis, .content .tm-kpis, .content .des-kpis, .content .amc-cards { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
}
.content .own-tile, .content .money-kpi, .content .store-kpi, .content .tap-card, .content .des-kpi { border-radius: 14px; box-shadow: var(--shadow); border: 0; }
.content .own-wrap h3, .content .service-wrap h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }

/* =====================================================================================
   v5 (owner: "fonts should be clean and easy to read"): Inter everywhere, slightly larger text,
   normal letter spacing, darker grey for small text, no tiny labels (nothing under 12px).
   ===================================================================================== */
:root { font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif; font-size: 14.5px; --muted: #475569; }
body { letter-spacing: 0; line-height: 1.45; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.side { --muted: #9fb0c8; }
h1, h2, h3, .top h2, .hero-hi h1, .need-h h2, .card .big, .hkpi-v, .kpi .kv, .side .logo { letter-spacing: -.01em; }
.top h2 { font-weight: 700; }
.hero-hi h1 { font-size: 23px; font-weight: 700; }
.hero-hi p { font-size: 14px; color: #475569; }
.hkpi-v { font-size: 24px; font-weight: 700; }
.hkpi-l { font-size: 12px; font-weight: 600; letter-spacing: .01em; text-transform: none; color: #475569; }
.hkpi small { font-size: 12.5px; color: #55627a; }
.kpi .kv, .card .big { font-weight: 700; }
.kpi .kl { font-size: 12.5px; text-transform: none; letter-spacing: 0; color: #475569; }
.card h3, .launch-h > b, .dsec-h, .sec-grp-h b, .content .own-wrap h3, .content .service-wrap h3 { font-size: 12.5px; letter-spacing: .04em; font-weight: 700; color: #475569; }
.nlink, .nscreens > summary { font-size: 14.5px; font-weight: 500; }
.nlink.sm { font-size: 14px; }
.nhead, .nsec { font-size: 12px; letter-spacing: .05em; }
.side .logo small { font-size: 11.5px; }
.llabel { font-size: 13px; font-weight: 600; }
.nt { font-size: 14.5px; font-weight: 600; }
.nt small { font-size: 13px; font-weight: 400; color: #55627a; }
.ncount-big, .lbadge, .ncnt { font-weight: 700; }
.lbadge { font-size: 12px; }
.dtable, table.grid, .card table { font-size: 13.5px; }
.dtable thead th, .grid th { font-size: 12px; letter-spacing: .02em; text-transform: none; font-weight: 600; color: #475569; }
.tcard .tt { font-size: 15px; font-weight: 600; }
.tcard .tm, .need-h small, .quiet, .count { font-size: 13px; }
.btn, .tile-btn, .chip { font-size: 14px; font-weight: 600; }
.sec-page .nt { font-size: 14.5px; }
.sec-grp-h small { font-size: 13px; }
input, select, textarea { font-size: 14.5px; }
@media (min-width: 1440px) { .hkpi-v { font-size: 23px; } }
@media (min-width: 1025px) { .dtable { font-size: 13.5px; } .dtable thead th { font-size: 12px; } .need-h h2 { font-size: 16px; } .dsec > .dsec-h { font-size: 12.5px; } }

/* v6: all inner pages use the row */
@media (min-width: 1025px) {
  .dash > .dash-feed > .dsec:not(:has(> .tcard)) > .kpis, .dash > .dash-feed > .dsec > .kpis:has(+ .tcard[open]) { grid-column: 1 / -1; }
  .content .store-page, .content .acc-wrap, .content .lay-wrap, .content .sales-wrap, .content .own-settings { max-width: 1680px; margin-inline: auto; }
  .dash:not(:has(> .dash-feed.home)) .compose { padding: 10px 14px; background: transparent; box-shadow: none; }
  .dash:not(:has(> .dash-feed.home)) .compose .tile-btn { background: #fff; box-shadow: var(--shadow); }
}
@media (min-width: 1025px) {
  /* a one-card section with no one-card neighbour takes the whole row (no empty block beside it) */
  .dash > .dash-feed:not(.home) > .dsec[data-solo="1"]:not(:has(+ .dsec[data-solo="1"])):not(.dsec[data-solo="1"] + .dsec[data-solo="1"]) { grid-column: 1 / -1; }
  .dsec .kgrid .kpi { flex: 1 1 180px; max-width: none; }
}
@media (min-width: 1025px) { .dash .dsec .kgrid { display: flex; flex-direction: row; flex-wrap: wrap; } .dash .dsec .kgrid .kpi { flex: 1 1 200px; } }
@media (min-width: 1025px) {
  .dash > .dash-feed:not(.home) > .dsec[data-solo="1"]:not(:has(+ .dsec[data-solo="1"])):not(.dsec[data-solo="1"] + .dsec[data-solo="1"]) { grid-template-columns: minmax(0, 1fr); --cols: 1; }
  .dash > .dash-feed > .dsec[data-solo="1"] > .kpis { grid-column: 1 / -1; max-width: none; width: auto; justify-self: stretch; }
}
@media (min-width: 1440px) {
  /* a side card left alone on the last row takes the whole row */
  .dash:not(:has(> .dash-feed.home)) > .dash-side > .card:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
}
@media (min-width: 1025px) { .dash > .dash-feed > .dsec[data-solo="1"] > .kpis { display: block; } }

/* =====================================================================================
   v7: forms (the slide-in drawer) - grouped sections, clear labels, comfortable boxes
   ===================================================================================== */
.overlay { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
.drawer { box-shadow: -24px 0 60px -20px rgba(15, 23, 42, .45); background: #f4f6fa; }
.drawer header { padding: 14px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.drawer header h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.drawer header .iconbtn { background: #f1f5f9; box-shadow: none; border-radius: 10px; }
.drawer .body { padding: 18px 22px 24px; }
.drawer footer { padding: 12px 22px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 20px -16px rgba(15, 23, 42, .25); }
.drawer footer .btn { min-height: 40px; padding: 8px 18px; }
.drawer .body > .fgrid { background: #fff; border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.fsecs { display: grid; gap: 14px; }
.fsec { background: #fff; border-radius: 14px; padding: 14px 18px 18px; box-shadow: var(--shadow); }
.fsec-h { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid #eef2f7; font-size: 13.5px; font-weight: 700; color: #0f172a; }
.fsec-h::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: #2563eb; }
.fsec[data-g=customer] .fsec-h::before { background: #0d9488; }
.fsec[data-g=dates] .fsec-h::before { background: #8b5cf6; }
.fsec[data-g=money] .fsec-h::before { background: #16a34a; }
.fsec[data-g=people] .fsec-h::before { background: #f59e0b; }
.fsec[data-g=notes] .fsec-h::before { background: #64748b; }
.fsec-h small { font-weight: 600; font-size: 12px; color: #64748b; background: #f1f5f9; border-radius: 999px; padding: 1px 8px; }
.fgrid { gap: 14px 16px; }
.field label { font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 1px; }
.field input, .field select, .field textarea { border: 1px solid #cfd8e3; border-radius: 9px; padding: 9px 11px; min-height: 40px; background: #fff; color: #0f172a; transition: border-color .15s, box-shadow .15s; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #a8b5c6; }
.field input:focus, .field select:focus, .field textarea:focus, .own-field input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px #dbe7ff; }
.field input[readonly], .field input:disabled, .field .ro { background: #f1f5f9; color: #475569; }
.field input::placeholder, .field textarea::placeholder { color: #94a3b8; }
.field textarea { min-height: 84px; }
.items-title { margin: 18px 0 10px; font-size: 13.5px; font-weight: 700; }
@media (max-width: 860px) { .drawer .body { padding: 12px; } .fsec { padding: 12px 12px 14px; } }
.hkpi { text-align: left; align-items: flex-start; }
@media (max-width: 860px) { .top h2 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hero-new .tile-btn { font-size: 13px; padding: 7px 12px; } }
/* phones: the "Create new" buttons are one swipeable row, not a tall stack */
@media (max-width: 860px) {
  .compose-btns, .hero-new { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; margin: 0 -2px; -webkit-overflow-scrolling: touch; }
  .compose-btns::-webkit-scrollbar, .hero-new::-webkit-scrollbar { display: none; }
  .compose-btns .tile-btn, .hero-new .tile-btn { flex: none; width: auto; white-space: nowrap; }
  .hero-top { display: grid; gap: 10px; }
  .hero-new { min-width: 0; }
}
@media (max-width: 860px) { .top .row { gap: 5px; } .top .iconbtn, .top .avatar { width: 36px; height: 36px; } .top h2 { font-size: 16px; margin: 0 4px 0 2px; letter-spacing: -.02em; } }
/* small phones: a long page title may use two short lines instead of being cut with "..." */
@media (max-width: 480px) {
  .top h2 { font-size: 15px; line-height: 1.15; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: clip; overflow-wrap: anywhere; }
}
@media (max-width: 340px) { .top .row { gap: 3px; } .top { padding: 0 8px; } .top .iconbtn, .top .avatar { width: 34px; height: 34px; } .top h2 { font-size: 14px; } }
/* very small phones (320 px): card grids may never be wider than the screen; long links wrap */
@media (max-width: 480px) {
  .content .amc-fmts, .content .einv-list, .content .service-list, .content .sp-today, .content .amc-grid, .content .des-fields { grid-template-columns: minmax(0, 1fr); }
  .content .amc-fmt, .content .amc-fmt * { min-width: 0; max-width: 100%; }
  .content .tap-wrap a, .content .tap-card a, .content .amc-wrap a { overflow-wrap: anywhere; word-break: break-word; }
  .top h2 { text-overflow: ellipsis; }
}

/* v8: the Home number tiles can be arranged by each person (Arrange -> drag / arrows / eye -> Done) */
.hero-arr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-arr-btn { padding: 6px 12px; font-size: 13px; min-height: 34px; color: #475569; }
.hero-arr-btn .ico { width: 15px; height: 15px; }
.hero-arr-hint { font-size: 13px; color: #475569; }
.hero.arranging .hkpi { cursor: grab; outline: 2px dashed #c3d0e4; outline-offset: -2px; padding-bottom: 46px; user-select: none; }
.hero.arranging .hkpi.dragging { opacity: .45; }
.hero.arranging .hkpi.over { outline-color: #2563eb; background: #f1f6ff; }
.hero.arranging .hkpi.off > :not(.hkpi-tools) { opacity: .35; }
.hkpi-tools { position: absolute; left: 10px; right: 8px; bottom: 8px; display: flex; gap: 6px; justify-content: space-between; }
.hkpi-tools button { flex: 1; min-height: 32px; border: 0; border-radius: 8px; background: #eef2f7; color: #0f172a; font-size: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.hkpi-tools button:hover { background: #dbe7ff; color: #1d4ed8; }
.hkpi-tools .ico { width: 16px; height: 16px; }
@media (max-width: 860px) { .hkpi-tools button { min-height: 40px; } .hero.arranging .hkpi { padding-bottom: 56px; } .hero-arr { justify-content: space-between; } }

/* v9: number tiles drag directly (no Arrange click), same feel as the section icons */
.hero-kpis { position: relative; }
.hkpi { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.hkpi.dragging { z-index: 5; cursor: grabbing; box-shadow: 0 18px 36px -12px rgba(15, 23, 42, .45); transition: none; opacity: 1 !important; }
.hero-kpis.dragging-on a.hkpi:not(.dragging):hover { transform: none; }
@media (hover: hover) { .hkpi { cursor: grab; } a.hkpi { cursor: pointer; } }
.ltile { cursor: pointer; }

/* v10: Home cards can be moved (grip at the top-right of each card; phone: hold it, then drag) */
.dash-feed.home > .hero { order: -2; }
.dash-feed.home > .launch { order: -1; }
@media (max-width: 1024px) {
  .dash:has(> .dash-feed.home) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .dash:has(> .dash-feed.home) > .dash-feed, .dash:has(> .dash-feed.home) > .dash-side { display: contents; }
  .dash:has(> .dash-feed.home) > .dash-side > * { position: static; }
}
[data-ck] { position: relative; }
.cgrip { position: absolute; top: 8px; right: 8px; z-index: 3; width: 30px; height: 30px; padding: 6px; border: 0; border-radius: 8px; background: transparent; color: #94a3b8;
  display: inline-flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; opacity: .55; transition: opacity .15s, background-color .15s, color .15s; }
.cgrip .ico { width: 18px; height: 18px; }
.cgrip .ico svg { stroke-width: 3; }
[data-ck]:hover > .cgrip, .cgrip:focus-visible { opacity: 1; }
.cgrip:hover { background: #eef2f7; color: #1d4ed8; }
.dsec[data-ck] > .cgrip { top: 0; right: 0; }
.cdragging { z-index: 20; cursor: grabbing; box-shadow: 0 24px 48px -16px rgba(15, 23, 42, .45) !important; transition: none !important; }
.cdragging > .cgrip { cursor: grabbing; opacity: 1; }
.cdrag-on, .cdrag-on * { user-select: none; -webkit-user-select: none; }
@media (hover: none) { .cgrip { opacity: .9; width: 38px; height: 38px; top: 4px; right: 4px; } }
.need-h, .card > h3, .dsec-h { padding-right: 36px; }

/* ===== Tables on every page (owner 1 Dec 2026): "different colours to each row for easy view, with a little bold table outline" =====
   Every other row is tinted, rows and columns have light lines, each table has a 1.5 px outline. Written with :where() (no weight),
   so any table that already colours its own rows (selected, overdue, warnings ...) keeps its colours. */
:root { --row-alt: #edf3fb; --tline: #b8c5d3; --tline-soft: #dde5ee; --thead-bg: #eef2f7; }
:where(.content, .overlay, .sheet) :where(table) > :where(tbody) > :where(tr:nth-child(even)) { background: var(--row-alt); }
:where(.content, .overlay, .sheet) :where(table) :where(td, th) { border-bottom: 1px solid var(--tline-soft); }
:where(.content, .overlay, .sheet) :where(table) :where(td, th) + :where(td, th) { border-left: 1px solid var(--tline-soft); }
:where(.content, .overlay, .sheet) :where(table) > :where(thead) :where(th) { background: var(--thead-bg); border-bottom: 2px solid var(--tline); }
:where(.content, .overlay, .sheet) table:not(:where(.gridwrap, .tscroll, .money-tbl, .led-tbl, .hlp-page, .print) table) { border: 1.5px solid var(--tline); border-collapse: collapse; }
.gridwrap, .tscroll, .money-tbl, .led-tbl { border: 1.5px solid var(--tline); border-radius: 10px; }
.gridwrap.as-cards { border: 0; }
.grid th, .dtable thead th, .money-tbl th, .led-tbl th { background: var(--thead-bg); border-bottom: 2px solid var(--tline); color: #334155; }
.grid td, .dtable td, .money-tbl td, .led-tbl td { border-bottom-color: var(--tline-soft); }
.grid td + td, .grid th + th, .dtable td + td, .dtable th + th, .money-tbl td + td, .money-tbl th + th, .led-tbl td + td, .led-tbl th + th { border-left: 1px solid var(--tline-soft); }
.grid tbody tr:hover, .dtable tbody tr:hover, .money-tbl tbody tr:hover, .led-tbl tbody tr:hover { background: #dcebfb; }
.grid tbody tr.sel { background: var(--sel); }
/* phone cards: every other card tinted too */
.mcards .mcard:nth-child(even) { background: var(--row-alt); }
/* dashboard tables: no box-in-a-box scrolling; a table wider than its card shows as one card per row (app.js tableCard) */
.tcard .tscroll { max-height: none; }
.tcard.tfit-cards .tscroll { display: none; }
.tcard.tfit-cards .tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.tcard.tfit-cards .tcard-row { background: var(--panel); border: 1px solid var(--tline-soft); border-radius: 8px; padding: 8px 10px; }
.tcard.tfit-cards .tcard-row:nth-child(even) { background: var(--row-alt); }
.tcard.tfit-cards .tcard-row > b { display: block; margin-bottom: 4px; }
.tcard.tfit-cards .tcard-row dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; margin: 0; font-size: 13px; }
.tcard.tfit-cards .tcard-row dt { color: var(--muted); }
.tcard.tfit-cards .tcard-row dd { margin: 0 0 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .tcard-row:nth-child(even) { background: var(--row-alt); } }
/* no text cut off with "…" in tables: long names wrap (numbers stay on one line) */
.dtable tbody th { white-space: normal; max-width: 280px; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.money-tbl th, .money-tbl td { white-space: normal; }
.money-tbl td.n, .money-tbl th.n { white-space: nowrap; }
/* record forms: the item table (quotation / PO / goods note lines) no longer scrolls up-down inside the form - the form scrolls as one */
.items-grid { max-height: none; }

/* ===== Record page, modern look (owner 1 Dec 2026: "very unprofessional, not like a modern well designed ERP") =====
   One calm surface per block (thin border, no heavy shadows), clear type hierarchy, details as a fact sheet (label above, value as
   plain text, thin row lines) instead of grey input boxes, underlined tabs, a compact action bar. */
.wsr { gap: 14px; }
.wsr .card, .wsr-steps, .wsr-tabs { box-shadow: 0 1px 2px rgba(15, 23, 42, .04); border: 1px solid #e2e8f0; border-radius: 12px; }
.wsr-head { padding: 18px 22px; gap: 10px; background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%); }
.wsr-crumb, .wsr-crumb a { font-size: 13px; color: #64748b; text-decoration: none; }
.wsr-crumb a:hover { color: var(--brand); }
.wsr-title { font-size: 24px; font-weight: 750; letter-spacing: -.3px; color: #0f172a; }
.wsr-party { font-size: 15px; color: #334155; font-weight: 500; }
.wsr-facts { grid-template-columns: repeat(auto-fill, minmax(170px, max-content)); gap: 10px; }
.wsr-fact { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 14px; max-width: 320px; }
.wsr-fl { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #64748b; font-weight: 600; }
.wsr-fv { font-size: 15px; font-weight: 650; color: #0f172a; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }
.wsr-wait { font-size: 13px; color: #64748b; }
.wsr-steps { padding: 10px 14px; background: #fff; }
.wsr-steps .btn { border-radius: 8px; min-height: 38px; padding: 7px 16px; font-weight: 600; }
.wsr-chain { padding: 2px 0 2px; }
.wsr-node { border: 1px solid #e2e8f0; box-shadow: none; }
/* tabs: a clean underline bar */
.wsr-tabs { background: #fff; padding: 0 10px; gap: 2px; flex-wrap: wrap; }
.wsr-tab, .wsr-tabs .dd > button { border-radius: 0; padding: 13px 12px 11px; min-height: 0; color: #64748b; border-bottom: 2px solid transparent; background: none; }
.wsr-tab:hover, .wsr-tabs .dd > button:hover { color: #0f172a; background: none; }
.wsr-tab.on { color: var(--brand); border-bottom-color: var(--brand); background: none; }
.wsr-cnt { font-size: 11.5px; background: #f1f5f9; color: #475569; border-radius: 999px; padding: 1px 7px; font-weight: 700; }
.wsr-tab.on .wsr-cnt { background: var(--brand); color: #fff; }
.wsr-cnt.zero { opacity: .55; }
/* details: a fact sheet */
.wsr-pane > .card { padding: 18px 22px; }
.wsr-ph, .wsr-pane h3, .wsr-rail h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #64748b; font-weight: 700; }
.wsr-pane .fgrid, .wsr-empty .fgrid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 28px; }
.wsr-pane .field, .wsr-empty .field { padding: 10px 0 11px; border-bottom: 1px solid #eef2f6; gap: 3px; }
.wsr-pane .field > label, .wsr-empty .field > label { font-size: 12px; font-weight: 600; color: #64748b; letter-spacing: .01em; }
.wsr-pane .field .ro, .wsr-empty .field .ro { background: none !important; padding: 0 !important; min-height: 0 !important; border-radius: 0; color: #0f172a !important; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.wsr-pane .field .ro:empty::before { content: '—'; color: #cbd5e1; }
.wsr-empty > summary, .wsr-empty summary { color: #64748b; font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 10px; }
/* right rail */
.wsr-rail .card { padding: 16px 18px; }
.wsr-people, .wsr-people * { font-size: 14px; }
@media (max-width: 700px) {
  .wsr-head { padding: 14px 16px; }
  .wsr-title { font-size: 20px; }
  .wsr-pane > .card { padding: 14px 16px; }
  .wsr-pane .fgrid, .wsr-empty .fgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
  .wsr-tabs { overflow-x: auto; flex-wrap: nowrap; }
}
