/* HMCL "workspace" look — mirrors the legacy desktop program (same layout, menu, toolbars, grids, button colours)
   with modern spacing. Loaded after app.css, so it only overrides. Palette values come from the legacy WorkspaceStyle. */
:root {
  --bg: #f1f5f9; --surface: #ffffff; --surface-2: #f8fafc; --ink: #0f172a; --ink-2: #283649; --muted: #475569;
  --line: #d7e0ea; --line-2: #b5c3d2; --accent: #1d4ed8; --accent-2: #1e40af; --accent-soft: #dbeafe; --accent-ink: #fff;
  --nav: #ffffff; --nav-2: #eef3fb; --nav-ink: #283649; --nav-muted: #475569; --sel: #dbeafe; --nav-icon: #1d4ed8;
  /* action colours: tint / ink / outline / solid */
  --add-t: #e6f8ed; --add-i: #14532d; --add-o: #70a484; --add-s: #156534;
  --edit-t: #fff5e0; --edit-i: #78350f; --edit-o: #bf9756; --edit-s: #924e0e;
  --view-t: #e1f7f7; --view-i: #114e52; --view-o: #67a2a4; --view-s: #0f5c59;
  --rem-t: #ffeaee; --rem-i: #8b1f33; --rem-o: #be7a87; --rem-s: #991b2f;
  --r: 6px; --r-sm: 9px; --font: "Segoe UI", "Segoe UI Variable Text", system-ui, -apple-system, Arial, sans-serif;
}
[data-theme="dark"] {
  --bg: #181e28; --surface: #222a37; --surface-2: #1d2531; --ink: #e9f0fa; --ink-2: #c9d5e6; --muted: #aebccf;
  --line: #34415a; --line-2: #5e6f89; --accent: #93c5fd; --accent-2: #bfdbfe; --accent-soft: #274066; --accent-ink: #0b1b36;
  --nav: #131923; --nav-2: #1d2634; --nav-ink: #e9f0fa; --nav-muted: #aebccf; --sel: #274066; --nav-icon: #93c5fd;
  --add-t: #1f3a2f; --add-i: #a7f3d0; --add-o: #53a378; --add-s: #1f7a4a;
  --edit-t: #392d1b; --edit-i: #fddc91; --edit-o: #b28841; --edit-s: #a8610f;
  --view-t: #1c373b; --view-i: #99f0eb; --view-o: #52999c; --view-s: #18807b;
  --rem-t: #3e252f; --rem-i: #ffbac5; --rem-o: #ae6979; --rem-s: #b3304a;
}
body { font-size: 14px; }

