/* De Rycke klantenportaal: one stylesheet, no build step, no external fonts (Content-Security-Policy: 'self').
   Brand colours from the logo: navy #203C89 and red #E2111A. Light theme only. The staff admin has the same
   look (static/css/admin_theme.css). Phones are the main device on site: see the media query at the end. */

:root {
  --navy: #203C89; --navy-700: #1a3170; --navy-900: #101f4b; --navy-50: #eef2fb;
  --red: #E2111A; --red-700: #b90c14; --red-50: #fdeced;
  --green: #127a55; --green-50: #e6f5ee;
  --amber: #8a5800; --amber-50: #fff3d9;
  --blue: #1f5fbf; --blue-50: #e8f0fd;
  --gray-50: #f7f8fb; --gray-100: #eff1f6; --gray-200: #e3e7ef; --gray-300: #cfd5e2; --gray-500: #7b849c;
  --gray-600: #5b6580; --gray-900: #161f38;
  --bg: #f3f5f9; --surface: #fff; --text: var(--gray-900); --muted: var(--gray-600); --border: var(--gray-200);
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .05);
  --focus: 0 0 0 2px #fff, 0 0 0 4px var(--navy);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: var(--navy); }
a:hover { color: var(--navy-700); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3 { color: var(--navy-900); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 700; }
p { margin: 0; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
  margin: -1px !important; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px;
  border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.stack { display: flex; flex-direction: column; }
.icon { width: 18px; height: 18px; flex: none; }

/* Header: red brand stripe, logo, navigation, language and user menu */
.site-header { background: var(--surface); border-top: 4px solid var(--red); box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 20; }
.header-inner { max-width: 1240px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center;
  gap: 12px 28px; flex-wrap: wrap; }
/* Logo, a thin line, then "Portaal" in the logo's font (includes/portal_label.svg: outlines, no font file) */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo { height: 34px; width: auto; display: block; }
.brand-name { color: var(--navy); align-self: stretch; display: flex; align-items: center; padding-left: 12px;
  border-left: 1px solid var(--border); }
.brand-label { height: 11px; width: auto; display: block; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.main-nav a:hover { background: var(--navy-50); color: var(--navy); }
.main-nav a.is-active { background: var(--navy); color: #fff; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; gap: 2px; background: var(--gray-100); border-radius: 999px; padding: 3px; }
.lang-switch button { border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; color: var(--muted); padding: 4px 9px; border-radius: 999px; cursor: pointer; }
.lang-switch button:hover { color: var(--navy); }
.lang-switch button.is-active { background: var(--surface); color: var(--navy); box-shadow: var(--shadow); }
/* Phones: the language as a small menu ("NL"), the same buttons listed under it */
.lang-menu { display: none; position: relative; }
.lang-menu summary { list-style: none; display: flex; align-items: center; gap: 2px; padding: 7px 8px 7px 12px;
  background: var(--gray-100); border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; color: var(--navy); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary .icon { width: 16px; height: 16px; }
.lang-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(16, 24, 40, .12);
  padding: 6px; z-index: 30; display: grid; gap: 2px; }
.lang-menu .menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; background: none;
  font: inherit; color: var(--text); border-radius: 6px; cursor: pointer; }
.lang-menu .menu button:hover { background: var(--gray-100); }
.lang-menu .menu button.is-active { color: var(--navy); font-weight: 700; background: var(--navy-50); }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-weight: 600; max-width: 260px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(16, 24, 40, .12);
  padding: 6px; z-index: 30; }
.menu-customer { padding: 8px 10px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--border);
  margin-bottom: 4px; }
.user-menu .menu a, .user-menu .menu button { display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border: 0; background: none; font: inherit; color: var(--text); text-decoration: none;
  border-radius: 6px; cursor: pointer; text-align: left; }
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--gray-100); }

