:root {
  color-scheme: light;
  --color-black: #1d1d1f;
  --color-white: #ffffff;
  --color-off-white: #f5f5f7;
  --color-light-grey: #e0e0e0;
  --color-mid-grey: #7a7a7a;
  --color-dark-grey: #333333;
  --color-graphite: #1d1d1f;
  --color-warm-grey-100: #f5f5f7;
  --color-warm-grey-200: #eeeeef;
  --color-warm-grey-300: #d2d2d7;
  --color-cool-grey-100: #fafafc;
  --color-cool-grey-200: #f0f0f0;
  --color-cool-grey-300: #d2d2d7;
  --color-accent-sand: #f5f5f7;
  --color-accent-steel: #7a7a7a;
  --color-accent-electric: #0066cc;
  --color-accent-signal: #0066cc;
  --color-primary: #0066cc;
  --color-primary-deep: #005bb5;
  --color-primary-press: #004f9f;
  --color-primary-soft: #2997ff;
  --color-primary-subdued: #e8f2ff;
  --color-brand-dark: #272729;
  --color-tile-dark-2: #2a2a2c;
  --color-tile-dark-3: #252527;
  --color-surface-black: #000000;
  --bg: var(--color-white);
  --panel: var(--color-white);
  --panel-2: var(--color-off-white);
  --panel-3: var(--color-warm-grey-100);
  --surface-strong: var(--color-light-grey);
  --surface-dark: var(--color-brand-dark);
  --surface-dark-elevated: var(--color-tile-dark-2);
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.18);
  --text: var(--color-black);
  --body: var(--color-graphite);
  --soft: var(--color-dark-grey);
  --muted: var(--color-mid-grey);
  --accent: var(--color-primary);
  --accent-active: var(--color-primary-press);
  --danger: #b42318;
  --warning: #a05a00;
  --info: var(--color-accent-steel);
  --ok: #2f6b43;
  --radius: 18px;
  --radius-sm: 8px;
  --radius-md: 11px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;
  --shadow-1: none;
  --shadow-2: none;
  --product-shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, sans-serif;
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-md: 17px;
  --font-size-lg: 21px;
  --font-size-xl: 28px;
  --font-size-2xl: 40px;
  --font-size-3xl: 56px;
  --font-size-4xl: 80px;
  --page-padding-mobile: 20px;
  --page-padding-tablet: 32px;
  --page-padding-desktop: 48px;
  --page-padding-wide: 64px;
  --content-max-width: 1440px;
  --text-max-width: 720px;
  --narrow-text-max-width: 560px;
  --grid-columns: 12;
  --grid-gap-desktop: 24px;
  --grid-gap-tablet: 20px;
  --grid-gap-mobile: 16px;
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 17px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 72px;
  --space-4xl: 80px;
  --space-5xl: 128px;
  --space-6xl: 160px;
  --transition-fast: 160ms ease;
  --transition-base: 220ms ease;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-off-white);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--font-size-md);
  line-height: 1.47;
  font-weight: 400;
  letter-spacing: 0;
  font-feature-settings: "ss01" 1, "tnum" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button::-moz-focus-inner {
  border: 0;
  padding: 0;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: block;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 56px;
  border-bottom: 0;
  background: var(--color-surface-black);
  color: #fff;
  backdrop-filter: none;
  box-shadow: none;
}

.topbar-inner {
  max-width: var(--content-max-width);
  min-height: 56px;
  margin: 0 auto;
  padding: 6px clamp(var(--page-padding-mobile), 4vw, var(--page-padding-wide));
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}

.sidebar,
.mobile-topbar,
.mobile-nav {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  color: #fff;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 600;
}

.brand p {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 400;
}

.topbar-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.user-chip {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  text-align: right;
}

.user-chip strong,
.user-chip span {
  display: block;
}

.user-chip strong {
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  white-space: nowrap;
}

.user-chip span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 400;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.nav button {
  position: relative;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  align-items: center;
  padding: 0;
  text-align: left;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}

.nav button:hover,
.nav button.active {
  color: #fff;
  background: transparent;
}

.nav button.active::after {
  content: none;
}

.main {
  position: relative;
  min-width: 0;
  padding: 0 clamp(var(--page-padding-mobile), 4vw, var(--page-padding-wide)) 80px;
  overflow: hidden;
}

.main::before {
  content: none;
}

.page {
  position: relative;
  z-index: 1;
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.page-header {
  position: relative;
  isolation: isolate;
  overflow: visible;
  min-height: 0;
  margin: 0 0 28px;
  padding: 30px 0 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  box-shadow: none;
}

.page-header::before {
  content: none;
}

.page-header::after {
  content: none;
}

.page-header .eyebrow,
.page-header .page-subtitle {
  color: var(--muted);
}

.page-header .page-title {
  color: var(--text);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--soft);
  font-size: var(--font-size-xs);
  line-height: 1.3;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.page-title {
  margin: 0;
  max-width: 900px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: 0;
}

.page-subtitle {
  margin: 10px 0 0;
  max-width: 760px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 400;
}

.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  appearance: none;
  -webkit-appearance: none;
  min-height: 48px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--accent);
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base), transform var(--transition-fast);
  white-space: nowrap;
  font-size: 17px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
  outline: 0;
}

.btn:hover {
  border-color: var(--accent);
  background: rgba(0, 102, 204, 0.08);
}

.btn:focus {
  outline: 0;
}

.btn:focus-visible {
  outline: 2px solid rgba(0, 113, 227, 0.32);
  outline-offset: 3px;
}

.btn:active {
  transform: scale(0.95);
}

.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

.btn.primary:hover {
  border-color: var(--accent-active);
  background: var(--accent-active);
}

.btn.warning {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

.btn.danger {
  border-color: var(--danger);
  color: var(--danger);
}

.btn.danger:hover,
.btn.danger:focus-visible {
  border-color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
  color: var(--danger);
}

.btn.danger:focus-visible {
  outline-color: rgba(180, 35, 24, 0.28);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--body);
  padding-inline: 0;
}

.logout-btn {
  min-height: 32px;
  border-color: rgba(255, 255, 255, 0.36);
  background: transparent;
  color: #fff;
  min-width: 94px;
  padding: 0 15px;
  font-size: 14px;
}

.logout-btn:hover,
.logout-btn:focus-visible {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.12);
  outline: 0;
}

.btn.small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.btn.full {
  width: 100%;
}

.page-header .btn {
  min-height: 42px;
  padding: 0 18px;
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  backdrop-filter: none;
}

.page-header .btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-chip {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  padding: clamp(24px, 3vw, 32px);
  display: grid;
  gap: 18px;
  box-shadow: none;
}

.form-chip + .form-chip {
  margin-top: 16px;
}

.form-chip-title {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
}

.form-chip-heading {
  display: grid;
  gap: 6px;
}

.form-chip-subtitle {
  margin: 0;
  color: var(--body);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 400;
}

.form-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: clamp(24px, 3vw, 40px);
  box-shadow: none;
}