/* ───── Shell: 252px menu, title bar, canvas ───── */
#app.shell { grid-template-columns: 252px minmax(0, 1fr); }
#app.shell.collapsed { grid-template-columns: 64px minmax(0, 1fr); }
.nav { background: var(--nav); color: var(--nav-ink); padding: 0; gap: 0; border-right: 1px solid var(--line); }
.nav .brand { display: block; padding: 12px 18px 6px; min-height: 88px; }
.nav .brand img { display: block; max-width: 100%; max-height: 64px; object-fit: contain; }
.nav .brand .name { font: 700 17px var(--font); color: var(--ink); }
.nav .scroll { flex: 1; overflow: auto; padding: 8px 12px 10px; }
.nav-h { font-size: 13.5px; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; color: var(--nav-muted); padding: 10px 10px 6px; }
.nav a.item { height: 43px; margin: 2px 0; padding: 0 9px; gap: 10px; border-radius: 12px; border: 1px solid transparent; color: var(--nav-ink); font-weight: 400; font-size: 14.5px; }
.nav a.item svg { color: var(--nav-icon); opacity: 1; width: 19px; height: 19px; }
.nav a.item:hover { background: var(--nav-2); color: var(--ink); }
.nav a.item.active { background: var(--sel); border-color: var(--line-2); color: var(--ink); }
.nav a.item.active::before { display: none; }
.nav .account { border-top: 1px solid var(--line); margin: 0 14px; padding: 10px 0 8px; display: grid; gap: 4px; }
.nav .account .who { font-weight: 700; font-size: 15px; color: var(--ink); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .account .role { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.nav .account .btn { justify-content: flex-start; width: 100%; height: 36px; }
.nav .account .btn.flat { border-color: transparent; background: none; }
.nav .account .btn.flat:hover { background: var(--nav-2); }
#app.collapsed .nav .account .who, #app.collapsed .nav .account .role, #app.collapsed .nav .brand { display: none; }
.main { background: var(--bg); }
.titlebar { display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 20px; background: var(--surface); flex: none; border-bottom: 1px solid var(--line); }
.titlebar > svg { width: 24px; height: 24px; color: var(--accent); }
.titlebar h1 { font: 700 26px var(--font); letter-spacing: -.01em; white-space: nowrap; }
.titlebar .crumbs { margin-right: -6px; }
.titlebar .tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.titlebar .iconbtn { width: 36px; height: 36px; padding: 0; border-radius: 10px; }
.content { padding: 14px 18px 24px; }
.conn { font-size: 12px; }

/* ───── Page intro, panels, toolbars ───── */
.lg-intro h2 { font: 700 28px var(--font); letter-spacing: -.01em; margin: 6px 0 4px; }
.lg-intro p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.lg-sub { margin: 0 0 8px 4px; color: var(--muted); font-size: 15px; }
.lg-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 12px 10px; margin-bottom: 10px; }
.lg-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.lg-row + .lg-row { margin-top: 8px; }
.lg-row .grow { flex: 1; min-width: 220px; }
.lg-field { display: flex; flex-direction: column; gap: 3px; } .lg-field > label { color: var(--muted); font-size: 14px; padding-left: 4px; }
.lg-input { height: 40px; width: 100%; padding: 0 12px 0 34px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: 14.5px; }
.lg-input.plain { padding-left: 12px; }
.lg-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lg-search { position: relative; } .lg-search > svg { position: absolute; left: 11px; top: 12px; width: 16px; height: 16px; color: var(--accent); }
select.lg-input { padding-left: 12px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 32px; }
.lg-radio { display: inline-flex; align-items: center; gap: 7px; height: 40px; margin: 0 6px; cursor: pointer; user-select: none; font-size: 15px; }
.lg-radio input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Buttons: white with a blue icon; tinted by what they do, exactly like the legacy colour keys. */
.btn { height: 40px; border-radius: var(--r-sm); border-color: var(--line-2); font-weight: 400; font-size: 14.5px; padding: 0 16px; gap: 8px; background: var(--surface); }
.btn svg { color: var(--accent); width: 16px; height: 16px; }
.btn:hover { background: var(--nav-2); border-color: var(--accent); }
.btn.new { background: var(--add-s); border-color: var(--add-s); color: #fff; } .btn.new svg { color: #fff; } .btn.new:hover { background: #0f4d28; border-color: #0f4d28; }
.btn.add { background: var(--add-t); color: var(--add-i); border-color: var(--add-o); } .btn.add svg { color: var(--add-i); } .btn.add:hover { border-color: var(--add-s); background: var(--add-t); }
.btn.edit { background: var(--edit-t); color: var(--edit-i); border-color: var(--edit-o); } .btn.edit svg { color: var(--edit-i); } .btn.edit:hover { border-color: var(--edit-s); background: var(--edit-t); }
.btn.view { background: var(--view-t); color: var(--view-i); border-color: var(--view-o); } .btn.view svg { color: var(--view-i); } .btn.view:hover { border-color: var(--view-s); background: var(--view-t); }
.btn.remove, .btn.danger { background: var(--rem-t); color: var(--rem-i); border-color: var(--rem-o); } .btn.remove svg, .btn.danger svg { color: var(--rem-i); } .btn.remove:hover, .btn.danger:hover { border-color: var(--rem-s); background: var(--rem-t); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .btn.primary svg { color: var(--accent-ink); } .btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn.icon { width: 40px; padding: 0; } .btn.sm.icon { width: 32px; }
.btn.ghost { background: none; border-color: transparent; } .btn.ghost:hover { background: var(--nav-2); }
.btn.mute { opacity: .5; }

/* ───── Tabs (WinForms look: flat, selected one tinted with accent text) ───── */
.lg-tabs { display: flex; background: #f0efef; border-bottom: 1px solid var(--line-2); padding: 6px 0 0 4px; gap: 0; overflow: auto; margin-top: 8px; }
[data-theme="dark"] .lg-tabs { background: #1a212c; }
.lg-tabs button { background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0; margin-right: -1px; padding: 8px 22px 9px; font: 400 15.5px var(--font); color: var(--ink); cursor: pointer; white-space: nowrap; position: relative; top: 1px; }
.lg-tabs button.on { background: var(--sel); color: var(--accent); z-index: 1; }
.lg-tabs button:hover:not(.on) { background: var(--nav-2); }
.lg-tabpage { background: var(--surface); border: 1px solid var(--line-2); border-top: 0; padding: 0; min-height: 120px; }

/* ───── Grids: bordered cells, bold header, accent-tinted selection ───── */
.lg-grid { overflow: auto; background: var(--surface); border: 1px solid var(--line-2); max-height: calc(100vh - 340px); min-height: 160px; }
.lg-grid.tall { max-height: calc(100vh - 250px); }
.lg-grid table { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.lg-grid th { position: sticky; top: 0; z-index: 1; background: var(--surface); font: 700 15px var(--font); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); white-space: nowrap; user-select: none; }
.lg-grid th.wrap { white-space: normal; line-height: 1.15; text-align: center; }
.lg-grid td { padding: 7px 10px; height: 38px; border-bottom: 1px solid var(--line); border-right: 1px solid transparent; font-size: 15px; white-space: nowrap; max-width: clamp(160px, 24vw, 380px); overflow: hidden; text-overflow: ellipsis; }
.lg-grid tbody tr { cursor: default; } .lg-grid tbody tr:hover { background: var(--surface-2); }
.lg-grid tbody tr.sel { background: var(--sel); } .lg-grid tbody tr.sel td { color: var(--ink); }
.lg-grid tbody tr.cancelled td { color: var(--muted); text-decoration: line-through; }
.lg-grid td.act { padding: 3px 8px; } .lg-grid td .btn.sm { height: 30px; }
.lg-grid td.c, .lg-grid th.c { text-align: center; }
.lg-grid .empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.lg-foot { padding: 6px 4px 0; color: var(--muted); font-size: 14.5px; }
.lg-head { display: flex; align-items: baseline; gap: 14px; margin: 8px 0 6px 2px; } .lg-head h3 { font: 700 17px var(--font); } .lg-head span { color: var(--muted); font-size: 15px; }

/* ───── Dashboard ───── */
.lg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin: 10px 0; }
.lg-card { background: var(--surface); border: 1px solid var(--line-2); padding: 10px 14px 12px; display: block; color: inherit; text-decoration: none; }
a.lg-card:hover { border-color: var(--accent); text-decoration: none; }
.lg-card .cap { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 16px; }
.lg-card .cap .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); display: grid; place-items: center; } .lg-card .cap .ico svg { width: 17px; height: 17px; color: var(--accent); }
.lg-card .val { font: 700 30px var(--font); margin: 4px 0 0 40px; line-height: 1.15; } .lg-card.alert .val { color: #9b1c31; }
.lg-bars { padding: 14px 16px; display: grid; gap: 10px; }
.lg-bar { display: grid; grid-template-columns: 220px 1fr 90px; align-items: center; gap: 14px; font-size: 15.5px; }
.lg-bar .track { background: #eef2f8; height: 24px; } [data-theme="dark"] .lg-bar .track { background: #2c3647; }
.lg-bar i { display: block; height: 100%; background: #8b1d36; }
.lg-bar i.ok { background: var(--accent); } .lg-bar i.mid { background: #c58a1a; }
.lg-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.lg-split { display: flex; align-items: center; gap: 14px; padding: 12px 16px 0; } .lg-split h3 { font: 700 17px var(--font); }

/* ───── Report library ───── */
.lg-lib { display: grid; gap: 10px; max-width: 1180px; }
.lg-lib .item { background: var(--surface); padding: 12px 16px 14px; display: grid; grid-template-columns: 36px 1fr; gap: 4px 10px; }
.lg-lib .item .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); display: grid; place-items: center; margin-top: 2px; } .lg-lib .item .ico svg { color: var(--accent); width: 17px; height: 17px; }
.lg-lib h3 { font: 700 18px var(--font); } .lg-lib p { margin: 2px 0 8px; color: var(--muted); font-size: 15px; } .lg-lib .item .body { grid-column: 2; }

/* ───── Settings / forms ───── */
.lg-sec { padding: 16px 22px 22px; } .lg-sec h2 { font: 700 26px var(--font); margin: 6px 0 4px; } .lg-sec .lead { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.lg-sec .lg-field { margin-bottom: 12px; max-width: 360px; } .lg-sec .lg-field > label { color: var(--ink); }
.lg-note { background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 10px 14px; margin: 8px 0 14px; max-width: 760px; color: var(--ink-2); }
.lg-prev { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; } .lg-prev b { background: var(--accent); color: #fff; padding: 8px 16px; font-weight: 400; }

/* Dialogs follow the same look */
.dialog { border-radius: 10px; } .dh h2 { font: 700 18px var(--font); }
.field > label { font-weight: 400; color: var(--muted); font-size: 13.5px; }
.input, select.input { height: 38px; border-radius: var(--r-sm); }
.chip { border-radius: 6px; font-weight: 500; }
.tabs { background: #f0efef; border: 0; padding: 6px 0 0 4px; margin-bottom: 0; } [data-theme="dark"] .tabs { background: #1a212c; }
.tabs button { background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0; margin: 0 -1px 0 0; padding: 8px 20px; font-weight: 400; color: var(--ink); } .tabs button.on { background: var(--sel); color: var(--accent); border-bottom: 0; }
.card { border-radius: var(--r); box-shadow: none; border-color: var(--line-2); }
.login .hero { background: linear-gradient(160deg, #0f2a66, #1d4ed8 70%, #2d62e8); } .login .hero li svg { color: #bfdbfe; }
.login .hero img { width: 240px; background: #fff; padding: 10px 14px; border-radius: 10px; }
@media (max-width: 880px) { .nav .brand img { display: none; } .nav .account .who, .nav .account .role { display: none; } }

/* Accent colours (legacy Theme manager: Teal / Blue / Green / Violet) */
[data-accent="teal"] { --accent: #0f766e; --accent-2: #115e59; --accent-soft: #ccfbf1; --sel: #ccfbf1; --nav-icon: #0f766e; }
[data-accent="green"] { --accent: #156534; --accent-2: #14532d; --accent-soft: #dcfce7; --sel: #dcfce7; --nav-icon: #156534; }
[data-accent="violet"] { --accent: #6d28d9; --accent-2: #5b21b6; --accent-soft: #ede9fe; --sel: #ede9fe; --nav-icon: #6d28d9; }
[data-theme="dark"][data-accent="teal"] { --accent: #5eead4; --accent-2: #99f6e4; --accent-soft: #134e4a; --sel: #134e4a; --nav-icon: #5eead4; --accent-ink: #042f2e; }
[data-theme="dark"][data-accent="green"] { --accent: #86efac; --accent-2: #bbf7d0; --accent-soft: #214535; --sel: #214535; --nav-icon: #86efac; --accent-ink: #052e16; }
[data-theme="dark"][data-accent="violet"] { --accent: #c4b5fd; --accent-2: #ddd6fe; --accent-soft: #3b2a6b; --sel: #3b2a6b; --nav-icon: #c4b5fd; --accent-ink: #1e0b4b; }

/* ───── Concrete / mortar test window (legacy layout) ───── */
.dialog.cf-dialog { width: min(1290px, calc(100vw - 20px)); max-height: calc(100vh - 20px); }
.cf-dialog .dh { padding: 10px 16px; } .cf-dialog .dh h2 { font: 400 17px var(--font); }
.cf-dialog .db { padding: 8px 10px 10px; }
.cf { display: grid; gap: 8px; font-size: 14px; }
.cf-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.cf-mid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; }
.cf-panel { border: 1px solid var(--line-2); padding: 8px 10px; display: grid; gap: 5px; align-content: start; background: var(--surface); }
.cf-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 8px; }
.cf-row > label { text-align: right; color: var(--ink); } .cf-row > label a { color: var(--accent); }
.cf-two { display: grid; grid-template-columns: 1fr 1.25fr; gap: 14px; align-items: start; } .cf-two > .cf-row { grid-template-columns: auto minmax(0, 1fr); }
.cf-pair { display: flex; gap: 6px; align-items: center; min-width: 0; } .cf-pair > * { min-width: 0; } .cf-pair .cf-in:first-child { flex: 0 0 auto; } .cf-pair .cf-in:last-child { flex: 1; }
.cf-inl { margin-left: 8px; color: var(--ink); }
.cf-in { height: 28px; width: 100%; padding: 0 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 3px; font: 400 14px var(--font); color: var(--ink); }
.cf-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cf-in:disabled, .cf-in.cf-ro { background: var(--surface-2); color: var(--muted); }
.cf-in.cf-pick { border-color: var(--accent); cursor: default; } .cf-in.cf-pick:not(.cf-ro) { cursor: pointer; }
.cf-area { height: 76px; padding: 6px 8px; resize: vertical; line-height: 1.35; }
.cf-hint { font-style: italic; color: var(--muted); font-size: 12.5px; padding-left: 120px; margin-top: -3px; } .cf-hint.right { text-align: right; padding: 0 4px 0 0; }
.cf-txn { font-weight: 600; white-space: nowrap; margin-left: 4px; }
.cf-tabpage { border: 1px solid var(--line-2); border-top: 0; margin-top: -9px; padding: 6px 8px 8px; min-height: 215px; background: var(--surface); display: grid; gap: 6px; align-content: start; }
.cf-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cf-grid { max-height: 190px !important; min-height: 100px !important; }
.cf-grid th { font-size: 14px; padding: 5px 8px; } .cf-grid td { font-size: 14px; height: 30px; padding: 3px 8px; }
.cf-bottom { gap: 6px; } .cf-bottom .cf-row > label { text-align: left; } .cf-bottom .cf-row { grid-template-columns: 110px minmax(0, 1fr); align-items: start; }
.cf-foot { display: flex; gap: 8px; align-items: center; padding: 10px 2px 0; } .cf-foot .grow { flex: 1; }
.cf-attbody { display: grid; grid-template-columns: 300px 1fr; gap: 8px; min-height: 150px; }
.cf-att { border: 1px solid var(--line-2); overflow: auto; max-height: 190px; } .cf-att-row { padding: 6px 8px; cursor: pointer; display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); } .cf-att-row small { color: var(--muted); } .cf-att-row.sel { background: var(--sel); }
.cf-prev { border: 1px solid var(--line-2); display: grid; place-items: center; padding: 6px; max-height: 190px; overflow: auto; background: var(--surface-2); } .cf-prev img { max-width: 100%; max-height: 176px; }
@media (max-width: 1000px) { .cf-top, .cf-mid, .cf-two { grid-template-columns: 1fr; } .cf-attbody { grid-template-columns: 1fr; } }

/* Concrete form: keep Edit/Save/Close always visible and let only the form body scroll; tighter vertical rhythm */
.cf-dialog .db { overflow: hidden; display: flex; padding: 8px 10px 10px; }
.cf-dialog .db > div { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.cf-dialog .cf { overflow: auto; flex: 1; min-height: 0; padding-right: 2px; }
.cf-foot { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.cf-pair .cf-in { width: auto; } .cf-pair .cf-in:first-child { flex: 0 0 120px; } .cf-pair .cf-in:last-child { flex: 1; }
.cf-pair select.cf-in { flex: 0 0 150px !important; }
.cf-panel { gap: 4px; padding: 7px 10px; } .cf-in { height: 27px; }
.cf-tabpage { min-height: 160px; } .cf-grid { max-height: 150px !important; min-height: 80px !important; } .cf-area { height: 58px; }
.cf-att { max-height: 150px; } .cf-prev { max-height: 150px; } .cf-prev img { max-height: 136px; }

/* Other test windows (cores, grout, asphalt, soil, moisture, relative density) */
.cf-top.c2 { grid-template-columns: 1.3fr 1fr; } .cf-top.c3 { grid-template-columns: 1.35fr 1fr 1fr; }
.cf-strip { border: 1px solid var(--line-2); padding: 8px 10px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px 18px; background: var(--surface); }
.cf-strip .cf-row { grid-template-columns: 1fr 96px; } .cf-strip .cf-row > label { text-align: right; }
.cf-sec { display: grid; gap: 6px; } .cf-wide { grid-template-columns: 90px minmax(0, 1fr); }
.cf-redhint { color: #9b1c31; font-style: italic; font-size: 13.5px; } [data-theme="dark"] .cf-redhint { color: #ffabb4; }
.cf-phrases { border: 1px solid var(--line-2); background: var(--surface); max-height: 84px; overflow: auto; } .cf-phrases .ph { padding: 4px 8px; cursor: pointer; font-size: 13.5px; border-bottom: 1px solid var(--line); } .cf-phrases .ph:hover { background: var(--sel); }
.cf-tabpage.flat { margin-top: 0; border-top: 1px solid var(--line-2); } .cf.flat .cf-grid { max-height: 300px !important; }
.cf-tabpage .cf-grid { max-height: 260px !important; min-height: 120px !important; }
.cf-tabpage-in { display: grid; gap: 6px; }
.cf-asphalt_compaction .cf-tabpage, .cf-asphalt_core .cf-tabpage, .cf-compaction .cf-tabpage { min-height: 230px; }

/* Rows keep their natural height; the form body scrolls instead of squashing the tab area */
.cf { grid-auto-rows: max-content; align-content: start; }
.cf-tabpage { overflow: visible; }

/* ───── Official report pages (rebuilt legacy forms): exact letter pages, 96 dpi ───── */
.rp-dialog { width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 20px); } .rp-dialog .db { padding: 0; background: #7b8794; overflow: auto; }
.rp-viewer { padding: 14px 0; } .rp-doc { display: grid; gap: 14px; justify-content: center; }
.rp-page { position: relative; background: #fff; color: #000; box-shadow: 0 2px 10px rgba(0,0,0,.35); overflow: hidden; flex: none; }
.rp-page .ro, .rp-page .rs { font-family: Arial, 'Liberation Sans', Helvetica, sans-serif; }
body.printing-report .rp-dialog { width: auto; max-height: none; box-shadow: none; } body.printing-report .rp-dialog .db { background: none; overflow: visible; padding: 0; }
body.printing-report .rp-viewer { padding: 0; } body.printing-report .rp-doc { display: block; }
body.printing-report .rp-page { box-shadow: none; margin: 0; break-after: page; page-break-after: always; } body.printing-report .rp-page:last-child { break-after: auto; page-break-after: auto; }

/* Schedule data entry: who/where and when/what side by side, the three requirement panels below (legacy arrangement). */
.dialog.se-dialog { width: min(1180px, 96vw); max-height: 94vh; }
.se-top { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.se-info { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; padding: 8px 12px; background: var(--surface-2, #f3f6fb); border-radius: 8px; font-size: 13px; }
.se-info span { color: var(--muted); margin-right: 6px; }
.se-panels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.se-panel { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 14px; transition: opacity .15s; }
.se-panel h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: .02em; color: var(--muted); text-transform: uppercase; }
.se-panel.off { opacity: .45; }
.lg-info p { margin: 0 0 12px; line-height: 1.5; }
.lg-chosen { font-weight: 700; margin-left: 12px; }
@media (max-width: 900px) { .se-top, .se-panels { grid-template-columns: 1fr; } }

/* Create invoice (legacy window): totals sit beside the action buttons, the charge list is a plain selectable table. */
.inv-edit { display: grid; gap: 12px; }
.inv-table tbody tr { cursor: pointer; } .inv-table tbody tr.sel td { background: var(--accent-soft, #dbe7ff); }
.inv-table td.num, .inv-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.lg-empty { padding: 22px; text-align: center; color: var(--muted); }
.se-totals-wrap { margin-right: auto; }
.se-totals { display: flex; gap: 18px; font-variant-numeric: tabular-nums; align-items: center; }
.lg-check { display: inline-flex; align-items: center; gap: 6px; }
.rp-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; margin: -14px 0 12px; padding: 8px 18px; background: rgba(33, 41, 52, .92); color: #e8edf3; font-size: 13px; backdrop-filter: blur(4px); }
.rp-bar .rp-zoom { background: #3a4656; color: #fff; border: 1px solid #55627a; border-radius: 6px; padding: 3px 6px; }
body.printing-report .rp-bar { display: none; }

/* Polish for the legacy-style grids: row hover, a clearer selected row, zebra-free but easy to scan. */
.lg-grid tbody tr { transition: background-color .08s; }
.lg-grid tbody tr:hover td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.lg-grid tbody tr.sel td, .lg-grid tbody tr[aria-selected="true"] td { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.lg-grid td { font-variant-numeric: tabular-nums; }
.lg-tabpage { animation: viewIn .18s ease-out both; }

/* Sortable headings */
.lg-grid th.sortable { cursor: pointer; } .lg-grid th.sortable:hover { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.lg-grid th .sort-arrow { color: var(--accent); font-size: 11px; }

/* Project files */
.pf { min-height: 220px; border: 2px dashed transparent; border-radius: 10px; padding: 4px; transition: border-color .12s, background .12s; }
.pf.drop { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.pf-cat { margin: 14px 0 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pf-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; } .pf-row:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.pf-row a { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pf-row small { color: var(--muted); }

/* A trailing Actions column stays in view while the table scrolls sideways. */
.lg-grid th.act:last-child, .lg-grid td.act:last-child { position: sticky; right: 0; background: var(--surface); box-shadow: -8px 0 8px -8px rgba(0,0,0,.22); z-index: 1; }
.lg-grid tbody tr:hover td.act:last-child { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }

/* ───── Uniform polish (same layout and workflow, one consistent modern finish on every page) ───── */
.lg-intro h2 { font-size: 24px; margin: 2px 0 2px; } .lg-intro p { font-size: 14px; margin-bottom: 14px; }
.lg-panel { border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px 12px; }
.lg-tabs { background: transparent; border-bottom: 1px solid var(--line); padding: 0 4px; gap: 4px; margin-top: 10px; }
.lg-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; margin: 0; padding: 10px 16px; font: 500 14.5px var(--font); color: var(--muted); border-radius: 8px 8px 0 0; top: 1px; }
.lg-tabs button:hover:not(.on) { background: var(--surface-2); color: var(--ink); }
.lg-tabs button.on { background: var(--surface); color: var(--accent-2); border-bottom-color: var(--accent); font-weight: 600; }
.lg-tabpage { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; box-shadow: var(--shadow); overflow: hidden; }
.lg-grid { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.lg-tabpage .lg-grid { border: 0; border-radius: 0; box-shadow: none; }
.lg-grid th { background: var(--surface-2); font: 600 13px var(--font); color: var(--ink-2); border-right: 0; padding: 10px 12px; }
.lg-grid td { padding: 7px 12px; font-size: 14px; }
.lg-sec { padding: 20px 24px 24px; } .lg-sec h2 { font-size: 22px; }
.lg-head h3 { font-size: 16px; }

/* ───── Visual report designer ───── */
.pd-shell { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 12px; align-items: start; }
.pd-canvas { background: #6b7280; border-radius: 12px; padding: 18px; overflow: auto; height: calc(100vh - 230px); outline: none; }
[data-theme="dark"] .pd-canvas { background: #1b2433; }
.pd-pagewrap { display: flex; justify-content: center; width: max-content; min-width: 100%; }
.pd-page { background: #fff; color: #000; padding: 24px 0; box-shadow: 0 3px 14px rgba(0,0,0,.4); flex: none; font-family: Arial, 'Liberation Sans', sans-serif; }
.pd-band { position: relative; outline: 1px dashed #cbd5e1; margin-bottom: 14px; background: repeating-linear-gradient(0deg, transparent 0 19px, rgba(15,23,42,.035) 19px 20px); }
.pd-band.on { outline: 1px solid var(--accent); } .pd-band.off { background-color: #f8fafc; }
.pd-tag { position: absolute; left: 0; top: -13px; font: 600 10px var(--font); text-transform: uppercase; letter-spacing: .05em; color: #64748b; pointer-events: none; white-space: nowrap; }
.pd-scope { margin: 22px 0 18px 24px; font: 700 12px var(--font); color: var(--accent-2); text-transform: uppercase; letter-spacing: .06em; }
.pd-obj { cursor: move; } .pd-obj:hover { outline: 1px solid rgba(13,148,136,.7); }
.pd-field { color: #1d4ed8; background: rgba(37,99,235,.08); } .pd-pic, .pd-sub { display: grid; place-items: center; font: 11px var(--font); color: #64748b; border: 1px dashed #94a3b8; background: #f1f5f9; }
.pd-cond { outline: 1px dotted #d97706; } .pd-hidden { opacity: .28; outline: 1px dashed #dc2626; }
.pd-sel { position: absolute; outline: 2px solid var(--accent); background: rgba(13,148,136,.07); cursor: move; z-index: 5; }
.pd-h { position: absolute; width: 9px; height: 9px; background: #fff; border: 2px solid var(--accent); border-radius: 2px; margin: -5px 0 0 -5px; z-index: 6; }
.pd-h.nw { left: 0; top: 0; cursor: nwse-resize; } .pd-h.n { left: 50%; top: 0; cursor: ns-resize; } .pd-h.ne { left: 100%; top: 0; cursor: nesw-resize; } .pd-h.e { left: 100%; top: 50%; cursor: ew-resize; }
.pd-h.se { left: 100%; top: 100%; cursor: nwse-resize; } .pd-h.s { left: 50%; top: 100%; cursor: ns-resize; } .pd-h.sw { left: 0; top: 100%; cursor: nesw-resize; } .pd-h.w { left: 0; top: 50%; cursor: ew-resize; }
.pd-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px 16px; position: sticky; top: 0; max-height: calc(100vh - 230px); overflow: auto; }
.pd-panel h3 { font-size: 16px; margin-bottom: 6px; } .pd-panel h4 { margin: 18px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pd-l { display: grid; gap: 4px; color: var(--muted); font-size: 13px; } .pd-panel textarea.lg-input { height: auto; padding: 8px 10px; resize: vertical; }
.pd-fmt { display: flex; gap: 5px; align-items: center; margin-top: 10px; flex-wrap: wrap; } .pd-fmt .lg-input { height: 34px; }
.pd-t { width: 34px; height: 34px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; cursor: pointer; color: var(--ink); } .pd-t.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }
.pd-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; } .pd-fieldname { font: 12.5px var(--mono); color: #1d4ed8; word-break: break-all; }
.pd-margins { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .pd-margins label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); text-transform: capitalize; } .pd-margins .lg-input { height: 34px; }
.pd-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--muted); font-size: 12.5px; } .pd-legend li { display: flex; gap: 8px; align-items: center; }
.pd-legend i { width: 18px; height: 12px; border-radius: 3px; flex: none; } .pd-legend .f { background: rgba(37,99,235,.15); border: 1px solid #93b4f5; } .pd-legend .c { border: 1px dotted #d97706; } .pd-legend .x { border: 1px dashed #dc2626; opacity: .5; }
@media (max-width: 1100px) { .pd-shell { grid-template-columns: 1fr; } .pd-panel { position: static; max-height: none; } }

/* live filters */
.lg-search .lg-clear { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--gray-bg); color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
.lg-search .lg-clear:hover { background: var(--line-2); color: var(--ink); } .lg-search .lg-input { padding-right: 38px; }
.lg-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-top: 10px; } .lg-filters:empty { display: none; }
.lg-fil.on > label { color: var(--accent-2); font-weight: 600; } .lg-fil.on .lg-input { border-color: var(--accent); background-color: var(--accent-soft); }
.lg-clearall { border: 0; background: none; color: var(--accent-2); cursor: pointer; height: 40px; padding: 0 6px; font-size: 13.5px; } .lg-clearall:hover { text-decoration: underline; }

/* ───── Reports hub ───── */
.rl-bar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; } .rl-bar .lg-search { max-width: 380px; min-width: 240px; flex: 1; }
.rl-chips { display: flex; gap: 6px; flex-wrap: wrap; } .rl-chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
.rl-chip:hover { border-color: var(--accent); } .rl-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-bottom: 18px; }
.rl-card { display: grid; grid-template-columns: 44px 1fr; gap: 6px 14px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; cursor: pointer; box-shadow: var(--shadow); transition: transform .12s, border-color .12s, box-shadow .12s; color: inherit; font: inherit; }
.rl-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 18px rgba(15,23,42,.1); }
.rl-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--info-bg); color: var(--info); } .rl-ico svg { width: 22px; height: 22px; }
.rl-ico.quality { background: var(--violet-bg); color: var(--violet); } .rl-ico.schedule { background: var(--warn-bg); color: var(--warn); } .rl-ico.billing { background: var(--ok-bg); color: var(--ok); } .rl-ico.lists { background: var(--gray-bg); color: var(--ink-2); }
.rl-body h3 { font-size: 15.5px; margin-bottom: 3px; } .rl-body p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.rl-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.rl-cat { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); } .rl-go { color: var(--accent-2); font-size: 13px; font-weight: 600; }
.rl-finder { margin-top: 4px; } .rl-finder .lg-grid { border: 0; border-radius: 0; box-shadow: none; }

/* ───── Create invoice window ───── */
.inv-edit { display: grid; gap: 12px; }
.inv-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px 14px; box-shadow: var(--shadow); }
.inv-sec > header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; } .inv-sec h4 { margin: 0; font-size: 14px; white-space: nowrap; }
.inv-sec .hint { color: var(--muted); font-size: 12.5px; }
.inv-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.inv-proj { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .inv-proj .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; }
.inv-chosen { font-size: 16px; flex: 1; min-width: 200px; } .inv-fields { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; } .inv-second { padding-bottom: 8px; }
.inv-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; } .inv-tools .sp { flex: 1; }
.inv-table-wrap { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.inv-table { width: 100%; border-collapse: collapse; } .inv-table th { position: sticky; top: 0; background: var(--surface-2); font: 600 13px var(--font); color: var(--ink-2); text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.inv-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); } .inv-table tr:last-child td { border-bottom: 0; } .inv-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.inv-table tbody tr { cursor: pointer; } .inv-table tbody tr:hover { background: var(--surface-2); } .inv-table tbody tr.sel { background: var(--accent-soft); } .inv-table .lg-empty { text-align: center; color: var(--muted); padding: 26px; }
.inv-sec textarea.lg-input { height: auto; padding: 8px 10px; width: 100%; }
.se-totals { display: flex; gap: 18px; align-items: baseline; font-variant-numeric: tabular-nums; color: var(--ink-2); } .se-totals b { font-size: 18px; color: var(--ink); background: var(--accent-soft); border-radius: 8px; padding: 4px 12px; }

/* advanced filters */
.lg-fil { position: relative; } .lg-fil-x { position: absolute; right: 6px; top: 0; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 0 4px; } .lg-fil-x:hover { color: var(--bad); }
.lg-addfil { height: 40px; border: 1px dashed var(--line-2); background: none; color: var(--accent-2); border-radius: var(--r-sm); padding: 0 14px; cursor: pointer; font-size: 13.5px; } .lg-addfil:hover { border-color: var(--accent); background: var(--accent-soft); }
.lg-refbox { position: relative; } .lg-pop { position: absolute; z-index: 30; left: 0; right: 0; top: 42px; min-width: 240px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow-lg); max-height: 240px; overflow: auto; }
.lg-pop button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; cursor: pointer; } .lg-pop button:hover { background: var(--surface-2); } .lg-pop small { display: block; color: var(--muted); } .lg-pop .none { padding: 10px 12px; color: var(--muted); }
.lg-ref { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 40px; padding: 0 8px 0 12px; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--r-sm); } .lg-ref button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 16px; }

/* workflow stepper */
.wf { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.wf-step { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; position: relative; } .wf-step + .wf-step { border-top: 1px solid var(--line); }
.wf-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-bg); color: var(--muted); font-weight: 700; } .wf-step.done .wf-dot { background: var(--ok-bg); color: var(--ok); } .wf-step.now .wf-dot { background: var(--warn-bg); color: var(--warn); }
.wf-txt b { display: block; } .wf-txt small { color: var(--muted); } .wf-step.todo .wf-txt b { color: var(--muted); }

/* ───── Proposals ───── */
.dash-pill.gray { background: var(--gray-bg); color: var(--ink-2); } .dash-pill.info { background: var(--info-bg); color: var(--info); } .dash-pill.bad { background: var(--bad-bg); color: var(--bad); }
.pr-steps { list-style: none; margin: 0 0 14px; padding: 12px 16px; display: flex; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: auto; }
.pr-steps li { flex: 1; min-width: 120px; display: grid; grid-template-columns: 24px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; position: relative; padding-right: 10px; }
.pr-steps li + li::before { content: ""; position: absolute; left: -8px; top: 12px; width: 6px; height: 2px; background: var(--line-2); }
.pr-steps .dot { grid-row: 1 / 3; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-bg); color: var(--muted); font-weight: 700; font-size: 13px; }
.pr-steps li.done .dot { background: var(--ok-bg); color: var(--ok); } .pr-steps li.now .dot { background: var(--warn-bg); color: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); } .pr-steps li.todo b { color: var(--muted); }
.pr-steps small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-next { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pr-totals { width: 300px; margin: 12px 0 0 auto; display: grid; gap: 4px; } .pr-totals > div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; } .pr-totals .grand { border-top: 1.5px solid var(--ink); padding-top: 6px; margin-top: 4px; font-weight: 700; font-size: 15px; }
.inv-table tr.opt td { color: var(--muted); font-style: italic; }

/* email templates */
.et-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.et-list { display: grid; gap: 6px; } .et-item { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; position: relative; }
.et-item:hover { border-color: var(--accent); } .et-item.on { border-color: var(--accent); background: var(--accent-soft); } .et-item small { color: var(--muted); font-size: 12px; } .et-badge { position: absolute; right: 10px; top: 10px; font-size: 11px; background: var(--warn-bg); color: var(--warn); border-radius: 999px; padding: 1px 8px; }
.et-edit .lg-field { max-width: none; } .et-vars { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; } .et-var { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 6px; padding: 3px 8px; font: 12px var(--mono); cursor: pointer; } .et-var:hover { border-color: var(--accent); }
.et-preview { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 12px 14px; } .et-psub { font-weight: 600; margin-bottom: 8px; } .et-psub small { display: block; color: var(--muted); font-weight: 400; } .et-pbody { margin: 0; white-space: pre-wrap; font: 13.5px/1.5 var(--font); }
@media (max-width: 900px) { .et-shell { grid-template-columns: 1fr; } }

/* users, roles & access */
.ax-matrix { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); } .ax-matrix table { width: 100%; border-collapse: collapse; }
.ax-matrix th { background: var(--surface-2); font: 600 13px var(--font); color: var(--ink-2); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; } .ax-matrix th.c, .ax-matrix td.c { text-align: center; }
.ax-matrix td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; } .ax-matrix tr:last-child td { border-bottom: 0; } .ax-matrix td small { display: block; color: var(--muted); font-size: 12px; max-width: 240px; }
.ax-th { display: inline-flex; gap: 6px; align-items: center; } .ax-th svg { width: 15px; height: 15px; color: var(--accent); }
.ax-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; } .ax-seg button, .ax-seg i { border: 0; background: var(--surface); padding: 5px 10px; font: 500 12px var(--font); cursor: pointer; color: var(--muted); font-style: normal; }
.ax-seg button + button { border-left: 1px solid var(--line-2); } .ax-seg button:disabled { cursor: default; }
.ax-seg button.none.on { background: var(--gray-bg); color: var(--ink-2); } .ax-seg button.read.on { background: var(--info-bg); color: var(--info); font-weight: 700; } .ax-seg button.write.on, .ax-seg i.on { background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.ax-seg.fixed { opacity: .8; } .ax-admin { font-size: 12.5px; color: var(--muted); } .ax-admin.on { color: var(--ok); font-weight: 600; } .ax-admin.part { color: var(--info); font-weight: 600; }
.ax-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 13px; } .ax-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; } .ax-dot.write { background: var(--ok); } .ax-dot.read { background: var(--info); } .ax-dot.none { background: var(--line-2); }
.ax-ref table { width: 100%; border-collapse: collapse; max-width: 820px; } .ax-ref th, .ax-ref td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); } .ax-ref th { color: var(--muted); font-weight: 600; font-size: 13px; }
.ax-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; } .ax-chip { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); } .ax-chip.read { background: var(--info-bg); color: var(--info); }
.ax-cell { display: inline-block; min-width: 42px; padding: 2px 8px; border-radius: 6px; font-size: 12px; background: var(--gray-bg); color: var(--muted); } .ax-cell.write { background: var(--ok-bg); color: var(--ok); font-weight: 600; } .ax-cell.read { background: var(--info-bg); color: var(--info); font-weight: 600; }
.ax-who { display: flex; align-items: center; gap: 10px; } .ax-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--font); color: #fff; flex: none; } .ax-who small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.ax-pill { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--gray-bg); color: var(--ink-2); font-weight: 600; white-space: nowrap; } .ax-pill.owner { background: var(--violet-bg); color: var(--violet); } .ax-pill.admin { background: var(--info-bg); color: var(--info); } .ax-pill.accounting { background: var(--warn-bg); color: var(--warn); } .ax-pill.field { background: var(--ok-bg); color: var(--ok); }
.ax-state.off { color: var(--muted); } .ax-state { font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; } .ax-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); } .ax-state.off::before { background: var(--line-2); }
.ax-prof { display: grid; gap: 14px; } .ax-prof .head { display: flex; align-items: center; gap: 14px; } .ax-prof .head .ax-av { width: 52px; height: 52px; font-size: 18px; }
.ax-acts { list-style: none; margin: 0; padding: 0; max-height: 200px; overflow: auto; } .ax-acts li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; } .ax-acts small { color: var(--muted); white-space: nowrap; }

/* view-only access */
.ro-banner { display: flex; gap: 10px; align-items: center; background: var(--info-bg); color: var(--info); border-radius: 10px; padding: 8px 14px; margin-bottom: 12px; font-size: 13.5px; } .ro-banner svg { width: 16px; height: 16px; }
.readonly .btn.new, .readonly .btn.edit, .readonly .btn.remove, .readonly .btn.add, .readonly [data-new] { display: none !important; }
.ax-matrix td:first-child { min-width: 200px; } .ax-matrix td small { max-width: none; } .ax-seg button { padding: 5px 8px; }

/* row actions */
.ra { display: inline-flex; gap: 4px; align-items: center; }
.ra-btn { width: 32px; height: 32px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; color: var(--accent-2); padding: 0; }
.ra-btn svg { width: 16px; height: 16px; } .ra-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.ra-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .ra-btn.primary:hover { background: var(--accent-2); }
.ra-btn.danger { color: var(--bad); } .ra-btn.danger:hover { border-color: var(--bad); background: var(--bad-bg); }
.lg-grid td.act { width: 1%; white-space: nowrap; }

/* ───── Settings (grouped navigation and cards) ───── */
.st-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; align-items: start; }
.st-side { position: sticky; top: 0; display: grid; gap: 10px; } .st-find { position: relative; } .st-find svg { position: absolute; left: 12px; top: 12px; width: 16px; height: 16px; color: var(--accent); } .st-find .lg-input { padding-left: 36px; }
.st-nav { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; display: grid; gap: 6px; }
.st-gh { padding: 8px 10px 4px; font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.st-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none !important; font-size: 14px; } .st-item svg { width: 17px; height: 17px; color: var(--accent); }
.st-item:hover { background: var(--surface-2); } .st-item.on { background: var(--accent-soft); color: var(--accent-2); font-weight: 650; }
.st-body { min-width: 0; } .st-page { max-width: 880px; } .st-page > h2 { font: 700 24px var(--font); margin: 0 0 2px; } .st-page > .lead { margin: 0 0 16px; color: var(--muted); }
.st-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 14px; } .st-card > header { padding: 14px 18px 0; } .st-card h3 { font-size: 15.5px; } .st-card header p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.st-card-body { padding: 12px 18px 16px; } .st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px 16px; } .st-field small { color: var(--muted); font-size: 12px; } .st-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.st-shell > *, .st-page, .st-card, .st-card-body, .st-grid > *, .cols > *, .form-grid > *, .et-shell > *, .pd-shell > * { min-width: 0; }
.lg-field { min-width: 0; max-width: 100%; }
.kv > * { min-width: 0; overflow-wrap: anywhere; }
.st-swatches, .st-pv { flex-wrap: wrap; }
.st-sub { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); } .st-rows { display: grid; gap: 8px; margin-bottom: 8px; } .st-row { display: flex; gap: 8px; align-items: center; } .st-row .lg-input { flex: 1; }
.st-colors { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; } .st-swatches { display: flex; gap: 8px; } .st-sw { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--control); cursor: pointer; } .st-sw.on { box-shadow: 0 0 0 3px var(--ink); }
.st-color { width: 44px; height: 38px; border: 1px solid var(--control); border-radius: 8px; padding: 2px; background: var(--surface); cursor: pointer; }
.st-contrast { margin: 10px 0 6px; font-size: 13.5px; } .st-contrast.ok { color: var(--ok); } .st-contrast.bad { color: var(--bad); }
.st-pv { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px dashed var(--control); border-radius: 10px; background: var(--surface-2); } .st-pv button { background: var(--a); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font: 600 14px var(--font); } .st-pv a { color: var(--a2); text-decoration: underline; } .st-pv span { background: var(--soft); color: var(--a2); padding: 6px 12px; border-radius: 8px; font-weight: 600; }
.st-kv { grid-template-columns: 200px 1fr; max-width: 640px; }
@media (max-width: 960px) { .st-shell { grid-template-columns: 1fr; } .st-side { position: static; } }
/* Use available workspace width, including application zoom and the main menu. */
@container workspace (max-width: 720px) {
  .st-shell { grid-template-columns: minmax(0, 1fr); }
  .st-side { position: static; }
  .st-nav { max-height: 240px; overflow: auto; }
}
@container workspace (max-width: 480px) {
  .st-page .kv { grid-template-columns: minmax(0, 1fr) !important; gap: 4px; }
  .st-page .kv dd { margin-bottom: 10px; }
}

