/* Technik — one stylesheet, no build step.
   Classic dealer-software look: white header with a horizontal menu,
   a grey title band, a left sub-menu, navy panel headings and compact
   tables. Tokens first; everything else uses them.
   Technik's colours (the logo's): navy #1B1F4B and blue #1A6FD0; its
   round font Nunito ("Technik Sans", assets/fonts). */

/* Nunito (SIL Open Font License, assets/fonts): the same round letters
   on every computer, tablet and phone. */
@font-face { font-family: "Technik Sans"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url(fonts/nunito-latin-wght-normal.woff2) format("woff2-variations"), url(fonts/nunito-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Technik Sans"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url(fonts/nunito-latin-ext-wght-normal.woff2) format("woff2-variations"), url(fonts/nunito-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* The classic look: grey page, white panels with square corners, flat
     navy panel headings, blue for what you click. */
  --bg: #eff0f4;
  --surface: #ffffff;
  --surface-2: #f5f6f9;
  --stripe: #f9fafc;
  --hover: #f3f6fc;
  --btn-hover: #f1f2f6;
  --line: #e6e8ee;
  --text: #33354f;
  --text-strong: #1b1f4b;
  --muted: #74768f;
  --border: #dcdce6;
  --border-strong: #c4c5d4;
  --input-border: #c8c9d6;
  --blue: #1a6fd0;          /* what you click and what is chosen: the logo's blue */
  --blue-dark: #155db0;
  --blue-line: #a9c6ef;     /* hover and selection borders */
  --focus: #5c9de8;
  --subnav-active: #e9edf5;
  --link: #1a6fd0;
  --blue-soft: #eaf1fb;
  --cyan: #5c9de8;
  --head: #1b1f4b;          /* panel headings: the logo's navy */
  --primary: #1a6fd0;
  --primary-hover: #155db0;
  --primary-soft: #eaf1fb;
  --primary-ink: #ffffff;
  --accent: #155db0;
  --accent-soft: #fdf3e1;
  --danger: #c9302c;
  --danger-soft: #fbeaea;
  --warning: #b56b00;
  --warning-soft: #fdf3e1;
  --success: #3c8b3c;
  --success-soft: #eaf5ea;
  --info: #1a6fd0;
  --info-soft: #eaf1fb;
  --side: #1b1f4b;          /* sign-in page panel */
  --shadow: 0 6px 18px rgba(0, 0, 0, .12);
  --radius: 3px;
  --radius-sm: 3px;
  --font: "Technik Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* Repair status colours (Technik): strip on the left of a row or card. */
  --st-planned: #e5484d; --st-in_progress: #1a6fd0; --st-waiting_parts: #f76b15;
  --chart: #1a6fd0;
  --st-ready: #30a46c; --st-partial: #0aa2c0; --st-collected: #8b95a7; --st-cancelled: #8b95a7; --st-warranty: #e2a336;
  color-scheme: light;
}

/* Dark mode, only when chosen in the menu: "Dark", or "Automatic" (follows the system). */
@media (prefers-color-scheme: dark) { :root[data-theme="system"] {
  --bg: #0e1030; --surface: #15183f; --surface-2: #1b1f4b; --stripe: #181b44; --hover: #1f2352; --line: #1d2150;
  --text: #d9daf0; --text-strong: #f4f4fd; --muted: #9295bd; --border: #262a5c; --border-strong: #383d7c; --input-border: #383d7c;
  --link: #5c9de8; --blue: #1a6fd0; --blue-dark: #155db0; --head: #262a5c; --blue-soft: #16294f; --btn-hover: #1f2352; --subnav-active: #1f2352; --blue-line: #2b4f80; --primary: #1a6fd0; --primary-hover: #2a7fe0; --primary-soft: #16294f; --info: #5c9de8; --info-soft: #16294f;
  --danger: #ff8a8a; --danger-soft: #3a1820; --warning: #ffb547; --warning-soft: #3a2a12; --success: #6fd38b; --success-soft: #12301f;
  --accent-soft: #3a2a12; --shadow: 0 8px 24px rgba(0, 0, 0, .45);
  --st-waiting_parts: #e8590c; --chart: #1a6fd0;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0e1030; --surface: #15183f; --surface-2: #1b1f4b; --stripe: #181b44; --hover: #1f2352; --line: #1d2150;
  --text: #d9daf0; --text-strong: #f4f4fd; --muted: #9295bd; --border: #262a5c; --border-strong: #383d7c; --input-border: #383d7c;
  --link: #5c9de8; --blue: #1a6fd0; --blue-dark: #155db0; --head: #262a5c; --blue-soft: #16294f; --btn-hover: #1f2352; --subnav-active: #1f2352; --blue-line: #2b4f80; --primary: #1a6fd0; --primary-hover: #2a7fe0; --primary-soft: #16294f; --info: #5c9de8; --info-soft: #16294f;
  --danger: #ff8a8a; --danger-soft: #3a1820; --warning: #ffb547; --warning-soft: #3a2a12; --success: #6fd38b; --success-soft: #12301f;
  --accent-soft: #3a2a12; --shadow: 0 8px 24px rgba(0, 0, 0, .45);
  --st-waiting_parts: #e8590c; --chart: #1a6fd0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 13px/1.45 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 400; }
h1 { font-size: 21px; color: var(--text-strong); }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 700; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
code, .mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden, [hidden] { display: none !important; }
svg.icon { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---------- Header ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.topbar-row { display: flex; align-items: stretch; gap: 18px; max-width: 1320px; margin: 0 auto; padding: 0 16px; }
.brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 4px; color: var(--muted); text-decoration: none !important; }
.brand .brand-mark { width: 28px; height: 28px; }
.brand-logo { height: 22px; width: auto; display: block; }
.wordmark { font-size: 17px; letter-spacing: .3px; color: var(--muted); }
.wordmark span { color: var(--blue); }
.topbar-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar-tools { display: flex; align-items: center; gap: 6px; padding-top: 8px; }
.tool { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; color: var(--text); border-radius: var(--radius); background: none; border: 0; cursor: pointer; }
.tool:hover { background: var(--surface-2); text-decoration: none; }
.tool svg.icon { width: 22px; height: 22px; }
.tool-count { position: absolute; top: -4px; right: -5px; --b: 18px; background: #d9342f; color: #fff; box-shadow: 0 0 0 2px var(--tool-ring, var(--surface)); }
.search { position: relative; width: 100%; max-width: 270px; margin-left: 6px; }
.search input { padding: 7px 10px 7px 34px !important; border-radius: 4px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text); width: 18px; height: 18px; }
.topbar-tools .spacer { flex: 1; }
.lock { display: flex; align-items: center; gap: 6px; margin: 0; }
.lock button { background: none; border: 0; cursor: pointer; color: var(--text); padding: 2px; }
.lock button svg.icon { width: 24px; height: 24px; }
.lock-text { font-size: 10px; line-height: 1.15; color: var(--muted); white-space: nowrap; }
.user-menu { position: relative; margin-left: 10px; }
.user-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--radius); color: var(--text); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--surface-2); }
.user-menu .brand-mark { width: 26px; height: 26px; }
.admin-menu .lock-icon { display: inline-flex; }
.admin-menu .lock-icon svg.icon { width: 22px; height: 22px; }
.user-menu .dropdown { position: absolute; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 220px; padding: 4px 0; z-index: 40; }
.dropdown-head { padding: 8px 14px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 7px 14px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--blue-soft); text-decoration: none; }
.menu-toggle { display: none; }

/* Horizontal menu with dropdowns */
.mainnav > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.mainnav > ul > li { position: relative; }
.mainnav > ul > li > a { display: flex; align-items: center; gap: 3px; padding: 9px 12px 11px; color: var(--text); font-size: 13.5px; border-bottom: 3px solid transparent; white-space: nowrap; }
.mainnav > ul > li > a svg.icon { width: 13px; height: 13px; stroke-width: 2.6; }
.mainnav > ul > li > a:hover { color: var(--link); text-decoration: none; }
.mainnav > ul > li.active > a { border-bottom-color: var(--blue); }
.mainnav li ul { display: none; position: absolute; left: 0; top: 100%; min-width: 210px; list-style: none; margin: 0; padding: 4px 0; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); z-index: 40; }
.mainnav li:hover > ul, .mainnav li:focus-within > ul { display: block; }
.mainnav li ul a { display: block; padding: 7px 14px; color: var(--text); white-space: nowrap; }
.mainnav li ul a:hover { background: var(--blue-soft); color: var(--link); text-decoration: none; }

