:root {
  --green: #07823f;
  --green-dark: #006632;
  --green-soft: #e8f5ed;
  --ink: #111820;
  --muted: #607085;
  --line: #dce2e7;
  --surface: #ffffff;
  --page: #f7f8f9;
  --shadow: 0 3px 13px rgba(26, 37, 47, 0.09);
  --type-page-title: 30px;
  --type-section-title: 18px;
  --type-card-title: 15px;
  --type-body: 13px;
  --type-table: 12px;
  --type-table-header: 11px;
  --type-label: 12px;
  --type-control: 13px;
  --type-helper: 11px;
  --type-badge: 10.5px;
  --type-button: 12px;
  --type-tab: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 1120px;
  color: var(--ink);
  background: var(--page);
  font-family: "Inter", Arial, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  width: 250px;
  overflow: hidden;
  color: #fff;
  background: #001713;
}

.sidebar-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(0, 16, 13, .78) 0%, rgba(1, 35, 29, .54) 43%, rgba(0, 19, 16, .72) 100%),
    linear-gradient(90deg, rgba(0, 19, 16, .28), rgba(0, 50, 37, .08)),
    url("Assests/Vehicles/suv side.png");
  background-position: center, center, 43% 62%;
  background-size: cover, cover, auto 67%;
  background-repeat: no-repeat;
}
.sidebar-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 15, 12, .55) 0 24%, transparent 43% 78%, rgba(0, 16, 13, .3) 100%),
    radial-gradient(ellipse at 45% 60%, transparent 0 24%, rgba(0, 20, 16, .1) 58%, rgba(0, 12, 10, .36) 100%);
}

.car-silhouette {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 9, 8, .3), transparent 58%, rgba(0, 10, 8, .16));
}

.network-lines {
  position: absolute;
  left: 0;
  right: 0;
  top: 51%;
  height: 1px;
  opacity: .34;
  background: linear-gradient(90deg, transparent 5%, rgba(103, 220, 148, .75) 48%, transparent 95%);
  box-shadow: 0 32px rgba(103, 220, 148, .08), 0 -32px rgba(103, 220, 148, .08);
}

.sidebar::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,.16), transparent 78%); }

.brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 115px;
  padding: 26px 24px 21px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: block;
  width: 40px;
  height: 48px;
  clip-path: polygon(50% 0, 98% 17%, 88% 66%, 50% 100%, 12% 66%, 2% 17%);
  background: #fff;
}