/* remarks as lines */
.rm-ed { display: grid; gap: 6px; min-width: 0; } .rm-line { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; }
.rm-n { color: var(--muted); font-size: 12px; text-align: right; } .rm-line .cf-in { width: 100%; }
.rm-btn { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 1px solid var(--control); border-radius: 7px; background: var(--surface); color: var(--accent-2); cursor: pointer; padding: 0; } .rm-btn svg { width: 14px; height: 14px; } .rm-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); } .rm-btn:last-child { color: var(--bad); }
.rm-add { justify-self: start; display: inline-flex; gap: 6px; align-items: center; border: 1px dashed var(--control); background: none; color: var(--accent-2); border-radius: 8px; padding: 5px 12px; cursor: pointer; font-size: 13px; } .rm-add svg { width: 14px; height: 14px; } .rm-add:hover { border-color: var(--accent); background: var(--accent-soft); }
.rm-empty { color: var(--muted); font-size: 13px; padding: 4px 2px; }
.cf-sched select, .cf-sched .combo-btn { min-width: 0; max-width: 100%; }
.cf-two:has(.cf-sched) { grid-template-columns: minmax(0, 1fr) !important; row-gap: 8px; }
.cf-row { min-width: 0; } .cf-row .cf-sched { min-width: 0; width: 100%; } .cf-sched .combo-btn { flex: 1 1 0; width: auto; overflow: hidden; }
.cf-in[disabled], .cf-in:disabled { pointer-events: none; }

