/* SafeWay Logistik – interface styles
   Brand colours are taken from the logo: blue (text) and the red-to-orange gradient (icon). */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* strong ease-out: moves at once, settles softly */
  --blue: #122ad2;
  --blue-dark: #0c1e9e;
  --blue-tint: #eef0fd;
  --orange-1: #ee4337;
  --orange-2: #f3703a;
  --orange-3: #faac41;

  --ink: #0f0b10;
  --ink-2: #4a4750;
  --muted: #6b6873;
  --bg: #f6f6fa;
  --surface: #ffffff;
  --line: #e4e4ee;
  --line-strong: #c9c9d8;

  --good: #1b6b3f;
  --good-bg: #e8f5ee;
  --bad: #b3261e;
  --bad-bg: #fdecea;
  --bad-ink: #8c1d18;

  --radius: 14px;
  --radius-sm: 8px;
  --gutter: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* Phone feel (mobile-native skill): no grey flash on tap, taps fire at once (no
   double-tap-zoom wait), and holding a finger on a control doesn't select its label. */
html { -webkit-tap-highlight-color: transparent; }
a, button, summary, label, [role=button] { touch-action: manipulation; }
button, .btn, .chip-btn, .nav-toggle, .lang button, summary { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh; /* phones: the visible height, not the one with the address bar hidden */
  display: flex;
  flex-direction: column;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 1.0625rem; line-height: 1.3; font-weight: 650; }

a { color: var(--blue); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration: underline; } }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- header */

.strip {
  height: 4px;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2), var(--orange-3));
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.brand { display: inline-flex; flex: none; }
.brand img { display: block; height: 44px; width: auto; }

.main-nav { display: flex; gap: 4px; }
.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-weight: 550;
}
@media (hover: hover) and (pointer: fine) { .main-nav a:hover { background: var(--blue-tint); color: var(--blue); text-decoration: none; } }
.main-nav a.is-active { background: var(--blue-tint); color: var(--blue); font-weight: 650; }

/* Hamburger button that opens the nav as a dropdown on narrow screens.
   Hidden on wider screens, where the nav already shows inline above. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .nav-toggle:hover { background: var(--blue-tint); border-color: #b9c0f3; } }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; transition: transform 0.15s ease, top 0.15s ease; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.lang button {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 5px 10px;
  border: 0;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
}
.lang button + button { border-left: 1px solid var(--line-strong); }
@media (hover: hover) and (pointer: fine) { .lang button:hover { background: var(--blue-tint); } }
.lang button.is-on { background: var(--blue); color: #fff; }

.user { display: flex; align-items: center; gap: 10px; }
.user form { margin: 0; }
.user-name { font-weight: 600; font-size: 0.9375rem; }
.link-quiet { color: var(--ink-2); font-size: 0.875rem; }

.is-login .brand,
.is-login .main-nav { display: none; }

/* ------------------------------------------------------------------ page */