.panel.tight {
  padding: 16px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.panel-title {
  margin: 0;
  color: var(--text);
  font-size: 32px;
  line-height: 1.05;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
}

.panel-subtitle {
  margin: 10px 0 0;
  color: var(--body);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 400;
}

.metric {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--color-white);
  padding: clamp(28px, 4vw, 48px);
}

.metric-clickable {
  width: 100%;
  cursor: pointer;
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
}

.metric-clickable:hover,
.metric-clickable:focus-visible {
  background: var(--color-cool-grey-100);
}

.metric-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.grid.four {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: transparent;
  overflow: hidden;
  box-shadow: none;
}

.grid.four > .metric {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.grid.four > .metric:last-child {
  border-right: 0;
}

.metric-value {
  color: var(--text);
  font-size: var(--font-size-3xl);
  line-height: 1.05;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
}

.metric-label {
  margin-top: 14px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
}

.metric-trend {
  margin-top: 2px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 400;
}

.orders-list-panel {
  padding: 24px;
}

.orders-list {
  gap: 12px;
}

.list {
  display: grid;
  gap: var(--space-sm);
}

.list-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 20px 22px;
  display: grid;
  gap: 12px;
  box-shadow: none;
}

.list-row.clickable {
  cursor: pointer;
}

.list-row.clickable:hover {
  border-color: rgba(0, 102, 204, 0.36);
  background: var(--color-cool-grey-100);
}

.row-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.order-acceptance-button {
  white-space: nowrap;
}

.row-title {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

.row-meta {
  color: var(--body);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 400;
}

.file-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: baseline;
}

.file-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-weight: 600;
}

.file-link:hover,
.file-link:focus-visible {
  color: var(--accent-active);
  outline: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(0, 102, 204, 0.28);
  border-radius: var(--radius-pill);
  color: var(--accent);
  background: var(--color-cool-grey-100);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.status.requested,
.status.reschedule_requested {
  border-color: rgba(0, 102, 204, 0.28);
  background: var(--color-primary-subdued);
  color: var(--accent);
}

.status.accepted,
.status.completed {
  border-color: rgba(78, 107, 85, 0.28);
  background: #f0f7f2;
  color: var(--ok);
}

.status.declined,
.status.cancelled {
  border-color: var(--danger);
  color: var(--danger);
}

.status.archived,
.status.draft {
  color: var(--soft);
}

.priority {
  color: var(--text);
  font-weight: 600;
}

.priority.eilig {
  color: var(--accent);
}

.priority.dringend {
  color: var(--danger);
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: var(--space-xl);
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: none;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  padding: 12px 20px;
  font-size: 17px;
  line-height: 1.47;
  font-weight: 400;
  transition: border-color var(--transition-base), background var(--transition-base), outline-color var(--transition-base);
}

.field select option {
  min-height: 40px;
  padding: 12px 16px;
  line-height: 1.7;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 68px;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 5.25L7 9.25L11 5.25' stroke='%231d1d1f' stroke-width='1.5' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 24px center;
  background-size: 14px 14px;
}

.field textarea {
  border-radius: var(--radius-sm);
  resize: vertical;
  min-height: 112px;
  line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--accent);
  outline: 2px solid var(--color-primary-soft);
  outline-offset: 1px;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--danger);
  outline: 2px solid rgba(180, 35, 24, 0.16);
  outline-offset: 1px;
}

.field-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 16px;
  vertical-align: top;
}

th {
  background: var(--color-cool-grey-100);
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
}

td {
  color: var(--body);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 400;
}

tr:last-child td {
  border-bottom: 0;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.calendar-company-filter {
  min-width: 240px;
}

.calendar-view-switch {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--bg);
  margin-bottom: 24px;
  overflow: hidden;
}

.view-toggle-option {
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--line-strong);
  background: transparent;
  color: var(--body);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
}

.view-toggle-option:last-child {
  border-right: 0;
}

.view-toggle-option.active {
  background: var(--accent);
  color: #fff;
}

.view-toggle-option:hover,
.view-toggle-option:focus-visible {
  background: var(--color-cool-grey-100);
  color: var(--accent);
  outline: 0;
}

.view-toggle-option.active:hover,
.view-toggle-option.active:focus-visible {
  background: var(--accent-active);
  color: #fff;
}

.view-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: currentColor;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
}

.calendar-head,
.calendar-day {
  min-height: 130px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.calendar-head {
  min-height: 44px;
  background: var(--color-off-white);
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
}

.calendar-day:nth-child(7n),
.calendar-head:nth-child(7n) {
  border-right: 0;
}

.calendar-day.outside {
  background: rgba(246, 249, 252, 0.74);
  color: var(--muted);
}

.day-number {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
}

.today-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: none;
  flex: 0 0 auto;
}

.day-items {
  display: grid;
  gap: 6px;
}

.calendar-pill {
  position: relative;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  color: var(--text);
  background: var(--bg);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.calendar-pill {
  width: 100%;
  text-align: left;
  font: inherit;
}

.calendar-pill.clickable:hover {
  border-color: rgba(0, 102, 204, 0.34);
  background: var(--color-cool-grey-100);
}

.calendar-pill.available {
  border-color: var(--ok);
  background: #f4faf6;
}

.calendar-pill.blocked {
  border-color: var(--danger);
  color: var(--danger);
  background: #fbf0ef;
  padding-left: 24px;
}

.calendar-pill.blocked::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}

.calendar-pill.order {
  border-color: var(--accent);
  color: var(--accent);
  background: #fbfbff;
}

.calendar-list {
  display: grid;
  gap: 16px;
}

.calendar-company-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
  box-shadow: none;
}

.calendar-company-header {
  border-bottom: 1px solid var(--line);
  background: var(--color-off-white);
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.calendar-company-header h4 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 600;
}

.calendar-company-header p {
  margin: 6px 0 0;
  color: var(--body);
  font-size: 15px;
  line-height: 1.4;
}

.calendar-company-header span {
  color: var(--body);
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}

.calendar-entry-list {
  display: grid;
}

.calendar-list-entry {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  padding: 18px 22px;
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(0, 1.7fr) auto;
  gap: 18px;
  align-items: center;
  text-align: left;
}

.calendar-list-entry:last-child {
  border-bottom: 0;
}

.calendar-list-entry:hover,
.calendar-list-entry:focus-visible {
  background: var(--color-cool-grey-100);
  outline: 0;
}

.calendar-list-entry.blocked {
  border-left: 4px solid var(--danger);
}

.calendar-list-entry.available {
  border-left: 4px solid var(--ok);
}

.calendar-list-entry.order {
  border-left: 4px solid var(--accent);
}

.calendar-entry-date {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.calendar-entry-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.calendar-entry-main strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}

.calendar-entry-main small {
  color: var(--body);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
}

.calendar-entry-type {
  border: 1px solid var(--line-strong);
  color: var(--body);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
}

.calendar-entry-type.blocked {
  border-color: var(--danger);
  color: var(--danger);
}

.calendar-entry-type.available {
  border-color: var(--ok);
  color: var(--ok);
}