/* test status pills */
.tpill { display: inline-block; position: relative; overflow: hidden; padding: 3px 11px 5px; border-radius: 999px; font: 600 12.5px var(--font); white-space: nowrap; }
.tpill.warn { color: var(--warn); background: var(--warn-bg); } .tpill.warn::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p, 0%); background: var(--warn); }
.tpill.info { color: var(--info); background: var(--info-bg); } .tpill.lime { color: var(--lime); background: var(--lime-bg); }
.tpill.info::after, .tpill.lime::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p, 0%); background: currentColor; }
.tpill.ok { color: var(--ok); background: var(--ok-bg); } .tpill.violet { color: var(--violet); background: var(--violet-bg); } .tpill.gray { color: var(--ink-2); background: var(--gray-bg); }

/* field help */
.fh-btn { width: 17px; height: 17px; margin-left: 5px; border-radius: 50%; border: 1px solid var(--accent); background: var(--surface); color: var(--accent-2); font: italic 700 11px/1 Georgia, serif; cursor: pointer; padding: 0; vertical-align: middle; flex: none; } .fh-btn:hover { background: var(--accent); color: var(--accent-ink); }
.fh-pop { position: fixed; z-index: 2200; background: var(--surface); color: var(--ink); border: 1px solid var(--control); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px 14px; font-size: 13.5px; line-height: 1.45; max-height: 70vh; overflow: auto; }
.fh-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; } .fh-head b { font-size: 15px; } .fh-x { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); line-height: 1; }
.fh-sec small { display: block; margin-top: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: 11px; font-weight: 700; } .fh-sec p { margin: 2px 0 0; } .fh-basis { margin-left: 8px; text-transform: none; letter-spacing: 0; font-weight: 600; padding: 0 8px; border-radius: 999px; background: var(--info-bg); color: var(--info); }
.fh-basis.spec { background: var(--warn-bg); color: var(--warn); } .fh-basis.standard { background: var(--violet-bg); color: var(--violet); } .fh-basis.lab { background: var(--gray-bg); color: var(--ink-2); }
.fh-verify { margin: 10px 0 8px; padding: 6px 10px; background: var(--surface-2); border-radius: 8px; color: var(--muted); font-size: 12.5px; } .fh-acts { display: flex; gap: 8px; }
.cf-row > label, th { white-space: nowrap; }