.page { flex: 1; padding-top: 28px; padding-bottom: 48px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.page-head .muted { margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.back-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.section-gap { margin-top: 20px; }

/* ----------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card > h2 + .small { margin-top: 2px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.card > h2 { margin-bottom: 4px; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 20px;
  align-items: start;
}
.grid-2.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.link { font-weight: 600; font-size: 0.9375rem; }
.link-plain { color: var(--ink); font-weight: 550; }

.empty { color: var(--muted); padding: 16px 0 4px; }
.empty-state {
  text-align: center;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

/* ----------------------------------------------------------- stat tiles */

.tiles {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--ink);
}
@media (hover: hover) and (pointer: fine) { a.tile:hover { text-decoration: none; border-color: var(--line-strong); } }
.tile-hero { background: var(--blue-tint); border-color: #d9ddfa; }
@media (hover: hover) and (pointer: fine) { a.tile-hero:hover { border-color: #b9c0f3; } }

.tile-label { color: var(--ink-2); font-size: 0.9375rem; font-weight: 550; }
.tile-value {
  font-size: 2rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.tile-value-hero { font-size: 3.5rem; letter-spacing: -0.03em; }

/* ------------------------------------------------ department bar chart */

.bars { margin-top: 12px; }

.bar-row {
  display: grid;
  grid-template-columns: minmax(96px, 30%) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.bar-row:focus-visible { background: var(--bg); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .bar-row:hover { background: var(--bg); text-decoration: none; } }

.bar-label {
  font-size: 0.9375rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plot {
  position: relative;
  height: 28px;
  margin-right: 88px;              /* room for the value at the bar tip */
  border-left: 1px solid var(--line-strong);
}
.bar {
  position: absolute;
  left: 0;
  top: 4px;
  height: 20px;                    /* thin bars, never fill the row */
  width: calc(var(--w) * 1%);
  background: var(--blue);
  border-radius: 0 4px 4px 0;      /* rounded data end, square at the baseline */
}
.bar-value {
  position: absolute;
  left: calc(var(--w) * 1%);
  top: 50%;
  transform: translateY(-50%);
  padding-left: 8px;
  display: flex;
  gap: 6px;
  align-items: baseline;
  white-space: nowrap;
  font-size: 0.9375rem;
}
.bar-value .muted { font-size: 0.8125rem; }

.twin { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.twin summary {
  cursor: pointer;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 2px 0;
}
.twin[open] summary { margin-bottom: 8px; }

/* --------------------------------------------------------- people lists */

.avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-tint);
  color: var(--blue-dark);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.avatar-sm { width: 28px; height: 28px; font-size: 0.75rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.25rem; }

.people { list-style: none; margin: 8px 0 0; padding: 0; }
.people li + li { border-top: 1px solid var(--line); }
.people a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: var(--ink);
}
@media (hover: hover) and (pointer: fine) { .people a:hover { text-decoration: none; } }
@media (hover: hover) and (pointer: fine) { .people a:hover strong { color: var(--blue); } }
.person { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.person strong { font-weight: 600; }
.person .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.person-head { display: flex; align-items: center; gap: 16px; }

/* --------------------------------------------------------------- tables */

.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th {
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table th.num { text-align: right; }
.sort-link { color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .sort-link:hover { color: var(--ink); text-decoration: underline; } }
.sort-link.is-active { color: var(--blue); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .table-list tbody tr:hover td { background: #fafaff; } }
.table-compact th, .table-compact td { padding-left: 0; padding-right: 0; }
.table-compact td { padding-top: 9px; padding-bottom: 9px; }
.table-compact th:last-child, .table-compact td:last-child { padding-left: 16px; }

.table-card { padding: 4px 6px; overflow-x: auto; }

.person-link { display: flex; align-items: center; gap: 12px; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .person-link:hover { text-decoration: none; } }
@media (hover: hover) and (pointer: fine) { .person-link:hover strong { color: var(--blue); } }
.only-narrow { display: none; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eeeef3;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-good { background: var(--good-bg); color: var(--good); }

/* -------------------------------------------------------------- filters */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
  margin-bottom: 16px;
  padding: 16px 20px;
  /* above the list below it, so the "Choose columns" menu isn't hidden (the
     page's entry animation gives every card its own layer) */
  position: relative;
  z-index: 10;
}
.filters .field { margin: 0; min-width: 160px; }
.filters .field.grow { flex: 1 1 240px; }
.filter-actions { display: flex; gap: 8px; }

.col-picker { position: relative; }
.col-picker summary { list-style: none; cursor: pointer; }
.col-picker summary::-webkit-details-marker { display: none; }
.col-picker-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-width: 180px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.col-picker-menu .check span { font-weight: 400; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

/* ---------------------------------------------------------------- forms */

.field { margin-bottom: 14px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
}
.req { color: var(--bad); }

input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
input[type="number"], input[type="date"], input[type="search"], input[type="password"],
select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  height: 42px;
  line-height: 1.25;
}
textarea { height: auto; min-height: 84px; }
@media (hover: hover) and (pointer: fine) { input:hover, select:hover, textarea:hover { border-color: #a9a9c0; } }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 0;
  border-color: var(--blue);
}
input[aria-invalid="true"], .field.has-error input { border-color: var(--bad); }

.form { max-width: 760px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; }
.check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--blue); }
.check span { font-weight: 600; color: var(--ink); font-size: 0.9375rem; }

.errorlist {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  color: var(--bad-ink);
  font-size: 0.875rem;
  font-weight: 550;
}
.errorlist li::before { content: "! "; font-weight: 800; }

.alert {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-weight: 550;
}
.alert-bad { background: var(--bad-bg); color: var(--bad-ink); border: 1px solid #f3c3bf; }
.alert .errorlist { margin: 0; }

/* -------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  padding: 10px 18px;
  min-height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) { .btn:hover { text-decoration: none; } }
.btn-sm { padding: 6px 12px; min-height: 34px; font-size: 0.875rem; }
.btn .icon { flex: none; }
.btn-sm .icon { width: 14px; height: 14px; }
.card-head .actions { justify-content: flex-end; }
.btn-block { width: 100%; }

.btn-primary { background: var(--blue); color: #fff; }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: var(--blue-dark); } }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { background: var(--bg); } }

.btn-danger { background: var(--bad); color: #fff; }
@media (hover: hover) and (pointer: fine) { .btn-danger:hover { background: var(--bad-ink); } }
.btn-danger-ghost { background: var(--surface); color: var(--bad); border-color: #e7b3af; }
@media (hover: hover) and (pointer: fine) { .btn-danger-ghost:hover { background: var(--bad-bg); } }

.is-disabled { opacity: 0.5; pointer-events: none; }

/* ------------------------------------------------------------- key/value */

.facts { margin: 8px 0 0; }
.facts > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.facts > div:first-child { border-top: 0; }
.facts dt { color: var(--muted); font-size: 0.9375rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.confirm { max-width: 620px; display: grid; gap: 12px; }
.confirm .note { margin-top: 0; }
.confirm-name { font-size: 1.25rem; font-weight: 700; }

/* ------------------------------------------------------------- messages */

.messages { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--good-bg);
  color: var(--good);
  border: 1px solid #c5e5d2;
  font-weight: 600;
}
.message.error { background: var(--bad-bg); color: var(--bad-ink); border-color: #f3c3bf; }
.message-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 50%;
  flex: none;
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1;
}

/* --------------------------------------------------------------- login */

.login { display: flex; justify-content: center; padding-top: 24px; }
.login-card { width: 100%; max-width: 420px; padding: 28px; }
.login-logo { display: block; width: 220px; max-width: 100%; height: auto; margin: 0 0 20px; }
.login-card h1 { font-size: 1.5rem; }
.login-card .muted { margin: 4px 0 20px; }

.login-extra { margin: 14px 0 0; text-align: center; font-size: 0.9375rem; }
.passkey-box { margin-top: 18px; }
.passkey-box .or { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: 0.875rem; }
.passkey-box .or::before, .passkey-box .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.passkey-hint { margin: 14px 0 0; text-align: center; }
.passkey-hint[hidden] { display: none; }
.passkey-status { margin: 10px 0 0; min-height: 1.4em; }
.passkey-box[hidden], form[data-passkey-add][hidden] { display: none; }

/* --------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 960px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile-hero { grid-column: 1 / -1; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  h1 { font-size: 1.5rem; }

  .header-bar { flex-wrap: nowrap; gap: 8px 12px; padding-bottom: 6px; position: relative; }
  .brand img { height: 34px; }
  .header-tools { gap: 10px; }
  .user-name, .link-quiet, .user .avatar { display: none; }

  .nav-toggle { display: inline-flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    flex-direction: column;
    gap: 2px;
    margin-top: 1px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 16px 32px rgba(15, 11, 16, 0.16);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { border-radius: var(--radius-sm); padding: 12px 14px; border-bottom: 0; }
  .main-nav a.is-active { background: var(--blue-tint); color: var(--blue); border-bottom: 0; }
  @media (hover: hover) and (pointer: fine) { .main-nav a:hover { background: var(--blue-tint); } }

  .page { padding-top: 20px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .btn, .actions .btn { flex: 1; }

  .col-job, .col-dept, .col-date { display: none; }
  .only-narrow { display: block; }

  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .grid-2.equal { grid-template-columns: minmax(0, 1fr); }
  .filters .field { flex: 1 1 100%; }
  .filter-actions { width: 100%; }
  .filter-actions .btn { flex: 1; }
  .login-card { padding: 22px; }
}

@media (max-width: 480px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px; gap: 8px; }
  .tile-label { font-size: 0.8125rem; line-height: 1.3; }
  .tile-hero { padding: 16px; }
  .tile-hero .tile-label { font-size: 0.9375rem; }
  .tile-value-hero { font-size: 3rem; }
  .main-nav a { padding: 12px 10px; font-size: 0.9375rem; }
  .bar-row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding-top: 8px; padding-bottom: 8px; }
  .plot { margin-right: 76px; }
  .table-compact th { white-space: normal; }
  .table-compact { font-size: 0.8125rem; }
  .table-compact th { hyphens: auto; }
  .card-head { flex-wrap: wrap; }
  .card-head .actions { justify-content: flex-start; }
  .card-head .actions .btn { flex: none; }
  .table-compact th:last-child, .table-compact td:last-child { padding-left: 8px; }
  .table-compact td.num, .table-compact th.num { padding-left: 8px; }
}

@media print {
  .site-header, .site-footer, .strip, .actions, .filters, .pager { display: none; }
  body { background: #fff; }
}

/* ------------------------------------------- documents, payroll, warnings */

[hidden] { display: none !important; }
.block { display: block; }

.card-alert { margin-bottom: 20px; border-color: #f0d9a8; background: #fffdf7; }

.badge-warn { background: #fff1d1; color: #7a4a00; }
.badge-bad { background: var(--bad-bg); color: var(--bad-ink); }

.link-danger { color: var(--bad); margin-left: 12px; }
.file-link { white-space: nowrap; }
.table-compact td:not(:last-child) { padding-right: 14px; }
.table-compact th:not(:last-child) { padding-right: 14px; }
.expiry { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.table-scroll { overflow-x: auto; }

.chip {
  display: inline-block;
  margin: 2px 6px 2px 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--ink);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.field-hint { margin-top: 6px; color: var(--muted); font-size: 0.8125rem; }
.form-section { margin: 12px 0 2px; }

input[type="file"] {
  width: 100%;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: #fafaff;
}
input[type="file"]::file-selector-button {
  font: inherit;
  font-weight: 600;
  margin-right: 12px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
textarea { resize: vertical; }

.hours { margin: 12px 0 10px; max-width: 520px; }
.hours-head,
.hours-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 88px;
  gap: 10px;
  align-items: start;
}
.hours-head {
  padding-bottom: 6px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}
.hours-row .field { margin-bottom: 10px; }
.hours-remove { align-self: center; margin-bottom: 10px; }
.hours-remove span { font-weight: 500; font-size: 0.875rem; color: var(--bad-ink); }
.hours-errors { grid-column: 1 / -1; margin-top: -6px; margin-bottom: 8px; }
.hours-errors:empty { display: none; }
[data-add-row] { margin-bottom: 8px; }

.invoice-items-table th:nth-child(1) { width: 44%; }
.invoice-items-table input[type="text"],
.invoice-items-table input[type="number"] { width: 100%; }
.invoice-items-table td .errorlist { margin-top: 4px; }
.invoice-item-remove {
  display: inline-flex; align-items: center; white-space: nowrap;
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  font-weight: 500; font-size: 0.8125rem; color: var(--bad-ink);
}
@media (hover: hover) and (pointer: fine) { .invoice-item-remove:hover { text-decoration: underline; } }
.new-client-fields {
  margin: 4px 0 18px;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.new-client-fields .form-grid { margin-top: 8px; }
.invoice-totals { max-width: 320px; margin-left: auto; }
.invoice-totals .facts > div { grid-template-columns: 1fr auto; }
.invoice-totals .grand-total dt,
.invoice-totals .grand-total dd { font-weight: 700; font-size: 1.0625rem; }

@media (max-width: 720px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack td { padding: 3px 0 !important; border: 0; text-align: left !important; }
  .table-stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
  }
  .table-stack td:last-child { padding-top: 8px !important; }
  .hours-head, .hours-row { grid-template-columns: minmax(0, 1fr) 104px; }
  .hours-remove, .hours-row .hours-remove { grid-column: 1 / -1; margin-top: -4px; }
  .col-note { display: none; }
  .link-danger { margin-left: 8px; }
  .hours { max-width: none; }
  .invoice-totals { max-width: none; }
}

/* small screens: rules that must come after the base rules above */
@media (max-width: 720px) {
  .table-stack td.col-date, .table-stack td.col-note { display: none; }
}
@media (max-width: 480px) {
  .people a { flex-wrap: wrap; }
  .expiry {
    flex-basis: 100%;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    padding-left: 48px;
    text-align: left;
  }
}

.form > .errorlist { margin: 0 0 14px; }

/* ------------------------------------------------------- license plates */
/* A small styled German plate: blue EU band (stars + "D") plus the plate
   number, in place of plain text - scoped class names (plate-eu/plate-num,
   not eu/num) so this never collides with the existing .num utility class
   used for right-aligned table columns. */

.plate {
  display: inline-flex;
  align-items: stretch;
  height: 26px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  vertical-align: middle;
  line-height: 1;
}
.plate-eu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 17px;
  padding: 2px 0;
  background: #1f4ba5;
  color: #fff;
  font-weight: 700;
  font-size: 0.5rem;
  line-height: 1.2;
}
.plate-eu i {
  font-style: normal;
  color: #f5cb2e;
  font-size: 0.5rem;
  letter-spacing: -1px;
  transform: scale(0.85, 1);
}
.plate-num {
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.plate-big { height: 42px; border-width: 3px; border-radius: 6px; }
.plate-big .plate-eu { width: 27px; font-size: 0.6875rem; }
.plate-big .plate-eu i { font-size: 0.6875rem; }
.plate-big .plate-num { padding: 0 14px; font-size: 1.375rem; }

/* ------------------------------------------- driver app, daily check, fines */

.btn-big { min-height: 56px; font-size: 1.0625rem; }
.center-text { text-align: center; margin-top: 8px; }
.section-gap-sm { margin-top: 10px; }
.plain-list { list-style: none; margin: 8px 0 0; padding: 0; }
.plain-list li { padding: 8px 0; border-top: 1px solid var(--line); }
.plain-list li:first-child { border-top: 0; }

.driver-car-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.driver-car-head .muted { margin-bottom: 4px; }
.check-done {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: var(--good-bg); color: var(--good); border: 1px solid #c5e5d2;
}

.check-vehicle { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.check-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.check-items { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.check-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-top: 1px solid var(--line);
}
.check-item:first-child { border-top: 0; }
.check-item.is-ok { background: var(--good-bg); }
.check-item.is-bad { background: var(--bad-bg); }
.check-label { font-weight: 550; }
.seg { display: inline-flex; flex: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.seg label { position: relative; margin: 0; cursor: pointer; }
.seg label + label { border-left: 1px solid var(--line-strong); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; min-height: 42px; padding: 0 12px; font-weight: 650; font-size: 0.9375rem; color: var(--ink-2); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: -2px; }
.seg-ok input:checked + span { background: var(--good); color: #fff; }
.seg-bad input:checked + span { background: var(--bad); color: #fff; }

.tabs-inline { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tabs-inline a { padding: 8px 14px; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
@media (hover: hover) and (pointer: fine) { .tabs-inline a:hover { text-decoration: none; color: var(--blue); } }
.tabs-inline a.is-active { color: var(--blue); border-bottom-color: var(--blue); }

.who { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin: 8px 0 4px; }
.result-card.is-none { border-color: #f3c3bf; background: #fffafa; }
.reply-text {
  width: 100%; min-height: 240px; margin-top: 12px; padding: 12px 14px;
  font: inherit; font-size: 0.9375rem; line-height: 1.5; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); resize: vertical;
}

@media (max-width: 480px) {
  .check-item { flex-direction: column; align-items: stretch; gap: 8px; }
  .seg { width: 100%; }
  .seg label { flex: 1; }
  .seg span { width: 100%; }
}

/* narrow phones: keep logo, menu button, language switch and sign-out on one line */
@media (max-width: 480px) {
  .header-bar { gap: 8px; }
  .brand img { height: 28px; }
  .header-tools { gap: 8px; }
  .lang button { padding: 5px 8px; }
  .user .btn-sm { padding: 6px 10px; }
}

.footer-links { display: inline-flex; gap: 16px; }
.footer-links a { color: var(--ink-2); }

/* Wide screens: slightly tighter nav links so all sections fit on one line. */
@media (min-width: 1101px) {
  .main-nav a { padding: 8px 10px; }
}

/* Tablets and small laptops: the full nav doesn't fit next to the logo and the
   user tools, so it becomes the same dropdown as on phones. */
@media (max-width: 1100px) {
  .header-bar { flex-wrap: nowrap; position: relative; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    flex-direction: column;
    gap: 2px;
    margin-top: 1px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 16px 32px rgba(15, 11, 16, 0.16);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { border-radius: var(--radius-sm); padding: 12px 14px; }
}

/* scanning a fine letter */
.scan-box { margin-bottom: 16px; border-color: #d9ddfa; background: var(--blue-tint); }
.scan-box h2 { margin-bottom: 4px; }
.scan-status { margin: 10px 0 0; font-weight: 600; }
.scan-status:empty { display: none; }
.scan-status.is-busy { color: var(--ink-2); }
.scan-status.is-ok { color: var(--good); }
.scan-status.is-warn { color: #7a4a00; }
.scan-status.is-bad { color: var(--bad-ink); }
input.is-filled, select.is-filled, textarea.is-filled { background: #fff8d6; border-color: #e0c24a; }
.scan-box .form-actions { position: relative; }
.scan-box input[type="file"] { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; }

/* ------------------------------------------------ dashboard (overview) */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; color: var(--ink); min-width: 0;
}
@media (hover: hover) and (pointer: fine) { a.kpi:hover { text-decoration: none; border-color: var(--line-strong); } }
.kpi-label { color: var(--ink-2); font-size: 0.875rem; font-weight: 600; }
.kpi-value { font-size: 2.25rem; line-height: 1; font-weight: 750; letter-spacing: -0.03em; }
.kpi-money { font-size: 1.6rem; letter-spacing: -0.02em; white-space: nowrap; }
.kpi-sub { color: var(--muted); font-size: 0.8125rem; }
.kpi-hero { background: var(--blue); border-color: var(--blue); color: #fff; }
.kpi-hero .kpi-label, .kpi-hero .kpi-sub { color: rgba(255, 255, 255, .85); }
.kpi-hot { background: var(--blue-tint); border-color: #b9c0f3; }
.kpi-hot .kpi-value { color: var(--blue); }
.kpi-warn { color: #7a4a00; font-weight: 600; }
.kpi-warn-box { background: #fff7e0; border-color: #f3d98c; }

.dash { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.dash-side { display: grid; gap: 20px; }
@media (max-width: 960px) { .dash { grid-template-columns: minmax(0, 1fr); } }

.count-pill { display: inline-block; min-width: 1.7em; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); font-size: 0.8125rem; text-align: center; vertical-align: 2px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.chip-btn { flex: none; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.chip-btn b { color: var(--muted); margin-left: 2px; }
@media (hover: hover) and (pointer: fine) { .chip-btn:hover { border-color: var(--blue); color: var(--blue); } }
.chip-btn[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-btn[aria-pressed=true] b { color: inherit; opacity: .75; }
.chip-overdue b { color: var(--bad); }
.chip-misuse b { color: var(--bad); }

.attn-rows { list-style: none; margin: 0; padding: 0; }
.attn-rows li + li { border-top: 1px solid var(--line); }
.attn-rows a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; margin: 0 -8px; border-radius: var(--radius-sm); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .attn-rows a:hover { background: var(--bg); text-decoration: none; } }
.attn-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #e7a93a; }
.sev0 .attn-dot { background: var(--bad); box-shadow: 0 0 0 0 rgba(179, 38, 30, .5); }
.sev2 .attn-dot { background: var(--line-strong); }
.attn-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.9375rem; }
.attn-text strong { font-weight: 600; }
.attn-when { flex: none; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); text-align: right; max-width: 11em; }
.sev0 .attn-when { color: var(--bad); }
.mini-plate { flex: none; font-weight: 700; font-size: 0.75rem; letter-spacing: .02em; padding: 2px 6px; border: 1.5px solid var(--ink); border-left: 6px solid #1D4FB8; border-radius: 4px; background: #fff; white-space: nowrap; }
.all-good { display: flex; align-items: center; gap: 12px; padding: 18px 0 6px; color: var(--good); font-weight: 600; }
.big-check { width: 36px; height: 36px; border-radius: 50%; background: var(--good-bg); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.show-all { margin-top: 10px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--blue); }
@media (max-width: 480px) { .attn-text { white-space: normal; } .attn-text .muted { display: none; } }

.money-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 10px; }
.money-row div { display: flex; flex-direction: column; gap: 2px; }
.money-row strong { font-size: 1.25rem; letter-spacing: -0.01em; }
.mini-list { list-style: none; margin: 0; padding: 0; font-size: 0.875rem; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list a { display: flex; gap: 10px; padding: 7px 0; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .mini-list a:hover { text-decoration: none; color: var(--blue); } }
.mini-list .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--bg); margin: 10px 0 12px; }
.stack-part { width: calc(var(--w) * 1%); min-width: 6px; transform-origin: left; }
.st-active { background: var(--good); }
.st-in_repair { background: #e7a93a; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.875rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bars-compact .plot { height: 22px; }
.bars-compact .bar { top: 4px; height: 14px; }
.people-compact a { padding-top: 8px; padding-bottom: 8px; }

/* ---------------------------------------------------------------- motion
   Only for people whose device doesn't ask for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes slide-down { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
  @keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(179, 38, 30, .45); } 70% { box-shadow: 0 0 0 7px rgba(179, 38, 30, 0); } 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, 0); } }

  /* the page glides in: its main blocks one after another */
  /* on every page, so short and small */
  .page > * { animation: rise .26s var(--ease-out) both; }
  .page > *:nth-child(2) { animation-delay: .03s; }
  .page > *:nth-child(n+3) { animation-delay: .06s; }
  .kpis > * { animation: rise .3s var(--ease-out) both; }
  .kpis > *:nth-child(2) { animation-delay: .03s; }
  .kpis > *:nth-child(3) { animation-delay: .06s; }
  .kpis > *:nth-child(n+4) { animation-delay: .09s; }
  .attn-rows li { animation: rise .24s var(--ease-out) both; }
  .attn-rows li:nth-child(2) { animation-delay: .02s; } .attn-rows li:nth-child(3) { animation-delay: .04s; }
  .attn-rows li:nth-child(n+4) { animation-delay: .06s; }
  .sev0 .attn-dot { animation: pulse-red 2s ease-out infinite; }
  .bar, .stack-part { animation: grow-x .5s var(--ease-out) both; transform-origin: left; }
  .message { animation: slide-down .3s var(--ease-out) both; }

  /* things you can press react */
  .btn, .tile, .kpi, .card, .chip-btn, .main-nav a, .people a, .attn-rows a, .bar-row, .mini-list a {
    transition: transform .18s var(--ease-out), box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
  }
  @media (hover: hover) and (pointer: fine) { a.kpi:hover, a.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(18, 42, 210, .10); } }
  .btn:active, .chip-btn:active, a.kpi:active { transform: scale(.97); }
  @media (hover: hover) and (pointer: fine) { .people a:hover .avatar { transform: scale(1.08); } }
  .avatar { transition: transform .18s ease; }
  details[open] > :not(summary) { animation: fade .25s ease; }
}

/* Payslips from one PDF (payslip_upload.html, payslip_check.html) */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 36px 16px; border: 2px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--bg); cursor: pointer; transition: border-color .15s, background .15s;
}
@media (hover: hover) and (pointer: fine) { .dropzone:hover, .dropzone.is-over { border-color: var(--blue); background: var(--blue-tint); } }
.dropzone input[type="file"] { max-width: 100%; margin-top: 6px; }
.slip-check td { vertical-align: top; }
.slip-check tr.is-open td:first-child { box-shadow: inset 3px 0 0 var(--orange-3); }
.slip-check select, .slip-new input { width: 100%; min-width: 220px; }
.slip-docs { margin: 0; padding: 0; list-style: none; }
.slip-docs li + li { margin-top: 4px; }
.slip-new { display: grid; gap: 6px; margin-top: 8px; }
.slip-ok { color: var(--good); margin-top: 4px; }
.slip-warn { color: var(--bad-ink); }
.slip-leave { color: var(--bad-ink); font-size: .85em; margin-top: 2px; }

/* Worker page: Contact · Employment · Insurance and tax, and the documents in coloured groups */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.id-card .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }  /* label above the value: "Sozialversicherungsnummer" is too long for a side column */
.id-value { font-weight: 650; letter-spacing: .02em; font-variant-numeric: tabular-nums; margin-right: 8px; }
.id-card .link + .link { margin-left: 8px; }

.doc-group { --c: var(--muted); --t: #f2f2f6; margin-top: 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--radius-sm); overflow: hidden; }
.doc-group.doc-driving { --c: #122ad2; --t: #eef0fd; }
.doc-group.doc-identity { --c: #6b3fd4; --t: #f1ecfd; }
.doc-group.doc-work { --c: #1b6b3f; --t: #e8f5ee; }
.doc-group.doc-bank { --c: #0e7490; --t: #e3f5f8; }
.doc-group.doc-payroll { --c: #c2570c; --t: #fff1e6; }
.doc-group-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--t);
  color: var(--c); font-weight: 700; cursor: pointer; list-style: none;
}
.doc-group-head::-webkit-details-marker { display: none; }
.doc-group-head::after { content: "▾"; margin-left: auto; transition: transform .2s; }
.doc-group:not([open]) .doc-group-head::after { transform: rotate(-90deg); }
.doc-group-head .count-pill { background: var(--surface); color: var(--c); }
.doc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-row {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1.8fr) auto;
  gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line);
}
@media (hover: hover) and (pointer: fine) { .doc-row:hover { background: var(--t); } }
.doc-row.is-expired { box-shadow: inset 3px 0 0 var(--bad); }
.doc-row.is-soon { box-shadow: inset 3px 0 0 var(--orange-3); }
.doc-value { overflow-wrap: anywhere; }
.doc-expiry { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.doc-actions { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.file-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 10px 4px 4px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none;
}
@media (hover: hover) and (pointer: fine) { .file-chip:hover { border-color: var(--c); color: var(--c); } }
.file-ext { flex: none; font-size: .6875rem; font-weight: 800; padding: 2px 6px; border-radius: 999px; background: var(--c); color: #fff; }
.file-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; }
@media (max-width: 860px) {
  .doc-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .doc-actions { justify-content: flex-start; }
}
/* Archived documents (1 Nov 2026): a paper replaced by a newer one of the same kind, folded under its group. */
.badge-muted { background: #eef0f4; color: var(--muted); }
.doc-archive { border-top: 1px solid var(--hair); }
.doc-archive-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; cursor: pointer; list-style: none;
  font-size: .8125rem; font-weight: 600; color: var(--muted); user-select: none;
}
.doc-archive-head::-webkit-details-marker { display: none; }
.doc-archive-head::before { content: "▸"; transition: transform .2s cubic-bezier(0.23, 1, 0.32, 1); }
.doc-archive[open] > .doc-archive-head::before { transform: rotate(90deg); }
.doc-archive-head .count-pill { background: #eef0f4; color: var(--muted); }
.doc-archive-note { font-weight: 400; }
@media (hover: hover) and (pointer: fine) { .doc-archive-head:hover { color: var(--ink); } }
.doc-row.is-archived { color: var(--muted); }
.doc-row.is-archived strong { font-weight: 600; }
.doc-row.is-archived .file-ext { background: var(--muted); }
@media (max-width: 560px) { .doc-archive-note { display: none; } }
.doc-group.doc-pay { --c: #be185d; --t: #fdf0f6; }
.pay-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 2.5fr) minmax(0, 2fr) auto; }
@media (max-width: 860px) { .pay-row { grid-template-columns: minmax(0, 1fr); } }

/* Worker page: hours per month (the monthly report's columns), one group per year */
.doc-group.doc-hours { --c: #4338ca; --t: #eef0ff; }
.hk-worked { --k: #1d4ed8; --kt: #e8efff; }
.hk-overtime { --k: #c2410c; --kt: #fff1e6; }
.hk-vacation { --k: #15803d; --kt: #e7f6ec; }
.hk-sick { --k: #b91c1c; --kt: #fdecec; }
.hk-holiday { --k: #7e22ce; --kt: #f4ebfd; }
.hk-unpaid { --k: #525866; --kt: #eef0f3; }
.hk-other { --k: #0e7490; --kt: #e3f5f8; }
.hours-table { display: grid; font-variant-numeric: tabular-nums; }
.hours-row { display: grid; grid-template-columns: minmax(90px, 1.1fr) repeat(7, minmax(0, 1fr)); gap: 8px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { .hours-row:not(.hours-head):hover { background: var(--t); } }
.hours-head { font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: none; background: var(--surface); }
.hours-head .hk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--k); margin-right: 5px; vertical-align: 1px; }
.hours-row [role=cell] { justify-self: start; padding: 2px 9px; border-radius: 99px; background: var(--kt); color: var(--k); font-size: 0.875rem; white-space: nowrap; }
.hours-row [role=cell].is-empty { background: none; color: var(--muted); opacity: .6; }
.hours-total { background: var(--t); font-weight: 600; }
.hours-total [role=cell] { background: var(--k); color: #fff; }
.hours-total [role=cell].is-empty { background: none; color: var(--muted); }
@media (max-width: 860px) {
  .hours-head { display: none; }
  .hours-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hours-month { grid-column: 1 / -1; }
  .hours-row [role=cell].is-empty { display: none; }
  .hours-row [role=cell]::before { content: attr(data-label) ": "; font-weight: 400; }
}
.slip-hours { display: block; color: #4338ca; }

/* "Scan document" box on the Add document page */
.doc-scan { position: relative; margin-bottom: 16px; border: 2px dashed #b9c3f5; background: #f3f5ff; }  /* holds its hidden file box (it widened the page on phones) */
.doc-scan.is-drag { border-color: #122ad2; background: #e8ecff; }
.doc-scan-head { display: flex; gap: 12px; align-items: flex-start; }
.doc-scan-head p { margin: 4px 0 0; }
.doc-scan-icon { width: 34px; height: 34px; flex: none; padding: 6px; border-radius: 10px; background: #122ad2; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.doc-scan-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.doc-scan-status { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 600; }
.doc-scan-status:empty { display: none; }
.doc-scan-status.is-busy { background: #fff; color: var(--muted); }
.doc-scan-status.is-ok { background: #e8f5ee; color: #1b6b3f; }
.doc-scan-status.is-warn { background: #fff4d6; color: #7a5200; }
.doc-scan-status.is-bad { background: var(--bad-bg); color: var(--bad-ink); }
@media (hover: none) { .doc-scan-drop { display: none; } }

/* Workers list: what's missing or running out, under each name */
.worker-flags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0 52px; }
.flag-chip { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 0.75rem; font-weight: 600; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .flag-chip:hover { text-decoration: none; filter: brightness(.95); } }
.flag-missing, .flag-over { background: var(--bad-bg); color: var(--bad-ink); }
.flag-soon { background: #fff1e6; color: #9a4a0a; }

/* On a phone the workers table becomes cards */
@media (max-width: 720px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { position: relative; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table-cards td { padding: 0; border: 0; }
  .table-cards td.col-status { position: absolute; top: 14px; right: 14px; width: auto; }
  .table-cards td:first-child { padding-right: 80px; }
  .table-cards td[data-label] { display: flex; gap: 8px; margin: 4px 0 0 52px; font-size: 0.875rem; }
  .table-cards td[data-label]::before { content: attr(data-label); color: var(--muted); min-width: 92px; }
  .table-cards td.col-job { display: none; }
  .table-cards td.col-dept, .table-cards td.col-date, .table-cards td.col-email { display: flex; }
  .worker-flags { margin-left: 52px; }
}

/* =====================================================================
   Premium finish (30 Sep 2026; emil-design-eng + apple-design skills).
   Same layout and brand colours, a quieter finish: soft layered shadows and
   hairlines instead of grey borders, tighter headings, even-width numbers,
   buttons with a light top edge, focus rings instead of hard outlines.
   ===================================================================== */
:root {
  --bg: #F5F6FA;
  --hair: rgba(15, 11, 40, .07);
  --shadow-1: 0 1px 2px rgba(15, 11, 40, .04), 0 2px 8px rgba(15, 11, 40, .05);
  --shadow-2: 0 2px 4px rgba(15, 11, 40, .04), 0 12px 28px rgba(18, 42, 210, .10);
}
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

.site-header { border-bottom-color: var(--hair); box-shadow: 0 1px 12px rgba(15, 11, 40, .04); }

h1 { letter-spacing: -.025em; }
h2 { letter-spacing: -.012em; }
.kpi-value, .kpi-money, .num, td.num, .money { font-variant-numeric: tabular-nums; }

.card, .kpi, .tile, .doc-group {
  border-color: var(--hair); box-shadow: var(--shadow-1); }
.kpi-hero { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 8px 24px rgba(18, 42, 210, .28);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 55%); }
@media (hover: hover) and (pointer: fine) {
  a.kpi:hover, a.tile:hover { box-shadow: var(--shadow-2); }
}

.btn-primary, .btn-danger {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(15, 11, 40, .14), 0 4px 12px rgba(18, 42, 210, .18);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0)); }
.btn-danger { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(15, 11, 40, .14); }
.btn-ghost, .btn-danger-ghost, .chip-btn { border-color: var(--hair); box-shadow: var(--shadow-1); }

input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
input[type="number"], input[type="date"], input[type="search"], input[type="password"],
select, textarea { border-color: rgba(15, 11, 40, .12); box-shadow: inset 0 1px 2px rgba(15, 11, 40, .04); }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(18, 42, 210, .55);
  box-shadow: 0 0 0 4px rgba(18, 42, 210, .12); }
.doc-group { border-left-color: var(--c); } /* keep its colour stripe */

/* =====================================================================
   Sign-in pages (login, forgot password) in the Fleet app's Stitch look
   (1 Oct 2026): drivers see this page first at app.swlogistik.de, so it
   matches the app behind it. Only applies to body.is-login; fonts come
   from hr/_stitch_fonts.html (fleet-fonts/). Light only, like the office.
   ===================================================================== */
.is-login {
  --s-navy: #0F172A; --s-ocean: #0284C7; --s-ink: #0F172A; --s-muted: #64748B; --s-line: #E2E8F0; --s-field: #F1F5F9;
  --s-shadow-1: 0 4px 20px -2px rgba(15, 23, 42, .05);
  --s-shadow-2: 0 8px 24px -4px rgba(15, 23, 42, .12);
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--s-ink);
  background: #F8FAFC radial-gradient(120% 60% at 100% 0%, rgba(6, 182, 212, .10) 0%, rgba(2, 132, 199, 0) 60%) no-repeat;
}
.is-login .strip { display: none; }
.is-login .site-header { background: transparent; border-bottom: 0; box-shadow: none; }
.is-login .header-bar { justify-content: flex-end; }
.is-login .lang { border: 0; border-radius: 999px; padding: 3px; background: rgba(241, 245, 249, .9); overflow: visible; gap: 2px; }
.is-login .lang button { border: 0; border-radius: 999px; padding: 6px 12px; background: transparent; color: var(--s-muted); }
.is-login .lang button + button { border-left: 0; }
.is-login .lang button.is-on { background: #fff; color: var(--s-ink); box-shadow: var(--s-shadow-2); }
@media (hover: hover) and (pointer: fine) { .is-login .lang button:not(.is-on):hover { background: transparent; color: var(--s-ink); } }

.is-login .page { padding-top: 4px; }
.is-login .login { flex-direction: column; align-items: center; padding-top: 0; }
.is-login .login > * { width: 100%; max-width: 420px; }
.is-login .login-logo { width: 132px; margin: 0 auto 18px; color: #0F172A; }

/* the SafeWay mark in the Fleet blues (hr/_sw_mark.html); it turns into a van and back */
.sw-mark { display: block; width: 100%; height: auto; overflow: visible; }
.sw-body, .sw-front, .sw-wheel, .sw-glass, .sw-road { stroke: currentColor; }
.sw-glass, .sw-hub { fill: #E0F2FE; }

/* the dark "inverted" card, as in the app */
.login-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px;
  padding: 20px 22px; border-radius: 24px 24px 0 0; color: #fff;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .1); }
.login-hero::before { content: ""; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px; border-radius: 50%;
  background: rgba(91, 184, 254, .16); filter: blur(26px); pointer-events: none; }
.login-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(6, 182, 212, .16) 0%, rgba(37, 99, 235, 0) 60%); }
.login-hero > * { position: relative; z-index: 1; }
.login-hero h1 { font-family: "Manrope", system-ui, sans-serif; font-weight: 700; font-size: 1.5rem; line-height: 1.2; letter-spacing: -.02em; color: #fff; }
.login-hero p { margin-top: 3px; font-size: .9375rem; line-height: 1.4; color: rgba(234, 241, 255, .8); }

/* the white form card joins the dark one */
.is-login .login-card { padding: 22px; border-radius: 0 0 24px 24px; border: 1px solid rgba(226, 232, 240, .9); border-top: 0;
  box-shadow: var(--s-shadow-2); background: #fff; }
.is-login .login-card > p { color: var(--s-ink); margin-bottom: 12px; }
.is-login .field label { color: var(--s-ink); font-weight: 600; font-size: .875rem; }
.is-login input[type="text"], .is-login input[type="password"] {
  height: 50px; padding: 12px 16px; border-radius: 14px; font-size: 1rem;
  background: var(--s-field); border: 1px solid transparent; box-shadow: none; }
.is-login input:focus { background: #fff; border-color: var(--s-ocean); box-shadow: 0 0 0 4px rgba(2, 132, 199, .16); }
@media (hover: hover) and (pointer: fine) { .is-login input:not(:focus):hover { border-color: var(--s-line); } }
/* the eye inside the password field: shows / hides what was typed (app.js 7) */
.pw-wrap { position: relative; }
/* Edge draws its own eye in password boxes: hide it, or there are two */
.pw-wrap input::-ms-reveal, .pw-wrap input::-ms-clear { display: none; }
.pw-wrap input { padding-right: 52px; }
.is-login .pw-wrap input[type="text"], .is-login .pw-wrap input[type="password"] { padding-right: 52px; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: var(--s-muted, var(--muted)); cursor: pointer;
  transition: color 150ms ease, transform 120ms ease-out; -webkit-tap-highlight-color: transparent; }
.pw-toggle:active { transform: translateY(-50%) scale(0.92); }
.pw-toggle:focus-visible { outline: 2px solid var(--s-ocean, var(--blue)); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .pw-toggle:hover { color: var(--s-ink, var(--ink)); } }
.pw-toggle .pw-eye-off, .pw-toggle[aria-pressed="true"] .pw-eye { display: none; }
.pw-toggle[aria-pressed="true"] .pw-eye-off { display: block; }
.is-login .btn { border-radius: 999px; min-height: 50px; font-size: 1rem; }
.is-login .btn-primary { margin-top: 6px; background: var(--s-navy); background-image: none; color: #fff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .1), 0 4px 14px -4px rgba(15, 23, 42, .4); }
.is-login .btn-ghost { background: #fff; color: var(--s-ink); border-color: var(--s-line); box-shadow: var(--s-shadow-1); }
.is-login .link { color: var(--s-ocean); }
.is-login .alert { border-radius: 16px; }
.is-login .passkey-status:empty { display: none; }
.is-login .muted { color: var(--s-muted); }
.is-login .site-footer { background: transparent; border-top: 0; color: var(--s-muted); }
@media (max-width: 640px) { .is-login .login-card { padding: 20px 18px; } .login-hero { padding: 18px; } }

/* =====================================================================
   Fleet look for the office side (1 Oct 2026). Kawa asked for the SafeWay
   site in the Fleet app's style, keeping SafeWay's own colours (brand blue,
   ink, the orange strip) and without the logo animation: Manrope titles and
   figures, Hanken Grotesk text (hr/_stitch_fonts.html, in base.html), 24px
   cards with soft shadows, pill buttons/chips/fields, a frosted header with
   a pill nav, inverted brand-blue key-figure cards, and on phones the nav
   as a floating island at the bottom like the Fleet tab bar.
   Only overrides the rules above; the sign-in pages keep their own block.
   ===================================================================== */
:root {
  --surface-2: #F0F1F7;
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r-card: 24px; --r-tile: 20px; --r-field: 14px;
  --hair: rgba(15, 11, 40, .07);
  --shadow-1: 0 4px 20px -2px rgba(15, 11, 40, .05), 0 1px 2px rgba(15, 11, 40, .03);
  --shadow-2: 0 8px 24px -4px rgba(15, 11, 40, .12);
  --glass: rgba(255, 255, 255, .82);
  --inverted: linear-gradient(135deg, #0c1e9e 0%, #122ad2 100%);
  --sheen: linear-gradient(135deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, 0) 60%);
}
body { font-family: var(--font); font-size: 15px; line-height: 1.5; }

/* type: Manrope for titles and figures */
h1, h2, h3, .confirm-name, .kpi-value, .tile-value, .money-row strong { font-family: var(--font-head); }
h1 { font-weight: 700; font-size: 1.75rem; letter-spacing: -.02em; }
h2 { font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em; }
h3 { font-weight: 600; }

/* header: frosted, the nav a row of pills; the chosen one is a dark pill */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--glass); border-bottom: 0;
  box-shadow: 0 1px 0 var(--hair), 0 1px 12px rgba(15, 11, 40, .04);
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); }
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.header-bar { min-height: 68px; }
.main-nav { gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.main-nav a { border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .9375rem; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.main-nav a.is-active { background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 4px 16px rgba(15, 11, 16, .2); }
@media (hover: hover) and (pointer: fine) {
  .main-nav a:hover { background: var(--surface); color: var(--ink); }
  .main-nav a.is-active:hover { background: var(--ink); color: #fff; }
}
.nav-ico { display: none; width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-toggle { border-radius: 999px; border-color: transparent; background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .nav-toggle:hover { background: var(--line); border-color: transparent; } }

/* language: a segmented pill, like the sign-in page */
.lang { border: 0; border-radius: 999px; padding: 3px; gap: 2px; background: var(--surface-2); overflow: visible; }
.lang button { border: 0; border-radius: 999px; padding: 5px 11px; background: transparent; color: var(--muted); }
.lang button + button { border-left: 0; }
.lang button.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); }
@media (hover: hover) and (pointer: fine) { .lang button:not(.is-on):hover { background: transparent; color: var(--ink); } }

/* who is signed in: a pill with the initial */
.user { gap: 8px; padding: 3px 3px 3px 4px; border-radius: 999px; background: var(--surface-2); }
.user .avatar { background: var(--blue); color: #fff; font-family: var(--font-head); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); }
.user .btn-ghost { background: var(--surface); }

/* cards: white, 24px corners, ambient shadow and a hairline */
.card { border-radius: var(--r-card); border: 1px solid var(--hair); box-shadow: var(--shadow-1); padding: 22px; }
.card-head h2 { margin: 0; }
.filters { border-radius: var(--r-card); }
.table-card { padding: 6px 8px; }
.note { border-top-color: var(--hair); }

/* key figures: rounded pods; the hero is the inverted brand-blue card */
.kpis { gap: 12px; }
.kpi, .tile { border-radius: var(--r-tile); border: 1px solid var(--hair); box-shadow: var(--shadow-1); padding: 16px 18px; min-height: 112px; justify-content: flex-end; }
.kpi-label, .tile-label { font-size: .8125rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.kpi-value { font-weight: 700; font-size: 2rem; letter-spacing: -.02em; }
.kpi-money { font-size: 1.5rem; }
.kpi-hero, .tile-hero { background: var(--inverted); border-color: transparent; color: #fff; position: relative; overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .14), 0 10px 28px -6px rgba(18, 42, 210, .45); }
.kpi-hero::before, .tile-hero::before { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: rgba(250, 172, 65, .22); filter: blur(28px); pointer-events: none; }
.kpi-hero::after, .tile-hero::after { content: ""; position: absolute; inset: 0; background: var(--sheen); pointer-events: none; }
.kpi-hero > *, .tile-hero > * { position: relative; z-index: 1; }
.kpi-hero .kpi-label, .kpi-hero .kpi-sub, .tile-hero .tile-label { color: rgba(238, 240, 253, .85); }
.tile-hero .tile-value { color: #fff; }
.kpi-hot { background: var(--blue-tint); border-color: rgba(18, 42, 210, .18); }
.kpi-warn-box { background: #fff7e0; border-color: rgba(231, 169, 58, .35); }

/* buttons: full pills, same colours */
.btn { border-radius: 999px; padding: 10px 20px; letter-spacing: .01em; }
.btn-sm { padding: 6px 14px; }
.btn-primary { background-image: none; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .16), 0 4px 14px -4px rgba(18, 42, 210, .5); }
.btn-danger { background-image: none; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .16), 0 4px 14px -4px rgba(179, 38, 30, .45); }
.btn-ghost, .btn-danger-ghost { border-color: var(--hair); box-shadow: var(--shadow-1); }
.btn-ghost { background: var(--surface); }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { background: var(--surface-2); } }

/* chips, badges, the "All / …" filters and in-page tabs: pills */
.chip-btn { border-color: transparent; background: var(--surface); box-shadow: var(--shadow-1); padding: 6px 14px; font-size: .8125rem; }
.chip-btn[aria-pressed=true] { box-shadow: 0 4px 16px rgba(15, 11, 16, .2); }
.count-pill { background: var(--surface-2); border-color: transparent; font-family: var(--font); font-weight: 700; }
.badge { font-size: .75rem; padding: 3px 10px; letter-spacing: .01em; }
.tabs-inline { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 0; }
.tabs-inline a { border: 0; border-radius: 999px; padding: 7px 16px; margin: 0; }
.tabs-inline a.is-active { background: var(--surface); color: var(--ink); border: 0; box-shadow: var(--shadow-2); }

/* fields: rounded, quiet, light up on focus; the search box is a pill */
input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
input[type="number"], input[type="date"], input[type="search"], input[type="password"], select, textarea {
  border-radius: var(--r-field); height: 44px; border-color: var(--line); box-shadow: none; }
textarea { height: auto; }
input[type="search"] { border-radius: 999px; padding-left: 18px; background: var(--surface-2); border-color: transparent; }
input[type="file"] { border-radius: var(--r-field); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); background: var(--surface);
  box-shadow: 0 0 0 4px rgba(18, 42, 210, .14); }
.col-picker-menu { border-radius: 18px; border-color: var(--hair); box-shadow: 0 12px 32px rgba(15, 11, 40, .16); padding: 14px 16px; }

/* tables: a soft header band, hairlines between rows */
.table th { font-size: .75rem; letter-spacing: .03em; text-transform: uppercase; background: var(--surface-2); border-bottom: 0; }
.table thead th:first-child { border-radius: 12px 0 0 12px; }
.table thead th:last-child { border-radius: 0 12px 12px 0; }
.table td { border-bottom-color: var(--hair); }
@media (hover: hover) and (pointer: fine) { .table-list tbody tr:hover td { background: var(--blue-tint); } }

/* lists and facts */
.people li + li, .attn-rows li + li, .mini-list li + li, .facts > div { border-top-color: var(--hair); }
.attn-rows a, .bar-row { border-radius: 14px; }
.avatar { font-family: var(--font-head); }

/* notices: soft and round */
.message, .alert { border-radius: 16px; border-color: transparent; }
.message { box-shadow: var(--shadow-1); }

/* worker page groups: 20px corners, titles in Manrope */
.doc-group { border-radius: var(--r-tile); border-left-width: 1px; border-color: var(--hair); }
.doc-group-head { font-family: var(--font-head); padding: 12px 16px; }
.doc-group-head .doc-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.doc-row, .hours-row { border-top-color: var(--hair); }
.dropzone, .doc-scan { border-radius: var(--r-card); }
.file-chip { border-color: var(--hair); box-shadow: var(--shadow-1); }

/* footer: quiet, no grey band */
.site-footer { background: transparent; border-top: 0; }

/* Phones (Kawa, 4 Oct 2026: no bottom bar): the same ☰ dropdown as on tablets.
   The header stays solid here. */
@media (max-width: 720px) {
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, .96); }
  .card { padding: 18px; }
  .kpi { min-height: 96px; }
  .user { padding: 0; background: transparent; }
}
/* tablets and phones: the dropdown menu as a floating rounded card */
@media (max-width: 1100px) {
  .main-nav { border-radius: 20px; left: 8px; right: 8px; margin-top: 6px; padding: 6px; background: var(--surface);
    border: 1px solid var(--hair); box-shadow: 0 12px 32px rgba(15, 11, 40, .16); }
  .main-nav a { border-radius: 14px; padding: 12px 14px; gap: 10px; }
  .nav-ico { display: block; }
}
@media (prefers-reduced-motion: no-preference) {
  .main-nav a .nav-ico { transition: transform .18s var(--ease-out); }
  .main-nav a:active .nav-ico { transform: scale(.9); }
}
@media print { .main-nav { display: none !important; } .site-header { position: static; } }

/* Wide screens (1 Oct 2026, Kawa: "the sides are empty on the PC"): the page uses
   the whole width (up to 2200px) with a gutter that grows with the screen; on
   big screens the dashboard's side cards sit two side by side and forms get wider. */
.wrap { max-width: 2200px; padding-left: clamp(16px, 3vw, 48px); padding-right: clamp(16px, 3vw, 48px); }
@media (min-width: 1200px) { .form { max-width: 1000px; } }
@media (min-width: 1400px) {
  .kpi-value { font-size: 2.25rem; }
}
@media (min-width: 1800px) {
  .grid-2 { gap: 24px; }
}

/* Kawa's list of 1 Oct 2026 (evening) */
/* dashboard: a column of side cards */
.dash-stack { display: grid; gap: 20px; align-content: start; }
/* Workers list: column names stay on one line next to their tick box */
.col-picker-menu { min-width: 220px; left: auto; right: 0; }
.col-picker-menu .check { white-space: nowrap; }
/* Workers list: matching workers under the search box while typing */
.suggest { position: relative; }
.suggest-list { position: absolute; z-index: 15; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  max-height: 360px; overflow-y: auto; background: var(--surface); border: 1px solid var(--hair); border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15, 11, 40, .16); }
.suggest-list[hidden] { display: none; }
.suggest-list a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; color: var(--ink); }
.suggest-list a strong { font-weight: 600; }
.suggest-list a .badge { margin-left: auto; }
.suggest-list [aria-selected=true] a { background: var(--blue-tint); }
@media (hover: hover) and (pointer: fine) { .suggest-list a:hover { background: var(--blue-tint); text-decoration: none; } }
/* compact tables: room inside the grey header band, the first and last column off its edges */
.table-compact th, .table-compact td { padding-left: 10px; padding-right: 10px; }
.table-compact th:first-child, .table-compact td:first-child { padding-left: 14px; }
.table-compact th:last-child, .table-compact td:last-child { padding-left: 10px; padding-right: 14px; }
.table-card > .card-head { padding: 14px 14px 6px; }
.table-card > p { padding-left: 14px; padding-right: 14px; }
/* Worker page: the driver app card beside the three top cards when there's room,
   documents and payroll side by side on wide screens */
.detail-top > .section-gap { margin-top: 0; }
.detail-top > #driver-app { grid-column: 1 / -1; }
.detail-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.detail-pair > .section-gap { margin-top: 0; }
@media (min-width: 1500px) {
  .detail-top:has(> #driver-app) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-top > #driver-app { grid-column: auto; }
  .detail-pair:has(> :nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Company page: the three cards in one row on wide screens */
@media (min-width: 1400px) { .grid-2.company-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* monthly report and other pages with several table cards: space between them */
.table-card + .table-card { margin-top: 16px; }

/* The ☰ dropdown (≤1100px): the pill-nav hover is white,
   the same as the dropdown card, so nothing showed. Here a row lights up blue and its
   icon slides a little; the chosen page stays the dark pill. */
@media (max-width: 1100px) {
  .main-nav a { position: relative; transition: background-color .15s ease, color .15s ease; }
  @media (hover: hover) and (pointer: fine) {
    .main-nav a:not(.is-active):hover { background: #e2e6fd; color: var(--blue); }
    .main-nav a:not(.is-active):hover .nav-ico { transform: translateX(3px); }
  }
  .main-nav a:focus-visible { background: var(--blue-tint); color: var(--blue); outline: none;
    box-shadow: inset 0 0 0 2px rgba(18, 42, 210, .35); }
  .main-nav a:not(.is-active):active { background: #d3d9fb; }
}

/* Monthly report → Payroll: worker with initials, hours as coloured pills like the
   worker page's Hours, a total row, payslip as a chip, missing workers as chips. */
.pay-table th, .pay-table td { padding: 10px 12px; vertical-align: middle; }
.pay-table thead th { white-space: nowrap; color: var(--muted); }
.pay-table thead th:first-child, .pay-table tbody th { padding-left: 14px; }
.pay-table .hk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--k); margin-right: 6px; vertical-align: 1px; }
.pay-table tbody th { text-align: left; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: inherit;
  color: inherit; background: none; border-radius: 0; }
.pay-table tbody .pay-total th { font-weight: 700; }
.pay-table tbody tr:not(.pay-total) td, .pay-table tbody tr:not(.pay-total) th { border-bottom: 1px solid var(--hair); }
@media (hover: hover) and (pointer: fine) { .pay-table tbody tr:not(.pay-total):hover > * { background: var(--blue-tint); } }
.pay-who { display: flex; align-items: center; gap: 10px; color: inherit; min-width: 180px; }
@media (hover: hover) and (pointer: fine) { .pay-who:hover { text-decoration: none; } }
.pay-who .avatar { width: 34px; height: 34px; font-size: .75rem; flex: none; background: var(--blue-tint); color: var(--blue); }
.pay-name { display: block; font-weight: 650; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .pay-who:hover .pay-name { color: var(--blue); } }
.pay-nr { display: block; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hk-pill { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--kt); color: var(--k);
  font-size: .875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hk-pill.is-empty { background: none; color: var(--muted); opacity: .5; }
.pay-table tbody .pay-total > * { background: var(--surface-2); font-weight: 700; }
.pay-table tbody .pay-total > :first-child { border-radius: 14px 0 0 14px; font-family: var(--font-head); }
.pay-table tbody .pay-total > :last-child { border-radius: 0 14px 14px 0; }
.pay-total .hk-pill { background: var(--k); color: #fff; }
.pay-none { background: #fff1e6; color: #c2410c; }
.pay-missing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 14px 10px;
  padding: 12px 14px; border-radius: 16px; background: #fff7e0; }
.pay-missing-label { font-weight: 600; font-size: .875rem; color: #8a5a00; margin-right: 4px; }
.pay-chip { padding: 4px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-1);
  font-size: .8125rem; font-weight: 600; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .pay-chip:hover { color: var(--blue); text-decoration: none; } }

/* Installed-app feel (Kawa, 2 Oct 2026: "it still feels like a browser page"). Going to another page
   lets the new content settle in; parts that stay the same, like the header, stay still.
   .app-loading is the thin bar app-feel.js shows when the next page takes a moment (installed app only). */
@media (prefers-reduced-motion: no-preference) {
  /* 6 Oct 2026 (Kawa: "the whole site animation is funky"): the header stays perfectly still (the
     menu pill slides instead, pills.js) and only the page content changes, as one piece: the new
     content settles in from 8px below out of a small blur. Before, the whole window crossfaded and
     every block also faded in from nothing on its own, so the page faded twice and jittered.
     16 Oct 2026 (Kawa's iPhone recording: "when switching the pages the site moves position"):
     this used to be a view transition (a picture of the old and the new content). On the iPhone
     that picture of the new page was drawn about 10px too far right and down, and when it was
     swapped for the real page the content jumped back. Same lesson as the Fleet app (5 Oct): no
     view transitions. The real content does the settling now, so nothing can jump at the end.
     Never from invisible (the old page is gone at once, so a fade from nothing flashes an empty
     page), and only `backwards` so main keeps no transform/filter afterwards. */
  main.page { animation: page-in .34s var(--ease-out) backwards; }
  @keyframes page-in { from { opacity: .55; transform: translateY(8px); filter: blur(3px); } }
  /* the page settles as one piece, so its blocks don't also rise on their own */
  .page > *, .kpis > *, .attn-rows li { animation: none; }
}
.app-loading { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 3px; pointer-events: none;
  background: var(--blue, #0284C7); transform-origin: left; transform: scaleX(0); opacity: 0; transition: opacity .2s; }
.app-loading.is-on { opacity: 1; animation: app-loading 8s cubic-bezier(0.1, 0.7, 0.2, 1) forwards; }
@keyframes app-loading { from { transform: scaleX(0); } to { transform: scaleX(.92); } }
@media (prefers-reduced-motion: reduce) { .app-loading.is-on { animation: none; transform: scaleX(1); opacity: .6; } }
/* In the app, Fleet opens in the same window, so no "new tab" arrow. */
.is-app .nav-external .nav-label > span { display: none; }

/* =====================================================================
   Redesign pass (4 Oct 2026, redesign-existing-projects skill). Same brand
   blue and orange strip; only what looked unfinished or generic:
   - empty sections are a soft framed placeholder with a small tray icon
     instead of bare grey text;
   - table headers in normal case instead of spaced capitals;
   - the hero key figure flat brand blue with a softer tinted shadow (no
     sheen, no heavy glow);
   - the orange line on "Insurance and tax" follows the card's corners;
   - headings and help texts wrap evenly, help texts keep a readable width.
   ===================================================================== */
h1, h2, h3, .kpi-label { text-wrap: balance; }
p, .muted, .hint, li { text-wrap: pretty; }
.card > p.muted.small, .page-head p.muted { max-width: 72ch; }

.card .empty, .card + .empty, section > .empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  margin: 14px 0 2px; padding: 26px 20px; border-radius: var(--r-tile, 20px);
  background: var(--surface-2, #F0F1F7); border: 1.5px dashed rgba(15, 11, 40, .10);
  color: var(--muted); text-align: center; font-size: .9375rem;
}
.card .empty::before, .card + .empty::before, section > .empty::before {
  content: ""; width: 36px; height: 36px; opacity: .55;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6873' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13.5 5.6 6.2A2 2 0 0 1 7.5 5h9a2 2 0 0 1 1.9 1.2L21 13.5V18a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4.5Z'/%3E%3Cpath d='M3 13.5h5l1.5 2.5h5l1.5-2.5h5'/%3E%3C/svg%3E");
}
.table th { text-transform: none; letter-spacing: 0; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.table th a, .table th button { color: inherit; }

.kpi-hero, .tile-hero { background: var(--blue); box-shadow: 0 14px 32px -14px rgba(18, 42, 210, .55), 0 1px 2px rgba(15, 11, 40, .08); }
.kpi-hero::before, .kpi-hero::after, .tile-hero::before, .tile-hero::after { display: none; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Dashboard at every width (4 Oct 2026, Kawa: "when changing the size of the page
   they get so randomly organized"). Key figures: 2 per row on phones, 3 on
   tablets and small PCs (6 = two full rows), all in one row from 1280px.
   Cards: one column below 960px; Zu erledigen + one side column up to 1599px;
   from 1600px three columns (Zu erledigen | Rechnungen + Neueste Einstellungen |
   Abteilungen + Fuhrpark). Each side column is its own stack, so no holes. */
.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 721px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .kpis { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }
.dash { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.dash-side { grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (max-width: 960px) { .dash { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1600px) {
  .dash { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .dash-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* label and figure at the same height in every card; the small line sits at the bottom */
.kpi { justify-content: flex-start; }
.kpi-sub { margin-top: auto; }

/* Workers list (4 Oct 2026, Kawa): no Filter button (drop-downs apply at once,
   Enter searches); "Columns" looks like the drop-downs beside it, same height
   and label, with the number of extra columns shown. */
.filters .field > .label { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.col-picker-btn {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 9px 36px 9px 12px; white-space: nowrap;
  font: inherit; color: var(--ink); background: var(--surface) no-repeat right 12px center / 14px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b6873' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  border: 1px solid var(--line); border-radius: var(--r-field); user-select: none;
}
.col-picker-btn b { min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); font-size: .75rem; font-weight: 650; text-align: center; }
.col-picker[open] .col-picker-btn { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(18, 42, 210, .14); }
.col-picker-btn:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(18, 42, 210, .14); }
@media (hover: hover) and (pointer: fine) { .col-picker-btn:hover { border-color: #a9a9c0; } }
/* one row on a PC: search takes the free space, the five drop-downs share the rest */
.filters .field:not(.grow) { flex: 1 1 150px; min-width: 140px; max-width: 230px; }
.filters .field.grow { flex: 3 1 240px; }
.filters select { text-overflow: ellipsis; }
.col-picker-btn { width: 100%; }
.col-picker-btn b { margin-left: auto; }
@media (max-width: 720px) { .filters .field:not(.grow), .filters .field.grow { flex: 1 1 100%; max-width: none; } }
.col-picker-btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* tablets and small PCs: two tidy rows of three (the search box is two wide) */
@media (min-width: 721px) and (max-width: 1279px) {
  .filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters .field:not(.grow), .filters .field.grow { max-width: none; min-width: 0; }
  .filters .field.grow { grid-column: span 2; }
}

/* Address suggestions while typing (address.js) */
.addr { position: relative; }
.addr-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 340px; overflow-y: auto; margin: 0; padding: 4px 0; list-style: none; background: var(--surface); border: 1px solid var(--hair, var(--line)); border-radius: 18px; box-shadow: var(--shadow-2); overscroll-behavior: contain; text-align: left; }
.addr-list li { padding: 9px 14px; cursor: pointer; line-height: 1.3; }
.addr-list li b { display: block; font-weight: 600; }
.addr-list li span { display: block; font-size: 13px; color: var(--muted); }
.addr-list li.active { background: var(--blue-tint); }
.addr-list li.addr-none { color: var(--muted); cursor: default; }
.addr-list li.addr-src { font-size: 11px; color: var(--muted); cursor: default; padding: 4px 14px 2px; text-align: right; }
.addr-note { margin: 6px 0 0; font-size: 13px; font-weight: 600; }
.addr-note.addr-ok { color: var(--good); }
.addr-note.addr-warn { color: #6b4a00; background: #fff4d6; border-radius: 12px; padding: 8px 12px; }
.addr-use { margin-top: 4px; border: 0; background: var(--surface); color: var(--ink); border-radius: 99px; padding: 6px 12px; font: inherit; font-weight: 700; cursor: pointer; touch-action: manipulation; }
@media (hover: hover) and (pointer: fine) { .addr-list li:not(.addr-none):not(.addr-src):hover { background: var(--blue-tint); } }
@media (prefers-reduced-motion: no-preference) {
  .addr-list:not([hidden]) { animation: addr-in .16s var(--ease-out) both; }
  @keyframes addr-in { from { opacity: 0; transform: translateY(-4px); } }
}

/* ---- Sliding pills (pills.js, 6 Oct 2026, Kawa: "on all pills"): one pill element sits
   behind each pill group's choices (menu, EN/DE, To handle / Archive, Needs attention
   chips) and slides to the chosen one; the chosen item itself turns transparent.
   A choice that loads a new page slides from where the pill was on the page before. */
/* zero specificity: any position a box has of its own (the ☰ dropdown) wins */
:where(.pill-box) { position: relative; }
.slide-pill { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 999px; pointer-events: none; }
.has-pill > :not(.slide-pill) { position: relative; z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .slide-pill { transition: transform .26s var(--ease-out), width .26s var(--ease-out), height .26s var(--ease-out); }
  .slide-pill.no-move { transition: none; }
}
.chips.has-pill { position: relative; width: fit-content; max-width: 100%; gap: 2px; padding: 4px; margin-bottom: 10px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow-1); }
.chips.has-pill .chip-btn { background: transparent; border-color: transparent; box-shadow: none; }
.chips.has-pill .chip-btn[aria-pressed=true] { background: transparent; border-color: transparent; color: #fff; box-shadow: none; }
.chips > .slide-pill { background: var(--ink); }
@media (hover: hover) and (pointer: fine) { .chips.has-pill .chip-btn:not([aria-pressed=true]):hover { color: var(--blue); border-color: transparent; } }
.main-nav.has-pill a.nav-top.is-active, .main-nav.has-pill a.nav-top.is-active:hover { background: transparent; box-shadow: none; }
.main-nav > .slide-pill { background: var(--ink); box-shadow: 0 4px 16px rgba(15, 11, 16, .2); }
@media (max-width: 1100px) { .main-nav > .slide-pill { border-radius: 14px; } }
.lang.has-pill > button.is-on { background: transparent; box-shadow: none; }
.lang > .slide-pill { background: var(--surface); box-shadow: var(--shadow-2); }
.is-login .lang > .slide-pill { background: #fff; box-shadow: var(--s-shadow-2); }
.tabs-inline.has-pill > a.is-active { background: transparent; box-shadow: none; }
.tabs-inline > .slide-pill { background: var(--surface); box-shadow: var(--shadow-2); }

/* ---- Greeting on the dashboard (hr/_greeting.html, 6 Oct 2026) ---- */
.page-head .greet { margin: 0; max-width: 30ch; line-height: 1.15; text-wrap: balance; }
.greet a { color: var(--blue); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .greet a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; } }

/* ---- Soft check boxes (6 Oct 2026, Kawa: the browser's own boxes looked sharp next to the
   rounded fields): a rounded square that fills with the accent colour, the tick pops in from
   a little smaller (styles.css, like the Fleet app). Same size and click area as before. */
input[type=checkbox] { -webkit-appearance: none; appearance: none; display: inline-grid; place-content: center;
  width: 22px; height: 22px; margin: 0; flex: none; vertical-align: middle; cursor: pointer;
  border-radius: 7px; border: 1.5px solid var(--line-strong, var(--line)); background: var(--surface); }
input[type=checkbox]::before { content: ""; width: 14px; height: 14px; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: scale(.5); opacity: 0; }
input[type=checkbox]:checked { background: var(--blue); border-color: var(--blue); }
input[type=checkbox]:checked::before { transform: none; opacity: 1; }
input[type=checkbox]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
input[type=checkbox]:disabled { opacity: .5; cursor: default; }
@media (hover: hover) and (pointer: fine) { input[type=checkbox]:not(:checked):not(:disabled):hover { border-color: var(--blue); } }
@media (prefers-reduced-motion: no-preference) {
  input[type=checkbox] { transition: background-color .15s ease, border-color .15s ease, transform .12s var(--ease-out); }
  input[type=checkbox]::before { transition: transform .18s var(--ease-out), opacity .12s ease; }
  input[type=checkbox]:active:not(:disabled) { transform: scale(.92); }
}

/* ---- Soft drop-down lists (6 Oct 2026, Kawa: "do the same for the dropdown lists"): where the
   browser lets us draw the open list (Chrome/Edge 135+, `appearance: base-select`) it is a rounded
   card like the rest of the site, the chosen line tinted, the arrow turning over while open. The
   list opens from the field (top) with a short fade and lift, and closes faster. Other browsers
   (iPhone's wheel, Firefox) keep their own list. Lists with several choices or a fixed height
   stay as they are.  */
@supports (appearance: base-select) {
  select:not([multiple]):not([size]), select:not([multiple]):not([size])::picker(select) { appearance: base-select; }
  select:not([multiple]):not([size]) { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
  select:not([multiple]):not([size])::picker-icon { content: ""; width: 7px; height: 7px; margin: 0 2px 0 auto; flex: none;
    border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor; border-radius: 1px;
    transform: translateY(-2px) rotate(45deg); opacity: .65; }
  select:not([multiple]):not([size]):open::picker-icon { transform: translateY(2px) rotate(225deg); }
  ::picker(select) { margin: 6px 0; padding: 6px; border: 1px solid var(--line); border-radius: 18px;
    background: var(--surface); box-shadow: var(--shadow-2); max-height: min(360px, 60vh); overflow-y: auto; overscroll-behavior: contain; }
  select:not([multiple]):not([size]) option { padding: 10px 14px; border-radius: 12px; min-height: 40px; gap: 10px; }
  select:not([multiple]):not([size]) option::checkmark { display: none; }
  select:not([multiple]):not([size]) option:checked { background: var(--blue-tint); color: var(--blue); font-weight: 650; }
  select:not([multiple]):not([size]) option:not(:checked):is(:hover, :focus-visible) { background: var(--surface-2); }
  select:not([multiple]):not([size]) option:focus-visible { outline: none; }
  select:not([multiple]):not([size]) option:disabled { opacity: .5; }
  @media (prefers-reduced-motion: no-preference) {
    select:not([multiple]):not([size])::picker-icon { transition: transform .2s var(--ease-out); }
    ::picker(select) { transform-origin: top; opacity: 0; transform: translateY(-4px) scale(.98);
      transition: opacity .12s ease, transform .12s ease, overlay .12s allow-discrete, display .12s allow-discrete; }
    select:open::picker(select) { opacity: 1; transform: none; transition-duration: .18s; transition-timing-function: var(--ease-out); }
    @starting-style { select:open::picker(select) { opacity: 0; transform: translateY(-4px) scale(.98); } }
  }
}

/* ---- Review look (7 Oct 2026): on phones the Workers filters sit behind a "Filter" button ---- */
.filters .searchrow { display: flex; gap: 8px; align-items: center; }
.filters .searchrow .suggest { flex: 1 1 auto; min-width: 0; }
.filters .filters-toggle { display: none; flex: 0 0 auto; position: relative; }
.filters .filters-toggle.has-filter::after { content: ""; position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
@media (max-width: 700px) {
  .filters .filters-toggle { display: inline-flex; }
  .filters .field:not(.grow) { display: none; }
  .filters.is-open .field:not(.grow) { display: block; }
}

/* ---- One search box in the header (7 Oct 2026, hr/search.py + search.js) ----
   A quiet grey pill next to the language switch; it opens white and a little
   wider while typing and shows the hits in a floating card under it.
   Between 1101 and 1440px only the magnifier shows until it has focus; up to
   1100px (tablets, phones) a round button opens the box under the header. */
.search-toggle { display: none; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.search-toggle svg, .gsearch-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.search-toggle[aria-expanded="true"] { background: var(--ink); color: #fff; }
.gsearch { position: relative; display: flex; align-items: center; width: 240px; height: 40px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); cursor: text;
  transition: width .5s cubic-bezier(.32, .72, 0, 1), background-color .3s ease, box-shadow .3s ease; }
.gsearch:focus-within { width: 340px; background: var(--surface); color: var(--ink-2);
  box-shadow: 0 0 0 1px var(--hair), 0 8px 24px -8px rgba(15, 11, 40, .16); }
.gsearch-ico { position: absolute; left: 13px; pointer-events: none; }
.gsearch.is-busy .gsearch-ico { opacity: .4; }
.gsearch input[type="search"] { width: 100%; height: 100%; margin: 0; padding: 0 38px 0 38px; border: 0; border-radius: 999px;
  background: transparent; box-shadow: none; font: inherit; font-size: .9375rem; color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; }
.gsearch input[type="search"]:focus { box-shadow: none; outline: none; border: 0; }
.gsearch input::-webkit-search-decoration { -webkit-appearance: none; }
.gsearch-key { position: absolute; right: 11px; padding: 3px 7px; border-radius: 7px; background: var(--surface); color: var(--muted);
  font: 600 11px/1.2 var(--font); box-shadow: inset 0 0 0 1px var(--hair); pointer-events: none; transition: opacity .2s ease; }
.gsearch:focus-within .gsearch-key, .gsearch input:not(:placeholder-shown) ~ .gsearch-key { opacity: 0; }
.gsearch-list { position: absolute; top: calc(100% + 8px); right: 0; width: min(460px, calc(100vw - 32px)); max-height: min(70vh, 560px);
  overflow-y: auto; overscroll-behavior: contain; padding: 8px; border-radius: 20px; background: var(--surface);
  border: 1px solid var(--hair); box-shadow: var(--shadow-2); z-index: 40; text-align: left; cursor: default; }
.gsearch-list[hidden] { display: none; }
.gsearch-head { padding: 10px 12px 4px; font: 700 .6875rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.gsearch-head + .gsearch-head { margin-top: 4px; }
.gsearch-hit, .gsearch-all, .hits a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; color: var(--ink); }
.hit-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.hit-main strong { font-weight: 600; }
.hit-main .small { font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gsearch-hit .badge, .hits .badge { margin-left: auto; flex: none; }
.gsearch-list [aria-selected="true"] { background: var(--blue-tint); }
.gsearch-all { justify-content: center; margin-top: 6px; border-top: 1px solid var(--hair); border-radius: 0 0 12px 12px; color: var(--blue); font-weight: 600; }
.gsearch-note { margin: 0; padding: 14px 12px; color: var(--muted); font-size: .9rem; }
.gsearch-note.is-error { color: var(--bad); }
@media (hover: hover) and (pointer: fine) {
  .search-toggle:hover { background: var(--line); }
  .gsearch:hover { background: var(--surface); }
  .gsearch-hit:hover, .gsearch-all:hover, .hits a:hover { background: var(--blue-tint); text-decoration: none; }
}
@media (min-width: 1101px) and (max-width: 1440px) {
  .gsearch { width: 40px; }
  .gsearch:not(:focus-within) input { opacity: 0; }
  .gsearch:not(:focus-within) .gsearch-key { display: none; }
  .gsearch:focus-within { width: 320px; }
}
@media (max-width: 1100px) {
  .search-toggle { display: inline-flex; }
  .gsearch { display: none; position: absolute; top: 100%; left: 8px; right: 8px; width: auto; height: 48px; margin-top: 6px;
    background: var(--surface); border: 1px solid var(--hair); box-shadow: var(--shadow-2); z-index: 25; }
  .gsearch.is-open { display: flex; }
  .gsearch:focus-within { width: auto; }
  .gsearch-key { display: none; }
  .gsearch-list { left: 0; right: 0; width: auto; }
}
@media (max-width: 480px) { .search-toggle { width: 36px; height: 36px; } }
/* results page */
.search-groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.search-group .card-head { margin-bottom: 6px; }
.search-group .count { margin-left: 6px; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.hits { list-style: none; margin: 0 -8px; padding: 0; }
.search-empty p { margin: 0 0 6px; }

/* ---- Dashboard key figures: one quiet family (7 Oct 2026, Kawa: the blue tile was too much) ----
   No tinted tiles any more. Every figure sits on the same white core inside a
   faint grey tray (a nested "double bezel"), with a soft, wide shadow. A tile
   that needs a look gets a small coloured dot before its label and a coloured
   second line: blue for approvals waiting, amber for open fines / the workshop. */
.kpi, .kpi-hero, .kpi-hot, .kpi-warn-box { position: relative; isolation: isolate; overflow: visible; min-height: 124px; padding: 21px 23px 19px;
  border: 1px solid rgba(15, 11, 40, .05); border-radius: 24px; background: rgba(15, 11, 40, .03); color: var(--ink); box-shadow: none; }
.kpi::before { content: ""; position: absolute; inset: 5px; width: auto; height: auto; z-index: -1; border-radius: 19px; background: var(--surface);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(15, 11, 40, .04), 0 12px 28px -16px rgba(15, 11, 40, .22);
  transition: box-shadow .5s cubic-bezier(.32, .72, 0, 1); filter: none; }
.kpi::after, .kpi-hero::after, .tile-hero::after { content: none; }
.kpi > * { position: relative; z-index: 1; }
.kpi-label, .kpi-hero .kpi-label { display: flex; align-items: center; gap: 7px; font-size: .6875rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kpi-value, .kpi-hero .kpi-value { margin-top: 6px; color: var(--ink); font-size: 2.125rem; font-weight: 700; letter-spacing: -.03em; }
.kpi-money { font-size: 1.625rem; }
/* a money figure scales down with the tile's width ("4.998,00 €" touched the edge on phones) */
.kpi { container-type: inline-size; }
.kpi-value { min-width: 0; overflow-wrap: anywhere; }
@supports (font-size: 1cqi) { .kpi-money, .kpi .kpi-money { font-size: min(1.625rem, 15cqi); } }
.kpi-sub, .kpi-hero .kpi-sub { margin-top: 4px; color: var(--muted); font-size: .8125rem; font-weight: 500; }
.kpi-hot .kpi-label::before, .kpi-warn-box .kpi-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 42, 210, .12); }
.kpi-hot .kpi-value { color: var(--blue); }
.kpi-warn-box .kpi-label::before { background: #D97706; box-shadow: 0 0 0 3px rgba(217, 119, 6, .14); }
.kpi-warn-box .kpi-sub, .kpi-warn { color: #9A5B00; font-weight: 600; }
.kpis { gap: 14px; }
@media (hover: hover) and (pointer: fine) {
  a.kpi:hover { transform: translateY(-2px); border-color: rgba(15, 11, 40, .07); box-shadow: none; }
  a.kpi:hover::before { box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(15, 11, 40, .04), 0 22px 40px -18px rgba(15, 11, 40, .28); }
}
@media (max-width: 720px) { .kpi { min-height: 108px; padding: 17px 19px 15px; } .kpi-value:not(.kpi-money) { font-size: 1.875rem; }
  .kpi-money { font-size: 1.375rem; } }

/* ---- Background texture (7 Oct 2026, Kawa asked for one) ----
   The page is no longer a flat grey: a faint brand-blue glow in the top left,
   a warm one top right, and a fixed film grain at 4% over everything. The
   grain is one fixed layer, never on a scrolling box, so phones stay smooth.
   The sign-in page keeps its own look. */
body:not(.is-login) { background-color: var(--bg);
  background-image: radial-gradient(1100px 520px at 12% -12%, rgba(18, 42, 210, .06), transparent 62%),
                    radial-gradient(900px 480px at 98% -4%, rgba(250, 172, 65, .055), transparent 64%); }
body:not(.is-login)::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px; }
@media print { body::before { display: none; } body { background-image: none; } }

/* ---- Fleet in the menu (8 Oct 2026, Kawa: "make it the last one, kind of separate, with
   the fleet app logo beside it"): Fleet is its own app, so it is the last item, kept apart
   from the office pages by a thin line and drawn as a small raised white pill with the
   Fleet logo (the SafeWay mark in the Fleet blues, still; the Fleet header animates it). */
.nav-fleet-mark { width: 22px; height: auto; flex: none; overflow: visible; }
.nav-fleet-mark path:first-of-type { stroke: #0F172A; }
.main-nav a.nav-fleet { color: var(--ink); gap: 7px; }
@media (min-width: 1101px) {
  .main-nav a.nav-fleet { position: relative; margin-left: 13px; background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--hair); padding-left: 11px; }
  .main-nav a.nav-fleet::before { content: ""; position: absolute; left: -8px; top: 22%; bottom: 22%; width: 1px; background: rgba(15, 11, 40, .14); }
  @media (hover: hover) and (pointer: fine) {
    .main-nav a.nav-fleet:hover { background: var(--surface); color: #0369A1; box-shadow: var(--shadow-2), 0 0 0 1px rgba(2, 132, 199, .28); }
  }
}
/* the dropdown (tablets, phones): Fleet below a thin line, the logo in the icon's place */
@media (max-width: 1100px) {
  .main-nav a.nav-fleet { margin-top: 6px; position: relative; }
  .main-nav a.nav-fleet::before { content: ""; position: absolute; left: 14px; right: 14px; top: -4px; height: 1px; background: var(--hair); }
  .nav-fleet-mark { width: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .nav-fleet-mark { transition: transform .22s var(--ease-out); }
  .main-nav a.nav-fleet:active .nav-fleet-mark { transform: scale(.9); }
  @media (hover: hover) and (pointer: fine) { .main-nav a.nav-fleet:hover .nav-fleet-mark { transform: translateX(2px) rotate(-4deg); } }
}

/* ---- Invoices: draft / sent / cancelled (12 Oct 2026, review Step 4) */
.alert-warn { background: #fff1d1; color: #7a4a00; border: 1px solid #f1d79a; }
.alert-note { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--hair); }
.alert p { margin: 0; }
.alert p + p { margin-top: 6px; }
.alert a:not(.btn) { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.inline-form { display: contents; }
h1 .badge { vertical-align: middle; font-family: var(--font); position: relative; top: -2px; }
.confirm .steps { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.confirm .steps li { padding-left: 4px; }

/* Workers list as cards (narrow window, 12 Oct 2026, Kawa: "ugly highlight"):
   the table-row hover painted each cell, and the detail cells (width 100% plus
   their left margin) stuck out past the card. Cells now fit, and hover tints
   the whole card once. */
@media (max-width: 720px) {
  .table-cards td { width: auto; }
  .table-cards tr { border-radius: 14px; transition: background-color .15s var(--ease-out, ease); }
  @media (hover: hover) and (pointer: fine) {
    .table-cards tbody tr:hover td { background: transparent; }
    .table-cards tbody tr:hover { background: var(--blue-tint); }
  }
}

/* Amounts never break before the € sign, and the row's "Open" / "Edit"
   pills stay on one line (12 Oct 2026, Kawa). */
.table td.num { white-space: nowrap; }

/* A worker's file on a phone (hr/file_view.py, 13 Oct 2026, Kawa: no way back,
   no download): "← Back" and "Download" above the file, pages as pictures. */
.fileview { max-width: 860px; margin: 0 auto; }
.fileview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.dl-btn[aria-busy="true"] { opacity: .7; cursor: progress; }  /* iPhone: file still loading for the share sheet (6 Nov 2026) */
.fileview-bar .back-link { margin: 0; }
.fileview-name { font-size: 1.25rem; overflow-wrap: anywhere; margin: 0 0 4px; }
.fileview-page { margin: 12px 0 0; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-1); }
.fileview-page img { display: block; width: 100%; height: auto; }
.fileview-cap { margin: 6px 0 0; text-align: center; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.fileview-save { margin: 18px 0 0; }

/* Download payslips (hr/payslip_download.py, 14 Oct 2026, Kawa: several workers,
   several months, one ZIP). A chosen worker sits on a blue tile like the QR
   sticker choice; the total and the button stay at the bottom of the screen. */
.slipdl { max-width: 1080px; padding-bottom: 0; }
.slipdl-part { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.slipdl-part legend { padding: 0; margin-bottom: 12px; font-family: var(--font-head, var(--font)); font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em; color: var(--ink); }
.slipdl-range { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.slipdl-range .field { flex: 1 1 200px; max-width: 280px; margin-bottom: 0; }
.slipdl-dash { padding-bottom: 10px; color: var(--muted); }
.slipdl-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.slipdl-tools { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.slipdl-tools input[type=search] { flex: 1 1 240px; max-width: 360px; }
.slipdl-tools .slipdl-chips { margin-top: 0; }
.slipdl-group { margin-top: 8px; }
.slipdl-group > summary { display: flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 2px; list-style: none; cursor: pointer; font-weight: 700; color: var(--ink-2); font-size: .875rem; }
.slipdl-group > summary::-webkit-details-marker { display: none; }
.slipdl-group > summary::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); margin: 0 4px 0 2px; }
.slipdl-group[open] > summary::before { transform: rotate(45deg); margin-top: -4px; }
.slipdl-count { min-width: 1.7em; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); font-size: .75rem; text-align: center; font-variant-numeric: tabular-nums; }
.slipdl-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.slipdl-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 12px; min-height: 58px; padding: 9px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid transparent; cursor: pointer; margin: 0; }
.slipdl-row input { grid-row: span 2; }
.slipdl-name { font-weight: 650; color: var(--ink); line-height: 1.25; overflow-wrap: anywhere; }
.slipdl-n { font-size: .8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.slipdl-n.is-none { color: var(--muted); }
.slipdl-row:has(input:checked) { background: var(--blue-tint); border-color: rgba(18, 42, 210, .28); }
.slipdl-row:has(input:checked) .slipdl-n:not(.is-none) { color: var(--blue); }
.slipdl-row:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.slipdl-row:has(input:focus-visible) input { outline: 0; }
@media (hover: hover) and (pointer: fine) {
  .slipdl-row:hover { border-color: var(--line-strong); }
  .slipdl-row:has(input:checked):hover { border-color: rgba(18, 42, 210, .45); }
}
.slipdl-bar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
  margin: 0 -22px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .92); border-top: 1px solid var(--hair);
  border-radius: 0 0 var(--radius) var(--radius); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
.slipdl-sum { margin: 0; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.slipdl-sum.is-empty { font-weight: 500; color: var(--muted); }
.slipdl-bar .btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
@media (max-width: 720px) { .slipdl-bar { margin: 0 -18px; padding-left: 18px; padding-right: 18px; } }
@media (max-width: 560px) {
  .slipdl-range .field { max-width: none; flex-basis: 130px; }
  .slipdl-dash { display: none; }
  .slipdl-list { grid-template-columns: 1fr; }
  .slipdl-tools input[type=search] { max-width: none; }
  .slipdl-bar .btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .slipdl-row { transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out), transform .12s var(--ease-out); }
  .slipdl-row:active { transform: scale(.985); }
  .slipdl-group > summary::before { transition: transform .18s var(--ease-out); }
}
.slipdl-range select { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- No zoom in the installed app (16 Oct 2026, Kawa; html.no-zoom set in hr/_app_feel.html):
   iPhone zooms into any field with text under 16px, so fields are 16px there on touch screens
   (!important: the header search box and a few others set their own size). */
@media (pointer: coarse) {
  html.no-zoom :is(input, select, textarea) { font-size: max(16px, 1em) !important; }
}

/* Several papers scanned at once ("Scan document"): one row per document to
   check, then "Save all" (document_form.html). */
.doc-list { margin-top: 14px; display: grid; gap: 10px; }
.doc-list[hidden] { display: none; }
.doc-list-item { padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(20, 24, 60, .06), 0 6px 18px -10px rgba(20, 24, 60, .18); }
.doc-list-item.is-unknown { box-shadow: 0 0 0 1.5px #e9b949 inset; }
.doc-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.doc-list-count { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-list-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 12px; }
.doc-list-field { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.doc-list-field[hidden] { display: none; }
.doc-list-field input, .doc-list-field select { width: 100%; font-size: 1rem; color: var(--ink); }
.doc-list-field select { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-list-field.is-wide { grid-column: 1 / -1; }
.doc-list > .doc-list-field { max-width: 420px; }
.doc-list-error { margin: 8px 0 0; color: var(--bad-ink); font-weight: 600; }
.doc-list-error:empty { display: none; }
.doc-list-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.doc-list-photos { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.doc-list-photo { margin: 0; width: 168px; display: grid; gap: 6px; }
.doc-list-photo a { display: block; border-radius: 10px; }
.doc-list-photo img, .doc-list-pdf { display: block; width: 168px; height: 112px; object-fit: cover; border-radius: 10px; background: #eef0f6; box-shadow: 0 0 0 1px var(--line); }
.doc-list-pdf { display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.doc-list-photo figcaption { display: grid; gap: 2px; font-size: .75rem; color: var(--muted); }
.doc-list-photo select { width: 100%; font-size: .85rem; padding: 4px 8px; min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-list-none { font-size: .85rem; color: var(--bad-ink); }

/* Workers list → "Missing": tick several papers (21 Oct 2026) */
.paper-menu { left: 0; right: auto; max-height: min(60vh, 440px); overflow-y: auto; overscroll-behavior: contain; }
.paper-menu .menu-sub { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--hair); font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.paper-menu .check { display: flex; align-items: center; gap: 10px; }

/* Workers table with many columns (21 Oct 2026, Kawa): cells stay on one line, the card scrolls
   sideways, and the name column stays in place while it does. Phones keep the cards. */
@media (min-width: 721px) {
  .worker-table th, .worker-table td { white-space: nowrap; }
  .worker-table td:first-child { white-space: normal; min-width: 260px; }
  .worker-table .person strong { white-space: nowrap; }
  .worker-table th:first-child, .worker-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--hair); }
  .worker-table thead th:first-child { background: var(--surface-2); }
}

/* "Missing:" on the Workers list: one small chip per paper, so a long list wraps into tidy rows
   instead of one tall red bubble (21 Oct 2026, Kawa). */
.flag-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; text-decoration: none; }
.flag-group .flag-lead { font-size: .75rem; font-weight: 650; color: var(--bad-ink); margin-right: 2px; }
.flag-group .flag-chip { white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .flag-group:hover .flag-chip { filter: brightness(.95); } }
@media (min-width: 721px) {
  .worker-table td:first-child { min-width: 300px; max-width: 380px; }
  /* a soft edge where the other columns slide under the names */
  .worker-table th:first-child, .worker-table td:first-child { box-shadow: 1px 0 0 var(--hair), 8px 0 12px -10px rgba(15, 11, 40, .25); }
}
@media (min-width: 721px) {
  .worker-card { position: relative; overflow: clip; }  /* clip, not hidden: the slider may stick to the header */
  .worker-scroll { overflow-x: auto; scrollbar-width: none; }  /* the slider below replaces its bar */
  .worker-scroll::-webkit-scrollbar { display: none; }
  .worker-card::after {
    content: ""; position: absolute; top: 6px; bottom: 6px; right: 0; width: 48px; pointer-events: none;
    border-radius: 0 var(--r-card) var(--r-card) 0; background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--surface));
    opacity: 0; transition: opacity .2s var(--ease-out, ease);
  }
  .worker-card.more-right::after { opacity: 1; }
}

/* The slider under a wide Workers table (21 Oct 2026, Kawa: "add a slider to move left and right"):
   a range input, so it shows in every browser; it sticks to the bottom of the screen while the list
   is in view. */
.worker-slider { position: sticky; bottom: 0; z-index: 4; padding: 10px 14px 8px; background: var(--surface); border-radius: 0 0 var(--r-card) var(--r-card); }
.worker-slider input[type=range] { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 14px; margin: 0; background: var(--surface-2); border-radius: 99px; cursor: pointer; }
.worker-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: var(--thumb, 120px); height: 14px; border: 0; border-radius: 99px; background: #a9aec6; }
.worker-slider input[type=range]::-moz-range-thumb { width: var(--thumb, 120px); height: 14px; border: 0; border-radius: 99px; background: #a9aec6; }
@media (hover: hover) and (pointer: fine) {
  .worker-slider input[type=range]:hover::-webkit-slider-thumb { background: #7f85a3; }
  .worker-slider input[type=range]:hover::-moz-range-thumb { background: #7f85a3; }
}
.worker-slider input[type=range]:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (max-width: 720px) { .worker-slider { display: none; } }
.worker-card:has(.worker-slider:not([hidden]))::after { bottom: 32px; }

/* ---- Arbeitsvertrag (hr/letters.py, 30 Oct 2026) ---- */
.sign-steps { list-style: none; counter-reset: step; margin: 12px 0 8px; padding: 0; display: grid; gap: 14px; }
.sign-steps li { counter-increment: step; display: grid; gap: 6px; padding-left: 44px; position: relative; justify-items: start; }
.sign-steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .875rem; background: var(--blue-tint); color: var(--blue); }
.sign-steps li.is-done::before { content: "✓"; background: var(--good-bg); color: var(--good); }
.sign-upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 2px; }
.sign-upload input[type=file] { max-width: 100%; font-size: .875rem; }
.sign-pics { display: flex; flex-wrap: wrap; gap: 16px; margin: 8px 0 12px; }
.sign-pic { margin: 0; display: grid; gap: 6px; justify-items: start; }
.sign-pic img, .sign-pic > span { max-width: 200px; max-height: 90px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sign-pic figcaption { font-size: .8125rem; color: var(--muted); }
/* Date box with a calendar button (datepick.js). */
.datepick { position: relative; display: flex; align-items: center; width: 100%; }
.datepick > input[data-datepick] { width: 100%; padding-right: 48px; }
.datepick-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 999px;
  display: grid; place-items: center; background: transparent; color: var(--blue); cursor: pointer; touch-action: manipulation; }
.datepick-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.datepick-btn:active { transform: translateY(-50%) scale(.94); }
@media (hover: hover) and (pointer: fine) { .datepick-btn:hover { background: var(--blue-tint); } }
.datepick-native { position: absolute; right: 6px; bottom: 0; width: 36px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
/* "Create a contract": the kinds of document as cards to choose from. */
.letter-choose { max-width: 760px; }
.letter-kinds { border: 0; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.letter-kinds legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.letter-choose .letter-kinds + .muted { margin-top: 10px; }
.letter-kind { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1.5px solid var(--line); border-radius: 18px; background: #fff; cursor: pointer; }
.letter-kind > span { display: grid; gap: 4px; }
.letter-kind input { margin-top: 2px; accent-color: var(--blue); }
.letter-kind:has(input:checked) { border-color: var(--blue); background: var(--blue-tint); }
.letter-kind:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
/* Stundenlohn / Festgehalt on the contract form (letter-form.js shows the matching box). */
.field > .label { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.pay-kind > div { display: flex; flex-wrap: wrap; gap: 10px; }
.pay-kind label { display: flex !important; align-items: center; gap: 10px; margin: 0 !important; padding: 10px 16px; border: 1.5px solid var(--line);
  border-radius: 999px; background: #fff; cursor: pointer; font-weight: 500; }
.pay-kind input { accent-color: var(--blue); margin: 0; }
.pay-kind label:has(input:checked) { border-color: var(--blue); background: var(--blue-tint); }
.pay-kind label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.field[data-pay][hidden] { display: none; }
/* "Edit the contract text" (letters.LetterTextView): the text beside its help. */
.letter-text-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1100px) { .letter-text-grid { grid-template-columns: minmax(0, 1fr) 380px; } .letter-text-help { position: sticky; top: 96px; } }
textarea.letter-text { width: 100%; min-height: 60vh; font-size: .9375rem; line-height: 1.55; resize: vertical; }
.letter-text-help h2 { margin-top: 0; }
.letter-text-help h3 { margin: 18px 0 4px; font-size: 1rem; }
.letter-text-help ul { padding-left: 18px; display: grid; gap: 6px; }
.letter-text-boxes { display: grid; gap: 4px 0; margin: 8px 0 16px; }
.letter-text-boxes dt code { font-size: .8125rem; background: var(--blue-tint); color: var(--blue); padding: 2px 8px; border-radius: 999px; }
.letter-text-boxes dd { margin: 0 0 8px; color: var(--muted); }
.field-hint.is-bad { color: var(--bad); font-weight: 600; }

/* ---- Personalfragebogen (questionnaire_form.html, 1 Nov 2026) ---- */
.qf-send { max-width: 760px; display: flex; gap: 16px 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.qf-send-text { flex: 1 1 340px; }
.qf-send-text h2 { margin: 0 0 4px; }
.qf-send-text p { margin: 0; }
.qf-send-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.qf-read { margin: 0; }
.qf-file { position: relative; cursor: pointer; max-width: 260px; }
.qf-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qf-file input[type="file"] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.qf-file:focus-within { outline: 2px solid var(--blue, #1f33d1); outline-offset: 2px; }
.qf .form-section { margin-top: 26px; }
.qf .form-section:first-of-type { margin-top: 4px; }
.qf-kids { display: grid; gap: 4px; }
.qf-kid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.8fr) auto; gap: 0 16px; align-items: end; }
.qf-kid[hidden] { display: none; }
.qf-kid-remove { margin-bottom: 18px; }
.qf-kid > .errorlist { grid-column: 1 / -1; }
.qf-kid-add { margin-top: 4px; }
@media (max-width: 700px) {
  .qf-kid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .qf-kid-remove { grid-column: 1 / -1; justify-self: start; margin-bottom: 4px; }
}
@media (min-width: 1200px) { .qf-send { max-width: 1000px; } }
.qf-send + .qf { margin-top: 16px; }
.probation-fill { margin-top: 8px; }

/* ---- Menu sections with shortcuts (3 Nov 2026, Kawa: "like Amazon's portal: when you
   hover over a section it gives shortcuts"; _office_nav.html, app.js). On a PC each
   section pill keeps its look and gets a small chevron; resting the mouse on it, or
   tabbing to it, drops a white card with its sub-pages under it. The card grows out of
   the pill (top left), quickly (Emil: dropdowns 150-250ms, ease-out), and waits a moment
   before it closes so a mouse that slips off by a few pixels doesn't lose it. In the ☰
   menu (up to 1100px) a chevron button next to a section folds the shortcuts out. */
.main-nav .nav-item { position: relative; display: flex; }
.nav-caret { display: none; width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; }
.nav-more { display: none; }
.main-nav .nav-sub a { display: flex; align-items: center; white-space: nowrap; font-weight: 550; font-size: .9375rem;
  color: var(--ink-2); background: transparent; box-shadow: none; text-decoration: none; }
.main-nav .nav-sub a:focus-visible { background: var(--blue-tint); color: var(--blue); outline: none;
  box-shadow: inset 0 0 0 2px rgba(18, 42, 210, .35); }
.main-nav .nav-sub a:active { background: #d3d9fb; }

@media (min-width: 1101px) {
  .nav-caret { display: block; margin: 0 -4px 0 -2px; opacity: .45; transition: transform .2s var(--ease-out), opacity .15s ease; }
  .nav-sub { position: absolute; top: calc(100% + 10px); left: -4px; z-index: 40; min-width: 210px;
    display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 16px; background: var(--surface);
    box-shadow: 0 14px 36px rgba(15, 11, 40, .14), 0 2px 6px rgba(15, 11, 40, .06), 0 0 0 1px var(--hair);
    opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-4px) scale(.97); transform-origin: 28px 0;
    transition: opacity .12s ease-out .1s, transform .12s ease-out .1s, visibility 0s linear .22s; }
  /* an invisible bridge over the gap between pill and card, so the mouse can cross it */
  .nav-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
  .nav-item-fleet > .nav-sub { left: 9px; }
  .main-nav .nav-sub a { padding: 9px 12px; border-radius: 10px; }
  @media (hover: hover) and (pointer: fine) {
    .main-nav .nav-sub a:hover { background: var(--blue-tint); color: var(--blue); }
    .nav-item.has-sub:hover { z-index: 3; }
    .nav-item.has-sub:not(.is-shut):hover > .nav-sub { opacity: 1; visibility: visible; pointer-events: auto; transform: none;
      transition: opacity .16s var(--ease-out), transform .2s var(--ease-out), visibility 0s; }
    .nav-item.has-sub:not(.is-shut):hover .nav-caret { transform: rotate(180deg); opacity: .9; }
  }
  /* keyboard: Tab onto a section opens it, Tab goes on through its shortcuts (a mouse click
     doesn't keep it open: only :focus-visible counts) */
  .nav-item.has-sub:not(.is-shut):has(:focus-visible) { z-index: 3; }
  .nav-item.has-sub:not(.is-shut):has(:focus-visible) > .nav-sub { opacity: 1; visibility: visible; pointer-events: auto; transform: none;
    transition: opacity .16s var(--ease-out), transform .2s var(--ease-out), visibility 0s; }
  .nav-item.has-sub:not(.is-shut):has(:focus-visible) .nav-caret { transform: rotate(180deg); opacity: .9; }
}

@media (max-width: 1100px) {
  .main-nav .nav-item { flex-wrap: wrap; align-items: stretch; }
  .main-nav .nav-item > .nav-top { flex: 1 1 0; min-width: 0; }
  .nav-more { display: inline-grid; place-items: center; flex: none; width: 46px; margin-left: 2px; border: 0; border-radius: 14px;
    background: transparent; color: var(--muted); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .nav-more svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    transition: transform .22s var(--ease-out); }
  .nav-more[aria-expanded="true"] { color: var(--blue); background: var(--blue-tint); }
  .nav-more[aria-expanded="true"] svg { transform: rotate(180deg); }
  .nav-more:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(18, 42, 210, .35); }
  @media (hover: hover) and (pointer: fine) { .nav-more:hover { background: #e2e6fd; color: var(--blue); } }
  .nav-more:active { background: #d3d9fb; }
  .nav-item-fleet > .nav-more { margin-top: 6px; }
  .nav-sub { display: none; flex-basis: 100%; flex-direction: column; gap: 2px; padding: 2px 0 6px 34px; }
  .nav-item.is-expanded > .nav-sub { display: flex; }
  .main-nav .nav-sub a { padding: 10px 14px; border-radius: 12px; }
  @media (hover: hover) and (pointer: fine) { .main-nav .nav-sub a:hover { background: #e2e6fd; color: var(--blue); } }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 1100px) {
  .nav-item.is-expanded > .nav-sub { animation: nav-sub-in .2s var(--ease-out); }
  @keyframes nav-sub-in { from { opacity: 0; transform: translateY(-4px); } }
}
@media (prefers-reduced-motion: reduce) {
  .nav-sub, .nav-caret, .nav-more svg { transition: none !important; transform: none !important; }
}
