/* USS Fleet — design v3. Floating rail + top bar, compact stat cards, card grids. Light + dark. */
:root {
  --bg: #f3f1ed; --panel: #ffffff; --panel2: #f6f4f0; --hover: #f1eee9; --line: #ebe7e0; --line2: #ddd8cf;
  --ink: #14181f; --text: #39404b; --muted: #6a7280; --faint: #9aa1ab;
  --navy: #0b2545; --navy2: #1d3f6e; --amber: #f5a00b; --amber2: #dd8c00; --amberSoft: #fff3dd; --onAmber: #1f1500;
  --rent: #0e8a64; --repair: #f0524f; --idle: #dcd8d0; --check: #4dabf7; --reserved: #9775fa;
  --good: #0c8a64; --goodSoft: #e3f6ef; --warn: #b26a00; --warnSoft: #fff1d9; --bad: #d93a3a; --badSoft: #fdeaea; --info: #2f6fdb; --infoSoft: #e8f0fd; --vio: #7048e8; --vioSoft: #f0ebff;
  --sh: 0 1px 2px rgb(20 24 31 / .04), 0 8px 24px rgb(20 24 31 / .05); --sh2: 0 18px 50px rgb(20 24 31 / .14);
  --r: 22px; --rs: 14px; color-scheme: light;
}
/* Dark: near-black page, clearly raised panels, pure-white headings and bright body text so it reads as crisply as light mode. */
[data-theme='dark'] {
  --bg: #07090d; --panel: #12161e; --panel2: #1a1f29; --hover: #222937; --line: #2a313e; --line2: #3b4454;
  --ink: #ffffff; --text: #e4e8ef; --muted: #aeb6c3; --faint: #858e9c;
  --navy: #eef2f8; --navy2: #5e8ff0; --amber: #ffad1f; --amber2: #ffbd4a; --amberSoft: #2b2110; --onAmber: #1a1100; --idle: #2d3442;
  --good: #34d399; --goodSoft: #0f2a20; --warn: #ffc457; --warnSoft: #2e2410; --bad: #ff6b6b; --badSoft: #3a1618; --info: #7cb0ff; --infoSoft: #142545; --vio: #b9a1ff; --vioSoft: #251c44;
  --sh: 0 0 0 1px rgb(255 255 255 / .02), 0 10px 30px rgb(0 0 0 / .55); --sh2: 0 20px 56px rgb(0 0 0 / .7); color-scheme: dark;
}
[data-theme='dark'] body { background: radial-gradient(1000px 600px at 100% -20%, rgb(255 173 31 / .06), transparent 60%), var(--bg); }
[data-theme='dark'] .card, [data-theme='dark'] .stat, [data-theme='dark'] .it, [data-theme='dark'] .top, [data-theme='dark'] .rail__grp, [data-theme='dark'] .tabbar { border-color: #262d39; box-shadow: inset 0 1px 0 rgb(255 255 255 / .05), var(--sh); }
[data-theme='dark'] .callout { border: 1px solid rgb(255 173 31 / .28); }
[data-theme='dark'] .tip { background: #f4f6fa; color: #0b0e13; }
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; font: 14px/1.5 'Poppins', system-ui, sans-serif; color: var(--text); background: radial-gradient(1000px 600px at 100% -20%, rgb(245 160 11 / .07), transparent 60%), var(--bg); background-attachment: fixed; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -.02em; line-height: 1.2; font-weight: 600; }
.ic { width: 18px; height: 18px; flex: none; }
td, .num, .kv dd, .stat__v { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .nowrap { white-space: nowrap; } .r { text-align: right; }

/* ---------- Shell: top bar + icon rail ---------- */
.top { position: sticky; top: 12px; z-index: 40; margin: 12px 12px 0; height: 66px; display: flex; align-items: center; gap: 12px; padding: 0 12px 0 10px; border-radius: 24px; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(16px); border: 1px solid var(--line); box-shadow: var(--sh); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.brand img { width: 44px; height: 44px; border-radius: 50%; background: #fff; padding: 4px; border: 1px solid var(--line); }
.brand b { display: block; font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; line-height: 1.1; } .brand small { font-size: 12px; color: var(--muted); }
.search { flex: 1; max-width: 420px; margin-left: auto; position: relative; }
.search input { height: 44px; border-radius: 99px; padding-left: 42px; background: var(--panel2); border-color: var(--line); }
.search .ic { position: absolute; left: 15px; top: 13px; color: var(--muted); }
.top__a { display: flex; align-items: center; gap: 8px; }
.round { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; transition: background .15s; }
.round:hover { background: var(--hover); }
.round b { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10.5px; display: grid; place-items: center; border: 2px solid var(--panel); }
.who { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); }
.who .av { width: 36px; height: 36px; } .who small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.1; } .who b { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--amberSoft); color: var(--amber2); font-weight: 700; font-size: 13px; border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
[data-theme='dark'] .av { color: var(--amber); }
.rail { position: fixed; left: 12px; top: 90px; bottom: 12px; width: 66px; z-index: 30; display: flex; flex-direction: column; gap: 12px; }
.rail__grp { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 0; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--sh); }
.rail__grp.grow { flex: 1; overflow-y: auto; scrollbar-width: none; }
.rail a, .rail button { position: relative; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; color: var(--muted); border: 0; background: none; cursor: pointer; transition: background .15s, color .15s; flex: none; }
.rail a:hover, .rail button:hover { background: var(--hover); color: var(--ink); }
.rail a.on { background: var(--navy); color: var(--amber); box-shadow: 0 6px 16px rgb(11 37 69 / .25); }
[data-theme='dark'] .rail a.on { background: var(--amber); color: var(--onAmber); }
.rail .ic { width: 20px; height: 20px; }
.rail b { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10px; display: grid; place-items: center; border: 2px solid var(--panel); }
.rail [data-label]:hover::after { content: attr(data-label); position: absolute; left: 58px; top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 6px 10px; border-radius: 10px; background: var(--ink); color: var(--panel); font-size: 12.5px; font-weight: 600; pointer-events: none; box-shadow: var(--sh2); z-index: 5; }
.theme .moon, [data-theme='dark'] .theme .sun { display: none; } [data-theme='dark'] .theme .moon { display: block; }
.main { margin-left: 90px; padding: 20px 14px 48px 12px; }
.burger { display: none; }
@media (max-width: 860px) { .rail { transform: translateX(-120%); transition: transform .2s; } .nav-open .rail { transform: none; } .main { margin-left: 0; } .burger { display: grid; } .brand { min-width: 0; } .brand span, .who span, .search { display: none; } }

/* ---------- Page header ---------- */
.ph { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 4px 2px 16px; }
.ph__t small { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.ph__t h1 { font-size: 32px; font-weight: 600; letter-spacing: -.03em; }
.ph__a { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ph .round { width: 40px; height: 40px; align-self: center; }
.content { display: grid; gap: 16px; }
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--rs); font-size: 13px; border: 1px solid; }
.banner.demo { background: var(--amberSoft); border-color: color-mix(in srgb, var(--amber) 35%, transparent); color: var(--warn); }
.banner.ok { background: var(--goodSoft); border-color: color-mix(in srgb, var(--good) 30%, transparent); color: var(--good); }
.banner.err { background: var(--badSoft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--bad); }

/* ---------- Segmented controls, chips ---------- */
.seg, .tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg a, .seg button, .tabs a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; border: 0; background: none; font: 500 13.5px 'Poppins', sans-serif; color: var(--muted); white-space: nowrap; cursor: pointer; }
.seg a:hover, .tabs a:hover, .seg button:hover { color: var(--ink); }
.seg a.on, .tabs a.on, .seg button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgb(20 24 31 / .1); }
[data-theme='dark'] .seg a.on, [data-theme='dark'] .tabs a.on, [data-theme='dark'] .seg button.on { background: var(--hover); }
.tabs a b, .chips b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--line); color: var(--text); font-size: 11.5px; display: grid; place-items: center; font-weight: 600; }
.tabs a.on b { background: var(--amber); color: var(--onAmber); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chips a, .chips button { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); font: 500 13.5px 'Poppins', sans-serif; color: var(--ink); cursor: pointer; white-space: nowrap; }
.chips a:hover, .chips button:hover { border-color: var(--line2); }
.chips a.on, .chips button.on { background: var(--navy); border-color: var(--navy); color: #fff; } .chips a.on b, .chips button.on b { background: rgb(255 255 255 / .2); color: #fff; }
[data-theme='dark'] .chips a.on, [data-theme='dark'] .chips button.on { background: var(--amber); border-color: var(--amber); color: var(--onAmber); }
.chips .dot { width: 8px; height: 8px; border-radius: 50%; }
.lens { display: flex; gap: 8px; flex-wrap: wrap; }
.lens a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 7px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); font-weight: 500; color: var(--ink); }
.lens a .ico { width: 28px; height: 28px; border-radius: 50%; } .lens a .ico .ic { width: 14px; height: 14px; }
.lens a.on { border-color: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 18%, transparent); }
.lens small { display: none; }