/* Page layout */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
main.container { flex: 1; padding-top: 28px; padding-bottom: 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  margin-bottom: 22px; }
.lead { color: var(--muted); margin-top: 6px; max-width: 640px; }
.lead + .lead { margin-top: 2px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
/* A login with several customers: above the title a real dropdown (white field, border, arrow) to show another */
/* 340px wide, narrower on small phones: the page head's columns may shrink (min-width: 0), else this fixed width
   made the whole page wider than a screen under ~372px. */
.page-head > * { min-width: 0; max-width: 100%; }
.customer-switch { position: relative; display: block; width: 340px; max-width: 100%; margin-bottom: 10px; }
.customer-switch summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer;
  width: 100%; box-sizing: border-box; padding: 10px 12px 10px 14px; background: var(--surface);
  border: 1px solid var(--gray-300, #cbd2dc); border-radius: 12px; box-shadow: var(--shadow);
  font-size: 15px; font-weight: 650; color: var(--text); }
.customer-switch summary::-webkit-details-marker { display: none; }
.customer-switch summary:hover { border-color: var(--navy); }
.customer-switch summary:focus-visible { outline: 3px solid var(--navy-50); border-color: var(--navy); }
.customer-switch[open] summary { border-color: var(--navy); }
.customer-switch summary .icon { width: 18px; height: 18px; flex: none; color: var(--navy); }
.customer-switch summary .icon:last-child { margin-left: auto; color: var(--muted); transition: transform .15s; }
.customer-switch[open] summary .icon:last-child { transform: rotate(180deg); }
.customer-switch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-switch .menu { position: absolute; left: 0; top: calc(100% + 6px); min-width: 100%; max-width: min(460px, 92vw);
  box-sizing: border-box; max-height: 60vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .14); padding: 6px; z-index: 25; display: grid; gap: 2px; }
.customer-switch .menu button { display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; font: inherit; font-size: 15px;
  color: var(--text); border-radius: 8px; cursor: pointer; }
.customer-switch .menu button:hover { background: var(--gray-100); }
.customer-switch .menu button.is-active { background: var(--navy-50); color: var(--navy); font-weight: 700; }
.customer-number { color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none;
  font-weight: 600; margin-bottom: 14px; }
.back-link:hover { color: var(--navy); }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-note { margin-top: 12px; }
.section-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-head-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 10px; }
.page-head-actions .sub { flex-basis: 100%; text-align: right; margin: 0; }
.contact-link { color: var(--navy); text-decoration: none; }
.contact-link:hover { text-decoration: underline; }
.error-summary ul { margin: 6px 0 0; padding-left: 20px; }
.error-summary a { color: inherit; font-weight: 650; }
.error-summary-title { font-weight: 700; }
.submit-summary { margin: 4px 0 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--navy-50);
  color: var(--navy-900); font-weight: 650; }