/* ───── Fleet & equipment ───── */
.fl-date.bad { color: var(--bad); font-weight: 700; } .fl-date.warn { color: var(--warn); font-weight: 700; }
.fl-papers { display: flex; gap: 4px; flex-wrap: wrap; }
.fl-tag { font-size: 11.5px; padding: 2px 7px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); border: 1px solid transparent; }
.fl-tag.warn { background: var(--warn-bg); color: var(--warn); } .fl-tag.bad { background: var(--bad-bg); color: var(--bad); }
.fl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: 8px; background: var(--warn); } .fl-dot.bad { background: var(--bad); }
.fl-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.fl-hist li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.fl-hist .d { color: var(--muted); font-size: 13px; } .fl-hist small { display: block; color: var(--muted); }
.dash-pill.gray { background: var(--line); color: var(--muted); }
.fl-card .fl-line { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.dash-pill.bad { background: var(--bad-bg); color: var(--bad); } .dash-pill.info { background: var(--info-bg); color: var(--info); }
.fl-mini { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; } .fl-mini > div { flex: 1 1 90px; background: var(--bg, transparent); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.fl-mini b { display: block; font: 700 20px var(--font); } .fl-mini small { color: var(--muted); }
@media (min-width: 1100px) { .dash-card.dash-wide { grid-column: span 2; } }
.dash-wide .fl-mini > div { flex: 1 1 120px; }
.lg-sec a.dash-tile, .lg-sec a.dash-tile:hover { text-decoration: none; }

/* ───── Time sheets ───── */
.ts-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; max-width: 1180px; box-shadow: var(--shadow); }
.ts-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.ts-period { display: flex; align-items: center; gap: 8px; } .ts-period small { display: block; color: var(--muted); } .ts-period .flip svg { transform: rotate(180deg); }
.ts-sum { display: flex; align-items: center; gap: 12px; } .ts-big { font: 700 22px var(--font); font-variant-numeric: tabular-nums; }
.ts-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.ts-table { width: 100%; border-collapse: collapse; font-size: 14px; } .ts-table th { text-align: left; background: var(--surface-2, #f3f6fb); padding: 8px 10px; font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--line); }
.ts-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; } .ts-table .r { text-align: right; } .ts-table td.wide { min-width: 240px; } .ts-table td.act { white-space: nowrap; width: 80px; }
.ts-date small { display: block; color: var(--muted); font-size: 11.5px; margin-left: 4px; }
.ts-in { width: 100%; min-width: 0; height: 34px; padding: 0 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: inherit; font: inherit; }
.ts-in:hover { border-color: var(--line); } .ts-in:focus { border-color: var(--accent); background: var(--surface); outline: none; } .ts-in:disabled { color: inherit; opacity: .85; }
.ts-days { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 10px 0 4px; }
.ts-day { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 4px 10px; cursor: pointer; text-align: center; color: inherit; } .ts-day small { display: block; color: var(--muted); font-size: 11px; }
.ts-day:hover { border-color: var(--accent); } .ts-day.has { background: var(--ok-bg); } .ts-day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); } .ts-day.wk { opacity: .75; }
.ts-sub { font: 700 15px var(--font); margin: 16px 0 6px; } .ts-parts { display: grid; gap: 6px; max-width: 560px; } .ts-part { display: flex; gap: 8px; align-items: center; }
.ts-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ts-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ts-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; } .ts-head small { display: block; color: var(--muted); }
.ts-ro .fl-line { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.lg-note.bad { background: var(--bad-bg); color: var(--bad); } .lg-note.ok { background: var(--ok-bg); color: var(--ok); }
.ts-approve-page { max-width: 900px; margin: 0 auto; padding: 24px 16px; } .ts-approve-head { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 18px; }
.ts-approve { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 12px; }
.ts-prof { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); } .ts-prof .who { min-width: 200px; flex: 1; } .ts-prof .who small { display: block; }