/* ---------- Grid ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c9 { grid-column: span 9; } .c12 { grid-column: span 12; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.g4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.g21 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1180px) { .c4, .c5 { grid-column: span 6; } .c7, .c8, .c9 { grid-column: span 12; } .c3 { grid-column: span 6; } .g21 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid > * { grid-column: span 12 !important; } .g2 { grid-template-columns: 1fr; } }

/* ---------- Stat cards (compact) ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 12px; }
.stats.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stat { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 116px; padding: 14px 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--sh); overflow: hidden; transition: border-color .15s, transform .15s; }
a.stat:hover { border-color: var(--line2); transform: translateY(-1px); }
.stat.on { border: 1.5px solid var(--amber); }
.stat__top { display: flex; align-items: center; gap: 8px; }
.ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.ico .ic { width: 16px; height: 16px; }
.stat__l { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.stat__l small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.stat__v { font-size: 25px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; }
.stat__v .u { font-size: 13px; font-weight: 500; color: var(--muted); margin-right: 3px; letter-spacing: 0; }
.stat__f { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: auto; flex-wrap: wrap; min-height: 18px; }
.stat:has(.spark) .stat__f { padding-right: 74px; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.trend.up { color: var(--good); } .trend.down { color: var(--bad); } .trend.flat { color: var(--muted); }
.stat .spark { position: absolute; right: 14px; bottom: 12px; width: 68px; height: 26px; }
.meter { display: flex; height: 7px; border-radius: 99px; overflow: hidden; background: var(--panel2); gap: 2px; flex: 1; min-width: 70px; }
.meter i { display: block; height: 100%; }
.ico.navy { background: color-mix(in srgb, var(--navy) 9%, var(--panel)); color: var(--navy); } .ico.amber { background: var(--amberSoft); color: var(--amber2); } [data-theme='dark'] .ico.amber { color: var(--amber); }
.ico.green { background: var(--goodSoft); color: var(--good); } .ico.red { background: var(--badSoft); color: var(--bad); } .ico.blue { background: var(--infoSoft); color: var(--info); } .ico.violet { background: var(--vioSoft); color: var(--vio); }
[data-theme='dark'] .ico.navy { background: var(--panel2); }

/* ---------- Cards ---------- */
.card { display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.card__h { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 0; flex-wrap: wrap; }
.card__h .chip { display: none; }
.card__h h2 { font-size: 16px; } .card__h p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; max-width: 640px; }
.card__h .act { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card__b { padding: 14px 20px 18px; flex: 1; min-width: 0; }
.card__f { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 20px 18px; font-size: 13px; color: var(--text); }
.card__f b { color: var(--ink); }

/* ---------- Item cards ---------- */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.it { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--sh); transition: border-color .15s, transform .15s, box-shadow .15s; }
.it:hover { border-color: var(--line2); transform: translateY(-2px); box-shadow: var(--sh2); }
.it__top { display: flex; align-items: center; gap: 12px; }
.it__av { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 13px; color: var(--ink); background: var(--panel2); border: 3px solid var(--idle); text-align: center; line-height: 1; }
.it__av small { display: block; font-size: 9px; font-weight: 600; color: var(--muted); }
.it__av.on_rent { border-color: var(--rent); } .it__av.ready { border-color: #4c8bf5; } .it__av.repair { border-color: var(--repair); } .it__av.inspection { border-color: var(--check); } .it__av.reserved { border-color: var(--reserved); }
.it__av.letters { background: var(--amberSoft); color: var(--amber2); border-color: transparent; font-size: 15px; }
[data-theme='dark'] .it__av.letters { color: var(--amber); }
.it h3 { font-size: 16.5px; font-weight: 600; } .it__sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.it__sub .ic { width: 13px; height: 13px; }
.it__corner { position: absolute; top: 14px; right: 14px; }
.it__box { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel2); }
.it__box span { display: block; font-size: 11.5px; color: var(--muted); } .it__box b { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.it__foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text); min-height: 32px; }
.it__foot .sp { margin-left: auto; display: flex; gap: 6px; }
.it__foot .round { width: 32px; height: 32px; } .it__foot .round .ic { width: 15px; height: 15px; }
.it .stretch::after { content: ''; position: absolute; inset: 0; border-radius: 20px; }
.it .round, .it .it__foot a:not(.stretch) { position: relative; z-index: 1; }

/* ---------- Badges / buttons / bars ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green, .badge.teal { background: var(--goodSoft); color: var(--good); } .badge.red { background: var(--badSoft); color: var(--bad); } .badge.amber { background: var(--warnSoft); color: var(--warn); }
.badge.blue { background: var(--infoSoft); color: var(--info); } .badge.violet { background: var(--vioSoft); color: var(--vio); } .badge.grey, .badge.navy { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 42px; padding: 0 17px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 600 13.5px 'Poppins', sans-serif; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { background: var(--hover); border-color: var(--line2); } .btn:active { transform: scale(.98); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--onAmber); box-shadow: 0 6px 16px rgb(245 160 11 / .3); } .btn.primary:hover { background: var(--amber2); }
.btn.dark { background: var(--navy); border-color: var(--navy); color: #fff; } [data-theme='dark'] .btn.dark { color: #0d1016; }
.btn.green { background: #12a06f; border-color: #12a06f; color: #fff; } .btn.green:hover { background: #0e8a5f; }
.btn.red { color: var(--bad); } .btn.sm { height: 34px; padding: 0 13px; font-size: 12.5px; } .btn.wide { width: 100%; }
.btn .ic { width: 16px; height: 16px; }
.bar { display: inline-block; width: 64px; height: 7px; border-radius: 99px; background: var(--panel2); overflow: hidden; vertical-align: middle; margin-right: 8px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--navy2); }
.bar.green i { background: var(--rent); } .bar.amber i { background: var(--amber); } .bar.red i { background: var(--repair); }

/* ---------- Tables ---------- */
.tw { overflow-x: auto; margin: 0 -20px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text); }
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; } .tbl th:last-child, .tbl td:last-child { padding-right: 20px; }
.tbl tr:last-child td { border-bottom: 0; } .tbl tbody tr:hover { background: var(--hover); }
.tbl td.r, .tbl th.r { text-align: right; white-space: nowrap; }
.tbl .code { font-weight: 600; color: var(--ink); white-space: nowrap; }
.tbl td small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; }
.tbl tr[data-href] { cursor: pointer; }
.empty { color: var(--muted); padding: 8px 0; margin: 0; }

/* ---------- Forms & dialogs ---------- */
.fld { display: grid; gap: 6px; font-size: 13px; } .fld > span { font-weight: 600; color: var(--ink); } .fld small { color: var(--muted); font-size: 12px; }
input, select, textarea { width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: 14px 'Poppins', sans-serif; }
textarea { height: auto; padding: 10px 14px; } input[type='checkbox'] { width: auto; height: auto; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 22%, transparent); }
.missing { border-color: var(--bad) !important; background: var(--badSoft) !important; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: end; } .form.one { grid-template-columns: 1fr; }
dialog.dlg { width: min(540px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 26px; background: var(--panel); color: var(--text); box-shadow: var(--sh2); }
dialog.dlg::backdrop { background: rgb(13 16 22 / .45); backdrop-filter: blur(4px); }
.dlg__h { display: flex; align-items: center; gap: 12px; padding: 20px 22px 16px; }
.dlg__h .chip { display: none; } .dlg__h h2 { font-size: 18px; } .dlg__h p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.dlg__h .x { margin-left: auto; width: 38px; height: 38px; }
.dlg__b { padding: 4px 22px 22px; }
.iconbtn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.actions { display: grid; gap: 8px; }
.actions .btn { justify-content: flex-start; height: 48px; border-radius: 16px; } .actions .btn small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12px; }
.actions .btn.green small, .actions .btn.dark small { color: inherit; opacity: .8; }

