:root {
  --brand: #005ca9;
  --brand-strong: #004a89;
  --accent: #94c11f;
  --accent-strong: #80a91a;
  --shop: #e50056;
  --sky: #68aee1;
  --ink: #172435;
  --muted: #6d7886;
  --line: #dde5ec;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --surface-3: #eef5fa;
  --accent-soft: #eef7d8;
  --brand-soft: #e7f1f8;
  --danger: #c8375a;
  --warning: #a86800;
  --success: #4f8d16;
  --shadow: 0 16px 36px rgba(0, 92, 169, 0.1);
  --radius: 8px;
}

/* CRM roadmap: cockpit, 360-degree timeline, acquisition pipeline and tour scheduling */
.crm-daily-cockpit .section-header { align-items: center; }
.crm-daily-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 0 18px 18px; }
.crm-daily-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; min-height: 112px; padding: 16px; border: 1px solid #dbe5ee; border-radius: 14px; background: linear-gradient(145deg, #fff, #f7fafc); }
.crm-daily-card > .material-icons { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #005ca9; background: #eaf4fc; }
.crm-daily-card > div { display: grid; gap: 3px; min-width: 0; }
.crm-daily-card strong { font-size: 1.45rem; color: #162b3d; }
.crm-daily-card span { font-weight: 700; color: #32485a; }
.crm-daily-card small { color: #687988; line-height: 1.35; }
.crm-daily-card.warning > .material-icons { color: #9a6200; background: #fff1cf; }
.crm-daily-card.danger > .material-icons { color: #c52b35; background: #fde9eb; }
.crm-daily-card.outlook > .material-icons { color: #6b40b5; background: #f0eafb; }

.crm-customer-360-modal { width: min(900px, calc(100vw - 32px)); max-height: min(860px, calc(100vh - 32px)); }
.crm-customer-360-body { overflow: auto; }
.crm-customer-360-overview { display: grid; gap: 14px; margin-bottom: 22px; }
.crm-customer-360-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.crm-customer-360-kpis article { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 12px; border: 1px solid #dbe5ec; border-radius: 12px; background: #f7fafc; }
.crm-customer-360-kpis .material-icons { color: #005ca9; }
.crm-customer-360-kpis article div { min-width: 0; display: grid; gap: 1px; }
.crm-customer-360-kpis strong { overflow: hidden; color: #17364d; text-overflow: ellipsis; white-space: nowrap; }
.crm-customer-360-kpis small { color: #687988; }
.crm-customer-360-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.crm-customer-360-info-card { padding: 14px; border: 1px solid #dbe5ec; border-radius: 12px; background: #fff; }
.crm-customer-360-info-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; color: #17364d; }
.crm-customer-360-info-heading .material-icons { color: #005ca9; }
.crm-customer-360-info-card dl { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr); gap: 7px 12px; margin: 0; }
.crm-customer-360-info-card dt { color: #687988; font-size: .78rem; font-weight: 800; }
.crm-customer-360-info-card dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.crm-customer-360-info-card a { color: #005ca9; font-weight: 700; text-decoration: none; }
.crm-customer-360-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; color: #334a5c; background: #fff8e9; }
.crm-customer-360-note > .material-icons { color: #a26a00; }
.crm-customer-360-note p { margin: 3px 0 0; }
.crm-customer-360-activity-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.crm-customer-360-activity-heading h3 { margin: 2px 0 0; color: #17364d; }
.crm-timeline { position: relative; display: grid; gap: 14px; padding: 6px 4px 14px; }
.crm-timeline::before { content: ""; position: absolute; left: 21px; top: 8px; bottom: 18px; width: 2px; background: #dce6ee; }
.crm-timeline-item { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
.crm-timeline-icon { z-index: 1; display: grid; place-items: center; width: 42px; height: 42px; border: 3px solid #fff; border-radius: 50%; color: #005ca9; background: #dfeffc; box-shadow: 0 0 0 1px #c9dce9; }
.crm-timeline-item.orange .crm-timeline-icon { color: #9a6200; background: #fff1cf; }
.crm-timeline-item.red .crm-timeline-icon { color: #bc2633; background: #fde7e9; }
.crm-timeline-item.green .crm-timeline-icon { color: #3c7319; background: #e9f5df; }
.crm-timeline-item.purple .crm-timeline-icon { color: #6940ad; background: #eee6fa; }
.crm-timeline-item > div { display: grid; gap: 4px; padding: 13px 15px; border: 1px solid #dce5ec; border-radius: 12px; background: #fff; }
.crm-timeline-item time, .crm-timeline-item small { color: #6a7a87; font-size: .78rem; }
.crm-timeline-item p { margin: 3px 0 0; color: #334a5c; white-space: pre-wrap; }

.crm-acquisition-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.crm-view-switch { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid #d7e2ea; border-radius: 10px; background: #f5f8fa; }
.crm-view-switch .icon-btn.active { color: #fff; background: #005ca9; }
.crm-kanban { display: grid; grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: 12px; overflow-x: auto; padding: 2px 0 10px; }
.crm-kanban-column { min-height: 350px; padding: 10px; border: 1px solid #d8e3eb; border-radius: 14px; background: #f5f8fa; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.crm-kanban-column.drag-over { border-color: #005ca9; background: #eaf4fb; box-shadow: inset 0 0 0 2px rgba(0, 92, 169, .18); }
.crm-kanban-column-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 2px 3px 10px; }
.crm-kanban-column-header > div { display: grid; gap: 4px; }
.crm-kanban-column-header small { color: #6c7b87; }
.crm-kanban-cards { display: grid; align-content: start; gap: 9px; min-height: 280px; }
.crm-kanban-card { display: grid; width: 100%; overflow: hidden; border: 1px solid #d9e3ea; border-radius: 12px; color: inherit; text-align: left; background: #fff; box-shadow: 0 3px 10px rgba(23, 52, 73, .05); cursor: grab; -webkit-user-drag: element; }
.crm-kanban-card:hover { border-color: #82b6d8; box-shadow: 0 6px 16px rgba(23, 52, 73, .1); transform: translateY(-1px); }
.crm-kanban-card.dragging { opacity: .45; }
.crm-kanban-card-open { display: grid; gap: 8px; width: 100%; padding: 13px; border: 0; color: inherit; text-align: left; background: transparent; font: inherit; cursor: pointer; }
.crm-kanban-card-open small, .crm-kanban-card-open p { margin: 0; color: #647583; }
.crm-kanban-value { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; color: #17364d; }
.crm-kanban-card-open time { display: flex; align-items: center; gap: 4px; color: #7a5411; font-size: .8rem; }
.crm-kanban-card-open time .material-icons { font-size: 16px; }
.crm-kanban-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-top: 1px solid #e5ebef; background: #f8fafb; }
.crm-kanban-card-footer label { min-width: 0; }
.crm-kanban-card-footer .select { width: auto; max-width: 142px; min-height: 32px; padding: 4px 28px 4px 8px; font-size: .78rem; }
.crm-kanban-drag-hint { display: inline-flex; align-items: center; gap: 3px; color: #6c7b87; font-size: .75rem; font-weight: 800; }
.crm-kanban-drag-hint .material-icons { font-size: 17px; }
.crm-kanban-empty { display: grid; place-items: center; min-height: 72px; border: 1px dashed #bccbd6; border-radius: 10px; color: #82909b; }
.crm-acquisition-lost-reason { grid-column: span 2; }

.report-follow-up { padding: 16px; border: 1px solid #d8e5ee; border-radius: 14px; background: linear-gradient(135deg, #f7fbfe, #f9fbf2); }
.report-follow-up-heading > div { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.report-follow-up-heading .material-icons { color: #005ca9; }
.report-follow-up-heading div div { display: grid; gap: 2px; }
.report-follow-up-heading small { color: #687b8a; }
.report-follow-up-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.report-follow-up-toggle { min-height: 44px; }
.report-follow-up-text { grid-column: span 2; }

.crm-tour-schedule-summary { padding: 0 18px 14px; }
.crm-tour-schedule-summary-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border: 1px solid #cfe2ed; border-radius: 12px; background: #f2f9fd; color: #355064; }
.crm-tour-schedule-summary-inner > span { display: inline-flex; align-items: center; gap: 5px; }
.crm-tour-schedule-summary-inner .material-icons { font-size: 18px; }
.crm-tour-schedule-summary-inner .success { color: #467b21; }
.crm-tour-schedule-summary-inner .warning { color: #a16400; font-weight: 700; }
.crm-tour-schedule-summary-inner.late { border-color: #eccd91; background: #fff8e8; }
.crm-tour-stop-schedule { display: grid; grid-template-columns: minmax(112px, .8fr) repeat(2, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; }
.crm-tour-stop-schedule label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 5px; color: #647482; font-size: .75rem; }
.crm-tour-stop-schedule label > span { grid-column: 1 / -1; }
.crm-tour-stop-schedule .input { min-width: 0; height: 36px; padding: 6px 8px; }

@media (max-width: 1100px) {
  .crm-daily-grid, .crm-acquisition-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-follow-up-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .crm-daily-grid, .crm-acquisition-metrics, .report-follow-up-grid { grid-template-columns: 1fr; }
  .report-follow-up-text, .crm-acquisition-lost-reason { grid-column: auto; }
  .crm-tour-stop-schedule { grid-template-columns: 1fr; }
  .crm-customer-360-modal { width: calc(100vw - 16px); }
  .crm-customer-360-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-customer-360-info-grid { grid-template-columns: 1fr; }
}

.crm-page {
  gap: 16px;
}

.crm-intro {
  border-top: 4px solid var(--accent);
}

.crm-intro-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  background:
    radial-gradient(circle at 88% 18%, rgba(148, 193, 31, 0.2), transparent 30%),
    linear-gradient(120deg, #fff 0%, #f1f7fb 72%, #f5f9ec 100%);
}

.crm-intro h2 {
  margin: 3px 0 7px;
  color: var(--brand);
  font-size: clamp(24px, 3vw, 34px);
}

.crm-intro p {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.crm-eyebrow {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crm-intro-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.crm-error {
  border: 1px solid rgba(176, 42, 42, 0.24);
  border-radius: var(--radius);
  background: #fff6f6;
}

.solar-fallback-state {
  padding: 12px 16px;
  border: 1px solid #e2bd72;
  background: #fff7e5;
  color: #704600;
  font-weight: 700;
}

.crm-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.crm-open-tour-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.crm-open-tour-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #d69618;
  border-radius: var(--radius);
  background: var(--surface);
}

.crm-open-tour-card.ready {
  border-left-color: var(--success);
}

.crm-open-tour-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: #775000;
  background: #fff0d3;
}

.crm-open-tour-card.ready .crm-open-tour-icon {
  color: var(--success);
  background: var(--accent-soft);
}

.crm-open-tour-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.crm-open-tour-copy small {
  color: var(--muted);
}

.crm-open-tour-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crm-tour-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.crm-tour-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.crm-metric {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(0, 92, 169, 0.06);
}

.crm-metric > .material-icons {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: var(--brand);
  background: var(--brand-soft);
  flex: 0 0 auto;
}

.crm-metric > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.crm-metric strong {
  color: var(--brand);
  font-size: 25px;
  line-height: 1;
}

.crm-metric span:not(.material-icons) {
  color: var(--ink);
  font-weight: 800;
}

.crm-metric small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-metric.warning {
  border-left-color: #d69618;
}

.crm-metric.warning > .material-icons {
  color: #775000;
  background: #fff0d3;
}

.crm-metric.danger {
  border-left-color: var(--danger);
}

.crm-metric.danger > .material-icons {
  color: #8f2020;
  background: #fde0e0;
}

.crm-filters {
  display: grid;
  grid-template-columns: minmax(280px, 1.6fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr) max-content;
  align-items: end;
  gap: 12px;
}

.crm-filters .field {
  min-width: 0;
  margin: 0;
}

.crm-urgent-toggle {
  min-height: 42px;
  margin-bottom: 0;
}

.crm-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  align-items: start;
  gap: 16px;
}

.crm-task-table {
  min-width: 900px;
}

.crm-task-table td:nth-child(2) {
  min-width: 230px;
}

.crm-task-table td strong {
  display: block;
  color: var(--ink);
  line-height: 1.4;
}

.crm-row-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.crm-task-table .badge .material-icons {
  font-size: 16px;
}

.crm-customer-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 0;
  color: var(--brand);
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.crm-customer-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.crm-customer-link .material-icons {
  font-size: 16px;
}

.crm-activity-list {
  display: grid;
  max-height: 720px;
  overflow: auto;
}

.crm-activity-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.crm-activity-card:last-child {
  border-bottom: 0;
}

.crm-activity-card:hover {
  background: #f8fbf2;
}

.crm-activity-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
}

.crm-activity-icon .material-icons {
  font-size: 20px;
}

.crm-activity-copy {
  min-width: 0;
}

.crm-activity-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.crm-activity-heading strong {
  color: var(--ink);
}

.crm-activity-heading time,
.crm-activity-copy small {
  color: var(--muted);
  font-size: 12px;
}

.crm-activity-customer {
  margin: 5px 0;
}

.crm-activity-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@media (max-width: 1120px) {
  .crm-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-filters {
    grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(170px, 0.6fr));
  }

  .crm-urgent-toggle {
    grid-column: 1 / -1;
  }

  .crm-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .crm-intro-body {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .crm-intro-actions,
  .crm-intro-actions .btn {
    width: 100%;
  }

  .crm-intro-actions .btn {
    justify-content: center;
  }

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

  .crm-urgent-toggle {
    grid-column: auto;
  }

  .crm-activity-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .crm-activity-list {
    max-height: none;
  }

  .crm-open-tour-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .crm-open-tour-card > .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .crm-open-tour-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

.crm-tour-page {
  gap: 16px;
}

.crm-tour-hero {
  overflow: hidden;
  border-top: 4px solid var(--accent);
}

.crm-tour-hero-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  background:
    radial-gradient(circle at 88% 18%, rgba(148, 193, 31, 0.2), transparent 30%),
    linear-gradient(120deg, #fff 0%, #f1f7fb 72%, #f5f9ec 100%);
}

.crm-tour-hero h2 {
  margin: 3px 0 7px;
  color: var(--brand);
  font-size: clamp(24px, 3vw, 34px);
}

.crm-tour-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.crm-acquisition-page {
  gap: 16px;
}

.crm-acquisition-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.crm-acquisition-filters .field,
.crm-acquisition-filters .toggle-line {
  margin: 0;
}

.crm-acquisition-filter-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.crm-acquisition-filter-controls .field {
  flex: 0 1 360px;
  min-width: min(100%, 280px);
}

.crm-acquisition-filter-controls .toggle-line,
.crm-acquisition-filter-controls .badge {
  align-self: center;
}

.crm-acquisition-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-bottom: -8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.crm-acquisition-layout {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.crm-acquisition-list-section {
  overflow: hidden;
}

.crm-acquisition-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.crm-acquisition-detail-page {
  gap: 16px;
}

.crm-acquisition-detail-back {
  display: flex;
  align-items: center;
}

.crm-acquisition-detail-back .btn {
  min-height: 42px;
}

.crm-acquisition-list-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.crm-acquisition-list-item:hover,
.crm-acquisition-list-item.active {
  border-color: rgba(0, 92, 169, 0.42);
  background: var(--brand-soft);
}

.crm-acquisition-list-main,
.crm-acquisition-list-meta {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 4px;
}

.crm-acquisition-list-main strong,
.crm-acquisition-list-main small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-acquisition-list-main small,
.crm-acquisition-list-meta small {
  color: var(--muted);
}

.crm-acquisition-list-meta {
  justify-items: end;
}

.crm-acquisition-editor-section {
  min-width: 0;
}

.crm-acquisition-editor-empty {
  min-height: 340px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
}

.crm-acquisition-editor-empty .material-icons {
  color: var(--brand);
  font-size: 44px;
}

.crm-acquisition-editor-empty p {
  margin: 0;
}

.crm-acquisition-editor-header {
  align-items: flex-start;
}

.crm-acquisition-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 14px;
}

.crm-acquisition-comment-field {
  grid-column: 1 / -1;
}

.crm-acquisition-save-row {
  justify-content: flex-end;
  margin-bottom: 8px;
}

.crm-acquisition-linked-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.crm-acquisition-linked-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}

.crm-acquisition-linked-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.crm-acquisition-linked-header h3 {
  margin: 0 0 2px;
  color: var(--brand);
}

.crm-acquisition-linked-header small {
  color: var(--muted);
}

.crm-acquisition-composer {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--brand-soft);
}

.crm-acquisition-composer .field {
  margin: 0;
}

.crm-acquisition-composer .btn {
  justify-self: end;
}

.crm-acquisition-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.crm-acquisition-person-list,
.crm-acquisition-history-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.crm-acquisition-person-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.crm-acquisition-person-card > .material-icons {
  color: var(--brand);
}

.crm-acquisition-person-card > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.crm-acquisition-person-card small,
.crm-acquisition-person-card p {
  margin: 0;
  color: var(--muted);
}

.crm-acquisition-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
}

.crm-acquisition-contact-links a {
  color: var(--brand);
  text-decoration: none;
}

.crm-acquisition-history-card {
  width: 100%;
  padding: 12px;
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 0 7px 7px 0;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.crm-acquisition-history-card:hover,
.crm-acquisition-history-card.active {
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(0, 92, 169, 0.25);
}

.crm-acquisition-history-card time {
  color: var(--muted);
  font-size: 12px;
}

.crm-acquisition-history-card p {
  margin: 7px 0 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.crm-acquisition-history-detail {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.crm-acquisition-documents-panel {
  grid-column: 1 / -1;
}

.crm-acquisition-document-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.crm-acquisition-document-form .field {
  margin: 0;
}

.crm-acquisition-document-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.crm-acquisition-document-list button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.crm-acquisition-document-list button:hover {
  border-color: rgba(0, 92, 169, 0.4);
  background: var(--brand-soft);
}

.crm-acquisition-document-list button > .material-icons {
  color: var(--brand);
}

.crm-acquisition-document-list button > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.crm-acquisition-document-list small {
  color: var(--muted);
}

.icon-btn.success-icon {
  color: var(--success);
}

.storage-modal.crm-acquisition-modal {
  inset: 5vh auto auto 50%;
  width: min(920px, calc(100vw - 32px));
  max-height: 90vh;
  transform: translateX(-50%);
}

.crm-acquisition-modal .storage-modal-header > div {
  display: grid;
  gap: 3px;
}

.crm-acquisition-modal-composer,
.crm-acquisition-modal .crm-acquisition-composer,
.crm-acquisition-modal .crm-acquisition-document-form {
  padding: 0;
  border: 0;
  background: transparent;
}

.crm-acquisition-modal .crm-acquisition-modal-composer {
  display: grid;
  gap: 14px;
}

.crm-acquisition-modal .actions-row,
.crm-acquisition-modal .crm-acquisition-save-row {
  justify-content: flex-end;
}

body:has(.storage-modal.crm-acquisition-modal) {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (max-width: 1180px) {
  .crm-acquisition-layout,
  .crm-acquisition-linked-grid {
    grid-template-columns: 1fr;
  }

  .crm-acquisition-list-section {
    position: static;
    max-height: none;
  }

  .crm-acquisition-list {
    max-height: 430px;
  }

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

@media (max-width: 720px) {
  .crm-acquisition-filters,
  .crm-acquisition-form-grid,
  .crm-acquisition-mini-grid,
  .crm-acquisition-document-form {
    grid-template-columns: 1fr;
  }

  .crm-acquisition-list-item {
    grid-template-columns: 1fr;
  }

  .crm-acquisition-filter-controls {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .crm-acquisition-filter-controls .field {
    min-width: 0;
  }

  .crm-acquisition-list-meta {
    justify-items: start;
  }

  .crm-acquisition-save-row .btn,
  .crm-acquisition-composer .btn {
    width: 100%;
    justify-content: center;
  }
}

.crm-tour-planner-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(160px, 0.32fr) minmax(220px, 0.65fr) auto;
  align-items: end;
  gap: 14px;
}

.crm-tour-calendar-header {
  align-items: flex-start;
}

.crm-tour-calendar-header-tools {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.crm-outlook-calendar-status {
  display: flex;
  justify-content: flex-end;
}

.crm-outlook-calendar-badge,
.crm-outlook-calendar-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.crm-outlook-calendar-badge {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid rgba(99, 73, 160, 0.28);
  border-radius: 999px;
  color: #5b3f99;
  background: #f4efff;
  font-size: 12px;
  font-weight: 800;
}

.crm-outlook-calendar-badge.preview {
  border-color: rgba(99, 73, 160, 0.36);
}

.crm-outlook-calendar-badge.muted {
  border-color: var(--line);
  color: var(--muted);
  background: var(--surface-2);
}

.crm-outlook-calendar-badge .material-icons,
.crm-outlook-calendar-button .material-icons {
  font-size: 17px;
}

.crm-outlook-calendar-error {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 18px 14px;
  padding: 10px 12px;
  border: 1px solid #f1cf91;
  border-radius: 8px;
  color: #805300;
  background: #fff8e8;
  font-size: 13px;
  font-weight: 700;
}

.crm-outlook-calendar-error .material-icons {
  flex: 0 0 auto;
  font-size: 19px;
}

.crm-outlook-calendar-error .btn {
  margin-left: auto;
}

.crm-tour-calendar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-tour-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.crm-tour-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.crm-tour-calendar-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.crm-tour-calendar-legend-dot.completed {
  background: var(--success);
}

.crm-tour-calendar-legend-dot.single-visit {
  background: #d77d00;
}

.crm-tour-calendar-legend-dot.outlook {
  background: #6b4bb6;
}

.crm-tour-calendar-months {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.crm-tour-calendar-month {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.crm-tour-calendar-month h3 {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 16px;
  text-transform: capitalize;
}

.crm-tour-calendar-day-view {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.crm-tour-calendar-day-view.today {
  border-color: rgba(0, 92, 169, .4);
  box-shadow: inset 0 0 0 1px rgba(0, 92, 169, .16);
}

.crm-tour-calendar-day-view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.crm-tour-calendar-day-view-header h3 {
  margin: 2px 0 4px;
  color: var(--brand-dark);
  font-size: 18px;
  text-transform: capitalize;
}

.crm-tour-calendar-day-view-header p,
.crm-tour-calendar-day-view-empty p {
  margin: 0;
  color: var(--muted);
}

.crm-tour-calendar-day-view-list {
  display: grid;
  gap: 9px;
}

.crm-tour-calendar-day-view-tour {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.crm-tour-calendar-day-view-tour > .crm-tour-calendar-day-view-entry {
  border: 0;
  border-radius: 0;
}

.crm-tour-calendar-day-view-entry {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  text-align: left;
}

button.crm-tour-calendar-day-view-entry {
  cursor: pointer;
}

button.crm-tour-calendar-day-view-entry:hover,
button.crm-tour-calendar-day-view-entry:focus-visible {
  border-color: rgba(0, 92, 169, .48);
  background: var(--brand-soft);
  outline: none;
}

.crm-tour-calendar-day-view-entry > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.crm-tour-calendar-day-view-entry strong,
.crm-tour-calendar-day-view-entry small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-tour-calendar-day-view-entry small {
  color: var(--muted);
}

.crm-tour-calendar-day-view-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
}

.crm-tour-calendar-day-view-entry.single-visit .crm-tour-calendar-day-view-icon {
  color: #9a5900;
  background: #fff1d6;
}

.crm-tour-calendar-day-view-entry.completed .crm-tour-calendar-day-view-icon {
  color: var(--success);
  background: #e9f5df;
}

.crm-tour-calendar-day-view-entry.outlook {
  grid-template-columns: 42px minmax(0, 1fr);
  border-color: rgba(107, 75, 182, .25);
  background: #faf7ff;
}

.crm-tour-calendar-day-view-entry.outlook .crm-tour-calendar-day-view-icon {
  color: #5b3f99;
  background: #eee6fa;
}

.crm-tour-calendar-day-view-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 160px;
  padding: 22px;
  border: 1px dashed #bccbd6;
  border-radius: 10px;
  text-align: center;
}

.crm-tour-calendar-day-view-empty .material-icons {
  color: var(--brand);
  font-size: 38px;
}

.crm-tour-calendar-today-reports {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(0, 92, 169, .32);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f4f9fd 0%, #fff 100%);
}

.crm-tour-calendar-today-reports-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.crm-tour-calendar-today-reports-header h3 {
  margin: 3px 0 4px;
  color: var(--brand-dark);
  font-size: 18px;
}

.crm-tour-calendar-today-reports-header p {
  margin: 0;
  color: var(--muted);
}

.crm-tour-calendar-today-reports-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 800;
}

.crm-tour-calendar-today-report-tours {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  gap: 12px;
}

.crm-tour-calendar-today-report-tour {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.crm-tour-calendar-today-report-tour-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.crm-tour-calendar-today-report-tour-heading > .material-icons {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
}

.crm-tour-calendar-today-report-tour-heading > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.crm-tour-calendar-today-report-tour-heading strong,
.crm-tour-calendar-today-report-tour-heading small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-tour-calendar-today-report-tour-heading small {
  color: var(--muted);
}

.crm-tour-calendar-quick-reports {
  display: grid;
  gap: 9px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #f7fafc;
}

.crm-tour-calendar-quick-reports-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-dark);
}

.crm-tour-calendar-quick-reports-heading > .material-icons {
  color: var(--brand);
}

.crm-tour-calendar-quick-reports-heading > div {
  display: grid;
  gap: 1px;
}

.crm-tour-calendar-quick-reports-heading small {
  color: var(--muted);
}

.crm-tour-calendar-quick-report-list {
  display: grid;
  gap: 7px;
}

.crm-tour-calendar-quick-report {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid #dce5ec;
  border-radius: 9px;
  background: #fff;
}

.crm-tour-calendar-quick-report > .material-icons {
  color: #a26a00;
}

.crm-tour-calendar-quick-report.documented > .material-icons {
  color: var(--success);
}

.crm-tour-calendar-quick-report > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.crm-tour-calendar-quick-report-customer {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 3px 5px;
  border: 0;
  border-radius: 7px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.crm-tour-calendar-quick-report-customer > span:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.crm-tour-calendar-quick-report-customer > .material-icons {
  color: var(--brand);
  font-size: 18px;
}

.crm-tour-calendar-quick-report-customer:hover,
.crm-tour-calendar-quick-report-customer:focus-visible {
  color: var(--brand-dark);
  background: var(--brand-soft);
  outline: none;
}

.crm-tour-calendar-quick-report strong,
.crm-tour-calendar-quick-report small,
.crm-tour-calendar-quick-report-customer strong,
.crm-tour-calendar-quick-report-customer small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-tour-calendar-quick-report small,
.crm-tour-calendar-quick-report-customer small {
  color: var(--muted);
}

.crm-tour-calendar-weekdays,
.crm-tour-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.crm-tour-calendar-weekdays {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.crm-tour-calendar-day {
  min-width: 0;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.crm-tour-calendar-day:hover,
.crm-tour-calendar-day:focus-visible {
  border-color: rgba(0, 92, 169, 0.55);
  box-shadow: 0 0 0 2px rgba(0, 92, 169, 0.12);
  outline: none;
}

.crm-tour-calendar-day.empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.crm-tour-calendar-day.has-tours {
  border-color: rgba(0, 92, 169, 0.28);
  background: var(--brand-soft);
}

.crm-tour-calendar-day.has-outlook:not(.has-tours) {
  border-color: rgba(107, 75, 182, 0.3);
  background: #f8f4ff;
}

.crm-tour-calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--brand);
}

.crm-tour-calendar-day.selected {
  border-color: var(--brand);
  background: #e7f3ff;
  box-shadow: 0 0 0 2px rgba(0, 92, 169, 0.18);
}

.crm-tour-calendar-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.crm-tour-calendar-day-number {
  font-size: 13px;
  font-weight: 800;
}

.crm-tour-calendar-count {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-size: 11px;
  font-weight: 800;
}

.crm-tour-calendar-count.outlook-only {
  background: #6b4bb6;
}

.crm-tour-calendar-entries {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.crm-tour-calendar-entry {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 700;
}

.crm-tour-calendar-entry.completed {
  color: var(--success);
}

.crm-tour-calendar-entry.single-visit:not(.completed) {
  color: #9a5900;
}

.crm-tour-calendar-entry.outlook {
  color: #5b3f99;
}

.crm-tour-calendar-entry .material-icons {
  flex: 0 0 auto;
  font-size: 13px;
}

.crm-tour-calendar-entry span:last-child,
.crm-tour-calendar-more {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-tour-calendar-more {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.crm-tour-planner-form .field {
  margin: 0;
}

.crm-tour-planner-hint {
  padding: 0;
}

.storage-modal.crm-tour-planner-modal {
  inset: max(24px, 5vh) max(18px, calc((100vw - 760px) / 2)) auto;
}

body:has(.storage-modal.crm-tour-planner-modal) {
  overflow: hidden;
  overscroll-behavior: none;
}

.crm-tour-planner-modal .storage-modal-header > div {
  min-width: 0;
}

.crm-tour-planner-modal .storage-modal-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.crm-tour-planner-modal .crm-tour-planner-form {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.crm-tour-planner-intro {
  margin: 0;
}

.crm-tour-planning-type-grid {
  margin-bottom: 2px;
}

.crm-tour-planning-customer-field {
  display: grid;
  gap: 8px;
}

.crm-tour-planning-customer-selected {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(215, 125, 0, 0.3);
  border-radius: var(--radius);
  background: #fff8e9;
}

.crm-tour-planning-customer-selected > .material-icons {
  color: #d77d00;
  font-size: 28px;
}

.crm-tour-planning-customer-selected > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.crm-tour-planning-customer-selected small {
  color: var(--muted);
}

.crm-tour-planning-customer-results {
  max-height: 220px;
}

.crm-tour-planner-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.crm-tour-layout {
  display: grid;
  grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.crm-tour-list-section {
  position: sticky;
  top: 16px;
}

.crm-tour-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.crm-tour-list-header-actions {
  flex-wrap: nowrap;
}

.crm-tour-plan-new-button {
  color: #fff;
  background: var(--brand);
}

.crm-tour-plan-new-button:hover,
.crm-tour-plan-new-button:focus-visible,
.crm-tour-plan-new-button.active {
  color: #fff;
  background: #004a87;
}

.crm-tour-list-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.crm-tour-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 6px;
}

.icon-btn.crm-tour-list-delete {
  align-self: stretch;
  height: auto;
  color: #d93025;
  background: var(--surface-3);
  box-shadow: none;
}

.crm-tour-list-delete .material-icons {
  color: inherit;
}

.icon-btn.crm-tour-list-delete:hover,
.icon-btn.crm-tour-list-delete:focus-visible {
  color: #b71c1c;
  background: #fff1f0;
}

.crm-tour-list-card:hover,
.crm-tour-list-card.active {
  border-color: rgba(0, 92, 169, 0.42);
  background: var(--brand-soft);
}

.crm-tour-list-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: var(--brand);
  background: #fff;
}

.crm-tour-list-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.crm-tour-list-copy strong,
.crm-tour-list-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-tour-list-copy small {
  color: var(--muted);
}

.crm-tour-empty-editor {
  min-height: 300px;
}

.crm-tour-empty-icon {
  color: var(--brand);
  font-size: 52px;
}

.crm-tour-editor-stack {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.crm-tour-editor-header {
  align-items: flex-start;
}

.crm-tour-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #775000;
  background: #fff8e9;
}

.crm-tour-status.ready,
.crm-tour-status.completed {
  color: #37680e;
  background: var(--accent-soft);
}

.crm-tour-status > .material-icons {
  font-size: 28px;
}

.crm-tour-status-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
}

.crm-tour-status-complete {
  margin-left: auto;
  white-space: nowrap;
}

.crm-tour-status small {
  color: var(--muted);
}

.crm-tour-stop.completed {
  cursor: default;
  background: var(--surface-2);
}

.crm-tour-stop.completed .crm-tour-stop-handle {
  color: var(--success);
}

.crm-tour-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.4fr);
  gap: 14px;
}

.crm-tour-form .field {
  margin: 0;
}

.crm-tour-notes-field,
.crm-tour-form-actions {
  grid-column: 1 / -1;
}

.crm-tour-form-actions {
  justify-content: flex-end;
}

.crm-tour-form-actions .danger {
  margin-right: auto;
}

.crm-tour-customer-search {
  display: grid;
  gap: 12px;
}

.crm-tour-search-state {
  padding: 6px 2px;
  color: var(--muted);
  font-size: 13px;
}

.crm-tour-customer-results {
  display: grid;
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.crm-tour-customer-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.crm-tour-customer-result:last-child {
  border-bottom: 0;
}

.crm-tour-customer-result > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.crm-tour-customer-result small {
  color: var(--muted);
}

.crm-tour-stops {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  list-style: none;
}

.crm-tour-stops-header-actions {
  flex-wrap: nowrap;
}

.crm-tour-add-stop-button {
  white-space: nowrap;
}

.storage-modal.crm-tour-stop-modal {
  inset: 7vh auto auto 50%;
  width: min(820px, calc(100vw - 32px));
  max-height: 86vh;
  transform: translateX(-50%);
}

.crm-tour-stop-modal .storage-modal-header > div {
  display: grid;
  gap: 3px;
}

.crm-tour-stop-modal .storage-modal-body {
  padding: 16px;
}

.crm-tour-stop-modal .crm-tour-stop-composer {
  padding: 0;
  border: 0;
  background: transparent;
}

body:has(.storage-modal.crm-tour-stop-modal) {
  overflow: hidden;
  overscroll-behavior: none;
}

.crm-tour-stop-composer {
  padding: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f7fafc, #f4f8eb);
}

.crm-tour-stop-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.crm-tour-stop-type-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.crm-tour-stop-type-card:hover,
.crm-tour-stop-type-card:focus-visible,
.crm-tour-stop-type-card.active {
  border-color: rgba(0, 92, 169, 0.45);
  background: var(--brand-soft);
  box-shadow: 0 6px 18px rgba(13, 55, 91, 0.08);
  outline: none;
}

.crm-tour-stop-type-card > .material-icons:first-child {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: #fff;
  background: var(--brand);
}

.crm-tour-stop-type-card:nth-child(2) > .material-icons:first-child {
  background: #d77d00;
}

.crm-tour-stop-type-card strong,
.crm-tour-stop-type-card small {
  display: block;
}

.crm-tour-stop-type-card small {
  margin-top: 2px;
  color: var(--muted);
}

.crm-tour-stop-composer-content {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.crm-tour-stop-composer-heading {
  display: grid;
  gap: 2px;
  padding: 12px 16px 0;
  color: var(--brand);
}

.crm-tour-stop-composer-heading span {
  color: var(--muted);
  font-size: 13px;
}

.crm-tour-stop-composer-content > .section-header {
  border: 0;
}

.crm-tour-stop-composer-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.crm-tour-stop {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: grab;
}

@media (max-width: 720px) {
  .storage-modal.crm-tour-stop-modal {
    inset: 12px;
    width: auto;
    max-height: calc(100dvh - 24px);
    transform: none;
  }

  .crm-tour-stop-type-grid {
    grid-template-columns: 1fr;
  }
}

.crm-tour-stop:active {
  cursor: grabbing;
}

.crm-tour-stop.dragging {
  opacity: 0.48;
  border-color: var(--brand);
}

.crm-tour-stop-handle {
  color: var(--muted);
}

.crm-tour-stop-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.crm-tour-stop-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.crm-tour-stop-copy small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-tour-stop-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.crm-tour-assignee-summary {
  display: flex;
  align-items: center;
  gap: 4px;
}

.crm-tour-assignee-summary .material-icons {
  font-size: 15px;
}

.crm-tour-assignee-field {
  grid-column: 1 / -1;
}

.crm-tour-special-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.crm-tour-coordinate-details,
.crm-tour-special-actions,
.crm-tour-special-report-toggle {
  grid-column: 1 / -1;
}

.crm-tour-coordinate-details summary {
  color: var(--brand);
  cursor: pointer;
  font-weight: 700;
}

.crm-tour-coordinate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 12px;
}

.crm-tour-stop-number.special {
  background: #d77d00;
}

.crm-tour-stop-number.special .material-icons {
  font-size: 18px;
}

.crm-tour-report-button {
  white-space: nowrap;
}

.crm-tour-map {
  height: clamp(360px, 50vh, 540px);
}

.crm-tour-location-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.crm-tour-location-badge .material-icons {
  font-size: 16px;
}

.crm-tour-location-badge.ready {
  border-color: #cfe4a1;
  background: #f5fae9;
  color: #36520a;
}

.crm-tour-location-badge.error {
  border-color: #f0c6c6;
  background: #fff3f3;
  color: #a12626;
}

.crm-tour-route-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  background: #f5fae9;
  color: #36520a;
  font-size: 13px;
  font-weight: 800;
}

.crm-tour-route-summary.warning {
  background: #fff8e9;
  color: #7a5000;
}

.crm-tour-route-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.crm-tour-route-summary .material-icons {
  font-size: 18px;
}

@media (max-width: 1100px) {
  .crm-tour-calendar-months {
    grid-template-columns: 1fr;
  }

  .crm-tour-planner-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-tour-planner-form .btn {
    min-height: 42px;
  }

  .crm-tour-layout {
    grid-template-columns: 1fr;
  }

  .crm-tour-list-section {
    position: static;
  }
}

@media (max-width: 720px) {
  .crm-tour-calendar-header {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-tour-calendar-header-tools {
    justify-items: stretch;
  }

  .crm-outlook-calendar-status {
    justify-content: flex-start;
  }

  .crm-outlook-calendar-error {
    align-items: flex-start;
    flex-wrap: wrap;
    margin-inline: 10px;
  }

  .crm-outlook-calendar-error .btn {
    width: 100%;
    margin-left: 0;
  }

  .crm-tour-calendar-controls {
    justify-content: space-between;
  }

  .crm-tour-calendar-legend {
    justify-content: flex-start;
  }

  .crm-tour-calendar-months {
    padding: 10px;
  }

  .crm-tour-calendar-month {
    padding: 9px;
  }

  .crm-tour-calendar-day-view {
    padding: 10px;
  }

  .crm-tour-calendar-day-view-header {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-tour-calendar-day-view-header .btn {
    width: 100%;
    justify-content: center;
  }

  .crm-tour-calendar-quick-report {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .crm-tour-calendar-quick-report .btn {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .crm-tour-calendar-weekdays,
  .crm-tour-calendar-grid {
    gap: 3px;
  }

  .crm-tour-calendar-day {
    min-height: 54px;
    padding: 5px;
  }

  .crm-tour-calendar-entry span:last-child,
  .crm-tour-calendar-more {
    display: none;
  }

  .crm-tour-planner-form {
    grid-template-columns: 1fr;
  }

  .crm-tour-planner-form .btn {
    width: 100%;
  }

  .crm-tour-planner-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .storage-modal.crm-tour-planner-modal {
    inset: 12px;
    max-height: calc(100dvh - 24px);
  }

  .crm-tour-planning-customer-selected {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .crm-tour-planning-customer-selected .btn {
    grid-column: 1 / -1;
  }

  .crm-tour-stop-type-grid {
    grid-template-columns: 1fr;
  }

  .crm-tour-status {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .crm-tour-status-complete {
    width: 100%;
    margin-left: 0;
  }

  .crm-tour-stops-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .crm-tour-hero-body,
  .crm-tour-customer-result {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-tour-hero-body .actions-row,
  .crm-tour-hero-body .btn,
  .crm-tour-customer-result .btn {
    width: 100%;
  }

  .crm-tour-form {
    grid-template-columns: 1fr;
  }

  .crm-tour-special-form,
  .crm-tour-coordinate-grid {
    grid-template-columns: 1fr;
  }

  .crm-tour-notes-field,
  .crm-tour-form-actions {
    grid-column: auto;
  }

  .crm-tour-form-actions {
    display: grid;
  }

  .crm-tour-form-actions .danger {
    margin-right: 0;
  }

  .crm-tour-stop {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .crm-tour-stop-actions {
    grid-column: 2 / -1;
    justify-content: flex-end;
  }

  .crm-tour-map-section .section-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

.driver-license-section {
  overflow: hidden;
}

.driver-license-header {
  align-items: flex-start;
}

.driver-license-user-list {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.driver-license-user-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.driver-license-user-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.driver-license-user-main > .material-icons {
  color: var(--brand);
}

.driver-license-user-main div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.driver-license-user-main strong,
.driver-license-user-main span {
  overflow-wrap: anywhere;
}

.driver-license-user-main span {
  color: var(--muted);
  font-size: 13px;
}

.driver-license-history {
  margin: 0 16px 16px;
}

.driver-license-special-list {
  margin: 0 16px 16px;
}

.driver-license-special-list .driver-license-user-list {
  padding: 12px 0 0;
}

.driver-license-special-row .driver-license-user-main > .material-icons {
  color: var(--shop);
}

.driver-license-special-request-modal {
  inset: max(8vh, 48px) max(14px, calc((100vw - 720px) / 2)) auto;
  max-height: 84vh;
}

.driver-license-special-request-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.45fr);
  gap: 14px;
}

.driver-license-special-reason {
  grid-column: 1 / -1;
}

.driver-license-special-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #f1c8d3;
  border-left: 4px solid var(--shop);
  border-radius: 8px;
  background: #fff5f8;
}

.driver-license-special-info > .material-icons {
  color: var(--shop);
}

.driver-license-special-info > div {
  display: grid;
  gap: 4px;
}

.driver-license-special-info span,
.driver-license-special-info small {
  color: var(--muted);
}

.driver-license-modal {
  inset: 3vh max(14px, calc((100vw - 1180px) / 2)) auto;
  max-height: 94vh;
}

.driver-license-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.driver-license-image-field {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.driver-license-image-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--brand);
}

.driver-license-alignment-badge {
  margin-left: auto;
  white-space: nowrap;
}

.driver-license-alignment-badge .material-icons {
  font-size: 16px;
}

.driver-license-document-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.driver-license-document-status .badge {
  gap: 5px;
}

.driver-license-document-status .material-icons {
  font-size: 16px;
}

.driver-license-document-status > span:not(.badge) {
  color: var(--muted);
  font-size: 13px;
}

.required-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #c52f67;
}

.driver-license-image-field img,
.driver-license-image-placeholder {
  width: 100%;
  aspect-ratio: 1.58 / 1;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.driver-license-image-field img {
  display: block;
  object-fit: contain;
}

.driver-license-image-field img[hidden],
.driver-license-image-placeholder[hidden] {
  display: none;
}

.driver-license-image-placeholder {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  color: var(--muted);
  font-weight: 700;
}

.driver-license-image-placeholder .material-icons {
  color: var(--brand);
  font-size: 34px;
}

.driver-license-image-placeholder.is-clickable {
  cursor: pointer;
  font: inherit;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.driver-license-image-placeholder.is-clickable:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.driver-license-image-placeholder.is-clickable:focus-visible {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 92, 169, 0.18);
}

.driver-license-file-button {
  width: max-content;
  cursor: pointer;
}

.driver-license-image-actions {
  flex-wrap: wrap;
}

.driver-license-corner-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(13, 27, 23, 0.68);
}

.driver-license-corner-modal {
  position: fixed;
  inset: 2vh max(12px, calc((100vw - 1280px) / 2));
  z-index: 110;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.driver-license-corner-body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  overflow: auto;
}

.driver-license-corner-instructions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.driver-license-corner-instructions span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.driver-license-corner-instructions b {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--muted);
}

.driver-license-corner-instructions .is-set {
  color: var(--brand);
  border-color: rgba(148, 193, 31, 0.48);
  background: var(--accent-soft);
}

.driver-license-corner-instructions .is-set b,
.driver-license-corner-instructions .is-next b {
  background: var(--accent);
  color: #14220b;
}

.driver-license-corner-instructions .is-next {
  color: var(--brand);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(148, 193, 31, 0.16);
}

.driver-license-corner-stage-wrap {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  border-radius: 7px;
  background: #101a22;
}

.driver-license-corner-stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.driver-license-corner-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  pointer-events: none;
}

.driver-license-corner-stage svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.driver-license-corner-stage polygon,
.driver-license-corner-stage polyline {
  fill: rgba(148, 193, 31, 0.14);
  stroke: #94c11f;
  stroke-width: 8;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.driver-license-corner-stage polyline {
  fill: none;
}

.driver-license-corner-stage g {
  cursor: grab;
}

.driver-license-corner-stage .driver-license-corner-hit-area {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.driver-license-corner-stage .driver-license-corner-dot {
  fill: #c52f67;
  stroke: #fff;
  stroke-width: 7;
  vector-effect: non-scaling-stroke;
}

.driver-license-corner-magnifier {
  position: absolute;
  z-index: 6;
  width: 136px;
  height: 136px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.driver-license-corner-magnifier[hidden] {
  display: none;
}

.driver-license-corner-number {
  fill: #fff;
  font-size: 34px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.driver-license-corner-label {
  fill: #fff;
  stroke: rgba(13, 27, 23, 0.92);
  stroke-width: 8px;
  paint-order: stroke fill;
  font-size: 28px;
  font-weight: 800;
  dominant-baseline: central;
  pointer-events: none;
}

.driver-license-corner-help {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.driver-license-ocr-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.driver-license-ocr-preview summary {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--brand);
  font-weight: 800;
  cursor: pointer;
}

.driver-license-ocr-preview summary .material-icons {
  font-size: 19px;
}

.driver-license-ocr-preview > p {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.driver-license-ocr-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.driver-license-ocr-preview figure {
  margin: 0;
  min-width: 0;
}

.driver-license-ocr-preview figcaption {
  margin-bottom: 5px;
  color: var(--brand);
  font-weight: 800;
}

.driver-license-ocr-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1.58 / 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.driver-license-ocr-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 193, 31, 0.45);
  border-radius: 8px;
  background: var(--accent-soft);
}

.driver-license-ocr-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.driver-license-ocr-bar span {
  color: var(--muted);
  font-size: 13px;
}

.driver-license-ocr-progress-row {
  display: grid;
  grid-template-columns: minmax(140px, 240px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 7px;
}

.driver-license-ocr-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(0, 86, 164, 0.12);
}

.driver-license-ocr-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 160ms ease;
}

.driver-license-ocr-status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-license-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.driver-license-quality-summary {
  display: grid;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid rgba(79, 141, 22, 0.32);
  border-radius: 8px;
  color: #315d0e;
  background: var(--accent-soft);
}

.driver-license-quality-summary.has-warnings {
  border-color: rgba(168, 104, 0, 0.38);
  color: #744800;
  background: #fff8e8;
}

.driver-license-quality-summary > div {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.driver-license-quality-summary > div > div {
  display: grid;
  gap: 2px;
}

.driver-license-quality-summary span:not(.material-icons) {
  color: var(--muted);
  font-size: 13px;
}

.driver-license-quality-summary ul {
  margin: 0;
  padding-left: 28px;
  color: var(--muted);
  font-size: 13px;
}

.driver-license-ocr-text {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
}

.driver-license-ocr-text summary {
  color: var(--brand);
  font-weight: 800;
  cursor: pointer;
}

.driver-license-ocr-text pre {
  max-height: 180px;
  margin: 10px 0 0;
  white-space: pre-wrap;
  overflow: auto;
}

.driver-license-modal-actions {
  justify-content: flex-end;
}

.user-admin-boolean-field {
  width: fit-content;
  min-height: 44px;
}

@media (max-width: 820px) {
  .driver-license-corner-modal {
    inset: 0;
    border: 0;
    border-radius: 0;
  }

  .driver-license-corner-modal .storage-modal-header {
    align-items: flex-start;
  }

  .driver-license-corner-modal .storage-modal-header .actions-row {
    justify-content: flex-end;
  }

  .driver-license-corner-body {
    padding: 10px;
  }

  .driver-license-corner-stage-wrap {
    margin-inline: 4px;
    padding: 18px;
  }

  .driver-license-corner-instructions {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .driver-license-corner-instructions span {
    flex: 0 0 auto;
  }

  .driver-license-corner-magnifier {
    width: 124px;
    height: 124px;
  }

  .driver-license-modal .storage-modal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .driver-license-modal .storage-modal-header .actions-row {
    flex-wrap: nowrap;
  }

  .driver-license-modal .storage-modal-header h2 {
    font-size: 20px;
  }

  .driver-license-user-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .driver-license-user-row .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .driver-license-special-request-fields {
    grid-template-columns: 1fr;
  }

  .driver-license-special-reason {
    grid-column: auto;
  }

  .driver-license-ocr-preview-grid,
  .driver-license-image-grid,
  .driver-license-fields {
    grid-template-columns: 1fr;
  }

  .driver-license-ocr-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .driver-license-ocr-progress-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff 0, var(--surface-2) 210px),
    var(--surface-2);
  font-family: Lato, Inter, Roboto, Arial, Helvetica, sans-serif;
  font-size: 14px;
}

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

button {
  border: 0;
}

.material-icons {
  font-family: "Material Icons Round";
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  width: 1em;
  overflow: hidden;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  text-rendering: optimizeLegibility;
  font-variant-ligatures: normal;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.boot-screen,
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(0, 92, 169, 0.1), rgba(148, 193, 31, 0.12)),
    var(--surface-2);
}

.boot-card,
.login-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.boot-mark {
  color: var(--brand);
  font-size: 30px;
  font-weight: 800;
}

.boot-line {
  height: 4px;
  width: 72px;
  margin: 16px 0;
  background: var(--accent);
}

.login-logo {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.login-logo img {
  max-width: 150px;
  max-height: 96px;
  object-fit: contain;
}

.login-logo h1 {
  margin: 0;
  color: var(--brand);
  font-family: Raleway, Lato, Inter, sans-serif;
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

[data-storage-extra-order-field][hidden] {
  display: none !important;
}

.field > span,
.field label,
.field-label {
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  padding: 9px 11px;
  outline: none;
}

.textarea {
  min-height: 92px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(148, 193, 31, 0.24);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  color: var(--muted);
  background: var(--surface-2);
  cursor: not-allowed;
  opacity: 0.85;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
}

.field-hint.error {
  color: var(--danger);
}

.field-required-marker {
  display: inline-block;
  position: relative;
  top: -1px;
  width: 7px;
  height: 7px;
  margin-left: 5px;
  padding: 0;
  border-radius: 50%;
  background: var(--danger);
  vertical-align: middle;
}

.field:has(.input:valid) > span .field-required-marker,
.field:has(.select:valid) > span .field-required-marker,
.vehicle-handover-acknowledgement:has(input:checked) .field-required-marker,
.vehicle-handover-acknowledgement:has(input:disabled) .field-required-marker {
  display: none;
}

.field.invalid .input,
.field.invalid .select,
.field.invalid .textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(207, 47, 87, 0.14);
}

.btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 6px;
  padding: 8px 13px;
  color: var(--ink);
  background: var(--surface-3);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}

.btn:hover,
.icon-btn:hover {
  background: #e7f1f8;
}

.btn:active,
.icon-btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.icon-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn.primary {
  color: #fff;
  background: var(--brand);
}

.btn.primary:hover {
  background: var(--brand-strong);
}

.btn.accent {
  color: #143000;
  background: var(--accent);
}

.btn.accent:hover {
  background: var(--accent-strong);
}

.btn.success {
  color: #fff;
  background: var(--success);
}

.btn.success:hover {
  background: #3f7412;
}

.btn.danger {
  color: #fff;
  background: var(--danger);
}

.btn.ghost {
  background: transparent;
}

.icon-btn {
  width: 38px;
  padding: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  background: transparent;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid var(--line);
  box-shadow: 7px 0 22px rgba(0, 92, 169, 0.06);
}

.brand-bar {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 14px 18px;
  border-bottom: 4px solid var(--accent);
}

.brand-name {
  color: var(--brand);
  font-family: Raleway, Lato, Inter, sans-serif;
  font-size: 22px;
  font-weight: 900;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.nav-search {
  padding: 12px;
}

.nav-search .input {
  min-height: 36px;
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.nav-group-label {
  padding: 16px 18px 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-list {
  overflow: auto;
  padding: 0 10px 18px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  margin: 2px 0;
  border: 0;
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.nav-external-label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.nav-external-label small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.nav-tree-toggle .nav-tree-chevron {
  margin-left: auto;
  font-size: 19px;
  transition: transform 0.16s ease;
}

.crm-nav-beta {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 1px 5px;
  border-radius: 999px;
  color: #fff;
  background: #d93025;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
}

.nav-tree-toggle.expanded .nav-tree-chevron {
  transform: rotate(180deg);
}

.nav-tree {
  display: grid;
  gap: 4px;
}

.nav-sublist {
  display: grid;
  gap: 4px;
  margin: 0 0 6px 14px;
  padding-left: 12px;
  border-left: 2px solid rgba(0, 92, 169, 0.12);
}

.nav-subitem {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: #edf2f6;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.nav-subitem:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-subitem.active {
  color: var(--brand);
  background: rgba(148, 193, 31, 0.16);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-subitem .material-icons {
  font-size: 18px;
}

.nav-subitem:not(.active) .material-icons {
  color: var(--brand);
}

.nav-item:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-item.active {
  color: var(--brand);
  background: var(--accent-soft);
  box-shadow: inset 4px 0 0 var(--accent);
}

.nav-item.active .material-icons {
  color: var(--accent-strong);
}

.main-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 4px solid var(--accent);
  backdrop-filter: blur(12px);
}

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

.topbar-title h1 {
  margin: 0;
  color: var(--brand);
  font-family: Raleway, Lato, Inter, sans-serif;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.2;
}

.topbar-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.topbar-actions .icon-btn.active {
  color: #173100;
  background: var(--accent);
  box-shadow: inset 0 -3px 0 rgba(0, 92, 169, 0.28);
}

.admin-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--brand);
  font-weight: 800;
}

.admin-view-switch .material-icons {
  font-size: 19px;
}

.admin-view-switch .select {
  width: auto;
  min-width: 118px;
  min-height: 30px;
  padding: 4px 28px 4px 8px;
  border: 0;
  background-color: transparent;
  font-weight: 800;
}

.content {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.grid {
  display: grid;
  gap: 14px;
}

.dashboard-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.dashboard-logo-stage {
  min-height: min(calc(100vh - 180px), 720px);
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 44px);
}

.dashboard-logo-image {
  width: min(100%, 1080px);
  height: auto;
  display: block;
  object-fit: contain;
}

.dashboard-home {
  display: grid;
  gap: 18px;
}

.dashboard-wallbox-shortcuts {
  overflow: visible;
}

.dashboard-wallbox-shortcuts .section-header > div:first-child {
  display: grid;
  gap: 4px;
}

.dashboard-wallbox-shortcuts .section-header h2,
.dashboard-wallbox-shortcuts .section-header p {
  margin: 0;
}

.dashboard-wallbox-shortcuts .section-header p {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-home.has-wallbox-shortcuts .dashboard-logo-stage {
  min-height: clamp(240px, calc(100vh - 610px), 500px);
  padding-top: 8px;
}

.module-tile {
  min-height: 130px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid transparent;
  border-radius: var(--radius);
  box-shadow: 0 9px 26px rgba(0, 92, 169, 0.07);
  cursor: pointer;
  text-decoration: none;
}

.module-tile:hover {
  border-color: var(--line);
  border-top-color: var(--accent);
  transform: translateY(-1px);
}

.module-title {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 17px;
  font-weight: 900;
}

.module-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.module-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #173100;
  background: var(--accent);
  flex: 0 0 auto;
}

.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 9px 24px rgba(0, 92, 169, 0.06);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #fff 0, #f5f9ec 100%);
}

.section-header h2 {
  margin: 0;
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
}

.section-body {
  padding: 16px;
}

.actions-row,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.customer-search-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) max-content;
  gap: 12px;
  align-items: end;
}

.customer-search-bar .field {
  margin-bottom: 0;
}

.article-search-bar {
  max-width: 520px;
}

.article-search-bar .field {
  margin-bottom: 0;
}

.article-table-toolbar {
  justify-content: flex-end;
}

.article-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 14px;
  align-items: start;
}

.article-detail-stack {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.article-detail-aside {
  min-width: 0;
}

.article-detail-facts {
  display: grid;
  grid-template-columns: minmax(140px, 0.42fr) minmax(0, 1fr);
  gap: 10px 18px;
  margin: 0;
}

.article-detail-facts dt {
  color: var(--brand);
  font-weight: 900;
}

.article-detail-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.article-image-body {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #fff;
}

.article-detail-image {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.article-detail-image[hidden],
.article-image-placeholder[hidden] {
  display: none !important;
}

.article-image-placeholder {
  width: 100%;
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  background: linear-gradient(180deg, #fbfdf7, #f4f8ea);
  border: 1px dashed var(--line);
  border-radius: 6px;
  text-align: center;
  font-weight: 700;
}

.article-staffel-table {
  min-width: 420px;
}

.article-staffel-raw {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}

.article-detail-modal {
  inset-inline: max(18px, calc((100vw - 1280px) / 2));
}

.article-change-intro {
  display: grid;
  gap: 14px;
}

.article-change-journey {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.article-change-journey-step {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.article-change-journey-step strong {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.article-change-journey-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.article-change-journey-edit {
  width: 30px;
  min-height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.article-change-journey-edit .material-icons {
  font-size: 18px;
}

.article-change-journey-step span {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.article-change-journey-step.current {
  border-color: rgba(148, 193, 31, 0.42);
  background: #fbfdea;
}

.article-change-journey-step.done {
  border-color: rgba(148, 193, 31, 0.4);
  background: var(--accent-soft);
}

.article-change-step-body {
  display: grid;
  gap: 16px;
}

.article-change-step-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.article-change-step-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #173100;
  background: var(--accent-soft);
  border: 1px solid rgba(148, 193, 31, 0.42);
  font-size: 14px;
  font-weight: 900;
}

.article-change-step-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.article-change-step-copy h3 {
  margin: 0;
}

.article-change-step-copy .page-note {
  margin: 0;
}

.article-change-mode-choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.article-change-mode-card {
  min-height: 138px;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.article-change-mode-card .material-icons {
  color: var(--brand);
  font-size: 24px;
}

.article-change-mode-card strong {
  font-size: 16px;
}

.article-change-mode-card small {
  color: var(--muted);
  line-height: 1.45;
}

.article-change-mode-card:hover {
  background: #f8fbff;
}

.article-change-mode-card.active {
  border-color: rgba(148, 193, 31, 0.45);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(148, 193, 31, 0.12);
}

.article-change-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.article-change-flow-card {
  min-width: 0;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.article-change-flow-card strong {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.article-change-flow-card.empty {
  color: var(--muted);
  background: var(--surface-2);
}

.article-change-flow-arrow {
  color: var(--accent-strong);
}

.article-change-selection-grid,
.article-change-workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.article-change-card,
.article-change-form-card,
.article-change-matches-card {
  min-width: 0;
}

.article-change-card-body {
  display: grid;
  gap: 12px;
}

.article-change-selected-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.article-change-selected-card.old {
  box-shadow: inset 4px 0 0 var(--brand);
}

.article-change-selected-card.new {
  box-shadow: inset 4px 0 0 var(--accent);
}

.article-change-selected-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.article-change-selected-main strong {
  color: var(--brand);
  font-size: 15px;
}

.article-change-selected-main small {
  color: var(--muted);
}

.article-change-card-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.article-change-results-wrap,
.article-change-matches-wrap {
  max-height: 340px;
}

.article-change-list,
.article-change-list-body {
  display: grid;
  gap: 0;
}

.article-change-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.article-change-list-head,
.article-change-list-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1fr) minmax(100px, 0.22fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
}

.article-change-list-head {
  color: var(--brand);
  background: #edf3fb;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.article-change-list-row {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.article-change-list-row:hover {
  background: #f4f8ea;
}

.article-change-list-row.selected {
  background: var(--accent-soft);
  box-shadow: inset 4px 0 0 var(--accent);
}

.article-change-list-row span {
  min-width: 0;
}

.article-change-list-row span:nth-child(2) {
  white-space: normal;
}

.article-change-matches-table td:nth-child(2),
.article-change-matches-table td:nth-child(8) {
  white-space: normal;
  min-width: 180px;
}

.article-change-matches-table tr.selected td {
  background: var(--accent-soft);
}

.article-change-mode-bar {
  display: grid;
  gap: 12px;
}

.article-change-mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-chip {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--brand);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.mode-chip.active {
  color: #173100;
  border-color: rgba(148, 193, 31, 0.45);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(148, 193, 31, 0.12);
}

.article-change-workspace {
  overflow: visible;
}

.article-change-selected-entry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.article-change-selected-entry div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
}

.article-change-selected-entry dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.article-change-selected-entry dd {
  margin: 4px 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.article-change-form-grid .field {
  margin-bottom: 0;
}

.article-change-form-grid {
  align-items: stretch;
}

.article-change-compare-note {
  margin: 0 0 14px;
}

.article-change-compare-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  height: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.article-change-compare-card.changed {
  border-color: rgba(148, 193, 31, 0.45);
  box-shadow: inset 0 0 0 1px rgba(148, 193, 31, 0.12);
}

.article-change-compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.article-change-compare-title {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.article-change-compare-head strong {
  color: var(--brand);
  font-size: 14px;
}

.article-change-compare-meta {
  color: #8a95a3;
  font-size: 12px;
  font-weight: 600;
}

.article-change-compare-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.article-change-compare-grid.multiline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-change-compare-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.article-change-compare-column-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.2;
}

.article-change-compare-value,
.article-change-compare-input {
  min-height: 56px;
}

.article-change-compare-value {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.article-change-compare-value.multiline,
.article-change-compare-new.multiline .article-change-compare-input {
  min-height: 110px;
}

.article-change-compare-value.multiline {
  align-items: flex-start;
}

.article-change-compare-new {
  margin-bottom: 0;
}

.article-change-compare-new .input,
.article-change-compare-new .textarea {
  margin-bottom: 0;
}

.article-change-compare-textarea {
  height: 100%;
  resize: vertical;
}

.article-change-submit-row {
  margin-top: 14px;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .article-change-compare-grid,
  .article-change-compare-grid.multiline {
    grid-template-columns: 1fr;
  }
}

.article-change-preview-table td {
  white-space: nowrap;
}

.car-charging-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.vehicle-hub-header {
  align-items: start;
}

.vehicle-hub-body {
  display: grid;
  gap: 14px;
}

.vehicle-hub-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vehicle-hub-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand);
  background: var(--surface-2);
  font-weight: 800;
  cursor: pointer;
}

.vehicle-hub-tab.active {
  color: #143000;
  border-color: rgba(148, 193, 31, 0.4);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(148, 193, 31, 0.12);
}

.vehicle-hub-note {
  margin: 0;
}

.car-charging-summary-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--surface-2);
}

.car-charging-summary-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.car-charging-summary-card dd {
  margin: 6px 0 0;
  color: var(--brand);
  font-size: 17px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.car-charging-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.car-charging-toolbar-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.car-charging-toolbar-copy strong {
  color: var(--brand);
}

.car-charging-toolbar-copy .page-note {
  margin: 0;
}

.car-charging-modal {
  inset: 6vh max(18px, calc((100vw - 980px) / 2)) auto;
}

.article-change-success-modal,
.car-charging-success-modal {
  inset: 12vh max(18px, calc((100vw - 680px) / 2)) auto;
}

.article-change-confirmation-note .page-note {
  margin: 0;
  color: var(--text);
}

.article-change-confirmation-table-wrap {
  max-height: min(36vh, 360px);
  overflow: auto;
}

.article-change-confirmation-table th,
.article-change-confirmation-table td {
  vertical-align: top;
}

.article-change-confirmation-table th:first-child,
.article-change-confirmation-table td:first-child {
  width: 56px;
}

.article-change-confirmation-table td:nth-child(2) {
  min-width: 280px;
  white-space: normal;
}

.article-change-confirmation-table td {
  overflow-wrap: anywhere;
}

.car-charging-form-layout {
  display: grid;
  gap: 14px;
}

.car-charging-success-state {
  display: grid;
  gap: 18px;
}

.car-charging-success-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(148, 193, 31, 0.16);
  color: var(--accent);
}

.car-charging-success-mark .material-icons {
  font-size: 40px;
}

.car-charging-success-copy {
  display: grid;
  gap: 6px;
}

.car-charging-success-copy strong {
  color: var(--brand);
  font-size: 21px;
}

.car-charging-success-copy p {
  margin: 0;
  color: var(--muted);
}

.car-charging-success-actions {
  justify-content: flex-end;
}

.car-charging-form-grid {
  align-items: end;
}

.car-charging-form-grid .field {
  margin-bottom: 0;
}

.car-charging-metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.car-charging-metric-row .field {
  margin-bottom: 0;
}

.car-charging-form-grid .input,
.car-charging-form-grid .select,
.car-charging-metric-row .input,
.car-charging-metric-row .select,
.car-charging-value-card {
  min-height: 44px;
  height: 44px;
  box-sizing: border-box;
}

.car-charging-value-field {
  min-width: 0;
}

.car-charging-value-card {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--brand);
  background: var(--surface-2);
  font-size: 18px;
  font-weight: 900;
}

.car-charging-rate-note {
  margin: -2px 0 2px;
}

.car-charging-preview-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(201, 132, 0, 0.18);
  border-radius: 8px;
  background: #fff7df;
  color: #7a4b00;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.car-charging-household-copy {
  display: grid;
  gap: 4px;
}

.car-charging-household-copy strong {
  color: var(--brand);
}

.car-charging-household-copy .page-note {
  margin: 0;
}

.car-charging-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.car-charging-choice-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.car-charging-choice-card input {
  margin: 3px 0 0;
  accent-color: var(--brand);
}

.car-charging-choice-card strong,
.car-charging-choice-card small {
  display: block;
}

.car-charging-choice-card strong {
  color: var(--ink);
  font-size: 15px;
}

.car-charging-choice-card small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.car-charging-choice-card:hover,
.car-charging-choice-card.active {
  border-color: rgba(148, 193, 31, 0.45);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(148, 193, 31, 0.12);
}

.car-charging-warning {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(201, 39, 86, 0.16);
  border-radius: 8px;
  background: rgba(201, 39, 86, 0.06);
  color: #ad2146;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.car-charging-duplicate-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(196, 0, 73, 0.16);
  border-radius: 8px;
  background: rgba(229, 0, 85, 0.06);
  color: #ad2146;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.car-charging-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.car-charging-file-name {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.car-charging-form-actions {
  justify-content: flex-end;
}

.car-charging-filter-field {
  width: min(300px, 100%);
}

.car-charging-table {
  min-width: 900px;
}

.car-charging-table td:nth-child(2),
.car-charging-table td:nth-child(3),
.car-charging-table td:nth-child(5),
.car-charging-table td:nth-child(6),
.car-charging-table td:nth-child(7) {
  white-space: nowrap;
}

.car-charging-table td:nth-child(4) {
  min-width: 190px;
  white-space: normal;
}

.vehicle-check-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 14px;
}

.vehicle-check-panel {
  min-height: 100%;
}

.vehicle-check-workspace-body,
.vehicle-check-month-stack,
.vehicle-check-vehicle-list,
.vehicle-check-period-list {
  display: grid;
  gap: 10px;
}

.vehicle-check-vehicle-card,
.vehicle-check-period-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.vehicle-check-vehicle-card > div,
.vehicle-check-period-card > div {
  min-width: 0;
}

.vehicle-check-card-badges {
  display: grid;
  justify-items: end;
  gap: 6px;
  flex-shrink: 0;
}

.vehicle-check-vehicle-card > div > strong,
.vehicle-check-period-card > div > strong {
  display: block;
  color: var(--brand);
  font-size: 15px;
}

.vehicle-check-vehicle-card > div > span,
.vehicle-check-period-card > div > span,
.vehicle-check-vehicle-card > div > small,
.vehicle-check-period-card > div > small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.vehicle-check-vehicle-card:hover,
.vehicle-check-vehicle-card.active,
.vehicle-check-period-card:hover,
.vehicle-check-period-card.active {
  border-color: rgba(148, 193, 31, 0.45);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(148, 193, 31, 0.12);
}

.vehicle-check-period-card.missing {
  background: #fffdf7;
}

.vehicle-check-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vehicle-check-month-header h3 {
  margin: 0;
  color: var(--brand);
  font-size: 18px;
}

.vehicle-check-month-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.vehicle-check-period-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.vehicle-check-period-rail .vehicle-check-period-card {
  min-height: 100%;
}

.vehicle-check-focus-strip .section-body {
  padding: 14px 16px;
}

.vehicle-check-focus-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.vehicle-check-focus-title {
  color: var(--brand);
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.vehicle-check-focus-row .btn {
  white-space: nowrap;
}

.vehicle-check-focus-months {
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.vehicle-check-period-chip {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.vehicle-check-period-chip:hover,
.vehicle-check-period-chip.active {
  border-color: rgba(148, 193, 31, 0.45);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(148, 193, 31, 0.12);
}

.vehicle-check-detail {
  display: grid;
  gap: 16px;
}

.vehicle-check-callout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(148, 193, 31, 0.24);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(148, 193, 31, 0.12), rgba(0, 92, 169, 0.04));
}

.vehicle-check-callout--soft {
  border-color: rgba(0, 92, 169, 0.14);
  background: linear-gradient(135deg, rgba(0, 92, 169, 0.05), rgba(148, 193, 31, 0.06));
}

.vehicle-check-callout strong {
  display: block;
  color: var(--brand);
  font-size: 16px;
}

.vehicle-check-callout p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.vehicle-check-callout-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.vehicle-check-record-preview {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.vehicle-check-readonly-note {
  padding: 14px 16px;
  border: 1px solid rgba(0, 92, 169, 0.12);
  border-radius: 8px;
  background: var(--surface-3);
}

.vehicle-check-readonly-note strong {
  display: block;
  color: var(--brand);
}

.vehicle-check-readonly-note p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.vehicle-check-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.vehicle-check-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.vehicle-check-card.wide {
  grid-column: 1 / -1;
}

.vehicle-check-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vehicle-check-card-header h3 {
  margin: 0;
  color: var(--brand);
  font-size: 18px;
}

.vehicle-check-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 12px;
}

.vehicle-check-field {
  display: grid;
  gap: 6px;
}

.vehicle-check-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.vehicle-check-field .input {
  min-height: 46px;
}

.vehicle-check-date-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.vehicle-check-today-button {
  min-height: 46px;
  white-space: nowrap;
}

.vehicle-check-field--readonly {
  min-height: 88px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.vehicle-check-field--readonly strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.vehicle-check-field--overdue > span {
  color: #c93452;
}

.vehicle-check-field--overdue .input,
.vehicle-check-field--overdue.vehicle-check-field--readonly {
  border-color: rgba(201, 52, 82, 0.48);
  background: rgba(229, 0, 85, 0.06);
  box-shadow: inset 4px 0 0 rgba(229, 0, 85, 0.62);
}

.vehicle-check-field--overdue strong,
.vehicle-check-field--overdue .input {
  color: #8f1430;
  font-weight: 800;
}

.vehicle-check-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.vehicle-check-checkbox-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
}

.vehicle-check-checkbox-card.checked {
  border-color: rgba(148, 193, 31, 0.4);
  background: rgba(148, 193, 31, 0.1);
}

.vehicle-check-checkbox-card input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.vehicle-check-checkbox-card span {
  color: var(--text);
  font-weight: 600;
  line-height: 1.35;
}

.vehicle-check-mini-preview {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.vehicle-fleet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.vehicle-fleet-card {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.vehicle-fleet-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.vehicle-fleet-thumbnail {
  flex: 0 0 86px;
  width: 86px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  overflow: hidden;
}

.vehicle-fleet-thumbnail-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-fleet-thumbnail-image[hidden],
.vehicle-fleet-thumbnail-placeholder[hidden] {
  display: none !important;
}

.vehicle-fleet-thumbnail-placeholder {
  display: grid;
  position: relative;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--brand);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(233, 246, 252, 0.88));
}

.vehicle-fleet-thumbnail-placeholder::before {
  content: "";
  width: 40px;
  height: 30px;
  display: block;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%230059a6' fill-opacity='.72' d='M16 23.5 20.4 13c.7-1.7 2.3-2.8 4.2-2.8h14.8c1.9 0 3.5 1.1 4.2 2.8L48 23.5l3.8 1.9c1.2.6 2 1.8 2 3.2v14.2c0 1.5-1.2 2.7-2.7 2.7h-3.4c-1.5 0-2.7-1.2-2.7-2.7v-1.5H19v1.5c0 1.5-1.2 2.7-2.7 2.7h-3.4c-1.5 0-2.7-1.2-2.7-2.7V28.6c0-1.4.8-2.6 2-3.2l3.8-1.9Zm6.7-8.2-3.1 8h24.8l-3.1-8c-.3-.7-1-1.2-1.8-1.2H24.5c-.8 0-1.5.5-1.8 1.2ZM18.3 34.6a4.2 4.2 0 1 0 0-8.4 4.2 4.2 0 0 0 0 8.4Zm27.4 0a4.2 4.2 0 1 0 0-8.4 4.2 4.2 0 0 0 0 8.4ZM19 37.3h26v-3.4H19v3.4Z'/%3E%3C/svg%3E");
}

.vehicle-fleet-thumbnail-icon {
  display: none;
  width: 34px;
  height: 34px;
  fill: rgba(0, 89, 166, 0.72);
}

.vehicle-fleet-summary:hover {
  background: rgba(255, 255, 255, 0.5);
}

.vehicle-fleet-summary-main {
  min-width: 0;
  flex: 1 1 auto;
}

.vehicle-fleet-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vehicle-fleet-summary h3 {
  margin: 0;
  color: var(--brand);
  font-size: 22px;
}

.vehicle-fleet-summary p {
  margin: 4px 0 0;
  color: var(--muted);
}

.vehicle-fleet-summary-side {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}

.vehicle-fleet-summary-user {
  display: grid;
  gap: 2px;
  min-width: 150px;
}

.vehicle-fleet-summary-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.vehicle-fleet-summary-user strong {
  font-size: 14px;
  line-height: 1.2;
}

.vehicle-fleet-summary-icon {
  color: var(--brand);
}

.vehicle-fleet-detail-page {
  overflow: visible;
}

.vehicle-fleet-detail-header {
  align-items: flex-start;
}

.vehicle-fleet-detail-body {
  display: grid;
  gap: 14px;
}

.vehicle-fleet-detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.vehicle-fleet-detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.vehicle-fleet-detail-image-panel {
  min-height: 260px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vehicle-fleet-detail-image {
  max-height: 340px;
}

.vehicle-fleet-readonly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.vehicle-fleet-readonly-field {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  display: grid;
  align-content: start;
  gap: 4px;
}

.vehicle-fleet-readonly-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.vehicle-fleet-readonly-field strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.vehicle-fleet-readonly-field--overdue {
  border-color: rgba(196, 49, 86, 0.45);
  background: rgba(196, 49, 86, 0.08);
}

.vehicle-fleet-detail-notes {
  margin: 12px 0 0;
  color: var(--text);
  line-height: 1.45;
}

.vehicle-financing-details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.vehicle-financing-details > .page-note {
  margin: 10px 0 0;
}

.vehicle-leasing-empty {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.vehicle-leasing-empty .material-icons {
  color: var(--brand);
}

.vehicle-leasing-forecast {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.vehicle-leasing-forecast-header {
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vehicle-leasing-forecast-header h4,
.vehicle-leasing-forecast-header p {
  margin: 0;
}

.vehicle-leasing-forecast-header h4 {
  color: var(--brand);
  font-size: 15px;
}

.vehicle-leasing-forecast-header p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.vehicle-leasing-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 8px;
}

.vehicle-leasing-metric {
  min-width: 0;
  min-height: 78px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  display: grid;
  align-content: start;
  gap: 4px;
}

.vehicle-leasing-metric > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.vehicle-leasing-metric > strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.vehicle-leasing-metric > small {
  color: var(--muted);
  font-weight: 700;
}

.vehicle-leasing-metric.success,
.vehicle-leasing-metric > small.success {
  color: var(--success);
}

.vehicle-leasing-metric.danger,
.vehicle-leasing-metric > small.danger {
  color: var(--danger);
}

.vehicle-leasing-metric.success {
  border-color: rgba(89, 128, 20, 0.38);
  background: rgba(145, 195, 20, 0.08);
}

.vehicle-leasing-metric.danger {
  border-color: rgba(196, 49, 86, 0.4);
  background: rgba(196, 49, 86, 0.07);
}

.vehicle-leasing-metric.success > strong,
.vehicle-leasing-metric.success > small {
  color: var(--success);
}

.vehicle-leasing-metric.danger > strong,
.vehicle-leasing-metric.danger > small {
  color: var(--danger);
}

.vehicle-fleet-detail-tabs-section {
  overflow: hidden;
}

.vehicle-fleet-detail-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.vehicle-fleet-detail-tab {
  min-width: 0;
  min-height: 54px;
  padding: 10px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 4px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.vehicle-fleet-detail-tab:last-child {
  border-right: 0;
}

.vehicle-fleet-detail-tab:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.vehicle-fleet-detail-tab.active {
  color: var(--brand);
  border-bottom-color: var(--accent);
  background: var(--surface);
}

.vehicle-fleet-detail-tab .material-icons {
  font-size: 21px;
}

.vehicle-fleet-detail-tab .badge {
  min-width: 28px;
  justify-content: center;
}

.vehicle-fleet-detail-tab-body {
  min-height: 220px;
}

.vehicle-fleet-tab-content {
  display: grid;
  gap: 14px;
}

.vehicle-fleet-tab-content > .storage-modal-section {
  margin: 0;
}

.vehicle-fleet-secondary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.vehicle-fleet-check-panel {
  display: grid;
  gap: 12px;
}

.vehicle-fleet-check-panel .section-subtitle {
  margin-top: 3px;
}

.vehicle-fleet-check-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.vehicle-fleet-handover-history-body {
  display: grid;
  gap: 16px;
}

.vehicle-fleet-handover-history .vehicle-handover-list-group {
  margin: 0;
}

.vehicle-fleet-secondary-layout .vehicle-fleet-check-list {
  grid-template-columns: 1fr;
}

.vehicle-operations-dashboard .section-body {
  padding-top: 14px;
}

.vehicle-operations-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 10px;
}

.vehicle-operation-metric {
  min-width: 0;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.vehicle-operation-metric:hover {
  border-color: var(--accent);
  background: var(--brand-soft);
}

.vehicle-operation-metric > .material-icons {
  color: var(--brand);
  font-size: 28px;
}

.vehicle-operation-metric > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.vehicle-operation-metric strong {
  color: var(--brand);
  font-size: 22px;
}

.vehicle-operation-metric small {
  color: var(--muted);
  font-weight: 700;
}

.vehicle-operation-metric.warning {
  border-color: rgba(211, 145, 23, 0.45);
  background: rgba(255, 241, 205, 0.55);
}

.vehicle-operation-metric.danger {
  border-color: rgba(196, 49, 86, 0.45);
  background: rgba(196, 49, 86, 0.07);
}

.vehicle-operation-metric.success {
  border-color: rgba(140, 198, 21, 0.42);
}

.vehicle-reminder-list,
.vehicle-operation-list {
  display: grid;
}

.vehicle-reminder-row,
.vehicle-operation-row {
  width: 100%;
  min-width: 0;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.vehicle-reminder-row:last-child,
.vehicle-operation-row:last-child {
  border-bottom: 0;
}

.vehicle-reminder-row:hover,
.vehicle-operation-row:hover {
  background: var(--brand-soft);
}

.vehicle-reminder-row.warning {
  box-shadow: inset 4px 0 0 #d39117;
}

.vehicle-reminder-row.danger {
  box-shadow: inset 4px 0 0 #c43156;
}

.vehicle-reminder-row > .material-icons,
.vehicle-operation-row > .material-icons {
  color: var(--brand);
}

.vehicle-reminder-main,
.vehicle-operation-row-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.vehicle-reminder-main strong,
.vehicle-operation-row-main strong {
  color: var(--brand);
}

.vehicle-reminder-main small,
.vehicle-operation-row-main small,
.vehicle-reminder-date {
  color: var(--muted);
}

.vehicle-operation-list.compact {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.vehicle-operation-modal {
  inset-inline: max(18px, calc((100vw - 900px) / 2));
}

.vehicle-operation-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.vehicle-reservation-conflict {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(200, 55, 90, 0.45);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius);
  background: rgba(200, 55, 90, 0.08);
  color: #8a1630;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.vehicle-reservation-conflict > .material-icons {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--danger);
}

.vehicle-reservation-conflict > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.vehicle-reservation-conflict strong {
  font-weight: 800;
}

.vehicle-reservation-conflict div > span {
  color: #5f2835;
  line-height: 1.4;
}

.vehicle-operation-wide {
  grid-column: 1 / -1;
}

.vehicle-fleet-check-card {
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.vehicle-fleet-check-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.vehicle-fleet-check-card strong {
  display: block;
  color: var(--brand);
  font-size: 16px;
}

.vehicle-fleet-check-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
}

.vehicle-fleet-check-card.missing {
  background: #fffdf8;
}

.vehicle-fleet-damage-body {
  padding: 0;
}

.vehicle-fleet-damage-body .vehicle-damage-section {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.vehicle-handover-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr);
  gap: 14px;
  align-items: start;
}

.vehicle-handover-panel {
  min-width: 0;
}

.vehicle-handover-vehicle-list,
.vehicle-handover-list {
  display: grid;
  gap: 10px;
}

.vehicle-handover-group {
  display: grid;
  gap: 8px;
}

.vehicle-handover-list-group {
  display: grid;
  gap: 8px;
}

.vehicle-handover-group + .vehicle-handover-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.vehicle-handover-list-group + .vehicle-handover-list-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.vehicle-handover-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  box-sizing: border-box;
}

.vehicle-handover-group-header h3 {
  margin: 0;
  color: var(--brand);
  font-size: 14px;
}

.vehicle-handover-group-list {
  display: grid;
  gap: 8px;
}

.vehicle-usage-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.vehicle-usage-control-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.vehicle-usage-control strong {
  display: block;
  margin-top: 2px;
  color: var(--brand);
}

.vehicle-usage-segment {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface);
}

.vehicle-usage-segment-button {
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.vehicle-usage-segment-button.active {
  background: var(--accent);
  color: #102136;
  cursor: default;
}

.vehicle-handover-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vehicle-handover-card:hover,
.vehicle-handover-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  outline: none;
}

.vehicle-handover-card-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.vehicle-handover-driver-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid #d7ecad;
  border-radius: 8px;
  background: #eef7dc;
  color: var(--text);
  font-weight: 800;
}

.vehicle-handover-driver-pill .material-icons {
  color: var(--brand);
  font-size: 22px;
}

.vehicle-handover-driver-pill small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.vehicle-handover-driver-pill strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.vehicle-handover-card-side {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 10px;
}

.vehicle-handover-start-return,
.vehicle-handover-review {
  white-space: nowrap;
}

.vehicle-handover-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.vehicle-handover-modal {
  max-width: min(980px, calc(100vw - 48px));
}

.vehicle-handover-form-section {
  display: grid;
  gap: 14px;
}

.vehicle-handover-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.vehicle-handover-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(13, 55, 91, 0.05);
}

.vehicle-handover-step.active {
  border-color: #afd2e8;
  background: #f2f8fc;
  color: var(--ink);
  box-shadow: inset 4px 0 0 var(--brand), 0 1px 2px rgba(13, 55, 91, 0.05);
}

.vehicle-handover-step.done {
  border-color: #cfe4a1;
  background: #f5fae9;
  color: var(--ink);
  box-shadow: inset 4px 0 0 var(--accent), 0 1px 2px rgba(13, 55, 91, 0.05);
}

.vehicle-handover-step.upcoming {
  background: var(--surface-alt);
}

.vehicle-handover-step-copy {
  min-width: 0;
}

.vehicle-handover-step strong,
.vehicle-handover-step span {
  display: block;
}

.vehicle-handover-step strong {
  color: var(--brand);
}

.vehicle-handover-step div > span {
  font-size: 0.82rem;
  color: var(--muted);
}

.vehicle-handover-step .vehicle-handover-step-check {
  color: #a9b6c1;
  font-size: 30px;
}

.vehicle-handover-step.active .vehicle-handover-step-check {
  color: var(--brand);
}

.vehicle-handover-step.done .vehicle-handover-step-check {
  color: var(--accent-strong);
}

.vehicle-handover-form-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.vehicle-handover-summary-section {
  background: var(--surface-alt);
}

.vehicle-handover-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.vehicle-handover-summary-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.vehicle-handover-summary-item span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.vehicle-handover-summary-item strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.vehicle-handover-known-damages {
  display: grid;
  gap: 8px;
}

.vehicle-handover-known-damages-empty {
  min-height: 54px;
}

.vehicle-handover-known-damage {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.vehicle-handover-known-damage:hover,
.vehicle-handover-known-damage:focus-visible {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: inset 4px 0 0 var(--accent);
  outline: none;
}

.vehicle-handover-known-damage h4 {
  margin: 0;
}

.vehicle-handover-known-damage p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.vehicle-handover-acknowledgement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--brand);
  font-weight: 800;
  line-height: 1.35;
}

.vehicle-handover-acknowledgement.invalid {
  border-color: var(--danger);
  background: #fff0f3;
  color: var(--danger);
}

.vehicle-handover-acknowledgement input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--accent);
}

.vehicle-handover-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.vehicle-handover-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 700;
}

.vehicle-handover-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.vehicle-handover-tour-key-count {
  max-width: 260px;
}

.vehicle-handover-approval-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.vehicle-handover-footer {
  flex-wrap: wrap;
}

.vehicle-handover-footer [data-action="vehicle-handover-submit-return"]:disabled {
  color: var(--muted);
  background: #e2e8ed;
  border-color: var(--line);
  box-shadow: none;
  opacity: 1;
}

.vehicle-handover-footer [data-action="vehicle-handover-submit-return"]:disabled:hover {
  background: #e2e8ed;
}

.vehicle-fleet-preview {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 5px;
}

.vehicle-fleet-preview div {
  padding: 6px 8px;
}

.vehicle-fleet-preview dt {
  font-size: 9px;
}

.vehicle-fleet-preview dd {
  margin-top: 1px;
  line-height: 1.15;
}

.vehicle-fleet-edit-btn {
  min-height: 32px;
  padding: 6px 10px;
}

.vehicle-editor-modal {
  max-width: min(980px, calc(100vw - 48px));
}

.vehicle-editor-modal--camera {
  max-width: min(760px, calc(100vw - 48px));
}

.vehicle-editor-layout {
  display: grid;
  gap: 14px;
}

.vehicle-editor-camera-only {
  display: grid;
  gap: 14px;
}

.vehicle-editor-image-panel {
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vehicle-editor-image {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: #fff;
}

.vehicle-editor-image[hidden] {
  display: none;
}

.vehicle-editor-image-placeholder {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.vehicle-editor-image-placeholder[hidden] {
  display: none;
}

.vehicle-editor-image-placeholder-content {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.vehicle-editor-image-placeholder-content .material-icons {
  font-size: 44px;
  color: var(--brand);
  opacity: 0.72;
}

.vehicle-editor-image-actions {
  margin-top: 12px;
  align-items: center;
}

.vehicle-editor-image-actions-inline {
  margin-top: 0;
}

.vehicle-editor-image-input {
  display: none;
}

.vehicle-editor-source-picker {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.vehicle-editor-source-picker-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.vehicle-editor-source-picker-body {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vehicle-editor-source-picker-option {
  position: relative;
  overflow: hidden;
}

.vehicle-editor-source-picker-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.vehicle-editor-camera-panel {
  position: relative;
  display: grid;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #101820;
}

.vehicle-editor-camera-video {
  display: block;
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
}

.vehicle-editor-camera-placeholder {
  grid-area: 1 / 1;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.vehicle-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.vehicle-editor-field-wide {
  grid-column: 1 / -1;
}

.vehicle-editor-toggle {
  margin-top: 16px;
}

.vehicle-editor-actions {
  justify-content: flex-end;
}

.vehicle-editor-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.vehicle-editor-header-actions .btn,
.vehicle-editor-header-actions .icon-btn {
  margin: 0;
}

.vehicle-editor-camera-actions {
  justify-content: center;
}

.vehicle-damage-section {
  min-width: 0;
}

.vehicle-check-damage-card {
  padding: 0;
  overflow: hidden;
}

.vehicle-check-damage-card .vehicle-damage-section {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.vehicle-damage-list {
  display: grid;
  gap: 10px;
}

.vehicle-damage-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.vehicle-damage-card:hover,
.vehicle-damage-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  outline: none;
}

.vehicle-damage-card-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.vehicle-damage-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.vehicle-damage-title-row h4 {
  margin: 0;
  color: var(--brand);
  font-size: 16px;
}

.vehicle-damage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.vehicle-damage-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.vehicle-damage-location {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf8;
}

.vehicle-damage-location-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vehicle-damage-location-header h3 {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 16px;
}

.vehicle-damage-location-content {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(160px, 1fr);
  align-items: center;
  gap: 16px;
}

.vehicle-damage-location-map {
  appearance: none;
  position: relative;
  width: 100%;
  max-width: 260px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: crosshair;
}

div.vehicle-damage-location-map {
  cursor: default;
}

.vehicle-damage-location-map:focus-visible {
  outline: 3px solid rgba(149, 193, 31, 0.35);
  outline-offset: 2px;
}

.vehicle-damage-location-map svg {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 220px;
}

.vehicle-damage-location-label-front {
  fill: var(--muted);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.vehicle-damage-location-wheel {
  fill: #1b2a3d;
}

.vehicle-damage-location-body {
  fill: #eaf4fb;
  stroke: var(--brand);
  stroke-width: 2;
}

.vehicle-damage-location-window {
  fill: #d7ecfb;
  stroke: rgba(0, 86, 166, 0.45);
  stroke-width: 1;
}

.vehicle-damage-location-centerline {
  fill: none;
  stroke: rgba(0, 86, 166, 0.25);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}

.vehicle-damage-location-marker {
  fill: #d11f45;
  stroke: #fff;
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.25));
}

.vehicle-damage-location-info {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-weight: 800;
}

.vehicle-damage-location-info span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.vehicle-damage-location-info strong {
  color: var(--text);
  font-size: 18px;
}

.vehicle-damage-location-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 0;
  padding: 6px 8px;
  background: #eef7dc;
  border-color: #d7ecad;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.vehicle-damage-location-compact .vehicle-damage-location-map {
  width: 42px;
  height: 42px;
  padding: 4px;
  border-radius: 7px;
  cursor: default;
}

.vehicle-damage-location-compact .vehicle-damage-location-map svg {
  max-height: 34px;
}

.vehicle-damage-location-compact .vehicle-damage-location-label-front {
  display: none;
}

.vehicle-damage-add-photo-button {
  width: fit-content;
}

.vehicle-damage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.vehicle-damage-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 8px;
  align-content: start;
}

.vehicle-damage-photo {
  appearance: none;
  padding: 0;
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: grid;
  place-items: center;
  text-decoration: none;
  cursor: zoom-in;
}

.vehicle-damage-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-damage-photo img[hidden] {
  display: none;
}

.vehicle-damage-photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
}

.vehicle-damage-photo-placeholder[hidden] {
  display: none;
}

.vehicle-damage-photo-placeholder .material-icons {
  font-size: 22px;
}

.vehicle-damage-modal {
  max-width: min(820px, calc(100vw - 48px));
}

.vehicle-damage-readonly-modal {
  max-width: min(900px, calc(100vw - 48px));
}

.vehicle-damage-readonly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.vehicle-damage-readonly-item {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.vehicle-damage-readonly-item span,
.vehicle-damage-readonly-description span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.vehicle-damage-readonly-item strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.vehicle-damage-readonly-description {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.vehicle-damage-readonly-description p {
  margin: 0;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.vehicle-damage-readonly-third-party,
.vehicle-damage-readonly-photos {
  margin-top: 14px;
}

.vehicle-damage-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.vehicle-damage-autosave-status {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 800;
}

.vehicle-damage-autosave-status.saved {
  color: var(--success);
}

.vehicle-damage-autosave-status.saving {
  color: var(--brand);
}

.vehicle-damage-autosave-status.warning {
  color: #8a5b00;
}

.vehicle-damage-autosave-status.error {
  color: var(--danger);
}

.vehicle-damage-photo-preview-modal {
  width: min(980px, calc(100vw - 32px));
  max-width: min(980px, calc(100vw - 32px));
}

.vehicle-damage-photo-preview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.vehicle-damage-photo-preview-actions .btn {
  min-width: 70px;
  justify-content: center;
}

.vehicle-damage-photo-preview-body {
  display: grid;
  place-items: center;
  padding: 16px;
  max-height: calc(100vh - 160px);
  overflow: hidden;
  cursor: default;
  touch-action: none;
  user-select: none;
}

.vehicle-damage-photo-preview-body.is-pannable {
  cursor: grab;
}

.vehicle-damage-photo-preview-body.is-dragging {
  cursor: grabbing;
}

.vehicle-damage-photo-preview-body img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 210px);
  object-fit: contain;
  border-radius: 8px;
  transform: translate3d(var(--vehicle-damage-photo-pan-x, 0px), var(--vehicle-damage-photo-pan-y, 0px), 0) scale(var(--vehicle-damage-photo-zoom, 1));
  transform-origin: center center;
  transition: transform 120ms ease;
  pointer-events: none;
}

.vehicle-damage-photo-preview-body.is-dragging img {
  transition: none;
}

.vehicle-damage-form-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.vehicle-damage-upload-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.vehicle-damage-third-party {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
}

.vehicle-damage-third-party h3 {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 16px;
}

.vehicle-damage-pending-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.vehicle-damage-pending-photo {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.vehicle-damage-pending-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.vehicle-damage-pending-photo .icon-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.vehicle-damage-pending-photo .icon-btn .material-icons {
  color: var(--danger);
}

.vehicle-damage-existing-photos {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.vehicle-damage-existing-photos h3 {
  margin: 0;
  color: var(--brand);
  font-size: 16px;
}

.vehicle-damage-pending-photo span:not(.material-icons) {
  display: block;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehicle-damage-unsaved-note {
  margin: 10px 0 0;
  color: #8a5b00;
  font-weight: 700;
}

.vehicle-damage-unsaved-warning {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #f5b5b5;
  border-radius: var(--radius);
  background: #fff1f2;
  color: #9f1239;
}

.vehicle-damage-unsaved-warning strong {
  font-size: 16px;
}

.vehicle-damage-unsaved-warning div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.storage-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.vehicle-check-mini-preview dd {
  margin: 6px 0 0;
}

.vehicle-check-mini-preview .cell-muted {
  display: inline;
}

.vehicle-check-bool-list {
  display: grid;
  gap: 8px;
}

.vehicle-check-bool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.vehicle-check-bool-row span:first-child {
  font-weight: 700;
}

.vehicle-check-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.vehicle-check-notes div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.vehicle-check-notes small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.vehicle-check-notes p {
  margin: 8px 0 0;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.vehicle-check-textarea {
  min-height: 132px;
  resize: vertical;
}

.vehicle-check-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.temp-search-bar {
  max-width: 360px;
}

.temp-search-bar .field {
  margin-bottom: 0;
}

.tour-archive-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 260px));
  gap: 12px;
  align-items: start;
}

.tour-archive-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tour-archive-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 960px) {
  .vehicle-check-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-fleet-detail-layout,
  .vehicle-fleet-secondary-layout {
    grid-template-columns: 1fr;
  }

  .vehicle-leasing-metrics {
    grid-template-columns: repeat(2, minmax(145px, 1fr));
  }

  .vehicle-check-focus-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .vehicle-check-focus-row .icon-btn {
    justify-self: flex-start;
  }

  .vehicle-check-form-grid,
  .vehicle-check-checkbox-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .vehicle-fleet-detail-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .vehicle-fleet-detail-tab {
    flex: 1 0 164px;
    padding-inline: 12px;
  }

  .vehicle-fleet-detail-tab-body {
    padding: 12px;
  }

  .vehicle-leasing-forecast-header {
    flex-direction: column;
  }

  .vehicle-leasing-metrics {
    grid-template-columns: 1fr;
  }

  .vehicle-check-callout {
    flex-direction: column;
  }

  .vehicle-check-callout-badges {
    justify-content: flex-start;
  }

  .vehicle-check-period-rail {
    grid-auto-columns: minmax(190px, 1fr);
  }

  .vehicle-check-card,
  .vehicle-check-field--readonly {
    padding: 14px;
  }
}

.tour-archive-filters .field {
  margin-bottom: 0;
}

.tour-archive-filters .input,
.tour-archive-filters .select {
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
}

@media (max-width: 760px) {
  .car-charging-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .car-charging-modal {
    inset: 12px;
    max-height: calc(100vh - 24px);
  }

  .article-change-success-modal,
  .vehicle-editor-modal,
  .car-charging-success-modal {
    inset: 12px;
    max-height: calc(100vh - 24px);
  }

  .car-charging-modal .storage-modal-body,
  .vehicle-editor-modal .storage-modal-body {
    padding: 12px;
  }

  .car-charging-choice-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-hub-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .vehicle-check-grid,
  .vehicle-check-detail-grid,
  .vehicle-damage-form-grid,
  .vehicle-handover-grid,
  .vehicle-handover-form-grid,
  .vehicle-editor-grid,
  .vehicle-fleet-detail-layout,
  .vehicle-fleet-secondary-layout,
  .vehicle-fleet-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-fleet-detail-header {
    flex-direction: column;
    align-items: stretch;
  }

  .vehicle-fleet-detail-header .actions-row {
    justify-content: flex-start;
  }

  .vehicle-fleet-check-list {
    grid-template-columns: 1fr;
  }

  .vehicle-damage-location-header,
  .vehicle-damage-location-content {
    grid-template-columns: 1fr;
  }

  .vehicle-damage-location-header {
    flex-direction: column;
    align-items: stretch;
  }

  .vehicle-damage-card {
    grid-template-columns: 1fr;
  }

  .vehicle-handover-card {
    grid-template-columns: 1fr;
  }

  .vehicle-handover-card-side {
    justify-items: start;
  }

  .vehicle-handover-modal {
    max-width: calc(100vw - 24px);
  }

  .vehicle-damage-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(68px, 72px));
  }

  .vehicle-fleet-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .vehicle-fleet-summary-side {
    justify-content: space-between;
  }

  .vehicle-fleet-summary-user {
    min-width: 0;
  }

  .vehicle-check-focus-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .vehicle-check-period-rail {
    grid-auto-columns: minmax(240px, 88%);
  }

  .car-charging-metric-row {
    grid-template-columns: 1fr;
  }

  .car-charging-upload-row {
    align-items: stretch;
  }

  .car-charging-upload-row .btn,
  .car-charging-form-actions .btn {
    width: 100%;
  }

  .car-charging-form-actions {
    display: grid;
  }

  .car-charging-filter-field {
    width: 100%;
  }

  .article-change-confirmation-table td:nth-child(2) {
    min-width: 220px;
  }

  .tour-archive-filters {
    width: min(100%, 360px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .tour-archive-toolbar-actions {
    align-self: flex-start;
  }
}

.tour-route-section .section-header {
  align-items: center;
}

.tour-route-map {
  height: clamp(320px, 42vh, 460px);
  min-height: 320px;
  border-top: 1px solid var(--line);
  background: var(--surface-3);
}

.tour-route-placeholder {
  min-height: 320px;
}

.route-coordinate-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: #7a4b00;
  background: #fff7df;
  font-size: 13px;
  font-weight: 700;
}

.route-coordinate-warning .material-icons {
  color: #c88400;
  font-size: 20px;
}

.tour-archive-table th,
.tour-archive-table td {
  white-space: nowrap;
}

.tour-archive-table td:nth-child(4),
.tour-archive-table td:nth-child(11) {
  min-width: 220px;
  white-space: normal;
}

.tour-archive-table .depot-row {
  background: rgba(0, 92, 169, 0.055);
  font-weight: 700;
}

.tour-archive-table .pause-row {
  background: rgba(198, 54, 136, 0.08);
  color: #8f175c;
  font-weight: 700;
}

.tour-archive-table tr.clickable-row:hover td {
  background: #eef7dc;
}

.tour-archive-main-row.expanded td {
  background: #f4f9ea;
}

.tour-archive-detail-row td {
  background: #fbfdf6;
  padding-top: 0;
}

.tour-archive-expanded {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.tour-archive-expanded-item {
  display: grid;
  gap: 4px;
}

.tour-archive-expanded-item small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.tour-archive-expanded-actions {
  display: flex;
  align-items: flex-end;
}

.tour-archive-expanded-actions .btn {
  width: 100%;
}

.waypoint-number {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.waypoint-number.depot {
  background: var(--brand);
}

.waypoint-number.pause {
  background: #c63688;
}

.tour-times-modal {
  inset-inline: max(18px, calc((100vw - 980px) / 2));
}

.tour-history-modal {
  inset-inline: max(18px, calc((100vw - 1080px) / 2));
}

.tour-time-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.tour-time-summary div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--surface-2);
}

.tour-time-summary .wide {
  grid-column: 1 / -1;
}

.tour-time-summary dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.tour-time-summary dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.tour-times-table-wrap {
  max-height: 420px;
}

.tour-history-table-wrap {
  max-height: 520px;
}

.toggle-line {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 12px;
  color: var(--brand);
  background: var(--surface);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.toggle-line input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: #dfe7ef;
  box-shadow: inset 0 0 0 1px #cfd9e3;
  transition: background 0.18s ease, box-shadow 0.18s ease;
  flex: 0 0 auto;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(23, 36, 53, 0.25);
  transition: transform 0.18s ease;
}

.toggle-line input:checked + .toggle-track {
  background: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-strong);
}

.toggle-line input:checked + .toggle-track::after {
  transform: translateX(20px);
}

.toggle-line:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(148, 193, 31, 0.24);
}

.table-wrap {
  overflow: auto;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--brand);
  background: #eaf3f9;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
}

.data-table tr:hover td {
  background: #f7fbef;
}

.clickable-row {
  cursor: pointer;
}

.kunden-table {
  min-width: 620px;
}

.cell-muted {
  color: var(--muted);
}

.table-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) auto;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfdf7;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #fbfdf7;
}

.user-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 420px);
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfdf7;
}

.user-admin-toolbar .field {
  margin-bottom: 0;
}

.user-admin-table {
  min-width: 920px;
}

.user-admin-table td:first-child strong {
  color: var(--brand);
}

.user-admin-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.user-admin-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.user-admin-modal {
  inset-inline: max(18px, calc((100vw - 720px) / 2));
}

.user-admin-form {
  display: grid;
  gap: 12px;
}

.user-admin-password-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.user-admin-password-grid .field {
  margin-bottom: 0;
}

.user-admin-meta {
  margin-top: 4px;
}

.user-admin-modal-actions {
  justify-content: flex-end;
}

.temp-control-mobile-hint {
  padding: 0 16px 12px;
  color: var(--muted);
  font-size: 12px;
}

.temp-control-main-row.expanded td {
  background: #f7fbef;
}

.temp-control-detail-row td {
  padding: 0;
  background: #fbfdf7;
}

.temp-control-expanded {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.temp-control-expanded-item {
  display: grid;
  gap: 4px;
}

.temp-control-expanded-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.bestellungen-main-row.expanded td,
.bestellung-article-main-row.expanded td {
  background: #f7fbef;
}

.bestellungen-detail-row td,
.bestellung-article-detail-row td {
  padding: 0;
  background: #fbfdf7;
}

.bestellungen-expanded,
.bestellung-article-expanded {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.bestellungen-expanded-item,
.bestellung-article-expanded-item {
  display: grid;
  gap: 4px;
}

.bestellungen-expanded-item small,
.bestellung-article-expanded-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.bestellungen-expanded-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.bestellungen-expanded-actions .btn {
  width: 100%;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 700;
}

.badge.success {
  color: #2c5009;
  background: var(--accent-soft);
}

.badge.warning {
  color: #5f3b00;
  background: #fff0d3;
}

.badge.danger {
  color: #6c1919;
  background: #fde0e0;
}

.empty-state,
.error-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.error-state {
  color: var(--danger);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 36px));
  padding: 13px 15px;
  color: #fff;
  background: #20252c;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.toast.error {
  background: var(--danger);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(10, 16, 26, 0.34);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 21;
  width: min(620px, 100vw);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.drawer-header,
.drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin: 0;
  font-size: 18px;
}

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
}

.drawer-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.report-drawer {
  width: min(1120px, 100vw);
}

.bestellung-drawer {
  top: 16px;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  width: min(1480px, calc(100vw - 32px));
  height: calc(100vh - 32px);
  border-radius: 14px;
  overflow: hidden;
}

.bestellung-drawer .drawer-header {
  align-items: flex-start;
}

.bestellung-drawer .drawer-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.bestellung-detail-body {
  display: grid;
  gap: 16px;
  align-content: start;
  grid-auto-rows: max-content;
}

.bestellung-general {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.bestellung-general h3,
.bestellung-suborders-section h3,
.bestellung-articles-section h3 {
  margin: 0;
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
}

.bestellung-general dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0 28px;
  margin: 10px 0 0;
}

.bestellung-general div {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding: 7px 0;
}

.bestellung-general dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.bestellung-general dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
}

.bestellung-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.bestellung-section-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.bestellung-articles-wrap {
  max-height: 54vh;
}

@media (max-width: 900px) {
  .bestellung-drawer {
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}

.bestellung-suborders-section,
.bestellung-articles-section {
  display: grid;
  gap: 10px;
}

.bestellung-suborder-groups {
  display: grid;
  gap: 14px;
}

.bestellung-suborder-group {
  display: grid;
  gap: 10px;
}

.bestellung-suborder-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bestellung-suborder-group-header h4 {
  margin: 0;
  color: var(--brand);
  font-size: 16px;
}

.bestellung-suborders-table,
.bestellung-articles-table {
  min-width: 1120px;
}

.readonly-checkbox-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.readonly-checkbox-cell input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  pointer-events: none;
}

.report-form {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.report-drawer-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.report-form-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-content: start;
}

.report-textarea {
  min-height: 130px;
}

.report-linked {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 4px solid var(--brand);
}

.report-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 18px;
}

.report-tab {
  min-width: 190px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  color: var(--brand);
  background: #ece8e8;
  font-weight: 800;
  cursor: pointer;
}

.report-tab:first-child {
  border-radius: 6px 0 0 6px;
}

.report-tab:last-child {
  border-radius: 0 6px 6px 0;
}

.report-tab.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.report-panel {
  display: grid;
  gap: 14px;
}

.report-panel-header {
  display: grid;
  gap: 12px;
}

.report-panel-header h3 {
  margin: 0;
  color: var(--brand);
  font-size: 17px;
}

.report-inline-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: center;
}

.report-task-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(220px, 1.5fr) auto auto;
  gap: 10px;
  align-items: center;
}

.report-task-form .field-hint {
  grid-column: 1 / -1;
}

.report-mini-table {
  min-width: 720px;
}

.report-mini-table th {
  background: #f4f8fc;
}

.compact-toggle {
  margin: 0;
}

.danger-icon {
  color: var(--danger);
  background: #fde8e8;
}

.record-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.record-preview div {
  padding: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.record-preview dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.record-preview dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.bestellungen-subnote {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.kunde-workspace {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.kunde-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kunde-workspace-header h2 {
  margin: 4px 0 0;
  font-size: clamp(22px, 2.4vw, 30px);
  overflow-wrap: anywhere;
}

.kunde-workspace-header .badge {
  flex-shrink: 0;
}

.kunde-workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.kunde-workspace-tabs [role="tab"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.kunde-workspace-tabs [role="tab"][aria-selected="true"] {
  background: var(--brand);
  color: white;
}

.kunde-workspace-tabs [role="tab"]:focus-visible,
.kunde-workspace > [role="tabpanel"]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.kunde-workspace > [role="tabpanel"] {
  min-width: 0;
}

.kunde-backorders { container-type: inline-size; }
.kunde-backorders-search { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 14px; }
.kunde-backorders-search .field { flex: 1 1 260px; min-width: 0; margin-bottom: 0; }
.kunde-backorders-search .input, .kunde-backorders-search .btn { height: 40px; min-height: 40px; }
.kunde-backorders-table { width: 100%; min-width: 0; table-layout: fixed; }
.kunde-backorders-table th, .kunde-backorders-table td { padding: 10px 8px; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.kunde-backorders-table .backorder-number { text-align: right; font-variant-numeric: tabular-nums; }
.kunde-backorders-table th.backorder-number { white-space: nowrap; overflow-wrap: normal; }
.kunde-backorders-table small { display: block; color: var(--muted); margin-top: 4px; }
.kunde-backorders-table details { margin-top: 8px; }
.kunde-backorders-table summary { cursor: pointer; color: var(--brand); font-size: 12px; font-weight: 700; }
.kunde-backorders-table dl { margin: 10px 0 0; }
.kunde-backorders-table .backorder-delivery-info { margin: 0; }
.kunde-backorders-table dl > div + div { margin-top: 10px; }
.kunde-backorders-table dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.kunde-backorders-table dd { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@container (max-width: 600px) {
  .kunde-backorders-table colgroup, .kunde-backorders-table thead { display: none; }
  .kunde-backorders-table, .kunde-backorders-table tbody, .kunde-backorders-table tr, .kunde-backorders-table td { display: block; width: 100%; }
  .kunde-backorders-table tr { padding: 8px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
  .kunde-backorders-table td { border: 0; padding: 5px 0; }
  .kunde-backorders-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; font-weight: 700; margin-bottom: 2px; }
  .kunde-backorders-table .backorder-number { text-align: left; }
}

.kunde-crm-grid {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.kunde-detail-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(460px, 1.15fr);
  gap: 14px;
  align-items: start;
}

.kunde-master-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
}

.kunde-master-grid > .kunde-tour-reports {
  grid-column: 1 / -1;
  min-width: 0;
}

.kunde-side-stack {
  display: grid;
  gap: 14px;
}

.kunde-visits {
  grid-column: 1 / -1;
}

.kunde-crm-360 {
  grid-column: 1 / -1;
}

.kunde-sensitive-financials {
  grid-column: 1 / -1;
  border-color: color-mix(in srgb, var(--brand) 24%, var(--line));
}

.kunde-secure-price-search {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}

.kunde-secure-price-search .field {
  flex: 1 1 220px;
  min-width: 0;
  margin: 0;
}

.kunde-secure-price-caption {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.financial-overview { display: grid; gap: 16px; min-width: 0; }
.financial-report { display: grid; gap: 14px; min-width: 0; }
.financial-report-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.financial-workspace { display: grid; gap: 18px; min-width: 0; }
.financial-workspace-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 24px; }
.financial-year { display: grid; gap: 8px; min-width: 0; }
.financial-supply-switcher.financial-year-switcher { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.financial-workspace-controls .financial-supply { margin: 0; }
.financial-workspace-controls > .financial-notice { flex-basis: 100%; margin: 0; }
.financial-workspace-period { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.financial-workspace-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:7px; margin:6px 0 4px; border:1px solid #cddfec; border-radius:15px; background:#edf4fa; overflow:visible; }
.financial-workspace-tabs [role="tab"] { min-width:0; min-height:52px; display:flex; align-items:center; justify-content:center; gap:9px; border:1px solid transparent; border-radius:10px; background:transparent; color:#405970; padding:13px 16px; font:inherit; font-weight:650; line-height:1.35; cursor:pointer; transition:background-color .15s,color .15s,box-shadow .15s; }
.financial-workspace-tabs [role="tab"]:hover { background:#dfeaf4; color:#005e9e; }
.financial-workspace-tabs [role="tab"][aria-selected="true"] { background:#005e9e; color:#fff; border-color:#00558f; box-shadow:0 3px 8px #005e9e26; }
.financial-workspace-tabs [role="tab"]:focus-visible { outline:3px solid #70a9e4; outline-offset:2px; }
.financial-workspace-tabs [role="tab"]::before { content:""; flex:0 0 20px; width:20px; height:20px; background:currentColor; mask:var(--financial-tab-icon) center/contain no-repeat; -webkit-mask:var(--financial-tab-icon) center/contain no-repeat; }
.financial-workspace-tabs [data-tab="development"] { --financial-tab-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%204v16h16M7%2014l4-4%204%202%205-7%22%2F%3E%3C%2Fsvg%3E"); }
.financial-workspace-tabs [data-tab="articles"] { --financial-tab-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221.5%22%2F%3E%3Crect%20x%3D%2214%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221.5%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221.5%22%2F%3E%3Crect%20x%3D%2214%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221.5%22%2F%3E%3C%2Fsvg%3E"); }
.financial-workspace-tabs [data-tab="bookings"] { --financial-tab-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%203h12v18l-3-2-3%202-3-2-3%202zM9%207h6M9%2011h6M9%2015h3%22%2F%3E%3C%2Fsvg%3E"); }
@media (prefers-reduced-motion:reduce) { .financial-workspace-tabs [role="tab"] { transition:none; } }
.financial-workspace [role="tabpanel"] { display: grid; gap: 18px; min-width: 0; outline-offset: 4px; }
.financial-chart-controls, .financial-line-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.financial-chart-controls > span { margin-right: auto; font-weight: 600; }
.financial-chart-controls [aria-pressed="true"] { color: #fff; background: #087f75; border-color: #087f75; }
.financial-line-toolbar .field { margin: 0; min-width: 180px; }
.financial-line-toolbar > span { margin-left: auto; }
.financial-workspace-more { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.financial-workspace-more > summary { padding: 14px 18px; cursor: pointer; font-weight: 600; }
.financial-customer-return { margin-bottom: 16px; }
.financial-article-open { overflow: hidden; }
.financial-loading-open { overflow: hidden; }
.financial-loading-popup { box-sizing: border-box; width: min(380px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 16px 60px #0003; text-align: center; }
.financial-loading-popup[open] { display: grid; justify-items: center; gap: 18px; }
.financial-loading-popup::backdrop { background: #102b3d66; }
.financial-loading-popup h2 { margin: 0 0 10px; font-size: 18px; line-height: 1.4; }
.financial-loading-popup p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.financial-loading-popup .btn { min-width: 120px; }
.financial-loading-spinner { box-sizing: border-box; width: 40px; height: 40px; border: 4px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: financial-loading-spin .8s linear infinite; }
@keyframes financial-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .financial-loading-spinner { animation: none; } }
.financial-article-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(100%, 1050px); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: -12px 0 40px #0003; }
.financial-article-drawer[open] { display: flex; flex-direction: column; }
.financial-article-drawer::backdrop { background: #102b3d55; }
.financial-article-drawer-header { display: flex; flex: 0 0 auto; align-items: start; justify-content: space-between; gap: 18px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.financial-article-drawer-header h2 { margin: 5px 0; }
.financial-article-drawer-header .financial-article-description { margin: 0; max-width: 65ch; }
.financial-article-drawer-header > .btn { font-size: 24px; flex: 0 0 auto; min-width: 44px; }
.financial-article-drawer-body { overflow: auto; flex: 1 1 auto; min-height: 0; padding: 22px 24px; overscroll-behavior: contain; }
.financial-article-drawer-body > .actions-row { justify-content: space-between; margin-bottom: 16px; }
@media (max-width: 650px) {
  .financial-workspace-tabs { gap:4px; padding:5px; border-radius:12px; }
  .financial-workspace-tabs [role="tab"] { flex-direction:column; gap:7px; padding:11px 4px; font-size:12px; min-height:70px; }
  .financial-article-drawer-header, .financial-article-drawer-body { padding: 16px; }
  .financial-workspace-period { flex-wrap: wrap; }
}
.financial-report-period { margin: 0; color: var(--muted); font-size: 13px; }
.financial-report-section { border: 1px solid var(--line); border-radius: 12px; min-width: 0; overflow: hidden; }
.financial-report-section > summary { padding: 15px 16px; font-weight: 600; background: var(--surface); }
.financial-report-section > .financial-panel { border: 0; border-radius: 0; }
.financial-report-chart { margin: 14px 16px; }
.financial-report-chart > figcaption { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.financial-report-chart svg { display: block; width: 100%; max-width: 900px; color: var(--muted); }
.financial-report-chart text { fill: currentColor; font-size: 12px; }
.financial-report-legend { display: flex; gap: 16px; font-size: 12px; font-weight: 600; }
.financial-report .financial-table td:first-child { min-width: 150px; }
.financial-report .financial-driver-grid .financial-table td:nth-child(2) { min-width: 180px; max-width: 35ch; white-space: normal; }
.financial-detail-page .section-header > div:first-child { min-width: 0; }
.financial-article-description { margin: 6px 0; font-size: 16px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.financial-supply { display: grid; gap: 7px; min-width: 0; }
.financial-supply-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.financial-supply-switcher { display: inline-grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; width: min(100%, 440px); box-sizing: border-box; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--brand-soft); }
.financial-supply-switcher.financial-document-filters { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
.financial-document-filters .financial-supply-option { flex: 1 1 auto; }
.financial-supply-option { min-width: 0; min-height: 44px; padding: 9px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.financial-supply-option:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--surface); }
.financial-supply-option[aria-pressed="true"] { background: var(--brand); color: #fff; box-shadow: 0 1px 3px #0002; }
.financial-supply-option:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.financial-supply-option:disabled { opacity: .45; cursor: not-allowed; }
.financial-filters { display: flex; flex-wrap: wrap; gap: 14px; }
.financial-filters .field { flex: 1 1 200px; min-width: 0; margin: 0; }
.financial-line-search { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.financial-line-search .field { flex: 1 1 320px; min-width: 0; margin: 0; }
.financial-line-search .input { width: 100%; box-sizing: border-box; }
.financial-line-search > small { flex: 1 0 100%; color: var(--muted); font-size: 12px; }
.financial-booking-description { display: block; max-width: 34ch; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.financial-bookings .financial-table td:nth-child(4) { min-width: 180px; }
.financial-revenue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); gap: 14px; }
.financial-panel { min-width: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.financial-driver-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 0 16px 12px; }
.financial-driver-grid > div { min-width: 0; }
.financial-driver-grid h4 { margin: 8px 0; font-size: 14px; }
.financial-driver-grid .financial-table { min-width: 480px; }
.financial-driver-grid .financial-table th, .financial-driver-grid .financial-table td { padding: 10px 8px; }
.financial-driver-grid .financial-table td:first-child { max-width: 180px; white-space: normal; overflow-wrap: anywhere; }
.financial-freshness { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 12px; }
.financial-freshness p { margin: 7px 0 0; line-height: 1.5; }
.financial-overview { gap: 12px; }
.financial-overview summary { cursor: pointer; }
.financial-overview summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.financial-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; background: var(--surface); }
.financial-panel-heading > h3 { margin: 0; min-width: 0; font-size: 15px; }
.financial-supply-label, .financial-kpi-label, .financial-search-label, .financial-overview-context > span, .financial-freshness > span { display: flex; align-items: center; gap: 6px; }
.financial-kpi-label { justify-content: space-between; }
.financial-overview-context { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; color: var(--muted); font-size: 12px; }
.financial-info-button { display: inline-flex; flex: 0 0 32px; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; color: var(--brand); background: transparent; cursor: pointer; font: inherit; }
.financial-info-button > span { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 50%; font: 600 12px Georgia, serif; }
.financial-info-button:hover, .financial-info-button[aria-expanded="true"] { background: var(--brand-soft); }
.financial-info-button:focus-visible, .financial-info-close:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.financial-info-popup { position: fixed; z-index: 10050; box-sizing: border-box; width: min(360px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); box-shadow: 0 8px 30px #0003; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.financial-info-popup-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.financial-info-popup-header > h3 { margin: 4px 0; font-size: 14px; }
.financial-info-close { flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 22px/1 sans-serif; cursor: pointer; }
.financial-info-close:hover { background: var(--brand-soft); color: var(--text); }
.financial-info-popup > p { margin: 10px 0 0; }
.financial-freshness { padding: 8px 0; border: 0; background: transparent; color: var(--muted); }
.financial-freshness .financial-notice { margin-bottom: 8px; color: var(--text); }
.financial-ytd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 8px 16px 14px; }
.financial-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.financial-kpi { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.financial-kpi > span { color: var(--muted); font-size: 12px; }
.financial-kpi > strong { font-size: clamp(18px, 1.8vw, 26px); line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.financial-kpi > small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.financial-kpi.is-primary { background: var(--brand-soft); border-color: var(--brand); }
.financial-kpi.is-primary > strong { color: var(--brand); }
.financial-year-to-date .financial-panel-heading > h3 > small { display: block; margin-top: 5px; color: var(--muted); font-weight: 400; font-size: 12px; }
.financial-analysis-disclosure, .financial-line-disclosure { min-width: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.financial-analysis-disclosure > summary, .financial-line-disclosure > summary { padding: 15px 16px; font-size: 14px; background: var(--surface); }
.financial-analysis-disclosure > summary > span, .financial-line-disclosure > summary > span { font-weight: 600; }
.financial-analysis-disclosure > summary > small, .financial-line-disclosure > summary > small { margin-left: 12px; color: var(--muted); font-size: 12px; }
.financial-analysis-content { display: grid; gap: 12px; padding: 0 12px 12px; }
.financial-line-disclosure > .financial-panel { border: 0; border-radius: 0; }
.financial-line-disclosure > .financial-detail-link { padding: 12px; }
.financial-values > summary { padding: 10px 16px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.financial-development .financial-trend-track { display: none; }
.financial-month-comparison .financial-table th { font-size: 11px; }
.financial-month-comparison .financial-table td { padding-top: 10px; padding-bottom: 10px; }
.financial-month-comparison .financial-table .financial-year-status { font-size: 11px; }
@media (max-width: 900px) {
  .financial-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .financial-ytd-grid { grid-template-columns: minmax(0, 1fr); }
  .financial-analysis-disclosure > summary > small, .financial-line-disclosure > summary > small { display: block; margin: 5px 0 0 18px; }
  .financial-kpi { padding: 11px; }
}
@media (max-width: 1000px) { .financial-driver-grid { grid-template-columns: minmax(0, 1fr); } }
.financial-bar-chart { margin: 12px 16px; overflow-x: auto; }
.financial-bar-chart figcaption { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.financial-bar-chart svg { display: block; width: 100%; max-width: 900px; min-width: 560px; color: var(--text); font-size: 14px; }
.financial-bar-chart text { fill: currentColor; }
.financial-detail-link { display: flex; justify-content: flex-end; }
.financial-detail-link > .btn { max-width: 100%; white-space: normal; text-align: center; }
.financial-article-link { padding: 3px 0; border: 0; background: transparent; color: var(--primary, #075aa6); font: inherit; text-decoration: underline; cursor: pointer; }
.financial-article-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.financial-panel > h3 { margin: 0; padding: 14px 16px; background: var(--surface); font-size: 15px; }
.financial-panel .table-wrap { max-height: 520px; overflow: auto; }
.financial-table th { position: sticky; top: 0; z-index: 1; cursor: default; }
.financial-revenue-grid .financial-table { min-width: 0; }
.financial-table td { vertical-align: top; white-space: nowrap; }
.financial-table .financial-number { text-align: right; font-variant-numeric: tabular-nums; }
.financial-panel .financial-line-table-wrap { container-type: inline-size; max-height: 640px; }
.financial-line-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 13px; }
.financial-line-table th, .financial-line-table td { min-width: 0 !important; padding: 9px 5px; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.financial-line-table th { font-size: 11px; text-transform: none; }
.financial-line-mobile-help { display: none; }
.financial-document-header { margin: 12px 0 18px; padding: 14px; border-block: 1px solid var(--line); background: var(--surface-2); }
.financial-document-metadata { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0 0 12px; }
.financial-document-metadata > div { min-width: 0; }
.financial-document-metadata dt, .financial-document-texts h4 { margin: 0 0 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.financial-document-metadata dd { margin: 0; font-size: 14px; }
.financial-document-texts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px 24px; }
.financial-document-texts > div { min-width: 0; }
.financial-document-texts p, .financial-document-metadata dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.financial-document-texts p { margin: 0; font-size: 14px; line-height: 1.5; }
.financial-line-table .financial-info-button { width: 24px; height: 28px; }
.financial-line-table .financial-article-link { max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.financial-line-table .financial-position-with-details td { border-bottom: 0; padding-bottom: 4px; }
.financial-line-table .financial-position-details td { padding: 0 10px 9px; }
.financial-position-deliveries {
  list-style: none;
  margin: 0 0 0 1rem;
  padding: 2px 0 2px 10px;
  border-inline-start: 2px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.financial-position-deliveries li { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.financial-position-deliveries li + li { margin-top: 3px; }
.financial-position-deliveries strong,
.financial-position-deliveries .financial-article-link { font-weight: 600; }
.financial-position-deliveries .financial-article-link {
  padding: 0;
  color: inherit;
  font-size: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.financial-position-deliveries .financial-article-link:hover,
.financial-position-deliveries .financial-article-link:focus-visible { text-decoration-style: solid; }
.financial-delivery-progress { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.financial-delivery-dialog {
  box-sizing: border-box;
  width: min(680px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}
.financial-delivery-dialog::backdrop { background: #102b3d55; }
.financial-delivery-dialog .actions-row { justify-content: space-between; }
.financial-delivery-dialog h3 { margin: 0; }
.kunde-sensitive-financials > .section-header { flex-wrap: wrap; }
.kunde-sensitive-financials > .section-header > div:first-child { min-width: 0; }
.kunde-workspace-tabs [role="tab"] { min-width: 0; }
@container (max-width: 600px) {
  .financial-line-table, .financial-line-table tbody { display: block; }
  .financial-line-table colgroup { display: none; }
  .financial-line-mobile-help { display: block; padding: 8px 10px; text-align: left; font-size: 12px; }
  .financial-line-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .financial-line-table thead .financial-info-button { display: none; }
  .financial-line-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 10px; gap: 10px 16px; border-bottom: 1px solid var(--line); }
  .financial-line-table td { display: block; padding: 0; border: 0; text-align: left; }
  .financial-line-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 600; }
  .financial-line-table tr.financial-position-with-details { border-bottom: 0; }
  .financial-line-table .financial-position-with-details td { padding-bottom: 0; }
  .financial-line-table tr.financial-position-details { display: block; padding-top: 0; }
  .financial-line-table .financial-position-details td { padding: 0; }
  .financial-position-deliveries { margin-inline-start: 0; }
  .financial-line-table .financial-position-details td::before { content: none; }
  .financial-line-table td[data-label="Artikel"], .financial-line-table td[data-label="Bezeichnung"], .financial-line-table td[data-label="Menge"] { grid-column: 1 / -1; }
  .financial-line-table .financial-number { text-align: left; overflow-wrap: anywhere; }
}
.financial-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.financial-pagination > span, .financial-explanation { color: var(--muted); font-size: 13px; line-height: 1.5; }
.financial-explanation { margin: 0; }
.financial-development-note { margin: 0; padding: 10px 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.financial-development-table { min-width: 620px; }
.financial-development-table td { padding-top: 12px; padding-bottom: 12px; }
.financial-development-table td:nth-child(2) { min-width: 180px; width: 38%; }
.financial-development-table td:nth-child(3) { white-space: normal; min-width: 180px; }
.financial-development-amount { display: block; font-variant-numeric: tabular-nums; }
.financial-year-status, .financial-comparison-note { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; white-space: normal; }
.financial-trend-track { display: block; position: relative; height: 10px; margin-top: 8px; overflow: hidden; border-radius: 4px; background: var(--line); }
.financial-trend-track::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid var(--muted); }
.financial-trend-bar { position: absolute; top: 0; bottom: 0; background: var(--brand); }
.financial-trend-bar.is-negative { background: #b45309; }
.financial-trend-bar.is-ongoing { background: repeating-linear-gradient(135deg, var(--brand) 0 4px, var(--brand-soft) 4px 8px); }
.financial-notice { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--brand-soft); line-height: 1.5; }
.financial-trace { margin-top: 5px; font-size: 11px; color: var(--muted); }
.financial-trace summary { cursor: pointer; }
.financial-trace code, .financial-trace small { display: block; max-width: 28ch; white-space: normal; overflow-wrap: anywhere; }

.kunde-sensitive-financial-locked {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 88%, var(--brand-soft));
}

.kunde-sensitive-financial-locked .material-icons {
  color: var(--brand);
}

.kunde-sensitive-financial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 0;
}

.kunde-sensitive-financial-grid > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 94%, var(--brand-soft));
}

.kunde-sensitive-financial-grid dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kunde-sensitive-financial-grid dd {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.kunde-sensitive-financial-meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.kunde-sensitive-financial-datasets {
  display: grid;
  gap: 14px;
}

.kunde-sensitive-financial-dataset {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 96%, var(--brand-soft));
}

.kunde-sensitive-financial-dataset > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.kunde-sensitive-financial-dataset > header > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.kunde-sensitive-financial-dataset h3 {
  margin: 0;
}

.kunde-sensitive-financial-dataset .material-icons {
  color: var(--brand);
}

.kunde-sensitive-financial-table {
  width: 100%;
  border-collapse: collapse;
}

.kunde-sensitive-financial-table th,
.kunde-sensitive-financial-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.kunde-sensitive-financial-table th:first-child,
.kunde-sensitive-financial-table td:first-child {
  text-align: left;
}

.kunde-sensitive-financial-table tbody tr:last-child td {
  border-bottom: 0;
}

.kunde-sensitive-financial-dataset-note {
  margin: 0;
  padding: 14px 16px;
  color: var(--muted);
}

.kunde-crm-360-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 14px;
}

.kunde-crm-360-summary .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.kunde-crm-360-summary .material-icons {
  font-size: 16px;
}

.kunde-crm-360-body {
  max-height: 680px;
  overflow: auto;
}

.kunde-facts {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1fr);
  gap: 10px 18px;
  margin: 0;
}

.kunde-facts dt {
  overflow-wrap: anywhere;
  color: var(--brand);
  font-weight: 900;
}

.kunde-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.kunde-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.kunde-detail-table {
  min-width: 680px;
}

.kunde-detail-table.wide {
  min-width: 980px;
}

.kunde-tour-reports .table-wrap {
  max-height: 230px;
}

.kunde-map {
  height: 240px;
  background: var(--surface-3);
}

@media (max-width: 600px) {
  .kunde-workspace-header { align-items: flex-start; }
  .kunde-workspace-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 3px; box-sizing: border-box; }
  .kunde-workspace-tabs [role="tab"] { flex: 1; gap: 5px; padding: 11px 8px; font-size: 13px; }
  .kunde-workspace-tabs .material-icons { font-size: 18px; }
}

.kunde-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.apple-map {
  position: relative;
  overflow: hidden;
}

.map-placeholder {
  min-height: 220px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(0, 92, 169, 0.08), rgba(148, 193, 31, 0.14)),
    var(--surface-2);
}

.map-placeholder .material-icons {
  color: var(--brand);
  font-size: 34px;
}

.apple-map .map-placeholder {
  height: 100%;
  min-height: 100%;
}

.apple-map-fallback .btn {
  margin-top: 4px;
}

.error-state.compact {
  padding: 0 0 16px;
  text-align: left;
}

.storage-workspace {
  display: grid;
  gap: 14px;
}

.storage-header-panel .section-header > div:first-child {
  min-width: 0;
}

.storage-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.storage-subtitle span {
  color: var(--brand);
  font-weight: 800;
}

.storage-subnote {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.storage-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
  color: var(--muted);
}

.storage-path .material-icons {
  color: var(--muted);
  font-size: 18px;
}

.storage-path-item {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--brand);
  background: transparent;
  font: inherit;
  font-weight: 800;
}

button.storage-path-item {
  cursor: pointer;
}

button.storage-path-item:hover,
.storage-path-item.active {
  border-color: var(--line);
  background: var(--accent-soft);
}

.storage-master-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: start;
}

.storage-panel {
  min-width: 0;
}

.storage-step-panel {
  max-width: 980px;
  min-width: 0;
}

.storage-create-details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fbfdf7;
}

.storage-create-details summary {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  color: var(--brand);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.storage-create-details summary::-webkit-details-marker {
  display: none;
}

.storage-create-details form {
  padding: 0 16px 16px;
}

.storage-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  align-items: center;
}

.storage-area-form {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.storage-form-wide {
  grid-column: 1 / -1;
}

.storage-table {
  min-width: 720px;
}

.selected-row td {
  background: var(--accent-soft);
}

.storage-choice-list {
  display: grid;
}

.storage-choice-row {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 10px 0 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.storage-choice-row:hover,
.storage-choice-row.active {
  background: var(--accent-soft);
}

.storage-choice-select {
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 0;
  padding: 12px 16px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.storage-choice-edit {
  justify-self: end;
}

.storage-choice-actions {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 6px;
}

.storage-choice-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.storage-choice-main strong,
.storage-choice-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-choice-main strong {
  color: var(--brand);
  font-size: 15px;
}

.storage-choice-main small {
  color: var(--muted);
}

.storage-choice-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.storage-detail-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.storage-detail-panel {
  overflow: visible;
}

.storage-detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.55fr) minmax(520px, 1.45fr);
  gap: 14px;
  padding: 14px;
  align-items: start;
}

.storage-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.storage-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfdf7;
}

.storage-card-header h3 {
  margin: 0;
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
}

.storage-inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.storage-inline-form .input {
  min-width: 160px;
}

.storage-mobile-place-bar,
.storage-mobile-articles {
  margin-top: 14px;
}

.storage-mobile-place-form {
  width: 100%;
  justify-content: stretch;
}

.storage-mobile-place-form .input {
  flex: 1 1 auto;
  min-width: 0;
}

.accent-icon {
  color: #173100;
  background: var(--accent);
}

.storage-list {
  max-height: 420px;
  overflow: auto;
}

.storage-list-row {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 4px 6px 4px 0;
  color: var(--ink);
  background: #fff;
}

.storage-list-row:hover,
.storage-list-row.active {
  background: var(--accent-soft);
}

.storage-list-select {
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 0;
  padding: 10px 12px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.storage-list-select .material-icons {
  color: var(--brand);
}

.storage-list-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-list-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.storage-list-actions .icon-btn,
.storage-list-delete {
  width: 34px;
  height: 34px;
}

.compact-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(360px, 100%);
}

.compact-search .input {
  flex: 1 1 auto;
}

.search-clear-btn {
  flex: 0 0 auto;
}

.storage-lookup-modal {
  inset: 8vh max(18px, calc((100vw - 980px) / 2)) auto;
}

.storage-lookup-list {
  display: grid;
  gap: 10px;
}

.storage-lookup-row {
  width: 100%;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.storage-lookup-row:hover {
  border-color: rgba(148, 193, 31, 0.34);
  background: var(--accent-soft);
}

.storage-lookup-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.storage-lookup-main strong {
  color: var(--brand);
  font-size: 15px;
}

.storage-lookup-main span:last-child {
  min-width: 0;
  line-height: 1.4;
}

.storage-lookup-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.storage-lookup-meta .badge {
  white-space: nowrap;
}

.storage-article-picker-modal .storage-modal-body {
  grid-template-rows: auto minmax(180px, auto) auto;
}

.storage-article-search-wrap {
  max-height: 360px;
}

.storage-article-picker-modal .storage-article-search-wrap {
  min-height: 180px;
  max-height: clamp(180px, 34vh, 360px);
  overflow: auto;
}

.storage-add-article-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) minmax(180px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.storage-add-article-form .field {
  margin-bottom: 0;
}

.storage-existing-articles {
  margin: 0;
}

.storage-mobile-article-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.storage-mobile-article-card {
  width: 100%;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.storage-mobile-article-card.active {
  border-color: rgba(148, 193, 31, 0.42);
  box-shadow: inset 0 0 0 1px rgba(148, 193, 31, 0.12);
  background: #fbfdf7;
}

.storage-mobile-article-top,
.storage-mobile-article-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.storage-mobile-article-id {
  color: var(--brand);
  font-weight: 900;
}

.storage-mobile-article-name {
  font-size: 15px;
  line-height: 1.35;
}

.storage-mobile-article-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.storage-mobile-article-stat {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
}

.storage-mobile-article-stat small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.storage-mobile-article-stat-value {
  font-weight: 800;
}

.storage-mobile-article-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.storage-mobile-sheet {
  inset: auto 0 0;
  max-height: min(82vh, 720px);
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.storage-mobile-sheet .storage-modal-body {
  gap: 12px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 720px) {
  .storage-lookup-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

.storage-mobile-sheet-selection {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdf7;
}

.storage-mobile-order-actions,
.storage-mobile-action-grid {
  display: grid;
  gap: 10px;
}

.storage-mobile-order-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.storage-mobile-order-actions .btn,
.storage-mobile-action-grid .btn {
  justify-content: flex-start;
}

.storage-existing-table {
  min-width: 860px;
}

.storage-article-actions {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.storage-article-actions .actions-row {
  align-items: flex-start;
}

.storage-order-buttons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.storage-article-toolset {
  display: flex;
  flex: 1 1 720px;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.storage-selected-article {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
  font-weight: 900;
}

.storage-selected-article span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-action-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px;
}

.storage-article-edit-form {
  grid-template-columns: 1fr;
  gap: 14px;
}

.storage-action-form .field {
  margin-bottom: 0;
}

.storage-article-edit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.storage-article-history-field {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.storage-article-history-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.storage-article-history-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.storage-hint-pill {
  flex: 0 0 auto;
  text-transform: uppercase;
  letter-spacing: 0;
}

.storage-article-history-field.required {
  border-color: rgba(189, 56, 56, 0.24);
  background: #fff8f8;
}

.storage-article-history-field.has-error {
  border-color: rgba(189, 56, 56, 0.42);
  box-shadow: inset 0 0 0 1px rgba(189, 56, 56, 0.12);
}

.storage-article-history-field.has-error .textarea {
  border-color: rgba(189, 56, 56, 0.55);
  box-shadow: 0 0 0 3px rgba(189, 56, 56, 0.12);
}

.storage-article-history-field .textarea {
  min-height: 112px;
}

.storage-warning {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--danger);
  font-weight: 800;
}

.storage-duplicate-alert {
  display: block;
  margin: 0;
  padding: 14px 16px;
  border: 2px solid #f1a6a6;
  border-radius: 14px;
  background: #fff2f2;
  box-shadow: 0 10px 24px rgba(180, 35, 24, 0.12);
}

.storage-duplicate-alert-text {
  margin: 0;
  color: #b42318 !important;
  font-size: 1.1rem;
  font-weight: 900 !important;
  line-height: 1.55;
}

.storage-action-modal {
  max-width: 1180px;
}

.storage-history-wrap {
  max-height: 520px;
}

.history-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.history-transition {
  flex-wrap: wrap;
}

.history-arrow {
  font-size: 16px;
  color: var(--muted);
}

.history-to {
  font-weight: 800;
}

.history-to.positive {
  color: #1d5f19;
}

.history-to.negative {
  color: #9f1731;
}

.history-delta {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.history-delta.positive {
  color: #1d5f19;
  background: #dff2dc;
}

.history-delta.negative {
  color: #9f1731;
  background: #f7d9df;
}

.storage-details-stack {
  display: grid;
  gap: 14px;
}

.storage-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.storage-detail-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.storage-detail-item dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.storage-detail-item dd {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.storage-modal-section {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.storage-modal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.storage-modal-section-header h3 {
  margin: 0;
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
}

.storage-chart-wrap {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.storage-chart {
  width: 100%;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.storage-chart-grid {
  stroke: rgba(48, 62, 56, 0.14);
  stroke-width: 1;
}

.storage-chart-grid.subtle {
  stroke: rgba(48, 62, 56, 0.08);
}

.storage-chart-label {
  fill: var(--muted);
  font-size: 11px;
}

.storage-chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.storage-chart-line.order {
  stroke: #4f83d6;
  fill: none;
}

.storage-chart-dot.order,
.storage-chart-legend .order {
  stroke: #4f83d6;
  background: #4f83d6;
  fill: #4f83d6;
}

.storage-chart-line.parcel {
  stroke: #9d3d36;
  fill: none;
}

.storage-chart-dot.parcel,
.storage-chart-legend .parcel {
  stroke: #9d3d36;
  background: #9d3d36;
  fill: #9d3d36;
}

.storage-chart-legend {
  display: inline-flex;
  justify-content: center;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}

.storage-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.storage-chart-legend i {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 2px;
}

.storage-order-history-wrap {
  max-height: 420px;
}

.storage-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(13, 27, 23, 0.38);
}

.storage-modal {
  position: fixed;
  inset: 6vh max(18px, calc((100vw - 1120px) / 2)) auto;
  z-index: 80;
  max-height: 88vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.storage-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfdf7;
}

.storage-modal-header h2 {
  margin: 0;
  color: var(--brand);
}

.storage-modal-body {
  min-height: 0;
  display: grid;
  gap: 14px;
  padding: 16px;
  overflow: auto;
}

body:has(.storage-modal.vehicle-editor-modal) {
  overflow: hidden;
  overscroll-behavior: none;
}

/* Keep the vehicle form inside the visible viewport. Only its body scrolls,
   so the header actions remain reachable at every notebook height and zoom. */
.storage-modal.vehicle-editor-modal {
  --vehicle-modal-edge: clamp(8px, 2vh, 20px);
  top: var(--vehicle-modal-edge);
  bottom: var(--vehicle-modal-edge);
  min-height: 0;
  max-height: none;
  grid-template-rows: auto minmax(0, 1fr);
  overscroll-behavior: contain;
}

.storage-modal.vehicle-editor-modal .storage-modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  flex: 0 0 auto;
}

.storage-modal.vehicle-editor-modal .storage-modal-body {
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

@supports (height: 100dvh) {
  .storage-modal.vehicle-editor-modal {
    top: max(var(--vehicle-modal-edge), env(safe-area-inset-top));
    bottom: auto;
    height: calc(
      100dvh - max(var(--vehicle-modal-edge), env(safe-area-inset-top)) -
        max(var(--vehicle-modal-edge), env(safe-area-inset-bottom))
    );
  }
}

@media (max-width: 760px), (max-height: 760px) {
  .storage-modal.vehicle-editor-modal {
    --vehicle-modal-edge: 8px;
  }
}

@media (max-height: 760px) {
  .storage-article-picker-modal {
    inset: 12px max(12px, calc((100vw - 1120px) / 2)) auto;
    max-height: calc(100vh - 24px);
  }

  .storage-article-picker-modal .storage-modal-header {
    padding: 12px 16px;
  }

  .storage-article-picker-modal .storage-modal-body {
    gap: 10px;
    padding: 12px;
  }

  .storage-article-picker-modal .storage-article-search-wrap {
    min-height: 170px;
    max-height: 30vh;
  }

  .storage-article-picker-modal .storage-add-article-form {
    gap: 8px;
    padding: 12px;
  }

  .storage-article-picker-modal .textarea {
    min-height: 64px;
  }
}

.form-span {
  grid-column: 1 / -1;
}

.split {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
}

.page-note {
  color: var(--muted);
  line-height: 1.5;
}

.page-note.warning {
  color: #7a4b00;
}

.mobile-toggle {
  display: none;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(300px, 86vw);
    transform: translateX(-102%);
    transition: transform 0.18s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

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

  .content {
    padding: 14px;
  }

  .topbar {
    padding: 10px 14px;
    flex-wrap: wrap;
  }

  .topbar-title h1 {
    font-size: 19px;
  }

  .dashboard-logo-stage {
    min-height: min(calc(100vh - 210px), 560px);
    padding: 14px;
  }

  .dashboard-logo-image {
    width: min(100%, 760px);
  }

  .dashboard-wallbox-shortcuts .section-header {
    align-items: flex-start;
  }

  .dashboard-wallbox-shortcuts .actions-row {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-home.has-wallbox-shortcuts .dashboard-logo-stage {
    min-height: 220px;
  }

  .table-toolbar {
    grid-template-columns: 1fr;
  }

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

  .kunde-detail-grid {
    grid-template-columns: 1fr;
  }

  .article-detail-layout {
    grid-template-columns: 1fr;
  }

  .article-change-selection-grid,
  .article-change-workspace-grid,
  .article-change-flow {
    grid-template-columns: 1fr;
  }

  .article-change-list-head,
  .article-change-list-row {
    grid-template-columns: minmax(100px, 0.36fr) minmax(0, 1fr) minmax(80px, 0.24fr);
    gap: 10px;
  }

  .kunde-visits {
    grid-column: auto;
  }

  .kunde-crm-360 {
    grid-column: auto;
  }

  .kunde-sensitive-financials {
    grid-column: auto;
  }

  .storage-master-grid,
  .storage-detail-grid {
    grid-template-columns: 1fr;
  }

  .storage-add-article-form {
    grid-template-columns: 1fr 1fr;
  }

  .report-form-grid,
  .report-inline-form,
  .report-task-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .table-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .table-footer > span {
    align-self: flex-start;
  }

  .table-footer .actions-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1fr 1fr;
    width: 100%;
  }

  .table-footer .actions-row .select,
  .table-footer .actions-row .btn {
    width: 100%;
    min-width: 0;
  }

  .article-table,
  .temp-control-table,
  .tour-archive-table {
    min-width: 0;
    table-layout: fixed;
  }

  .article-table th:nth-child(2),
  .article-table td:nth-child(2),
  .article-table th:nth-child(n + 4),
  .article-table td:nth-child(n + 4) {
    display: none;
  }

  .article-table th:nth-child(1),
  .article-table td:nth-child(1) {
    width: 34%;
    white-space: nowrap;
  }

  .article-table th:nth-child(3),
  .article-table td:nth-child(3) {
    width: 66%;
    white-space: normal;
    word-break: break-word;
  }

  .temp-control-table {
    min-width: 0;
    table-layout: fixed;
  }

  .temp-control-table th:nth-child(1),
  .temp-control-table td:nth-child(1) {
    width: 24%;
    white-space: nowrap;
  }

  .temp-control-table th:nth-child(2),
  .temp-control-table td:nth-child(2) {
    width: 24%;
    white-space: nowrap;
  }

  .temp-control-table th:nth-child(3),
  .temp-control-table td:nth-child(3) {
    width: 52%;
    white-space: normal;
    word-break: break-word;
  }

  .tour-archive-table th,
  .tour-archive-table td {
    font-size: 12px;
  }

  .tour-archive-table th:nth-child(3),
  .tour-archive-table td:nth-child(3) {
    min-width: 0;
    white-space: normal;
    word-break: break-word;
  }

  .tour-archive-table th:nth-child(1),
  .tour-archive-table td:nth-child(1) {
    width: 52px;
  }

  .tour-archive-table th:nth-child(2),
  .tour-archive-table td:nth-child(2) {
    width: 76px;
    white-space: nowrap;
  }

  .tour-archive-table th:nth-child(4),
  .tour-archive-table td:nth-child(4),
  .tour-archive-table th:nth-child(5),
  .tour-archive-table td:nth-child(5) {
    width: 72px;
    min-width: 0;
    white-space: nowrap;
  }

  .tour-archive-expanded {
    grid-template-columns: 1fr 1fr;
  }

  .customer-search-bar {
    grid-template-columns: 1fr;
  }

  .bestellungen-table,
  .bestellung-articles-table {
    min-width: 0;
    table-layout: fixed;
  }

  .bestellungen-table th,
  .bestellungen-table td,
  .bestellung-articles-table th,
  .bestellung-articles-table td {
    font-size: 12px;
  }

  .bestellungen-table th:nth-child(1),
  .bestellungen-table td:nth-child(1) {
    width: 30%;
    white-space: normal;
  }

  .bestellungen-table th:nth-child(2),
  .bestellungen-table td:nth-child(2) {
    width: 42%;
    white-space: normal;
    word-break: break-word;
  }

  .bestellungen-table th:nth-child(3),
  .bestellungen-table td:nth-child(3) {
    width: 28%;
    white-space: nowrap;
  }

  .car-charging-table th,
  .car-charging-table td {
    font-size: 12px;
  }

  .car-charging-table th:nth-child(4),
  .car-charging-table td:nth-child(4),
  .car-charging-table th:nth-child(7),
  .car-charging-table td:nth-child(7) {
    display: none;
  }

  .car-charging-table th:nth-child(1),
  .car-charging-table td:nth-child(1),
  .car-charging-table th:nth-child(2),
  .car-charging-table td:nth-child(2),
  .car-charging-table th:nth-child(3),
  .car-charging-table td:nth-child(3),
  .car-charging-table th:nth-child(5),
  .car-charging-table td:nth-child(5),
  .car-charging-table th:nth-child(6),
  .car-charging-table td:nth-child(6) {
    white-space: nowrap;
  }

  .kunde-facts,
  .kunde-action-grid,
  .article-detail-facts {
    grid-template-columns: 1fr;
  }

  .bestellung-general dl {
    grid-template-columns: 1fr;
  }

  .bestellung-general div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .bestellung-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .bestellung-section-header .compact-toggle {
    justify-content: space-between;
  }

  .storage-form,
  .storage-area-form,
  .storage-add-article-form,
  .storage-action-form,
  .storage-card-header {
    grid-template-columns: 1fr;
  }

  .storage-article-edit-grid {
    grid-template-columns: 1fr;
  }

  .storage-choice-row {
    grid-template-columns: 1fr;
    padding: 0 12px 12px;
  }

  .storage-choice-select {
    grid-template-columns: 1fr;
    padding: 12px 4px 0;
  }

  .storage-choice-actions {
    justify-self: stretch;
    justify-content: flex-end;
  }

  .storage-choice-meta {
    justify-content: space-between;
  }

  .storage-detail-tools {
    justify-content: flex-start;
  }

  .storage-details-grid {
    grid-template-columns: 1fr;
  }

  .storage-card-header {
    display: grid;
  }

  .storage-article-toolset {
    flex-basis: 100%;
  }

  .storage-inline-form {
    width: 100%;
  }

  .storage-inline-form .input {
    min-width: 0;
  }

  .storage-mobile-article-stats,
  .storage-mobile-order-actions,
  .storage-mobile-action-grid {
    grid-template-columns: 1fr;
  }

  .report-tabs {
    justify-content: stretch;
  }

  .report-tab {
    min-width: 0;
    flex: 1 1 0;
  }
}

@media (max-width: 1100px) {
  .vehicle-operations-metrics {
    grid-template-columns: repeat(3, minmax(145px, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar-actions {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

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

  .vehicle-operation-metric {
    min-height: 76px;
    padding: 11px;
  }

  .vehicle-reminder-row,
  .vehicle-operation-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
  }

  .vehicle-reminder-date,
  .vehicle-operation-row > span:nth-last-child(2) {
    grid-column: 2 / -1;
  }

  .vehicle-operation-form-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-operation-wide {
    grid-column: auto;
  }
}

.solar-page {
  gap: 14px;
}

.solar-heading .section-header {
  align-items: center;
}

.solar-heading .section-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.solar-updated {
  padding: 8px 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.solar-setup-state {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e8cf93;
  border-radius: 8px;
  background: #fff8e8;
  color: #694400;
}

.solar-setup-state > .material-icons {
  font-size: 28px;
}

.solar-setup-state div {
  display: grid;
  gap: 2px;
}

.solar-setup-state span:not(.material-icons) {
  color: #7c6a4e;
  font-size: 13px;
}

.solar-flow-body {
  padding-top: 12px;
  padding-bottom: 4px;
}

.solar-flow-board {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
    repeating-linear-gradient(0deg, transparent 0 31px, #e7edf1 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, #e7edf1 32px),
    #f5f8fa;
}

.solar-flow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.solar-flow-path {
  fill: none;
  stroke: #cbd5dc;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 3 12;
  vector-effect: non-scaling-stroke;
}

.solar-flow-path.active {
  marker-end: url(#solar-flow-arrow);
  animation: solar-flow-forward 1.1s linear infinite;
}

.solar-flow-path.active.reverse {
  marker-start: url(#solar-flow-arrow);
  marker-end: none;
  animation-direction: reverse;
}

.solar-flow-path.solar.active,
.solar-flow-path.grid.active,
.solar-flow-path.house.active,
.solar-flow-path.wallbox.active,
.solar-flow-path.battery.active {
  stroke: var(--accent);
}

.solar-flow-lines marker path {
  fill: var(--accent);
}

@keyframes solar-flow-forward {
  to { stroke-dashoffset: -30; }
}

.solar-flow-node {
  position: absolute;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 154px;
  padding: 12px;
  border: 1px solid #d7e1e8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 16px rgba(31, 60, 82, 0.08);
  text-align: center;
}

.solar-flow-node > .material-icons {
  color: var(--brand);
  font-size: 31px;
}

.solar-flow-node small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.solar-flow-node strong {
  color: var(--ink);
  font-size: 23px;
  line-height: 1.1;
}

.solar-flow-node span:not(.material-icons) {
  color: var(--muted);
  font-size: 11px;
}

.solar-node {
  top: 18px;
  left: 4%;
}

.solar-node > .material-icons {
  color: #d99a00;
}

.grid-node {
  bottom: 18px;
  left: 4%;
}

.house-node {
  top: 18px;
  right: 4%;
}

.solar-consumers {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 8px;
  width: 154px;
}

.solar-flow-board.has-charging { min-height: var(--solar-flow-height); }
.has-charging .solar-consumers { width: 210px; }
.solar-consumers > .solar-flow-node { position: relative; width: 100%; }
.solar-building-node > .material-icons {
  color: #26816c;
}

.solar-flow-wallbox {
  height: 64px;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: 16px 22px;
  justify-items: start;
  align-content: center;
  gap: 2px 8px;
  text-align: left;
}

.solar-flow-wallbox > .material-icons { grid-row: 1 / 3; align-self: center; font-size: 25px; color: #26816c; }
.solar-flow-wallbox small { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.solar-flow-wallbox strong { font-size: 19px; white-space: nowrap; }
.solar-flow-note { margin: 10px 0; font-size: 12px; color: var(--muted); }

.battery-node {
  right: 4%;
  bottom: 18px;
  grid-template-columns: 58px minmax(0, 1fr);
  justify-items: stretch;
  align-items: center;
  width: 210px;
  text-align: left;
}

.battery-node > div:last-child {
  display: grid;
  gap: 3px;
}

.battery-node.offline {
  opacity: 0.58;
}

.solar-battery-ring {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: conic-gradient(#08a9d2 calc(var(--battery-soc) * 1%), #dfe9ee 0);
}

.solar-battery-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
}

.solar-battery-ring .material-icons {
  z-index: 1;
  grid-area: 1 / 1;
  color: #087ea4;
  font-size: 24px;
}

.solar-flow-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 4px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 5px 16px rgba(67, 102, 0, 0.28);
  transform: translate(-50%, -50%);
}

.solar-flow-hub .material-icons {
  font-size: 28px;
}

.solar-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.solar-metric {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 108px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.solar-metric > .material-icons {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
}

.solar-metric.production > .material-icons {
  color: #567c00;
  background: #eef8d7;
}

.solar-metric.export > .material-icons {
  color: #2c6f50;
  background: #e4f5eb;
}

.solar-metric.battery > .material-icons {
  color: #087ea4;
  background: #e1f5fa;
}

.solar-metric div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.solar-metric small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.solar-metric strong {
  color: var(--ink);
  font-size: 25px;
  line-height: 1.1;
}

.solar-metric span {
  color: var(--muted);
  font-size: 12px;
}

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

.solar-wallbox-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #a8b7c4;
  border-radius: 8px;
  background: var(--surface);
}

.solar-wallbox-card.charging {
  border-left-color: var(--accent);
  background: #fbfef4;
}

.solar-wallbox-card.offline {
  border-left-color: var(--danger);
}

.solar-wallbox-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.solar-wallbox-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--brand);
  background: var(--brand-soft);
}

.solar-wallbox-card.charging .solar-wallbox-icon {
  color: #365e00;
  background: var(--accent-soft);
}

.solar-wallbox-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.solar-wallbox-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.solar-wallbox-title h3 {
  margin: 0;
  color: var(--brand);
  font-size: 15px;
}

.solar-wallbox-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.solar-wallbox-power {
  display: grid;
  gap: 3px;
  min-width: 145px;
  text-align: right;
}

.solar-wallbox-power small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.solar-wallbox-power strong {
  color: var(--ink);
  font-size: 22px;
}

.solar-wallbox-session {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.solar-wallbox-session > div { display: grid; align-content: start; gap: 4px; min-width: 0; }
.solar-wallbox-session small, .solar-wallbox-session span, .solar-wallbox-session p { color: var(--muted); font-size: 12px; }
.solar-wallbox-session strong { color: var(--ink); font-size: 16px; }
.solar-wallbox-session p { grid-column: 1 / -1; margin: 0; }

@media (max-width: 900px) {
  .solar-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .solar-wallbox-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .solar-flow-board {
    min-height: 350px;
  }

  .solar-flow-node {
    width: 112px;
    padding: 9px;
  }

  .solar-consumers, .has-charging .solar-consumers { width: 112px; }
  .solar-flow-wallbox { grid-template-columns: 18px minmax(0, 1fr); gap: 2px 5px; padding: 8px; }
  .solar-flow-wallbox > .material-icons { font-size: 20px; }
  .solar-consumers .solar-flow-wallbox strong { font-size: 16px; }

  .solar-flow-node strong {
    font-size: 18px;
  }

  .solar-flow-node span:not(.material-icons) {
    font-size: 9px;
  }

  .solar-node,
  .grid-node {
    left: 2%;
  }

  .house-node,
  .battery-node {
    right: 2%;
  }

  .battery-node {
    grid-template-columns: 40px minmax(0, 1fr);
    width: 142px;
  }

  .solar-battery-ring {
    width: 38px;
    height: 38px;
  }

  .solar-battery-ring::before {
    width: 28px;
    height: 28px;
  }

  .solar-battery-ring .material-icons {
    font-size: 18px;
  }

  .solar-overview-grid {
    grid-template-columns: 1fr;
  }

  .solar-wallbox-card {
    grid-template-columns: 1fr;
  }

  .solar-wallbox-power {
    padding-left: 52px;
    text-align: left;
  }
}

/* Easee session attribution and consumption history. */
.solar-forecast-body { display: grid; gap: 14px; min-width: 0; }
.solar-forecast-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.solar-forecast-totals > div { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.solar-forecast-totals strong { font-size: 22px; color: var(--brand); }
.solar-forecast-totals span, .solar-forecast-totals small { font-size: 12px; color: var(--muted); }
.solar-forecast-chart { display: block; width: 100%; height: auto; min-width: 0; }
.solar-forecast-chart text { font: 12px sans-serif; fill: var(--muted); }
.forecast-grid { stroke: var(--line); stroke-width: 1; }
.forecast-band { fill: #9cc53b; opacity: .25; }
.forecast-line { fill: none; stroke: #5d850f; stroke-width: 2.5; }
.forecast-point { fill: #5d850f; opacity: 0; }
.forecast-point:hover { opacity: 1; }
.solar-forecast-tip { padding: 10px 12px; border-left: 3px solid #8aaa22; background: #f4f8e8; font-size: 13px; }
.solar-release-advice { display: grid; gap: 8px; padding: 12px; background: #f4f8e8; border: 1px solid #cbdc9b; border-radius: 8px; }
.solar-release-advice strong { color: var(--brand); font-size: 14px; }
.solar-release-advice small { color: var(--muted); font-size: 12px; }
.solar-release-advice .btn { justify-self: start; }
@media (max-width: 600px) {
  .solar-forecast-chart text { font-size: 25px; }
  .solar-forecast-totals { grid-template-columns: 1fr; }
  .solar-forecast-totals > div { grid-template-columns: 1fr auto; align-items: center; }
  .solar-forecast-totals span { grid-column: 1 / -1; }
}

.solar-wallbox-authorization strong { overflow-wrap: anywhere; }
.solar-authorization-note, .solar-history-note { color: var(--muted); font-size: 12px; }
.solar-history-body { display: grid; gap: 16px; min-width: 0; }
.solar-history-filters { display: flex; flex-wrap: wrap; gap: 12px; }
.solar-history-filters label { display: grid; flex: 1 1 180px; gap: 5px; min-width: 0; font-size: 13px; }
.solar-history-filters input, .solar-history-filters select { width: 100%; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.solar-history-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.solar-history-total strong { font-size: 24px; color: var(--brand); }
.solar-history-users { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 10px; }
.solar-history-users article, .solar-history-person { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.solar-history-users small, .solar-history-users span { color: var(--muted); font-size: 12px; }
.solar-history-users b { margin-top: 5px; color: var(--brand); font-size: 20px; }
.solar-history-table { width: 100%; }
.solar-history-table td, .solar-history-table th { padding: 10px; text-align: left; }
.solar-history-table td small { display: block; color: var(--muted); margin-top: 3px; }
.solar-history-table td:last-child { text-align: right; white-space: nowrap; }
.solar-history-body .table-wrap { overflow-x: auto; }

.solar-release-button { margin-top: 12px; }
.solar-release-confirm { margin-top: 12px; padding: 12px; border: 1px solid var(--line, #dbe2ea); border-radius: 8px; }
.solar-release-confirm p { margin-bottom: 12px; }
.solar-charge-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; padding: 0; border: 0; }
.solar-charge-mode legend { grid-column: 1 / -1; margin-bottom: 7px; padding: 0; font-size: 13px; font-weight: 700; }
.solar-charge-mode label { display: flex; align-items: flex-start; gap: 9px; min-width: 0; padding: 11px; border: 1px solid var(--line, #dbe2ea); border-radius: 8px; background: var(--surface, #fff); cursor: pointer; }
.solar-charge-mode label:has(input:checked) { border-color: var(--brand); background: #f4f8e8; box-shadow: 0 0 0 1px var(--brand); }
.solar-charge-mode input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--brand); }
.solar-charge-mode span { display: grid; gap: 3px; min-width: 0; }
.solar-charge-mode strong { color: var(--ink); font-size: 13px; }
.solar-charge-mode small, .solar-charge-mode-current { color: var(--muted); font-size: 12px; }
.solar-charge-mode-current { display: block; margin-top: 4px; }
.solar-release-log td small { display: block; max-width: 36rem; }
.solar-release-log [role="status"]:empty { display: none; }

.solar-history-person { background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.solar-history-person:hover { border-color: var(--brand); background: var(--panel, var(--surface)); }
.solar-history-person:focus-visible, .solar-person-link:focus-visible, .solar-month-column:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.solar-history-inactive { border-top: 1px solid var(--line); padding-top: 14px; }
.solar-history-inactive h3 { margin: 0; font-size: 13px; color: var(--muted); }
.solar-history-inactive .solar-history-note { margin: 6px 0 10px; }
.solar-history-inactive-users { display: flex; flex-wrap: wrap; gap: 8px; }
.solar-history-inactive-person { display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.solar-history-inactive-person span { min-width: 0; overflow-wrap: anywhere; }
.solar-history-inactive-person small { white-space: nowrap; }
.solar-history-inactive-person:hover { border-color: var(--brand); color: var(--brand); }
.solar-history-inactive-person:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.solar-person-link { border: 0; padding: 0; background: none; color: var(--brand); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.solar-person-link:hover { text-decoration: underline; }
.solar-user-chart { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; gap: 14px; }
.solar-chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.solar-chart-heading h3 { margin: 0 0 6px; overflow-wrap: anywhere; }
.solar-chart-heading p, .solar-chart-total { margin: 0; }
.solar-chart-heading p { font-size: 12px; color: var(--muted); }
.solar-chart-total strong { color: var(--brand); font-size: 22px; }
.solar-chart-scroll { min-width: 0; overflow-x: auto; padding: 4px; }
.solar-month-bars { display: grid; grid-template-columns: repeat(12, minmax(68px, 1fr)); min-width: 904px; gap: 8px; }
.solar-month-column { display: grid; grid-template-rows: 32px 180px 24px 32px; gap: 7px; padding: 3px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: center; cursor: pointer; min-width: 0; }
.solar-month-column:disabled { opacity: 1; cursor: default; }
.solar-month-column small { font-size: 10px; color: var(--muted); }
.solar-month-value { align-self: end; font-size: 11px; font-weight: 600; overflow-wrap: normal; word-break: normal; }
.solar-month-track { position: relative; display: flex; flex-direction: column; justify-content: flex-end; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--line) calc(25% - 1px), var(--line) 25%); }
.solar-month-fill { display: block; width: 70%; margin: 0 auto; background: var(--brand); border-radius: 5px 5px 0 0; min-height: 0; }
.solar-month-column:not(:disabled):hover .solar-month-fill { filter: brightness(1.2); }
.solar-month-column.partial .solar-month-fill { background: repeating-linear-gradient(135deg, var(--brand) 0 5px, #d8b45c 5px 9px); }
.solar-month-column.pending .solar-month-track { background: repeating-linear-gradient(135deg, transparent 0 7px, var(--line) 7px 8px); }
.solar-month-column.future { color: var(--muted); }
@media (max-width: 700px) { .solar-user-chart { padding: 12px; } }

.solar-schedule-field { display: grid; gap: 6px; margin: 12px 0; font-size: 13px; font-weight: 600; }
.solar-schedule-field input { width: 100%; min-width: 0; box-sizing: border-box; padding: 10px; border: 1px solid var(--line, #dbe2ea); border-radius: 6px; font: inherit; background: var(--panel, white); color: var(--ink); }
.solar-scheduled-release { background: #f4f8e8; border-color: #cbdc9b; }
.solar-release-confirm .actions-row { flex-wrap: wrap; }
.solar-wallbox-card > .solar-release-confirm { grid-column: 1 / -1; margin-top: 0; font-size: 13px; }
.solar-wallbox-card > .solar-release-button { grid-column: 1 / -1; justify-self: start; margin-top: 0; }
.solar-release-progress { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; background: rgba(5, 24, 38, .62); backdrop-filter: blur(3px); }
.solar-release-progress-card { width: min(100%, 430px); display: grid; justify-items: center; gap: 12px; padding: 30px 26px; border-radius: 14px; background: var(--surface, #fff); color: var(--ink, #152536); box-shadow: 0 24px 70px rgba(0, 0, 0, .28); text-align: center; }
.solar-release-progress-card h2, .solar-release-progress-card p { margin: 0; }
.solar-release-progress-card small { color: var(--muted); }
.solar-release-spinner { width: 46px; height: 46px; border: 5px solid #dfe8cd; border-top-color: var(--brand, #5d850f); border-radius: 50%; animation: solar-release-spin .8s linear infinite; }
@keyframes solar-release-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .solar-release-spinner { animation: none; } }
@media (max-width: 560px) { .solar-charge-mode { grid-template-columns: 1fr; } }
.solar-schedule-details { margin: 0 0 12px; color: var(--muted); }
.solar-schedule-details summary { cursor: pointer; margin-bottom: 8px; }

/* Inventory workspace */
.inventory-page { gap: 16px; }
.inventory-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid #cfe0ea;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(120deg, #064f86 0%, #0067a8 58%, #6c9716 140%);
  box-shadow: 0 14px 32px rgba(0, 73, 126, .18);
}
.inventory-hero > div:first-child { max-width: 760px; }
.inventory-hero h2 { margin: 6px 0 8px; font-size: clamp(22px, 3vw, 32px); }
.inventory-hero p { margin: 0; color: rgba(255, 255, 255, .84); line-height: 1.5; }
.inventory-hero .btn:not(.accent) { border-color: rgba(255, 255, 255, .32); color: #fff; background: rgba(255, 255, 255, .12); }
.inventory-eyebrow { font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #dff29e; }
.inventory-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.inventory-metric {
  min-width: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 7px 18px rgba(0, 76, 126, .06);
}
.inventory-metric > .material-icons { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; color: var(--brand); background: var(--brand-soft); }
.inventory-metric.general > .material-icons { color: #4e7215; background: #edf6d7; }
.inventory-metric.warning > .material-icons { color: #8a5700; background: #fff0d3; }
.inventory-metric > div { min-width: 0; display: grid; gap: 2px; }
.inventory-metric strong { color: var(--brand); font-size: 24px; line-height: 1; }
.inventory-metric span:not(.material-icons) { overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.inventory-models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inventory-model-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  text-align: left;
  background: var(--surface);
  font: inherit;
  cursor: pointer;
}
.inventory-model-card:hover, .inventory-model-card.active { border-color: #70a8ca; background: #f1f8fc; box-shadow: inset 0 0 0 1px rgba(0, 92, 169, .12); }
.inventory-model-card > .material-icons { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; color: var(--brand); background: var(--brand-soft); }
.inventory-model-card > span:last-child { display: grid; gap: 5px; min-width: 0; }
.inventory-model-card strong { color: var(--brand); }
.inventory-model-card small { color: var(--muted); line-height: 1.35; }
.inventory-toolbar { align-items: flex-end; }
.inventory-toolbar h2 { margin-bottom: 3px; }
.inventory-toolbar p { margin: 0; color: var(--muted); font-size: 12px; }
.inventory-filter-row { display: flex; align-items: center; gap: 8px; }
.inventory-search { position: relative; display: block; width: min(360px, 38vw); }
.inventory-search .material-icons { position: absolute; top: 50%; left: 10px; z-index: 1; color: var(--muted); transform: translateY(-50%); font-size: 20px; }
.inventory-search .input { width: 100%; padding-left: 38px; }
.inventory-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 12px; padding: 16px; }
.inventory-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(0, 67, 112, .05); }
.inventory-card:hover { border-color: #8db7d1; box-shadow: 0 9px 22px rgba(0, 67, 112, .1); transform: translateY(-1px); }
.inventory-card.inactive { opacity: .68; }
.inventory-card-main { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; width: 100%; padding: 15px; border: 0; color: inherit; text-align: left; background: transparent; font: inherit; cursor: pointer; }
.inventory-card-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; color: var(--brand); background: #eaf4fb; }
.inventory-card-copy { min-width: 0; display: grid; gap: 6px; }
.inventory-card-heading { min-width: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.inventory-card-heading strong { min-width: 0; overflow: hidden; color: #17364d; text-overflow: ellipsis; white-space: nowrap; }
.inventory-card-copy > small { color: var(--muted); }
.inventory-card-meta { display: flex; align-items: center; gap: 4px; min-width: 0; color: #526775; font-size: 12px; }
.inventory-card-meta .material-icons { font-size: 16px; }
.inventory-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-top: 1px solid #e6edf1; background: #f8fafb; }
.inventory-card-footer .badge { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inventory-card-footer .badge .material-icons { font-size: 16px; }
.inventory-usage-label { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 800; }
.inventory-detail { scroll-margin-top: 88px; }
.inventory-detail .section-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.inventory-detail-body { display: grid; gap: 16px; }
.inventory-facts { display: grid; grid-template-columns: minmax(130px, .3fr) minmax(0, 1fr); gap: 9px 16px; margin: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.inventory-facts dt { color: var(--muted); font-size: 12px; font-weight: 800; }
.inventory-facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 650; }
.inventory-callout { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid #cfe2ed; border-radius: 10px; color: #355064; background: #f2f9fd; }
.inventory-callout.success { border-color: #d5e4ad; background: #f4f9e8; }
.inventory-callout > .material-icons { color: var(--brand); }
.inventory-callout.success > .material-icons { color: #587d1c; }
.inventory-callout p { margin: 4px 0 0; line-height: 1.4; }
.inventory-workflow { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; }
.inventory-workflow-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inventory-workflow-heading h3 { margin: 0 0 4px; color: var(--brand); }
.inventory-workflow-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.inventory-assignment-current { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border-radius: 10px; background: #f6f9fb; }
.inventory-assignment-current > .material-icons { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--brand); background: var(--brand-soft); }
.inventory-assignment-current > div:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.inventory-assignment-current small { color: var(--muted); }
.inventory-assignment-current p { margin: 4px 0 0; }
.inventory-assignment-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 7px; }
.inventory-assignment-actions .material-icons { font-size: 16px; }
.inventory-history summary { color: var(--brand); font-weight: 800; cursor: pointer; }
.inventory-history > div { display: grid; margin-top: 8px; }
.inventory-history p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.inventory-history p span { color: var(--muted); font-size: 12px; }
.inventory-booking-list { display: grid; gap: 8px; }
.inventory-booking-list article { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.inventory-booking-list article > .material-icons { color: var(--brand); }
.inventory-booking-list article > div:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.inventory-booking-list article > div:last-child { display: flex; align-items: center; gap: 6px; }
.inventory-booking-list article span:not(.badge) { color: #485f70; font-size: 12px; }
.inventory-booking-list article small { color: var(--muted); }
.inventory-danger-zone { display: flex; justify-content: flex-end; padding-top: 4px; }
.inventory-modal { width: min(820px, calc(100vw - 32px)); inset-inline: 50% auto; transform: translateX(-50%); }
.inventory-modal .storage-modal-header p { margin: 4px 0 0; color: var(--muted); }
.inventory-form { display: grid; gap: 14px; }
[data-inventory-lease-end][hidden] { display: none; }
.inventory-notes { min-height: 86px; resize: vertical; }
.inventory-model-hint { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 9px; color: #355064; background: #f1f8fc; }
.inventory-model-hint .material-icons { color: var(--brand); }
.inventory-model-hint p { margin: 0; line-height: 1.4; }
.inventory-modal-actions { justify-content: flex-end; padding-top: 6px; }
.inventory-assignment-modal { width: min(650px, calc(100vw - 32px)); }
.inventory-assignment-modal form, .inventory-booking-modal form { display: grid; gap: 14px; }
.inventory-booking-modal { width: min(680px, calc(100vw - 32px)); }
.inventory-booking-period { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.danger-text { color: var(--danger); }
body:has(.storage-modal.inventory-modal) { overflow: hidden; }

@media (max-width: 920px) {
  .inventory-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-models { grid-template-columns: 1fr; }
  .inventory-hero { align-items: flex-start; flex-direction: column; }
  .inventory-hero .actions-row { width: 100%; }
  .inventory-hero .btn { flex: 1 1 180px; justify-content: center; }
  .inventory-toolbar { align-items: stretch; flex-direction: column; }
  .inventory-filter-row, .inventory-search { width: 100%; }
  .inventory-search { flex: 1; }
}

@media (max-width: 640px) {
  .inventory-metrics { grid-template-columns: 1fr; }
  .inventory-card-grid { grid-template-columns: 1fr; padding: 10px; }
  .inventory-filter-row { align-items: stretch; flex-direction: column; }
  .inventory-detail .section-header { align-items: flex-start; flex-direction: column; }
  .inventory-detail .section-header .actions-row { width: 100%; }
  .inventory-detail .section-header .btn { flex: 1 1 140px; justify-content: center; }
  .inventory-facts { grid-template-columns: 1fr; }
  .inventory-facts dd { margin-bottom: 5px; }
  .inventory-workflow-heading { align-items: flex-start; flex-direction: column; }
  .inventory-assignment-current { grid-template-columns: 42px minmax(0, 1fr); align-items: start; }
  .inventory-assignment-actions { grid-column: 1 / -1; align-items: stretch; }
  .inventory-assignment-actions .btn { justify-content: center; }
  .inventory-booking-list article { grid-template-columns: 30px minmax(0, 1fr); align-items: start; }
  .inventory-booking-list article > div:last-child { grid-column: 1 / -1; justify-content: flex-end; }
  .inventory-booking-period { grid-template-columns: 1fr; }
  .inventory-modal { top: 8px; bottom: 8px; max-height: none; }
}

/* Session feedback and the optional optimized charging goal. */
.solar-optimization-feedback { margin-top: 12px; padding: 12px; border-radius: 8px; background: #edf5fb; border-left: 3px solid #0064ad; font-size: 13px; line-height: 1.5; }
.solar-optimization-feedback p { margin: 6px 0; }
.solar-optimization-feedback small { display: block; color: #52647a; }
.solar-optimization-feedback details { margin-top: 8px; }
.solar-optimization-warning { color: #8a4b00; font-weight: 600; }
.solar-charge-mode .solar-optimization-goal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; background: #f4f8fb; border-radius: 8px; }
.solar-charge-mode .solar-optimization-goal label { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.solar-optimization-goal input { width: 100%; min-width: 0; box-sizing: border-box; padding: 9px; border: 1px solid #b9cadb; border-radius: 6px; }
.solar-optimization-goal p { grid-column: 1 / -1; margin: 0; font-size: 12px; color: #52647a; }
@media (max-width: 600px) { .solar-charge-mode .solar-optimization-goal { grid-template-columns: 1fr; } }

.solar-cards-dialog { width: min(780px, calc(100vw - 32px)); max-height: 85dvh; overflow: auto; border: 1px solid #d7e3ef; border-radius: 12px; padding: 20px; color: #172b40; background: white; }
.solar-cards-dialog::backdrop { background: #102c4b99; }
.solar-card-form { display: grid; gap: 12px; margin-block: 20px; }
.solar-card-form label { display: grid; gap: 5px; }
.solar-card-form input, .solar-card-form select { width: 100%; min-width: 0; padding: 10px; }
.solar-card-item { border-top: 1px solid #d7e3ef; padding-block: 14px; overflow-wrap: anywhere; }

.kunde-contact-list { padding-left: 20px; overflow-wrap: anywhere; }
.kunde-contact-list li + li { margin-top: 12px; }

/* CRM package 2: customer metrics */
.commercial-summary { margin: 1rem 0 1.5rem; padding: 1rem; border: 1px solid #dbe5ec; border-radius: 12px; background: #f8fbfd; min-width: 0; }
.commercial-summary .financial-panel-heading { flex-wrap: wrap; gap: .5rem; }
.commercial-summary-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.commercial-summary .financial-kpi { background: white; min-width: 0; }
.commercial-summary small { display: block; font-weight: 400; color: #596b7c; margin-top: .3rem; }
.commercial-summary .table-wrap { max-width: 100%; overflow-x: auto; }
.commercial-summary-table td, .commercial-summary-table th { white-space: nowrap; }
.commercial-summary-table td { font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .commercial-summary-cards { grid-template-columns: 1fr; } .commercial-summary { padding: .7rem; } }

/* CRM assortment analysis 20261027 */
.assortment-analysis { min-width:0; margin:1rem 0 2rem; }
.assortment-analysis h3 { margin-top:1.8rem; }
.assortment-analysis .financial-report-section { padding:1rem 0; }
.assortment-analysis .table-wrap { max-width:100%; overflow-x:auto; }
.assortment-cell { white-space:nowrap; font-variant-numeric:tabular-nums; }
.assortment-cell.is-negative { color:#9a3412; }
.assortment-chart svg { width:100%; min-width:500px; max-height:260px; }
.assortment-chart { overflow-x:auto; margin:1rem 0; }

.assortment-analysis .financial-driver-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); padding:0; }
.assortment-analysis .financial-driver-grid .financial-table { min-width:0; width:100%; }
.financial-report .assortment-analysis .financial-driver-grid .financial-table td { min-width:80px; }
.financial-report .assortment-analysis .financial-driver-grid .financial-table td:first-child { min-width:110px; }
.assortment-analysis > .financial-report-section > p { padding:0 16px; }

/* CRM product group and article detail popups. */
.crm-detail-section { margin: 20px 0; padding: 18px; border: 1px solid #dce6ee; border-radius: 14px; background: #fff; }
.crm-detail-section h3 { margin: 0 0 8px; color: #005e9e; }
.crm-detail-section .actions-row { margin-top: 12px; flex-wrap: wrap; }
.crm-detail-link-hint { display: block; font-weight: 500; margin-top: 5px; color: #087f75; }
.assortment-analysis .financial-article-link { text-align: left; padding: 7px 4px; }
.assortment-analysis .financial-article-link:hover { background: #edf4fa; border-radius: 8px; }
.assortment-analysis .financial-article-link .financial-booking-description { color: #253e50; }
.crm-products-dialog { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #cddfec; border-radius: 20px; color: #26384b; box-shadow: 0 24px 70px #132d4a44; }
.crm-products-dialog::backdrop { background: #102d4b88; }
.crm-products-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px; background: #edf4fa; }
.crm-products-dialog h2 { margin: 6px 0; color: #005e9e; }
.crm-products-dialog header p { margin: 0; }
.crm-products-body { padding: 20px; }
.crm-products-list { padding: 0; margin: 14px 0; list-style: none; }
.crm-products-list li { border-bottom: 1px solid #dce6ee; }
.crm-product-link { display: grid; gap: 5px; width: 100%; padding: 14px 10px; border: 0; text-align: left; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.crm-product-link strong { color: #005e9e; }
.crm-product-link small { color: #087f75; }
.crm-product-link:hover { background: #edf4fa; }
.crm-product-link:focus-visible, .crm-group-link:focus-visible { outline: 3px solid #70a9e4; outline-offset: 2px; border-radius: 6px; }
@media(max-width:650px) { .crm-detail-section { padding: 12px; } .crm-products-dialog > header, .crm-products-body { padding: 16px; } }

.crm-group-sort { display: inline-flex; align-items: center; gap: 6px; padding: 8px 3px; border: 0; border-radius: 5px; background: transparent; color: inherit; font: inherit; font-weight: 700; text-align: left; white-space: nowrap; cursor: pointer; }
.crm-group-sort:hover { background: #dceaf6; }
.crm-group-sort:focus-visible { outline: 3px solid #70a9e4; outline-offset: 2px; }
.crm-group-sort [data-sort-arrow] { color: #648196; }
[data-group-sort-table] th[aria-sort="ascending"], [data-group-sort-table] th[aria-sort="descending"] { background: #d8eaf8; color: #005e9e; }
[data-group-sort-table] th[aria-sort="ascending"] [data-sort-arrow], [data-group-sort-table] th[aria-sort="descending"] [data-sort-arrow] { color: #005e9e; }

.crm-group-history { padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid #dce6ee; }
.crm-group-history h3 { color: #005e9e; margin-top: 0; }
.crm-group-year-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 14px 0; }
.crm-group-year-cards article { padding: 12px; border: 1px solid #dce6ee; border-top: 3px solid var(--year-color); border-radius: 10px; background: #f8fafc; }
.crm-group-year-cards h4 { color: var(--year-color); margin: 0 0 8px; }
.crm-group-year-cards strong { display: block; font-size: 17px; overflow-wrap: anywhere; }
.crm-group-year-cards small { display: block; margin-top: 6px; color: #64748b; }
.crm-group-year-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; font-weight: 700; }
.crm-group-history svg { width: 100%; height: auto; display: block; margin-top: 12px; }
.crm-group-history svg text { fill: #64748b; font: 12px sans-serif; }
.crm-group-history-currency + .crm-group-history-currency { margin-top: 24px; }
@media(max-width:550px) { .crm-group-year-cards { grid-template-columns: 1fr; } }

/* CRM assortment controls share the existing visual language. */
.crm-analysis-controls { display:flex; flex-wrap:wrap; gap:14px; padding:16px; margin:12px 0 20px; border:1px solid #d7e4ec; border-radius:12px; background:#f4f8fb; }
.crm-analysis-controls label { display:flex; flex-direction:column; gap:6px; min-width:160px; flex:1; font-weight:600; color:#334155; }
.crm-analysis-controls select { width:100%; min-height:42px; padding:9px 34px 9px 12px; border:1px solid #b7cbd9; border-radius:8px; background-color:white; color:#0f172a; font:inherit; }
.crm-analysis-controls select:focus-visible { outline:3px solid #8dc7ee; outline-offset:2px; }

.financial-invoice-dialog {
  width: min(900px, calc(100% - 24px));
  padding: clamp(16px, 4vw, 38px);
  border-top: 4px solid var(--accent, #12649a);
  background: #fff;
  box-shadow: 0 18px 64px #102b3d38;
}
.financial-invoice-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.financial-invoice-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.financial-invoice-header h3 {
  font-size: clamp(27px, 4vw, 42px);
  line-height: 1.1;
}
.financial-invoice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin: 22px 0 26px;
  padding: 14px 16px;
  border-radius: 6px;
  background: #f0f5f8;
}
.financial-invoice-meta dt, .financial-invoice-lines-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.financial-invoice-meta dd {
  margin: 3px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.financial-invoice-meta > div { min-width: 0; }
.financial-invoice-lines-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0 0 10px;
  font-size: 15px;
}
.financial-invoice-dialog .financial-line-table-wrap {
  container-type: inline-size;
  max-height: none;
}
.financial-invoice-dialog .financial-line-table th {
  background: #e6eef4;
  color: var(--ink);
}
.financial-invoice-dialog .financial-line-table tbody tr:nth-child(even) { background: #f8fafc; }
.financial-invoice-cancelled { color: #9a412b; }
.financial-invoice-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}
.financial-invoice-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 24px;
  padding: 12px 16px;
  border-radius: 6px;
  background: #e6eef4;
}
.financial-invoice-total strong { font-size: 19px; font-variant-numeric: tabular-nums; }