/* ───── Polish: forms, toolbars, tabs ───── */
.form-grid.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid.cols2 .half { grid-column: auto; } .form-grid.cols2 .wide { grid-column: 1 / -1; }
.form-grid .form-sec { grid-column: 1 / -1; margin: 10px 0 -2px; padding-bottom: 4px; border-bottom: 1px solid var(--line); font: 700 12px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.form-grid .form-sec:first-child { margin-top: 0; }
.form-grid .field .input, .form-grid .field select, .form-grid .field textarea { width: 100%; box-sizing: border-box; }
.dialog .dc, .dialog .db { overflow: auto; }
@media (max-width: 640px) { .form-grid.cols2 { grid-template-columns: 1fr; } }
.st-grid > .lg-field .lg-input, .st-grid > .lg-field input, .st-grid > .lg-field select { width: 100% !important; max-width: none; box-sizing: border-box; }
.st-grid > .lg-field { max-width: none; width: auto !important; }
.lg-tabs { flex-wrap: wrap; row-gap: 2px; }
.ts-parts .btn { justify-self: start; }
.ts-in { border-color: var(--line); }
.lg-row > .btn, .lg-row > .lg-addfil { flex: none; }
.lg-foot { padding: 8px 4px; }

/* ───── Company profile ───── */
.co-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; padding: 4px 2px 12px; }
.co-proj { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.co-who { display: flex; gap: 18px; flex-wrap: wrap; } .co-p { display: flex; flex-direction: column; font-size: 13.5px; min-width: 150px; } .co-p small { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }

/* ───── Toolbar alignment ───── */
.lg-row > .lg-field, .lg-row > .field { margin-bottom: 0; }
.lg-filters + .lg-row, .lg-panel > .lg-row + .lg-row, .lg-panel > .lg-filters ~ .lg-row { margin-top: 12px; }
.lg-row .lg-input, .lg-row select.lg-input { height: 40px; }
.ts-in[type=number] { -moz-appearance: textfield; appearance: textfield; } .ts-in[type=number]::-webkit-outer-spin-button, .ts-in[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.menu-btn, .nav-scrim { display: none; }

/* ───── Phones and tablets ───── */
@media (max-width: 1024px) {
  .content { padding: 16px 16px 32px; }
  .dash-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .lg-panel .lg-row .lg-field.grow { min-width: 180px; }
}
@media (max-width: 760px) {
  #app.shell, #app.shell.collapsed { grid-template-columns: 1fr; }
  .menu-btn { display: inline-flex; flex: none; }
  .nav { position: fixed; z-index: 80; inset: 0 auto 0 0; width: min(290px, 86vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  #app.nav-open .nav { transform: none; }
  #app.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(15, 23, 42, .5); }
  .nav .label, .nav .nav-h { display: initial !important; } .nav .brand img { display: block; }
  .nav .account .who, .nav .account .role { display: block; }
  .titlebar { padding: 8px 12px; gap: 10px; } .titlebar h1 { font-size: 18px; } .conn span { display: none; }
  .content { padding: 12px 10px 28px; }
  /* toolbars: every field and button gets a full, easy-to-tap row */
  .lg-row { gap: 8px; } .lg-row > .lg-field, .lg-row > .lg-field.grow { width: 100% !important; max-width: none; flex: 1 1 100%; }
  .lg-row > .btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .lg-filters > * { flex: 1 1 100%; } .lg-filters > .lg-addfil { flex: 1 1 calc(50% - 10px); } .lg-filters .lg-field { width: 100% !important; }
  .lg-panel { padding: 10px; }
  .lg-tabs { overflow-x: auto; flex-wrap: nowrap; } .lg-tabs button { flex: none; }
  .lg-sec { padding: 12px 8px 18px; } .lg-tabpage { margin: 0 -2px; }
  /* tables scroll sideways instead of squeezing */
  .lg-grid, .ts-scroll, .lg-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* dialogs and drawers fill the screen */
  .dialog { width: calc(100vw - 16px) !important; max-width: none; max-height: 92dvh; border-radius: 14px; }
  .dialog.wide, .dialog.cf-dialog, .dialog.se-dialog, .dialog.rp-dialog { width: 100vw !important; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .drawer { width: 100vw !important; }
  .form-grid, .form-grid.cols2 { grid-template-columns: 1fr; } .form-grid .half { grid-column: auto; }
  .df { flex-wrap: wrap; } .df .btn { flex: 1 1 auto; }
  /* settings, help and designers become a single column */
  .st-shell, .help-layout, .help-layout.kb, .pd-shell, .et-shell { grid-template-columns: 1fr !important; } .st-side { position: static; }
  .st-grid { grid-template-columns: 1fr !important; }
  .login .panel { padding: 22px 18px; }
  /* the time sheet: each day becomes a card */
  .ts-edit thead { display: none; } .ts-edit, .ts-edit tbody, .ts-edit tr, .ts-edit td { display: block; width: 100%; }
  .ts-edit tr { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; padding: 6px; } .ts-edit td { border: 0; padding: 2px 0; } .ts-edit td.act { text-align: right; width: auto; }
  .ts-edit td::before { content: attr(data-l); display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 4px 0 0 6px; }
  .ts-edit .ts-in { border-color: var(--line); } .ts-edit td input[data-f=hours] { width: 100% !important; text-align: left !important; }
  .ts-top { flex-direction: column; align-items: stretch; } .ts-period { justify-content: space-between; } .ts-actions .btn { flex: 1 1 auto; }
  .ts-day { padding: 6px 8px; }
  .dash-grid { grid-template-columns: 1fr; } .dash-card.dash-wide { grid-column: auto; }
  .co-head { flex-direction: column; } .co-who { gap: 10px; }
  .fl-hist li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 420px) { .lg-row > .btn { flex: 1 1 calc(50% - 8px); padding: 0 8px; } .lg-filters > .lg-addfil { flex: 1 1 calc(50% - 10px); } .dash-tiles { grid-template-columns: 1fr 1fr; } .dash-tile { padding: 10px; gap: 8px; } .dash-tile .val { font-size: 20px; } }
@media (pointer: coarse) { .ra-btn, .btn.sm { min-height: 36px; min-width: 36px; } .lg-grid tr { min-height: 44px; } }

@media (max-width: 760px) {
  .ts-period { flex-wrap: wrap; } .ts-period > div { order: -1; flex: 1 1 100%; } .ts-period .btn { flex: 1 1 auto; }
  .dash-hero { display: block; } .dash-hero .dash-controls { margin-top: 10px; } .dash-controls .lg-input { width: 100%; flex: 1 1 100%; } .dash-controls .btn { flex: 1 1 calc(50% - 8px); }
  .dash-hero h2 { font-size: 22px; }
}

/* ───── Test forms on phones: label above the field, big touch targets ───── */
@media (max-width: 760px) {
  .cf-dialog .db { padding: 6px; }
  .cf-top, .cf-top.c2, .cf-top.c3, .cf-mid, .cf-two { grid-template-columns: minmax(0, 1fr) !important; }
  .cf-row, .cf-two > .cf-row, .cf-bottom .cf-row, .cf-strip .cf-row { grid-template-columns: minmax(0, 1fr) !important; gap: 2px; align-items: stretch; }
  .cf-row > label, .cf-bottom .cf-row > label, .cf-strip .cf-row > label { text-align: left !important; font-size: 13px; color: var(--muted); }
  .cf-hint { padding-left: 0; }
  .cf-in { height: 38px; font-size: 16px; } .cf-area { height: 84px; }
  .cf-pair { flex-wrap: wrap; } .cf-pair .cf-in:first-child, .cf-pair .cf-in { flex: 1 1 120px !important; width: 100%; } .cf-pair select.cf-in { flex: 1 1 140px !important; }
  .cf-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf-grid { max-height: none !important; overflow-x: auto; } .cf-tabpage { overflow-x: auto; }
  .cf-foot { flex-wrap: wrap; } .cf-foot .btn { flex: 1 1 calc(50% - 8px); } .cf-foot .grow { display: none; }
  .cf-bar .btn { flex: 1 1 auto; }
  .lg-input, .input, select.input, textarea.input { font-size: 16px; } /* stops phones zooming in on focus */
}
@media (max-width: 760px) {
  .cf-top > *, .cf-mid > *, .cf-two > *, .cf-panel, .cf-panel > *, .cf-row > * { min-width: 0; max-width: 100%; }
  .cf-dialog .cf { overflow-x: hidden; } .cf-pair .cf-in { min-width: 0; }
  .cf-grid, .cf-tabpage { max-width: 100%; }
}
@media (max-width: 760px) { .cf, .cf-dialog .cf { grid-template-columns: minmax(0, 1fr) !important; } }
@media (max-width: 760px) { .help-layout, .help-layout.kb { grid-template-columns: minmax(0, 1fr) !important; } .help-layout > * { min-width: 0; } .content img, .content table { max-width: 100%; } }
@media (max-width: 760px) {
  .titlebar .ttl { flex: 1; min-width: 0; } .titlebar .ttl h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .titlebar .tools { flex: none; }
  .dash-tile { min-width: 0; } .dash-tile > div:last-child { min-width: 0; } .dash-tile .val { font-size: 19px; overflow-wrap: anywhere; }
  .dash-bar { grid-template-columns: 52px minmax(0, 1fr) !important; } .dash-bar > b { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 760px) { .dash-tile .val { font-size: 17px; overflow-wrap: normal; white-space: nowrap; } }

/* ───── Schedule calendar and board ───── */
.cal { margin: 10px 0; } .cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cal-nav { display: flex; align-items: center; gap: 6px; } .cal-nav svg.flip { transform: rotate(180deg); } .cal-title { font: 700 18px var(--font); margin-left: 8px; }
.cal-modes { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--surface); }
.cal-mode { border: 0; background: none; padding: 8px 14px; cursor: pointer; color: inherit; font: inherit; border-right: 1px solid var(--line); } .cal-mode:last-child { border-right: 0; } .cal-mode.on { background: var(--accent); color: #fff; }
.cal-legend { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; font-size: 13px; } .cal-key { display: inline-flex; align-items: center; gap: 6px; } .cal-key i { width: 11px; height: 11px; border-radius: 3px; background: hsl(var(--h) 60% 45%); }
.cal-ev { --h: 210; display: flex; align-items: baseline; gap: 6px; width: 100%; text-align: left; border: 1px solid hsl(var(--h) 45% 78%); border-left: 4px solid hsl(var(--h) 60% 42%); background: hsl(var(--h) 70% 96%); color: #0f172a; border-radius: 7px; padding: 4px 7px; margin: 0 0 4px; cursor: pointer; font: 13px var(--font); overflow: hidden; min-width: 0; }
[data-theme="dark"] .cal-ev { background: hsl(var(--h) 30% 22%); border-color: hsl(var(--h) 30% 38%); color: #e5e7eb; }
.cal-ev:hover { box-shadow: 0 1px 6px rgba(0,0,0,.18); } .cal-ev .t { color: #475569; font-variant-numeric: tabular-nums; flex: none; } [data-theme="dark"] .cal-ev .t { color: #cbd5e1; } .cal-ev .p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; min-width: 0; } [data-theme="dark"] .cal-ev .p { color: #cbd5e1; }
.cal-ev .tk { font-style: normal; font-size: 11px; background: rgba(15,118,110,.15); border-radius: 999px; padding: 0 6px; margin-left: auto; flex: none; }
.cal-ev.cancelled, .cal-ev.rescheduled { opacity: .5; text-decoration: line-through; } .cal-ev.completed { border-left-color: var(--ok); } .cal-ev.drag { opacity: .4; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; } .cal-col { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 260px; padding: 6px; } .cal-col.today, .cal-cell.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); } .cal-col.wk { background: var(--surface-2); }
.cal-ch { display: flex; align-items: center; gap: 6px; padding: 2px 4px 6px; border-bottom: 1px solid var(--line); margin-bottom: 6px; } .cal-ch span { font: 700 18px var(--font); } .cal-ch b { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.cal-add { margin-left: auto; border: 1px dashed var(--line-2); background: none; width: 26px; height: 26px; border-radius: 7px; cursor: pointer; color: var(--accent-2); display: grid; place-items: center; } .cal-add svg { width: 14px; height: 14px; } .cal-add:hover { border-style: solid; background: var(--accent-soft); }
.over { outline: 2px dashed var(--accent); outline-offset: -3px; background: var(--accent-soft) !important; }
.cal-mh { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; font-size: 12px; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0 4px 4px; } .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-height: 112px; padding: 4px; cursor: pointer; overflow: hidden; } .cal-cell.out { opacity: .55; } .cal-cn { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 3px; padding: 0 2px; }
.cal-count { display: none; font-style: normal; font-size: 11px; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; } .cal-more { color: var(--accent-2); font-weight: 600; }
.cal-day { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; align-items: start; } .cal-lane { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.cal-lh { display: flex; justify-content: space-between; align-items: baseline; border-left: 5px solid hsl(var(--h, 210) 60% 42%); padding: 2px 8px; margin-bottom: 8px; } .cal-lh small { color: var(--muted); }
.cal-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; } .cal-bcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 280px; }
.cal-bh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 4px 6px 8px; } .cal-bh em { font-style: normal; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; } .cal-bh small { flex: 1 1 100%; color: var(--muted); }
.cal-bcol.scheduled .cal-bh b { color: var(--warn); } .cal-bcol.dispatched .cal-bh b { color: var(--info); } .cal-bcol.completed .cal-bh b { color: var(--ok); }
@media (max-width: 900px) { .cal-week { grid-template-columns: minmax(0, 1fr); } .cal-col { min-height: 0; } .cal-board { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .cal-cell { min-height: 64px; } .cal-cell .cal-ev, .cal-cell .cal-more { display: none; } .cal-count { display: inline-block; } .cal-title { font-size: 15px; } .cal-modes { width: 100%; } .cal-mode { flex: 1; padding: 8px 4px; } }
.mn-row { display: flex; align-items: center; gap: 6px; padding: 5px 4px; border-bottom: 1px solid var(--line); } .mn-row svg { width: 18px; height: 18px; } .mn-row .ra-btn svg.up { transform: rotate(-90deg); } .mn-row .ra-btn svg.down { transform: rotate(90deg); } .mn-row .ra-btn:disabled { opacity: .35; }
.nav .account .btn { height: 34px; }
.co-meta { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 13.5px; }

/* ───── Information blurbs stand out in blue so people notice them ───── */
.lead, .lg-note:not(.bad):not(.ok):not(.warn), .st-note, .st-card > header p, .dialog p.muted, .dialog .lg-intro p, .help-lead {
  display: block; min-width: 0; max-width: 100%; overflow-wrap: anywhere; background: var(--info-bg); color: var(--info); border: 1px solid color-mix(in srgb, var(--info) 28%, transparent); border-left: 4px solid var(--info); border-radius: 8px; padding: 9px 14px; font-size: 14.5px; line-height: 1.45;
}
.lg-sec .lead, .st-page > .lead { color: var(--info); max-width: 880px; }
.lg-note:not(.bad):not(.ok) a, .lead a, .st-note a, .st-card > header p a { color: inherit; text-decoration: underline; font-weight: 600; }
.lg-note:not(.bad):not(.ok) b, .lead b { color: inherit; }
.st-card > header p { margin: 6px 0 0; }
.hint { color: var(--info); font-weight: 500; }
.dash-card footer { color: var(--muted); }
.cal-ev { flex-wrap: wrap; row-gap: 0; align-items: baseline; } .cal-ev .p { flex: 1 1 100%; font-size: 12px; } .cal-ev b { white-space: nowrap; }
.cal-key i { display: inline-block; }

/* ───── Dashboard fleet card, sign-in page contrast, brand mark ───── */
.fl-mini { padding: 12px 14px 0; margin: 0 0 10px; } .fl-mini > div { min-width: 0; }
.dash-wide .dash-body > div > .dash-list { padding: 0 14px; } .dash-wide .dash-empty { padding: 16px; }
.brand-mark { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); flex: none; } .brand-mark.sm { width: 34px; height: 34px; }
.login .hero .brand { display: flex; align-items: center; gap: 14px; } .hero-name { font: 700 20px var(--font); color: #fff; }
.brand-fallback { display: flex; align-items: center; gap: 10px; } .brand-fallback .name { font-weight: 700; color: var(--nav-ink); }
.login .hero { background: linear-gradient(160deg, #0b2a6b, #1646c2 70%, #1d4ed8); }
.login .hero h1 { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.login .hero p { color: #e6efff; font-size: 16px; line-height: 1.5; }
.login .hero ul, .login .hero li { color: #fff; font-size: 15.5px; } .login .hero li svg { color: #fff; }
.login .panel .powered, .login .panel .powered small { color: var(--ink-2); } .login .panel .muted, .login .panel .hint { color: var(--ink-2); }
.login .panel label { color: var(--ink); font-weight: 600; } .login .panel .input { border-color: var(--line-2); }

/* ───── Brand typography (Poppins, SIL Open Font License; files in /fonts) and the sign-in lockup ───── */
@font-face { font-family: 'Poppins'; src: url('../fonts/Poppins-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../fonts/Poppins-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
.login .hero h1, .hero-name { font-family: 'Poppins', var(--font); }
.login .hero h1 { font-size: 34px; line-height: 1.18; letter-spacing: -.01em; max-width: 16ch; }
.login .hero img.hero-lockup { width: auto; height: 100px; max-width: 100%; padding: 0; background: none; border-radius: 0; filter: drop-shadow(0 3px 12px rgba(0, 0, 0, .35)); align-self: flex-start; }
.login .hero img.brand-mark { width: 56px; height: 56px; padding: 0; background: none; border-radius: 13px; }

/* ───── Company profile layout ───── */
#co-body, .co-head { max-width: 1280px; }
.co-tiles { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); } .co-tiles .dash-tile { min-width: 0; } .co-tiles .dash-tile .val { font-size: 22px; white-space: nowrap; } .co-tiles .dash-tile > div:last-child { min-width: 0; }
.co-bars { padding: 4px 0; max-width: 860px; } .co-bars .dash-bar { grid-template-columns: 56px minmax(0, 1fr) minmax(190px, auto); } .co-bars .dash-bar b { text-align: right; white-space: nowrap; font-weight: 600; }
.co-proj { display: grid !important; grid-template-columns: minmax(220px, 2fr) minmax(190px, 1.2fr) minmax(190px, 1.2fr) auto; gap: 8px 18px; align-items: start; padding: 12px 4px; }
.co-proj .co-who { display: contents; } .co-proj .co-p { min-width: 0; overflow-wrap: anywhere; } .co-proj .btn { justify-self: end; white-space: nowrap; }
@media (max-width: 1100px) { .co-proj { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .co-proj > div:first-child { grid-column: 1 / -1; } .co-proj .btn { grid-column: 1 / -1; justify-self: start; } }
@media (max-width: 640px) { .co-proj { grid-template-columns: minmax(0, 1fr); } .co-bars .dash-bar { grid-template-columns: 48px minmax(0, 1fr) !important; } .co-bars .dash-bar b { grid-column: 1 / -1; text-align: left; } .co-tiles { grid-template-columns: 1fr 1fr; } .co-tiles .dash-tile .val { font-size: 17px; } }

/* ───── One status pill for the whole system (colours come from js/status.js) ───── */
.pill, .chip, .dash-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; vertical-align: middle; border: 1px solid transparent; background: var(--gray-bg); color: var(--ink-2); }
.pill.gray, .chip.gray, .dash-pill.gray { background: var(--gray-bg); color: var(--ink-2); border-color: var(--line); }
.pill.ok, .chip.ok, .dash-pill.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.pill.warn, .chip.warn, .dash-pill.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.pill.bad, .chip.bad, .dash-pill.bad { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.pill.info, .chip.info, .dash-pill.info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.pill.violet, .chip.violet, .dash-pill.violet { background: var(--violet-bg); color: var(--violet); border-color: color-mix(in srgb, var(--violet) 25%, transparent); }
.pill.lime, .chip.lime { background: var(--lime-bg); color: var(--lime); border-color: color-mix(in srgb, var(--lime) 25%, transparent); }
.lg-grid td .pill { margin: 0; }
.dash-tile .chip { height: 40px; padding: 0; border-radius: 11px; }
/* the schedule job strip and board follow the same colours */
.se-info { border-left: 6px solid var(--line-2); } .se-info.tone-info { border-left-color: var(--info); background: var(--info-bg); } .se-info.tone-warn { border-left-color: var(--warn); background: var(--warn-bg); } .se-info.tone-ok { border-left-color: var(--ok); background: var(--ok-bg); } .se-info.tone-violet { border-left-color: var(--violet); background: var(--violet-bg); } .se-info.tone-gray { border-left-color: var(--muted); }
.se-info span { color: var(--ink-2); } .se-info > div { display: flex; align-items: center; gap: 6px; }
.cal-bcol.scheduled .cal-bh b { color: var(--info); } .cal-bcol.dispatched .cal-bh b { color: var(--warn); } .cal-bcol.completed .cal-bh b { color: var(--ok); }
.cal-bcol.scheduled { border-top: 4px solid var(--info); } .cal-bcol.dispatched { border-top: 4px solid var(--warn); } .cal-bcol.completed { border-top: 4px solid var(--ok); }
.cal-bcol.scheduled .cal-bh em { background: var(--info); } .cal-bcol.dispatched .cal-bh em { background: var(--warn); } .cal-bcol.completed .cal-bh em { background: var(--ok); }
/* tables fill the window; the sticky Actions column stays at the window's edge */
#co-body, .co-head { max-width: none; }
.lg-sec, .lg-tabpage { min-width: 0; } .lg-grid { width: 100%; } .lg-grid table { width: 100%; }
.se-panel { --h: 210; border-top: 4px solid hsl(var(--h) 55% 45%); background: linear-gradient(hsl(var(--h) 80% 97%), transparent 70px); } .se-panel h4 { color: hsl(var(--h) 55% 30%); font-weight: 700; }
[data-theme="dark"] .se-panel { background: linear-gradient(hsl(var(--h) 35% 18%), transparent 70px); } [data-theme="dark"] .se-panel h4 { color: hsl(var(--h) 70% 75%); }
.se-panel.off { background: none; border-top-color: var(--line); } .se-panel.off h4 { color: var(--muted); }

/* Tables: the page decides the height (js/layout.js); these are only the floors */
.lg-grid { min-height: 0; } .lg-grid > table { min-width: 100%; }
.lg-grid::-webkit-scrollbar { height: 12px; width: 12px; }

/* Tablets in portrait: the menu slides out too, so the page gets the full width */
@media (max-width: 900px) {
  #app.shell, #app.shell.collapsed { grid-template-columns: 1fr; }
  .menu-btn { display: inline-flex; flex: none; }
  .nav { position: fixed; z-index: 80; inset: 0 auto 0 0; width: min(290px, 86vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  #app.nav-open .nav { transform: none; }
  #app.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(15, 23, 42, .5); }
  .nav .label, .nav .nav-h { display: initial !important; } .nav .brand img { display: block; }
  .nav .account .who, .nav .account .role { display: block; }
}

/* ───── Time sheet: expenses with receipts, due date and payday ───── */
.ts-due { display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; margin: 4px 0 10px; font-size: 14px; }
.ts-exps { display: grid; gap: 10px; max-width: 980px; }
.ts-exp { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); display: grid; gap: 8px; }
.ts-exp.needs { border-color: var(--warn); background: var(--warn-bg); }
.ts-exp-main { display: grid; grid-template-columns: minmax(180px, 2fr) 110px minmax(150px, 1fr) 150px minmax(140px, 1fr); gap: 8px 10px; align-items: end; }
.ts-f { display: grid; gap: 2px; min-width: 0; } .ts-f small { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; } .ts-f .ts-in { border-color: var(--line-2); background: var(--surface); }
.ts-exp-rc { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .ts-exp-rc .ra-btn { margin-left: auto; }
.ts-exp-total { font-size: 15px; padding: 4px 2px; } .ts-exp-total b { font: 700 18px var(--font); margin-left: 6px; }
.ts-cam { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }
@media (max-width: 1100px) { .ts-exp-main { grid-template-columns: 1fr 1fr; } .ts-exp-main .ts-f:first-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .ts-exp-main { grid-template-columns: 1fr; } .ts-exp-rc .btn { flex: 1 1 auto; justify-content: center; } .ts-cam { min-height: 44px; font-size: 15px; } }
.pd-table td input { height: 32px; } .pd-over { background: var(--warn-bg); }

/* ───── Guided tour ───── */
.tour-hole { position: fixed; z-index: 9000; display: none; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(15, 23, 42, .62), 0 0 0 3px var(--accent), 0 0 18px 4px rgba(255, 255, 255, .25); pointer-events: none; transition: top .2s, left .2s, width .2s, height .2s; }
.tour-pop { position: fixed; z-index: 9001; width: min(380px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 14px 16px 12px; }
.tour-pop p { margin: 6px 0 8px; line-height: 1.5; font-size: 14.5px; }
.tour-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; } .tour-head b { font: 700 16px var(--font); color: var(--accent-2); }
.tour-x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.tour-try { background: var(--info-bg); color: var(--info); border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-dots { display: flex; gap: 5px; } .tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); } .tour-dots i.done { background: var(--accent); opacity: .5; } .tour-dots i.on { background: var(--accent); transform: scale(1.35); }
.tour-btns { display: flex; gap: 6px; }
.ts-tourbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.ts-jobs { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; background: var(--info-bg); border: 1px solid color-mix(in srgb, var(--info) 28%, transparent); border-left: 4px solid var(--info); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; color: var(--info); }
.ts-jobs b { color: inherit; } .ts-jobs small { color: inherit; opacity: .85; } .ts-jobs .grow { flex: 1; min-width: 200px; } .ts-jobs select { max-width: 100%; }
.ts-job { color: var(--info) !important; font-weight: 600; }