.calendar-entry-type.order {
  border-color: var(--accent);
  color: var(--accent);
}

.tabs,
.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tab,
.step {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--accent);
  padding: 0 16px;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
}

.tab.active,
.step.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.wizard {
  display: grid;
  gap: 24px;
}

.product-row,
.file-row,
.proposal-row {
  display: grid;
  grid-template-columns: 2fr 0.8fr 1.2fr auto;
  gap: 16px;
  align-items: end;
}

.product-row {
  grid-template-columns: minmax(0, 2fr) minmax(128px, 0.75fr) minmax(0, 1.2fr) 132px;
  align-items: start;
  row-gap: 12px;
}

.product-row > .btn {
  width: 100%;
  min-height: 52px;
  margin-top: 26px;
}

.proposal-row {
  grid-template-columns: 1fr 1fr auto;
}

.proposal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.file-row {
  grid-template-columns: 1fr 1fr auto;
}

.hint {
  color: var(--body);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 400;
}

.notice {
  border: 1px solid var(--warning);
  border-radius: var(--radius-md);
  background: #fbf6e7;
  color: var(--text);
  padding: 16px;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 400;
}

.notice.ok {
  border-color: var(--ok);
  background: #f2f5f0;
}

.notice.danger {
  border-color: var(--danger);
  background: #fbf0ef;
  color: var(--danger);
}

.original-appointment-box {
  margin-top: 12px;
  border: 1px solid var(--color-accent-steel);
  border-radius: var(--radius-lg);
  background: var(--color-cool-grey-100);
  padding: 18px 20px;
}

.original-appointment-box span {
  display: block;
  color: var(--color-dark-grey);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

.original-appointment-box strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
}

.original-appointment-box p {
  margin: 6px 0 0;
  color: var(--body);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--color-off-white);
}

.login-panel {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: none;
}

.login-hero {
  min-height: 560px;
  padding: 48px;
  background: var(--surface-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-hero .brand h1,
.login-hero .brand p,
.login-hero .brand-mark {
  color: #fff;
  border-color: #fff;
}

.login-hero .brand-mark {
  background: transparent;
}

.login-title {
  margin: 32px 0 0;
  color: #fff;
  font-size: var(--font-size-3xl);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 600;
}

.login-copy {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1.4;
  font-weight: 400;
}

.login-card {
  padding: 48px;
  border-left: 1px solid var(--line);
  background: var(--bg);
}

.demo-users {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.demo-user {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--text);
  padding: 16px;
  text-align: left;
}

.demo-user strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.demo-user span,
.demo-user {
  font-size: 15px;
  line-height: 1.45;
}

.demo-user.active {
  border-color: var(--accent);
  outline: 2px solid var(--color-primary-soft);
  outline-offset: 1px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.order-lightbox-section > .panel-title + .timeline {
  margin-top: 24px;
}

.timeline-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--color-accent-steel);
  border-radius: var(--radius-lg);
  background: var(--panel-2);
  padding: 16px 18px;
}

.timeline-item.message {
  border-left-color: var(--accent);
  background: var(--bg);
}

.timeline-item strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}

.timeline-item div {
  margin-top: 6px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
}

.timeline-item span {
  display: block;
  margin-top: 8px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
}

.message-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-top: 24px;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}

.definition {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.definition span {
  display: block;
  margin-bottom: 4px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

.definition strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
}

.empty {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--body);
  text-align: center;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 400;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: saturate(180%) blur(20px);
}