.table-dossiers { table-layout: fixed; }
.table-dossiers th:nth-child(1) { width: 12%; }
.table-dossiers th:nth-child(2) { width: 10%; }
.table-dossiers th:nth-child(3) { width: 17%; }
.table-dossiers th:nth-child(4) { width: 14%; }
.table-dossiers th.col-actions { width: 136px; }
.table-quotes th.col-actions { width: 230px; }
.table-all th:nth-child(1) { width: 20%; }  /* number + phase badge */
.hide-desktop { display: none; }
.page-sub { color: var(--muted); margin-top: 4px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.page-sub:empty { display: none; }
.detail-info-title { display: none; }
.help-top { margin: -2px 0 6px; }
.form-privacy { margin-top: 10px; }
/* Privacy statement: one centred reading column */
.legal-page { max-width: 820px; margin: 0 auto; }
.legal { padding: 24px 28px; }
.legal h2 { font-size: 17px; margin: 22px 0 8px; }
.legal p, .legal ul { margin: 0 0 10px; }
.legal ul { padding-left: 20px; }
.machine-list-grid li { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; }
.machine-list-grid strong { margin-right: 0; }
.section-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.count { display: inline-block; min-width: 26px; padding: 1px 8px; border-radius: 999px; background: var(--gray-100);
  color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; vertical-align: middle; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.callout { padding: 16px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px;
  border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 650; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn-sm { padding: 6px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-secondary { background: var(--surface); border-color: var(--gray-300); color: var(--text); }
.btn-secondary:hover { border-color: var(--navy); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--navy); }
.btn[disabled] { opacity: .6; cursor: progress; }
.link-button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font: inherit;
  color: var(--navy); font-weight: 600; cursor: pointer; }
.doc-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.doc-link:hover { text-decoration: underline; }
.map-link { margin-top: 6px; font-size: 14px; }
.strong-link { font-weight: 700; text-decoration: none; }
.strong-link:hover { text-decoration: underline; }

/* Badges: phase of a dossier, status of a machine, invoice state */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px;
  font-weight: 650; line-height: 1.4; white-space: nowrap; background: var(--gray-100); color: var(--gray-600); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-green, .badge-phase-on_rent, .badge-line-delivered { background: var(--green-50); color: var(--green); }
.badge-amber, .badge-phase-quote, .badge-line-preparation { background: var(--amber-50); color: var(--amber); }
.badge-blue, .badge-phase-reservation { background: var(--blue-50); color: var(--blue); }
.badge-red { background: var(--red-50); color: var(--red-700); }
.badge-gray, .badge-phase-off_hired, .badge-line-collected { background: var(--gray-100); color: var(--gray-600); }
h1 .badge { font-size: 14px; vertical-align: middle; margin-left: 8px; letter-spacing: 0; }

/* Tabs, segmented filter, search */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; }
.tab:hover { border-color: var(--navy); color: var(--navy); }
.tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.tab-count { font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: 999px; background: var(--gray-100);
  color: var(--muted); }
.tab.is-active .tab-count { background: rgba(255, 255, 255, .2); color: #fff; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.segmented { display: inline-flex; flex-wrap: wrap; padding: 3px; background: var(--gray-100); border-radius: 999px; gap: 2px; }
.segmented a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  text-decoration: none; color: var(--muted); font-weight: 600; }
.segmented a.is-active { background: var(--surface); color: var(--navy); box-shadow: var(--shadow); }
.search { position: relative; display: flex; align-items: center; width: min(360px, 100%); }
.search .icon { position: absolute; left: 12px; color: var(--gray-500); pointer-events: none; }
.search input[type=search] { padding-left: 40px; }  /* room for the icon; beats the generic input rule below */

/* Forms */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=tel],
textarea, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--gray-500);
  border-radius: var(--radius-sm); padding: 9px 12px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--navy); box-shadow: var(--focus); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--navy); margin: 0; flex: none; }
textarea { resize: vertical; min-height: 84px; }
.field { margin: 0 0 16px; }
.field > label:not(.check-row) { display: block; font-weight: 600; margin-bottom: 6px; }
.optional { color: var(--muted); font-weight: 400; }
.help { color: var(--muted); font-size: 13px; margin-top: 4px; }
.error { color: var(--red-700); font-size: 14px; margin-top: 4px; }
.has-error input:not([type=checkbox]), .has-error textarea { border-color: var(--red); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; font-weight: 400; }
.check-row:hover { border-color: var(--navy); }
.check-row:has(input:checked) { border-color: var(--navy); background: var(--navy-50); }
.check-row-top { align-items: flex-start; }
/* A short note on the right of a choice, e.g. 'sneller ingepland' next to 'Op elk moment' (one line on a phone). */
.check-row .choice-note { margin-left: auto; padding-left: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
/* Weekday picker (afmelden, 'Bepaalde dagen & uren'): seven tappable chips in one row. The checkbox is hidden but
   still focusable and read by screen readers; the span after it fills the chip and shows the state, so it also works
   in browsers without :has(). Font shrinks on narrow phones so 'mer'/'Wed' fit at 320px. */
.day-picks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day-pick { position: relative; display: block; min-height: 44px; cursor: pointer; user-select: none; }
.day-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.day-pick span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden;
  font-weight: 600; font-size: clamp(11px, 3.6vw, 15px); text-transform: capitalize; white-space: nowrap; }