/* ---------- Text blocks ---------- */
.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 11px 18px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--ink); font-weight: 500; }
.why { padding: 12px 14px; border-radius: var(--rs); background: var(--panel2); font-size: 13.5px; color: var(--text); } .why b { color: var(--ink); }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--rs); background: var(--amberSoft); color: var(--text); font-size: 13.5px; }
.callout .ic { color: var(--amber2); margin-top: 2px; } [data-theme='dark'] .callout .ic { color: var(--amber); }
.callout b { color: var(--ink); }
.hero2, .gp { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--sh); flex-wrap: wrap; }
.hero2 .big, .gp__ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--amber); flex: none; font-weight: 700; }
[data-theme='dark'] .hero2 .big, [data-theme='dark'] .gp__ic { background: var(--amber); color: var(--onAmber); }
.hero2 h2, .gp h2 { font-size: 22px; } .hero2 p, .gp p { margin: 3px 0 0; color: var(--muted); }
.hero2 .act { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Attention ---------- */
.att { display: grid; gap: 4px; }
.att a { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 9px 8px; border-radius: 14px; transition: background .15s; }
.att a:hover { background: var(--hover); }
.att .n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13.5px; }
.att .danger .n { background: var(--badSoft); color: var(--bad); } .att .warn .n { background: var(--warnSoft); color: var(--warn); } .att .info .n { background: var(--infoSoft); color: var(--info); } .att .ok .n { background: var(--goodSoft); color: var(--good); }
.att b { display: block; color: var(--ink); font-weight: 600; font-size: 13.5px; line-height: 1.3; } .att small { color: var(--muted); font-size: 12px; }
.att .ic { color: var(--faint); }
.scroll { overflow-y: auto; scrollbar-width: thin; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font: 11.5px 'Poppins', sans-serif; }
.chart .grid line { stroke: var(--line); stroke-dasharray: 3 4; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.legend .dash { width: 16px; height: 0; border-top: 2px dashed var(--muted); border-radius: 0; vertical-align: 3px; }
[data-tip] { cursor: pointer; }
.tip { position: fixed; z-index: 100; pointer-events: none; max-width: 290px; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: var(--panel); font-size: 12.5px; line-height: 1.45; box-shadow: var(--sh2); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.tip.on { opacity: 1; transform: none; } .tip b { display: block; font-size: 13px; margin-bottom: 2px; } .tip span { display: block; opacity: .85; }
.goal { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 99px; background: var(--panel2); font-size: 13px; margin-left: auto; }
.goal .meter { width: 90px; flex: none; }

:root { --xr-rent: #0e8a64; --xr-rent2: #0a6b4e; --xr-repair: #cf3341; --xr-repair2: #a8242f; --xr-check: #2f6fde; --xr-check2: #2357b3; --xr-idle: #ebe7df; --xr-idleTx: #8a8378; --xr-zebra: rgb(0 0 0 / .022); }
[data-theme='dark'] { --xr-rent: #17a77d; --xr-rent2: #0f7d5d; --xr-repair: #e8475a; --xr-repair2: #b7303c; --xr-check: #4a88f5; --xr-check2: #2d62c4; --xr-idle: #262d39; --xr-idleTx: #b0b8c6; --xr-zebra: rgb(255 255 255 / .025); }

/* Constellation */
.cst a:hover .dot { stroke-width: 3; }
.cst .q { font: 600 11px 'Poppins', sans-serif; fill: var(--faint); letter-spacing: .02em; }
.cst .lbl { font: 600 11px 'Poppins', sans-serif; fill: var(--ink); pointer-events: none; }
.cst .zero { stroke: var(--line2); stroke-dasharray: 4 4; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } }
.cst a { animation: pop .5s cubic-bezier(.2, .8, .2, 1.2) both; transform-box: fill-box; transform-origin: center; }

/* Repair DNA */
.dna { overflow-x: auto; }
.dna table { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.dna th { font-weight: 500; color: var(--muted); padding: 0 4px; white-space: nowrap; }
.dna th.mk { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); text-align: center; border-bottom: 2px solid var(--line); }
.dna th.g { writing-mode: vertical-rl; transform: rotate(180deg); height: 62px; font-size: 11px; padding: 2px 0; }
.dna th.p { text-align: right; color: var(--ink); text-transform: capitalize; padding-right: 8px; font-weight: 600; }
.dna td { width: 24px; height: 24px; border-radius: 7px; background: var(--panel2); text-align: center; font-weight: 700; font-size: 11px; color: #fff; }
.dna td.t { background: none; color: var(--ink); width: auto; padding-left: 8px; text-align: left; font-weight: 600; white-space: nowrap; }

/* Map */
.map { min-height: 400px; border-radius: 16px; overflow: hidden; z-index: 0; background: var(--panel2); }
.mapframe { width: 100%; height: 320px; border: 0; border-radius: 16px; display: block; }
.gm { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.gm__b { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid var(--rent); color: #14181f; font: 700 11px 'Poppins', sans-serif; box-shadow: 0 6px 16px rgb(0 0 0 / .25); transition: transform .15s; }
.gm:hover .gm__b { transform: scale(1.15); }
.gm__l { padding: 1px 7px; border-radius: 99px; background: #14181f; color: #fff; font: 600 10.5px 'Poppins', sans-serif; white-space: nowrap; }
.gm.ready .gm__b { border-color: #4c8bf5; } .gm.repair .gm__b { border-color: var(--repair); } .gm.inspection .gm__b { border-color: var(--check); } .gm.reserved .gm__b { border-color: var(--reserved); }
.gm.on_rent .gm__b { animation: ping 2.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgb(18 184 134 / .5), 0 6px 16px rgb(0 0 0 / .25); } 70%, 100% { box-shadow: 0 0 0 12px rgb(18 184 134 / 0), 0 6px 16px rgb(0 0 0 / .25); } }
.leaflet-popup-content-wrapper { border-radius: 18px !important; } .leaflet-popup-content { margin: 14px 16px !important; font: 13px 'Poppins', sans-serif !important; min-width: 230px; }
.pop b { font-size: 15px; color: #14181f; } .pop dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 8px 0 10px; } .pop dt { color: #6a7280; } .pop dd { margin: 0; font-weight: 600; color: #14181f; }
.pop a.btn { height: 36px; width: 100%; color: #1f1500 !important; }
.leaflet-tooltip.gtip { border-radius: 12px; border: 0; padding: 8px 10px; font: 12.5px 'Poppins', sans-serif; box-shadow: 0 10px 24px rgb(0 0 0 / .25); }
[data-theme='dark'] .osm { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.5); }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cal__h { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--panel2); border-bottom: 1px solid var(--line); }
.cal__d { min-height: 100px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal__d:nth-child(7n) { border-right: 0; } .cal__d.out { background: var(--panel2); opacity: .55; }
.cal__d .dn { font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 4px; }
.cal__d.today .dn { background: var(--amber); color: var(--onAmber); border-radius: 99px; width: fit-content; padding: 1px 9px; }
.ev { display: block; padding: 3px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.amber { background: var(--warnSoft); color: var(--warn); } .ev.blue { background: var(--infoSoft); color: var(--info); } .ev.red { background: var(--badSoft); color: var(--bad); } .ev.green { background: var(--goodSoft); color: var(--good); } .ev.navy { background: var(--panel2); color: var(--text); }
.ev.more { background: none; color: var(--muted); font-weight: 500; }
.agenda { display: grid; gap: 12px; }
.agenda h3 { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 4px; }
.agenda a.item { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 7px; border-radius: 12px; }
.agenda a.item:hover { background: var(--hover); }
.agenda a.item b { display: block; color: var(--ink); font-size: 13.5px; font-weight: 600; } .agenda a.item small { color: var(--muted); font-size: 12px; }
.agenda .ico { width: 32px; height: 32px; border-radius: 50%; }

/* Inbox */
.prop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; }
.msg { padding: 14px; border-radius: 18px 18px 18px 4px; background: var(--goodSoft); font-size: 14px; color: var(--ink); white-space: pre-wrap; }
.msg small { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
@media (max-width: 1000px) { .prop { grid-template-columns: 1fr; } }

/* Timeline */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 16px 28px; }
.tl li::before { content: ''; position: absolute; left: 5px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 3px solid var(--amber); }
.tl li::after { content: ''; position: absolute; left: 10.5px; top: 20px; bottom: 0; width: 1px; background: var(--line2); }
.tl li:last-child::after { display: none; }
.tl b { color: var(--ink); font-weight: 600; } .tl small { display: block; color: var(--muted); font-size: 12px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; }
.login__card { width: min(400px, 92vw); padding: 32px; border-radius: 28px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--sh2); display: grid; gap: 14px; }
.login__card img { width: 60px; border-radius: 50%; } .login__card h1 { font-size: 26px; } .login__card p { margin: -8px 0 6px; color: var(--muted); }
pre { background: var(--panel2); color: var(--text); padding: 10px; border-radius: 10px; overflow: auto; font-size: 12px; }
/* aliases used by chart code */
:root { --accent: var(--amber); --accent2: var(--amber2); --accentSoft: var(--amberSoft); --onAccent: var(--onAmber); --brand: var(--navy); --brand2: var(--navy2); --faintline: var(--line); }
@media (min-width: 900px) { .stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.metaline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: -6px; font-size: 13.5px; color: var(--muted); }
.metaline b { color: var(--ink); font-weight: 600; }

/* ===== v3.1 visuals: X-ray, constellation, repair DNA ===== */
:root { --q-star: #0e8a64; --q-gem: #6366f1; --q-costly: #f59e0b; --q-question: #a3aab5; }
[data-theme='dark'] { --q-question: #6b7484; }
.rp { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--badSoft); color: var(--bad); font-size: 11px; font-weight: 700; display: grid; place-items: center; }

.cstwrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .cstwrap { grid-template-columns: 1fr; } }
.cst .lbl { font: 600 11px 'Poppins', sans-serif; fill: var(--ink); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; }
.cst a { cursor: pointer; } .cst a:hover .dot { stroke: var(--ink); stroke-width: 2.5; }
.qpanel { display: grid; gap: 10px; }
.qrow { padding: 12px 14px; border-radius: 16px; background: var(--panel2); }
.qrow__h { display: flex; align-items: center; gap: 8px; }
.qrow__h i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.qrow__h b { color: var(--ink); font-size: 14px; }
.qn { margin-left: auto; min-width: 26px; height: 22px; padding: 0 8px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; font-weight: 700; display: grid; place-items: center; color: var(--ink); }
.qrow p { margin: 4px 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.qchips { display: flex; flex-wrap: wrap; gap: 5px; }
.qchips a { padding: 3px 9px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink); }
.qchips a:hover { border-color: var(--amber); }
.qchips a b { color: var(--bad); }

.dna2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 1100px) { .dna2 { grid-template-columns: 1fr; } }
h3.sub { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 10px; }
.parts { display: grid; gap: 4px; }
.part summary { list-style: none; display: grid; grid-template-columns: 120px 1fr 104px; gap: 12px; align-items: center; padding: 7px 8px; border-radius: 12px; cursor: pointer; }
.part summary::-webkit-details-marker { display: none; }
.part summary:hover, .part[open] summary { background: var(--hover); }
.part__n { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.part__bar { height: 14px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.part__bar > span { display: flex; height: 100%; gap: 2px; border-radius: 99px; overflow: hidden; }
.part__bar i { display: block; height: 100%; }
.part__t { font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; } .part__t b { color: var(--ink); }
.pats { display: grid; gap: 10px; }
.pat { position: relative; padding: 14px 16px 14px 18px; border-radius: 16px; background: var(--panel2); overflow: hidden; }
.pat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--mk); }
.pat__h { display: flex; align-items: center; gap: 8px; } .pat__h b { font-size: 15px; color: var(--ink); }
.pat p { margin: 6px 0 8px; font-size: 13px; color: var(--text); } .pat p b { color: var(--ink); }
.pat small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
details.matrix { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.matrix summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); font-size: 13px; }
details.matrix summary:hover { color: var(--ink); }
details.matrix .dna { margin-top: 12px; }

/* ===== v3.3: constellation + DNA in the same solid gem style as the X-ray ===== */
:root { --cst-bg: #faf9f6; --cst-div: #1d2330; --cst-ring: rgb(0 0 0 / .35); --cst-badge: #0b2545; --cst-bring: #fff; }
[data-theme='dark'] { --cst-bg: #0c1016; --cst-div: rgb(255 255 255 / .35); --cst-ring: rgb(0 0 0 / .55); --cst-badge: #0b2545; --cst-bring: #e9edf3; }
.cst .lbl { font-weight: 700; }
.qrow { border-left: 4px solid var(--mk); border-radius: 10px; }
.qrow__h b { font-size: 14px; }
.part summary { grid-template-columns: 120px 1fr 96px; padding: 5px 8px; }
.part__bar { height: 22px; border-radius: 6px; background: var(--panel2); }
.part__bar > span { gap: 2px; border-radius: 6px; }
.part__bar i { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; border-radius: 4px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .18), inset 0 1px 0 rgb(255 255 255 / .18); }
.part__bar i em { font: 700 11px 'Poppins', sans-serif; font-style: normal; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.part__t b { font-size: 14px; }
.pat { border-radius: 10px; }
.pat::before { width: 5px; }
.mk { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 5px; color: #fff; font-size: 11.5px; font-weight: 700; }
.legend .lg, .legend i { border-radius: 3px; }
/* ===== Phone & touch ===== */
.v-phone, .phone-only, .tabbar, .scrim, .rail__me { display: none; }
.search--page { display: block; max-width: none; margin: 0; }
.search--page input { height: 50px; font-size: 16px; background: var(--panel); }
.search--page .ic { top: 16px; }
.hint[data-touch] { white-space: normal; }
@media (hover: none) { .hint[data-touch] { font-size: 0; } .hint[data-touch]::after { content: attr(data-touch); font-size: 12px; } }
.maphint { position: absolute; z-index: 500; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 5px 11px; border-radius: 99px; background: rgb(11 14 19 / .78); color: #fff; font-size: 11.5px; font-weight: 600; pointer-events: none; white-space: nowrap; }
/* X-ray bar labels disappear when a block is too narrow to hold them */
.tip em { display: block; margin-top: 6px; font-style: normal; font-weight: 700; color: var(--amber2); }
[data-theme='dark'] .tip em { color: #b56f00; }

@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .v-desk { display: none; } .v-phone { display: block; } .phone-only { display: grid; }
  /* top bar */
  .top { top: 0; margin: 0; height: 58px; border-radius: 0 0 20px 20px; border-top: 0; padding: 0 10px; gap: 8px; }
  .burger { display: none !important; }
  .brand span { display: block; } .brand small { display: none; } .brand b { font-size: 16px; } .brand img { width: 36px; height: 36px; }
  .top__a { margin-left: auto; gap: 6px; }
  .round { width: 40px; height: 40px; }
  .who { padding: 0; border: 0; background: none; } .who .av { width: 38px; height: 38px; }
  /* bottom tab bar */
  .tabbar { position: fixed; z-index: 45; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); height: 64px; padding: 6px; border-radius: 22px; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(18px); border: 1px solid var(--line); box-shadow: var(--sh2); }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; border-radius: 16px; color: var(--muted); font: 600 10.5px 'Poppins', sans-serif; cursor: pointer; }
  .tabbar .ic { width: 21px; height: 21px; }
  .tabbar a.on { color: var(--ink); background: var(--hover); } .tabbar a.on .ic { color: var(--amber2); }
  [data-theme='dark'] .tabbar a.on .ic { color: var(--amber); }
  .tabbar b { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10px; display: grid; place-items: center; border: 2px solid var(--panel); }
  /* slide-out menu with labels */
  .scrim { position: fixed; inset: 0; z-index: 48; background: rgb(5 7 10 / .5); backdrop-filter: blur(2px); }
  .nav-open .scrim { display: block; }
  .rail { z-index: 50; top: 10px; bottom: 10px; left: 10px; width: min(270px, 78vw); transform: translateX(-115%); transition: transform .22s ease; }
  .nav-open .rail { transform: none; }
  .rail__me { display: flex; flex-direction: row !important; align-items: center; gap: 10px; padding: 12px !important; }
  .rail__me small { display: block; font-size: 11.5px; color: var(--muted); }
  .rail .rail__me b { position: static; transform: none; display: block; min-width: 0; height: auto; padding: 0; border: 0; background: none; color: var(--ink); font-size: 14.5px; font-weight: 700; }
  .rail__grp { align-items: stretch; padding: 8px; }
  .rail a, .rail button { width: 100%; height: 46px; display: flex; align-items: center; justify-content: flex-start; gap: 14px; padding: 0 14px; }
  .rail [data-label]::after, .rail [data-label]:hover::after { content: attr(data-label); position: static; transform: none; padding: 0; background: none; color: inherit; box-shadow: none; font-size: 14.5px; font-weight: 600; }
  .rail b { top: 50%; right: 12px; transform: translateY(-50%); }
  .rail form { width: 100%; }
  /* page */
  .main { margin-left: 0; padding: 14px 12px calc(100px + env(safe-area-inset-bottom)); }
  .ph { gap: 10px; margin: 2px 0 12px; align-items: center; }
  .ph__t h1 { font-size: 25px; } .ph__t small { font-size: 12.5px; }
  .ph__a { margin-left: 0; width: 100%; gap: 8px; }
  .ph__a > .btn { flex: 1 1 auto; }
  .ph__a > .seg { width: 100%; } .seg a, .seg button { flex: 1; justify-content: center; }
  .content, .grid, .g2, .g21 { gap: 12px; }
  /* stat cards: two per row */
  .stats, .stats.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { min-height: 0; padding: 12px; gap: 6px; border-radius: 18px; }
  .stat .spark { display: none; } .stat:has(.spark) .stat__f { padding-right: 0; }
  .stat__top { gap: 7px; align-items: flex-start; } .ico { width: 28px; height: 28px; border-radius: 9px; }
  .stat__l { font-size: 12.5px; } .stat__l small { font-size: 11px; }
  .stat__v { font-size: 20px; white-space: normal; } .stat__v .u { font-size: 11.5px; }
  .stat__f { font-size: 11.5px; min-height: 0; }
  /* cards */
  .card { border-radius: 20px; }
  .card__h { padding: 15px 14px 0; gap: 10px; } .card__h h2 { font-size: 16px; }
  .card__h .act { margin-left: 0; width: 100%; } .card__h .act > .seg { width: 100%; }
  .card__b { padding: 12px 14px 14px; } .card__f { padding: 0 14px 14px; }
  .goal { margin-left: 0; width: 100%; justify-content: space-between; }
  .legend { gap: 8px 12px; font-size: 12px; }
  .tw { margin: 0 -14px; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 14px; } .tbl th:last-child, .tbl td:last-child { padding-right: 14px; }
  .tbl td { padding: 12px 10px; }
  .map { min-height: 0; height: 320px !important; }
  .scroll { max-height: none !important; }
  .items { grid-template-columns: 1fr; gap: 10px; }
  .kv { grid-template-columns: minmax(104px, auto) 1fr; gap: 9px 14px; }
  .cal__d { min-height: 64px; padding: 3px; } .cal__h { padding: 6px 4px; font-size: 11px; text-align: center; }
  .ev { padding: 2px 4px; font-size: 10px; border-radius: 5px; }
  /* forms & pop-ups: 16px text stops iPhone zooming in; dialogs become bottom sheets */
  input, select, textarea { font-size: 16px; height: 46px; }
  .btn { height: 44px; }
  dialog.dlg { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 26px 26px 0 0; border-bottom: 0; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); }
  dialog.dlg[open] { animation: sheet .22s ease-out; }
  .form { grid-template-columns: 1fr; }
  /* Fleet X-ray: name + days on top, full-width bar underneath */
  /* constellation + DNA */
  .cstwrap { gap: 12px; }
  .cst--ph .lbl { font-size: 11.5px; }
  .qrow { padding: 10px 12px; }
  .part summary { grid-template-columns: 86px 1fr 70px; gap: 8px; padding: 6px 4px; }
  .part__n { font-size: 13px; } .part__t { font-size: 11.5px; }
  .part .qchips { padding: 6px 0 4px !important; }
  .pat { padding: 12px 14px 12px 16px; }
  .tip.sheet { bottom: calc(86px + env(safe-area-inset-bottom)); }
}
/* touch: chart details appear as a sheet at the bottom of the screen */
.tip.sheet { left: 12px !important; right: 12px; top: auto !important; bottom: 16px; max-width: 560px; margin: 0 auto; padding: 14px 16px; border-radius: 18px; font-size: 13.5px; }
.tip.sheet b { font-size: 15px; }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
.why--amber { background: var(--amberSoft); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.why--red { background: var(--badSoft); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }

@media (max-width: 760px) {
  /* tables become stacked cards: first cell is the title, the rest form a 2-column label/value grid */
  .tw { overflow: visible; }
  .tbl, .tbl tbody { display: block; }
  .tbl thead { display: none; }
  .tbl tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td, .tbl th:first-child, .tbl td:first-child, .tbl td:last-child { display: block; padding: 0; border: 0; min-width: 0; text-align: left !important; white-space: normal; }
  .tbl td::before { content: attr(data-label); display: block; margin-bottom: 1px; font-size: 11px; font-weight: 500; color: var(--muted); }
  .tbl td[data-label='']::before { display: none; }
  .tbl td:first-child { grid-column: 1 / -1; font-size: 15px; }
  .tbl td:first-child::before { display: none; }
  .tbl td:has(form), .tbl td:has(.btn) { grid-column: 1 / -1; }
  .tbl td form { display: flex; gap: 8px; flex-wrap: wrap; }
  .tbl td small { white-space: normal; }
  /* calendar: coloured bars per event; the agenda underneath carries the details */
  .cal__d { min-height: 54px; gap: 2px; }
  .cal .ev { height: 5px; padding: 0; font-size: 0; border-radius: 3px; }
  .cal .ev.amber { background: var(--amber); } .cal .ev.blue { background: var(--info); } .cal .ev.red { background: var(--bad); } .cal .ev.green { background: var(--good); } .cal .ev.navy { background: var(--muted); }
  .cal .ev.more { display: none; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
/* ===== Livelier overview: Fleet today strip + toned stat cards ===== */
:root { --pulse-bg: #0b2545; --st-rent: #13a97c; --st-ready: #3b82f6; --st-reserved: #8b5cf6; --st-insp: #14b8c9; --st-repair: #e8475a;
  --tc-navy: #1d3f6e; --tc-blue: #2f6fde; --tc-green: #0e8a64; --tc-amber: #e9950a; --tc-red: #d93a3a; --tc-violet: #7048e8; }
[data-theme='dark'] { --pulse-bg: #0f1d36; --tc-navy: #5e8ff0; --tc-blue: #4a88f5; --tc-green: #17a77d; --tc-amber: #ffad1f; --tc-red: #ff5d5d; --tc-violet: #9b7bff; }
/* stat cards: coloured top edge, solid icon tile, trend pill */
.stat { --tc: var(--tc-navy); }
.stat.t-navy { --tc: var(--tc-navy); } .stat.t-blue { --tc: var(--tc-blue); } .stat.t-green { --tc: var(--tc-green); } .stat.t-amber { --tc: var(--tc-amber); } .stat.t-red { --tc: var(--tc-red); } .stat.t-violet { --tc: var(--tc-violet); }
.stat::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--tc); }
.stat .ico { background: var(--tc) !important; color: #fff !important; box-shadow: 0 4px 12px color-mix(in srgb, var(--tc) 35%, transparent); }
.stat .trend { padding: 2px 8px 2px 6px; border-radius: 99px; }
.stat .trend.up { background: var(--goodSoft); } .stat .trend.down { background: var(--badSoft); } .stat .trend.flat { background: var(--panel2); }
.stat .spark path:first-child { opacity: .2; }
@media (max-width: 760px) {
}
/* Fleet today: one capacity bar, each generator as wide as its kVA, grouped by status */
.fb { display: flex; gap: 8px; height: 40px; }
.fb__grp { display: flex; gap: 2px; min-width: 0; }
.fb__seg { position: relative; display: grid; place-items: center; min-width: 4px; height: 100%; border-radius: 6px; color: #fff; overflow: hidden; container-type: inline-size; transition: transform .15s, filter .15s; box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), inset 0 -2px 0 rgb(0 0 0 / .18); }
.fb__grp > .fb__seg:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; } .fb__grp > .fb__seg:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.fb__seg em { font: 700 11px 'Poppins', sans-serif; font-style: normal; letter-spacing: .02em; white-space: nowrap; }
@container (max-width: 34px) { .fb__seg em { display: none; } }
.fb__seg:hover { transform: translateY(-3px); filter: brightness(1.12); z-index: 2; }
.fb__seg.on_rent, .fb__lg i.on_rent { background: var(--st-rent); } .fb__seg.ready, .fb__lg i.ready { background: var(--st-ready); } .fb__seg.reserved, .fb__lg i.reserved { background: var(--st-reserved); } .fb__seg.inspection, .fb__lg i.inspection { background: var(--st-insp); } .fb__seg.repair, .fb__lg i.repair { background: var(--st-repair); }
.fb__lg { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; font-size: 12.5px; color: rgb(255 255 255 / .85); }
.fb__lg a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; } .fb__lg a:hover { color: #fff; }
.fb__lg i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.fb__lg b { color: #fff; } .fb__lg small { color: rgb(255 255 255 / .55); font-size: 11.5px; }
.fb__lg .muted { margin-left: auto; color: rgb(255 255 255 / .5); font-size: 11.5px; }
@media (max-width: 760px) { .fb { height: 34px; gap: 5px; } .fb__seg em { font-size: 10px; } .fb__lg { gap: 6px 14px; font-size: 12px; } .fb__lg .muted { display: none; } }
@media (max-width: 760px) {
}
/* ===== Poppins, bolder headings, bigger brand ===== */
h1, h2, h3, .stat__v, .ft__hd b, .ft__gauge b, .ft__counts b, .it h3, .login__card h1 { font-weight: 700; }
.ph__t h1 { font-weight: 600; letter-spacing: -.02em; }
.brand img { width: 52px; height: 52px; padding: 3px; }
.brand b { font-size: 21px; font-weight: 800; letter-spacing: -.01em; } .brand small { font-size: 12.5px; font-weight: 500; }
.brand { min-width: 240px; }
.top { height: 72px; }
.rail { top: 96px; }
.login__card img { width: 72px; } .login__card h1 { font-size: 28px; font-weight: 800; }
@media (max-width: 760px) { .top { height: 60px; } .brand img { width: 40px; height: 40px; } .brand b { font-size: 18px; } .brand { min-width: 0; } }.stat__l { font-size: 12.5px; letter-spacing: -.01em; } .stat__l small { font-size: 11px; }
.stat__top { gap: 9px; }
.it__sub { font-size: 12px; }[data-theme='dark'] .ft__seg button.on { background: var(--navy); color: #0b2545; }/* dark: "on rent" gets a periwinkle tone instead of plain white; ready stays royal blue (outlined) */
/* ===== v4: frosted glass. Soft colour fields behind, translucent blurred surfaces on top, one cool-neutral palette. ===== */
:root {
  --bg: #eef1f7; --panel: #ffffff; --panel2: rgb(15 23 42 / .045); --hover: rgb(15 23 42 / .06); --line: rgb(15 23 42 / .08); --line2: rgb(15 23 42 / .16);
  --ink: #0f172a; --text: #334155; --muted: #64748b; --faint: #94a3b8;
  --glass: rgb(255 255 255 / .62); --glass-strong: rgb(255 255 255 / .78); --glass-line: rgb(255 255 255 / .75);
  --glass-sh: inset 0 1px 0 rgb(255 255 255 / .85), 0 1px 2px rgb(15 23 42 / .04), 0 12px 32px rgb(30 41 82 / .09);
  --blur: blur(22px) saturate(165%);
  --tc-navy: #3b5bdb; --tc-blue: #2f80ed; --tc-green: #10b981; --tc-amber: #f59f00; --tc-red: #ef4444; --tc-violet: #7c5cfc;
  --good: #059669; --goodSoft: rgb(16 185 129 / .13); --bad: #dc2626; --badSoft: rgb(239 68 68 / .12); --warn: #b45309; --warnSoft: rgb(245 159 0 / .16); --info: #2563eb; --infoSoft: rgb(47 128 237 / .12); --vio: #6d4de6; --vioSoft: rgb(124 92 252 / .13);
  --amberSoft: rgb(245 159 0 / .14);
  --xr-rent: #10a37a; --xr-rent2: #0b8563; --xr-repair: #e5484d; --xr-repair2: #c0353a; --xr-check: #3b82f6; --xr-check2: #2563eb; --xr-idle: rgb(100 116 139 / .13); --xr-idleTx: #64748b; --xr-zebra: rgb(15 23 42 / .02);
  --cst-bg: rgb(15 23 42 / .03); --cst-div: #334155; --rent: #10a37a;
}
[data-theme='dark'] {
  --bg: #070a12; --panel: #131928; --panel2: rgb(255 255 255 / .055); --hover: rgb(255 255 255 / .08); --line: rgb(255 255 255 / .09); --line2: rgb(255 255 255 / .17);
  --ink: #ffffff; --text: #dfe5f0; --muted: #a3aec2; --faint: #7b879c;
  --glass: rgb(24 31 48 / .55); --glass-strong: rgb(22 28 44 / .78); --glass-line: rgb(255 255 255 / .10);
  --glass-sh: inset 0 1px 0 rgb(255 255 255 / .08), 0 14px 36px rgb(0 0 0 / .45);
  --tc-navy: #6f8cff; --tc-blue: #4c9aff; --tc-green: #34d399; --tc-amber: #ffb224; --tc-red: #ff6369; --tc-violet: #9d85ff;
  --good: #34d399; --goodSoft: rgb(52 211 153 / .14); --bad: #ff6b6b; --badSoft: rgb(255 99 105 / .15); --warn: #ffc457; --warnSoft: rgb(255 178 36 / .14); --info: #7cb0ff; --infoSoft: rgb(76 154 255 / .15); --vio: #b9a1ff; --vioSoft: rgb(157 133 255 / .16);
  --amberSoft: rgb(255 178 36 / .12);
  --xr-rent: #1fb88a; --xr-rent2: #14916b; --xr-repair: #f0555f; --xr-repair2: #c63b45; --xr-check: #4c9aff; --xr-check2: #2f74d6; --xr-idle: rgb(255 255 255 / .07); --xr-idleTx: #a3aec2; --xr-zebra: rgb(255 255 255 / .02);
  --cst-bg: rgb(255 255 255 / .03); --cst-div: rgb(255 255 255 / .4); --rent: #1fb88a;
}
html { background: var(--bg); }
body { background:
    radial-gradient(900px 620px at 6% -8%, rgb(59 91 219 / .22), transparent 62%),
    radial-gradient(820px 560px at 100% -4%, rgb(245 159 0 / .22), transparent 60%),
    radial-gradient(900px 700px at 78% 108%, rgb(16 185 129 / .16), transparent 60%),
    radial-gradient(760px 620px at -4% 92%, rgb(124 92 252 / .14), transparent 60%),
    var(--bg); background-attachment: fixed; }
[data-theme='dark'] body { background:
    radial-gradient(900px 620px at 6% -8%, rgb(72 100 255 / .30), transparent 62%),
    radial-gradient(820px 560px at 100% -4%, rgb(255 170 30 / .13), transparent 60%),
    radial-gradient(900px 700px at 78% 108%, rgb(16 185 129 / .13), transparent 60%),
    radial-gradient(760px 620px at -4% 92%, rgb(140 100 255 / .18), transparent 60%),
    var(--bg); background-attachment: fixed; }
.card, .stat, .it, .ft, .top, .rail__grp, .tabbar, .hero2, .gp, .login__card,
[data-theme='dark'] .card, [data-theme='dark'] .stat, [data-theme='dark'] .it, [data-theme='dark'] .top, [data-theme='dark'] .rail__grp, [data-theme='dark'] .tabbar {
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-line); box-shadow: var(--glass-sh); }
.top, .tabbar, [data-theme='dark'] .top, [data-theme='dark'] .tabbar { background: var(--glass-strong); }
.seg, .tabs, .chips a, .chips button, .lens a, .btn, .round, .who, .qchips a, .qn, .iconbtn { background: var(--glass); border-color: var(--glass-line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 1px 2px rgb(15 23 42 / .05); }
[data-theme='dark'] .seg, [data-theme='dark'] .tabs, [data-theme='dark'] .chips a, [data-theme='dark'] .chips button, [data-theme='dark'] .lens a, [data-theme='dark'] .btn, [data-theme='dark'] .round, [data-theme='dark'] .who, [data-theme='dark'] .qchips a, [data-theme='dark'] .qn { box-shadow: inset 0 1px 0 rgb(255 255 255 / .07); }
.seg a.on, .tabs a.on, .seg button.on { background: var(--panel); box-shadow: 0 1px 2px rgb(15 23 42 / .08), 0 4px 10px rgb(15 23 42 / .06); }
[data-theme='dark'] .seg a.on, [data-theme='dark'] .tabs a.on, [data-theme='dark'] .seg button.on { background: rgb(255 255 255 / .14); box-shadow: inset 0 1px 0 rgb(255 255 255 / .12); }
.btn:hover, .round:hover { background: var(--glass-strong); }
.btn.primary { background: var(--amber); border-color: transparent; box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 8px 20px rgb(245 159 0 / .35); }
.btn.primary:hover { background: var(--amber2); }
.btn.green { background: #10a37a; border-color: transparent; } .btn.dark { background: var(--navy); border-color: transparent; }
.chips a.on, .chips button.on { background: var(--navy); border-color: transparent; }
[data-theme='dark'] .chips a.on, [data-theme='dark'] .chips button.on { background: var(--amber); }
.search input { background: var(--panel2); border-color: transparent; }
input, select, textarea { background: var(--glass-strong); }
.rail a.on { box-shadow: 0 8px 18px rgb(11 37 69 / .3); }
dialog.dlg { background: var(--glass-strong); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%); border: 1px solid var(--glass-line); }
dialog.dlg::backdrop { background: rgb(8 12 24 / .38); backdrop-filter: blur(6px); }
/* stat cards: a soft colour glow in the corner instead of a hard top edge */
.stat::before { left: auto; right: -46px; top: -46px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--tc) 30%, transparent), transparent); pointer-events: none; }
.stat .ico { border-radius: 11px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 6px 14px color-mix(in srgb, var(--tc) 38%, transparent); }
.stat { transition: transform .18s, box-shadow .18s; }
a.stat:hover, .it:hover { transform: translateY(-2px); border-color: var(--glass-line); box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 18px 40px rgb(30 41 82 / .14); }
[data-theme='dark'] a.stat:hover, [data-theme='dark'] .it:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 18px 44px rgb(0 0 0 / .55); }
/* inner surfaces stay quiet and translucent */
.it__box, .qrow, .pat, .why, .goal, .part__bar, .meter, .bar { background: var(--panel2); }
.callout { background: var(--amberSoft); border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent); }
.tip { background: rgb(15 23 42 / .92); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgb(255 255 255 / .12); }
[data-theme='dark'] .tip { background: rgb(248 250 252 / .96); color: #0b0e13; }
.tip em { color: #ffbd4a; }
.banner.demo { background: var(--amberSoft); }
@media (max-width: 760px) { :root { --blur: blur(14px) saturate(150%); } body, [data-theme='dark'] body { background-attachment: scroll; } }.ft .ft__seg button.on { background: var(--navy); color: #fff; box-shadow: 0 4px 10px rgb(11 37 69 / .25); }
/* ===== Speed: the page background lives on its own fixed layer, and only the bars that content scrolls under are blurred.
   Cards sit on smooth colour fields, so blurring behind them changed nothing visible and cost a lot. ===== */
:root { --blur: none; }
@media (max-width: 760px) { :root { --blur: none; } }
body, [data-theme='dark'] body { background: transparent; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
    radial-gradient(900px 620px at 6% -8%, rgb(59 91 219 / .22), transparent 62%),
    radial-gradient(820px 560px at 100% -4%, rgb(245 159 0 / .22), transparent 60%),
    radial-gradient(900px 700px at 78% 108%, rgb(16 185 129 / .16), transparent 60%),
    radial-gradient(760px 620px at -4% 92%, rgb(124 92 252 / .14), transparent 60%); }
[data-theme='dark'] body::before { background:
    radial-gradient(900px 620px at 6% -8%, rgb(72 100 255 / .30), transparent 62%),
    radial-gradient(820px 560px at 100% -4%, rgb(255 170 30 / .13), transparent 60%),
    radial-gradient(900px 700px at 78% 108%, rgb(16 185 129 / .13), transparent 60%),
    radial-gradient(760px 620px at -4% 92%, rgb(140 100 255 / .18), transparent 60%); }
.seg, .tabs, .chips a, .chips button, .lens a, .btn, .round, .who, .qchips a, .qn, .iconbtn, .tip { -webkit-backdrop-filter: none; backdrop-filter: none; }
.top, .tabbar, [data-theme='dark'] .top, [data-theme='dark'] .tabbar { -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); }
.gm.on_rent .gm__b { animation: none; }

/* ===== Fleet today (v7): the Voltaars recipe in blue.
   Light airy band, bold ink drawings with one bright accent each, pale rounded tiles, white floating tags. ===== */
.ft { --ft-ink: #0a1528; --ft-sub: #4a5a72; --ft-tile: rgb(255 255 255 / .62); --ft-tag: #ffffff; --ft-line: #cfdcf0; --ft-shell: #ffffff; --ft-hi: #1257c9;
  position: relative; isolation: isolate; display: grid; border-radius: var(--r); overflow: hidden; color: var(--ft-ink); border: 1px solid #fff;
  background: radial-gradient(60% 90% at 92% 0%, rgb(96 196 255 / .50), transparent 62%), radial-gradient(55% 80% at 4% 100%, rgb(37 99 235 / .16), transparent 65%), linear-gradient(180deg, #e3eefc, #eef4fc);
  box-shadow: 0 1px 2px rgb(10 21 40 / .05), 0 14px 36px rgb(18 87 201 / .12); }
[data-theme='dark'] .ft { --ft-ink: #f4f7fc; --ft-sub: #a9b6cc; --ft-tile: rgb(255 255 255 / .05); --ft-tag: #18223a; --ft-line: rgb(255 255 255 / .13); --ft-shell: #0f1a30; --ft-hi: #6fb6ff;
  border-color: rgb(255 255 255 / .1); background: radial-gradient(60% 90% at 92% 0%, rgb(56 150 255 / .22), transparent 62%), radial-gradient(55% 80% at 4% 100%, rgb(37 99 235 / .18), transparent 65%), linear-gradient(180deg, #0e1830, #0b1426); box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 14px 36px rgb(0 0 0 / .45); }
.ft .on_rent { --k: #35dd8b; } .ft .reserved { --k: #a98bff; } .ft .ready { --k: #4cc3ff; } .ft .inspection { --k: #ffc533; } .ft .repair { --k: #ff6f6f; }
.ft__top { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 20px; padding: 18px 18px 14px; }
.ft__ring { position: relative; width: 94px; height: 94px; }
.ft__ring svg { width: 100%; height: 100%; display: block; }
.ft__ring circle { stroke: var(--k, var(--ft-line)); }
.ft__ring g { transform-origin: 50px 50px; animation: ringIn .9s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes ringIn { from { opacity: 0; transform: rotate(-210deg); } to { opacity: 1; transform: rotate(-90deg); } }
.ft__ring div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ft__ring b { font-size: 21px; font-weight: 700; line-height: 1; letter-spacing: -.03em; color: var(--ft-ink); }
.ft__ring span { margin-top: 3px; font-size: 10px; font-weight: 500; color: var(--ft-sub); }
.ft__hd { padding-right: 6px; }
.ft__hd small { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ft-sub); }
.ft__hd small::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #1fc777; box-shadow: 0 0 0 3px rgb(31 199 119 / .22); animation: live 2s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; } }
.ft__hd b { display: block; font-size: 31px; font-weight: 700; color: var(--ft-ink); letter-spacing: -.04em; line-height: 1.15; white-space: nowrap; }
.ft__hd em { font-style: normal; color: var(--ft-hi); }
.ft__hd span { display: block; font-size: 12.5px; color: var(--ft-sub); white-space: nowrap; }
/* status tags: white floating cards with a bright icon chip */
.ft__counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.kt { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 11px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--ft-tag); border: 1px solid var(--ft-line); box-shadow: 0 1px 2px rgb(10 21 40 / .05), 0 6px 18px rgb(10 21 40 / .07); transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s; }
.kt:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgb(10 21 40 / .06), 0 14px 30px rgb(10 21 40 / .13); }
.kt__ic { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, var(--k), color-mix(in srgb, var(--k) 50%, #fff)); }
.kt b { font-size: 23px; font-weight: 700; line-height: 1.05; letter-spacing: -.03em; color: var(--ft-ink); }
.kt > span:last-of-type { font-size: 12px; font-weight: 500; color: var(--ft-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kt i { display: none; }
/* drawn status icons: ink outline, white fill on the coloured chip */
.si { width: 28px; height: 28px; overflow: visible; color: #0a1528; }
.si * { transform-box: fill-box; transform-origin: center; }
.si .st { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.si .acc { fill: #fff; stroke: currentColor; stroke-width: 3; stroke-linejoin: round; }
.si .ink { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.si .wrf { stroke-width: 1.5; fill: #fff; }
.si-on_rent .arc { animation: arc 2.2s ease-in-out infinite; } .si-on_rent .arc2 { animation-delay: -1.1s; }
@keyframes arc { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.kt:hover .si-on_rent .a { animation: flicker .7s 1; }
.kt:hover .si-reserved .a { animation: pop2 .6s cubic-bezier(.22, 1, .36, 1) 1; }
.si-ready .a { stroke-dasharray: 22; }
.kt:hover .si-ready .a { animation: drawchk .6s cubic-bezier(.22, 1, .36, 1) 1 both; }
.kt:hover .si-inspection .a { animation: look .9s ease-in-out 1; }
.kt:hover .si-repair .a { animation: wig .8s ease-in-out 1; }
@keyframes flicker { 20%, 60% { opacity: .2; } 40%, 80% { opacity: 1; } }
@keyframes pop2 { 50% { transform: scale(1.4); } }
@keyframes drawchk { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }
@keyframes look { 30% { transform: translate(3px, -3px); } 65% { transform: translate(-2px, 2px); } }
@keyframes wig { 25% { transform: rotate(-18deg); } 60% { transform: rotate(14deg); } }
/* generator lanes: pale rounded tiles */
.ft__units { display: grid; gap: 10px; padding: 0 14px 12px; }
.ft__lanes { display: flex; gap: 8px; }
.lane { min-width: 98px; padding: 9px 4px 8px; border-radius: 20px; background: var(--ft-tile); border: 2px solid rgb(255 255 255 / .9); box-shadow: 0 1px 2px rgb(10 21 40 / .04); }
[data-theme='dark'] .lane { border: 1px solid var(--ft-line); box-shadow: none; }
.lane.on_rent { background: linear-gradient(135deg, color-mix(in srgb, var(--k) 30%, #fff), color-mix(in srgb, var(--k) 10%, #fff)); }
[data-theme='dark'] .lane.on_rent { background: color-mix(in srgb, var(--k) 10%, transparent); }
.lane > small { display: flex; align-items: center; gap: 6px; padding: 0 8px 4px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ft-ink); white-space: nowrap; }
.lane > small::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--k); border: 2px solid var(--ft-ink); }
.lane__dots { display: flex; align-items: stretch; }
.ud { position: relative; flex: 1 1 0; min-width: 0; display: grid; grid-template-rows: 16px 48px 14px; gap: 3px; justify-items: center; text-align: center; border-radius: 12px; }
.ud b { font-size: 12.5px; font-weight: 700; letter-spacing: -.02em; color: var(--ft-ink); }
.ud small { font-size: 10.5px; font-weight: 500; color: var(--ft-sub); white-space: nowrap; }
.ud__art { align-self: end; width: var(--w); display: block; transition: transform .2s cubic-bezier(.22, 1, .36, 1); animation: udIn .5s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i) * 25ms); }
.ud:hover .ud__art { transform: translateY(-4px) scale(1.08); }
@keyframes udIn { from { opacity: 0; transform: translateY(8px); } }
.ud.on_rent .gs__puffs circle { animation: puff 2.4s ease-out infinite; animation-delay: calc(var(--i) * -.37s); }
.ud.on_rent .gs__puffs circle + circle { animation-delay: calc(var(--i) * -.37s - 1.2s); }
.ud.on_rent .gs__led { animation: led 1.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.23s); }
.ud.inspection .gs__scan { opacity: 1; animation: scan 1.9s ease-in-out infinite alternate; }
.ud.repair .gs__led { animation: led .7s steps(2) infinite; }
.ud.repair .gs { transform: rotate(-5deg); }
@keyframes puff { 0% { opacity: 0; transform: translate(0, 5px) scale(.5); } 25% { opacity: .55; } 100% { opacity: 0; transform: translate(7px, -9px) scale(1.6); } }
@keyframes led { 50% { opacity: .2; } }
@keyframes scan { from { transform: translateX(0); } to { transform: translateX(24px); } }
/* by-capacity bar */
.ft .fb { display: none; height: 48px; }
.ft.cap .ft__lanes { display: none; } .ft.cap .fb { display: flex; }
.ft .fb__seg { background: var(--k); color: #0a1528; box-shadow: inset 0 0 0 2px #0a1528; } .ft .fb__seg em { color: #0a1528; }
.ft__foot { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.ft__note { display: inline-flex; align-items: center; gap: 6px; color: var(--ft-sub); font-size: 12px; }
.ft__note .ic { width: 14px; height: 14px; }
.ft .u-cap, .ft.cap .u-unit { display: none; } .ft.cap .u-cap { display: inline; }
.ft .ft__seg, [data-theme='dark'] .ft .ft__seg { margin-left: auto; padding: 3px; background: var(--ft-tag); border-color: var(--ft-line); box-shadow: 0 1px 2px rgb(10 21 40 / .05); }
.ft .ft__seg button { height: 28px; padding: 0 11px; font-size: 12px; color: var(--ft-sub); }
.ft .ft__seg button.on, [data-theme='dark'] .ft .ft__seg button.on { background: var(--ft-ink); color: var(--ft-tag); box-shadow: none; }
/* nothing loops while the card is off screen, or for people who prefer no motion */
.ft.off *, .ft.off *::before { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .ft *, .ft *::before { animation: none !important; } .ud.inspection .gs__scan { opacity: 1; } }
@media (max-width: 1180px) { .ft__top { grid-template-columns: auto minmax(0, 1fr); } .ft__counts { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .ft__top { gap: 14px; padding: 14px 12px 12px; }
  .ft__ring { width: 80px; height: 80px; } .ft__ring b { font-size: 18px; }
  .ft__hd b { font-size: 23px; white-space: normal; } .ft__hd span { white-space: normal; }
  .ft__counts { gap: 6px; }
  .kt { grid-template-columns: 1fr; justify-items: center; row-gap: 4px; padding: 9px 2px 10px; border-radius: 15px; }
  .kt__ic { grid-row: auto; width: 36px; height: 36px; border-radius: 11px; } .si { width: 22px; height: 22px; }
  .kt b { font-size: 18px; } .kt > span:last-of-type { font-size: 10px; max-width: 100%; }
  .ft__units { padding: 0 10px 10px; }
  .ft__lanes { overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .lane { flex: none !important; } .ud { flex: 0 0 64px; }
  .ft__foot { flex-wrap: wrap; } .ft .ft__seg { width: 100%; margin: 0; } .ft .ft__seg button { flex: 1; }
}/* ---- Fleet today motion, borrowed from the Voltaars hero: spotlight, swapping tip, bobbing tags, soft glow ---- */
.ft__tip { display: inline-flex; align-items: center; gap: 8px; height: 30px; margin-top: 7px; padding: 0 11px 0 10px; border-radius: 99px; background: var(--ft-tag); border: 1px solid var(--ft-line); box-shadow: 0 1px 2px rgb(10 21 40 / .05), 0 6px 16px rgb(10 21 40 / .08); font-size: 12.5px; font-weight: 600; color: var(--ft-ink); white-space: nowrap; transition: opacity .12s, transform .12s; }
.ft__tip span { display: inline; font-size: inherit; color: inherit; }
.ft__tip i { width: 10px; height: 10px; border-radius: 50%; background: var(--k); border: 2px solid var(--ft-ink); }
.ft__tip .ic { width: 14px; height: 14px; }
.ft__tip.swap { opacity: 0; transform: translateY(6px); }
.ft__tip:hover { box-shadow: 0 2px 4px rgb(10 21 40 / .06), 0 10px 22px rgb(10 21 40 / .13); }
.ft__ring::before { content: ''; position: absolute; inset: -14%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgb(96 196 255 / .6), transparent); animation: glow 3.2s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .55; transform: scale(.94); } }
.ft__ring circle { transition: stroke-width .32s cubic-bezier(.22, 1, .36, 1); }
.ft__ring circle.is-lit { stroke-width: 15; }
.kt { transition: transform .32s cubic-bezier(.22, 1, .36, 1), background .32s, box-shadow .32s, border-color .32s; animation: bob 4s ease-in-out infinite; animation-delay: calc(var(--j, 0) * -.8s); }
@keyframes bob { 50% { translate: 0 -4px; } }
.kt__ic { transition: transform .32s cubic-bezier(.22, 1, .36, 1), background .32s; }
.kt.is-lit, .lane.is-lit { --ft-ink: #0a1528; --ft-sub: #2f3d55; --ft-shell: #ffffff; }
.kt.is-lit { background: linear-gradient(135deg, color-mix(in srgb, var(--k) 88%, #fff), color-mix(in srgb, var(--k) 48%, #fff)); border-color: transparent; box-shadow: 0 10px 26px color-mix(in srgb, var(--k) 45%, transparent); }
.kt.is-lit .kt__ic { background: #fff; transform: scale(1.08); }
.kt.is-lit .si .acc, .kt.is-lit .si .wrf { fill: var(--k); }
.kt.is-lit .si-on_rent .a { animation: flicker .7s 1; }
.kt.is-lit .si-reserved .a { animation: pop2 .6s cubic-bezier(.22, 1, .36, 1) 1; }
.kt.is-lit .si-ready .a { animation: drawchk .6s cubic-bezier(.22, 1, .36, 1) 1 both; }
.kt.is-lit .si-inspection .a { animation: look .9s ease-in-out 1; }
.kt.is-lit .si-repair .a { animation: wig .8s ease-in-out 1; }
.lane { transition: background .32s, transform .32s cubic-bezier(.22, 1, .36, 1), box-shadow .32s; }
.lane.on_rent, [data-theme='dark'] .lane.on_rent { background: var(--ft-tile); }
.lane.is-lit, [data-theme='dark'] .lane.is-lit { background: linear-gradient(135deg, color-mix(in srgb, var(--k) 58%, #fff), color-mix(in srgb, var(--k) 20%, #fff)); transform: translateY(-2px); box-shadow: 0 10px 26px color-mix(in srgb, var(--k) 32%, transparent); }
.lane.is-lit .ud__art { transform: scale(1.06); }
@media (max-width: 760px) { .ft__tip { height: 28px; font-size: 12px; } .kt { animation: none; } }/* generator pictogram: solid ink body, details cut out in the panel colour, status colour on the roof band and the panel reading */
.gs { display: block; width: 100%; height: auto; overflow: visible; color: var(--ft-ink); filter: drop-shadow(0 2px 2px rgb(10 21 40 / .14)); }
.gs * { transform-box: fill-box; transform-origin: center; }
.gs__ink { fill: currentColor; }
.gs__roof, .gs__read, .gs__led { fill: var(--k); }
.gs__cut { fill: var(--ft-shell); }
.gs__ln { fill: none; stroke: var(--ft-shell); stroke-width: 1.3; stroke-linecap: round; }
.gs__lv { opacity: .8; } .gs__fin { opacity: .6; stroke-width: 1.1; } .gs__grille { opacity: .9; }
.gs__cut + .gs__read + .gs__ln { stroke: currentColor; opacity: .45; }
.gs__puffs circle { fill: currentColor; opacity: 0; }
.gs__scan { fill: var(--k); opacity: 0; }
@keyframes scan { from { transform: translateX(0); } to { transform: translateX(38px); } }
.ud.repair .gs { transform: rotate(-4deg); }
/* ===== Fleet X-ray (v2): same recipe as Fleet today. Bright bars with ink text, empty dashed slots for idle days,
   a mini generator beside each name, bars grow in once when the chart scrolls into view. ===== */
.xr, .xr__legend { --ft-ink: var(--ink); --ft-shell: var(--panel); }
.xl.rent, .xr__seg.rent, .xr__row.on_rent { --k: #35dd8b; } .xl.repair, .xr__seg.repair, .xr__row.repair { --k: #ff6f6f; } .xl.check, .xr__seg.check, .xr__row.inspection { --k: #4cc3ff; }
.xr__row.ready { --k: #4cc3ff; } .xr__row.inspection { --k: #ffc533; } .xr__row.reserved { --k: #a98bff; } .xl.idle { --k: transparent; }
.xr__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.xl { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 1px 2px rgb(10 21 40 / .04), 0 4px 12px rgb(10 21 40 / .05); font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; }
.xl i { width: 12px; height: 12px; border-radius: 4px; background: var(--k); border: 2px solid var(--ink); }
.xl.idle i { border-style: dashed; border-width: 1.5px; border-color: var(--muted); }
.xl b { margin-left: 3px; font-size: 14px; font-weight: 700; color: var(--ink); } .xl small { font-size: 11.5px; color: var(--muted); }
.xr__legend .hint { margin-left: auto; font-size: 12px; }
.xr { display: grid; }
.xr__axis, .xr__row { display: grid; grid-template-columns: 168px minmax(0, 1fr) 108px; align-items: center; }
.xr__axis { height: 32px; font-size: 11.5px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line2); }
.xr__axis > span { padding: 0 12px; } .xr__axis > span:last-child { text-align: right; }
.xr__axis > div { position: relative; height: 100%; margin: 0 12px; }
.xr__axis em { position: absolute; top: 8px; font-style: normal; transform: translateX(-50%); white-space: nowrap; }
.xr__axis em:first-child { transform: none; }
.xr__axis em.today { right: -1px; top: 5px; transform: none; padding: 2px 9px; border-radius: 99px 99px 4px 99px; background: var(--ink); color: var(--panel); font-size: 11px; }
.xr__row { position: relative; height: 46px; border-bottom: 1px solid var(--line); border-radius: 12px; transition: background .15s; }
.xr__row:last-child { border-bottom: 0; }
.xr__row:hover { background: var(--hover); }
.xr__row > a:first-child { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 100%; white-space: nowrap; }
.xr__art { flex: none; width: 34px; } .xr .gs { filter: none; }
.xr__row > a:first-child b { display: block; font-weight: 700; color: var(--ink); font-size: 13px; line-height: 1.2; letter-spacing: -.01em; }
.xr__row > a:first-child small { display: block; color: var(--muted); font-size: 11px; }
.xr__row > a:first-child:hover b { color: var(--tc-blue); }
.xr__track { position: relative; display: flex; gap: 3px; height: 28px; margin: 0 12px; background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: var(--wk) 100%; }
.xr__track::after { content: ''; position: absolute; right: 0; top: -9px; bottom: -9px; width: 1.5px; background: var(--ink); opacity: .55; }
.xr__seg { display: flex; align-items: center; min-width: 0; height: 100%; border-radius: 9px; cursor: pointer; overflow: hidden; container-type: inline-size; transform-origin: left center; transition: transform .18s cubic-bezier(.22, 1, .36, 1), filter .18s;
  background: linear-gradient(135deg, color-mix(in srgb, var(--k) 94%, #fff), color-mix(in srgb, var(--k) 60%, #fff)); box-shadow: inset 0 0 0 1px rgb(10 21 40 / .08), inset 0 1px 0 rgb(255 255 255 / .45); }
.xr__seg em { padding: 0 9px; font: 600 11.5px 'Poppins', sans-serif; font-style: normal; color: #0a1528; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 44px) { .xr__seg em { display: none; } }
.xr__seg:hover { transform: translateY(-2px); filter: saturate(1.15) brightness(1.03); }
.xr__seg.idle { background: none; box-shadow: none; border: 1.5px dashed var(--line2); }
.xr__seg.idle em { color: var(--muted); font-weight: 500; }
.xr__seg.idle:hover { border-color: var(--muted); }
.xr.in .xr__seg { animation: xrGrow .55s cubic-bezier(.22, 1, .36, 1) backwards; animation-delay: calc(var(--r, 0) * 22ms); }
@keyframes xrGrow { from { transform: scaleX(0); opacity: 0; } }
.xr__sum { position: relative; display: flex; align-items: baseline; justify-content: flex-end; gap: 4px; height: 100%; padding: 7px 12px 0; white-space: nowrap; }
.xr__sum b { color: var(--ink); font-size: 16px; font-weight: 700; letter-spacing: -.02em; } .xr__sum small { color: var(--muted); font-size: 11px; }
.xr__sum .rp { margin-left: 4px; align-self: flex-start; margin-top: 3px; }
.xr__sum u { position: absolute; right: 12px; bottom: 8px; width: 64px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.xr__sum u::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 4px; background: #35dd8b; }
@media (prefers-reduced-motion: reduce) { .xr.in .xr__seg { animation: none; } }
@media (max-width: 760px) {
  .xr__legend { gap: 6px; } .xl { height: 28px; padding: 0 10px 0 8px; font-size: 12px; } .xr__legend .hint { margin-left: 0; width: 100%; }
  .xr__axis { grid-template-columns: 1fr; height: 30px; } .xr__axis > span { display: none; } .xr__axis > div { margin: 0; }
  .xr__axis em:not(.today):not(:first-child):nth-child(even) { display: none; }
  .xr__row { grid-template-columns: 1fr auto; grid-template-areas: 'n s' 't t'; height: auto; padding: 9px 0 11px; row-gap: 7px; border-radius: 0; }
  .xr__row > a:first-child { grid-area: n; padding: 0; height: auto; }
  .xr__row > a:first-child b, .xr__row > a:first-child small { display: inline; } .xr__row > a:first-child small { margin-left: 6px; }
  .xr__sum { grid-area: s; padding: 0; height: auto; } .xr__sum u { display: none; }
  .xr__track { grid-area: t; margin: 0; height: 28px; } .xr__track::after { top: -4px; bottom: -4px; }
  .xr__seg em { padding: 0 6px; font-size: 10.5px; }
}
/* tooltips: a crisp floating card, like the tags */
.tip, [data-theme='dark'] .tip { background: #fff; color: #0a1528; border: 1px solid #d8e0ec; border-radius: 14px; padding: 11px 13px; box-shadow: 0 2px 4px rgb(10 21 40 / .06), 0 14px 32px rgb(10 21 40 / .18); }
.tip b { font-weight: 700; } .tip span { opacity: 1; color: #4a5a72; } .tip em, [data-theme='dark'] .tip em { color: #1257c9; }
[data-theme='dark'] .tip { background: #18223a; color: #f4f7fc; border-color: rgb(255 255 255 / .16); box-shadow: 0 14px 32px rgb(0 0 0 / .6); }
[data-theme='dark'] .tip span { color: #a9b6cc; } [data-theme='dark'] .tip em { color: #6fb6ff; }
/* inline "new customer" block inside the rental form */
.newcust { margin: 0; padding: 14px 16px 12px; border: 1px solid var(--line2); border-radius: 14px; background: var(--panel2); min-width: 0; }
.newcust[hidden] { display: none; }
.newcust legend { padding: 0 6px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.newcust .form { margin-bottom: 6px; }
/* steps: rental → contract → delivery note → on rent */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; padding: 0; }
.steps a { display: flex; align-items: center; gap: 10px; height: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; }
.steps b { display: block; font-size: 13.5px; } .steps small { display: block; color: var(--muted); font-size: 11.5px; }
.steps__n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line2); }
.steps__n svg { width: 16px; height: 16px; }
.steps li.done .steps__n { background: #12a150; border-color: #12a150; color: #fff; }
.steps li.here a { border-color: #f8a30d; box-shadow: 0 0 0 3px rgb(248 163 13 / .18); }
.steps li.here .steps__n { background: #f8a30d; border-color: #f8a30d; color: #0a1528; }
@media (max-width: 760px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack > .card { margin: 0; }
.docframe { width: 100%; height: 1120px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
@media (max-width: 760px) { .docframe { height: 640px; } }
.btn.wide { width: 100%; justify-content: center; margin-bottom: 8px; }
.btn.busy { opacity: .7; cursor: progress; }
.fh { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.sc { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 10px 12px; border: 1px dashed var(--line2); border-radius: 12px; }
.sc > b { grid-column: 1 / -1; font-size: 12.5px; }
textarea { width: 100%; font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); resize: vertical; }
/* new rental: generator rows */
.pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; background: var(--panel2); }
.pick input { width: 90px; height: 38px; } .pick small { flex-basis: 100%; }
.urows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.urow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
@media (max-width: 760px) { .urow { grid-template-columns: 1fr 40px; } .urow input { grid-column: 1; } }
/* delivery note units */
.units { display: flex; flex-direction: column; gap: 12px; }
.unit { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.unit__h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13.5px; } .unit__h input { width: auto; }
label.chk { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; font-size: 13px; } label.chk input { width: auto; height: auto; }
/* one generator's map */
.unitmap { width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); z-index: 0; }
/* settings: real / demo */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .modes { grid-template-columns: 1fr; } }
.mode { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--panel); }
.mode.on.real { border-color: #12a150; box-shadow: 0 0 0 3px rgb(18 161 80 / .14); } .mode.on.demo { border-color: #f8a30d; box-shadow: 0 0 0 3px rgb(248 163 13 / .16); }
.mode b { font-size: 16px; color: var(--ink); } .mode small { color: var(--muted); } .mode__n { font-size: 12.5px; color: var(--ink); margin: 4px 0 6px; }
.mode__ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--panel2); }
.modebar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 16px; border-radius: 14px; background: #fff4dc; border: 1px solid #f8c35a; color: #5a3b00; text-decoration: none; font-size: 13.5px; }
.modebar u { margin-left: auto; text-decoration: none; font-weight: 600; }
[data-theme='dark'] .modebar { background: #3a2a06; border-color: #8a6110; color: #ffe2a3; }
.demo-dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: #f8a30d; color: #0a1528; font-size: 10px; display: grid; place-items: center; }
input.missing, select.missing { border-color: #f0b44c; background: color-mix(in srgb, #f8a30d 8%, var(--panel)); }
.wait { opacity: .45; pointer-events: none; }
.ai-wait { border-color: #f8a30d; } .ai-wait svg { animation: aiPulse 1.2s ease-in-out infinite; }
@keyframes aiPulse { 50% { opacity: .3; } }
.saved-list { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; }
.saved-list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.pay-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; margin-top: 4px; }
.pay-form label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); }
.pay-form input { height: 32px; width: 130px; font-size: 12.5px; padding: 0 8px; }
.unit.done { background: var(--panel2); color: var(--muted); } .unit.done .unit__h { margin: 0; }
/* delete contract */
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 12px 16px; border: 1px dashed #e7a3a3; border-radius: 14px; color: var(--muted); font-size: 13px; }
.danger-zone span { display: inline-flex; align-items: center; gap: 8px; }
.dl-list { margin: 0 0 6px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink); }
.dl-list li.warn { color: #b42323; }
/* workshop "mark done" inline form */
.done-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.done-form select, .done-form input { height: 32px; font-size: 12.5px; padding: 0 8px; width: auto; }
.done-form input[type='number'] { width: 92px; }
/* ---- quotations: line rows, live total ---- */
.qhead, .qrow { display: grid; grid-template-columns: 110px 80px minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.qhead { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; padding: 0 2px; }
.qrows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.qrow small[data-qhint] { grid-column: 1 / -1; margin-top: -4px; font-size: 11.5px; }
.qrow small[data-qhint]:empty { display: none; }
.qtotal { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--panel2); font-size: 13.5px; }
@media (max-width: 760px) { .qhead { display: none; } .qrow { grid-template-columns: 1fr 70px 40px; } .qrow input[name="rate[]"] { grid-column: 1 / 3; } }

/* ---- live search in the top bar ---- */
.search .live { position: absolute; top: calc(100% + 8px); left: 0; right: 0; min-width: 360px; max-height: 70vh; overflow: auto; z-index: 60;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; box-shadow: 0 18px 50px rgb(15 23 42 / .18); padding: 6px; }
.search .live a { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 9px 10px; border-radius: 11px; color: inherit; text-decoration: none; }
.search .live a:hover, .search .live a.on { background: var(--hover); }
.live__k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 3px; }
.live__m b { font-size: 13.5px; } .live__m .badge { margin-left: 4px; vertical-align: 1px; }
.live__m small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.live__m .live__f { color: var(--text, inherit); opacity: .85; }
.search .live a.live__all { display: block; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--accent, #f8a30d); border-top: 1px solid var(--line); border-radius: 0 0 11px 11px; margin-top: 4px; }
.live__none { margin: 0; padding: 12px; color: var(--muted); font-size: 13px; }
/* ---- search: a contract shown in full ---- */
.sres { display: grid; gap: 14px; }
.sres .kv dd small { display: block; color: var(--muted); }

/* a button whose small sub-label sits underneath and wraps instead of overflowing */
.btn.stack { height: auto; min-height: 44px; padding: 8px 14px; flex-wrap: wrap; row-gap: 1px; text-align: center; line-height: 1.25; }
.btn.stack small { flex-basis: 100%; margin: 0; font-weight: 500; font-size: 11.5px; opacity: .85; white-space: normal; }

/* ---- WhatsApp media: players load nothing until pressed; photos load as they scroll into view ---- */
.md { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; align-items: flex-start; }
.md__audio { flex: 1 1 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel2); }
.md__audio audio { width: 100%; height: 36px; }
.md__k { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.md__k .ic { width: 16px; height: 16px; }
.md__dl { font-size: 11.5px; color: var(--muted); }
.md__t { grid-column: 1 / -1; font-size: 12.5px; line-height: 1.45; }
.md__img img { display: block; width: 120px; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); }
.md__vid { width: 240px; } .md__vid video { width: 100%; max-height: 160px; border-radius: 10px; background: #000; display: block; }
.md__vid small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.mdchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mdchips a { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 2px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); font-size: 11.5px; color: inherit; text-decoration: none; }
.mdchips a:not(:has(img)) { padding-left: 8px; }
.mdchips img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
/* ---- protected delete: 12 passkey slots ---- */
.keyslots { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.keyslots input { font-family: ui-monospace, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 760px) { .keyslots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.passkeys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding-left: 26px; }
.passkeys li { font-weight: 600; color: var(--muted); }
.passkeys li span { font-family: ui-monospace, Consolas, monospace; font-size: 20px; letter-spacing: .1em; color: var(--ink, inherit); }
details.restore summary { list-style: none; cursor: pointer; } details.restore summary::-webkit-details-marker { display: none; }
details.restore[open] form { margin-top: 8px; min-width: 220px; }
@media print { .rail, .top, .tabbar, .ph__a, #back, .modebar, .banner, .btn { display: none !important; } .main { margin: 0 !important; } }