.modal {
  width: min(760px, 100%);
  max-height: min(800px, 92vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 24px;
  box-shadow: none;
}

.modal.order-lightbox {
  width: min(1120px, 100%);
  padding: 0;
}

.modal.company-modal {
  width: min(1080px, 100%);
}

.company-modal-header {
  position: sticky;
  top: -24px;
  z-index: 2;
  margin: -24px -24px 24px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  align-items: flex-start;
}

.company-form {
  display: grid;
  gap: 24px;
}

.company-form-error {
  border: 1px solid #b42318;
  background: #fff5f5;
  color: #7a1b1b;
  padding: 16px;
  line-height: 1.45;
}

.company-form-error strong,
.company-form-error span {
  display: block;
}

.company-form-error strong {
  margin-bottom: 4px;
}

.form-section {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.form-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.form-section .panel-title {
  margin-bottom: 14px;
  font-size: 20px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.contact-card h5 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.order-lightbox-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--line);
  margin: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(20px);
}

.order-lightbox-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.order-lightbox-body {
  padding: 0 32px 32px;
}

.order-lightbox-body > .header-actions:first-child {
  margin-top: 1rem;
}

.modal .btn,
.order-lightbox .btn {
  border-radius: var(--radius-pill);
}

.modal .btn.small,
.order-lightbox .btn.small {
  border-radius: var(--radius-pill);
}

.order-lightbox .btn:not(.primary) {
  border-color: transparent;
  background: rgba(0, 102, 204, 0.08);
  color: var(--accent);
}

.order-lightbox .btn:not(.primary):hover,
.order-lightbox .btn:not(.primary):focus-visible {
  border-color: transparent;
  background: rgba(0, 102, 204, 0.14);
}

.order-lightbox .btn.danger {
  border-color: transparent;
  background: rgba(180, 35, 24, 0.08);
  color: var(--danger);
}

.order-lightbox .btn.danger:hover,
.order-lightbox .btn.danger:focus-visible {
  border-color: transparent;
  background: rgba(180, 35, 24, 0.14);
  color: var(--danger);
}

.order-lightbox-title {
  margin: 0;
  color: var(--text);
  font-size: var(--font-size-3xl);
  line-height: 1;
  letter-spacing: 0;
  font-family: var(--font-display);
  font-weight: 600;
}

.order-lightbox-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.order-lightbox-section:last-of-type {
  border-bottom: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  .topbar {
    height: auto;
  }

  .topbar-inner {
    min-height: auto;
    padding: 18px 24px;
    flex-wrap: wrap;
    gap: 14px 28px;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 10px;
  }

  .nav button {
    min-height: 44px;
    flex: 0 0 auto;
    font-size: 16px;
  }

  .topbar-user {
    margin-left: auto;
  }

  .page-title {
    font-size: 32px;
  }

  .grid.four,
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.four > .metric:nth-child(2n) {
    border-right: 0;
  }

  .grid.four > .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .split,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .login-card {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .login-hero {
    min-height: 420px;
  }
}

@media (max-width: 860px) {
  body {
    font-size: 16px;
  }

  .topbar-inner {
    padding: 18px 20px;
  }

  .brand h1 {
    font-size: 13px;
  }

  .topbar-user {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 10px;
  }

  .user-chip {
    text-align: left;
  }

  .nav {
    gap: 24px;
  }

  .nav button {
    min-height: 44px;
    border: 0;
    padding: 0;
    font-size: 16px;
  }

  .main {
    padding: 24px 20px 80px;
  }

  .page-header {
    min-height: 0;
    margin-bottom: 24px;
    padding: 8px 0 18px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .page-header::after {
    display: none;
  }

  .page-title {
    font-size: 28px;
    line-height: 1.14;
  }

  .page-subtitle {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.35;
  }

  .page-header .btn {
    min-height: 40px;
    padding: 0 18px;
    font-size: 15px;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .panel,
  .orders-list-panel,
  .filters {
    padding: 20px;
  }

  .form-chip {
    padding: 20px;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .form-chip-grid,
  .filters,
  .detail-grid,
  .contact-grid,
  .product-row,
  .file-row,
  .proposal-row,
  .message-box {
    grid-template-columns: 1fr;
  }

  .grid.four {
    gap: 12px;
    border: 0;
    background: transparent;
  }

  .grid.four > .metric,
  .grid.four > .metric:nth-child(2n),
  .grid.four > .metric:nth-child(-n + 2) {
    border: 1px solid var(--line);
    background: var(--color-white);
    border-radius: var(--radius-lg);
  }

  .row-main,
  .panel-header,
  .order-lightbox-header {
    display: grid;
    gap: 14px;
  }

  .status {
    width: fit-content;
  }

  .row-actions,
  .proposal-actions {
    justify-content: flex-start;
  }

  .product-row > .btn {
    margin-top: 0;
  }

  .calendar-view-switch {
    width: 100%;
  }

  .view-toggle-option {
    flex: 1 1 0;
    justify-content: center;
    padding: 0 12px;
  }

  .calendar-grid {
    display: grid;
    grid-template-columns: 1fr;
    border: 0;
    gap: 12px;
  }

  .calendar-head {
    display: none;
  }

  .calendar-day {
    min-height: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg);
  }

  .calendar-day.outside,
  .calendar-day.empty-day {
    display: none;
  }

  .calendar-company-header,
  .calendar-list-entry {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-company-header span,
  .calendar-entry-type {
    width: fit-content;
  }

  .table-wrap {
    border: 0;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tr {
    border: 1px solid var(--line);
    margin-bottom: 12px;
    padding: 12px;
  }

  td {
    border: 0;
    padding: 8px 0;
  }

  td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--soft);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
  }

  .modal {
    padding: 20px;
  }

  .modal.order-lightbox {
    padding: 0;
  }

  .order-lightbox-header {
    padding: 22px 20px 18px;
  }

  .order-lightbox-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .order-lightbox-body {
    padding: 0 20px 24px;
  }

  .order-lightbox-title {
    font-size: 32px;
  }

  .login-screen {
    padding: 20px;
  }

  .login-hero,
  .login-card {
    padding: 28px 24px;
  }

  .login-title {
    font-size: 40px;
  }
}

/* monteur_design.md authoritative visual system.
   This replaces the previous soft design layer without changing app behavior. */
:root {
  color-scheme: light;
  --color-black: #000000;
  --color-white: #ffffff;
  --color-grey-950: #111111;
  --color-grey-900: #1a1a1a;
  --color-grey-800: #2b2b2b;
  --color-grey-700: #3d3d3d;
  --color-grey-600: #53565a;
  --color-grey-500: #777777;
  --color-grey-400: #a0a0a0;
  --color-grey-300: #d9d9d9;
  --color-grey-200: #eeeeee;
  --color-grey-100: #f7f7f7;
  --color-accent-orange: #f06e00;
  --color-accent-orange-bright: #ff7500;
  --bg: var(--color-white);
  --panel: var(--color-white);
  --panel-2: var(--color-grey-100);
  --panel-3: var(--color-grey-200);
  --surface-strong: var(--color-grey-300);
  --line: var(--color-grey-300);
  --line-strong: var(--color-grey-600);
  --text: var(--color-black);
  --body: var(--color-grey-700);
  --soft: var(--color-grey-600);
  --muted: var(--color-grey-500);
  --accent: var(--color-accent-orange);
  --accent-active: var(--color-accent-orange-bright);
  --danger: #b42318;
  --warning: #7a4a00;
  --ok: #2f6b43;
  --radius: 3px;
  --radius-sm: 3px;
  --radius-md: 3px;
  --radius-lg: 3px;
  --radius-xl: 3px;
  --radius-pill: 3px;
  --shadow-1: none;
  --shadow-2: none;
  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 20px;
  --font-size-xl: 30px;
  --font-size-2xl: 40px;
  --font-size-3xl: clamp(40px, 5.6vw, 80px);
  --line-height-tight: 0.98;
  --line-height-heading: 1.06;
  --line-height-body: 1.5;
  --content-max-width: 1440px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
}

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--font-size-md);
  line-height: var(--line-height-body);
  letter-spacing: 0;
}

body {
  margin: 0;
  min-height: 100vh;
}

::selection {
  background: var(--color-grey-900);
  color: var(--color-white);
}

a,
button {
  transition: color 200ms, background 200ms, border-color 200ms, opacity 200ms;
}

button::-moz-focus-inner {
  border: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
  display: block;
  background: var(--bg);
}

.sidebar,
.mobile-topbar,
.mobile-nav {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: block;
  min-height: 64px;
  border: 0;
  border-bottom: 1px solid var(--color-grey-800);
  background: var(--color-black);
  color: var(--color-white);
  box-shadow: none;
}

.topbar-inner {
  width: 100%;
  max-width: none;
  min-height: 64px;
  margin: 0;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 3vw, 56px);
}

.brand {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 0;
}

.brand-logo {
  width: min(125px, 100%);
  height: auto;
  display: block;
}

.topbar .brand-logo {
  filter: invert(1);
}

.brand-mark,
.brand h1,
.brand p {
  display: none;
}

.nav {
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(16px, 2.2vw, 36px);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav button {
  position: relative;
  min-height: 64px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
}

.nav button:hover,
.nav button.active {
  background: transparent;
  color: var(--color-white);
}

.nav button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: currentColor;
}

.topbar-user {
  margin: 0;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}

.user-chip {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  text-align: right;
}

.user-chip strong,
.user-chip span {
  display: block;
}

.user-chip strong {
  color: var(--color-white);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 600;
  white-space: nowrap;
}

.user-chip span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 400;
  white-space: nowrap;
}

.main {
  position: relative;
  min-width: 0;
  padding: 0 clamp(24px, 4vw, 64px) 96px;
  overflow: visible;
  background: var(--bg);
}

.main::before {
  display: none;
}

.page {
  width: min(100%, var(--content-max-width));
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0;
}

.page-header {
  position: relative;
  min-height: 0;
  margin: 0 0 var(--space-12);
  padding: var(--space-16) 0 var(--space-8);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--space-8);
  box-shadow: none;
}

.page-header::before,
.page-header::after {
  display: none;
}

.eyebrow,
.page-header .eyebrow {
  margin: 0 0 var(--space-4);
  color: var(--soft);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.page-title,
.order-lightbox-title,
.login-title {
  margin: 0;
  max-width: 1040px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--font-size-3xl);
  line-height: var(--line-height-tight);
  font-weight: 400;
  letter-spacing: 0;
}