.day-pick:hover span { border-color: var(--navy); }
.day-pick input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.day-pick input:focus-visible + span { outline: 3px solid var(--navy-50); outline-offset: 1px; }
.check-row-top input { margin-top: 3px; }
.machine-list { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--border);
  border-radius: var(--radius-sm); }
.machine-list li { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); }
.machine-list li:last-child { border-bottom: 0; }
.machine-list strong { margin-right: 8px; }
/* Off-hire form: numbered-free steps with a heading each, the pickup address in a box */
.form-section { padding-bottom: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--gray-100); }
.form-section:last-of-type { border-bottom: 0; }
h2.form-step, legend.form-step { font-size: 17px; font-weight: 700; color: var(--navy-900); margin: 0 0 12px; }
.form-section > .help { margin: -6px 0 12px; }
.address-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 14px;
  background: var(--gray-50); border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 600; }
.address-box .icon { color: var(--navy); margin-top: 3px; }
[hidden] { display: none !important; }
input[type=time] { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--gray-500);
  border-radius: var(--radius-sm); padding: 9px 12px; width: 100%; }
input[type=file] { font: inherit; width: 100%; padding: 8px 0; }
.file-list { list-style: none; margin: 0 0 10px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px;
  border-bottom: 1px solid var(--gray-100); }