/* ---------- Page frame ---------- */
.page { max-width: 1320px; margin: 10px auto 40px; padding: 0 16px; }
.page-band { background: var(--surface-2); border: 1px solid var(--border); border-bottom: 0; padding: 14px 18px; }
.page-band h1 { margin: 0; font-size: 19px; }
.page-body { background: var(--surface); border: 1px solid var(--border); padding: 18px; min-height: 60vh; }
.page-body.with-subnav { display: grid; grid-template-columns: 206px minmax(0, 1fr); gap: 22px; }
.subnav { display: flex; flex-direction: column; align-self: start; padding-top: 4px; }
.subnav a { padding: 5px 10px 5px 12px; color: var(--link); border-left: 3px solid transparent; font-size: 12.5px; }
.subnav a:hover { background: var(--surface-2); text-decoration: none; }
.subnav a.active { background: var(--subnav-active); border-left-color: var(--blue); }
.subnav .subnav-back { margin-top: 2px; }
.content { min-width: 0; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin-top: 3px; font-size: 12px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.intro { border: 1px solid var(--border); padding: 10px 12px; margin-bottom: 12px; max-width: 760px; font-size: 12px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--input-border); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; line-height: 1.35; }
.btn:hover { background: var(--btn-hover); text-decoration: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.btn-primary { background: var(--blue); border-color: var(--blue-dark); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-accent { background: #4a9a46; border-color: #3c8b3c; color: #fff; }
.btn-accent:hover { background: #3c8b3c; }
.btn-danger { color: var(--danger); border-color: #e3a4a2; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 3px 8px; font-size: 12px; }
.btn-lg { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn { max-width: 100%; }
.btn-block { white-space: normal; text-align: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }
.icon-btn { background: none; border: 0; padding: 1px; cursor: pointer; color: var(--link); display: inline-flex; }
.icon-btn:hover { color: var(--blue-dark); }

/* ---------- Panels ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 0; padding: 14px; margin-bottom: 16px; min-width: 0; }
.card > h2:first-child, .card > input[type=hidden] + h2, .card-head { margin: -14px -14px 12px; padding: 7px 12px; background: var(--head); color: #fff; font-size: 12.5px; font-weight: 700; }
.card > h2:first-child a, .card > input[type=hidden] + h2 a, .card-head a:not(.btn) { color: #fff; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 34px; }
.card-head h2 { margin: 0; font-size: 12.5px; font-weight: 700; color: #fff; }
.card-head .btn { padding: 2px 8px; font-size: 11.5px; }
.card-head .muted { color: #dce8f6; }
.card.flush { padding: 0; }
.card.flush .card-head { margin: 0; }
.card.flush > h2:first-child { margin: 0; }
.card h2:not(:first-child):not(input[type=hidden] + h2) { margin-top: 10px; font-size: 13px; }
.card-pad { padding: 10px 14px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--blue); padding: 10px 12px; color: var(--text); display: block; }
a.stat:hover { background: var(--stripe); text-decoration: none; }
.stat .label { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.stat .value { font-size: 22px; font-weight: 400; margin-top: 2px; font-variant-numeric: tabular-nums; color: var(--text-strong); }
.stat .hint { font-size: 11.5px; color: var(--muted); }
.stat.warn { border-top-color: #e0a030; }
.stat.warn .value { color: var(--warning); }
.stat.bad { border-top-color: var(--danger); }
.stat.bad .value { color: var(--danger); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 7px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-size: 12.5px; font-weight: 700; color: var(--text-strong); background: var(--surface-2); border-bottom-color: var(--border); }
.table tbody tr:hover { background: var(--hover); }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.table tfoot td { font-weight: 700; border-bottom: 0; }
.table .row-link { color: var(--text); }
.table .row-link:hover { color: var(--link); }
.table tr.muted td { color: var(--muted); }
.table tr.highlight td { background: rgba(230, 120, 27, .08); }
.table tr.highlight td:first-child { box-shadow: inset 4px 0 0 var(--orange, #e6781b); }
.card.flush .table th:first-child, .card.flush .table td:first-child { padding-left: 12px; }
.card.flush .table th:last-child, .card.flush .table td:last-child { padding-right: 12px; }
.table .thumb { width: 64px; padding-top: 4px; padding-bottom: 4px; }
.thumb img, .thumb .ph { width: 56px; height: 42px; object-fit: contain; display: block; background: var(--surface); }
.thumb .ph { display: grid; place-items: center; color: #c4c9cf; border: 1px solid var(--line); }
.table .sub-line { display: block; color: var(--muted); font-size: 11.5px; }
.table-count { font-size: 11.5px; color: var(--muted); margin: 0 0 6px; }

/* ---------- Labels / badges ---------- */
.badge { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 11px; font-weight: 700; background: var(--line); color: var(--muted); white-space: nowrap; line-height: 1.6; }
.badge.green { background: var(--success-soft); color: var(--success); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.orange { background: var(--warning-soft); color: var(--warning); }
.badge.blue { background: var(--blue-soft); color: var(--blue-dark); }
.badge.teal { background: #e3f1f1; color: #2a7a7a; }
.label-blue { display: inline-block; background: var(--blue); color: #fff; font-size: 9.5px; font-weight: 700; padding: 0 5px; border-radius: 2px; line-height: 15px; vertical-align: 1px; margin-left: 3px; }
.tag-ok, .tag-no { display: inline-flex; align-items: center; gap: 4px; border: 1px solid; border-radius: 3px; font-size: 11.5px; padding: 1px 7px; background: var(--surface); white-space: nowrap; cursor: default; font-family: inherit; }
.tag-ok { color: var(--success); border-color: #9fd09f; background: #f3faf3; }
.tag-no { color: var(--danger); border-color: #eab0ae; background: #fdf3f3; }
button.tag-ok, button.tag-no { cursor: pointer; }
.tag-ok svg.icon, .tag-no svg.icon { width: 12px; height: 12px; }
.prio { display: inline-grid; place-items: center; min-width: 20px; height: 16px; padding: 0 5px; border-radius: 8px; background: #8b8f94; color: #fff; font-size: 10px; font-weight: 700; }
.prio-arrows { display: inline-flex; gap: 0; vertical-align: middle; }
.prio-arrows button { background: none; border: 0; padding: 0 1px; color: var(--link); cursor: pointer; display: inline-flex; }
.prio-arrows button svg.icon { width: 15px; height: 15px; stroke-width: 2.6; }
.prio-arrows .spacer { display: inline-block; width: 17px; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 700; font-size: 12px; margin-bottom: 3px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=url], input[type=file], input:not([type]), select, textarea {
  width: 100%; padding: 5px 8px; border: 1px solid var(--input-border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; min-height: 30px;
}
input:focus, select:focus, textarea:focus { border-color: var(--focus); }
textarea { min-height: 70px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 15px; height: 15px; accent-color: var(--blue); vertical-align: middle; }
.check { display: flex; align-items: center; gap: 7px; font-weight: 400; font-size: 12.5px; }
.field { margin-bottom: 12px; min-width: 0; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 3px; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.filters .field { margin: 0; }
.filters input[type=search] { min-width: 240px; }
.input-money { text-align: right; font-variant-numeric: tabular-nums; }
.input-qty { width: 76px !important; text-align: right; }
.form-row { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 10px; padding: 8px 4px; }
.form-row label { margin: 0; font-weight: 400; }

/* ---------- Pickers (autocomplete) ---------- */
.picker { position: relative; }
.picker-results { position: absolute; left: 0; right: 0; top: calc(100% + 1px); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); list-style: none; margin: 0; padding: 3px; z-index: 40; max-height: 320px; overflow-y: auto; }
.picker-results li button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; font: inherit; color: var(--text); cursor: pointer; }
.picker-results li button:hover, .picker-results li button.active { background: var(--blue-soft); }
.picker-results .detail { display: block; font-size: 11.5px; color: var(--muted); }
.picker-results .empty-row { padding: 6px 8px; color: var(--muted); }
.picked { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid var(--blue-line); background: var(--blue-soft); border-radius: var(--radius); font-weight: 700; min-height: 30px; }
.picked button { margin-left: auto; padding: 0 4px; }
.card-head .picker input { min-height: 26px; padding: 3px 8px; color: var(--text); }

/* ---------- Messages ---------- */
.flash, .banner { padding: 9px 12px; margin-bottom: 12px; border: 1px solid transparent; display: flex; gap: 8px; align-items: flex-start; }
.flash-success { background: var(--success-soft); color: #2d6e2d; border-color: #c6e3c6; }
.flash-error { background: var(--danger-soft); color: #a52824; border-color: #efc4c2; }
.flash-info { background: var(--info-soft); color: var(--blue-dark); border-color: #c5d9f1; }
.banner { margin: 0; padding: 7px 16px; justify-content: center; }
.banner-warn { background: var(--warning-soft); color: var(--warning); border-bottom-color: #f0d9a8; }
.banner-bad { background: var(--danger-soft); color: var(--danger); border-bottom-color: #efc4c2; }
.empty { text-align: center; padding: 22px 10px; color: var(--muted); }

/* ---------- Key/value lists ---------- */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 5px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Tabs & pagination ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 0; flex-wrap: wrap; }
.tabs a { padding: 8px 13px; color: var(--link); border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; border-radius: 3px 3px 0 0; font-size: 12.5px; }
.tabs a:hover { background: var(--surface-2); text-decoration: none; }
.tabs a.active { color: var(--text); background: var(--surface); border-color: var(--border); }
.tabs + .filters, .tabs + .card, .tabs + form { margin-top: 12px; }
.tabs + .card.flush, .tabs-flush + .card.flush { margin-top: 0; border-top: 0; }
.pagination, .pager { display: flex; gap: 0; padding: 8px 0; flex-wrap: wrap; }
.pagination { justify-content: center; padding: 10px; gap: 6px; }
.pager a, .pager span { min-width: 27px; height: 24px; padding: 0 7px; display: inline-grid; place-items: center; border: 1px solid var(--border); margin-left: -1px; font-size: 11.5px; color: var(--link); background: var(--surface); }
.pager .current { background: var(--blue); border-color: var(--blue); color: #fff; }
.pager .disabled { color: #b8bcc1; }
.pager a:hover { background: var(--surface-2); text-decoration: none; }

/* ---------- Dashboard bits ---------- */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
.bars .bar span.col { width: 100%; max-width: 42px; background: var(--blue); min-height: 2px; }
.bars .bar small { font-size: 11px; color: var(--muted); }
.bars .bar b { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
progress { width: 100%; height: 7px; appearance: none; border: 0; background: var(--line); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--blue); }
progress::-moz-progress-bar { background: var(--blue); }
progress.over::-webkit-progress-value { background: var(--danger); }
progress.over::-moz-progress-bar { background: var(--danger); }
.job { display: flex; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--text); }
.job:last-child { border-bottom: 0; }
.job:hover { text-decoration: none; background: var(--hover); }
.job .what { flex: 1; min-width: 0; }
.job .what b { display: block; font-weight: 700; }
.job .what span { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quicklinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.quicklinks a { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); padding: 9px 10px; color: var(--text); background: var(--surface); }
.quicklinks a:hover { border-color: var(--blue-line); background: var(--blue-soft); text-decoration: none; }
.quicklinks svg.icon { color: var(--blue); width: 20px; height: 20px; }

/* ---------- Workshop planning ---------- */
.planning { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 8px; overflow-x: auto; }
.day { background: var(--surface); border: 1px solid var(--border); padding: 8px; min-height: 240px; display: flex; flex-direction: column; gap: 7px; }
.day.today { border-color: var(--blue); box-shadow: inset 0 3px 0 var(--blue); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; }
.day-head b { text-transform: capitalize; }
.wo-card { display: block; border: 1px solid var(--border); border-left: 4px solid var(--border-strong); padding: 6px 8px; background: var(--stripe); color: var(--text); font-size: 12px; }
.wo-card:hover { text-decoration: none; border-color: var(--blue-line); }
.wo-card .num { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.wo-card.s-planned { border-left-color: var(--blue); }
.wo-card.s-in_progress { border-left-color: #e0a030; }
.wo-card.s-waiting_parts { border-left-color: var(--danger); }
.wo-card.s-ready { border-left-color: var(--success); }
.wo-card.s-collected { opacity: .55; }
.day .add { margin-top: auto; text-align: center; font-size: 12px; padding: 3px; border: 1px dashed var(--border-strong); color: var(--muted); }

/* ---------- Rental grid ---------- */
.rent-grid { border-collapse: collapse; font-size: 11.5px; min-width: 100%; }
.rent-grid th, .rent-grid td { border: 1px solid var(--border); padding: 0; text-align: center; height: 30px; min-width: 36px; }
.rent-grid th { background: var(--surface-2); font-weight: 700; padding: 3px; }
.rent-grid th.bike { text-align: left; padding: 3px 8px; min-width: 180px; white-space: nowrap; }
.rent-grid td a { display: block; height: 100%; line-height: 30px; color: inherit; }
.rent-grid td.booked { background: var(--blue-soft); }
.rent-grid td.booked.out { background: #fdebc8; }
.rent-grid td.free a:hover { background: #eaf5ea; text-decoration: none; }
.rent-grid .weekend { background: var(--line); }
/* In for repairs: those days cannot be booked; a booking on them clashes. */
.rent-grid td.repair { background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--st-waiting_parts) 18%, transparent) 5px 7px); cursor: not-allowed; }
.rent-grid td.booked.clash { box-shadow: inset 0 0 0 2px var(--st-waiting_parts); }
.rent-grid tr.in-repair-row th.bike > a:first-child { color: var(--muted); }
.rent-grid th.bike .in-repair { margin-left: 6px; }
/* Item in the workshop: a short marker next to its status. */
.in-repair { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: 11.5px; font-weight: 700; color: var(--st-waiting_parts); white-space: nowrap; }
.in-repair .icon { width: 13px; height: 13px; }
h1 .in-repair { font-size: 13px; vertical-align: middle; }
a.in-repair:hover { text-decoration: underline; }
.needed-from { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; color: var(--muted); font-size: 12.5px; }
.needed-from .icon { width: 14px; height: 14px; }
/* Tabs per kind of item (stage technology): the count after the name; the statuses below as a light row. */
.kind-tabs .tab-n { margin-left: 2px; color: var(--muted); font-size: .85em; font-weight: 600; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 2px; }
.chips a { display: inline-flex; align-items: center; gap: 5px; padding: 3px 0; color: var(--muted); font-size: 12.5px; font-weight: 600; border-bottom: 2px solid transparent; }
.chips a .icon { width: 13px; height: 13px; }
.chips a:hover { color: var(--text-strong); text-decoration: none; }
.chips a.active { color: var(--link); border-bottom-color: var(--blue); }
.chips + .filters { margin-top: 10px; }
.send-in h2 .icon { width: 16px; height: 16px; vertical-align: -2px; }
.form-actions-inline { display: flex; flex-direction: column; justify-content: flex-end; }

/* ---------- Till ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 16px; align-items: start; }
.pos-search { position: relative; }
.pos-search input { font-size: 16px; padding: 10px 12px 10px 40px !important; min-height: 42px; }
.pos-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.pos-results { list-style: none; padding: 0; margin: 8px 0 0; }
.pos-results li button { width: 100%; display: flex; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 4px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.pos-results li button:hover { border-color: var(--blue-line); background: var(--blue-soft); }
.pos-results .name { flex: 1; font-weight: 700; }
.pos-results .sku { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 6px; }
.quick button { padding: 9px; border: 1px solid var(--border); background: var(--surface); text-align: left; font: inherit; color: var(--text); cursor: pointer; min-height: 66px; display: flex; flex-direction: column; justify-content: space-between; }
.quick button:hover { border-color: var(--blue-line); background: var(--blue-soft); }
.quick button b { font-size: 12px; line-height: 1.25; }
.quick button span { font-variant-numeric: tabular-nums; color: var(--blue-dark); font-weight: 700; }
.quick .qk-img, .quick .qk-add { display: none; } /* the photo and the plus: only on the touch design's keys */
.ticket { position: sticky; top: 100px; display: flex; flex-direction: column; max-height: calc(100vh - 120px); }
.ticket .lines { overflow-y: auto; flex: 1; margin: 0 -14px; padding: 0 14px; min-height: 110px; }
.tline { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tline .desc { font-weight: 700; overflow-wrap: anywhere; }
.tline .meta { color: var(--muted); font-size: 11.5px; }
.tline .amount { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.tline .controls { grid-column: 1 / -1; display: flex; gap: 5px; align-items: center; }
.tline .controls input { padding: 3px 6px; min-height: 26px; }
.tline .controls input.qty { width: 60px; text-align: right; }
.tline .controls input.price { width: 88px; text-align: right; }
.tline .controls input.disc { width: 54px; text-align: right; }
.tline.locked { background: var(--stripe); margin: 0 -14px; padding: 8px 14px; }
.ticket-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 24px; font-weight: 700; padding: 10px 0 2px; font-variant-numeric: tabular-nums; }
.ticket-vat { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; }
.paybtns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 10px; }
.paybtns .btn { padding: 12px; font-size: 14px; }
.payments-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: 12.5px; }
.payments-list li { display: flex; justify-content: space-between; padding: 2px 0; }
dialog { border: 1px solid var(--border-strong); border-radius: 4px; padding: 0; background: var(--surface); color: var(--text); max-width: 440px; width: calc(100% - 32px); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog h2 { margin: 0; padding: 9px 16px; background: var(--head); color: #fff; font-size: 13px; font-weight: 700; }
.dialog-body { padding: 14px 16px 16px; }
.auth-card > .flash { margin-top: 14px; }
dialog::backdrop { background: rgba(20, 30, 40, .4); }
dialog.ask-dialog { max-width: 420px; }
.ask-text { margin: 0 0 14px; font-size: 14px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
dialog.ask-dialog .form-actions { margin-top: 0; justify-content: flex-end; }
.change { font-size: 20px; font-weight: 700; color: var(--success); text-align: center; padding: 6px; font-variant-numeric: tabular-nums; }
.keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }

/* ---------- Sign-in pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); }
.auth-side { background: var(--side); color: #dbe6f2; padding: 44px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side .brand { flex-direction: row; padding: 0; color: #fff; align-self: flex-start; gap: 10px; }
.auth-side .brand .wordmark { color: #fff; font-size: 22px; }
.auth-side .brand .wordmark span { color: #5c9de8; }
.auth-side h2 { font-size: 28px; color: #fff; max-width: 440px; line-height: 1.2; font-weight: 400; }
.auth-side ul { padding: 0; list-style: none; display: grid; gap: 9px; max-width: 440px; font-size: 14px; }
.auth-side li { display: flex; gap: 10px; align-items: flex-start; }
.auth-side li svg { color: var(--cyan); margin-top: 2px; }
.auth-watermark { position: absolute; right: -50px; bottom: -60px; width: 270px; height: auto; opacity: .12; }
.auth-side .wheel { position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; opacity: .08; color: #fff; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); padding: 0 22px 18px; }
.auth-card h1 { font-size: 15px; font-weight: 700; margin: 0 -22px 14px; padding: 9px 22px; background: var(--head); color: #fff; }
.auth-card .lead { color: var(--muted); margin-bottom: 18px; }
.auth-card h2 { font-size: 13px; margin-top: 8px; }
.license-chip { display: flex; align-items: center; gap: 10px; border: 1px solid var(--blue-line); background: var(--blue-soft); padding: 9px 11px; margin-bottom: 14px; }
.license-chip .who { flex: 1; }
.license-chip b { display: block; }
.key-input { font-family: var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.lang-switch { display: flex; gap: 10px; justify-content: center; margin-top: 16px; font-size: 12px; }
.keybox { font-family: var(--mono); font-size: 17px; letter-spacing: .05em; padding: 10px 12px; background: var(--accent-soft); border: 1px dashed #e0a030; user-select: all; overflow-wrap: anywhere; }

/* ---------- Error ---------- */
.error-page { text-align: center; padding: 50px 20px; }
.error-page .code { font-size: 56px; font-weight: 700; color: var(--border-strong); }
.auth-card .error-page { padding: 20px 0; }

/* ---------- Print ---------- */
.print-body { background: #fff; color: #111; }
.print-bar { background: #fff; border-bottom: 1px solid var(--border); padding: 8px 16px; display: flex; gap: 10px; align-items: center; }
.print-bar .spacer { flex: 1; }
.sheet { max-width: 800px; margin: 22px auto; background: #fff; padding: 40px 44px; box-shadow: 0 1px 8px rgba(0,0,0,.12); color: #111; font-size: 12.5px; }
.sheet h1 { font-size: 22px; margin: 0; font-weight: 700; }
.sheet table { width: 100%; border-collapse: collapse; }
.sheet .lines th { border-bottom: 2px solid #111; text-align: left; padding: 6px 4px; font-size: 11.5px; }
.sheet .lines td { border-bottom: 1px solid #ddd; padding: 6px 4px; vertical-align: top; }
.sheet .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sheet-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.sheet .addr { line-height: 1.45; }
.sheet .meta td { padding: 2px 10px 2px 0; }
.sheet .totals { margin-left: auto; width: 300px; margin-top: 12px; }
.sheet .totals td { padding: 4px; }
.sheet .totals tr.grand td { font-size: 15px; font-weight: 800; border-top: 2px solid #111; }
.sheet .pay-box { margin-top: 22px; padding: 12px 14px; border: 1px solid #111; }
.sheet .foot { margin-top: 34px; font-size: 10.5px; color: #555; border-top: 1px solid #ddd; padding-top: 8px; }
.sheet .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 40px; }
.sheet .sign div { border-top: 1px solid #111; padding-top: 4px; font-size: 10.5px; }
.receipt { max-width: 300px; margin: 20px auto; background: #fff; color: #111; padding: 16px; font-family: var(--mono); font-size: 12px; box-shadow: 0 1px 8px rgba(0,0,0,.12); }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { vertical-align: top; padding: 1px 0; }
.receipt .c { text-align: center; }
.receipt hr { border-top: 1px dashed #111; margin: 8px 0; }

@media print {
  .print-bar, .no-print { display: none !important; }
  .sheet, .receipt { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  body { background: #fff; }
  @page { margin: 14mm; }
}

/* Bar heights in 5% steps (inline styles are blocked by the CSP). */
.bars .col.h0 { height: 1%; } .bars .col.h1 { height: 5%; } .bars .col.h2 { height: 10%; } .bars .col.h3 { height: 15%; }
.bars .col.h4 { height: 20%; } .bars .col.h5 { height: 25%; } .bars .col.h6 { height: 30%; } .bars .col.h7 { height: 35%; }
.bars .col.h8 { height: 40%; } .bars .col.h9 { height: 45%; } .bars .col.h10 { height: 50%; } .bars .col.h11 { height: 55%; }
.bars .col.h12 { height: 60%; } .bars .col.h13 { height: 65%; } .bars .col.h14 { height: 70%; } .bars .col.h15 { height: 75%; }
.bars .col.h16 { height: 80%; } .bars .col.h17 { height: 85%; } .bars .col.h18 { height: 90%; } .bars .col.h19 { height: 95%; }
.bars .col.h20 { height: 100%; }

/* Misc. */
.badge-text-red { color: var(--danger); font-weight: 700; }
.credit-form { display: flex; gap: 6px; width: 100%; }
.credit-form input { flex: 1; }
.small-top { margin: 10px 0 0; }
#doc-lines td:first-child { width: 44%; min-width: 220px; }
#doc-lines .input-money { width: 110px; margin-left: auto; display: block; }
.card-head .picker { min-width: 300px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .pos { grid-template-columns: 1fr; }
  .ticket { position: static; max-height: none; }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .lock-text, .user-menu .who { display: none; }
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; }
  .mainnav { display: none; padding-bottom: 8px; }
  body.nav-open .mainnav { display: block; }
  .mainnav > ul { flex-direction: column; }
  .mainnav li ul { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 4px 12px; }
  .mainnav > ul > li > a { padding: 7px 4px; border-bottom: 0; font-weight: 700; }
  .mainnav > ul > li.active > a { color: var(--link); }
  .page-body.with-subnav { grid-template-columns: minmax(0, 1fr); }
  .subnav { flex-direction: row; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
  .subnav a { border-left: 0; border-bottom: 2px solid transparent; }
  .subnav a.active { border-bottom-color: var(--blue); }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .page { padding: 0 8px; }
  .page-body { padding: 12px; }
  .topbar-tools .tool[title] { display: none; }
}
@media (max-width: 640px) {
  .form-grid, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 5px; }
  .filters input[type=search] { min-width: 0; width: 100%; }
  .filters { flex-direction: column; align-items: stretch; }
  .brand .wordmark { display: none; }
  .search { max-width: none; }
}
.narrow { max-width: 780px; }
.search-panel { max-width: 780px; }
.search-panel .form-row { padding: 0; }
.partners .col-check { width: 30px; padding-right: 0; }
.partners .options a { color: var(--link); margin-right: 3px; }
.partners .options svg.icon { width: 16px; height: 16px; }
.partners .icon-btn svg.icon { width: 16px; height: 16px; }
.partners tr.muted .icon-btn { color: #aab0b6; }
.search-panel.wide { max-width: none; }
.search-panel .filters { margin: 0; }
.filters .grow { flex: 1; min-width: 220px; }
.products .table td { padding-top: 6px; padding-bottom: 6px; border-bottom-color: #ececec; }
.products .table tbody tr:nth-child(even) { background: var(--stripe); }
.products .table tbody tr:hover { background: #f1f6fc; }
.products .table th { background: var(--surface); font-size: 11px; font-weight: 400; color: #666; text-transform: uppercase; }
.product-photo { width: 100%; max-width: 320px; border: 1px solid var(--border); background: var(--surface); display: block; }

/* Licence blocked: the banner replaces the application. */
.blocked-banner { margin: 14px -22px 18px; padding: 26px 24px 22px; background: #c62828; color: #fff; text-align: center; }
.blocked-banner.reason-unpaid, .blocked-banner.reason-suspended { background: #c4500f; }
.blocked-banner h1 { color: #fff; background: none !important; margin: 8px 0 6px !important; padding: 0 !important; font-size: 22px !important; }
.blocked-banner p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: #fff; }
.blocked-icon svg.icon { width: 46px; height: 46px; stroke-width: 1.6; }
.blocked-tag { display: inline-block; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4); padding: 2px 10px; border-radius: 12px; font-weight: 700; font-size: 12px !important; }
.auth-card .btn-block + .btn-block, .auth-card form .btn-block { margin-top: 8px; }
.limit-meter { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.limit-meter progress { flex: 1; max-width: 220px; }
.store-switch { padding: 6px 14px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.store-switch label { font-weight: 400; color: var(--muted); }
.plan-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.plan-card { display: flex; flex-direction: column; gap: 3px; border: 2px solid var(--border); padding: 12px; cursor: pointer; font-weight: 400; position: relative; }
.plan-card input { position: absolute; top: 12px; right: 12px; }
.plan-card:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.plan-name { font-size: 16px; font-weight: 700; color: var(--text-strong); }
.send-key { width: 100%; margin-bottom: 6px; }
.send-key input { flex: 1; min-width: 160px; }
@media (max-width: 640px) { .plan-cards { grid-template-columns: 1fr; } }
/* The kind of business of a licence: one card each, with its icon. */
.biz-title { margin: 4px 0 8px; font-size: 14px; }
.biz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.biz-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; border: 2px solid var(--border); border-radius: var(--radius); padding: 12px; cursor: pointer; font-weight: 400; }
.biz-card input { position: absolute; top: 12px; right: 12px; }
.biz-card:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.biz-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--blue); }
.biz-card:has(input:checked) .biz-icon { background: var(--blue); color: #fff; }
.biz-icon svg.icon { width: 24px; height: 24px; }
.biz-name { font-size: 15px; font-weight: 700; color: var(--text-strong); padding-right: 22px; }
.biz-desc { line-height: 1.35; }
.biz-hint { margin: -6px 0 14px; }
.biz-tag { display: inline-flex; align-items: center; gap: 4px; }
.biz-tag svg.icon { width: 16px; height: 16px; }
/* The same data on every server (views/admin/servers.php). */
.data-ok { color: var(--success); display: inline-flex; align-items: center; gap: 4px; }
.data-ok svg.icon { width: 15px; height: 15px; }
.data-bad { color: var(--danger); }
/* A company computer switching to another company (views/auth/switch.php). */
.switch-companies { display: flex; align-items: stretch; gap: 10px; margin: 6px 0 14px; }
.switch-company { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.switch-company strong { color: var(--text-strong); overflow-wrap: anywhere; }
.switch-company.is-target { border: 2px solid var(--blue); background: var(--blue-soft); }
.switch-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--blue); }
.switch-company.is-target .switch-icon { background: var(--blue); color: #fff; }
.switch-icon svg.icon { width: 22px; height: 22px; }
.switch-arrow { align-self: center; color: var(--muted); }
.switch-notes { margin: 0 0 14px; padding-left: 18px; color: var(--muted); }
.switch-notes li { margin: 3px 0; }
.module-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 14px; }

/* ---------- Technik ---------- */
/* The logo in navy on light, in white on dark (the sign-in panel, dark mode). */
.auth-side .brand-logo { height: 30px; content: url(logo-white.png); }
:root[data-theme="dark"] .brand-logo { content: url(logo-white.png); }
:root[data-theme="dark"] .brand-mark { content: url(mark-white.png); }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] .brand-logo { content: url(logo-white.png); }
  :root[data-theme="system"] .brand-mark { content: url(mark-white.png); } }
.theme-switch { display: flex; gap: 4px; padding: 6px 14px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.theme-switch button { flex: 1; padding: 4px 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: var(--radius-sm); font: inherit; font-size: 11.5px; cursor: pointer; text-align: center; }
.theme-switch button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--link); font-weight: 700; }
.appearance-label { display: flex; align-items: center; gap: 6px; padding: 6px 14px 0; color: var(--muted); font-size: 11.5px; }
.appearance-label svg.icon { width: 14px; height: 14px; }
.appearance .design-switch { border-bottom: 0; margin-bottom: 0; padding-bottom: 2px; }
.auth-design { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.auth-design button { padding: 4px 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: var(--radius-sm); font: inherit; font-size: 11.5px; cursor: pointer; }
.auth-design button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--link); font-weight: 700; }
.lang-menu { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 14px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.lang-menu a { display: inline-block !important; width: auto !important; padding: 3px 8px !important; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 11.5px; }
.lang-menu a[aria-current="true"] { border-color: var(--blue); background: var(--blue-soft); font-weight: 700; }

/* Repair status: coloured strip on rows and cards, coloured dot in badges. */
tr.st, .st-card { box-shadow: inset 4px 0 0 var(--st, transparent); }
.st-planned { --st: var(--st-planned); } .st-in_progress { --st: var(--st-in_progress); } .st-waiting_parts { --st: var(--st-waiting_parts); }
.st-ready { --st: var(--st-ready); } .st-partial { --st: var(--st-partial); } .st-collected { --st: var(--st-collected); }
.st-cancelled { --st: var(--st-cancelled); } .st-warranty { --st: var(--st-warranty); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--st, var(--muted)); }
.pill-warranty { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 3px; background: color-mix(in srgb, var(--st-warranty) 18%, transparent); color: var(--warning); border: 1px solid color-mix(in srgb, var(--st-warranty) 45%, transparent); }
.pill-planned { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--link); padding: 1px 8px; border-radius: 3px; border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); background: var(--blue-soft); }
.pill-planned svg.icon { width: 13px; height: 13px; }
.kpis { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.kpi { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font-weight: 700; font-size: 12px; color: var(--muted); }
.kpi b { color: var(--text-strong); font-size: 15px; font-variant-numeric: tabular-nums; }
.kpi.st { box-shadow: inset 3px 0 0 var(--st); }
/* A count: a perfect circle with the figure in its middle (at most "99+"). */
.nav-count { --b: 20px; vertical-align: middle; margin-left: 5px; background: var(--blue-soft); color: var(--link); }
/* Count bubbles: always a circle, the figure in the middle. */
.nav-count, .tool-count { box-sizing: border-box; display: inline-grid; place-items: center; width: var(--b); height: var(--b); min-width: var(--b); max-width: var(--b);
  padding: 0; border-radius: 50%; overflow: hidden; white-space: nowrap; text-align: center; font-size: calc(var(--b) * .52); font-weight: 700; line-height: 1;
  letter-spacing: 0; font-variant-numeric: tabular-nums lining-nums; }
.nav-count.n3, .tool-count.n3 { font-size: calc(var(--b) * .4); letter-spacing: -.02em; }
@supports (text-box: trim-both cap alphabetic) {
  .nav-count, .tool-count { display: inline-block; text-box: trim-both cap alphabetic; padding-top: calc((var(--b) - 1cap) / 2); }
}
.nav-count.warn { background: var(--warning-soft); color: var(--warning); }

/* Toasts (live updates). */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 90; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 12.5px; transition: opacity .25s, transform .25s; }
.toast::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--st, var(--success)); }
.toast.leaving { opacity: 0; transform: translateY(6px); }

/* PIN lock screen */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.person { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-weight: 400; margin: 0; background: var(--surface); }
.person input { position: absolute; opacity: 0; pointer-events: none; }
.person:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 25%, transparent); }
.person:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 1px; }
.avatar { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 3px; background: var(--head); color: #fff; font-weight: 700; }
.person .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.person .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-input { font-size: 22px !important; letter-spacing: .4em; text-align: center; font-family: var(--mono); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 6px; }
.pinpad button { min-height: 52px; font: inherit; font-size: 20px; font-weight: 700; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text-strong); cursor: pointer; }
.pinpad button:hover { background: var(--hover); }
.pinpad button:active { transform: scale(.97); }
.pinpad button.muted { font-size: 13px; color: var(--muted); }
.pinpad .enter { background: var(--blue); border-color: var(--blue-dark); color: #fff; }
.pinpad .enter svg.icon { width: 24px; height: 24px; stroke-width: 2.6; }
.lock-form.shake .pin-input { animation: shake .35s; border-color: var(--danger) !important; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

/* Planner (Technik) */
.planner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
/* The repairs without a date: a tray above the days (the days get the whole width). */
.planner-left, .planner-left.card.flush { display: grid; grid-template-columns: auto minmax(180px, 260px) minmax(0, 1fr); align-items: center; gap: 0 12px; margin: 0; padding: 10px 14px; overflow: visible; }
.planner-left .card-head { margin: 0; padding: 0; background: none; color: var(--text-strong); min-height: 0; gap: 8px; justify-content: flex-start; }
.planner-left .card-head h2 { margin: 0; color: var(--text-strong); }
.planner-left .planner-search { padding: 0; margin: 0; }
.planner-left .planner-list { flex-direction: row; flex-wrap: wrap; align-items: center; max-height: 132px; padding: 2px; min-height: 48px; border-radius: var(--radius); }
.planner-left .planner-list .job-card { flex: 0 0 230px; }
.planner-left .planner-list .empty { margin: 0; padding: 8px; }
.planner-list { overflow-y: auto; display: flex; gap: 8px; }
.planner-list.drag-over { background: var(--blue-soft); }
.planner-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.daycol { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.daycol.today { border-color: var(--blue); box-shadow: inset 0 3px 0 var(--blue); }
.dayhead { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.dayhead b { text-transform: capitalize; }
.daycol.today .dayhead b { color: var(--link); }
.pill-count { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.pill-count.full { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.slotrow { display: flex; gap: 8px; margin-bottom: 8px; }
.slot-time { width: 42px; flex: none; text-align: right; font-size: 11px; font-weight: 700; color: var(--muted); padding-top: 9px; font-variant-numeric: tabular-nums; }
.slot { flex: 1; min-width: 0; min-height: 50px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--stripe); display: flex; }
.slot.taken { border-style: solid; border-color: transparent; background: none; }
.slot > .job-card { flex: 1; }
.slot-free { margin: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); opacity: .7; }
.slot.drag-over, .slot-extra.drag-over { border: 2px dashed var(--blue); background: var(--blue-soft); }
.slot-extra { border-top: 1px dashed var(--border); padding-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.job-card { position: relative; display: block; min-width: 0; min-height: 56px; padding: 7px 7px 7px 12px; border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius); font-size: 12px; }
/* The name takes the whole width; the bike and the tools share the second line. */
.job-card .jc-meta { padding-right: 90px; min-height: 26px; margin-top: 3px; }
.job-card .jc-tools { position: absolute; right: 6px; bottom: 6px; }
.plan-pick .job-card .jc-meta { padding-right: 0; min-height: 0; }
.job-card.drag-source { opacity: .35; }
.job-card.flash-target { animation: pulse 1.2s ease 2; }
.jc-main { flex: 1; min-width: 0; display: block; color: var(--text); }
.jc-main:hover { text-decoration: none; }
.jc-name { display: block; font-weight: 700; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jc-meta { display: block; margin-top: 1px; color: var(--muted); font-size: 11.5px; line-height: 26px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jc-warranty { color: var(--warning); display: inline-flex; vertical-align: -2px; margin-right: 3px; }
.jc-warranty svg.icon { width: 13px; height: 13px; }
/* The same small toolbar as the home screen's editor. */
.jc-tools { display: inline-flex; flex: none; gap: 1px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.jc-tools button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.jc-tools button:hover { background: var(--hover); color: var(--link); }
.jc-tools button svg.icon { width: 15px; height: 15px; }
.jc-tools .jc-handle { cursor: grab; touch-action: none; }
.jc-tools .jc-remove { color: var(--danger); }
/* The card under the finger while it is dragged (it follows the pointer). */
.job-card.drag-ghost { position: fixed; z-index: 200; margin: 0; pointer-events: none; box-shadow: var(--shadow); opacity: .95; transform: rotate(1.5deg); }
/* The planner's toolbar: the period, the date, how many days, whose repairs. */
.planner-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.planner-toolbar form { margin: 0; }
.seg { display: inline-flex; }
.seg .btn { border-radius: 0; margin-left: -1px; }
.seg .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.seg .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.seg .btn.is-on { background: var(--blue-soft); border-color: var(--blue-line); color: var(--link); font-weight: 700; position: relative; }
.planner-mech select { min-width: 180px; }
.dayhead .day-date { margin-left: 6px; color: var(--muted); font-size: 11px; }
.dayhead .pill-count { margin-left: auto; }
progress.day-fill { display: block; width: 100%; height: 4px; margin: 4px 0 8px; }
.slot-add { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border: 0; background: none; color: var(--muted);
  font: inherit; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; border-radius: inherit; }
.slot-add svg.icon { width: 14px; height: 14px; opacity: .6; }
.slot-add:hover { color: var(--link); background: var(--blue-soft); }
.slot-add:hover svg.icon { opacity: 1; }
.slot-extra.empty-extra > .small { display: none; }
.slot-extra.empty-extra { min-height: 10px; border-top-color: transparent; padding-top: 0; }
.slot-extra.empty-extra.drag-over { min-height: 44px; }
.job-card.is-dim { opacity: .38; }
.job-card.is-dim:hover { opacity: 1; }
.planner-list.drag-over, .slot.drag-over { background: var(--blue-soft); }
.plan-pick { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; margin: 10px 0; }
.plan-pick .job-card { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.slot-chips li span { font-variant-numeric: tabular-nums; font-weight: 700; }
.slot-chips .icon-btn { min-width: 26px !important; min-height: 26px !important; padding: 0; display: inline-grid; place-items: center; }
.slot-chips .icon-btn svg.icon { width: 14px; height: 14px; }
.planner-settings summary { cursor: pointer; }
@media (max-width: 1180px) {
  .planner-left { grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; }
  .planner-left .planner-list { grid-column: 1 / -1; }
  .planner-left .planner-list .job-card { flex: 1 1 220px; max-width: 320px; }
}
@media (max-width: 600px) { .planner-left { grid-template-columns: minmax(0, 1fr); } .planner-left .planner-list .job-card { max-width: none; } }
.busy-banner { box-shadow: inset 4px 0 0 var(--st-in_progress); }
.tech-notes { white-space: normal; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12.5px; }

/* Charts (server-rendered SVG) */
.chart { width: 100%; height: auto; display: block; font-family: var(--font); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--border-strong); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; }
.chart .lbl { fill: var(--text); font-size: 12.5px; }
.chart .val { fill: var(--text-strong); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--chart); }
.chart .bar[class*="st-"] { fill: var(--st); }
.chart .hit { fill: transparent; }
.chart .mark:hover .hit { fill: var(--hover); }
.chart .mark:hover .bar { filter: brightness(1.12); }
.table-view { margin-top: 8px; font-size: 12px; }
.table-view summary { cursor: pointer; color: var(--link); }
.table-view .table { margin-top: 6px; }
.rights { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px 4px; margin: 0 0 12px; }
.rights legend { font-weight: 700; font-size: 12px; padding: 0 4px; }
.rights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; margin: 6px 0; }
.rights:has([data-toggle-rights]:not(:checked)) .rights-grid { opacity: .55; pointer-events: none; }
.chips { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 10px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface-2); font-size: 12.5px; }
.chips .icon-btn { color: var(--muted); }
.chips .icon-btn:hover { color: var(--danger); }
.chips svg.icon { width: 14px; height: 14px; }
.chip-add { display: flex; gap: 6px; }
.card > h2:first-child .muted, .card-head h2 .muted { color: rgba(255, 255, 255, .78); font-weight: 400; }
.job.st-card { padding-left: 14px; }
.job-time { width: 42px; flex: none; font-size: 11.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Technik Monteur (phones, also the Android Monteur app): the web app's own
   frame and panels, with bigger touch targets. */
body.mobile .topbar-row { align-items: center; padding-top: env(safe-area-inset-top); }
body.mobile .topbar-tools { padding: 8px 0; }
body.mobile .lock-text { display: block; font-size: 11px; }
body.mobile .brand-mark { width: 26px; height: 26px; margin-left: 4px; }
body.mobile .page { max-width: 900px; padding-bottom: env(safe-area-inset-bottom); }
body.mobile .subnav { flex-direction: row; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 0 8px; margin-bottom: 14px; }
body.mobile .subnav a { border-left: 0; border-bottom: 2px solid transparent; padding: 8px 12px; font-size: 14px; }
body.mobile .subnav a.active { border-bottom-color: var(--blue); }
body.mobile .btn { min-height: 38px; font-size: 13.5px; }
body.mobile .btn-sm { min-height: 34px; padding: 4px 10px; }
body.mobile .btn-lg { min-height: 46px; font-size: 15px; }
body.mobile input, body.mobile select { min-height: 40px; font-size: 15px; }
body.mobile textarea { font-size: 15px; }
body.mobile .job { padding: 10px 12px; align-items: flex-start; }
body.mobile .job .what span { white-space: normal; }
body.mobile .job-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.job-meta { display: flex !important; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.job-meta svg.icon { width: 14px; height: 14px; }
.job-meta .running { color: var(--st-in_progress); font-weight: 700; }
.job-meta .busy { color: var(--warning); font-weight: 700; }
.job-meta .carried { color: var(--warning); font-weight: 700; }
.status-actions form { margin: 0; }
.timer-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 220px); gap: 14px; align-items: center; }
.timer-row .kv { grid-template-columns: 110px 1fr; }
.timer-value { font-size: 22px; font-variant-numeric: tabular-nums; color: var(--text-strong); }
.part-row { display: flex; gap: 8px; margin-top: 8px; }
.part-row .btn { flex: 1; }
@media (max-width: 520px) { .timer-row { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .job .job-mech { display: none; }
  .job { flex-wrap: wrap; row-gap: 4px; }
  .job .what { flex-basis: calc(100% - 140px); }
}

/* ======================================================================
   Android apps (Technik and Technik Monteur): the look of the iPhone apps.
   Only inside the apps (<html class="app">); the website and the desktop
   app keep the classic look above. Light and dark follow the phone.
   ====================================================================== */
html.app {
  --bg: #f2f2f7; --surface: #ffffff; --surface-2: #f2f2f7; --stripe: #f7f7fa; --hover: #ececf1; --btn-hover: #e5e5ea;
  --line: rgba(60, 60, 67, .14); --border: rgba(60, 60, 67, .14); --border-strong: rgba(60, 60, 67, .22); --input-border: transparent;
  --text: #1c1c1e; --text-strong: #1b1f4b; --muted: #6e6e73; --link: #1a6fd0; --blue: #1a6fd0; --blue-dark: #155db0;
  --blue-soft: rgba(26, 111, 208, .1); --subnav-active: #1a6fd0; --focus: #1a6fd0; --primary: #1a6fd0; --primary-hover: #155db0;
  --danger: #c62b28; --danger-soft: rgba(198, 43, 40, .12); --warning: #b8650e; --warning-soft: rgba(230, 120, 27, .14);
  --success: #2f8f50; --success-soft: rgba(52, 144, 85, .14);
  --app-head: linear-gradient(135deg, #1a6fd0, #1b1f4b);
  --shadow: 0 2px 8px rgba(0, 0, 0, .05);
  --radius: 12px; --radius-sm: 12px;
}
@media (prefers-color-scheme: dark) { html.app[data-theme="system"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --stripe: #232325; --hover: #2c2c2e; --btn-hover: #3a3a3c;
  --line: rgba(84, 84, 88, .55); --border: rgba(84, 84, 88, .55); --border-strong: rgba(84, 84, 88, .8);
  --text: #f2f2f7; --text-strong: #ffffff; --muted: #98989f; --link: #5c9de8; --blue-soft: rgba(26, 111, 208, .2); --subnav-active: #1a6fd0; --blue: #1a6fd0; --primary: #1a6fd0;
  --danger: #ff6961; --danger-soft: rgba(255, 105, 97, .16); --warning: #ffb340; --warning-soft: rgba(255, 179, 64, .16);
  --success: #4cd07d; --success-soft: rgba(76, 208, 125, .16); --shadow: none;
} }
html.app[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --stripe: #232325; --hover: #2c2c2e; --btn-hover: #3a3a3c;
  --line: rgba(84, 84, 88, .55); --border: rgba(84, 84, 88, .55); --border-strong: rgba(84, 84, 88, .8);
  --text: #f2f2f7; --text-strong: #ffffff; --muted: #98989f; --link: #5c9de8; --blue-soft: rgba(26, 111, 208, .2); --subnav-active: #1a6fd0; --blue: #1a6fd0; --primary: #1a6fd0;
  --danger: #ff6961; --danger-soft: rgba(255, 105, 97, .16); --warning: #ffb340; --warning-soft: rgba(255, 179, 64, .16);
  --success: #4cd07d; --success-soft: rgba(76, 208, 125, .16); --shadow: none;
}
html.app body { font-size: 15px; -webkit-tap-highlight-color: transparent; }
html.app body:not(.mobile) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

/* Header: logo mark, search field, no menu bar (the tab bar replaces it). */
html.app .topbar { background: var(--bg); border-bottom: 0; --tool-ring: var(--bg); }
html.app .topbar-row { align-items: center; padding-top: env(safe-area-inset-top); }
html.app .topbar-tools { padding: 8px 0; }
html.app .brand-logo { height: 24px; }
html.app .search input { border-radius: 10px !important; background: var(--surface-2); border: 0; }
html.app .menu-toggle, html.app .user-menu .who { display: none !important; }
html.app .mainnav { display: none; }
html.app body.nav-open .mainnav { display: block; position: fixed; inset: 0 0 calc(64px + env(safe-area-inset-bottom)); z-index: 45; overflow-y: auto; background: var(--bg); padding: calc(16px + env(safe-area-inset-top)) 16px 16px; }
html.app body.nav-open .mainnav > ul > li { background: var(--surface); border-radius: 14px; margin-bottom: 10px; padding: 4px 12px; }
html.app body.nav-open .mainnav li ul { padding-left: 4px; }
html.app body.nav-open .mainnav li ul a { padding: 10px 4px; border-top: 1px solid var(--line); background: none; }

/* Page: a large bold title instead of the grey band, no frame. */
html.app .page { padding: 0 16px; margin-top: 0; }
html.app .page-band { background: none; border: 0; padding: 4px 0 10px; }
html.app .page-band h1 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
html.app .page-body { background: none; border: 0; padding: 0; min-height: 0; }
html.app h1 { font-weight: 800; letter-spacing: -.01em; }
html.app .page-head h1 { font-size: 26px; }

/* Sub-menu: capsules (as the filters in the iPhone apps). */
html.app .subnav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 8px; border: 0; padding: 2px 0 12px; margin-bottom: 4px; scrollbar-width: none; }
html.app .subnav a { white-space: nowrap; border: 0 !important; border-radius: 999px; padding: 8px 14px; background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; }
html.app .subnav a.active { background: var(--blue); color: #fff; }
html.app .subnav a.active .nav-count { background: rgba(255, 255, 255, .25); color: #fff; }

/* Cards: rounded, no border, a bold title instead of the blue bar. */
html.app .card, html.app .stat, html.app .kpi, html.app .daycol, html.app .intro { border: 0; border-radius: 16px; box-shadow: var(--shadow); }
html.app .card > h2:first-child, html.app .card > input[type=hidden] + h2, html.app .card-head {
  background: none; color: var(--text-strong); font-size: 17px; font-weight: 700; padding: 14px 14px 6px; margin: -14px -14px 6px; border-radius: 16px 16px 0 0; }
html.app .card-head h2, html.app .card > h2:first-child a, html.app .card-head a:not(.btn) { color: var(--text-strong); font-size: 17px; }
html.app .card-head .muted, html.app .card > h2:first-child .muted { color: var(--muted); }
html.app .card.flush { overflow: hidden; }
html.app .card.flush .card-head { margin: 0; padding: 14px 14px 8px; }
html.app .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
html.app .stat { border-top: 0; padding: 14px; }
html.app .stat .label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; }
html.app .stat .value { font-size: 26px; font-weight: 800; }
html.app .quicklinks a { border: 0; border-radius: 12px; background: var(--surface-2); }

/* Buttons and fields: rounded, filled. */
html.app .btn { border: 0; background: var(--surface-2); border-radius: 12px; min-height: 40px; padding: 8px 14px; font-weight: 600; font-size: 14px; }
html.app .btn-primary { background: var(--app-head); color: #fff; }
html.app .btn-accent { background: linear-gradient(135deg, #34a35a, #23753f); color: #fff; }
html.app .btn-danger { color: var(--danger); background: var(--danger-soft); }
html.app .btn-sm { min-height: 34px; padding: 5px 12px; }
html.app .btn-lg { min-height: 50px; font-size: 16px; }
html.app input[type=text], html.app input[type=email], html.app input[type=password], html.app input[type=search], html.app input[type=number],
html.app input[type=date], html.app input[type=tel], html.app input:not([type]), html.app select, html.app textarea {
  background: var(--surface-2); border: 0; border-radius: 12px !important; min-height: 44px; padding: 10px 12px; font-size: 15px; }
html.app .card input, html.app .card select, html.app .card textarea { background: var(--bg); }
html.app label { font-size: 13px; color: var(--muted); font-weight: 600; }

/* Lists and tables inside cards. */
html.app .table th { background: none; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: none; }
html.app .table th, html.app .table td { border-bottom-color: var(--line); }
html.app .table tbody tr:hover { background: none; }
html.app .tabs { border-bottom: 0; gap: 8px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
html.app .tabs a { border: 0; border-radius: 999px; background: var(--surface); padding: 7px 13px; white-space: nowrap; margin: 0; }
html.app .tabs a.active { background: var(--blue); color: #fff; }
html.app .job { padding: 12px 0; }
html.app .job.st-card { padding-left: 14px; box-shadow: inset 5px 0 0 var(--st); border-radius: 4px; }

/* Status labels: tinted capsules (as StatusBadge in the iPhone apps). */
html.app .status { background: color-mix(in srgb, var(--st, var(--muted)) 15%, transparent); border: 0; color: var(--st, var(--muted)); border-radius: 999px; padding: 3px 9px; }
html.app .status::before { display: none; }
html.app .badge, html.app .pill-warranty, html.app .pill-planned, html.app .pill-count, html.app .nav-count { border-radius: 999px; }
html.app .flash, html.app .banner { border-radius: 12px; border: 0; }

/* Bottom tab bar. */
.app-tabs { display: none; }
html.app .app-tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
html.app .app-tabs a, html.app .app-tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; background: none; border: 0;
  color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; text-decoration: none; }
html.app .app-tabs svg.icon { width: 24px; height: 24px; }
html.app .app-tabs .active { color: var(--blue); }

/* Sign-in: the gradient header with the logo, a rounded sheet below. */
html.app .auth { display: block; background: var(--surface); }
html.app .auth-side { display: flex !important; min-height: 260px; padding: calc(40px + env(safe-area-inset-top)) 24px 56px; background: var(--app-head); }
html.app .auth-side ul, html.app .auth-side > .small, html.app .auth-watermark { display: none; }
html.app .auth-side h2, html.app .auth-side .lead { font-size: 22px; font-weight: 800; color: #fff; }
html.app .auth-main { background: var(--surface); border-radius: 28px 28px 0 0; margin-top: -28px; position: relative; padding: 24px 20px; }
html.app .auth-card { border: 0; padding: 0; max-width: none; background: none; }
html.app .auth-card h1 { background: none; color: var(--text-strong); font-size: 24px; font-weight: 800; margin: 0 0 14px; padding: 0; }

/* Technik Monteur (Android): the iPhone Monteur look. */
html.app body.mobile .topbar-row { padding-top: env(safe-area-inset-top); }
html.app body.mobile .page-band h1 { font-size: 28px; }
html.app body.mobile .subnav a { flex: 1; text-align: center; }
html.app body.mobile .card.flush .job { padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); border-radius: 0; }
html.app body.mobile .card.flush .job:last-child { border-bottom: 0; }
html.app .timer-value { font-size: 32px; font-weight: 800; }
html.app .lock-text { color: var(--muted); }
html.app .search input { background: rgba(118, 118, 128, .12) !important; }
html.app input[type=search] { background: var(--surface); }
html.app .card input[type=search] { background: var(--bg); }
html.app .btn { background: var(--surface); }
html.app .card .btn, html.app .card-head .btn { background: var(--surface-2); }
html.app .btn-primary, html.app .card .btn-primary { background: var(--app-head); }
html.app .btn-accent, html.app .card .btn-accent { background: linear-gradient(135deg, #34a35a, #23753f); }
html.app .btn-danger, html.app .card .btn-danger { background: var(--danger-soft); }
html.app .stat .value { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.app .auth-side .brand-logo { height: 26px; }
html.app body.mobile .page-band h1 { font-size: 24px; }

/* Bike number (the barcode label on the bike in the workshop). */
.bike-no { display: inline-block; min-width: 24px; padding: 0 5px; border-radius: 3px; background: #333; color: #fff; font-weight: 700; font-size: 11.5px; line-height: 18px; text-align: center; vertical-align: 1px; font-variant-numeric: tabular-nums; }
h1 .bike-no { font-size: 15px; line-height: 24px; min-width: 32px; vertical-align: 3px; }
:root[data-theme="dark"] .bike-no { background: #d8e0ee; color: #111; }
html.app .bike-no { border-radius: 8px; background: var(--text-strong); color: var(--bg); }

/* Bike labels (print) */
.labels-form { align-items: flex-end; }
.labels-form .field { width: 130px; }
.labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.label-card { border: 1px dashed #bbb; padding: 10px 12px 8px; text-align: center; break-inside: avoid; background: #fff; color: #000; }
.label-no { font-size: 30px; font-weight: 700; line-height: 1.1; }
.label-card .barcode { display: block; width: 100%; height: 56px; margin: 4px 0; }
.label-shop { font-size: 10px; color: #555; }
.scan-bar { display: flex; gap: 8px; align-items: stretch; margin-bottom: 12px; }
.scan-bar [data-app-scan] { flex: 1 1 100%; }
.scan-bar input { flex: 1; min-width: 0; }
.scan-bar:has([data-app-scan]:not([hidden])) { flex-wrap: wrap; }
.job .what span.bike-no { display: inline-block; width: auto; white-space: nowrap; color: #fff; font-size: 11.5px; margin-right: 2px; }
html.app .job .what span.bike-no { color: var(--bg); }
.part-row { flex-wrap: wrap; }
.part-row [data-app-scan-part]:not([hidden]) { flex: 1 1 100%; order: -1; }

/* Payment terminal (till dialog and the phone's Terminal screen) */
.terminal { text-align: center; }
.terminal-amount { font-size: 44px; font-weight: 700; line-height: 1.15; margin: 8px 0 4px; font-variant-numeric: tabular-nums; color: var(--text-strong); }
.terminal-msg { min-height: 1.4em; margin: 8px 0; }
.terminal-idle { padding: 36px 8px; color: var(--muted); }
.terminal-idle svg { width: 44px; height: 44px; opacity: .55; }
.terminal-actions { display: grid; gap: 10px; text-align: left; margin-top: 12px; }
#terminal-dialog .dialog-body { text-align: center; min-width: min(360px, 86vw); }

/* Switch between the shop and the mechanics' view */
.topbar-tools .tool.view-switch, .topbar-tools .tool.view-switch[title] { display: inline-flex; align-items: center; width: auto; gap: 6px; padding: 0 10px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.tool.view-switch span { display: inline; }
@media (max-width: 600px) { .tool.view-switch span { display: none; } }

.terminal-tools { display: grid; gap: 6px; margin-top: 14px; }
/* Blackout: the phone looks switched off, the terminal keeps running underneath. */
.terminal-black { position: fixed; inset: 0; z-index: 10000; background: #000; display: flex; align-items: flex-end; justify-content: center; cursor: none; }
.terminal-black[hidden] { display: none; }
.terminal-black span { color: #000; font-size: 12px; padding-bottom: 28px; transition: color .4s; }
.terminal-black.hint span { color: #333; }

/* Licence console: actions that need the code from your e-mail; two-step sign-in */
.actions.end { justify-content: flex-end; }
.danger-zone { border-color: #efc4c2; }
.code-input { font: 600 22px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .3em; max-width: 220px; text-align: center; }
.twofa-setup { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.twofa-qr { background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line, #dfe3ea); line-height: 0; }
.twofa-qr svg { width: 220px; height: 220px; }
.twofa-key { font: 600 15px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; user-select: all; word-break: break-all; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; font: 600 15px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 12px 16px; background: var(--info-soft); border-radius: 10px; }
@media (max-width: 640px) { .twofa-setup { grid-template-columns: 1fr; } .twofa-qr svg { width: 200px; height: 200px; } }
.steps { margin: 0 0 12px; padding-left: 20px; line-height: 1.6; }
.steps li { margin-bottom: 6px; }
[data-copy].copied::after { content: " ✓"; }

/* The sign-in screen comes in smoothly (after the apps' loading screen too) */
@keyframes tk-enter { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes tk-fade { from { opacity: 0; } to { opacity: 1; } }
.auth-card { animation: tk-enter .6s cubic-bezier(.2, .8, .2, 1) both; }
.auth-side { animation: tk-fade .5s ease both; }
@media (prefers-reduced-motion: reduce) { .auth-card, .auth-side { animation: none; } }

/* Sign-in button while signing in: a turning icon, text kept in place. */
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%;
  animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-busy::after { animation-duration: 1.6s; } }

/* ---------- Labels: preview, print window, book in, printing overlay ---------- */
.label-preview, .label-sheet { --lw: 50mm; --lh: 30mm; background: #fff; color: #111; display: flex; flex-direction: column; overflow: hidden; }
.label-preview { width: 100%; max-width: 300px; margin: 0 auto 12px; padding: 0; border: 1px solid var(--border-strong); border-radius: 4px; }
.label-preview img, .label-sheet img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.label-preview .lp-name, .label-sheet .lp-name { font-weight: 700; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 7.5cqw; }
.label-preview .lp-price, .label-sheet .lp-price { font-weight: 800; font-size: 13cqw; line-height: 1.1; margin: 1% 0 2%; font-variant-numeric: tabular-nums; }
.label-preview .lp-code, .label-sheet .lp-code { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.label-preview .lp-code svg, .label-sheet .lp-code svg { width: 86%; flex: 1; min-height: 0; max-height: 60%; }
.label-preview .lp-code span, .label-sheet .lp-code span { font-size: 5.5cqw; letter-spacing: .08em; }
.label-sheets { display: flex; flex-wrap: wrap; gap: 6mm; padding: 16px; justify-content: center; }
.label-sheet { width: var(--lw); height: var(--lh); padding: 0; box-shadow: 0 1px 6px rgba(0,0,0,.18); container-type: inline-size; break-after: page; page-break-after: always; }
@media print {
  .label-sheets { display: block; padding: 0; }
  .label-sheet { box-shadow: none; margin: 0; }
  .label-sheet:last-child { break-after: auto; page-break-after: auto; }
}
.label-card .inline-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.label-card .inline-fields .field { flex: 0 0 120px; margin: 0; }

dialog.receive-dialog { max-width: 560px; }
.receive-search { position: relative; }
.receive-search input { width: 100%; font-size: 15px; padding: 9px 11px; }
.receive-msg { margin: 8px 0 0; padding: 7px 10px; background: var(--warning-soft, #fff4e0); color: var(--text); border-left: 3px solid var(--warning, #e0a030); font-size: 12.5px; }
.receive-list { list-style: none; margin: 10px 0 6px; padding: 0; max-height: 46vh; overflow-y: auto; border-top: 1px solid var(--line); }
.receive-list li { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.receive-list li.flash { animation: rl-flash 1s ease; }
.receive-list .rl-info { flex: 1; min-width: 0; }
.receive-list .rl-info b { display: block; overflow-wrap: anywhere; }
.receive-list .detail { display: block; font-size: 11.5px; color: var(--muted); }
.receive-list .rl-qty { width: 72px; text-align: right; }
.receive-list .rl-remove { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 6px; cursor: pointer; border-radius: 4px; }
.receive-list .rl-remove:hover { color: var(--danger); background: var(--danger-soft); }
.receive-empty { margin: 10px 0; text-align: center; }
@keyframes rl-flash { from { background: var(--blue-soft); } to { background: transparent; } }

/* The printing window: borderless, small, the loading bar of the start screen without the logo. */
/* The printing window: the update window's card (logo, sliding bar); a check when printed, then it closes. */
dialog.print-overlay { border: 0; background: transparent; box-shadow: none; padding: 16px; width: 100%; max-width: 472px; overflow: visible; }
dialog.print-overlay::backdrop { background: rgba(11, 19, 36, .42); backdrop-filter: blur(3px); }
.po-card { box-sizing: border-box; padding: 24px 24px 22px; border-radius: 18px; background: var(--surface); color: var(--text);
  box-shadow: 0 24px 70px rgba(4, 10, 24, .35); animation: po-in .25s cubic-bezier(.2, .9, .25, 1.1) both; }
.po-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.po-icon { position: relative; flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; transition: background .2s ease; }
.po-mark { width: 38px; height: 38px; transition: opacity .15s ease, transform .2s ease; }
.po-check, .po-cross { position: absolute; width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.po-check path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.po-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: var(--text-strong, var(--text)); background: none; padding: 0; }
.po-msg { margin: 0 0 16px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.po-track { height: 8px; border-radius: 8px; background: rgba(127, 140, 160, .2); overflow: hidden; }
.po-track i { display: block; width: 38%; height: 100%; border-radius: 8px; background: var(--primary, #1a6fd0);
  animation: po-slide 1.3s cubic-bezier(.65, 0, .35, 1) infinite; }
.po-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.print-overlay.done .po-track i { animation: none; width: 100%; transition: width .25s ease; }
.print-overlay.ok .po-track i { background: var(--success); }
.print-overlay.ok .po-icon { background: var(--success); }
.print-overlay.ok .po-mark, .print-overlay.failed .po-mark { opacity: 0; transform: scale(.6); }
.print-overlay.ok .po-check { opacity: 1; }
.print-overlay.ok .po-check path { animation: po-draw .35s ease forwards .05s; }
.print-overlay.failed .po-icon { background: var(--danger); }
.print-overlay.failed .po-cross { opacity: 1; }
.print-overlay.failed .po-track i { background: var(--danger); }
.print-overlay.failed .po-msg { color: var(--danger); }
.print-overlay.closing .po-card { opacity: 0; transform: translateY(6px) scale(.98); transition: opacity .15s ease, transform .15s ease; }
@keyframes po-slide { from { transform: translateX(-110%); } to { transform: translateX(270%); } }
@keyframes po-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes po-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .po-track i, .po-card, .receive-list li.flash, .po-check path { animation: none; } .po-check path { stroke-dashoffset: 0; } }
.receive-row { display: flex; gap: 6px; }
.receive-row input { flex: 1; min-width: 0; }

/* ---------- Till: after the payment, the invoice ---------- */
dialog.done-dialog { max-width: 480px; }
.invoice-choice { border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px 12px; margin: 10px 0 12px; }
.invoice-choice legend { font-weight: 700; font-size: 12.5px; padding: 0 4px; }
.invoice-choice .choice { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 4px; cursor: pointer; }
.invoice-choice .choice:hover { background: var(--blue-soft); }
.invoice-choice .choice[hidden] { display: none; }
.invoice-choice .field { margin: 6px 0 8px; }
.invoice-choice input[type=email] { width: 100%; font-size: 15px; padding: 8px 10px; }
.done-peppol, .done-msg { margin: 6px 0; padding: 7px 10px; font-size: 12.5px; border-left: 3px solid; border-radius: 2px; }
.done-peppol.ok, .done-msg.ok { background: var(--success-soft, #eaf6ec); border-color: var(--success); }
.done-peppol.warn, .done-msg.warn { background: var(--warning-soft); border-color: var(--warning); }

/* Label design (settings/label_design.php, label-editor.js). */
.lde { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .lde { grid-template-columns: 1fr; } }
.lde-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.lde-toolbar select { width: auto; min-width: 160px; }
.lde-spacer { flex: 1; }
.lde-stage { display: flex; justify-content: center; padding: 24px 12px; border-radius: 10px; background: repeating-conic-gradient(var(--surface-2, #f1f3f7) 0 25%, transparent 0 50%) 0 0 / 16px 16px; overflow: auto; }
.lde-canvas { position: relative; background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .25); touch-action: none; outline: none; user-select: none; }
.lde-el { position: absolute; box-sizing: border-box; color: #000; cursor: move; overflow: hidden; outline: 1px dashed rgba(0, 120, 255, .35); }
.lde-el span { display: block; width: 100%; font-family: Arial, Helvetica, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lde-el.lde-name span, .lde-el.lde-item span, .lde-el.lde-problem span { white-space: normal; }
.lde-el.is-bold span { font-weight: 700; }
.lde-el.lde-banner, .lde-el.lde-line, .lde-el.lde-box { background: #000; color: #fff; }
.lde-el.lde-banner span { display: flex; align-items: center; justify-content: center; height: 100%; }
.lde-el.lde-barcode i { display: block; height: 100%; background: repeating-linear-gradient(90deg, #000 0 2px, #fff 2px 3px, #000 3px 4px, #fff 4px 6px, #000 6px 9px, #fff 9px 10px); }
.lde-el.is-selected { outline: 2px solid #1a6fd0; z-index: 2; }
.lde-handle { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; background: #1a6fd0; border: 2px solid #fff; border-radius: 3px; cursor: nwse-resize; display: none; }
.lde-el.is-selected .lde-handle { display: block; }
.lde-preview { margin-top: 16px; }
.lde-preview img { display: block; max-width: 100%; border: 1px solid var(--border-strong); image-rendering: pixelated; }
.lde-props .field input, .lde-props .field select { width: 100%; }
.lde-props .btn-block { margin-top: 12px; }
.lde-toast { margin: 0 0 10px; }

/* Phones: the logo (wider since the 2026 logo), the tools and the account
   menu fit on one line; long example lines and wide tables stay inside. */
@media (max-width: 600px) {
  .topbar-row { gap: 10px; padding-left: 10px; padding-right: 10px; }
  .brand-logo, html.app .brand-logo { height: 24px; }
  .topbar-tools { gap: 2px; }
  .user-menu { margin-left: 2px; }
  .user-menu .dropdown { max-width: calc(100vw - 20px); }
  .table td { overflow-wrap: anywhere; }
}
@media (max-width: 370px) {
  .brand-logo, html.app .brand-logo { height: 20px; }
}
.card p > code { overflow-wrap: anywhere; word-break: break-word; }
.legal-links a { display: inline-block; margin-right: 10px; }
.legal-links a::first-letter { text-transform: uppercase; }
.terms-check { align-items: flex-start; gap: 8px; }
.auth-legal { margin-top: 18px; text-align: center; }

/* "Update all servers" (/admin › Servers) */
.server-updates { display: grid; gap: 10px; margin-top: 12px; }
.server-update { border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px; }
.server-update.is-current { border-color: var(--accent, #2b6cb0); }
.server-update-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; min-width: 0; }
.server-update-name { overflow-wrap: anywhere; }
.server-update-state { min-width: 0; overflow-wrap: anywhere; }
.server-pick { width: 18px; height: 18px; margin: 0; flex: none; }
.server-update-acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.server-update-why { color: var(--danger, #c53030); margin: -2px 0 6px; overflow-wrap: anywhere; }
.server-update progress { width: 100%; height: 8px; }
.server-update.state-failed progress { accent-color: #c53030; }
.server-update.state-cancelled progress { accent-color: #b7791f; }
.server-update.state-done progress { accent-color: #2f855a; }
.server-update.state-restarting progress, .server-update.is-stopping progress { opacity: .7; }
.server-update.is-stopping .server-update-state { color: var(--warning, #b7791f); }
.update-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }
.server-mode { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.server-mode select { width: auto; min-width: 9em; }
.server-mode .check { margin: 0; white-space: nowrap; }
.update-toolbar .btn[hidden] { display: none; }
#updates [data-update-error] { margin-top: 10px; }
/* "Who is doing this?" (PIN of the person) */
dialog.pin-dialog { max-width: 380px; }
.pin-confirm { max-width: 460px; }

/* Leaving for a sign-in page (Billit, Viva.com, SumUp) */
.away { max-width: 420px; margin: 18vh auto 0; padding: 0 16px; text-align: center; }
.away .brand-logo { height: 40px; width: auto; margin-bottom: 12px; }
.away h1 { font-size: 1.3rem; }
.oauth-wait { max-width: 560px; margin: 8vh auto; text-align: center; }
.oauth-wait .spinner { width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--border, #ddd); border-top-color: var(--primary, #2563eb); animation: oauth-spin 0.9s linear infinite; }
@keyframes oauth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .oauth-wait .spinner { animation: none; } }

/* ======================================================================
   The home screen: widgets on a grid of 12 columns, each person arranges
   them (Edit home screen: move by the handle, resize by the corner or
   the arrows, add and remove). Rows are 104 px; a widget's content
   scrolls inside it when it is small.
   ====================================================================== */
.dash-root { position: relative; }
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 108px; grid-auto-flow: dense; gap: 14px; margin-bottom: 16px; }
.dash-w { position: relative; display: flex; min-width: 0; min-height: 0; container-type: inline-size; }
/* The content follows the widget's own size (not the screen's). */
.dash-w .stat .label, .dash-w .stat .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-w .stat .value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 460px) {
  .dash-card .job { flex-wrap: wrap; row-gap: 6px; }
  .dash-card .job .what { flex-basis: calc(100% - 70px); }
  .dash-card .job .job-mech { display: none; }
  .dash-card .table th:nth-child(2), .dash-card .table td:nth-child(2) { display: none; }
}
@container (max-width: 300px) {
  .dash-card .job .what { flex-basis: 100%; }
  .dash-card .table th:nth-child(3), .dash-card .table td:nth-child(3) { display: none; }
}
/* "Go to" when small: the icons only (the name shows on hover). */
@container (max-width: 380px) {
  .dash-card .quicklinks { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
  .dash-card .quicklinks a { justify-content: center; padding: 10px 6px; }
  .dash-card .quicklinks a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dash-card .quicklinks svg.icon { width: 22px; height: 22px; }
}
/* Numbers that always fit their widget. */
.dash-w .stat .value { font-size: clamp(17px, 10cqi, 26px); }
.dash-w .stat .label { font-size: clamp(10px, 5.4cqi, 12px); }
@container (max-width: 240px) {
  .dash-root.editing .dash-tools { gap: 0; padding: 2px; }
  .dash-tools button, [data-design="touch"] .dash-tools button { width: 25px; height: 28px; }
  .dash-tools button svg.icon { width: 14px; height: 14px; }
}
.dash-w > .dash-card { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; margin: 0; overflow: hidden; }
.dash-w > .stat.dash-card { justify-content: center; }
.dash-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.dash-card .bars { flex: 1; height: auto; min-height: 60px; }
.dash-card progress { flex: none; }
.dash-card .jobs { margin-top: 4px; }
.dash-card .quicklinks { align-content: start; }
.dash-w.w-1 { grid-column: span 1; }
.dash-w.w-2 { grid-column: span 2; }
.dash-w.w-3 { grid-column: span 3; }
.dash-w.w-4 { grid-column: span 4; }
.dash-w.w-5 { grid-column: span 5; }
.dash-w.w-6 { grid-column: span 6; }
.dash-w.w-7 { grid-column: span 7; }
.dash-w.w-8 { grid-column: span 8; }
.dash-w.w-9 { grid-column: span 9; }
.dash-w.w-10 { grid-column: span 10; }
.dash-w.w-11 { grid-column: span 11; }
.dash-w.w-12 { grid-column: span 12; }
.dash-w.h-1 { grid-row: span 1; }
.dash-w.h-2 { grid-row: span 2; }
.dash-w.h-3 { grid-row: span 3; }
.dash-w.h-4 { grid-row: span 4; }
.dash-w.h-5 { grid-row: span 5; }
.dash-w.h-6 { grid-row: span 6; }
.dash-w.h-7 { grid-row: span 7; }
.dash-w.h-8 { grid-row: span 8; }
.dash-tools, .dash-resize, .dash-bar { display: none; }
.dash-root.editing .dash-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; position: sticky; top: 8px; z-index: 20;
  margin-bottom: 14px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--blue-line); border-radius: var(--radius); box-shadow: var(--shadow); }
.dash-bar-text { color: var(--muted); font-size: 12px; flex: 1 1 260px; }
.dash-bar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dash-bar select { min-width: 200px; }
.dash-root.editing .dash-w { outline: 2px dashed var(--blue-line); outline-offset: 3px; border-radius: var(--radius); }
.dash-root.editing .dash-card { pointer-events: none; user-select: none; }
.dash-root.editing .dash-tools { display: flex; flex-wrap: wrap; gap: 2px; position: absolute; top: 6px; right: 6px; z-index: 6; max-width: calc(100% - 12px);
  padding: 3px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px; box-shadow: var(--shadow); }
.dash-tools button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--text); cursor: pointer; }
.dash-tools button:hover { background: var(--hover); }
.dash-tools button svg.icon { width: 16px; height: 16px; }
.dash-tools .dash-move { cursor: grab; touch-action: none; }
.dash-tools .dash-remove { color: var(--danger); }
.dash-root.editing .dash-resize { display: block; position: absolute; right: 0; bottom: 0; z-index: 6; width: 30px; height: 30px; cursor: nwse-resize; touch-action: none; }
.dash-root.editing .dash-resize::after { content: ""; position: absolute; right: 7px; bottom: 7px; width: 13px; height: 13px; border-right: 3px solid var(--blue); border-bottom: 3px solid var(--blue); border-radius: 0 0 4px 0; }
  border-radius: 0 0 var(--radius) 0; background: linear-gradient(135deg, transparent 50%, var(--blue) 50%, var(--blue) 58%, transparent 58%, transparent 70%, var(--blue) 70%, var(--blue) 78%, transparent 78%); }
.dash-w.dragging { opacity: .55; z-index: 12; }
.dash-w.dragging .dash-move { cursor: grabbing; }
.dash-w.resizing { outline-color: var(--blue) !important; outline-style: solid !important; }
.dash-w.removing { animation: dash-out .22s ease forwards; }
@keyframes dash-out { to { opacity: 0; transform: scale(.92); } }
.dash-empty { text-align: center; padding: 30px; }
@media (max-width: 1100px) {
  .dash { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .dash-w.w-1 { grid-column: span 2; }
  .dash-w.w-2 { grid-column: span 2; }
  .dash-w.w-3 { grid-column: span 3; }
  .dash-w.w-4 { grid-column: span 3; }
  .dash-w.w-5 { grid-column: span 3; }
  .dash-w.w-6 { grid-column: span 3; }
  .dash-w.w-7 { grid-column: span 6; }
  .dash-w.w-8 { grid-column: span 6; }
  .dash-w.w-9 { grid-column: span 6; }
  .dash-w.w-10 { grid-column: span 6; }
  .dash-w.w-11 { grid-column: span 6; }
  .dash-w.w-12 { grid-column: span 6; }
}
@media (max-width: 700px) {
  .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dash-w.w-1 { grid-column: span 1; }
  .dash-w.w-2 { grid-column: span 1; }
  .dash-w.w-3 { grid-column: span 1; }
  .dash-w.w-4 { grid-column: span 2; }
  .dash-w.w-5 { grid-column: span 2; }
  .dash-w.w-6 { grid-column: span 2; }
  .dash-w.w-7 { grid-column: span 2; }
  .dash-w.w-8 { grid-column: span 2; }
  .dash-w.w-9 { grid-column: span 2; }
  .dash-w.w-10 { grid-column: span 2; }
  .dash-w.w-11 { grid-column: span 2; }
  .dash-w.w-12 { grid-column: span 2; }
  .dash-root.editing .dash-resize { display: none; }
}

/* ---------------------------------------------------------------- big screens (classic)
   More of the screen and more side by side. */
@media (min-width: 1600px) {
  .topbar-row, .page { max-width: 1680px; }
  .grid-main { grid-template-columns: minmax(0, 3fr) minmax(300px, 1fr); }
  .form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 2100px) {
  .topbar-row, .page { max-width: 2040px; }
  .grid-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

/* ---------------------------------------------------------------- profile photos */
.user-menu .user-photo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; }
.dropdown-person { display: flex; align-items: center; gap: 10px; }
.dropdown-person .big { width: 40px; height: 40px; flex: none; }
.dropdown-person .user-photo.big { border-radius: 50%; object-fit: cover; }
.avatar-edit { display: flex; align-items: center; gap: 18px; }
.avatar-preview { flex: none; width: 88px; height: 88px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--blue-soft, #e8f0fb); color: var(--blue, #2b6cb0); font-size: 28px; font-weight: 800; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-edit-text { min-width: 0; flex: 1; }
.avatar-edit-text h2 { margin-top: 0; }
.avatar-edit .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.avatar-edit label.btn { cursor: pointer; }
.avatar-edit label.btn.is-busy { opacity: .6; pointer-events: none; }
@media (max-width: 520px) { .avatar-edit { flex-direction: column; align-items: flex-start; } }
.break-all { word-break: break-all; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { flex: 1; min-width: 0; }
.sumup-steps { margin: 6px 0 14px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius, 6px); background: var(--surface-2); }
.sumup-steps summary { cursor: pointer; font-weight: 700; }
.sumup-steps ol { margin: 10px 0 6px; padding-left: 20px; display: grid; gap: 6px; }
.card-pad-x { margin: 0 16px 12px; }

/* ---------- The public demo (Services\PublicDemo, demo.js) ---------- */
.tk-demo-restart body { visibility: hidden; }
.demo-kinds { display: grid; gap: 8px; margin-bottom: 14px; }
.demo-kind { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.demo-kind:hover, .demo-kind:focus-visible { border-color: var(--blue); background: var(--blue-soft); }
.demo-kind-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
.demo-kind-icon svg.icon { width: 22px; height: 22px; }
.demo-kind-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.demo-kind-text b { color: var(--text-strong); }
.demo-kind-text span { color: var(--muted); font-size: 12px; }
.demo-kind-text em { font-style: normal; font-size: 12px; color: var(--link); }
.demo-kind-go { flex: none; color: var(--muted); }
.demo-facts { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.demo-facts li { display: flex; gap: 8px; align-items: flex-start; }
.demo-facts svg.icon { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.demo-hint { display: flex; gap: 8px; align-items: center; margin: -6px 0 12px; padding: 8px 10px; border-radius: var(--radius); background: var(--blue-soft); color: var(--text-strong); font-size: 13px; }
.demo-hint svg.icon { flex: none; width: 16px; height: 16px; color: var(--blue); }
.pinpad button.is-pressed { background: var(--blue); border-color: var(--blue); color: #fff; transform: scale(.96); }
.demo-off-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.demo-off-note::before { content: "⦸ "; }
.demo-off-button[disabled] { opacity: .5; cursor: not-allowed; }
a.demo-off-link { opacity: .5; cursor: not-allowed; }
.tk-demo-badge { position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 2147483000; display: flex; gap: 8px; align-items: center; padding: 5px 12px; border-radius: 999px; background: rgba(27, 31, 75, .9); color: #fff; font-size: 12px; line-height: 1.2; pointer-events: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); white-space: nowrap; }
.tk-demo-badge b { padding: 1px 7px; border-radius: 999px; background: #1a6fd0; font-weight: 700; letter-spacing: .02em; }
@media print { .tk-demo-badge, .tk-tour-veil, .tk-tour-spot, .tk-tour-pop, .tk-tour-chip { display: none !important; } }
.tk-demo-tour-btn { pointer-events: auto; margin-left: 2px; padding: 3px 10px; border: 0; border-radius: 999px; background: #fff; color: #1b1f4b; font: inherit; font-weight: 700; cursor: pointer; }
.tk-demo-tour-btn:hover, .tk-demo-tour-btn:focus-visible { background: #dbe8fa; outline: none; }
/* The guided tour of the demo (demo.js) */
.tk-tour-veil { position: fixed; inset: 0; z-index: 2147483100; background: transparent; }
.tk-tour-veil.is-dim { background: rgba(14, 18, 48, .55); }
.tk-tour-spot { position: fixed; z-index: 2147483101; border-radius: 12px; box-shadow: 0 0 0 3px #1a6fd0, 0 0 0 9999px rgba(14, 18, 48, .55); pointer-events: none; transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; }
.tk-tour-spot.is-off { display: block; left: 50% !important; top: 50% !important; width: 0 !important; height: 0 !important; box-shadow: 0 0 0 9999px rgba(14, 18, 48, .55); }
.tk-tour-pop { position: fixed; z-index: 2147483102; width: min(420px, calc(100vw - 32px)); padding: 16px 18px 14px; border-radius: 12px; background: #fff; color: #1b1f4b; box-shadow: 0 18px 50px rgba(10, 14, 40, .35); font-family: "Technik Sans", Nunito, system-ui, sans-serif; font-size: 14px; line-height: 1.5; }
.tk-tour-pop.is-center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); }
.tk-tour-pop.is-dock { left: 16px; right: 16px; bottom: 52px; top: auto; width: auto; }
.tk-tour-pop h2 { margin: 2px 0 6px; font-size: 18px; line-height: 1.3; color: #1b1f4b; }
.tk-tour-pop.is-ask h2 { font-size: 20px; }
.tk-tour-pop p { margin: 0 0 12px; color: #3d4266; }
.tk-tour-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tk-tour-step { font-size: 12px; font-weight: 700; color: #1a6fd0; text-transform: uppercase; letter-spacing: .04em; }
.tk-tour-x { width: 30px; height: 30px; margin: -6px -8px 0 0; border: 0; border-radius: 8px; background: transparent; color: #6b7095; font-size: 22px; line-height: 1; cursor: pointer; }
.tk-tour-x:hover { background: #eef1f8; color: #1b1f4b; }
.tk-tour-bar { height: 4px; margin: 0 0 12px; border-radius: 4px; background: #e6eaf4; overflow: hidden; }
.tk-tour-progress { display: block; height: 100%; }
.tk-tour-progress i { display: block; height: 100%; border-radius: 4px; background: #1a6fd0; transition: width .3s ease; }
.tk-tour-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-tour-foot .tk-tour-quit { font-size: 13px; }
.tk-tour-space { flex: 1; }
.tk-tour-foot button, .tk-tour-docs { min-height: 38px; min-width: 0; margin: 0; padding: 7px 14px; letter-spacing: normal; line-height: 1.2; white-space: nowrap; box-shadow: none; border-radius: 8px; border: 1px solid #d5dbea; background: #fff; color: #1b1f4b; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.tk-tour-pop button { font-family: inherit; }
.tk-tour-foot .tk-tour-next { background: #1a6fd0; border-color: #1a6fd0; color: #fff; }
.tk-tour-foot .tk-tour-next:hover { background: #155db0; }
.tk-tour-foot .tk-tour-quit { border-color: transparent; color: #6b7095; padding-left: 4px; padding-right: 4px; }
.tk-tour-foot .tk-tour-quit:hover { color: #1b1f4b; }
.tk-tour-foot button:focus-visible, .tk-tour-docs:focus-visible { outline: 3px solid rgba(26, 111, 208, .35); outline-offset: 1px; }
.tk-tour-docs { color: #1a6fd0; border-color: #b9cff0; }
.tk-tour-chip { position: fixed; right: 16px; bottom: 48px; z-index: 2147483050; padding: 9px 16px; border: 0; border-radius: 999px; background: #1a6fd0; color: #fff; font: 700 13px/1.2 "Technik Sans", Nunito, system-ui, sans-serif; box-shadow: 0 8px 22px rgba(26, 111, 208, .35); cursor: pointer; }
.tk-tour-chip:hover { background: #155db0; }
@media (prefers-reduced-motion: reduce) { .tk-tour-spot, .tk-tour-progress i { transition: none; } }

/* ---------- Gift vouchers, discounts, scan window ---------- */
.ticket-disc { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; padding: 8px 0 2px; font-size: 12.5px; }
.ticket-disc label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-weight: 600; margin: 0; }
.ticket-disc label .icon { width: 14px; height: 14px; }
.ticket-disc-in { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.ticket-disc-in input { width: 64px; text-align: right; padding: 3px 6px; min-height: 26px; }
.ticket-disc-note { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; min-height: 0; }
.ticket-disc-note:empty { display: none; }
.ticket-disc-note.ok { color: var(--success); font-weight: 600; }
.tline.is-voucher .desc::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--primary); margin-right: 6px; vertical-align: 1px; }
.done-vouchers { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
dialog.voucher-dialog { max-width: 480px; }
.voucher-dialog .form-actions { flex-wrap: wrap; align-items: center; }
.voucher-info { border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; margin: 8px 0 4px; background: var(--surface-2, var(--stripe)); }
.vi-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vi-code { font-weight: 700; letter-spacing: .04em; }
.vi-balance { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 2px; }
.vi-balance b { font-size: 24px; font-variant-numeric: tabular-nums; color: var(--primary); }
.vi-meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.voucher-amounts { grid-template-columns: repeat(4, 1fr); }
.voucher-card .voucher-face { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; max-width: 420px; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.vf-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.vf-top span { font-weight: 800; letter-spacing: .06em; color: var(--text-strong, var(--text)); }
.vf-top b { font-size: 26px; color: var(--primary); font-variant-numeric: tabular-nums; }
.vf-name { margin-top: 2px; color: var(--muted); }
.vf-code { margin-top: 10px; text-align: center; }
.vf-code .barcode { width: 100%; height: 56px; display: block; }
.vf-code span { display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; margin-top: 4px; }
.vf-foot { margin-top: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--text); font-size: 12.5px; margin: 0 0 10px; }
.filter-chip .icon { width: 14px; height: 14px; }
.discount-form details { margin: 6px 0; }
.discount-form summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.disc-cats { display: grid; gap: 4px; margin-top: 6px; max-height: 320px; overflow: auto; }
.disc-cat { display: grid; grid-template-columns: 1fr 64px auto; align-items: center; gap: 6px; font-size: 13px; margin: 0; }
.disc-cat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input.input-pct { text-align: right; max-width: 90px; }
.lde-size { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); margin: 0; }
.lde-size input { width: 58px; padding: 3px 5px; min-height: 26px; }
dialog.scan-dialog { max-width: 620px; }
.scan-head { display: flex; align-items: center; gap: 10px; background: var(--head); color: #fff; padding: 6px 8px 6px 16px; }
.scan-head h2 { padding: 0; background: none; font-size: 14px; flex: 1; font-family: var(--mono); }
.scan-head .scan-x { color: inherit; }
.scan-head .scan-x .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.scan-who { margin-bottom: 6px; }
.scan-name { font-size: 18px; font-weight: 800; }
.scan-contact { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; margin-top: 2px; }
.scan-item { font-weight: 600; margin: 2px 0 8px; }
.scan-dialog h3 { margin: 10px 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.scan-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.scan-facts { margin: 10px 0; font-size: 13px; }
.scan-lines { margin: 6px 0 10px; font-size: 13px; }
.scan-lines .scan-total td { font-weight: 800; border-top: 2px solid var(--line); }
.scan-balance { display: flex; justify-content: space-between; align-items: baseline; }
.scan-balance b { font-size: 30px; color: var(--primary); font-variant-numeric: tabular-nums; }
.scan-dialog .form-actions { flex-wrap: wrap; }