.page-subtitle,
.page-header .page-subtitle {
  margin: var(--space-4) 0 0;
  max-width: 760px;
  color: var(--body);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 400;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.panel,
.filters,
.orders-list-panel,
.form-chip,
.calendar-company-group,
.login-card,
.login-panel,
.contact-card,
.table-wrap,
.order-lightbox-section {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: none;
}

.panel,
.filters,
.orders-list-panel {
  padding: clamp(24px, 3vw, 48px);
}

.panel.tight {
  padding: var(--space-6);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.panel-title,
.form-chip-title,
.modal-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 40px);
  line-height: var(--line-height-heading);
  font-weight: 400;
  letter-spacing: 0;
}

.panel-subtitle,
.form-chip-subtitle,
.row-meta,
.metric-trend,
.definition span,
.hint,
.muted {
  color: var(--body);
}

.grid {
  display: grid;
  gap: var(--space-8);
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  box-shadow: none;
}

.metric,
.grid.four > .metric {
  min-height: 190px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  padding: clamp(28px, 4vw, 56px);
  box-shadow: none;
}

.grid.four > .metric:last-child {
  border-right: 0;
}

.metric-clickable {
  width: 100%;
  cursor: pointer;
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
}

.metric-clickable:hover,
.metric-clickable:focus-visible {
  background: var(--color-grey-100);
  border-color: var(--line);
  box-shadow: none;
}

.metric-value {
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(48px, 5vw, 86px);
  line-height: 0.98;
  font-weight: 400;
  letter-spacing: 0;
}

.metric-label,
.row-title,
.calendar-company-header h4,
.calendar-entry-main strong,
.definition strong {
  color: var(--text);
}

.metric-label {
  margin-top: var(--space-4);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 600;
}

.list {
  display: grid;
  gap: var(--space-3);
}

.list-row,
.calendar-list-entry,
.product-row,
.file-row,
.proposal-row,
.timeline-item,
.demo-user,
.empty {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: none;
}

.list-row {
  padding: var(--space-6);
}

.list-row.clickable {
  cursor: pointer;
}

.list-row.clickable:hover,
.list-row.clickable:focus-visible,
.calendar-list-entry:hover,
.calendar-list-entry:focus-visible,
.demo-user:hover,
.demo-user:focus-visible {
  border-color: var(--line-strong);
  background: var(--color-grey-100);
  box-shadow: none;
}

.row-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-6);
}

.row-actions,
.proposal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.row-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

.row-meta {
  margin-top: var(--space-1);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 400;
}

.btn,
button.btn,
a.btn,
.page-header .btn,
.modal .btn,
.order-lightbox .btn,
.modal .btn.small,
.order-lightbox .btn.small,
.logout-btn {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--color-black);
  border-radius: 0;
  background: transparent;
  color: var(--color-black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
}

.btn:hover,
button.btn:hover,
a.btn:hover,
.modal .btn:hover,
.order-lightbox .btn:hover,
.btn:focus-visible,
button.btn:focus-visible,
a.btn:focus-visible,
.modal .btn:focus-visible,
.order-lightbox .btn:focus-visible {
  border-color: var(--color-black);
  background: var(--color-black);
  color: var(--color-white);
  box-shadow: none;
}

.btn.primary,
button.btn.primary,
a.btn.primary,
.page-header .btn.primary,
.modal .btn.primary,
.order-lightbox .btn.primary {
  border-color: var(--color-black);
  background: var(--color-black);
  color: var(--color-white);
}

.btn.primary:hover,
button.btn.primary:hover,
a.btn.primary:hover,
.page-header .btn.primary:hover,
.modal .btn.primary:hover,
.order-lightbox .btn.primary:hover {
  border-color: var(--color-grey-800);
  background: var(--color-grey-800);
  color: var(--color-white);
}

.btn.warning,
button.btn.warning,
.modal .btn.warning,
.order-lightbox .btn.warning {
  border-color: var(--color-black);
  background: transparent;
  color: var(--color-black);
}

.modal .btn:not(.primary),
.order-lightbox .btn:not(.primary) {
  border-color: var(--color-black);
  background: transparent;
  color: var(--color-black);
}

.modal .btn:not(.primary):hover,
.modal .btn:not(.primary):focus-visible,
.order-lightbox .btn:not(.primary):hover,
.order-lightbox .btn:not(.primary):focus-visible {
  border-color: var(--color-black);
  background: var(--color-black);
  color: var(--color-white);
}

.btn.danger,
button.btn.danger,
.modal .btn.danger,
.order-lightbox .btn.danger {
  border-color: var(--danger);
  background: transparent;
  color: var(--danger);
}

.btn.danger:hover,
button.btn.danger:hover,
.modal .btn.danger:hover,
.order-lightbox .btn.danger:hover,
.btn.danger:focus-visible,
button.btn.danger:focus-visible,
.modal .btn.danger:focus-visible,
.order-lightbox .btn.danger:focus-visible {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--color-white);
}

.btn.ghost,
.btn.link,
.button-link,
.link-button,
.file-link,
.inline-link {
  border-color: transparent;
  background: transparent;
  color: var(--color-black);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-weight: 500;
}

.file-link::after,
.inline-link::after,
.button-link::after {
  content: " ↗";
  color: var(--accent);
  text-decoration: none;
}

.auth-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-black);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  margin-top: var(--space-4);
  padding: 0;
  font: inherit;
  font-weight: 600;
}

.auth-link:hover,
.auth-link:focus-visible {
  color: var(--accent);
}

.btn.small,
.modal .btn.small,
.order-lightbox .btn.small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

.btn.full {
  width: 100%;
}

.logout-btn {
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.72);
  color: var(--color-white);
}

.logout-btn:hover,
.logout-btn:focus-visible {
  border-color: var(--color-white);
  background: var(--color-white);
  color: var(--color-black);
}

.field {
  display: grid;
  gap: var(--space-2);
}

.field label,
.filters label,
.form-chip label {
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
}

.field input,
.field select,
.field textarea,
.filters input,
.filters select,
.filters textarea,
input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--color-grey-300);
  border-radius: 0;
  background-color: var(--color-white);
  color: var(--text);
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 400;
  box-shadow: none;
}

.field textarea,
textarea {
  min-height: 116px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder,
.filters input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--color-grey-500);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.filters input:focus,
.filters select:focus,
.filters textarea:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-black);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: none;
}

.field select,
.filters select,
select {
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 5L7 9L11 5' stroke='%23000000' stroke-width='1.5' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 14px 14px;
}

.field select option,
.filters select option,
select option {
  min-height: 42px;
  padding: 12px 16px;
  color: var(--color-black);
  background: var(--color-white);
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--danger);
}