.file-list li:last-child { border-bottom: 0; }
.file-name { min-width: 0; overflow-wrap: anywhere; }
.file-list .link-button { color: var(--muted); font-size: 14px; flex: none; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.form-card { padding: 24px; }
.narrow { max-width: 480px; }
.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.summary-card { padding: 20px; }
.summary-card dl { margin: 8px 0 0; }
.summary-card dt { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 12px; }
.summary-card dd { margin: 2px 0 0; }

/* Messages after an action */
.messages { display: grid; gap: 10px; margin-bottom: 20px; }
.message { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid; font-weight: 500; margin-bottom: 14px; }
.messages .message { margin-bottom: 0; }
.message-success { background: var(--green-50); border-color: #bfe5d3; color: #0d5c40; }
.message-info { background: var(--blue-50); border-color: #c9dbf8; color: #194a94; }
.message-warning { background: var(--amber-50); border-color: #f3dca8; color: var(--amber); }
.message-error { background: var(--red-50); border-color: #f6c2c4; color: var(--red-700); }

/* Tables (become cards on phones, see the media query at the end) */
.table-card { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 13px; font-weight: 650; color: var(--muted); padding: 12px 16px;
  background: var(--gray-50); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
/* Compact lists: one line per row, details on the detail page */
.table-compact td { padding: 9px 16px; vertical-align: middle; }
.table-compact th { padding-top: 10px; padding-bottom: 10px; }
.address-line { display: flex; align-items: center; gap: 6px; max-width: 420px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.icon-link { display: inline-flex; flex: none; color: var(--navy); padding: 4px; min-width: 24px; min-height: 24px; border-radius: 6px; }
.icon-link:hover { background: var(--navy-50); }
.icon-link svg { width: 16px; height: 16px; }
.icon-link-lg { padding: 4px; }
.icon-link-lg svg { width: 20px; height: 20px; }
.table tbody tr:hover td { background: #fafbfe; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .col-actions { text-align: center; white-space: nowrap; }
.table .col-center { text-align: center; }
.sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.quote-actions { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.table-dossiers th.col-actions, .table-dossiers td.col-actions { text-align: right; }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  border-radius: 50%; background: var(--navy-50); color: var(--navy); margin-bottom: 14px; }
.empty-icon .icon { width: 24px; height: 24px; }
.empty h1, .empty h2 { margin-bottom: 8px; }
.empty p + p { margin-top: 16px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }

/* Label/value grid (dossier header, account) */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px 24px; padding: 20px 24px; }
.label { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
/* Long values without spaces (e-mail addresses, references) wrap instead of running into the next column */
.info-grid > div, .summary-card dd, .break { min-width: 0; overflow-wrap: break-word; }

/* Overview tiles and invoice totals */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); grid-template-rows: auto auto 1fr;
  gap: 16px; }
.tile { display: grid; grid-row: span 3; grid-template-rows: subgrid; gap: 4px; padding: 20px; align-content: start; text-decoration: none; color: var(--text);
  transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--navy); transform: translateY(-1px); color: var(--text); }
.tile-head { display: flex; align-items: center; gap: 10px; }
.tile-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 9px; background: var(--navy-50); color: var(--navy); flex: none; }
.tile-attention .tile-icon { background: var(--navy); color: #fff; }
.tile-attention .tile-note { color: var(--navy); font-weight: 650; }
.tile-label { font-weight: 650; color: var(--muted); }
.tile-value { margin-top: 6px; font-size: 34px; font-weight: 750; color: var(--navy-900); line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-note { color: var(--muted); font-size: 14px; line-height: 1.45; min-height: 2.9em; }  /* room for 2 lines ('€ ... open' + 'n vervallen') always,
   so the tiles keep their height when another customer is shown */
.tile-alert { display: block; color: var(--red-700); font-weight: 650; }
.stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.stat { padding: 14px 18px; flex: 0 1 240px; min-width: 0; }
.stat-value { font-size: 22px; font-weight: 750; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.stat-alert .stat-value { color: var(--red-700); }
.stat-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
/* Stat cards that filter the list below */
a.stat-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.stat-link:hover { border-color: var(--navy); }
a.stat-link.is-active { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy), var(--shadow); }
a.stat-link:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.result-count { margin: 0 0 8px; }

/* Recent dossiers on the overview: one clickable row each */
.recent-list { overflow: hidden; }
.recent-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto 18px; align-items: center; gap: 16px;
  padding: 12px 18px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--gray-100); }
.recent-row:last-child { border-bottom: 0; }
.recent-row:hover { background: #fafbfe; color: var(--text); }
.recent-row > .icon { color: var(--gray-500); }
.recent-main { display: flex; align-items: center; gap: 10px; }
.recent-meta { font-size: 14px; white-space: nowrap; }

/* Login and password pages */
.page-auth main.container { display: flex; flex-direction: column; align-items: center; }
/* Messages (e.g. 'password set') above the login card, same width */
.page-auth .messages { width: 100%; max-width: 440px; margin: 4vh 0 0; }
.page-auth .messages + .auth-card { margin-top: 16px; }
.auth-card { width: 100%; max-width: 440px; padding: 32px; margin-top: 4vh; }
.auth-card h1 { font-size: 24px; }
.auth-card h1 + form { margin-top: 20px; }
.auth-card .lead { margin-bottom: 22px; }
.auth-links { margin-top: 16px; text-align: center; }
.auth-note { margin-top: 10px; text-align: center; }
/* 'Back to deryckeverhuur.be' above the login card (anonymous visitors only), aligned with the card */
.back-to-site { margin: 0 0 12px; font-size: 14px; }
.back-to-site a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; color: var(--muted); text-decoration: none; }
.back-to-site a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.back-to-site .icon { width: 16px; height: 16px; }
.page-auth .back-to-site { width: 100%; max-width: 440px; margin: 4vh 0 0; }
.page-auth .back-to-site + .messages, .page-auth .back-to-site + .auth-card { margin-top: 10px; }

/* Footer: age of the data, refresh, contact */
/* Footer: one quiet centred line on the page background - De Rycke Verhuur · Privacy · v1.01 (design review 2026-11-16).
   '.site-footer .footer-inner' so the phone rule '.container { padding: 0 16px }' doesn't remove the spacing. */
.site-footer { color: var(--muted); font-size: 13px; line-height: 1.4; }
.site-footer .footer-inner { display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  list-style: none; margin-top: 0; margin-bottom: 0; padding-top: 12px; padding-bottom: 16px; }
.footer-inner li + li::before { content: "\00B7"; content: "\00B7" / ""; margin: 0 10px; color: var(--gray-500); }
.footer-inner a { display: inline-block; padding: 8px 0; color: inherit; text-decoration: none; }
.footer-inner a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.footer-version { font-variant-numeric: tabular-nums; }
/* 'Bijgewerkt 15:47' under a page title: one small button that refreshes the data */
.data-age { margin-top: 4px; }
.data-age button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0;
  font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; }
.data-age button:hover { color: var(--navy); }
.data-age .icon { width: 15px; height: 15px; }

/* Bottom tab bar: hidden on wide screens, see the media query below */
.tab-bar { display: none; }

/* Phones and small tablets: compact header, one column, tables as compact cards */
@media (max-width: 760px) {
  .header-inner { padding: 8px 16px; gap: 8px 12px; }
  .logo { height: 28px; }
  .user-name { display: none; }
  .lang-inline { display: none; }
  .lang-menu { display: block; }
  .brand { gap: 10px; }
  .brand-name { padding-left: 10px; }
  .brand-label { height: 8px; }
  /* Navigation moves to a bar at the bottom of the screen, within thumb reach */
  .main-nav { display: none; }
  .tab-bar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 20; background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(16, 24, 40, .06); padding-bottom: env(safe-area-inset-bottom); }
  .tab-bar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 7px;
    font-size: 12px; font-weight: 650; color: var(--muted); text-decoration: none; }
  .tab-bar a .icon { width: 22px; height: 22px; }
  .tab-bar a.is-active { color: var(--navy); }
  .tab-bar a.is-active .icon { background: var(--navy-50); border-radius: 999px; padding: 2px 14px; width: 52px;
    box-sizing: border-box; height: 26px; }
  body.has-tab-bar { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .site-footer .footer-inner { padding-top: 8px; padding-bottom: 10px; }
  .container { padding: 0 16px; }
  main.container { padding-top: 20px; }
  h1 { font-size: 24px; }
  .page-head { margin-bottom: 16px; }
  .layout-2col, .field-row { grid-template-columns: 1fr; }
  .field-row.field-row-pair { grid-template-columns: 1fr 1fr; }  /* Van / Tot: two short times side by side */
  .urgent-card { order: -1; }  /* 'Dringend? Bel ons' before the problem form */
  /* Phase tabs: two by two, so all four are always visible */
  .tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .tab { justify-content: space-between; padding: 9px 14px; min-width: 0; }  /* may shrink: 320px screens */
  .tab:last-child:nth-child(odd) { grid-column: 1 / -1; }  /* 'Alle' as fifth tab: full width */
  .toolbar { flex-direction: column; align-items: stretch; }
  .segmented { justify-content: space-between; flex-wrap: nowrap; }
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented a { flex: 1 1 auto; justify-content: center; padding: 7px 6px; font-size: 14px; }
  .search { width: 100%; }
  .stat { flex: 1 1 140px; }
  .stat-value { font-size: 19px; }
  /* Overview tiles become compact rows: icon, label with note, number on the right */
  .tiles { grid-template-columns: 1fr; grid-template-rows: none; gap: 8px; }
  .tile { display: grid; grid-row: auto; grid-template-rows: none; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 12px; align-items: center;
    padding: 12px 14px; }
  .tile:hover { transform: none; }
  .tile-head { display: contents; }
  .tile-icon { grid-row: 1 / span 2; width: 36px; height: 36px; }
  .tile-label { grid-column: 2; grid-row: 1; color: var(--text); }
  .tile-note { grid-column: 2; grid-row: 2; font-size: 13px; min-height: 0; }
  .tile-alert { display: inline; }  /* phones: '€ ... open · 1 vervallen' on one line, same tile height */
  .tile-alert::before { content: '· '; color: var(--muted); font-weight: 400; }
  .tile-value { grid-column: 3; grid-row: 1 / span 2; margin: 0; font-size: 26px; }
  .info-grid { padding: 16px; gap: 14px; }
  .section-head { flex-wrap: wrap; }
  /* Table rows become cards: the number as title, other fields two by two, actions full width */
  .table-card { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .table thead { display: none; }
  .table, .table tbody { display: block; width: 100%; }
  .table tr { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 10px; padding: 14px 16px; }
  .table td, .table-compact td { display: block; border: 0; padding: 0; min-width: 0; }
  .table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 650;
    color: var(--muted); margin-bottom: 1px; }
  .table td.cell-title { grid-column: 1 / -1; font-size: 17px; padding-right: 36px; }
  .table td.cell-title::before { display: none; }
  .table td.cell-wide, .table td.col-actions { grid-column: 1 / -1; }
  .table td.hide-phone { display: none; }
  .table .row-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
  .table .row-link:focus-visible { box-shadow: none; }
  .table .row-link:focus-visible::after { box-shadow: var(--focus); }
  .table tr:has(.row-link) a:not(.row-link) { position: relative; z-index: 1; }  /* map pin stays tappable */
  .table tr:has(.row-link)::after { content: ""; position: absolute; right: 16px; top: 18px; width: 8px; height: 8px;
    border-right: 2px solid var(--gray-500); border-top: 2px solid var(--gray-500); transform: rotate(45deg); }
  .table tbody tr:hover td { background: transparent; }
  .table .num, .table .col-actions, .table .col-center { text-align: left; }
  .table td.col-actions:empty { display: none; }
  .table .col-actions .btn { width: 100%; padding: 10px 14px; }
  .quote-actions { display: flex; flex-direction: column; align-items: stretch; }
  .quote-actions .badge, .quote-actions .muted, .quote-actions .sub { align-self: flex-start; }
  .table-dossiers { table-layout: auto; }
  .table td.hide-desktop { display: block; }
  .table td .badge { white-space: normal; max-width: 100%; border-radius: 10px; }  /* long badges wrap inside narrow card cells */
  .page-head-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .page-head-actions .badge { align-self: flex-start; }
  .page-head-actions .sub { text-align: left; }
  /* Dossier page: the articles (and Afmelden) first, the details below */
  .detail-body { display: flex; flex-direction: column; }
  .detail-articles { order: -1; margin-top: 0; }
  .detail-info-title { display: block; margin: 24px 0 12px; }
  .summary-first { order: -1; }
  /* Same button layout on every form: main button full width, cancel below */
  .form-actions { flex-direction: column; align-items: stretch; }
  .lang-switch button { padding: 10px 11px; }
  .empty-actions .btn { width: 100%; min-height: 44px; }
  .data-age button { padding: 10px 0; }
  .table .icon-link { padding: 10px; margin: -10px; }
  .address-line { max-width: none; }
  .recent-row { grid-template-columns: minmax(0, 1fr) 18px; gap: 4px 12px; padding: 12px 16px; }
  .recent-row > .icon { grid-column: 2; grid-row: 1 / span 3; }
  .recent-ref, .recent-meta { grid-column: 1; }
  .form-card { padding: 18px; }
  .form-actions .btn { width: 100%; }
}
.nowrap { white-space: nowrap; }
/* Honeypot field of the access request form: off-screen for people, still filled in by many bots. */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Phone numbers never break over two lines. */
a[href^="tel:"] { white-space: nowrap; }

/* Small phones (after the 760px rules, so these win). */
@media (max-width: 400px) {
  .day-picks { gap: 4px; }
  .tab { padding: 9px 10px; gap: 4px; font-size: 14px; }  /* 'Reservaties 3' fits two by two on a 320px screen */
  .tab-count { padding: 0 6px; }
}

/* Login code: six digits, easy to read and type */
.auth-card .code-input { font-size: 22px; letter-spacing: .3em; font-variant-numeric: tabular-nums; text-align: center; }