.brand-mark::before { content: ""; position: absolute; inset: 5px; clip-path: inherit; background: #183a33; }
.brand-mark span { position: absolute; z-index: 1; inset: 11px 10px 9px; clip-path: polygon(50% 0, 100% 16%, 81% 70%, 50% 100%, 50% 0); background: #42c87a; }
.brand-copy { display: grid; gap: 2px; line-height: 1.1; }
.brand-copy strong { font-size: 21px; letter-spacing: .1px; }
.brand-copy small { font-size: 8.5px; color: rgba(255,255,255,.76); letter-spacing: .18px; }

.nav-list { position: relative; z-index: 2; display: grid; gap: 8px; padding: 6px 13px; }
.nav-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  min-height: 75px;
  padding: 13px 15px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.nav-item:hover { background: rgba(255,255,255,.09); }
.nav-item.active { background: linear-gradient(118deg, rgba(5,132,61,.94), rgba(38,154,80,.85)); box-shadow: 0 7px 18px rgba(0, 90, 47, .22); }
.nav-item svg { grid-row: 1 / 3; width: 25px; height: 25px; stroke-width: 1.8; }
.nav-label { font-size: 16px; font-weight: 600; }
.nav-description { align-self: start; margin-top: 5px; color: rgba(255,255,255,.88); font-size: 11.5px; }

.main-content { grid-column: 2; padding: 32px 28px 68px 34px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin: 0 0 42px; padding: 0 0 0 3px; }
.page-header h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.1; letter-spacing: -.8px; }
.page-header p { margin: 0; font-size: 15px; }
.primary-button {
  min-height: 46px;
  padding: 0 25px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(#078743, #007638);
  box-shadow: 0 4px 10px rgba(0,118,56,.14);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.primary-button span { margin-right: 8px; font-size: 25px; font-weight: 300; vertical-align: -2px; }
.primary-button:hover { filter: brightness(.95); }

.metrics-card, .data-card { border: 1px solid #dde2e5; border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); }
.metrics-card { display: flex; align-items: stretch; min-height: 90px; margin-bottom: 20px; padding: 22px 0; }
.metrics-card h2 { display: grid; place-items: center; width: 102px; margin: 0; border-right: 1px solid var(--line); font-size: 20px; }
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); flex: 1; }
.metric { display: grid; grid-template-columns: 45px auto; grid-template-rows: auto auto; align-content: center; justify-content: center; min-width: 0; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.booking-dashboard-alert { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; margin: -5px 0 20px; padding: 11px 18px; border: 1px solid #cfe2d6; border-radius: 8px; background: #f1f8f4; }
.booking-dashboard-alert div { display: grid; gap: 3px; }
.booking-dashboard-alert span { color: #5f6d81; font-size: var(--type-helper); }
.booking-dashboard-alert strong { color: #08723a; font-size: var(--type-card-title); }
.booking-dashboard-alert strong b { font-size: 18px; }
.booking-dashboard-alert .outline-button { min-height: 36px; padding-inline: 15px; }
.metric svg { grid-row: 1 / 3; align-self: center; width: 34px; height: 34px; margin-right: 10px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.metric-value { font-size: 22px; font-weight: 700; line-height: 1; }
.metric-label { margin-top: 8px; font-size: 11.5px; white-space: nowrap; }
.metric.green { color: #05803f; } .metric.orange { color: #ff6200; } .metric.blue { color: #075fd7; }
.metric .metric-value, .metric .metric-label { color: var(--ink); }

.data-card { margin-top: 20px; overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.card-title { display: flex; align-items: center; gap: 16px; }
.card-title h2 { margin: 0; font-size: 19px; letter-spacing: -.25px; }
.title-icon { display: block; position: relative; width: 23px; height: 25px; color: var(--green); }
.flag-icon { border-left: 2px solid #ff1b1b; }
.flag-icon::before { content: ""; position: absolute; top: 1px; left: 0; width: 18px; height: 11px; border: 2px solid #ff1b1b; border-left: 0; border-radius: 0 2px 2px 0; }
.calendar-title-icon { border: 2px solid var(--green); border-radius: 3px; }
.calendar-title-icon::before { content: ""; position: absolute; left: -2px; right: -2px; top: 5px; border-top: 2px solid var(--green); }
.calendar-title-icon::after { content: ""; position: absolute; width: 3px; height: 3px; left: 5px; top: 11px; background: var(--green); box-shadow: 7px 0 var(--green), 0 6px var(--green), 7px 6px var(--green); }
.text-button { padding: 9px; border: 0; color: #007335; background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { height: 36px; padding: 0 8px; color: #26313e; background: #fbfcfc; font-size: 10.5px; font-weight: 500; text-align: left; }
td { height: 66px; padding: 8px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr { cursor: pointer; transition: background .15s ease; }
tbody tr:hover { background: #f8fbf9; }
.priority-table th:nth-child(1) { width: 72px; } .priority-table th:nth-child(2) { width: 132px; } .priority-table th:nth-child(3) { width: 154px; }
.priority-table th:nth-child(4) { width: 184px; } .priority-table th:nth-child(5) { width: 151px; } .priority-table th:nth-child(6) { width: 104px; }
.priority-table th:nth-child(7) { width: 112px; } .priority-table th:nth-child(8) { width: 167px; } .priority-table th:nth-child(9) { width: 34px; }
.vehicle-thumb { width: 50px; height: 48px; overflow: hidden; border-radius: 5px; background: linear-gradient(145deg, #8f9996, #27332f); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.vehicle-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.primary-line { display: block; color: #111820; font-size: 12px; font-weight: 500; line-height: 1.35; white-space: nowrap; }
.secondary-line { display: block; margin-top: 4px; color: #657286; font-size: 11.5px; white-space: nowrap; }
.plate { display: inline-block; margin-top: 5px; padding: 2px 5px; border-radius: 2px; background: #f0f1f3; color: #4e5968; font-size: 10px; }
.badge { display: inline-block; padding: 5px 8px; border-radius: 4px; font-size: 10.5px; font-weight: 500; white-space: nowrap; }
.badge.waiting { color: #fb5b00; background: #fff0e5; } .badge.draft { color: #0560dc; background: #eaf2ff; }
.badge.submitted, .badge.scheduled { color: #047037; background: #e6f3eb; } .badge.high { color: #f01212; background: #fde8e8; }
.badge.medium { color: #ff7a00; background: #fff1df; }
.waiting-time { font-size: 12px; font-weight: 500; white-space: nowrap; }
.waiting-time.urgent { color: #f40000; } .waiting-time.warning { color: #f05a00; }
.chevron { display: inline-block; width: 9px; height: 9px; border-top: 1.5px solid #45556c; border-right: 1.5px solid #45556c; transform: rotate(45deg); }

.upcoming-card { margin-top: 18px; }
.upcoming-table th:nth-child(1) { width: 167px; } .upcoming-table th:nth-child(2) { width: 130px; } .upcoming-table th:nth-child(3) { width: 190px; }
.upcoming-table th:nth-child(4) { width: 225px; } .upcoming-table th:nth-child(5) { width: 210px; } .upcoming-table th:nth-child(6) { width: 142px; } .upcoming-table th:nth-child(7) { width: 32px; }
.upcoming-table td { height: 55px; padding-top: 5px; padding-bottom: 5px; }
.date-cell { display: flex; align-items: center; gap: 12px; }
.date-box { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 4px; background: #f4f5f6; line-height: 1; }
.date-box small { padding-top: 5px; font-size: 8px; font-weight: 600; } .date-box strong { padding-bottom: 4px; font-size: 19px; }
.day-badge { min-width: 50px; padding: 8px 10px; border-radius: 4px; background: #f4f5f6; font-size: 10px; text-align: center; }
.day-badge.green { color: #05763a; background: #edf6f0; }
.location { display: grid; grid-template-columns: 17px 1fr; }
.pin { position: relative; width: 12px; height: 15px; margin-top: 1px; border: 2px solid #17202a; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.pin::after { content: ""; position: absolute; width: 3px; height: 3px; left: 2.5px; top: 2.5px; border: 1px solid #17202a; border-radius: 50%; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(3, 14, 11, .55); backdrop-filter: blur(3px); }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: 430px; padding: 30px; border-radius: 12px; background: #fff; box-shadow: 0 22px 65px rgba(0,0,0,.24); }
.modal h2 { margin: 7px 0; font-size: 24px; } .modal p { margin: 0 0 22px; color: var(--muted); }
.modal-kicker { color: var(--green); font-weight: 700; letter-spacing: 1.2px; }
.modal-close { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; font-size: 27px; cursor: pointer; }
.modal form { display: grid; gap: 15px; }
.modal label { display: grid; gap: 7px; font-size: 12px; font-weight: 600; }
.modal input, .modal select, .modal textarea { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #cfd7dd; border-radius: 6px; outline: none; font: inherit; }
.modal textarea { min-height: 74px; padding-block: 10px; resize: vertical; }
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(7,130,63,.1); }
.quote-request-modal { width: min(760px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; }
.quote-request-case-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 15px; padding: 13px; border: 1px solid #dfe5e8; border-radius: 7px; background: #f7f9f9; }
.quote-request-case-summary div { display: grid; gap: 3px; }
.quote-request-case-summary span { color: #718095; font-size: var(--type-helper); }
.quote-request-case-summary strong { color: #263347; font-size: var(--type-body); font-weight: 600; }
.quote-request-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.quote-request-wide { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 7px; }
.secondary-button { min-height: 46px; padding: 0 20px; border: 1px solid #ced6dc; border-radius: 7px; background: #fff; cursor: pointer; }
.toast { position: fixed; z-index: 30; right: 24px; bottom: 24px; max-width: 360px; padding: 13px 17px; border-radius: 7px; color: #fff; background: #17241f; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }

/* Inspections and New Inspection reuse the locked application shell. */
.app-view[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.list-page-header { margin: 0 0 34px 3px; }
.list-page-header h1, .form-page-header h1 { margin: 0 0 9px; font-size: 30px; line-height: 1.1; letter-spacing: -.8px; }
.list-page-header p { margin: 0; font-size: 15px; }

.inspection-toolbar { display: grid; grid-template-columns: minmax(320px, 1.55fr) minmax(190px, .8fr) minmax(180px, .75fr) auto; gap: 16px; align-items: stretch; margin-bottom: 25px; }
.inspection-toolbar input, .inspection-toolbar select { border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-control, .filter-control { display: flex; align-items: center; min-height: 58px; border: 1px solid #cfd8de; border-radius: 8px; background: #fff; }
.search-control { position: relative; padding: 0 17px 0 52px; }
.search-control input { width: 100%; font-size: 13px; }
.search-control input::placeholder { color: #6f7b8d; opacity: 1; }
.search-icon { position: absolute; left: 20px; top: 18px; width: 18px; height: 18px; border: 2px solid #253349; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 7px; border-top: 2px solid #253349; right: -5px; bottom: -3px; transform: rotate(48deg); }
.filter-control { position: relative; gap: 18px; padding: 0 16px; }
.filter-control > span:first-child { font-size: 12px; }
.filter-control select { flex: 1; min-width: 0; appearance: none; font-size: 13px; cursor: pointer; }
.filter-control::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid #172236; border-bottom: 1.5px solid #172236; transform: rotate(45deg) translateY(-2px); }
.filter-control:has(.filter-calendar)::after { display: none; }
.filter-calendar { position: relative; width: 17px; height: 17px; margin-left: auto; border: 1.5px solid #26344a; border-radius: 2px; }
.filter-calendar::before { content: ""; position: absolute; left: -1.5px; right: -1.5px; top: 4px; border-top: 1.5px solid #26344a; }
.inspection-new-button { min-height: 58px; padding-inline: 23px; white-space: nowrap; }

.inspection-list-card { overflow: hidden; border: 1px solid #d7dde2; border-radius: 9px; background: #fff; box-shadow: 0 2px 9px rgba(26, 37, 47, .05); }
.booking-request-table { min-width: 1240px; table-layout: auto; }
.booking-request-table th, .booking-request-table td { padding-inline: 12px; }
.booking-request-table td { height: 72px; }
.booking-request-table button { min-height: 34px; padding: 0 12px; border: 1px solid #07823f; border-radius: 5px; color: #08723a; background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.booking-detail-card { padding: 20px; border: 1px solid #d7dde2; border-radius: 9px; background: #fff; box-shadow: 0 2px 9px rgba(26, 37, 47, .05); }
.booking-detail-card[hidden], .booking-decline-form[hidden], #bookingOtherReason[hidden] { display: none; }
.booking-detail-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 15px; border-bottom: 1px solid #e2e7ea; }
.booking-detail-card header h2 { margin: 0 0 5px; font-size: var(--type-section-title); }
.booking-detail-card header p { margin: 0; color: #657287; }
.booking-detail-card .back-link { margin-bottom: 14px; }
.booking-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 22px; padding: 17px 0; }
.booking-detail-grid div { display: grid; gap: 5px; padding: 10px 0; border-bottom: 1px solid #e5e9ec; }
.booking-detail-grid span { color: #718095; font-size: var(--type-helper); }
.booking-detail-grid strong { color: #263347; font-size: var(--type-body); }
.booking-detail-actions { display: flex; gap: 10px; justify-content: flex-end; }
.booking-detail-actions .primary-button, .booking-detail-actions .outline-button { min-height: 40px; }
.booking-decline-button { color: #c91d2e; border-color: #e6aeb5; }
.booking-decline-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 17px; padding: 16px; border: 1px solid #edcbd0; border-radius: 7px; background: #fff8f9; }
.booking-decline-form label { display: grid; gap: 6px; color: #344154; font-weight: 600; }
.booking-decline-form select, .booking-decline-form input { min-height: 40px; padding: 0 10px; border: 1px solid #cfd8de; border-radius: 5px; background: #fff; font: inherit; }
.booking-decline-form > div { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 9px; }
.booking-decline-form .outline-button, .booking-decline-form .primary-button { min-height: 38px; }
.inspection-list-table th { height: 68px; padding: 0 22px; background: #fff; font-size: 12px; font-weight: 600; }
.inspection-list-table td { height: 91px; padding: 12px 22px; font-size: 12.5px; }
.inspection-list-table th:nth-child(1) { width: 16%; } .inspection-list-table th:nth-child(2) { width: 18%; } .inspection-list-table th:nth-child(3) { width: 19%; }
.inspection-list-table th:nth-child(4) { width: 18%; } .inspection-list-table th:nth-child(5) { width: 17%; } .inspection-list-table th:nth-child(6) { width: 12%; }
.case-link { color: #007239; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.inspection-date { display: grid; gap: 7px; }
.inspection-date span:last-child { color: #5e6c80; }
.inspection-list-table .badge { padding: 7px 10px; font-size: 11px; border: 1px solid transparent; }
.badge.in-inspection { color: #075fc8; background: #eaf3ff; border-color: #d4e5fa; }
.badge.completed, .badge.low { color: #076436; background: #e7f4ec; border-color: #d5eadf; }
.badge.overdue { color: #c91d2e; background: #fdecef; border-color: #f2ccd1; }
.badge.neutral { color: #59677a; background: #eef1f3; border-color: #dde3e7; }
.pagination-bar { display: flex; align-items: center; justify-content: space-between; min-height: 78px; padding: 0 22px; border-top: 1px solid var(--line); color: #667287; }
.pagination { display: flex; align-items: center; gap: 14px; }
.pagination button { display: grid; place-items: center; width: 37px; height: 37px; border: 0; border-radius: 5px; background: transparent; font-size: 24px; cursor: pointer; }
.pagination button:disabled { color: #263248; opacity: 1; cursor: default; }
.pagination .current-page { color: #fff; background: linear-gradient(#078743, #006f35); font-size: 14px; }
.empty-table-row td { height: 110px; color: var(--muted); text-align: center; }

.form-page-header { margin: -3px 0 26px 3px; }
.form-page-header nav { display: flex; align-items: center; gap: 12px; color: #667287; }
.form-page-header nav button { padding: 0; border: 0; color: #536177; background: transparent; cursor: pointer; }
.form-page-header nav strong { color: #334155; font-weight: 500; }
.new-inspection-card { padding: 25px 22px 26px; border: 1px solid #d7dde2; border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.form-section { margin-bottom: 28px; }
.form-section-title { display: flex; align-items: center; gap: 13px; margin-bottom: 21px; }
.form-section-title h2 { margin: 0; font-size: 16px; letter-spacing: -.15px; }
.form-section-icon { position: relative; display: block; width: 21px; height: 21px; color: var(--green); }
.document-icon { border: 1.8px solid currentColor; border-radius: 2px; }
.document-icon::before { content: ""; position: absolute; left: 5px; right: 5px; top: 6px; height: 5px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
.document-icon::after { content: "✓"; position: absolute; right: 1px; bottom: -4px; font-size: 11px; font-weight: 700; }
.customer-icon { border: 1.8px solid currentColor; border-radius: 50%; }
.customer-icon::before { content: ""; position: absolute; width: 6px; height: 6px; left: 5.5px; top: 3px; border: 1.5px solid currentColor; border-radius: 50%; }
.customer-icon::after { content: ""; position: absolute; width: 10px; height: 5px; left: 3.5px; bottom: 3px; border: 1.5px solid currentColor; border-radius: 8px 8px 4px 4px; }
.vehicle-icon { width: 23px; height: 13px; margin-top: 5px; border: 1.8px solid currentColor; border-radius: 3px; }
.vehicle-icon::before { content: ""; position: absolute; left: 3px; right: 3px; top: -7px; height: 8px; border: 1.8px solid currentColor; border-bottom: 0; border-radius: 6px 6px 0 0; }
.vehicle-icon::after { content: ""; position: absolute; left: 3px; bottom: -4px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; box-shadow: 13px 0 currentColor; }
.form-grid { display: grid; gap: 19px 32px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.new-inspection-card label { display: block; color: #263247; font-size: 11px; font-weight: 600; }
.new-inspection-card label em { color: #f20d19; font-style: normal; }
.new-inspection-card .optional { font-weight: 500; }
.new-inspection-card input:not([type="checkbox"]), .new-inspection-card select, .new-inspection-card textarea { width: 100%; border: 1px solid #cfd8de; border-radius: 5px; color: #1d2837; background: #fff; outline: 0; }
.new-inspection-card label > input:not([type="checkbox"]), .new-inspection-card label > select, .new-inspection-card label > textarea, .new-inspection-card label > .mileage-control { margin-top: 8px; }
.new-inspection-card input:not([type="checkbox"]), .new-inspection-card select { height: 38px; padding: 0 11px; }
.new-inspection-card select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #506078 50%), linear-gradient(135deg, #506078 50%, transparent 50%); background-position: calc(100% - 15px) 16px, calc(100% - 11px) 16px; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }
.new-inspection-card input:focus, .new-inspection-card select:focus, .new-inspection-card textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(7,130,63,.08); }
.mileage-control { display: grid; grid-template-columns: 1.15fr .85fr; gap: 13px; }
.custom-vehicle-row { display: grid; grid-template-columns: .95fr 1fr 1fr; gap: 32px; align-items: end; margin-top: 21px; padding: 20px; border-radius: 6px; background: #f8f9f9; }
.custom-vehicle-toggle { align-self: center; }
.custom-vehicle-toggle label { display: flex; grid-auto-flow: column; justify-content: start; align-items: center; gap: 9px; }
.custom-vehicle-toggle input { width: 17px; height: 17px; accent-color: var(--green); }
.custom-vehicle-toggle p { margin: 10px 0 0 26px; color: #8290a2; font-size: 11px; }
.new-inspection-card input:disabled { color: #aab2bd; background: #f5f6f7; cursor: not-allowed; }
.new-inspection-card input:disabled::placeholder { color: #b9c1ca; }
.notes-section { position: relative; margin-bottom: 25px; }
.new-inspection-card textarea { min-height: 80px; padding: 11px; resize: vertical; font-family: inherit; }
.character-count { position: absolute; right: 5px; bottom: -17px; color: #6c798c; font-size: 10.5px; }
.new-inspection-actions { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; }
.new-inspection-actions > div { display: flex; gap: 15px; }
.outline-button { min-height: 43px; padding: 0 26px; border: 1px solid var(--green); border-radius: 6px; color: #067339; background: #fff; font-weight: 600; cursor: pointer; }
.new-inspection-actions .primary-button { min-height: 43px; }

/* Case Overview and Inspection */
.case-header { padding: 1px 3px 24px; border-bottom: 1px solid var(--line); }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; padding: 0; border: 0; color: #05743a; background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; }
.back-link span { font-size: 20px; font-weight: 400; }
.case-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.case-title-line { display: flex; align-items: center; gap: 20px; }
.case-title-line h1 { margin: 0; font-size: 31px; letter-spacing: .3px; }
.case-title-line .badge { padding: 9px 15px; font-size: 12px; }
.case-meta { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: #657287; font-size: 11.5px; }
.case-meta strong { color: #4e5b70; font-weight: 500; }
.meta-divider { margin: 0 9px; }
.case-calendar-icon { position: relative; width: 17px; height: 17px; margin-right: 1px; border: 1.5px solid #405169; border-radius: 2px; }
.case-calendar-icon::before { content: ""; position: absolute; left: -1.5px; right: -1.5px; top: 4px; border-top: 1.5px solid #405169; }
.requesting-company { margin: 10px 0 0 28px; color: #68768a; font-size: 10.5px; }
.case-priority-control { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0 28px; color: #68768a; font-size: 10.5px; font-weight: 600; }
.case-priority-control select, .internal-priority-select { min-height: 32px; padding: 0 28px 0 9px; border: 1px solid #d7dee3; border-radius: 5px; color: #26313e; background: #fff; font: inherit; font-size: 11px; cursor: pointer; }
.badge.urgent { color: #c91d2e; background: #fdecef; border-color: #f2ccd1; }
.edit-case-button { min-width: 190px; }
.pencil-icon { display: inline-block; width: 12px; height: 12px; margin: 0 10px 0 0 !important; border: 1.5px solid currentColor; transform: rotate(-45deg); }

.case-tabs { display: grid; grid-template-columns: repeat(6, 1fr); min-height: 64px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.case-tabs button { position: relative; border: 0; color: #344154; background: transparent; font-size: 12px; font-weight: 500; cursor: pointer; }
.case-tabs button::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -1px; height: 2px; background: transparent; }
.case-tabs button.active { color: #07743a; font-weight: 600; }
.case-tabs button.active::after { background: #07823f; }
.case-panel[hidden] { display: none; }

.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.overview-card, .vehicle-history-card { padding: 18px 21px; border: 1px solid #d8dfe4; border-radius: 9px; background: #fff; box-shadow: 0 2px 9px rgba(26, 37, 47, .045); }
.overview-card-title { display: flex; align-items: center; gap: 14px; margin-bottom: 13px; }
.overview-card-title h2, .vehicle-history-card h2 { margin: 0; font-size: 15px; }
.section-edit-button { margin-left: auto; padding: 5px 8px; border: 0; border-radius: 4px; color: #08743b; background: transparent; font: inherit; font-size: 10.5px; font-weight: 600; cursor: pointer; }
.section-edit-button:hover { background: #edf6f0; }
.overview-icon { position: relative; display: block; width: 36px; height: 36px; border-radius: 7px; color: #08743b; background: #e4f4ea; }
.person-overview-icon::before { content: ""; position: absolute; width: 8px; height: 8px; left: 13px; top: 7px; border: 1.5px solid currentColor; border-radius: 50%; }
.person-overview-icon::after { content: ""; position: absolute; left: 9px; bottom: 7px; width: 16px; height: 9px; border: 1.5px solid currentColor; border-radius: 12px 12px 3px 3px; }
.vehicle-overview-icon::before { content: ""; position: absolute; left: 7px; right: 7px; top: 12px; height: 10px; border: 1.5px solid currentColor; border-radius: 3px; }
.vehicle-overview-icon::after { content: ""; position: absolute; left: 11px; bottom: 8px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; box-shadow: 10px 0 currentColor; }
.claim-overview-icon::before { content: ""; position: absolute; inset: 7px 9px; border: 1.5px solid currentColor; border-radius: 2px; }
.claim-overview-icon::after { content: ""; position: absolute; left: 13px; top: 12px; width: 8px; height: 7px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
.notes-overview-icon::before { content: ""; position: absolute; inset: 8px 7px 10px; border: 1.5px solid currentColor; border-radius: 3px; }
.notes-overview-icon::after { content: ""; position: absolute; left: 12px; right: 12px; top: 14px; border-top: 1.5px solid currentColor; box-shadow: 0 4px currentColor; }
.valuation-overview-icon::before { content: "XCG"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 9px; font-weight: 700; }
.overview-card dl { margin: 0; }
.overview-card dl > div { display: grid; grid-template-columns: 43% 57%; min-height: 31px; align-items: center; border-bottom: 1px solid #e5e9ec; }
.overview-card dl > div:last-child { border-bottom: 0; }
.overview-card dt, .overview-card dd { margin: 0; color: #425067; font-size: 11px; }
.overview-card dd { color: #263247; }
.valuation-overview-card .valuation-calculated { background: #f3f8f5; }
.valuation-overview-card .valuation-adjusted { background: #e8f5ed; }
.valuation-overview-card .valuation-calculated dt, .valuation-overview-card .valuation-adjusted dt { padding-left: 7px; color: #08743b; font-weight: 600; }
.overview-section-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 13px; }
.overview-section-form[hidden] { display: none; }
.overview-section-form label { display: grid; gap: 6px; color: #425067; font-size: 10.5px; font-weight: 600; }
.overview-section-form label:has(textarea) { grid-column: 1 / -1; }
.overview-section-form input, .overview-section-form textarea { width: 100%; min-height: 36px; padding: 8px 9px; border: 1px solid #cfd8de; border-radius: 5px; color: #263247; background: #fff; font: inherit; font-size: 11px; outline: none; }
.overview-section-form textarea { min-height: 72px; resize: vertical; }
.overview-section-form input:focus, .overview-section-form textarea:focus { border-color: #07823f; box-shadow: 0 0 0 3px rgba(7,130,63,.08); }
.overview-readonly-field { display: grid; gap: 4px; padding: 8px 9px; border-radius: 5px; background: #f5f7f8; }
.overview-readonly-field span { color: #758196; font-size: 9.5px; }
.overview-readonly-field strong { color: #46536a; font-size: 10.5px; font-weight: 500; }
.overview-form-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.overview-form-actions .outline-button, .overview-form-actions .primary-button { min-height: 34px; padding: 0 14px; font-size: 10.5px; }
.notes-overview-card p { margin: 0 0 8px; color: #273348; font-size: 11.5px; line-height: 1.55; }
.notes-overview-card small { display: block; margin-top: 21px; color: #7b8798; font-size: 10.5px; }
.vehicle-history-card { margin-top: 18px; padding-top: 15px; padding-bottom: 13px; }
.vehicle-history-card > div { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.vehicle-history-card .badge { padding: 5px 8px; }
.vehicle-history-card p { display: grid; grid-template-columns: 145px 1fr 1.4fr; margin: 0; padding: 7px 0; border-top: 1px solid #e8ebee; color: #59677a; font-size: 10.5px; }
.vehicle-history-card p strong { color: #08723a; }

.inspection-panel { margin-top: 2px; }
.inspection-workspace { display: grid; grid-template-columns: minmax(270px, .92fr) minmax(250px, .78fr) minmax(420px, 1.3fr); gap: 14px; align-items: start; }
.inspection-column { border: 1px solid #d8dfe4; border-radius: 7px; background: #fff; box-shadow: 0 1px 6px rgba(26, 37, 47, .035); }
.diagram-column, .damage-form-column { padding: 18px 15px; }
.inspection-column h2 { margin: 0 0 9px; font-size: 13px; }
.inspection-column > p { margin: 0 0 13px; color: #657287; font-size: 10.5px; }
.diagram-column select, .damage-form-column input, .damage-form-column select, .damage-form-column textarea { width: 100%; border: 1px solid #cfd8de; border-radius: 5px; color: #1f2b3b; background: #fff; outline: 0; }
.diagram-column select, .damage-form-column input, .damage-form-column select { height: 38px; padding: 0 10px; }
.diagram-column select { border-color: #07823f; }
.inspection-section-divider { margin: 16px 0; border-top: 1px solid #e3e7ea; }
.vehicle-diagram-wrap { display: flex; justify-content: center; margin: 11px 0 8px; }
.vehicle-diagram-wrap img { display: block; width: 100%; max-width: 270px; height: auto; }
.diagram-helper { display: flex; align-items: center; gap: 10px; margin-top: 9px; padding: 12px 13px; border: 1px solid #dce6eb; border-radius: 5px; color: #31425a; background: #f3f8fa; font-size: 10.5px; line-height: 1.45; }
.diagram-helper span { font-size: 19px; }

.damage-form-column form { position: relative; display: grid; gap: 14px; }
.damage-form-column label { display: block; color: #273347; font-size: 10.5px; font-weight: 600; }
.damage-form-column label > input, .damage-form-column label > select, .damage-form-column label > textarea { margin-top: 8px; }
.selected-area-heading { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
.selected-area-heading button { height: 38px; border: 0; color: #08753c; background: transparent; font-size: 10px; font-weight: 600; cursor: pointer; }
.damage-form-column textarea { min-height: 72px; padding: 10px; resize: vertical; font-family: inherit; }
.damage-form-column fieldset { display: flex; gap: 20px; margin: 0; padding: 0; border: 0; }
.damage-form-column fieldset legend { margin-bottom: 10px; color: #273347; font-size: 10.5px; font-weight: 600; }
.damage-form-column fieldset label { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.damage-form-column fieldset input { width: 15px; height: 15px; accent-color: var(--green); }
.damage-notes-count { position: relative; z-index: 1; justify-self: end; margin: -37px 6px 15px 0; color: #637186; font-size: 9px; pointer-events: none; }
.photo-label span { font-weight: 400; }
.damage-photos { display: flex; gap: 10px; }
.damage-photo-preview, .add-photo-button { width: 80px; height: 78px; overflow: hidden; border-radius: 5px; }
.damage-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.add-photo-button { display: grid; place-items: center; align-content: center; gap: 5px; border: 1px dashed #bcc8d1; color: #334259; background: #fff; font-size: 10px; cursor: pointer; }
.add-photo-button strong { font-size: 18px; font-weight: 400; }
.save-damage-button { width: 100%; min-height: 41px; margin-top: 3px; }
.save-damage-helper { margin: -2px 0 0; color: #69768a; font-size: 9.5px; line-height: 1.45; }

.inspection-results-column { display: grid; gap: 14px; }
.damage-list-card { overflow: hidden; padding: 18px 12px 14px; }
.damage-list-card h2, .damage-list-card > p { padding-left: 3px; }
.damage-table-wrap { overflow-x: auto; border: 1px solid #dbe1e5; border-radius: 5px; }
.damage-table { table-layout: fixed; }
.damage-table th { height: 42px; padding: 0 8px; background: #fbfcfc; font-size: 9px; font-weight: 600; }
.damage-table td { height: 54px; padding: 8px; font-size: 9.3px; }
.damage-table th:nth-child(1) { width: 25%; } .damage-table th:nth-child(2) { width: 21%; } .damage-table th:nth-child(3) { width: 20%; } .damage-table th:nth-child(4) { width: 17%; } .damage-table th:nth-child(5) { width: 17%; }
.damage-area-cell { display: flex; align-items: center; gap: 8px; }
.damage-number { display: grid; place-items: center; flex: 0 0 21px; height: 21px; border-radius: 50%; color: #fff; font-size: 9px; font-weight: 700; }
.damage-number.minor { background: #f6b900; } .damage-number.moderate { background: #f28a00; } .damage-number.severe { background: #df2028; } .damage-number.no-damage { background: #087d3e; }
.severity-label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.severity-dot { width: 7px; height: 7px; border-radius: 50%; }
.severity-dot.minor { background: #f6b900; } .severity-dot.moderate { background: #f28a00; } .severity-dot.severe { background: #df2028; }
.damage-actions { white-space: nowrap; }
.damage-actions button { padding: 3px; border: 0; background: transparent; font-size: 14px; cursor: pointer; }
.damage-actions button:first-child { color: #08743b; } .damage-actions button:last-child { color: #e11d2e; }
.inspection-summary-card { padding: 19px 16px; }
.inspection-summary-card dl { margin: 18px 0 0; }
.inspection-summary-card dl > div { display: grid; grid-template-columns: 1fr 120px; align-items: center; min-height: 43px; }
.inspection-summary-card dt { color: #526075; font-size: 10.5px; }
.inspection-summary-card dd { margin: 0; color: #101820; font-size: 12px; font-weight: 600; }

@media (max-width: 1280px) {
  .inspection-workspace { grid-template-columns: minmax(250px, .9fr) minmax(235px, .78fr) minmax(390px, 1.25fr); }
  .vehicle-diagram-wrap img { max-width: 245px; }
  .damage-table th, .damage-table td { padding-left: 6px; padding-right: 6px; }
}

/* Photos */
.workflow-panel-actions { display: flex; align-items: center; justify-content: space-between; min-height: 52px; margin-top: -6px; }
.workflow-panel-actions > div, .estimates-page-header > div:last-child { display: flex; gap: 12px; }
.workflow-panel-actions .outline-button, .workflow-panel-actions .primary-button { min-height: 39px; }
.photos-workspace { display: grid; grid-template-columns: 235px 1fr; gap: 16px; align-items: start; }
.photo-areas-card, .photos-detail-card { overflow: hidden; border: 1px solid #d8dfe4; border-radius: 7px; background: #fff; box-shadow: 0 1px 6px rgba(26, 37, 47, .035); }
.photo-areas-card header { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 14px; border-bottom: 1px solid #e0e5e8; }
.photo-areas-card h2 { margin: 0; font-size: 13px; }
.photo-areas-card header span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: #076f38; background: #e4f3e9; font-size: 10px; font-weight: 600; }
.photo-areas-card nav { display: grid; }
.photo-areas-card nav button { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 14px; border: 0; border-bottom: 1px solid #e5e9ec; color: #1f2937; background: #fff; text-align: left; cursor: pointer; }
.photo-areas-card nav button:last-child { border-bottom: 0; }
.photo-areas-card nav button.active { padding-left: 12px; border-left: 3px solid #07823f; color: #076f38; background: #e9f6ed; font-weight: 600; }
.photo-areas-card nav strong { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: #f0f2f3; font-size: 9.5px; font-weight: 500; }
.photo-areas-card nav button.active strong { background: #d8eee0; }
.photos-detail-card { padding: 0 10px 10px; }
.photos-detail-header { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 0 7px; }
.photos-detail-header h2 { margin: 0 0 8px; font-size: 14px; }
.photos-detail-header h2 span { display: inline-block; margin-left: 7px; padding: 5px 8px; border-radius: 10px; color: #08723a; background: #e5f3ea; font-size: 9px; font-weight: 600; vertical-align: 2px; }
.photos-detail-header p { margin: 0; color: #526074; font-size: 10.5px; }
.photos-detail-header .outline-button { min-height: 35px; padding-inline: 15px; color: #354258; border-color: #cfd7dd; }
.photo-table-header, .photo-row { display: grid; grid-template-columns: 22% 35% 28% 15%; }
.photo-table-header { min-height: 42px; align-items: center; padding: 0 10px; border: 1px solid #dce2e6; border-radius: 5px 5px 0 0; background: #fbfcfc; font-size: 9.5px; font-weight: 600; }
.photo-row { min-height: 151px; padding: 13px 10px; border: 1px solid #e0e5e8; border-top: 0; }
.photo-row:last-child { border-radius: 0 0 5px 5px; }
.photo-image { position: relative; width: calc(100% - 14px); height: 122px; overflow: hidden; border-radius: 5px; background: #d9dddd; }
.photo-image img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.35); }
.photo-image.photo-1 img { object-position: 45% 54%; } .photo-image.photo-2 img { object-position: 64% 57%; transform: scale(1.75); } .photo-image.photo-3 img { object-position: 72% 72%; transform: scale(2); }
.photo-index { position: absolute; right: 6px; bottom: 5px; padding: 3px 6px; border-radius: 3px; color: #fff; background: rgba(0,0,0,.68); font-size: 8px; }
.photo-details { display: grid; align-content: center; gap: 10px; padding-right: 12px; border-right: 1px solid #e5e9ec; color: #3d4b60; font-size: 9.5px; }
.photo-details p { display: grid; grid-template-columns: 72px 1fr; gap: 5px; margin: 0; }
.photo-details strong { color: #263247; font-weight: 500; }
.related-damage { display: grid; align-content: center; grid-template-columns: 105px 1fr; gap: 12px 4px; padding: 0 12px; border-right: 1px solid #e5e9ec; font-size: 9.5px; }
.related-damage strong { font-weight: 600; }
.photo-actions { display: grid; align-content: center; gap: 10px; padding-left: 12px; }
.photo-actions button { min-height: 36px; border: 1px solid #07823f; border-radius: 5px; color: #08723a; background: #fff; font-size: 9.5px; font-weight: 600; cursor: pointer; }
.photo-actions .delete-photo { color: #e01e2f; border-color: #f03b48; }
.empty-photos { display: grid; place-items: center; min-height: 180px; border: 1px solid #e0e5e8; border-top: 0; color: #687589; font-size: 11px; }
.workflow-step-footer { display: flex; justify-content: space-between; margin-top: 25px; }
.workflow-step-footer .outline-button, .workflow-step-footer .primary-button { min-height: 40px; }

/* Repair Estimates */
.estimates-page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: -3px 0 18px; }
.estimates-page-header h2 { margin: 0 0 7px; font-size: 18px; }
.estimates-page-header p { margin: 0; color: #5f6d81; font-size: 10.5px; }
.estimates-page-header .outline-button, .estimates-page-header .primary-button { min-height: 41px; }
.estimate-source-types { display: flex; gap: 8px; margin-bottom: 13px; }
.estimate-source-types button { padding: 6px 10px; border: 1px solid #d9e0e4; border-radius: 14px; color: #536176; background: #fff; font-family: inherit; font-size: 9px; cursor: pointer; }
.estimate-source-types button.active { color: #08733a; border-color: #b9dbc7; background: #eaf6ee; font-weight: 600; }
.estimate-source-types button:focus-visible { outline: 2px solid #07823f; outline-offset: 2px; }
.estimates-workspace { display: grid; grid-template-columns: minmax(560px, 1.35fr) minmax(330px, .82fr); gap: 18px; align-items: start; }
.estimate-cards { display: grid; gap: 14px; }
.estimate-card, .estimate-summary-card, .quote-visibility-notice { border: 1px solid #d8dfe4; border-radius: 7px; background: #fff; box-shadow: 0 1px 6px rgba(26, 37, 47, .035); }
.estimate-card { overflow: hidden; padding: 15px 13px 12px; }
.estimate-card-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.estimate-source-heading { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 10px; }
.estimate-source-icon { display: grid; place-items: center; grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 7px; color: #08743b; background: #e4f4ea; font-size: 18px; }
.estimate-source-heading h3 { margin: 0; font-size: 13px; }
.estimate-source-heading p { margin: 4px 0 0; color: #657287; font-size: 9.5px; }
.estimate-source-heading .source-badge { display: inline-block; margin-left: 7px; padding: 4px 7px; border-radius: 9px; color: #08723a; background: #e5f3ea; font-size: 8px; vertical-align: 1px; }
.estimate-card-header .outline-button { min-height: 34px; padding-inline: 13px; color: #354258; border-color: #cfd7dd; font-size: 9px; }
.estimate-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; padding: 10px 12px; border-radius: 5px; background: #f7f9f9; }
.estimate-meta div { display: grid; gap: 4px; }
.estimate-meta span { color: #778397; font-size: 8px; }
.estimate-meta strong { color: #2c394c; font-size: 9px; font-weight: 500; }
.estimate-section { margin-top: 11px; }
.estimate-section h4 { margin: 0; padding: 7px 9px; border: 1px solid #dde3e7; border-bottom: 0; border-radius: 4px 4px 0 0; color: #283548; background: #f9fbfb; font-size: 10px; }
.estimate-line-table { table-layout: auto; border: 1px solid #dde3e7; }
.estimate-line-table th { height: 30px; padding: 0 8px; background: #fff; color: #68758a; font-size: 8px; }
.estimate-line-table td { height: 34px; padding: 6px 8px; color: #334155; font-size: 8.5px; }
.estimate-total { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 11px 12px; border-radius: 4px; color: #086e38; background: #eef8f1; font-size: 11px; font-weight: 600; }
.estimate-summary-column { display: grid; gap: 13px; position: sticky; top: 18px; }
.estimate-summary-card { overflow: hidden; padding: 17px 12px 12px; }
.estimate-summary-card h2 { margin: 0 0 6px; font-size: 14px; }
.estimate-summary-card > p { margin: 0 0 15px; color: #657287; font-size: 9.5px; }
.estimate-summary-table-wrap { overflow-x: auto; border: 1px solid #dde3e7; border-radius: 5px; }
.estimate-summary-card table { table-layout: auto; }
.estimate-summary-card th { height: 37px; padding: 0 7px; background: #fbfcfc; font-size: 8px; }
.estimate-summary-card td { height: 48px; padding: 8px 7px; font-size: 8.7px; }
.estimate-summary-card td:first-child { min-width: 108px; color: #08723a; font-weight: 600; }
.estimate-summary-card td:last-child { color: #08723a; font-weight: 700; }
.quote-visibility-notice { display: flex; gap: 10px; padding: 13px; color: #34445b; background: #f3f8fb; }
.quote-visibility-notice > span { display: grid; place-items: center; flex: 0 0 19px; height: 19px; border: 1px solid #1663be; border-radius: 50%; color: #1663be; font-size: 10px; font-weight: 700; }
.quote-visibility-notice p { margin: 0; font-size: 9.5px; line-height: 1.5; }

@media (max-width: 1280px) {
  .photo-row { grid-template-columns: 23% 34% 27% 16%; }
  .photo-details p { grid-template-columns: 60px 1fr; }
  .related-damage { grid-template-columns: 82px 1fr; }
  .estimates-workspace { grid-template-columns: minmax(520px, 1.25fr) minmax(305px, .75fr); }
}

@media (max-width: 1250px) {
  .main-content { padding-left: 24px; padding-right: 22px; }
  .page-header { margin-bottom: 30px; }
  .metric { grid-template-columns: 36px auto; }
  .metric svg { width: 28px; height: 28px; }
}

@media (min-width: 1550px) {
  .app-shell { grid-template-columns: 270px minmax(0, 1fr); }
  .sidebar { width: 270px; }
  .main-content { grid-column: 2; padding-left: 38px; padding-right: 30px; }
}

/* Shared typography scale */
body { font-size: var(--type-body); line-height: 1.45; }
.page-header h1, .list-page-header h1, .form-page-header h1, .case-title-line h1 { font-size: var(--type-page-title); }
.card-title h2, .estimates-page-header h2 { font-size: var(--type-section-title); }
.form-section-title h2, .overview-card-title h2, .vehicle-history-card h2, .inspection-column h2, .photo-areas-card h2, .photos-detail-header h2, .estimate-source-heading h3, .estimate-summary-card h2 { font-size: var(--type-card-title); }
th, .inspection-list-table th, .damage-table th, .estimate-line-table th, .estimate-summary-card th, .photo-table-header { font-size: var(--type-table-header); }
td, .inspection-list-table td, .damage-table td, .estimate-line-table td, .estimate-summary-card td { font-size: var(--type-table); }
.new-inspection-card label, .damage-form-column label, .damage-form-column fieldset legend { font-size: var(--type-label); }
.new-inspection-card input:not([type="checkbox"]), .new-inspection-card select, .new-inspection-card textarea, .diagram-column select, .damage-form-column input, .damage-form-column select, .damage-form-column textarea, .inspection-toolbar input, .inspection-toolbar select { font-size: var(--type-control); }
.secondary-line, .custom-vehicle-toggle p, .requesting-company, .inspection-column > p, .save-damage-helper, .photos-detail-header p, .photo-details, .related-damage, .empty-photos, .estimates-page-header p, .estimate-source-heading p, .estimate-meta span, .estimate-meta strong, .estimate-summary-card > p, .quote-visibility-notice p { font-size: var(--type-helper); }
.badge, .inspection-list-table .badge, .plate, .day-badge, .estimate-source-heading .source-badge, .photo-areas-card header span, .photo-areas-card nav strong, .photos-detail-header h2 span { font-size: var(--type-badge); }
.text-button, .outline-button, .estimate-card-header .outline-button, .photo-actions button, .add-photo-button, .selected-area-heading button { font-size: var(--type-button); }
.case-tabs button { font-size: var(--type-tab); }
.photo-index, .damage-number, .damage-notes-count { font-size: 10px; }
.brand-copy small, .date-box small { font-size: 10px; }
.estimate-source-types button { font-size: 11px; }
.estimate-section h4 { font-size: 12px; }
.estimate-total { font-size: 13px; }
.overview-card dt, .overview-card dd, .notes-overview-card p, .vehicle-history-card p, .inspection-summary-card dt { font-size: 11.5px; }

/* Tablet */
@media (max-width: 1100px) {
  body { min-width: 0; }
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { width: 210px; }
  .brand { padding-inline: 18px; }
  .brand-copy strong { font-size: 19px; }
  .nav-list { padding-inline: 10px; }
  .nav-item { padding-inline: 12px; }
  .main-content { padding: 26px 20px 52px; }
  .inspection-toolbar { grid-template-columns: minmax(260px, 1.3fr) minmax(175px, .8fr); }
  .inspection-new-button { width: 100%; }
  .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .custom-vehicle-row { grid-template-columns: 1fr 1fr; }
  .custom-vehicle-toggle { grid-column: 1 / -1; }
  .inspection-workspace { grid-template-columns: minmax(260px, 1fr) minmax(250px, 1fr); }
  .inspection-results-column { grid-column: 1 / -1; }
  .vehicle-diagram-wrap img { max-width: 270px; }
  .photos-workspace { grid-template-columns: 210px minmax(0, 1fr); }
  .photo-row, .photo-table-header { min-width: 720px; }
  .photos-detail-card { overflow-x: auto; }
  .estimates-workspace { grid-template-columns: 1fr; }
  .estimate-summary-column { position: static; }
  .priority-table { min-width: 1050px; }
  .upcoming-table { min-width: 960px; }
  .inspection-list-table { min-width: 820px; }
  .damage-table { min-width: 520px; }
  .estimate-line-table { min-width: 650px; }
  .estimate-summary-card table { min-width: 470px; }
}

/* Small tablet and mobile navigation */
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: relative; inset: auto; width: 100%; min-height: 0; overflow: visible; }
  .sidebar-visual { opacity: .72; }
  .brand { min-height: 76px; padding: 14px 18px; }
  .brand-mark { width: 34px; height: 41px; }
  .nav-list { display: flex; gap: 8px; padding: 8px 12px 12px; overflow-x: auto; scrollbar-width: thin; }
  .nav-item { flex: 0 0 155px; min-height: 62px; grid-template-columns: 29px 1fr; padding: 9px 11px; }
  .nav-item svg { width: 21px; height: 21px; }
  .nav-label { font-size: 14px; }
  .nav-description { margin-top: 3px; font-size: 10.5px; }
  .main-content { grid-column: auto; width: 100%; }
  .page-header { margin-bottom: 26px; }
  .overview-grid { grid-template-columns: 1fr; }
  .case-heading-row { align-items: flex-start; }
  .case-meta { flex-wrap: wrap; }
  .case-tabs { display: flex; overflow-x: auto; }
  .case-tabs button { flex: 0 0 125px; min-height: 56px; }
  .photos-workspace { grid-template-columns: 1fr; }
  .photo-areas-card nav { grid-template-columns: repeat(5, minmax(145px, 1fr)); overflow-x: auto; }
  .photo-areas-card nav button { border-right: 1px solid #e5e9ec; border-bottom: 0; }
  .workflow-panel-actions, .estimates-page-header { align-items: flex-start; }
  .estimate-source-types { overflow-x: auto; padding-bottom: 3px; }
  .estimate-source-types button { flex: 0 0 auto; }
  .nav-list, .case-tabs, .photo-areas-card nav, .estimate-source-types { scrollbar-width: none; }
  .nav-list::-webkit-scrollbar, .case-tabs::-webkit-scrollbar, .photo-areas-card nav::-webkit-scrollbar, .estimate-source-types::-webkit-scrollbar { display: none; }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --type-page-title: 25px;
    --type-section-title: 17px;
    --type-card-title: 15px;
    --type-body: 13px;
    --type-table: 12px;
    --type-table-header: 11px;
  }
  .main-content { padding: 20px 14px 40px; overflow: hidden; }
  .page-header, .case-heading-row, .estimates-page-header, .photos-detail-header, .new-inspection-actions { align-items: stretch; flex-direction: column; }
  .page-header { gap: 18px; }
  .page-header .primary-button, .edit-case-button { width: 100%; }
  .metrics-card { display: block; padding: 0; overflow-x: auto; }
  .metrics-card h2 { width: 100%; min-height: 55px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics { min-width: 650px; min-height: 75px; }
  .booking-dashboard-alert, .booking-detail-card > header { align-items: stretch; flex-direction: column; }
  .booking-dashboard-alert .outline-button { width: 100%; }
  .booking-detail-grid, .booking-decline-form { grid-template-columns: 1fr; }
  .booking-decline-form > div { grid-column: auto; }
  .metric { min-height: 75px; }
  .card-header { min-height: 58px; padding-inline: 15px; }
  .inspection-toolbar { grid-template-columns: 1fr; gap: 10px; }
  .search-control, .filter-control, .inspection-new-button { min-height: 50px; }
  .form-grid-3, .custom-vehicle-row { grid-template-columns: 1fr; }
  .custom-vehicle-toggle { grid-column: auto; }
  .new-inspection-card { padding: 20px 15px; }
  .new-inspection-actions { gap: 12px; }
  .new-inspection-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .new-inspection-actions > .outline-button { width: 100%; }
  .case-header { padding-bottom: 18px; }
  .case-title-line { align-items: flex-start; flex-direction: column; gap: 9px; }
  .case-meta { gap: 7px; }
  .meta-divider { display: none; }
  .requesting-company { margin-left: 0; }
  .case-priority-control { margin-left: 0; }
  .overview-section-form { grid-template-columns: 1fr; }
  .overview-section-form label:has(textarea), .overview-form-actions { grid-column: auto; }
  .overview-card, .vehicle-history-card { padding-inline: 15px; }
  .overview-card dl > div { grid-template-columns: 42% 58%; }
  .vehicle-history-card p { grid-template-columns: 1fr; gap: 4px; }
  .inspection-workspace { grid-template-columns: 1fr; }
  .inspection-results-column { grid-column: auto; }
  .damage-table-wrap, .estimate-section, .estimate-summary-table-wrap, .table-wrap { overflow-x: auto; }
  .workflow-panel-actions { gap: 10px; }
  .workflow-panel-actions > div { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .photos-detail-header { gap: 14px; padding-block: 14px; }
  .photos-detail-card { overflow: hidden; }
  .photo-table-header { display: none; }
  .photo-row { grid-template-columns: 1fr; min-width: 0; gap: 14px; }
  .photo-image { width: 100%; height: 190px; }
  .photo-details, .related-damage { padding: 0; border: 0; }
  .photo-details p { grid-template-columns: 88px 1fr; }
  .related-damage { grid-template-columns: 120px 1fr; }
  .photo-actions { grid-template-columns: 1fr 1fr; padding: 0; }
  .workflow-step-footer { display: grid; gap: 10px; }
  .workflow-step-footer button { width: 100%; }
  .estimates-page-header { gap: 14px; }
  .estimates-page-header > div:last-child { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .estimate-card { padding-inline: 10px; }
  .estimate-card-header { align-items: flex-start; flex-direction: column; }
  .estimate-card-header .outline-button { width: 100%; }
  .estimate-meta { grid-template-columns: 1fr 1fr; }
  .estimate-line-table { min-width: 640px; }
  .toast { left: 14px; right: 14px; bottom: 14px; max-width: none; }
}

/* Assessment */
.assessment-page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 2px 0 20px; }
.assessment-page-header h2 { margin: 0 0 6px; font-size: var(--type-section-title); }
.assessment-page-header p { margin: 0; color: #5f6d81; font-size: var(--type-helper); }
.assessment-page-header > div:last-child { display: flex; gap: 12px; }
.assessment-page-header button { min-height: 41px; }
.assessment-workspace { display: grid; grid-template-columns: minmax(610px, 1.45fr) minmax(320px, .72fr); gap: 20px; align-items: start; }
.assessment-main-column, .assessment-side-column { display: grid; gap: 18px; }
.assessment-card { overflow: hidden; border: 1px solid #d8dfe4; border-radius: 7px; background: #fff; box-shadow: 0 1px 6px rgba(26, 37, 47, .035); }
.assessment-card > header { min-height: 49px; padding: 0 17px; border-bottom: 1px solid #dde3e7; }
.assessment-card h2 { margin: 0; font-size: var(--type-card-title); }
.assessment-card > header, .assessment-summary-card, .assessment-difference-card, .assessment-notes-card { display: grid; align-content: center; }
.assessment-table-wrap { overflow-x: auto; }
.assessment-table { min-width: 650px; table-layout: fixed; }
.assessment-table th, .assessment-table td { height: 51px; padding: 8px 16px; text-align: center; }
.assessment-table th:first-child, .assessment-table td:first-child { text-align: left; }
.assessment-table thead th { color: #263247; background: #fbfcfc; font-size: var(--type-table-header); }
.assessment-table thead span { color: #69768a; font-weight: 400; }
.assessment-table td { font-size: var(--type-table); }
.assessment-table input { width: 100%; min-height: 38px; padding: 0 12px; border: 1px solid #cfd8de; border-radius: 5px; color: #172235; background: #fff; text-align: right; font: inherit; }
.assessment-table tfoot th { color: #076f38; background: #eff8f2; font-size: var(--type-table); }
.assessment-table tfoot th:last-child { font-size: 15px; }
.assessment-decisions { display: grid; }
.assessment-decision { display: grid; grid-template-columns: 28px minmax(180px, 1fr) 112px minmax(230px, 1.55fr); gap: 12px; align-items: center; min-height: 55px; padding: 8px 16px; border-bottom: 1px solid #e1e6e9; }
.assessment-decision:last-child { border-bottom: 0; }
.decision-icon { color: #08743b; font-size: 17px; }
.assessment-decision strong { font-size: var(--type-table); font-weight: 500; }
.assessment-decision select, .assessment-decision input { min-height: 36px; padding: 0 9px; border: 1px solid #d2dbe1; border-radius: 5px; color: #334155; background: #fff; font: inherit; font-size: var(--type-control); }
.assessment-decision input { width: 100%; }
.assessment-side-column { position: sticky; top: 18px; }
.assessment-summary-card, .assessment-difference-card, .assessment-notes-card { padding: 20px 18px; }
.assessment-side-column h2 { margin-bottom: 19px; }
.assessment-side-column dl { margin: 0; }
.assessment-side-column dl > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 49px; }
.assessment-side-column dt { color: #334155; font-size: var(--type-table); }
.assessment-side-column dd { margin: 0; color: #08743b; font-size: 14px; font-weight: 700; text-align: right; }
.assessment-side-column .garage-total { color: #41208c; }
.assessment-summary-card .summary-final { margin-top: 4px; padding-top: 10px; border-top: 1px solid #dfe4e7; }
.assessment-summary-card .summary-final dt, .assessment-summary-card .summary-final dd { font-weight: 700; }
.assessment-difference-card dd.negative { color: #df2028; }
.assessment-notes-card textarea { width: 100%; min-height: 185px; padding: 0; border: 0; outline: 0; resize: vertical; color: #334155; background: transparent; font: inherit; font-size: var(--type-body); line-height: 1.65; }

/* Report */
.report-workspace { display: grid; grid-template-columns: 330px minmax(650px, 1fr); gap: 18px; align-items: start; }
.report-control-column { display: grid; gap: 16px; }
.report-control-card, .report-preview-card { border: 1px solid #d8dfe4; border-radius: 7px; background: #fff; box-shadow: 0 1px 6px rgba(26, 37, 47, .035); }
.report-control-card { padding: 18px 16px; }
.report-control-card h2, .report-preview-card h2 { margin: 0 0 6px; font-size: var(--type-card-title); }
.report-control-card > p, .report-preview-card header p { margin: 0 0 16px; color: #657287; font-size: var(--type-helper); }
.report-delivery-details, .report-status-card dl { margin: 0; }
.report-delivery-details > div, .report-status-card dl > div { display: grid; grid-template-columns: 42% 58%; gap: 8px; align-items: center; min-height: 43px; border-bottom: 1px solid #e6eaed; }
.report-delivery-details dt, .report-status-card dt { color: #526075; font-size: var(--type-helper); }
.report-delivery-details dd, .report-status-card dd { margin: 0; overflow-wrap: anywhere; color: #253247; font-size: var(--type-table); font-weight: 600; }
.report-notice { display: flex; gap: 10px; margin: 16px 0; padding: 12px; border: 1px solid #d7e7ef; border-radius: 5px; color: #34445b; background: #f3f8fb; }
.report-notice > span { display: grid; place-items: center; flex: 0 0 19px; height: 19px; border: 1px solid #1663be; border-radius: 50%; color: #1663be; font-size: 10px; font-weight: 700; }
.report-notice p { margin: 0; font-size: var(--type-helper); line-height: 1.5; }
.generate-report-button { width: 100%; min-height: 44px; }
.report-status-card h2 { margin-bottom: 12px; }
.report-preview-card { overflow: auto; background: #e9edec; }
.report-preview-card > header { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 16px; border-bottom: 1px solid #d8dfe4; background: #fff; }
.report-preview-card > header p { margin-bottom: 0; }
.report-preview-status { padding: 6px 10px; border-radius: 12px; color: #8b5b00; background: #fff1d7; font-size: var(--type-badge); font-weight: 600; }
.report-preview-status.generated { color: #08723a; background: #e2f2e8; }
.report-document { width: 794px; margin: 22px auto; }
.report-page { position: relative; box-sizing: border-box; width: 794px; min-height: 1123px; margin: 0 auto 28px; padding: 42px 44px 62px; border: 1px solid #d9dfe3; background: #fff; box-shadow: 0 4px 18px rgba(28, 39, 49, .12); break-after: page; page-break-after: always; }
.report-page:last-child { margin-bottom: 0; break-after: auto; page-break-after: auto; }
.report-document-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 2px solid #08743b; }
.report-document-header > div:first-child { display: grid; grid-template-columns: 44px 1fr; align-items: center; }
.report-document-header > div:first-child strong { display: grid; place-items: center; grid-row: 1 / 3; width: 38px; height: 43px; border: 3px solid #08743b; border-radius: 50% 50% 45% 45%; color: #08743b; font-size: 15px; }
.report-document-header span { font-size: 16px; font-weight: 700; }
.report-document-header > div:last-child { text-align: right; }
.report-document-header b { display: block; font-size: 17px; }
.report-document-header small { display: block; margin-top: 7px; color: #687589; font-size: var(--type-helper); line-height: 1.5; }
.report-page-running-header { display: flex; justify-content: space-between; padding-bottom: 11px; border-bottom: 1px solid #cbd8d0; color: #657287; font-size: var(--type-helper); }
.report-page-content { padding-bottom: 12px; }
.report-page-number { position: absolute; right: 44px; bottom: 25px; left: 44px; padding-top: 10px; border-top: 1px solid #dfe4e7; color: #6b7789; font-size: var(--type-helper); text-align: right; }
.generated-report-section { margin-top: 19px; padding-top: 15px; border-top: 1px solid #dfe4e7; }
.generated-report-section:first-child { border-top: 0; }
.generated-report-section h3 { margin: 0 0 11px; color: #08743b; font-size: 13px; text-transform: uppercase; }
.generated-report-section p { margin: 5px 0; color: #334155; font-size: var(--type-table); line-height: 1.55; }
.report-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.report-detail-grid p { display: grid; grid-template-columns: 42% 58%; }
.report-mini-table { min-width: 620px; table-layout: auto; border: 1px solid #dfe4e7; }
.report-table-wrap { overflow-x: auto; }
.report-mini-table th { background: #f7faf8; }
.report-mini-table th, .report-mini-table td { height: 34px; padding: 6px 8px; font-size: var(--type-table); }
.report-photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.report-photo-grid figure { margin: 0; }
.report-photo-grid img { width: 100%; height: 92px; object-fit: cover; border-radius: 4px; }
.report-photo-grid figcaption { margin-top: 4px; color: #59677a; font-size: var(--type-helper); }
.report-delivery-record { padding: 11px 12px; border-radius: 5px; background: #f5f8f6; }
.report-cost-subsection { margin-top: 13px; }
.report-cost-subsection h4 { margin: 0 0 7px; color: #334155; font-size: var(--type-table); }

@media (max-width: 1100px) {
  .assessment-workspace, .report-workspace { grid-template-columns: 1fr; }
  .assessment-side-column { position: static; grid-template-columns: 1fr 1fr; }
  .assessment-notes-card { grid-column: 1 / -1; }
  .report-control-column { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .assessment-decision { grid-template-columns: 28px minmax(170px, 1fr) 110px; }
  .assessment-decision input { grid-column: 2 / -1; }
  .report-document { min-width: 794px; }
  .report-preview-card { overflow-x: auto; }
}

@media (max-width: 640px) {
  .assessment-page-header { align-items: stretch; flex-direction: column; }
  .assessment-page-header > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
  .assessment-side-column, .report-control-column { grid-template-columns: 1fr; }
  .assessment-notes-card { grid-column: auto; }
  .assessment-decision { grid-template-columns: 28px 1fr; padding: 12px; }
  .assessment-decision select, .assessment-decision input { grid-column: 2; width: 100%; }
  .report-preview-card > header { align-items: flex-start; flex-direction: column; gap: 9px; padding-block: 14px; }
}

@media print {
  @page { size: A4 portrait; margin: 0; }
  body * { visibility: hidden; }
  #generatedReportPreview, #generatedReportPreview * { visibility: visible; }
  #generatedReportPreview { position: absolute; inset: 0; width: 210mm; margin: 0; }
  .report-page { width: 210mm; min-height: 297mm; margin: 0; border: 0; box-shadow: none; }
}

/* Calendar, Customers and Inspector billing */
.workspace-page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.workspace-page-header h1 { margin: 0 0 7px; font-size: var(--type-page-title); }
.workspace-page-header p { margin: 0; color: #59677a; font-size: var(--type-body); }
.workspace-page-header .primary-button { min-height: 43px; }

.calendar-toolbar { display: grid; grid-template-columns: auto auto 1fr 190px auto; gap: 12px; align-items: center; margin-bottom: 17px; }
.calendar-toolbar .outline-button { min-height: 39px; padding-inline: 16px; }
.calendar-period-controls { display: flex; }
.calendar-period-controls .outline-button { min-width: 43px; padding: 0; border-radius: 0; }
.calendar-period-controls .outline-button:first-child { border-radius: 6px 0 0 6px; }
.calendar-period-controls .outline-button:last-child { margin-left: -1px; border-radius: 0 6px 6px 0; }
.calendar-toolbar h2 { margin: 0 0 0 5px; font-size: var(--type-section-title); }
.calendar-status-filter select, .billing-toolbar select { width: 100%; min-height: 39px; padding: 0 12px; border: 1px solid #cfd8de; border-radius: 6px; color: #263247; background: #fff; font: inherit; font-size: var(--type-control); }
.calendar-layout { display: grid; grid-template-columns: minmax(720px, 1.65fr) minmax(300px, .72fr); gap: 16px; align-items: stretch; }
.calendar-card, .calendar-detail-card { overflow: hidden; border: 1px solid #d8dfe4; border-radius: 7px; background: #fff; box-shadow: 0 1px 6px rgba(26, 37, 47, .035); }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(102px, 1fr)); min-width: 714px; }
.calendar-weekdays { min-height: 43px; align-items: center; border-bottom: 1px solid #dce2e6; text-align: center; font-size: var(--type-table-header); font-weight: 600; }
.calendar-day { min-height: 112px; padding: 10px 8px; border-right: 1px solid #e1e6e9; border-bottom: 1px solid #e1e6e9; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.muted { color: #a7b0bd; background: #fbfcfc; }
.calendar-date-button { display: grid; place-items: center; width: 25px; height: 25px; margin: -3px 0 4px -2px; padding: 0; border: 0; border-radius: 50%; color: inherit; background: transparent; font: inherit; font-weight: 500; cursor: pointer; }
.calendar-date-button.today, .calendar-date-button.selected { color: #fff; background: #08743b; }
.calendar-event { display: grid; gap: 3px; width: 100%; margin-top: 5px; padding: 7px 8px; border: 1px solid transparent; border-radius: 5px; color: #253247; text-align: left; font-family: inherit; font-size: var(--type-helper); cursor: pointer; }
.calendar-event strong { font-size: var(--type-table); font-weight: 600; }
.calendar-event.scheduled, .calendar-event.completed { border-color: #cde7d7; background: #e8f5ed; }
.calendar-event.in-progress { border-color: #d4e4f6; background: #ebf4ff; }
.calendar-event.waiting { border-color: #f0ddb6; background: #fff6e6; }
.calendar-event.overdue { border-color: #f1c9ce; background: #fdecef; }
.calendar-detail-card { display: flex; flex-direction: column; }
.calendar-detail-card > header { min-height: 91px; padding: 18px 16px; border-bottom: 1px solid #e0e5e8; }
.calendar-detail-card h2 { margin: 0 0 12px; font-size: var(--type-card-title); }
.calendar-detail-card header p { margin: 0; color: #526075; font-size: var(--type-helper); }
.calendar-selected-appointment { display: grid; grid-template-columns: 10px 1fr auto; gap: 9px; align-items: start; margin: 16px; padding: 14px 12px; border: 1px solid #f0ddb6; border-radius: 6px; color: #263247; background: #fff9ee; text-align: left; font-family: inherit; cursor: pointer; }
.calendar-selected-appointment > strong { display: flex; gap: 17px; font-size: var(--type-table); }
.calendar-selected-appointment > strong b { font-weight: 700; }
.calendar-event-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #f4af00; }
.calendar-detail-list { margin: 0; padding: 4px 18px 16px; border-top: 1px solid #e0e5e8; }
.calendar-detail-list > div { display: grid; grid-template-columns: 42% 58%; gap: 8px; padding: 11px 0; }
.calendar-detail-list dt { color: #657287; font-size: var(--type-helper); }
.calendar-detail-list dd { margin: 0; color: #263247; font-size: var(--type-table); }
.calendar-view-inspection { width: calc(100% - 32px); min-height: 40px; margin: auto 16px 16px; }

.customer-toolbar { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.customer-toolbar .search-control { width: min(390px, 100%); }
.customer-toolbar .outline-button { min-height: 43px; }
.customers-layout { display: grid; grid-template-columns: 285px minmax(650px, 1fr); gap: 16px; align-items: start; }
.customer-list-card, .customer-detail-card { overflow: hidden; border: 1px solid #d8dfe4; border-radius: 7px; background: #fff; box-shadow: 0 1px 6px rgba(26, 37, 47, .035); }
.customer-list-card > header, .customer-detail-card > header { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 16px; border-bottom: 1px solid #e0e5e8; }
.customer-list-card h2, .customer-detail-card h2, .customer-history h2 { margin: 0; font-size: var(--type-card-title); }
.customer-list-card > header span { display: grid; place-items: center; min-width: 34px; height: 25px; border-radius: 13px; color: #08723a; background: #e5f3ea; font-size: var(--type-badge); font-weight: 600; }
.customer-list { display: grid; }
.customer-list button { display: grid; gap: 4px; min-height: 62px; padding: 10px 16px; border: 0; border-bottom: 1px solid #e5e9ec; color: #263247; background: #fff; text-align: left; font-family: inherit; cursor: pointer; }
.customer-list button strong { font-size: var(--type-table); }
.customer-list button span { color: #657287; font-size: var(--type-helper); }
.customer-list button.active { padding-left: 13px; border-left: 3px solid #07823f; background: #eaf6ee; }
.customer-list-card > footer { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 61px; }
.customer-list-card > footer button { width: 38px; height: 38px; border: 1px solid #d6dde2; border-radius: 5px; color: #8692a2; background: #fff; }
.customer-list-card > footer strong { font-size: var(--type-table); }
.customer-detail-card > header .outline-button { min-height: 37px; padding-inline: 15px; }
.customer-profile { display: grid; grid-template-columns: .9fr 1fr; gap: 34px; padding: 22px 28px; border-bottom: 1px solid #e0e5e8; }
.customer-identity { display: flex; align-items: flex-start; gap: 18px; }
.customer-avatar { display: grid; place-items: center; flex: 0 0 70px; height: 70px; border-radius: 50%; color: #08723a; background: #e2f2e8; font-size: 23px; font-weight: 600; }
.customer-identity h2 { margin: 4px 0 18px; font-size: var(--type-section-title); }
.customer-identity p { margin: 8px 0; color: #465469; font-size: var(--type-table); }
.customer-stats { margin: 0; padding: 11px 20px; border: 1px solid #dfe4e7; border-radius: 6px; }
.customer-stats > div { display: grid; grid-template-columns: 48% 52%; min-height: 31px; align-items: center; }
.customer-stats dt, .customer-stats dd { margin: 0; font-size: var(--type-table); }
.customer-stats dt { color: #526075; }
.customer-history { padding: 20px 16px 14px; }
.customer-history h2 { margin-bottom: 14px; }
.customer-history-table { min-width: 720px; }
.customer-history-table th { background: #fbfcfc; }
.customer-history-table th, .customer-history-table td { height: 46px; padding: 8px 12px; }
.customer-history-table tbody tr { cursor: pointer; }
.customer-history-table tbody tr:hover { background: #f7faf8; }
.customer-history-table td:first-child { color: #08723a; font-weight: 600; }
.customer-history-table td:last-child { width: 30px; font-size: 18px; }

.billing-toolbar { display: grid; grid-template-columns: minmax(220px, 310px) minmax(260px, 360px); gap: 16px; margin-bottom: 18px; }
.billing-toolbar label { display: grid; gap: 7px; color: #344154; font-size: var(--type-label); font-weight: 600; }
.billing-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.billing-summary-grid article { display: grid; gap: 8px; min-height: 102px; align-content: center; padding: 17px 18px; border: 1px solid #d8dfe4; border-radius: 7px; background: #fff; box-shadow: 0 1px 6px rgba(26, 37, 47, .035); }
.billing-summary-grid span { color: #657287; font-size: var(--type-helper); }
.billing-summary-grid strong { color: #172235; font-size: 22px; }
.billing-summary-grid small { color: #657287; font-size: var(--type-helper); }
.billing-summary-grid .billable-summary { border-color: #bddbc8; background: #f0f8f3; }
.billing-summary-grid .billable-summary strong { color: #08723a; }
.billing-table-card { overflow: hidden; border: 1px solid #d8dfe4; border-radius: 7px; background: #fff; box-shadow: 0 1px 6px rgba(26, 37, 47, .035); }
.billing-table-card > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 0 18px; border-bottom: 1px solid #e0e5e8; }
.billing-table-card h2 { margin: 0 0 5px; font-size: var(--type-card-title); }
.billing-table-card header p { margin: 0; color: #657287; font-size: var(--type-helper); }
.billing-table { min-width: 1180px; }
.billing-table th { background: #fbfcfc; }
.billing-table th, .billing-table td { height: 48px; padding: 8px 11px; }
.billing-table td:first-child, .billing-table td:nth-child(2), .billing-table td:nth-child(3) { color: #08723a; font-weight: 600; }
.billing-generated-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding: 17px 19px; border: 1px solid #bddbc8; border-radius: 7px; background: #f0f8f3; }
.billing-generated-card > div { display: flex; align-items: center; gap: 13px; }
.billing-generated-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: #08743b; font-weight: 700; }
.billing-generated-card h2 { margin: 0 0 4px; font-size: var(--type-card-title); }
.billing-generated-card p { margin: 0; color: #526075; font-size: var(--type-helper); }

@media (max-width: 1200px) {
  .calendar-layout { grid-template-columns: minmax(650px, 1.5fr) minmax(285px, .7fr); }
  .customers-layout { grid-template-columns: 250px minmax(590px, 1fr); }
}

@media (max-width: 1100px) {
  .calendar-layout, .customers-layout { grid-template-columns: 1fr; }
  .calendar-card { overflow-x: auto; }
  .customer-list-card { max-height: 420px; }
  .customer-list { grid-template-columns: repeat(2, 1fr); }
  .billing-summary-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .workspace-page-header { align-items: stretch; flex-direction: column; }
  .workspace-page-header .primary-button { width: 100%; }
  .calendar-toolbar { grid-template-columns: auto auto 1fr; }
  .calendar-toolbar h2 { grid-column: 1 / -1; grid-row: 1; }
  .calendar-status-filter { grid-column: 1 / 3; }
  .customer-toolbar { align-items: stretch; flex-direction: column; }
  .customer-toolbar .search-control { width: 100%; }
  .customer-profile { grid-template-columns: 1fr; padding-inline: 17px; }
  .customer-list { grid-template-columns: 1fr; }
  .billing-toolbar, .billing-summary-grid { grid-template-columns: 1fr; }
  .billing-table-card > header, .billing-generated-card { align-items: flex-start; flex-direction: column; padding-block: 14px; }
}

/* Demo role switcher and shared partner portals */
.demo-role-controls { position: relative; z-index: 2; display: grid; gap: 8px; margin: -4px 13px 10px; padding: 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; background: rgba(0,31,27,.48); }
.demo-role-controls label { display: grid; gap: 4px; color: rgba(255,255,255,.72); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .45px; }
.demo-role-controls select { width: 100%; min-height: 32px; padding: 0 8px; border: 1px solid rgba(255,255,255,.24); border-radius: 5px; color: #fff; background: rgba(0,37,31,.78); font: inherit; font-size: 11px; text-transform: none; letter-spacing: 0; }
.demo-role-controls option { color: #172235; background: #fff; }
.demo-company-identity { display: grid; gap: 4px; color: rgba(255,255,255,.72); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .45px; }
.demo-company-identity[hidden] { display: none; }
.demo-company-identity strong { min-height: 32px; padding: 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 5px; color: #fff; background: rgba(0,37,31,.58); font-size: 11px; text-transform: none; letter-spacing: 0; }
.portal-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 23px; padding-bottom: 20px; border-bottom: 1px solid #dce2e6; }
.portal-role-eyebrow { display: block; margin-bottom: 6px; color: #08743b; font-size: var(--type-helper); font-weight: 700; text-transform: uppercase; letter-spacing: .55px; }
.portal-page-header h1 { margin: 0 0 7px; font-size: var(--type-page-title); }
.portal-page-header p { margin: 0; color: #59677a; font-size: var(--type-body); }
.portal-profile { display: grid; gap: 4px; min-width: 190px; padding: 10px 13px; border: 1px solid #d8dfe4; border-radius: 7px; background: #fff; text-align: right; }
.portal-profile span { font-size: var(--type-table); font-weight: 700; }
.portal-profile small { color: #657287; font-size: var(--type-helper); }
.portal-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.portal-kpis article, .portal-card { border: 1px solid #d8dfe4; border-radius: 7px; background: #fff; box-shadow: 0 1px 6px rgba(26,37,47,.035); }
.portal-kpis article { display: grid; gap: 8px; min-height: 102px; align-content: center; padding: 17px 18px; }
.portal-kpis span { color: #657287; font-size: var(--type-helper); }
.portal-kpis strong { color: #172235; font-size: 23px; }
.portal-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; align-items: start; }
.portal-grid-sidebar { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(560px, 1.4fr); gap: 17px; align-items: start; }
.portal-card { overflow: hidden; }
.portal-card.portal-panel { padding: 18px; }
.portal-card > header, .portal-section-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 57px; padding: 0 17px; border-bottom: 1px solid #e0e5e8; }
.portal-card h2, .portal-card h3, .portal-section-header h2 { margin: 0; font-size: var(--type-card-title); }
.portal-card p { color: #526075; font-size: var(--type-body); line-height: 1.55; }
.portal-card .table-wrap { width: 100%; }
.portal-table { min-width: 720px; }
.portal-table.wide { min-width: 1120px; }
.portal-table th { background: #fbfcfc; }
.portal-table th, .portal-table td { height: 46px; padding: 8px 11px; vertical-align: middle; }
.portal-table td:first-child { color: #08723a; font-weight: 600; }
.portal-table button, .portal-action-button { min-height: 34px; padding: 0 12px; border: 1px solid #07823f; border-radius: 5px; color: #08723a; background: #fff; font: inherit; font-size: var(--type-button); font-weight: 600; cursor: pointer; }
.portal-action-button.primary { color: #fff; background: #07823f; }
.portal-action-button.danger { color: #d52031; border-color: #edb7bd; }
.portal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.portal-toolbar > div { display: flex; gap: 10px; }
.portal-toolbar h2 { margin: 0; font-size: var(--type-section-title); }
.portal-tabs { display: flex; gap: 27px; margin-bottom: 17px; padding: 0 15px; overflow-x: auto; border-bottom: 1px solid #dce2e6; background: #fff; }
.portal-tabs button { position: relative; flex: 0 0 auto; min-height: 52px; padding: 0 3px; border: 0; color: #405067; background: transparent; font: inherit; font-size: var(--type-tab); cursor: pointer; }
.portal-tabs button.active { color: #08743b; font-weight: 700; }
.portal-tabs button.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: #07823f; }
.portal-form-card { padding: 20px; }
.portal-form-card h2 { margin-bottom: 16px; }
.portal-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.portal-form-grid.two { grid-template-columns: repeat(2, 1fr); }
.insurance-booking-layout { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 20px; }
.insurance-booking-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; row-gap: 17px; }
.insurance-booking-fields label { min-width: 0; }
.insurance-booking-fields input, .insurance-booking-fields textarea { min-width: 0; }
.insurance-booking-notes { grid-column: 1 / -1; }
.portal-form-grid label, .portal-field { display: grid; gap: 7px; color: #344154; font-size: var(--type-label); font-weight: 600; }
.portal-form-grid input, .portal-form-grid select, .portal-form-grid textarea, .portal-field input, .portal-field select, .portal-field textarea, .portal-table input, .portal-table select { width: 100%; min-height: 39px; padding: 7px 10px; border: 1px solid #cfd8de; border-radius: 5px; color: #263247; background: #fff; font: inherit; font-size: var(--type-control); }
.portal-form-grid textarea, .portal-field textarea { min-height: 90px; resize: vertical; }
.portal-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.portal-slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.portal-slot-grid button { min-height: 40px; border: 1px solid #d1d9df; border-radius: 5px; color: #344154; background: #fff; font: inherit; cursor: pointer; }
.portal-slot-grid button.active { color: #08723a; border-color: #07823f; background: #eaf6ee; font-weight: 700; }
.portal-slot-grid button.full { color: #929cab; background: #f1f3f4; text-decoration: line-through; }
.urgent-request-box { margin-top: 16px; padding: 14px; border: 1px solid #efcf96; border-radius: 6px; background: #fff8e9; }
.urgent-request-box label { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.urgent-request-box input { width: 17px; height: 17px; accent-color: #07823f; }
.urgent-request-box strong { display: block; margin-top: 9px; color: #b45d00; font-size: var(--type-table); }
.portal-timeline { position: relative; display: grid; gap: 0; margin: 0; padding: 6px 0 0 31px; }
.portal-timeline::before { content: ""; position: absolute; top: 12px; bottom: 12px; left: 9px; width: 2px; background: #d8e5dd; }
.portal-timeline li { position: relative; min-height: 61px; list-style: none; }
.portal-timeline li::before { content: ""; position: absolute; top: 4px; left: -27px; width: 13px; height: 13px; border: 3px solid #fff; border-radius: 50%; background: #07823f; box-shadow: 0 0 0 1px #afd2bd; }
.portal-timeline li.pending::before { background: #c7ced5; }
.portal-timeline strong { display: block; font-size: var(--type-table); }
.portal-timeline span { color: #657287; font-size: var(--type-helper); }
.portal-readonly-note { margin: 0 0 14px; padding: 11px 13px; border: 1px solid #d7e7ef; border-radius: 5px; color: #34445b; background: #f3f8fb; font-size: var(--type-helper); }
.portal-estimate-block { margin-bottom: 15px; padding: 15px; border: 1px solid #dce2e6; border-radius: 6px; }
.portal-estimate-block > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.portal-estimate-block h3 { margin: 0; }
.portal-subsection { margin-top: 17px; }
.portal-subsection > h3 { margin: 0 0 9px; font-size: var(--type-card-title); }
.shared-status-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 17px; }
.shared-status-strip article { padding: 14px 16px; border: 1px solid #cfe2d6; border-radius: 6px; background: #f1f8f4; }
.shared-status-strip span { display: block; color: #657287; font-size: var(--type-helper); }
.shared-status-strip strong { display: block; margin-top: 5px; color: #08723a; font-size: var(--type-card-title); }
.organization-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.organization-card { padding: 16px; border: 1px solid #d8dfe4; border-radius: 6px; background: #fff; }
.organization-card h3 { margin: 0 0 8px; font-size: var(--type-card-title); }
.organization-card p { margin: 5px 0; }
.assignment-actions { display: flex; gap: 7px; align-items: center; }
.assignment-actions select { min-width: 150px; }
.portal-empty { padding: 35px; color: #657287; text-align: center; }

@media (max-width: 1100px) {
  .portal-kpis { grid-template-columns: repeat(2, 1fr); }
  .portal-grid-2, .portal-grid-sidebar { grid-template-columns: 1fr; }
  .portal-form-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .demo-role-controls { grid-template-columns: 1fr 1fr; margin: 0 12px 8px; }
  .nav-list { padding-top: 4px; }
}

@media (max-width: 640px) {
  .demo-role-controls { grid-template-columns: 1fr; }
  .portal-page-header, .portal-toolbar { align-items: stretch; flex-direction: column; }
  .portal-profile { width: 100%; text-align: left; }
  .portal-kpis, .portal-form-grid, .portal-form-grid.two, .shared-status-strip, .organization-grid { grid-template-columns: 1fr; }
  .insurance-booking-notes { grid-column: auto; }
  .portal-slot-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-request-case-summary, .quote-request-fields { grid-template-columns: 1fr; }
  .quote-request-wide { grid-column: auto; }
  .portal-form-actions { display: grid; }
  .portal-form-actions button { width: 100%; }
}