.field-error,
.error-text {
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.filters .field:first-child {
  grid-column: span 2;
}

.status,
.badge,
.tag,
.message-badge {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--color-grey-600);
  border-radius: 0;
  background: var(--color-white);
  color: var(--color-grey-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.status.requested,
.status.reschedule_requested,
.status.sent {
  border-color: var(--accent);
  color: var(--accent);
}

.status.accepted,
.status.completed,
.status.done {
  border-color: var(--ok);
  color: var(--ok);
}

.status.declined,
.status.cancelled {
  border-color: var(--danger);
  color: var(--danger);
}

.status.archived,
.status.draft {
  border-color: var(--color-grey-400);
  color: var(--color-grey-600);
}

.priority {
  color: var(--text);
  font-weight: 600;
}

.priority.eilig {
  color: var(--warning);
}

.priority.dringend {
  color: var(--danger);
}

.notice {
  border: 1px solid var(--color-grey-600);
  border-radius: 0;
  background: var(--color-grey-100);
  color: var(--text);
  padding: var(--space-4);
}

.notice.ok {
  border-color: var(--ok);
  background: var(--color-white);
  color: var(--ok);
}

.notice.danger {
  border-color: var(--danger);
  background: var(--color-white);
  color: var(--danger);
}

.notice.info {
  border-color: var(--accent);
  color: var(--text);
}

.tabs,
.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--line);
}

.tab,
.step {
  min-height: 48px;
  padding: 0 0 var(--space-3);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--color-grey-500);
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
}

.tab.active,
.step.active {
  border-color: var(--color-black);
  background: transparent;
  color: var(--color-black);
}

.form-chip {
  padding: var(--space-8);
  display: grid;
  gap: var(--space-6);
}

.form-chip + .form-chip {
  margin-top: var(--space-6);
}

.form-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(260px, auto);
  align-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.calendar-toolbar .panel-title {
  text-align: center;
}

.calendar-view-switch {
  width: max-content;
  margin-bottom: var(--space-6);
  display: inline-flex;
  border: 1px solid var(--color-black);
  border-radius: 0;
  background: var(--color-white);
  overflow: visible;
}

.view-toggle-option {
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid var(--color-black);
  border-radius: 0;
  background: transparent;
  color: var(--color-black);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
}

.view-toggle-option:last-child {
  border-right: 0;
}

.view-toggle-option.active,
.view-toggle-option:hover,
.view-toggle-option:focus-visible {
  background: var(--color-black);
  color: var(--color-white);
}

.view-icon {
  width: 17px;
  height: 17px;
  stroke-width: 1.75;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--color-white);
  overflow: visible;
}

.calendar-head,
.calendar-day {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--space-3);
}

.calendar-head {
  min-height: 46px;
  background: var(--color-grey-100);
  color: var(--color-black);
  font-size: 13px;
  font-weight: 600;
}

.calendar-day {
  position: relative;
  min-height: 138px;
  background: var(--color-white);
  overflow: visible;
}

.calendar-day.outside {
  background: var(--color-grey-100);
  color: var(--color-grey-500);
}

.calendar-day:nth-child(7n),
.calendar-head:nth-child(7n) {
  border-right: 0;
}

.day-number {
  margin-bottom: var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-black);
  font-size: 15px;
  font-weight: 600;
}

.today-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: none;
}

.day-items {
  display: grid;
  gap: var(--space-2);
  overflow: visible;
}

.calendar-pill {
  position: relative;
  min-width: 0;
  max-width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--color-grey-400);
  border-radius: 0;
  background: var(--color-white);
  color: var(--color-black);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: none;
}

.calendar-pill.has-tooltip {
  overflow: visible;
}

.calendar-pill-wrap {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.calendar-pill-label {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-pill-tooltip {
  position: absolute;
  left: calc(-1 * var(--space-3));
  bottom: calc(100% + 8px);
  z-index: 30;
  width: calc(100% + (var(--space-3) * 2));
  min-width: 0;
  max-width: calc(100% + (var(--space-3) * 2));
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid var(--color-black);
  border-radius: 0;
  background: var(--color-white);
  color: var(--color-black);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  pointer-events: none;
  white-space: normal;
}

.calendar-pill-tooltip-row {
  display: grid;
  gap: 2px;
}

.calendar-pill-tooltip-row + .calendar-pill-tooltip-row {
  margin-top: 10px;
}

.calendar-pill-tooltip-row span {
  color: var(--color-grey-600);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  text-transform: uppercase;
}

.calendar-pill-tooltip-row strong {
  color: var(--color-black);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.calendar-pill-wrap.has-tooltip:hover .calendar-pill-tooltip,
.calendar-pill-wrap.has-tooltip:focus-within .calendar-pill-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

button.calendar-pill {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-align: left;
}

.calendar-pill.clickable:hover,
.calendar-pill.clickable:focus-visible {
  border-color: var(--color-black);
  background: var(--color-grey-100);
}

.calendar-pill.available {
  border-color: var(--ok);
  color: var(--color-black);
}

.calendar-pill.order {
  border-color: var(--accent);
  color: var(--color-black);
}

.calendar-pill.blocked {
  border-color: var(--danger);
  color: var(--danger);
  padding-left: 22px;
}

.calendar-pill.blocked::before,
.blocked-dot {
  content: "";
  position: absolute;
  top: 10px;
  left: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}

.calendar-tooltip {
  border: 1px solid var(--color-black);
  border-radius: 0;
  background: var(--color-white);
  color: var(--color-black);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
}

.calendar-list {
  display: grid;
  gap: var(--space-6);
}

.calendar-company-group {
  overflow: hidden;
}

.calendar-company-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--line);
  background: var(--color-grey-100);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-6);
}

.calendar-entry-list {
  display: grid;
}

.calendar-list-entry {
  width: 100%;
  padding: var(--space-5, 24px);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 4px solid var(--color-grey-500);
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(0, 1.7fr) auto;
  gap: var(--space-6);
  align-items: center;
  text-align: left;
}

.calendar-list-entry:last-child {
  border-bottom: 0;
}

.calendar-list-entry.blocked {
  border-left-color: var(--danger);
}

.calendar-list-entry.available {
  border-left-color: var(--ok);
}

.calendar-list-entry.order {
  border-left-color: var(--accent);
}

.calendar-entry-type {
  border: 1px solid var(--color-grey-600);
  border-radius: 0;
  padding: 6px 10px;
  color: var(--color-grey-700);
  white-space: nowrap;
}

.calendar-entry-type.blocked {
  border-color: var(--danger);
  color: var(--danger);
}

.calendar-entry-type.available {
  border-color: var(--ok);
  color: var(--ok);
}

.calendar-entry-type.order {
  border-color: var(--accent);
  color: var(--accent);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--color-grey-100);
  color: var(--color-black);
  font-size: 13px;
  font-weight: 600;
}

td {
  color: var(--body);
  font-size: 15px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--space-8);
}

.definition {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--line);
}

.definition span {
  display: block;
  margin-bottom: var(--space-1);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

.definition strong {
  font-size: 17px;
  line-height: 1.35;
  font-weight: 600;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: var(--space-8);
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(18px);
}

.modal,
.modal.order-lightbox {
  width: min(780px, 100%);
  max-height: min(840px, 92vh);
  overflow: auto;
  border: 1px solid var(--color-grey-600);
  border-radius: 0;
  background: var(--color-white);
  color: var(--text);
  box-shadow: none;
}

.modal {
  padding: var(--space-8);
}

.modal.order-lightbox {
  width: min(1180px, 100%);
  padding: 0;
}

.modal.company-modal {
  width: min(1120px, 100%);
}

.order-lightbox-header,
.company-modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: var(--space-8);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-8);
}

.order-lightbox-header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.order-lightbox-body {
  padding: 0 var(--space-8) var(--space-8);
}

.order-lightbox-body > .header-actions:first-child {
  margin-top: var(--space-6);
  padding: 0 0 var(--space-6);
  border: 0;
  border-bottom: 1px solid var(--line);
}

.order-lightbox-section {
  margin-top: var(--space-8);
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  padding-top: var(--space-8);
  background: transparent;
}

.order-lightbox-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.modal-actions {
  margin-top: var(--space-8);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.timeline {
  display: grid;
  gap: var(--space-3);
  border-left: 0;
}

.timeline-item {
  padding: var(--space-4);
  border-left: 4px solid var(--color-grey-600);
}

.timeline-item.message {
  border-left-color: var(--accent);
}

.timeline-item::before {
  display: none;
}

.timeline-item strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.timeline-item div {
  margin-top: var(--space-1);
  color: var(--body);
}

.timeline-item span {
  display: block;
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: 13px;
}

.message-box {
  margin-top: var(--space-8);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: end;
}

.login-screen {
  min-height: 100vh;
  padding: var(--space-8);
  display: grid;
  place-items: center;
  background: var(--color-white);
}

.login-panel {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  border: 1px solid var(--color-black);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.login-hero {
  min-height: 560px;
  padding: var(--space-12);
  background: var(--color-black);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-hero .brand h1,
.login-hero .brand p,
.login-hero .brand-mark {
  display: block;
  color: var(--color-white);
}

.login-hero .brand-logo {
  filter: invert(1);
}

.login-title {
  color: var(--color-white);
}

.login-copy {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
}

.login-card {
  padding: var(--space-12);
  border: 0;
  border-left: 1px solid var(--color-black);
}

.demo-users {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-6) 0;
}

.demo-user {
  width: 100%;
  padding: var(--space-4);
  text-align: left;
}

.demo-user.active {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.original-appointment-box {
  margin-top: var(--space-4);
  padding: var(--space-5, 24px);
  border: 1px solid var(--color-grey-600);
  border-radius: 0;
  background: var(--color-grey-100);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.contact-card {
  padding: var(--space-4);
}

.product-row,
.file-row,
.proposal-row {
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  gap: var(--space-4);
  align-items: end;
}

.product-row {
  grid-template-columns: minmax(0, 2fr) minmax(120px, 0.7fr) minmax(0, 1.2fr) auto;
}

.file-row {
  grid-template-columns: 1fr 1fr auto;
}

.proposal-row {
  grid-template-columns: 1fr 1fr 1fr;
}

.empty {
  padding: var(--space-8);
  color: var(--body);
  text-align: center;
}

@media (max-width: 1180px) {
  .topbar-inner {
    grid-template-columns: 150px minmax(0, 1fr) auto;
    gap: var(--space-6);
    padding-inline: 24px;
  }

  .nav {
    justify-content: flex-start;
    gap: var(--space-4);
  }

  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.four > .metric:nth-child(2n) {
    border-right: 0;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters .field:first-child {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .topbar {
    position: relative;
  }

  .topbar-inner {
    min-height: 0;
    padding: 16px 20px 0;
    grid-template-columns: 1fr auto;
    gap: 14px 20px;
  }

  .brand {
    min-height: 44px;
  }

  .topbar-user {
    justify-self: end;
  }

  .user-chip {
    display: none;
  }

  .nav {
    grid-column: 1 / -1;
    min-height: 50px;
    justify-content: flex-start;
    border-top: 1px solid var(--color-grey-800);
  }

  .nav button {
    min-height: 50px;
  }

  .main {
    padding-inline: 20px;
    padding-bottom: 72px;
  }

  .page-header {
    grid-template-columns: 1fr;
    padding-top: var(--space-12);
  }

  .page-title {
    font-size: clamp(34px, 12vw, 56px);
  }

  .grid.two,
  .grid.three,
  .form-chip-grid,
  .detail-grid,
  .login-panel,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .grid.four {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 76vw);
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .grid.four > .metric {
    border-right: 1px solid var(--line);
    scroll-snap-align: start;
  }

  .filters,
  .calendar-toolbar {
    grid-template-columns: 1fr;
  }

  .calendar-toolbar .panel-title {
    text-align: left;
  }

  .calendar-grid {
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(150px, 1fr));
  }

  .calendar-list-entry {
    grid-template-columns: 1fr;
  }

  .order-lightbox-header,
  .order-lightbox-body {
    padding-inline: 20px;
  }

  .order-lightbox-header {
    display: grid;
    gap: var(--space-4);
  }

  .message-box,
  .product-row,
  .file-row,
  .proposal-row {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: auto;
    padding: var(--space-8);
  }

  .login-card {
    border-left: 0;
    border-top: 1px solid var(--color-black);
    padding: var(--space-8);
  }
}

@media (max-width: 560px) {
  .topbar-inner {
    padding-inline: 16px;
  }

  .brand-logo {
    max-width: 104px;
  }

  .logout-btn {
    min-height: 34px;
    padding-inline: 12px;
    font-size: 13px;
  }

  .panel,
  .filters,
  .orders-list-panel,
  .form-chip {
    padding: 20px;
  }

  .modal-backdrop {
    padding: 0;
  }

  .modal,
  .modal.order-lightbox {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border-left: 0;
    border-right: 0;
  }
}

.report-chart {
  display: grid;
  gap: 18px;
}

.report-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.3;
}

.report-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.report-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  background: var(--color-mid-grey);
}

.report-chart-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
}

.report-company {
  display: grid;
  gap: 4px;
}

.report-company strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
}

.report-company span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.report-bar-area {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.report-bar-shell {
  min-height: 34px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--color-warm-grey-100);
  overflow: hidden;
}

.report-bar-fill {
  min-height: 34px;
  display: flex;
}

.report-bar-segment {
  min-width: 8px;
  display: block;
}

.report-bar-segment.open,
.report-dot.open,
.report-value.open {
  --report-color: #0066cc;
}

.report-bar-segment.accepted,
.report-dot.accepted,
.report-value.accepted {
  --report-color: #2f6b43;
}

.report-bar-segment.reschedule,
.report-dot.reschedule,
.report-value.reschedule {
  --report-color: #8a4de8;
}

.report-bar-segment.cancelled,
.report-dot.cancelled,
.report-value.cancelled {
  --report-color: #b42318;
}

.report-bar-segment.other,
.report-dot.other,
.report-value.other {
  --report-color: #7a7a7a;
}

.report-bar-segment,
.report-dot {
  background: var(--report-color, var(--color-mid-grey));
}

.report-bar-empty {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding-inline: 12px;
  color: var(--muted);
  font-size: 14px;
}

.report-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-value {
  border: 1px solid color-mix(in srgb, var(--report-color, var(--color-mid-grey)) 44%, transparent);
  background: color-mix(in srgb, var(--report-color, var(--color-mid-grey)) 10%, white);
  color: var(--report-color, var(--soft));
  padding: 5px 8px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
}

/* Page headers use the restrained product-title scale, not the oversized display scale. */
.page-title {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  max-width: 900px;
}

@media (max-width: 900px) {
  .page-title {
    font-size: clamp(30px, 8vw, 44px);
  }
}

/* Global product radius: all boxes and buttons use the same restrained 3px edge. */
.panel,
.filters,
.orders-list-panel,
.form-chip,
.calendar-company-group,
.login-card,
.login-panel,
.contact-card,
.table-wrap,
.order-lightbox-section,
.grid.four,
.list-row,
.calendar-list-entry,
.product-row,
.file-row,
.proposal-row,
.timeline-item,
.demo-user,
.empty,
.message-box,
.message-item,
.definition,
.notice,
.modal,
.modal.order-lightbox,
.modal.company-modal,
.status,
.badge,
.tag,
.message-badge,
.tabs,
.stepper,
.tab,
.step,
.report-chart-row,
.report-bar-shell,
.report-value,
.calendar-view-switch,
.view-toggle-option,
.calendar-grid,
.calendar-pill,
.calendar-pill-tooltip,
.btn,
button.btn,
a.btn,
.logout-btn,
button,
input,
select,
textarea {
  border-radius: 3px;
}

.message-order-panel {
  padding: 28px 30px;
}

.message-order-panel .panel-header {
  align-items: flex-start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  margin-bottom: 22px;
}

.message-order-panel .panel-header > div {
  min-width: 0;
}

.message-order-panel .panel-title {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.message-order-panel .panel-subtitle {
  margin-top: 8px;
}

.message-order-panel .timeline {
  display: grid;
  gap: 12px;
}

.message-order-panel .timeline-item {
  padding: 14px 16px;
}

.message-order-panel .timeline-item div {
  line-height: 1.35;
}

.message-order-panel .btn.small {
  align-self: start;
  min-width: 76px;
}

@media (max-width: 700px) {
  .message-order-panel {
    padding: 22px 20px;
  }

  .message-order-panel .panel-header {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .message-order-panel .btn.small {
    justify-self: start;
  }
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.pagination span {
  color: var(--body);
  font-weight: 600;
}

.product-row,
.file-row {
  align-items: end;
}

.product-row > .field,
.file-row > .field {
  align-self: end;
}

.product-row > .btn,
.file-row > .btn {
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 0;
}

.calendar-pill.order {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 42px;
  white-space: normal;
}

.calendar-pill-company,
.calendar-pill.order .calendar-pill-label {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-pill-company {
  color: var(--color-grey-700);
  font-size: 10px;
  line-height: 1.15;
  font-weight: 600;
}

.calendar-pill.order .calendar-pill-label {
  color: inherit;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 700;
}

.topbar button.logout-btn,
.topbar .btn.logout-btn {
  border-color: rgba(255, 255, 255, 0.72);
  background: transparent;
  color: var(--color-white);
}

.topbar button.logout-btn:hover,
.topbar button.logout-btn:focus-visible,
.topbar .btn.logout-btn:hover,
.topbar .btn.logout-btn:focus-visible {
  border-color: var(--color-white);
  background: var(--color-white);
  color: var(--color-black);
}

@media (max-width: 560px) {
  html,
  body {
    overflow-x: hidden;
  }

  .topbar-inner {
    padding: 14px 16px 0;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    max-width: 112px;
  }

  .topbar-user {
    min-width: 0;
  }

  .topbar button.logout-btn,
  .topbar .btn.logout-btn {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .nav {
    width: 100%;
    max-width: calc(100vw - 32px);
    min-height: 48px;
    gap: 22px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav button {
    min-height: 48px;
    font-size: 14px;
    flex: 0 0 auto;
  }

  .main {
    padding-inline: 16px;
    padding-bottom: 48px;
  }

  .page {
    width: 100%;
    max-width: 100%;
  }

  .page-header {
    gap: 18px;
    margin-bottom: 22px;
    padding: 28px 0 22px;
  }

  .page-title {
    max-width: 100%;
    font-size: clamp(30px, 10.5vw, 38px);
    line-height: 1.08;
  }

  .page-subtitle {
    max-width: 100%;
    font-size: 16px;
    line-height: 1.45;
  }

  .page-header .header-actions {
    justify-content: stretch;
    width: 100%;
  }

  .page-header .btn {
    width: 100%;
  }

  .panel,
  .filters,
  .orders-list-panel,
  .form-chip {
    width: 100%;
    padding: 18px;
  }

  .panel-header,
  .row-main,
  .order-lightbox-header,
  .company-modal-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .row-actions,
  .header-actions,
  .modal-actions {
    width: 100%;
    justify-content: stretch;
  }

  .row-actions .btn,
  .header-actions .btn,
  .modal-actions .btn {
    flex: 1 1 auto;
  }

  .filters,
  .user-filters {
    grid-template-columns: 1fr;
  }

  .field input,
  .field select,
  .field textarea {
    min-width: 0;
    font-size: 16px;
    padding-inline: 14px;
  }

  .calendar-view-switch {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 22px;
    overflow: hidden;
  }

  .view-toggle-option {
    min-width: 0;
    min-height: 46px;
    padding: 0 6px;
    gap: 5px;
    font-size: 11px;
    line-height: 1.1;
    justify-content: center;
    text-align: center;
  }

  .view-toggle-option:last-child {
    border-left: 1px solid var(--color-black);
  }

  .view-icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }

  .calendar-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
  }

  .calendar-toolbar .header-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .calendar-toolbar .btn.small {
    min-width: 0;
    min-height: 42px;
    padding: 0 6px;
    font-size: 13px;
  }

  .calendar-toolbar .panel-title {
    text-align: left;
    font-size: 30px;
    order: 2;
  }

  .calendar-company-filter {
    min-width: 0;
    width: 100%;
    order: 3;
  }

  .calendar-grid {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    border: 0;
    background: transparent;
    gap: 10px;
  }

  .calendar-head {
    display: none;
  }

  .calendar-day,
  .calendar-day:nth-child(7n) {
    min-width: 0;
    min-height: 96px;
    border: 1px solid var(--line);
    background: var(--color-white);
    padding: 12px;
  }

  .calendar-day.outside,
  .calendar-day.empty-day {
    display: none;
  }

  .day-items {
    min-width: 0;
  }

  .calendar-pill,
  button.calendar-pill,
  .calendar-pill-label {
    min-width: 0;
    max-width: 100%;
  }

  .calendar-pill {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .calendar-pill.blocked {
    padding-left: 24px;
  }

  .calendar-pill-tooltip {
    left: 0;
    right: auto;
    width: min(260px, calc(100vw - 64px));
    max-width: min(260px, calc(100vw - 64px));
  }

  .calendar-list-entry {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .calendar-company-header {
    display: grid;
    gap: 8px;
  }

  .report-chart-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .report-legend,
  .report-values {
    gap: 8px;
  }

  .report-value {
    font-size: 12px;
  }
}
