:root {
  --navy: #061653;
  --ink: #0b1433;
  --muted: #50607f;
  --line: #e7ebf2;
  --surface: #ffffff;
  --soft: #f4f7fc;
  --red: #ec1018;
  --green: #118a28;
  --shadow: 0 18px 50px rgba(6, 22, 83, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background: var(--surface);
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
}

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

button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(6, 22, 83, 0.12);
}

.app-shell {
  min-height: 100vh;
  width: 100%;
}

.phone-frame {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 640px;
  overflow: hidden;
  background: var(--surface);
}

@media (min-width: 900px) {
  body {
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.98) 0 26%, rgba(238, 243, 251, 0.96) 72%),
      #edf2fa;
  }

  .app-shell {
    display: grid;
    place-items: center;
    padding: 20px;
  }

  .phone-frame {
    width: min(1280px, calc(100vw - 40px));
    height: calc(100dvh - 40px);
    min-height: 680px;
    border: 1px solid rgba(6, 22, 83, 0.1);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(6, 22, 83, 0.18);
  }

  .topbar,
  .toolbar,
  .content-card {
    width: min(1120px, 100%);
    margin-inline: auto;
  }

  .topbar {
    padding-inline: 30px;
  }

  .toolbar,
  .content-card {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .content-card {
    box-shadow: 0 14px 36px rgba(6, 22, 83, 0.06);
  }

  .bottom-nav {
    left: max(20px, calc((100% - 820px) / 2));
    right: max(20px, calc((100% - 820px) / 2));
    width: auto;
    translate: none;
  }

  .fab {
    right: max(24px, calc((100% - 1120px) / 2 + 24px));
  }
}

.device-status {
  height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 8px 34px 0;
  color: #000000;
  font-size: 15px;
  font-weight: 700;
}

.dynamic-island {
  width: 118px;
  height: 34px;
  border-radius: 20px;
  background: #000000;
}

.status-icons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.bars,
.wifi,
.battery {
  display: inline-block;
}

.bars {
  width: 20px;
  height: 14px;
  background: linear-gradient(to right, #000 3px, transparent 3px 6px, #000 6px 10px, transparent 10px 13px, #000 13px 18px);
  border-radius: 2px;
}

.wifi {
  width: 18px;
  height: 12px;
  border: 3px solid #000000;
  border-bottom: 0;
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 18px 18px 0 0;
}

.battery {
  width: 24px;
  height: 12px;
  border: 2px solid #000000;
  border-radius: 3px;
  position: relative;
}

.battery::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 3px;
  width: 3px;
  height: 4px;
  background: #000000;
  border-radius: 0 2px 2px 0;
}

.topbar {
  position: relative;
  z-index: 40;
  height: 126px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px 18px 16px;
  overflow: visible;
  transition: height 320ms ease, padding 320ms ease, opacity 260ms ease;
}

.topbar h1 {
  grid-column: 1;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  color: var(--navy);
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
  overflow: visible;
}

.screen-subtitle {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.mode-title {
  position: relative;
  z-index: 42;
  display: inline-grid;
  justify-items: start;
}

.mode-title-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--navy);
  background: transparent;
  font: inherit;
  line-height: 1;
}

.mode-title-button small {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--navy);
  font-size: 11px;
  line-height: 1;
}

.mode-title-button:hover,
.mode-title-button:focus-visible {
  outline: none;
  color: var(--red);
}

.mode-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 7px);
  z-index: 60;
  min-width: 156px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(6, 22, 83, 0.18);
}

.mode-menu.open {
  display: grid;
  gap: 2px;
}

.mode-menu button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--navy);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.mode-menu button:hover,
.mode-menu button:focus-visible,
.mode-menu button.active {
  outline: none;
  background: #f1f4fb;
}

.mode-menu button.locked {
  color: #9aa6bb;
  cursor: not-allowed;
}

.mode-menu button.locked:hover,
.mode-menu button.locked:focus-visible {
  background: transparent;
}

.mode-menu .mode-sign-out {
  margin-top: 4px;
  border-top: 1px solid #e3e8f2;
  border-radius: 0 0 6px 6px;
  color: var(--red);
}

.brand {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 108px;
  height: 86px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.brand img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

.view-button,
.header-menu-button,
.detail-save-button,
.detail-cancel-button,
.filter-button,
.icon-button {
  border: 0;
  background: transparent;
  color: var(--navy);
}

.header-actions {
  grid-column: 3;
  position: relative;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  z-index: 42;
}

.view-button {
  display: flex;
  width: 42px;
  height: 42px;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--navy);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.view-button svg {
  width: 23px;
  height: 23px;
}

.view-button span {
  min-height: 9px;
}

.header-menu-button {
  width: 34px;
  height: 34px;
  display: grid;
  align-content: center;
  justify-content: center;
  gap: 4px;
  border-radius: 8px;
}

.header-menu-button span {
  width: 25px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.header-menu-button:hover,
.header-menu-button:focus-visible {
  outline: none;
  background: #eef2fb;
}

.header-menu {
  position: absolute;
  right: 0;
  top: 40px;
  z-index: 60;
  min-width: 146px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(6, 22, 83, 0.18);
}

.header-menu.open {
  display: grid;
  gap: 2px;
}

.header-menu button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--navy);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.header-menu button:hover,
.header-menu button:focus-visible,
.header-menu button.active {
  outline: none;
  background: #f1f4fb;
}

.header-menu [data-admin-screen-link] {
  display: none;
}

.admin-mode-view .header-menu [data-admin-screen-link] {
  display: block;
}

.detail-edit-button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  color: var(--navy);
  background: transparent;
  font-size: 18px;
  font-weight: 800;
}

.detail-edit-button svg {
  width: 26px;
  height: 26px;
}

.detail-save-button,
.detail-cancel-button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 800;
}

.detail-save-button {
  color: #ffffff;
  background: var(--navy);
}

.detail-cancel-button {
  border: 1px solid var(--line);
  color: var(--muted);
  background: #ffffff;
}

.back-title-button {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  color: var(--navy);
  background: transparent;
  padding: 0;
  font-size: 20px;
  font-weight: 800;
}

.back-title-button span {
  font-size: 34px;
  line-height: 0.8;
}

svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.red-rule {
  height: 3px;
  background: var(--red);
  transition: height 180ms ease;
}

.toolbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
  overflow: hidden;
  transition: height 180ms ease, padding 180ms ease, opacity 140ms ease;
}

.search-wrap {
  flex: 1;
  min-width: 0;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
}

.search-wrap svg {
  width: 18px;
  height: 18px;
}

.search-wrap input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 14px;
}

.filter-button {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.filter-button.active {
  color: var(--red);
  border-color: rgba(236, 16, 24, 0.35);
  background: #fff5f5;
}

.daily-date-control {
  position: relative;
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 12px;
}

.daily-date-control > button {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--navy);
}

.daily-date-control > button:not(.daily-date-button) {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.daily-date-button {
  min-width: 0;
  gap: 5px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.daily-date-button small {
  font-size: 12px;
  line-height: 1;
}

.daily-date-control > button:hover,
.daily-date-control > button:focus-visible {
  outline: none;
  background: #eef2fb;
}

.daily-mini-calendar {
  position: absolute;
  top: 46px;
  left: 68px;
  right: 68px;
  z-index: 12;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(6, 22, 83, 0.16);
}

.mini-calendar-header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.mini-calendar-header button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--navy);
  background: #ffffff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.mini-calendar-header strong {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.mini-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.mini-day-name,
.mini-day-empty,
.mini-day {
  min-height: 28px;
}

.mini-day-name {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.mini-day {
  border: 0;
  border-radius: 7px;
  color: var(--navy);
  background: #f6f8fc;
  font-size: 12px;
  font-weight: 900;
}

.mini-day:hover,
.mini-day:focus-visible,
.mini-calendar-header button:hover,
.mini-calendar-header button:focus-visible {
  outline: none;
  background: #eef2fb;
}

.mini-day.selected {
  color: #ffffff;
  background: var(--navy);
}

.content-card {
  height: calc(100% - 126px - 3px - 56px);
  overflow: hidden;
  background: #ffffff;
}

.detail-view .content-card {
  height: calc(100% - 126px - 3px);
}

.calendar-view .content-card {
  height: calc(100% - 126px - 3px);
}

.driver-mode-view .content-card {
  height: calc(100% - 126px - 3px);
}

.admin-mode-view .content-card {
  height: calc(100% - 126px - 3px);
}

.sales-mode-view .content-card {
  height: calc(100% - 126px - 3px);
}

.auth-view .content-card {
  height: calc(100% - 126px - 3px - 34px);
}

.driver-mode-view.driver-date-view .content-card {
  height: calc(100% - 126px - 3px - 56px);
}

.phone-frame.chrome-collapsed .topbar,
.phone-frame.chrome-collapsed .toolbar {
  height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.phone-frame.chrome-collapsed .red-rule {
  height: 0;
}

.phone-frame.chrome-collapsed .content-card,
.phone-frame.chrome-collapsed.detail-view .content-card,
.phone-frame.chrome-collapsed.calendar-view .content-card,
.phone-frame.chrome-collapsed.driver-mode-view .content-card,
.phone-frame.chrome-collapsed.admin-mode-view .content-card,
.phone-frame.chrome-collapsed.sales-mode-view .content-card,
.phone-frame.chrome-collapsed.driver-mode-view.driver-date-view .content-card {
  height: 100%;
}

.table-head {
  display: grid;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  background: #fbfcff;
}

.table-head.drivers {
  grid-template-columns: minmax(158px, 1fr) minmax(64px, 0.52fr) minmax(72px, 0.58fr) 28px;
}

.table-head.projects {
  grid-template-columns: minmax(178px, 1fr) minmax(96px, 0.62fr) 72px;
}

.table-head.trucks {
  grid-template-columns: minmax(158px, 1fr) minmax(64px, 0.52fr) minmax(72px, 0.58fr) 28px;
}

.table-head span:nth-child(n + 2) {
  font-size: 10px;
  line-height: 1.15;
}

.list {
  height: calc(100% - 48px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  padding-bottom: 112px;
}

.customer-list {
  height: 100%;
  padding-bottom: 132px;
  background: #ffffff;
}

.detail-list {
  height: 100%;
  padding-bottom: 140px;
}

.calendar-list {
  height: 100%;
  padding-bottom: 130px;
}

.driver-mode-list {
  height: 100%;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px 14px 132px;
  background: #ffffff;
}

.admin-mode-list {
  height: 100%;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px 14px 132px;
  background: #ffffff;
}

.auth-list {
  height: 100%;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 18px 18px 34px;
  background: #ffffff;
}

.auth-title {
  display: grid;
  gap: 6px;
  color: var(--navy);
  line-height: 1;
}

.auth-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.auth-card {
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 16px 36px rgba(6, 22, 83, 0.12);
}

.auth-card-header {
  display: grid;
  gap: 6px;
}

.auth-card-header span {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-card-header strong {
  color: var(--navy);
  font-size: 23px;
  font-weight: 900;
  line-height: 1.05;
}

.auth-card-header small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.auth-field {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.auth-field input {
  width: 100%;
  height: 46px;
  border: 1px solid #d5ddea;
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: #ffffff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  outline: none;
}

.auth-field input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(6, 22, 83, 0.12);
}

.auth-error {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid rgba(236, 16, 24, 0.24);
  border-radius: 8px;
  color: var(--red);
  background: #fff5f5;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.auth-main-action {
  width: 100%;
  min-height: 44px;
}

.auth-demo-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 4px;
}

.auth-demo-list span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-demo-list button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.auth-demo-list button:hover,
.auth-demo-list button:focus-visible {
  outline: none;
  border-color: rgba(6, 22, 83, 0.32);
  background: #f2f5fb;
}

.auth-code-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px dashed #bec9dc;
  border-radius: 8px;
  background: #f7f9fd;
}

.auth-code-preview span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-code-preview strong {
  color: var(--navy);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.auth-view-picker {
  gap: 12px;
}

.auth-view-grid {
  display: grid;
  gap: 8px;
}

.auth-view-card {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--navy);
  background: #ffffff;
  text-align: left;
}

.auth-view-card.approved:hover,
.auth-view-card.approved:focus-visible {
  outline: none;
  border-color: rgba(6, 22, 83, 0.34);
  background: #f4f7fc;
}

.auth-view-card.locked {
  color: #8d99ad;
  background: #f8fafd;
  cursor: not-allowed;
}

.auth-view-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--navy);
}

.auth-view-card.locked .auth-view-icon {
  background: #aab5c7;
}

.auth-view-icon svg {
  width: 23px;
  height: 23px;
}

.auth-view-card strong,
.auth-view-card small {
  display: block;
}

.auth-view-card strong {
  font-size: 14px;
  font-weight: 900;
}

.auth-view-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.auth-view-card.locked small {
  color: #8d99ad;
}

.auth-view-card em {
  min-width: 62px;
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--green);
  background: #e9f7e8;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.auth-view-card.locked em {
  color: #7a8496;
  background: #edf1f6;
}

.sales-mode-list {
  height: 100%;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px 14px 132px;
  background: #ffffff;
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.row {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 82px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  column-gap: 12px;
}

.row.drivers {
  grid-template-columns: minmax(158px, 1fr) minmax(64px, 0.52fr) minmax(72px, 0.58fr) 28px;
}

.row.projects {
  grid-template-columns: minmax(178px, 1fr) minmax(96px, 0.62fr) 72px;
}

.project-unassigned {
  background: linear-gradient(90deg, #ffffff 0%, #fff8f8 100%);
}

.project-customer-unassigned {
  border-left: 4px solid var(--red);
  background: linear-gradient(90deg, #fff1f2 0%, #ffffff 55%);
}

.project-customer-flag {
  display: block;
  width: fit-content;
  margin-top: 5px;
  border-radius: 999px;
  padding: 3px 7px;
  color: #9f0010;
  background: #ffe1e5;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schedule-assign-button,
.assignment-choose-button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  padding: 0 13px;
  color: #ffffff;
  background: var(--red);
  box-shadow: 0 5px 12px rgba(237, 28, 36, 0.2);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.schedule-assign-button:hover,
.schedule-assign-button:focus-visible,
.assignment-choose-button:hover,
.assignment-choose-button:focus-visible {
  background: #c70f18;
  outline: 3px solid rgba(237, 28, 36, 0.18);
  outline-offset: 2px;
}

.assignment-choose-button.override {
  background: #9a6c00;
  box-shadow: 0 5px 12px rgba(154, 108, 0, 0.2);
}

.assignment-choose-button:disabled {
  color: #6f7785;
  background: #e6e9ef;
  box-shadow: none;
  cursor: not-allowed;
}

.driver-assignment-list {
  height: 100%;
  padding: 0 0 132px;
  background: #f5f7fb;
}

.driver-assignment-screen {
  min-height: 100%;
}

.driver-assignment-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 18px 20px;
  color: #ffffff;
  background: var(--navy);
}

.assignment-back-button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.driver-assignment-header span {
  display: block;
  color: #ffb6b9;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.driver-assignment-header h2 {
  margin: 3px 0 4px;
  font-size: 22px;
  line-height: 1.1;
}

.driver-assignment-header p {
  margin: 0;
  color: #dbe5ff;
  font-size: 12px;
  line-height: 1.35;
}

.assignment-ranking-note {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.assignment-ranking-note strong,
.assignment-ranking-note span {
  display: block;
}

.assignment-ranking-note strong {
  color: var(--navy);
  font-size: 13px;
}

.assignment-ranking-note span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.assignment-candidate-list {
  display: grid;
  gap: 10px;
  padding: 12px 14px 20px;
}

.assignment-candidate {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(6, 22, 83, 0.06);
}

.assignment-candidate.best-match {
  border: 2px solid var(--red);
}

.assignment-candidate .driver-list-avatar {
  width: 42px;
  height: 42px;
}

.assignment-candidate-copy,
.assignment-candidate-title {
  min-width: 0;
}

.assignment-candidate-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assignment-candidate-title strong {
  color: var(--navy);
  font-size: 15px;
}

.assignment-candidate-title em {
  border-radius: 999px;
  padding: 3px 7px;
  color: #ffffff;
  background: var(--red);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.assignment-candidate-copy > span,
.assignment-candidate-copy > b {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.assignment-conflict {
  display: grid;
  gap: 2px;
  margin-top: 7px;
  border-left: 3px solid;
  border-radius: 5px;
  padding: 6px 8px;
}

.assignment-conflict strong,
.assignment-conflict span {
  display: block;
  font-size: 9px;
  line-height: 1.25;
}

.assignment-conflict.available {
  border-color: #198754;
  color: #12683f;
  background: #e8f7ee;
}

.assignment-conflict.override {
  border-color: #c99300;
  color: #7a5700;
  background: #fff4ce;
}

.assignment-conflict.blocked {
  border-color: var(--red);
  color: #a20e15;
  background: #fff0f0;
}

.assignment-match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.assignment-match-tags small {
  border-radius: 999px;
  padding: 3px 6px;
  font-size: 9px;
  font-weight: 800;
}

.assignment-match-tags .matched {
  color: #13703c;
  background: #e8f7ee;
}

.assignment-match-tags .missing {
  color: #9a6c00;
  background: #fff4ce;
}

.row.trucks {
  grid-template-columns: minmax(158px, 1fr) minmax(64px, 0.52fr) minmax(72px, 0.58fr) 28px;
}

.entity {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.entity-button {
  width: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.entity-button:hover .primary-text,
.entity-button:focus-visible .primary-text {
  text-decoration: underline;
}

.entity-button:focus-visible {
  outline: 2px solid rgba(6, 22, 83, 0.22);
  outline-offset: 4px;
  border-radius: 8px;
}

.entity > span:last-child {
  min-width: 0;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: #f2f5fb;
}

.avatar svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.6;
}

.driver-list-avatar {
  overflow: hidden;
  border: 2px solid #ffffff;
  background: #e8edf5;
  box-shadow:
    0 0 0 1px rgba(6, 22, 83, 0.08),
    0 5px 12px rgba(6, 22, 83, 0.1);
}

.driver-list-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.driver-list-avatar.placeholder {
  border: 0;
  box-shadow: none;
}

.driver-initials {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: inherit;
  color: #ffffff;
  background: linear-gradient(145deg, #0b2c73, #1767a5);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.project-schedule-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.project-schedule-logo .logo-glyph {
  width: 24px;
  height: 24px;
}

.project-schedule-logo svg {
  width: 23px;
  height: 23px;
}

.truck-image-avatar {
  width: 38px;
  height: 30px;
  box-sizing: border-box;
  overflow: hidden;
  padding: 2px;
  border-radius: 8px;
  background: #eef1f5;
}

.truck-image-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.primary-text {
  display: block;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.secondary-text,
.cell-muted {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.cell {
  min-width: 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 800;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status.ready {
  color: var(--green);
}

.status.pending {
  color: #c99300;
}

.status.accepted {
  color: var(--green);
}

.status.rejected {
  color: var(--red);
}

.status.missing,
.status.past-due,
.status.stop {
  color: var(--red);
}

.work-order-popup {
  margin: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(226, 0, 26, 0.24);
  border-radius: 10px;
  background: #fff7f8;
  box-shadow: 0 12px 30px rgba(6, 22, 83, 0.12);
}

.work-order-popup-copy {
  min-width: 0;
}

.work-order-popup-copy span,
.work-order-copy span {
  display: block;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.work-order-popup-copy strong,
.work-order-copy strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-order-popup-copy small,
.work-order-copy small,
.work-order-copy em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.3;
}

.work-order-popup-actions,
.work-order-card-actions {
  display: flex;
  gap: 7px;
}

.work-order-popup-actions button,
.work-order-card-actions button {
  min-height: 32px;
  border: 1px solid var(--navy);
  border-radius: 8px;
  padding: 0 10px;
  color: #ffffff;
  background: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.work-order-popup-actions button:last-child,
.work-order-card-actions button:last-child {
  border-color: var(--line);
  color: var(--red);
  background: #ffffff;
}

.work-orders-list {
  height: 100%;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 12px 14px 132px;
  background: #ffffff;
}

.work-order-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.work-order-logo {
  width: 42px;
  height: 42px;
}

.work-order-card-actions {
  grid-column: 2 / -1;
  justify-content: flex-start;
}

.work-order-details {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.work-order-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e4e9f2;
  border-radius: 8px;
  background: #fbfcff;
}

.work-order-section h3 {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

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

.work-order-field,
.work-order-choice {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.work-order-field.wide,
.work-order-choice.wide {
  grid-column: 1 / -1;
}

.work-order-field span,
.work-order-choice > span {
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
}

.work-order-field strong {
  min-height: 30px;
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e7;
  border-radius: 6px;
  padding: 6px 8px;
  color: #213966;
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.work-order-choice div {
  display: grid;
  gap: 5px;
}

.work-order-choice em {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #213966;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.work-order-choice i {
  width: 13px;
  height: 13px;
  display: block;
  border: 1px solid #7c8aa4;
  border-radius: 50%;
  background: #ffffff;
}

.work-order-choice em.selected i {
  border: 4px solid var(--navy);
}

.work-order-status {
  border-radius: 999px;
  padding: 6px 8px;
  color: #9a6c00;
  background: #fff2bf;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.work-order-status.accepted {
  color: var(--green);
  background: #e8f7e6;
}

.work-order-status.rejected {
  color: var(--red);
  background: #fff0f0;
}

.rollup-list {
  height: 100%;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 12px 14px 132px;
  background: #ffffff;
}

.rollup-card {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.inventory-rollup-card {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.rollup-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--navy);
  background: #f2f5fb;
}

.rollup-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.3;
}

.rollup-main {
  min-width: 0;
}

.rollup-main span {
  display: block;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.rollup-main strong,
.rollup-source strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.rollup-main small,
.rollup-source small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.rollup-card em {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--green);
  background: #e8f7e6;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.rollup-card em.stop,
.rollup-card em.repair-required-before-dispatch {
  color: var(--red);
  background: #fff0f0;
}

.rollup-card em.due-soon,
.rollup-card em.check-monthly {
  color: #9a6c00;
  background: #fff2bf;
}

.rollup-card em.scheduled {
  color: #1646a3;
  background: #edf3ff;
}

.rollup-card b {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.rollup-source {
  grid-column: 2 / -1;
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
}

.driver-mode-summary {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d9e2f2;
  border-radius: 8px;
  background: #f7faff;
}

button.driver-mode-summary {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.driver-mode-summary.editable {
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.driver-mode-summary.editable:hover,
.driver-mode-summary.editable:focus-visible {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.12), 0 7px 18px rgba(6, 22, 83, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.driver-summary-switcher {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 7px;
  align-items: center;
}

.driver-summary-switcher > [data-driver-view-shift] {
  width: 34px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #d9e2f2;
  border-radius: 10px;
  color: var(--navy);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(6, 22, 83, 0.08);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.driver-summary-switcher > [data-driver-view-shift]:hover,
.driver-summary-switcher > [data-driver-view-shift]:focus-visible {
  border-color: var(--red);
  color: #ffffff;
  background: var(--red);
  outline: 3px solid rgba(237, 28, 36, 0.16);
  outline-offset: 2px;
}

.driver-mode-summary .driver-list-avatar {
  width: 42px;
  height: 42px;
}

.driver-mode-summary span,
.driver-mode-summary strong,
.driver-mode-summary small,
.driver-mode-summary em {
  display: block;
}

.driver-mode-summary span {
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-mode-summary strong {
  margin-top: 2px;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.1;
}

.driver-mode-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.driver-mode-summary em {
  color: var(--navy);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.driver-view-section {
  display: grid;
  gap: 8px;
}

.driver-view-section h3 {
  margin: 2px 0 4px;
  color: var(--navy);
  font-size: 16px;
}

.driver-invite-card,
.driver-timesheet-card,
.driver-maintenance-card,
.driver-inventory-card {
  display: grid;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.driver-invite-card {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.driver-dispatch-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid #d9e2f2;
  box-shadow: 0 8px 18px rgba(6, 22, 83, 0.04);
}

.driver-dispatch-card.pending {
  border-left-color: #d8a320;
}

.driver-dispatch-card.accepted {
  border-left-color: var(--green);
}

.driver-dispatch-card.rejected {
  border-left-color: var(--red);
}

.driver-dispatch-open {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(60px, auto);
  grid-template-areas:
    "logo copy date"
    "logo copy status";
  gap: 10px;
  align-items: start;
  border: 0;
  padding: 11px 10px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
}

.driver-dispatch-open:hover,
.driver-dispatch-open:focus-visible {
  background: #fbfcff;
  outline: none;
}

.driver-dispatch-copy {
  grid-area: copy;
  min-width: 0;
}

.driver-dispatch-date {
  grid-area: date;
  justify-self: end;
  min-width: 68px;
  text-align: right;
}

.driver-dispatch-date span,
.driver-dispatch-date small {
  display: block;
  margin: 0;
  white-space: nowrap;
}

.driver-dispatch-date span {
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
  text-transform: none;
}

.driver-dispatch-date small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
}

.driver-invite-card b {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.driver-invite-logo {
  grid-area: logo;
  width: 36px;
  height: 36px;
}

.driver-invite-card span,
.driver-maintenance-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-dispatch-copy span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0;
}

.driver-invite-card strong,
.driver-timesheet-card strong,
.driver-maintenance-card strong,
.driver-inventory-card strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.15;
}

.driver-dispatch-copy strong {
  margin-top: 2px;
  font-size: 14px;
}

.driver-invite-card small,
.driver-timesheet-card small,
.driver-maintenance-card small,
.driver-inventory-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.driver-dispatch-copy small {
  overflow-wrap: anywhere;
}

.driver-dispatch-copy .driver-dispatch-meta {
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
}

.driver-invite-card em,
.driver-timesheet-card em,
.driver-maintenance-card em,
.driver-inventory-card em {
  border-radius: 999px;
  padding: 5px 8px;
  color: #1646a3;
  background: #edf3ff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.driver-dispatch-open em {
  grid-area: status;
  justify-self: end;
  align-self: end;
  margin-top: 4px;
  padding: 5px 7px;
  font-size: 9px;
}

.driver-invite-card em.pending {
  color: #9a6c00;
  background: #fff2bf;
}

.driver-invite-card em.accepted {
  color: var(--green);
  background: #e8f7e6;
}

.driver-invite-card em.rejected {
  color: var(--red);
  background: #fff0f0;
}

.driver-dispatch-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid #eef2f7;
  background: #fbfcff;
}

.driver-dispatch-actions button {
  width: 100%;
  min-width: 0;
  height: 36px;
  font-size: 11px;
}

.driver-dispatch-actions button:only-child,
.driver-dispatch-popup-actions button:only-child {
  grid-column: 1 / -1;
}

.driver-dispatch-actions .danger-action {
  border-color: rgba(236, 16, 24, 0.3);
  color: var(--red);
  background: #fff7f7;
}

.sensitive-value-button {
  border: 0;
  background: transparent;
  color: var(--navy);
  padding: 0;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
}

.sensitive-value-button.revealed {
  letter-spacing: normal;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.endorsements-info-item {
  grid-column: 1 / -1;
}

.driver-endorsement-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 4px 0 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8faff;
}

.driver-endorsement-picker legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.driver-endorsement-picker label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 10px;
  line-height: 1.25;
}

.driver-endorsement-picker input {
  margin: 1px 0 0;
  accent-color: var(--red);
}

.driver-timesheet-card,
.driver-maintenance-card {
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
}

button.driver-timesheet-card {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.driver-timesheet-card:hover,
button.driver-timesheet-card:focus-visible {
  border-color: #aebdd5;
  background: #f8faff;
  outline: none;
}

.driver-timesheet-card b,
.driver-maintenance-card b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: right;
}

.driver-timesheet-card b.approved {
  color: var(--green);
}

.driver-timesheet-card b.rejected {
  color: var(--red);
}

.driver-timesheet-card b.submitted {
  color: #1646a3;
}

.driver-timesheet-card b.unapproved {
  color: #9a6c00;
}

.driver-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.driver-stat-grid article {
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.driver-stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-stat-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
}

.driver-inventory-card {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.driver-inventory-card > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--navy);
  background: #f2f5fb;
}

.driver-inventory-card svg {
  width: 18px;
  height: 18px;
}

.driver-tools {
  position: absolute;
  right: 18px;
  bottom: 112px;
  z-index: 6;
  display: grid;
  justify-items: end;
  gap: 8px;
  pointer-events: none;
}

.driver-tool-fab {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--navy);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.driver-tool-fab svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
}

.driver-tool-fab span {
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.driver-tools-panel {
  width: 246px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dce4f1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(6, 22, 83, 0.2);
  pointer-events: auto;
}

.driver-tools-panel header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.driver-tools-panel header span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-tools-panel header strong {
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.driver-tool-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.driver-tool-actions button {
  min-height: 46px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  color: var(--navy);
  background: #f8faff;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
}

.driver-tool-actions button:hover,
.driver-tool-actions button:focus-visible {
  outline: none;
  border-color: #b7c6df;
  background: #eef4ff;
}

.driver-tool-actions svg {
  width: 18px;
  height: 18px;
}

.driver-tool-popup {
  display: grid;
  gap: 10px;
}

.driver-tool-checklist {
  display: grid;
  gap: 8px;
}

.driver-tool-checklist label {
  min-height: 42px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.driver-tool-checklist input {
  width: 17px;
  height: 17px;
  accent-color: var(--navy);
}

.driver-support-card {
  display: grid;
  gap: 8px;
}

.driver-support-card article {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.driver-support-card span,
.driver-support-card small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-support-card strong {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
}

.driver-support-card small {
  margin-top: 4px;
  text-transform: none;
}

.vac-cam-tool {
  display: grid;
  gap: 10px;
}

.vac-cam-job-card {
  padding: 10px;
  border: 1px solid #dbe5f4;
  border-radius: 8px;
  background: #f8faff;
}

.vac-cam-job-card span,
.vac-cam-job-card small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.vac-cam-job-card strong {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 16px;
  font-weight: 900;
}

.vac-cam-job-card small {
  margin-top: 4px;
  line-height: 1.25;
}

.vac-cam-capture {
  min-height: 46px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #9cb1d2;
  border-radius: 8px;
  padding: 10px;
  color: var(--navy);
  background: #ffffff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.vac-cam-capture svg {
  width: 20px;
  height: 20px;
}

.vac-cam-capture input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.vac-cam-gallery {
  display: grid;
  gap: 8px;
}

.vac-cam-photo-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 28px;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.vac-cam-photo-card img {
  width: 64px;
  height: 52px;
  display: block;
  border-radius: 6px;
  object-fit: cover;
  background: #eef2f7;
}

.vac-cam-photo-card strong,
.vac-cam-photo-card small {
  display: block;
}

.vac-cam-photo-card strong {
  color: var(--navy);
  font-size: 13px;
  line-height: 1.15;
}

.vac-cam-photo-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.vac-cam-photo-card button {
  width: 24px;
  height: 24px;
  border: 1px solid #ffd1d1;
  border-radius: 50%;
  color: var(--red);
  background: #ffffff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.admin-stat-grid,
.admin-report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-stat-grid article,
.admin-stat-grid button,
.admin-report-card {
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-stat-grid span,
.admin-stat-grid button span,
.admin-report-card span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.admin-stat-grid strong,
.admin-stat-grid button strong,
.admin-report-card strong {
  color: var(--navy);
  font-size: 18px;
  line-height: 1;
}

.admin-stat-grid small,
.admin-stat-grid button small,
.admin-report-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-report-grid {
  grid-template-columns: 1fr 1fr;
}

.admin-report-card {
  min-height: 86px;
  border-left: 4px solid #8ba2c7;
}

button.admin-report-card {
  width: 100%;
  text-align: left;
  font: inherit;
}

.admin-report-card.actionable {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.admin-report-card.actionable:hover,
.admin-report-card.actionable:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(6, 22, 83, 0.12);
}

.admin-report-card.green {
  border-left-color: var(--green);
}

.admin-report-card.red {
  border-left-color: var(--red);
}

.admin-report-card.blue {
  border-left-color: #1646a3;
}

.admin-view-section {
  display: grid;
  gap: 8px;
}

.admin-view-section h3 {
  margin: 2px 0 4px;
  color: var(--navy);
  font-size: 16px;
}

.admin-unassigned-project-report {
  margin-top: 14px;
}

.admin-unassigned-project-report > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-unassigned-project-report > header span {
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-unassigned-project-report > header button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--navy);
  background: #ffffff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.admin-unassigned-project-card {
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  text-align: left;
  cursor: pointer;
}

.admin-unassigned-project-card > span {
  display: grid;
  gap: 3px;
}

.admin-unassigned-project-card > span strong {
  color: var(--navy);
  font-size: 13px;
}

.admin-unassigned-project-card > span small {
  color: var(--muted);
  font-size: 10px;
}

.admin-unassigned-project-card > em {
  color: var(--red);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.admin-unassigned-project-card > b {
  grid-column: 2 / -1;
  color: #1646a3;
  font-size: 10px;
}

.admin-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 64px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-card-logo,
.admin-card .driver-list-avatar {
  width: 36px;
  height: 36px;
}

.admin-card-main {
  min-width: 0;
}

.admin-card-main span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.admin-card-main strong {
  display: block;
  margin-top: 2px;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.15;
}

.admin-card-main small,
.admin-card-meta small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-card-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 74px;
  text-align: right;
}

.admin-card-meta em {
  max-width: 92px;
  border-radius: 999px;
  padding: 5px 7px;
  color: #1646a3;
  background: #edf3ff;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: normal;
}

.admin-card-meta em.ready-for-invoice,
.admin-card-meta em.active,
.admin-card-meta em.ready,
.admin-card-meta em.approved {
  color: var(--green);
  background: #e8f7e6;
}

.admin-card-meta em.open,
.admin-card-meta em.scheduled,
.admin-card-meta em.pending,
.admin-card-meta em.submitted {
  color: #9a6c00;
  background: #fff2bf;
}

.admin-card-meta em.unapproved {
  color: var(--red);
  background: #fff0f0;
}

.admin-card-meta em.rejected {
  color: var(--red);
  background: #fff0f0;
}

.admin-card-meta em.invoiced,
.admin-card-meta em.released {
  color: var(--muted);
  background: #f2f5fb;
}

.admin-card-meta b {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.sales-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 64px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.sales-customer-card {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.sales-customer-card:hover {
  border-color: rgba(6, 22, 83, 0.32);
  box-shadow: 0 7px 18px rgba(6, 22, 83, 0.1);
  transform: translateY(-1px);
}

.sales-customer-card:focus-visible {
  outline: 3px solid rgba(229, 25, 44, 0.28);
  outline-offset: 2px;
  border-color: var(--red);
}

.sales-customer-card:active {
  transform: translateY(0);
}

.sales-card-logo {
  width: 36px;
  height: 36px;
}

.sales-card-main {
  min-width: 0;
}

.sales-card-main span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.sales-card-main strong {
  display: block;
  margin-top: 2px;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.15;
}

.sales-card-main small,
.sales-card-meta small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.sales-card-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 72px;
  text-align: right;
}

.sales-card-meta em {
  max-width: 92px;
  border-radius: 999px;
  padding: 5px 7px;
  color: #1646a3;
  background: #edf3ff;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.sales-card-meta em.pending,
.sales-card-meta em.draft {
  color: #8b5f00;
  background: #fff2bf;
}

.sales-card-meta em.approved,
.sales-card-meta em.accepted {
  color: var(--green);
  background: #e8f7e6;
}

.sales-card-meta em.rejected {
  color: var(--red);
  background: #fff0f0;
}

.sales-card-meta b {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.sales-calendar-screen::before {
  content: "View Only";
  justify-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  color: #1646a3;
  background: #edf3ff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-timesheet-card {
  border-left: 4px solid #d9e2f2;
  width: 100%;
  color: inherit;
  text-align: left;
}

.admin-timesheet-card.unapproved {
  border-left-color: var(--red);
}

.admin-timesheet-card.submitted {
  border-left-color: #d8a320;
}

.admin-timesheet-card.rejected {
  border-left-color: var(--red);
}

.admin-timesheet-card.approved {
  border-left-color: var(--green);
}

.admin-users-list {
  gap: 12px;
}

.super-admin-panel {
  display: grid;
  gap: 11px;
  border: 2px solid #173a83;
  border-radius: 10px;
  padding: 13px;
  background: linear-gradient(145deg, #f5f8ff, #ffffff);
  box-shadow: 0 8px 22px rgba(6, 22, 83, 0.1);
}

.super-admin-panel.locked {
  border-color: var(--red);
  background: #fff7f7;
}

.super-admin-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.super-admin-panel header > div,
.super-admin-panel label {
  display: grid;
  gap: 3px;
}

.super-admin-panel span {
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.super-admin-panel strong {
  color: var(--navy);
  font-size: 16px;
}

.super-admin-panel em {
  border-radius: 999px;
  padding: 5px 8px;
  color: #15743a;
  background: #e5f6ea;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.super-admin-panel.locked em {
  color: #a4080d;
  background: #ffe3e5;
}

.super-admin-panel input {
  height: 38px;
  border: 1px solid #cbd5e5;
  border-radius: 6px;
  padding: 0 9px;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.super-admin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.super-admin-actions button {
  min-height: 37px;
  border: 0;
  border-radius: 6px;
  padding: 7px;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
}

.super-admin-actions .lock { background: var(--red); }
.super-admin-actions .logout { background: #4b5870; }
.super-admin-actions .sync { grid-column: 1 / -1; background: var(--navy); }
.super-admin-panel > small { color: var(--muted); font-size: 9px; font-weight: 700; line-height: 1.45; }

.maintenance-lock-card { text-align: center; }
.maintenance-lock-card p { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; }
.maintenance-lock-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  color: #fff;
  background: var(--navy);
  font-size: 28px;
}

.admin-users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}

.microsoft-photo-status {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
  border: 1px solid #d9e1ef;
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff7f7;
  color: var(--navy);
}

.microsoft-photo-status.connected {
  border-left-color: #198754;
  background: #f2fbf6;
}

.microsoft-photo-status span,
.microsoft-photo-status small {
  color: #53627c;
}

.admin-users-toolbar > div {
  display: grid;
  gap: 2px;
}

.admin-users-toolbar span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-users-toolbar strong {
  color: var(--navy);
  font-size: 16px;
}

.admin-users-toolbar > button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  color: #ffffff;
  background: var(--navy);
  font-size: 11px;
  font-weight: 900;
}

.admin-users-toolbar > button > span {
  color: inherit;
  font-size: 19px;
  font-weight: 500;
  line-height: 1;
}

.admin-user-editor {
  border: 1px solid #ced8e8;
  border-radius: 8px;
  padding: 12px;
  background: #f8faff;
  box-shadow: 0 8px 20px rgba(6, 22, 83, 0.08);
}

.admin-user-editor > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.admin-user-editor > header > div {
  display: grid;
  gap: 2px;
}

.admin-user-editor > header span {
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-user-editor > header strong {
  color: var(--navy);
  font-size: 16px;
}

.admin-user-editor-close {
  width: 30px;
  height: 30px;
  border: 1px solid #d5ddea;
  border-radius: 50%;
  color: var(--navy);
  background: #ffffff;
  font-size: 21px;
  line-height: 1;
}

.admin-user-editor form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-user-field {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.admin-user-field > span,
.admin-user-access legend {
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
}

.admin-user-field input,
.admin-user-field select {
  width: 100%;
  min-width: 0;
  height: 39px;
  border: 1px solid #cfd8e7;
  border-radius: 6px;
  padding: 0 9px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  outline: none;
}

.admin-user-field input:focus,
.admin-user-field select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(6, 22, 83, 0.1);
}

.admin-user-editor .wide {
  grid-column: 1 / -1;
}

.admin-user-access {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.admin-user-access legend {
  margin-bottom: 6px;
  padding: 0;
}

.admin-user-access > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.admin-user-access label {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #d7dfeb;
  border-radius: 6px;
  color: var(--navy);
  background: #ffffff;
  font-size: 9px;
  font-weight: 900;
}

.admin-user-access input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--navy);
}

.admin-user-error {
  margin: 0;
  border-left: 3px solid var(--red);
  padding: 7px 9px;
  color: #a4080d;
  background: #fff1f2;
  font-size: 10px;
  font-weight: 800;
}

.admin-user-form-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
}

.admin-user-form-actions button {
  height: 38px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
}

.admin-user-form-actions .secondary {
  border: 1px solid #cdd6e4;
  color: var(--navy);
  background: #ffffff;
}

.admin-user-form-actions .primary {
  border: 1px solid var(--navy);
  color: #ffffff;
  background: var(--navy);
}

.admin-user-list {
  display: grid;
  gap: 8px;
}

.admin-user-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.admin-user-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: #eef3fc;
}

.admin-user-avatar svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-user-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.admin-user-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.admin-user-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.admin-user-heading > div {
  min-width: 0;
}

.admin-user-heading strong,
.admin-user-heading small {
  display: block;
}

.admin-user-heading strong {
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.15;
}

.admin-user-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.admin-user-heading em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--green);
  background: #e9f7e9;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-user-heading em.current {
  color: #1646a3;
  background: #edf3ff;
}

.admin-user-heading em.inactive {
  color: #7b4b00;
  background: #fff1d6;
}

.admin-user-access-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-user-access-list span {
  border-radius: 4px;
  padding: 3px 6px;
  color: #33476c;
  background: #f1f4f9;
  font-size: 8px;
  font-weight: 900;
  text-transform: capitalize;
}

.admin-user-card-actions {
  display: flex;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.admin-user-card-actions button {
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #d6deea;
  border-radius: 5px;
  padding: 0 8px;
  color: var(--navy);
  background: #ffffff;
  font-size: 9px;
  font-weight: 900;
}

.admin-user-card-actions button svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-user-card-actions button.danger {
  color: var(--red);
}

.admin-user-card-actions button.invite {
  color: #ffffff;
  border-color: var(--red);
  background: var(--red);
}

.admin-user-card-actions button.view-as {
  color: #ffffff;
  border-color: #173a83;
  background: #173a83;
}

.view-as-banner {
  position: fixed;
  z-index: 100000;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(680px, calc(100% - 24px));
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transform: translateX(-50%);
  border: 2px solid #ffffff;
  border-radius: 10px;
  padding: 8px 9px 8px 13px;
  color: #ffffff;
  background: #061653;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.32);
}

.view-as-banner span {
  font-size: 11px;
  line-height: 1.35;
}

.view-as-banner b {
  display: block;
  color: #ff3344;
  font-size: 9px;
  text-transform: uppercase;
}

.view-as-banner button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 11px;
  color: #061653;
  background: #ffffff;
  font-size: 9px;
  font-weight: 900;
}

.view-as-mode .cloud-save-status,
.view-as-mode #globalSaveButton {
  display: none !important;
}

@media (max-width: 520px) {
  .view-as-banner { align-items: stretch; flex-direction: column; }
  .view-as-banner button { width: 100%; }
}

.admin-user-card-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.auth-driver-onboarding form {
  display: grid;
  gap: 12px;
}

.auth-onboarding-endorsements {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.auth-onboarding-endorsements legend {
  padding: 0 5px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
}

.auth-onboarding-endorsements label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
}

.admin-rate-card {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-rate-header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.admin-rate-header span,
.admin-rate-row span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.admin-rate-header strong {
  display: block;
  margin-top: 2px;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.15;
}

.admin-rate-header small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.admin-rate-rows {
  display: grid;
  gap: 6px;
}

.admin-rate-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 7px;
  background: #f8faff;
}

.admin-rate-row strong {
  color: var(--navy);
  font-size: 11px;
}

.admin-rate-row em {
  color: var(--red);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.admin-rate-overview {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #d9e2f2;
  border-left: 4px solid var(--navy);
  border-radius: 8px;
  background: #f7faff;
}

.admin-rate-overview span,
.admin-rate-overview small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.admin-rate-overview span {
  text-transform: uppercase;
}

.admin-rate-overview strong {
  color: var(--navy);
  font-size: 17px;
}

.admin-rate-overview small {
  line-height: 1.35;
}

.admin-tier-rate-card {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-tier-rate-header {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.admin-tier-badge {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 7px;
  color: #ffffff;
  background: var(--navy);
  font-size: 11px;
  font-weight: 900;
}

.admin-tier-rate-header strong,
.admin-tier-rate-header small {
  display: block;
}

.admin-tier-rate-header strong {
  color: var(--navy);
  font-size: 14px;
}

.admin-tier-rate-header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.admin-tier-rate-lines {
  display: grid;
  border-top: 1px solid #edf1f7;
}

.admin-tier-rate-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 7px 4px;
  border-bottom: 1px solid #edf1f7;
}

.admin-tier-rate-line:last-child {
  border-bottom: 0;
}

.admin-tier-rate-line strong,
.admin-tier-rate-line small {
  display: block;
}

.admin-tier-rate-line strong {
  color: var(--navy);
  font-size: 11px;
}

.admin-tier-rate-line small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.admin-tier-rate-line em {
  color: var(--navy);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.dynamic-pricing-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.dynamic-pricing-formula span {
  padding: 5px 7px;
  border-radius: 6px;
  color: var(--navy);
  background: #eef3fb;
  font-size: 9px;
  font-weight: 900;
}

.dynamic-pricing-formula b {
  color: var(--muted);
  font-size: 11px;
}

.dynamic-pricing-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.dynamic-pricing-card > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #f7faff;
}

.dynamic-pricing-card > header strong {
  color: var(--navy);
  font-size: 13px;
}

.dynamic-pricing-card > header small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-align: right;
}

.dynamic-pricing-rows {
  display: grid;
}

.dynamic-pricing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 7px 10px;
  border-top: 1px solid #edf1f7;
}

.dynamic-pricing-row strong,
.dynamic-pricing-row small {
  display: block;
}

.dynamic-pricing-row strong {
  color: var(--navy);
  font-size: 11px;
}

.dynamic-pricing-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.dynamic-pricing-row em {
  color: #1646a3;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.rate-structure-value-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.rate-structure-edit-button {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e0ec;
  border-radius: 6px;
  padding: 0;
  color: var(--navy);
  background: #ffffff;
}

.rate-structure-edit-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rate-structure-edit-button:hover,
.rate-structure-edit-button:focus-visible {
  outline: none;
  border-color: #aebdd2;
  background: #eef3fb;
}

.rate-structure-add-button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-top: 1px solid #edf1f7;
  color: #1646a3;
  background: #ffffff;
  font-size: 10px;
  font-weight: 900;
}

.rate-structure-add-button span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #b8c8df;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
}

.rate-structure-add-button:hover,
.rate-structure-add-button:focus-visible {
  outline: none;
  background: #f7faff;
}

.rate-structure-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #dfe6f1;
  background: #f8faff;
}

.rate-structure-edit-form {
  border-top-color: #cdd8e8;
}

.rate-structure-add-form label {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.rate-structure-add-form label.wide,
.rate-structure-add-actions {
  grid-column: 1 / -1;
}

.rate-structure-add-form input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid #cdd7e6;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--navy);
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
  outline: none;
}

.rate-structure-add-form input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px rgba(6, 22, 83, 0.1);
}

.rate-structure-add-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.rate-structure-add-actions button {
  min-width: 68px;
  min-height: 32px;
  border: 1px solid #cdd7e6;
  border-radius: 6px;
  color: var(--muted);
  background: #ffffff;
  font-size: 10px;
  font-weight: 900;
}

.rate-structure-add-actions [data-rate-group-add-save],
.rate-structure-add-actions [data-rate-item-edit-save] {
  border-color: var(--navy);
  color: #ffffff;
  background: var(--navy);
}

.rate-structure-add-actions .rate-structure-delete-button {
  margin-right: auto;
  border-color: #f0b8bc;
  color: var(--red);
  background: #fff7f7;
}

.rate-structure-add-actions .rate-structure-delete-button:hover,
.rate-structure-add-actions .rate-structure-delete-button:focus-visible {
  outline: none;
  border-color: var(--red);
  background: #fff0f1;
}

.dynamic-price-lock {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid #cce5ca;
  border-radius: 8px;
  background: #f4fbf3;
}

.rate-structure-save-panel {
  display: grid;
  gap: 8px;
  margin: 18px 0 8px;
  padding: 14px;
  border: 1px solid #d9e0eb;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(6, 22, 83, 0.08);
}

.rate-structure-save-panel button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--red);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.rate-structure-save-panel button:hover,
.rate-structure-save-panel button:focus-visible {
  outline: none;
  background: #c9101a;
  box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.16);
}

.rate-structure-save-panel small {
  color: var(--muted);
  text-align: center;
  font-size: 10px;
  font-weight: 800;
}

.dynamic-price-lock > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--green);
  background: #e5f5e3;
}

.dynamic-price-lock svg {
  width: 18px;
  height: 18px;
}

.dynamic-price-lock strong,
.dynamic-price-lock small {
  display: block;
}

.dynamic-price-lock strong {
  color: var(--navy);
  font-size: 11px;
  line-height: 1.2;
}

.dynamic-price-lock small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
}

.row-actions {
  position: relative;
  justify-self: end;
}

.action-trigger {
  width: 28px;
  height: 38px;
  display: grid;
  grid-template-columns: repeat(3, 2px);
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  border-radius: 8px;
  color: #8b95a8;
  background: transparent;
}

.action-trigger span {
  width: 2px;
  height: 22px;
  border-radius: 999px;
  background: currentColor;
}

.action-trigger:focus-visible,
.action-trigger:hover {
  outline: none;
  background: #eef2fb;
}

.action-menu {
  position: absolute;
  right: 0;
  top: 38px;
  z-index: 6;
  min-width: 112px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(6, 22, 83, 0.18);
}

.action-menu.open {
  display: grid;
  gap: 2px;
}

.action-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--navy);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.action-menu button:hover,
.action-menu button:focus-visible {
  outline: none;
  background: #f1f4fb;
}

.action-menu .danger {
  color: var(--red);
}

.customer-letter {
  min-height: 23px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  color: var(--navy);
  background: #f6f8fc;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 900;
}

.customer-row {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.customer-main {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 7px 20px 7px 24px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.customer-main:hover .primary-text,
.customer-main:focus-visible .primary-text {
  text-decoration: underline;
}

.customer-main:focus-visible {
  outline: 2px solid rgba(6, 22, 83, 0.22);
  outline-offset: -2px;
}

.customer-logo {
  width: 36px;
  height: 36px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  color: var(--navy);
  background: #eef3fb;
  box-shadow:
    inset 0 0 0 1px rgba(6, 22, 83, 0.09),
    0 5px 12px rgba(6, 22, 83, 0.07);
}

.customer-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 3px;
}

.customer-logo-error-fallback {
  display: none;
  width: 26px;
  height: 26px;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.customer-logo-error-fallback svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.customer-logo-custom.logo-load-error img {
  display: none;
}

.customer-logo-custom.logo-load-error .customer-logo-error-fallback {
  display: grid;
}

.customer-logo-initials {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: inherit;
}

.customer-logo-fake .logo-glyph {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
}

.customer-logo-fake svg {
  width: 25px;
  height: 25px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.customer-logo-fake .logo-accent {
  position: absolute;
  inset: auto -14px -14px auto;
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.38);
  transform: rotate(28deg);
}

.customer-logo-fake.logo-0 {
  color: #08215d;
  background: linear-gradient(135deg, #cfe0ff, #f8fbff);
}

.customer-logo-fake.logo-1 {
  color: #8b2419;
  background: linear-gradient(135deg, #ffd4ca, #fff8f6);
}

.customer-logo-fake.logo-2 {
  color: #0b6f2c;
  background: linear-gradient(135deg, #cff1c0, #f8fff5);
}

.customer-logo-fake.logo-3 {
  color: #006375;
  background: linear-gradient(135deg, #c7f2ea, #f6fffd);
}

.customer-logo-fake.logo-4 {
  color: #7b5400;
  background: linear-gradient(135deg, #ffe69e, #fffaf0);
}

.customer-logo-fake.logo-5 {
  color: #5132a8;
  background: linear-gradient(135deg, #ded5ff, #fbfaff);
}

.customer-logo-fake.logo-6 {
  color: #ffffff;
  background: linear-gradient(135deg, #546b8f, #d0b37a);
}

.customer-logo-fake.logo-7 {
  color: #ffffff;
  background: linear-gradient(135deg, #0f6b77, #8bd7ca);
}

.customer-logo-fake.logo-mark-health {
  color: #ffffff;
  background: linear-gradient(135deg, #0b8b4d, #77d995);
}

.customer-logo-fake.logo-mark-bridge {
  color: #ffffff;
  background: linear-gradient(135deg, #063a72, #47a8e5);
}

.customer-logo-fake.logo-mark-industry {
  color: #ffffff;
  background: linear-gradient(135deg, #343f56, #9aa7ba);
}

.customer-logo-fake.logo-mark-school {
  color: #ffffff;
  background: linear-gradient(135deg, #172b75, #e22c2c);
}

.customer-logo-fake.logo-mark-property {
  color: #0b335f;
  background: linear-gradient(135deg, #cde7ff, #f0f7ff);
}

.customer-logo-fake.logo-mark-network {
  color: #ffffff;
  background: linear-gradient(135deg, #0c6674, #38c6aa);
}

.customer-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: #e9f0ff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(6, 22, 83, 0.05);
}

.customer-avatar.coral {
  background: #ffe8e4;
}

.customer-avatar.green {
  background: #dff4d4;
}

.customer-avatar.mint {
  background: #daf8ee;
}

.customer-avatar.teal {
  background: #d8f5ef;
}

.customer-avatar.gold {
  background: #fff0c7;
}

.customer-avatar.purple {
  background: #ebe6ff;
}

.customer-avatar.photo {
  color: #ffffff;
  background: linear-gradient(135deg, #546b8f, #d0b37a);
}

.customer-copy {
  min-width: 0;
}

.customer-chevron {
  justify-self: end;
  color: #a0aabc;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.driver-detail {
  padding: 22px 18px 0;
  color: var(--navy);
}

.driver-hero {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.driver-photo {
  position: relative;
  width: 118px;
  height: 118px;
  overflow: hidden;
  border-radius: 50%;
  background: #edf1f6;
  box-shadow: inset 0 0 0 1px rgba(6, 22, 83, 0.08);
}

.driver-photo-image-slot {
  width: 100%;
  height: 100%;
}

.driver-photo.editable {
  cursor: pointer;
}

.driver-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 36%;
}

.driver-photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(6, 22, 83, 0.35);
  background: linear-gradient(135deg, #eef2f8, #ffffff);
}

.driver-photo-placeholder svg {
  width: 54px;
  height: 54px;
  stroke-width: 1.7;
}

.photo-edit-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: #ffffff;
  background: rgba(6, 22, 83, 0.9);
  box-shadow: 0 8px 18px rgba(6, 22, 83, 0.24);
}

.photo-edit-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.photo-edit-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.photo-edit-button:hover,
.photo-edit-button:focus-visible {
  background: var(--red);
}

.photo-edit-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.photo-file-input {
  display: none;
}

.driver-photo .active-dot {
  position: absolute;
  right: 10px;
  bottom: 22px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: var(--green);
}

.driver-photo .active-dot.pending {
  background: #f2b705;
}

.driver-photo .active-dot.inactive {
  background: var(--red);
}

.driver-summary {
  min-width: 0;
}

.driver-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.driver-name-row h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 28px;
  line-height: 1;
}

.active-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--green);
  background: #e8f7e6;
  font-size: 14px;
  font-weight: 800;
}

.active-pill.pending {
  color: #9a6c00;
  background: #fff2bf;
}

.active-pill.inactive {
  color: var(--red);
  background: #fff0f0;
}

.active-pill.not-ready {
  color: var(--red);
  background: #fff0f0;
}

.active-pill.missing {
  color: var(--red);
  background: #fff0f0;
}

.active-pill.stop {
  color: var(--red);
  background: #fff0f0;
}

.active-pill span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.contact-list {
  display: grid;
  gap: 9px;
}

.contact-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  color: #1e3767;
  font-size: 15px;
}

.contact-item span,
.detail-info-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 900;
}

.contact-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.detail-section,
.detail-panel,
.detail-notes {
  padding-top: 22px;
}

.detail-section {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.detail-section h3,
.detail-panel h3,
.detail-notes h3 {
  margin: 0 0 16px;
  color: var(--navy);
  font-size: 19px;
}

.section-toggle {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  margin: 0 0 16px;
  padding: 0;
  color: var(--navy);
  background: transparent;
  text-align: left;
}

.section-toggle span {
  font-size: 19px;
  font-weight: 800;
}

.section-toggle strong {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  background: #ffffff;
  font-size: 18px;
  line-height: 1;
}

.section-toggle:hover strong,
.section-toggle:focus-visible strong {
  background: #eef2fb;
}

.section-toggle:focus-visible {
  outline: 2px solid rgba(6, 22, 83, 0.2);
  outline-offset: 4px;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 22px;
}

.detail-info-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-radius: 8px;
}

.detail-info-item[data-edit-field],
.detail-info-item[data-truck-edit-field],
.detail-info-item[data-project-edit-field] {
  cursor: pointer;
}

.detail-info-item[data-edit-field]:hover,
.detail-info-item[data-edit-field]:focus-within,
.detail-info-item[data-truck-edit-field]:hover,
.detail-info-item[data-truck-edit-field]:focus-within,
.detail-info-item[data-project-edit-field]:hover,
.detail-info-item[data-project-edit-field]:focus-within {
  background: #f7f9fd;
}

.detail-editing .detail-info-item[data-edit-field],
.detail-editing .detail-info-item[data-truck-edit-field],
.detail-editing .detail-info-item[data-project-edit-field] {
  cursor: default;
}

.detail-label {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.detail-info-item strong {
  display: block;
  color: #31486f;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
}

.inline-detail-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid #cbd5e7;
  border-radius: 7px;
  padding: 0 8px;
  color: var(--navy);
  background: #f8faff;
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.inline-detail-input:focus {
  border-color: var(--navy);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(6, 22, 83, 0.08);
}

.project-customer-select {
  cursor: pointer;
  appearance: auto;
}

.name-input {
  height: 42px;
  font-size: 22px;
  font-weight: 900;
}

.detail-editing .detail-section,
.detail-editing .driver-hero {
  background: linear-gradient(90deg, rgba(244, 247, 252, 0.75), rgba(255, 255, 255, 0));
}

.green-text {
  color: var(--green) !important;
}

.compliance-grid {
  display: grid;
  gap: 8px;
}

.compliance-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 18px;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.compliance-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 3px solid var(--green);
  border-radius: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.compliance-row strong,
.compliance-row em,
.compliance-row small {
  display: block;
}

.compliance-row strong {
  color: var(--navy);
  font-size: 12px;
  line-height: 1.15;
}

.compliance-row em {
  margin-top: 3px;
  color: var(--green);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.compliance-row small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.compliance-row b {
  color: var(--muted);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.qualification-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.qualification-menu-button {
  width: 26px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 24px;
  line-height: 1;
}

.qualification-menu-button:hover,
.qualification-menu-button:focus-visible {
  color: var(--navy);
  background: #eef2fb;
}

.qualification-option-menu {
  position: absolute;
  right: 0;
  top: 32px;
  z-index: 8;
  min-width: 92px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(6, 22, 83, 0.16);
}

.qualification-option-menu.open {
  display: grid;
  gap: 4px;
}

.qualification-option-menu button {
  border: 0;
  border-radius: 6px;
  padding: 7px 8px;
  color: var(--navy);
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
}

.qualification-option-menu button:hover,
.qualification-option-menu button:focus-visible {
  background: #eef2fb;
}

.qualification-option-menu .danger {
  color: var(--red);
}

.qualification-edit-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  padding-top: 2px;
}

.qualification-edit-panel label,
.compliance-add-form label {
  display: grid;
  gap: 4px;
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
}

.qualification-edit-panel input,
.compliance-add-form input {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid #cbd5e7;
  border-radius: 7px;
  padding: 0 8px;
  color: var(--navy);
  background: #f8faff;
  font-size: 12px;
  font-weight: 700;
}

.qualification-edit-panel button,
.compliance-add-form button {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--navy);
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.qualification-edit-panel button:first-of-type,
.compliance-add-form button:first-of-type {
  border-color: var(--navy);
  color: #ffffff;
  background: var(--navy);
}

.compliance-add-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed #b8c6dd;
  border-radius: 8px;
  color: var(--navy);
  background: #fbfcff;
}

.compliance-add-row span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--navy);
  font-size: 20px;
  line-height: 1;
}

.compliance-add-row strong {
  font-size: 13px;
  font-weight: 900;
}

.compliance-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 8px;
  padding: 10px;
  border: 1px dashed #b8c6dd;
  border-radius: 8px;
  background: #fbfcff;
}

.compliance-add-form label:first-child,
.compliance-add-form label:nth-child(3),
.compliance-add-form div {
  grid-column: 1 / -1;
}

.compliance-add-form div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.detail-panel {
  margin-top: 18px;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.assigned-truck {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.truck-thumb {
  height: 72px;
  box-sizing: border-box;
  overflow: hidden;
  padding: 5px;
  border-radius: 6px;
  background: #edf1f6;
}

.truck-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.unassigned-truck {
  grid-template-columns: 72px minmax(0, 1fr);
}

.empty-truck {
  display: grid;
  place-items: center;
  color: #8b95a8;
}

.empty-truck svg {
  width: 34px;
  height: 34px;
}

.assigned-truck strong {
  display: block;
  color: var(--navy);
  font-size: 16px;
}

.assigned-truck span,
.assigned-truck small {
  display: block;
  margin-top: 3px;
  color: #31486f;
  font-size: 11px;
}

.truck-card-actions {
  position: relative;
  align-self: center;
}

.truck-menu-button {
  width: 42px;
  height: 38px;
  display: grid;
  align-content: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 8px;
  color: #8b95a8;
  background: #ffffff;
}

.truck-menu-button span {
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.truck-menu-button:hover,
.truck-menu-button:focus-visible {
  outline: none;
  background: #eef2fb;
}

.truck-option-menu {
  position: absolute;
  right: 0;
  top: 40px;
  z-index: 7;
  min-width: 112px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(6, 22, 83, 0.18);
}

.truck-option-menu.open {
  display: grid;
  gap: 2px;
}

.truck-option-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--navy);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.truck-option-menu button:hover,
.truck-option-menu button:focus-visible {
  outline: none;
  background: #f1f4fb;
}

.truck-option-menu .danger {
  color: var(--red);
}

.truck-profile-hero {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.truck-profile-photo {
  height: 112px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 8px;
  border-radius: 10px;
  background: #edf1f6;
  box-shadow: inset 0 0 0 1px rgba(6, 22, 83, 0.08);
}

.truck-profile-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.project-profile-hero {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.project-profile-logo {
  width: 108px;
  height: 108px;
}

.project-profile-logo .customer-logo {
  width: 100%;
  height: 100%;
  border-radius: 18px;
}

.project-profile-logo .logo-symbol {
  font-size: 26px;
}

.project-profile-logo .logo-glyph,
.customer-profile-logo-image .logo-glyph {
  width: 76px;
  height: 76px;
}

.project-profile-logo .logo-glyph svg,
.customer-profile-logo-image .logo-glyph svg {
  width: 72px;
  height: 72px;
  stroke-width: 1.85;
}

.project-profile-logo .logo-accent {
  right: -24px;
  bottom: -24px;
  width: 72px;
  height: 72px;
}

.project-detail .contact-item {
  grid-template-columns: 34px minmax(0, 1fr);
}

.project-detail .contact-item span {
  width: 28px;
}

.project-requirements-grid .detail-info-item:nth-child(n + 5) {
  grid-column: 1 / -1;
}

.project-dispatch-row {
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
}

.project-dispatch-row.instructions-row {
  align-items: start;
}

.project-notes {
  cursor: pointer;
}

.project-notes .inline-detail-input {
  width: 100%;
}

.daily-ticket-section {
  padding-bottom: 20px;
}

.daily-ticket-list {
  display: grid;
  gap: 9px;
}

.daily-ticket-summary {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid #d9e2f2;
  border-radius: 8px;
  color: var(--navy);
  background: #f7faff;
}

.daily-ticket-summary span,
.daily-ticket-summary strong,
.daily-ticket-summary em {
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.daily-ticket-summary em {
  color: var(--green);
}

.daily-ticket-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid #2764d8;
  border-radius: 8px;
  background: #ffffff;
}

.daily-ticket-row.selected {
  border-color: #b8cdf4;
  border-left-color: var(--red);
  background: #fbfdff;
  box-shadow: 0 6px 18px rgba(6, 22, 83, 0.08);
}

.daily-ticket-row.approved,
.daily-ticket-row.released,
.daily-ticket-row.invoiced {
  border-left-color: var(--green);
}

.daily-ticket-row.submitted {
  border-left-color: #c99300;
}

.daily-ticket-row.rejected,
.daily-ticket-row.missing {
  border-left-color: var(--red);
}

.daily-ticket-date {
  width: 50px;
  min-height: 50px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--navy);
  background: #eef3fb;
}

.daily-ticket-date strong,
.daily-ticket-date small,
.daily-ticket-main strong,
.daily-ticket-main small {
  display: block;
}

.daily-ticket-date strong {
  font-size: 13px;
  font-weight: 900;
}

.daily-ticket-date small {
  color: #31486f;
  font-size: 10px;
  font-weight: 800;
}

.daily-ticket-main strong {
  color: var(--navy);
  font-size: 14px;
  line-height: 1.2;
}

.daily-ticket-main small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.daily-ticket-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.daily-ticket-metrics span {
  min-height: 42px;
  padding: 7px 8px;
  border-radius: 7px;
  background: #f7f9fd;
}

.daily-ticket-metrics b,
.daily-ticket-metrics strong {
  display: block;
}

.daily-ticket-metrics b {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-ticket-metrics strong {
  margin-top: 3px;
  color: var(--navy);
  font-size: 12px;
  line-height: 1.15;
}

.daily-ticket-billing {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.daily-ticket-status {
  border-radius: 999px;
  padding: 5px 8px;
  color: #1646a3;
  background: #edf3ff;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.daily-ticket-status.approved,
.daily-ticket-status.released,
.daily-ticket-status.invoiced {
  color: var(--green);
  background: #e8f7e6;
}

.daily-ticket-status.submitted {
  color: #9a6c00;
  background: #fff2bf;
}

.daily-ticket-status.rejected,
.daily-ticket-status.missing {
  color: var(--red);
  background: #fff0f0;
}

.daily-ticket-billing small,
.daily-ticket-billing em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.daily-ticket-billing em {
  color: var(--navy);
  text-align: right;
}

.daily-ticket-input {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 1px solid #cbd5e7;
  border-radius: 7px;
  padding: 0 7px;
  color: var(--navy);
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
  outline: none;
}

.daily-ticket-status .daily-ticket-input {
  width: 104px;
  height: 24px;
  border-color: transparent;
  padding: 0 4px;
  background: transparent;
}

.daily-ticket-billing em .daily-ticket-input {
  width: 118px;
  text-align: right;
}

.truck-detail .contact-item {
  grid-template-columns: 34px minmax(0, 1fr);
}

.truck-detail .contact-item span {
  width: 28px;
}

.truck-profile-stack {
  display: grid;
  gap: 8px;
}

.truck-profile-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto 26px;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.truck-row-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.truck-row-status.stop {
  background: var(--red);
}

.truck-row-status.missing {
  background: var(--red);
}

.truck-row-status.due-soon {
  background: #c99300;
}

.truck-row-status.scheduled {
  background: #2764d8;
}

.truck-row-status.completed {
  background: var(--green);
}

.truck-profile-row strong,
.truck-profile-row small,
.truck-profile-row b {
  display: block;
}

.truck-profile-row strong {
  color: var(--navy);
  font-size: 13px;
  line-height: 1.15;
}

.truck-profile-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.truck-profile-row em {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--green);
  background: #e8f7e6;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.truck-profile-row em.stop {
  color: var(--red);
  background: #fff0f0;
}

.truck-profile-row em.missing {
  color: var(--red);
  background: #fff0f0;
}

.truck-profile-row em.due-soon {
  color: #9a6c00;
  background: #fff2bf;
}

.truck-profile-row em.scheduled {
  color: #1646a3;
  background: #edf3ff;
}

.truck-profile-row b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.truck-inventory-list {
  display: grid;
  gap: 8px;
}

.truck-inventory-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto 26px;
  gap: 9px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.truck-inventory-row > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--navy);
  background: #f2f5fb;
}

.truck-inventory-row svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.3;
}

.truck-inventory-row strong {
  color: var(--navy);
  font-size: 12px;
}

.truck-inventory-row small {
  color: #31486f;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.truck-inventory-row em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.truck-item-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.truck-item-menu-button {
  width: 24px;
  height: 28px;
}

.truck-item-edit-panel,
.truck-add-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto;
  gap: 8px;
  align-items: end;
  padding-top: 4px;
}

.truck-add-form {
  padding: 10px;
  border: 1px dashed #b8c6dd;
  border-radius: 8px;
  background: #fbfcff;
}

.truck-item-edit-panel .wide,
.truck-add-form .wide {
  grid-column: 1 / 4;
}

.truck-item-edit-panel label,
.truck-add-form label {
  display: grid;
  gap: 4px;
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
}

.truck-item-edit-panel input,
.truck-add-form input {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid #cbd5e7;
  border-radius: 7px;
  padding: 0 8px;
  color: var(--navy);
  background: #f8faff;
  font-size: 12px;
  font-weight: 700;
}

.truck-item-edit-panel button,
.truck-add-form button {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--navy);
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.truck-item-edit-panel button:first-of-type,
.truck-add-form button:first-of-type {
  border-color: var(--navy);
  color: #ffffff;
  background: var(--navy);
}

.truck-add-form > div {
  display: flex;
  gap: 8px;
  align-items: end;
}

.customer-profile-hero {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.customer-profile-logo {
  position: relative;
  width: 118px;
  height: 118px;
}

.customer-profile-logo.editable {
  cursor: pointer;
}

.customer-profile-logo-image {
  width: 100%;
  height: 100%;
  border-radius: 24px;
}

.customer-profile-logo-image .logo-symbol {
  font-size: 30px;
}

.customer-profile-logo-image .customer-logo-fake,
.customer-profile-logo-image.customer-logo-fake {
  border-radius: 24px;
}

.customer-profile-logo-image .customer-logo-initials,
.customer-profile-logo-image .customer-logo-error-fallback,
.project-profile-logo-image .customer-logo-initials,
.project-profile-logo-image .customer-logo-error-fallback {
  font-size: 1.6rem;
}

.customer-profile-logo-image .logo-accent {
  right: -24px;
  bottom: -24px;
  width: 76px;
  height: 76px;
}

.customer-profile-logo .photo-edit-button {
  top: 8px;
  right: 8px;
}

.customer-profile-avatar {
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: var(--navy);
  background: #e9f0ff;
  font-size: 30px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(6, 22, 83, 0.06);
}

.customer-profile-avatar.coral {
  background: #ffe8e4;
}

.customer-profile-avatar.green {
  background: #dff4d4;
}

.customer-profile-avatar.mint {
  background: #daf8ee;
}

.customer-profile-avatar.teal {
  background: #d8f5ef;
}

.customer-profile-avatar.gold {
  background: #fff0c7;
}

.customer-profile-avatar.purple {
  background: #ebe6ff;
}

.customer-profile-avatar.photo {
  color: #ffffff;
  background: linear-gradient(135deg, #546b8f, #d0b37a);
}

.customer-detail .contact-item {
  grid-template-columns: 34px minmax(0, 1fr);
}

.customer-detail .contact-item span {
  width: 28px;
}

.customer-document-list,
.customer-credit-panel {
  display: grid;
  gap: 8px;
}

.credit-document-list {
  display: grid;
  gap: 8px;
}

.customer-section-status {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.customer-section-status strong {
  color: var(--navy);
  font-size: 13px;
}

.customer-section-status span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.customer-section-status.ready strong {
  color: var(--green);
}

.customer-section-status.not-ready strong {
  color: var(--red);
}

.customer-document-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(100px, auto);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.document-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 7px;
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
}

.customer-document-row.expired .document-icon {
  color: var(--red);
}

.customer-document-row strong,
.customer-document-row em,
.customer-document-row small {
  display: block;
  min-width: 0;
}

.customer-document-row strong {
  color: var(--navy);
  font-size: 13px;
}

.customer-document-row em {
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.customer-document-row.expired em {
  color: var(--red);
}

.customer-document-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.credit-meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f7;
}

.credit-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.customer-credit-panel.over-limit .credit-meter span {
  background: var(--red);
}

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

.credit-grid div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.credit-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.credit-grid strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credit-grid strong.negative {
  color: var(--red);
}

.customer-rate-card {
  display: grid;
  gap: 8px;
}

.customer-pricing-sheet-list {
  display: grid;
  gap: 8px;
}

.customer-pricing-sheet {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.customer-pricing-sheet > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
  padding: 6px;
  background: #f8faff;
}

.customer-pricing-sheet > header > button:first-child {
  min-width: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  gap: 7px;
  align-items: center;
  border: 0;
  padding: 4px;
  color: var(--navy);
  background: transparent;
  text-align: left;
}

.customer-pricing-sheet > header strong,
.customer-pricing-sheet > header small {
  display: block;
}

.customer-pricing-sheet > header strong {
  font-size: 12px;
}

.customer-pricing-sheet > header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.customer-pricing-sheet > header em {
  border-radius: 999px;
  padding: 4px 6px;
  color: var(--green);
  background: #e8f7e6;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.customer-pricing-sheet > header b {
  color: var(--muted);
  font-size: 16px;
  text-align: center;
}

.customer-pricing-sheet-rates {
  display: grid;
}

.customer-pricing-sheet-rates > section {
  border-top: 1px solid var(--line);
}

.customer-pricing-sheet-rates > section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: #fbfcfe;
}

.customer-pricing-sheet-rates > section > header strong {
  color: var(--navy);
  font-size: 10px;
}

.customer-pricing-sheet-rates > section > header small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.customer-pricing-rate-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-top: 1px solid #edf1f7;
}

.customer-pricing-rate-row.inactive {
  background: #f7f8fb;
  opacity: 0.72;
}

.customer-pricing-rate-controls {
  display: grid;
  gap: 5px;
}

.customer-pricing-active-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
}

.customer-pricing-active-toggle input {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  accent-color: var(--red);
}

.customer-pricing-rate-display {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.customer-pricing-rate-display small {
  color: #178342;
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-pricing-rate-row.inactive .customer-pricing-rate-display small {
  color: var(--muted);
}

.customer-pricing-rate-row strong,
.customer-pricing-rate-row small {
  display: block;
}

.customer-pricing-rate-row strong {
  color: var(--navy);
  font-size: 10px;
}

.customer-pricing-rate-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.customer-pricing-rate-row em {
  color: #1646a3;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.customer-pricing-rate-row input:not([type="checkbox"]),
.customer-pricing-sheet-fields input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid #cdd7e6;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--navy);
  background: #ffffff;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  outline: none;
}

.customer-pricing-rate-row input:not([type="checkbox"]):focus,
.customer-pricing-sheet-fields input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px rgba(6, 22, 83, 0.1);
}

.customer-pricing-rate-row input:not([type="checkbox"]):focus::placeholder {
  color: transparent;
}

.customer-pricing-sheet-editor {
  display: grid;
  gap: 8px;
  border: 1px solid #cdd8e8;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.customer-pricing-sheet > .customer-pricing-sheet-editor {
  border: 0;
  border-top: 1px solid #cdd8e8;
  border-radius: 0;
}

.customer-pricing-sheet-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  background: #f8faff;
}

.customer-pricing-sheet-fields > label {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.customer-pricing-sheet-fields .customer-pricing-default-field {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--navy);
}

.customer-pricing-default-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
}

.customer-pricing-sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 0 10px 10px;
}

.customer-pricing-sheet-actions .danger {
  margin-right: auto;
  border-color: #f0b8bc;
  color: var(--red);
  background: #fff7f7;
}

.customer-pricing-sheet-add {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed #b8c8df;
  border-radius: 8px;
  color: #1646a3;
  background: #ffffff;
  font-size: 10px;
  font-weight: 900;
}

.customer-pricing-sheet-add span {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid #b8c8df;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
}

.customer-pricing-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.customer-pricing-heading-row .customer-section-status {
  min-width: 0;
}

.customer-pricing-brochure-button {
  min-width: 82px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid #b9c9df;
  border-radius: 8px;
  padding: 6px 9px;
  color: #1646a3;
  background: #ffffff;
  font-size: 9px;
  font-weight: 900;
}

.customer-pricing-brochure-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.customer-pricing-brochure-button:hover,
.customer-pricing-brochure-button:focus-visible {
  border-color: #1646a3;
  outline: none;
}

.pricing-brochure-dialog {
  width: min(calc(100% - 12px), 390px);
  max-width: 390px;
  max-height: calc(100dvh - 12px);
  border: 0;
  padding: 0;
  background: transparent;
}

.pricing-brochure-dialog::backdrop {
  background: rgba(3, 12, 44, 0.58);
  backdrop-filter: blur(2px);
}

.pricing-brochure-panel {
  max-height: calc(100dvh - 12px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #d5ddea;
  border-radius: 8px;
  color: var(--navy);
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(3, 12, 44, 0.26);
}

.pricing-brochure-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 2px solid var(--red);
  background: #ffffff;
}

.pricing-brochure-dialog-header span,
.pricing-brochure-dialog-header h2 {
  display: block;
  margin: 0;
}

.pricing-brochure-dialog-header span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-brochure-dialog-header h2 {
  margin-top: 3px;
  font-size: 15px;
}

.pricing-brochure-body {
  min-height: 0;
  overflow: auto;
  padding: 6px;
  background: #eef2f8;
}

.pricing-brochure-document {
  overflow: hidden;
  border: 1px solid #d5ddea;
  border-radius: 8px;
  background: #ffffff;
}

.pricing-brochure-hero {
  display: grid;
  gap: 14px;
  padding: 18px;
  color: #ffffff;
  background: var(--navy);
  border-bottom: 4px solid var(--red);
}

.pricing-brochure-brand span,
.pricing-brochure-hero > div:last-child span,
.pricing-brochure-hero > div:last-child strong {
  display: block;
}

.pricing-brochure-brand-logo {
  width: 154px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  padding: 4px 7px;
  background: #ffffff;
}

.pricing-brochure-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pricing-brochure-brand > span:last-child,
.pricing-brochure-hero > div:last-child span {
  margin-top: 5px;
  color: #b9d6ff;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-brochure-hero > div:last-child strong {
  max-width: 280px;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.25;
}

.pricing-brochure-customer {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}

.pricing-brochure-customer .pricing-brochure-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.pricing-brochure-customer > div > span,
.pricing-brochure-customer > div > small,
.pricing-brochure-customer aside span,
.pricing-brochure-customer aside small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.pricing-brochure-customer h3,
.pricing-brochure-customer p {
  margin: 0;
}

.pricing-brochure-customer h3 {
  margin-top: 2px;
  font-size: 16px;
}

.pricing-brochure-customer p {
  margin: 2px 0;
  color: #34466f;
  font-size: 9px;
  font-weight: 700;
}

.pricing-brochure-customer aside {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  align-items: center;
}

.pricing-brochure-customer aside strong {
  font-size: 9px;
}

.pricing-brochure-sheet-list {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.pricing-brochure-sheet {
  overflow: hidden;
  border: 1px solid #cfd9e8;
  border-radius: 8px;
  background: #ffffff;
}

.pricing-brochure-sheet > header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-bottom: 2px solid #21a7a1;
  background: #f3f7fc;
}

.pricing-brochure-sheet > header span,
.pricing-brochure-sheet > header h4,
.pricing-brochure-sheet > header p {
  display: block;
  margin: 0;
}

.pricing-brochure-sheet > header span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-brochure-sheet > header h4 {
  margin-top: 2px;
  font-size: 13px;
}

.pricing-brochure-sheet > header p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.pricing-brochure-sheet > header em {
  border-radius: 999px;
  padding: 4px 6px;
  color: var(--green);
  background: #e8f7e6;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
}

.pricing-brochure-day-costs {
  padding: 9px;
  border-bottom: 1px solid var(--line);
  background: #fffdf6;
}

.pricing-brochure-day-costs > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pricing-brochure-day-costs > header strong {
  font-size: 9px;
}

.pricing-brochure-day-costs > header small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  text-align: right;
}

.pricing-brochure-day-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 7px;
  border: 1px solid #d8deea;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.pricing-brochure-day-cost {
  min-width: 0;
  padding: 7px 6px;
  border-right: 1px solid #d8deea;
}

.pricing-brochure-day-cost:last-child {
  border-right: 0;
}

.pricing-brochure-day-cost span,
.pricing-brochure-day-cost strong,
.pricing-brochure-day-cost small {
  display: block;
}

.pricing-brochure-day-cost span {
  color: var(--muted);
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-brochure-day-cost strong {
  margin-top: 3px;
  color: #1646a3;
  font-size: 11px;
}

.pricing-brochure-day-cost small {
  margin-top: 3px;
  color: #485879;
  font-size: 6px;
  font-weight: 700;
  line-height: 1.25;
}

.pricing-brochure-day-costs > p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 6px;
  font-weight: 700;
}

.pricing-brochure-rate-groups {
  display: grid;
}

.pricing-brochure-rate-groups > section + section {
  border-top: 1px solid var(--line);
}

.pricing-brochure-group-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  background: #fafbfd;
  border-bottom: 1px solid var(--line);
}

.pricing-brochure-group-title strong {
  font-size: 9px;
}

.pricing-brochure-group-title small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
}

.pricing-brochure-rate-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border-bottom: 1px solid #edf1f7;
}

.pricing-brochure-rate-row:last-child {
  border-bottom: 0;
}

.pricing-brochure-rate-row strong,
.pricing-brochure-rate-row small {
  display: block;
}

.pricing-brochure-rate-row strong {
  font-size: 9px;
}

.pricing-brochure-rate-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.pricing-brochure-rate-row b {
  color: #1646a3;
  font-size: 9px;
  text-align: right;
}

.pricing-brochure-footer {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-top: 2px solid var(--red);
  background: #f8faff;
}

.pricing-brochure-footer strong,
.pricing-brochure-footer span {
  display: block;
}

.pricing-brochure-footer strong {
  font-size: 10px;
}

.pricing-brochure-footer span,
.pricing-brochure-footer p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.pricing-brochure-empty {
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
  font-weight: 800;
}

/* Formal customer pricing proposal */
.pricing-brochure-document {
  color: #0b1b45;
  border-color: #c8d2e2;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(7, 25, 69, 0.08);
}

.pricing-brochure-letterhead {
  min-height: 118px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px 12px;
  background: #ffffff;
}

.pricing-brochure-letterhead span,
.pricing-brochure-letterhead strong,
.pricing-brochure-letterhead small {
  display: block;
}

.pricing-brochure-brand-logo {
  width: 134px;
  height: 86px;
  padding: 0;
  border-radius: 0;
}

.pricing-brochure-brand > span:last-child {
  margin-top: 4px;
  color: #4d5f83;
  font-size: 7px;
  letter-spacing: 0;
}

.pricing-brochure-title-block {
  text-align: right;
}

.pricing-brochure-title-block span {
  color: #687896;
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-brochure-title-block strong {
  margin-top: 4px;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.1;
}

.pricing-brochure-title-block small {
  margin-top: 4px;
  color: #4d5f83;
  font-size: 7px;
  font-weight: 700;
}

.pricing-brochure-accent {
  height: 5px;
  background: var(--red);
}

.pricing-brochure-accent span {
  width: 28%;
  height: 100%;
  display: block;
  background: #1b8f98;
}

.pricing-brochure-customer {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 13px 12px;
  background: #fbfcfe;
}

.pricing-brochure-customer .pricing-brochure-logo {
  width: 42px;
  height: 42px;
  border-radius: 6px;
}

.pricing-brochure-customer > div > span,
.pricing-brochure-customer > div > small,
.pricing-brochure-customer aside span,
.pricing-brochure-customer aside small {
  color: #657592;
  font-size: 7px;
  font-weight: 800;
}

.pricing-brochure-customer h3 {
  margin-top: 3px;
  font-size: 15px;
}

.pricing-brochure-customer p {
  margin: 3px 0;
  font-size: 8px;
}

.pricing-brochure-customer aside {
  grid-column: 2;
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 8px;
  justify-content: start;
  align-items: baseline;
}

.pricing-brochure-customer aside span {
  grid-column: 1;
}

.pricing-brochure-customer aside strong {
  grid-column: 2;
  font-size: 8px;
}

.pricing-brochure-customer aside small {
  grid-column: 1 / -1;
  color: #1646a3;
}

.pricing-brochure-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #d7dfeb;
  background: #ffffff;
}

.pricing-brochure-summary > div {
  min-width: 0;
  padding: 9px 8px;
  border-right: 1px solid #e0e6ef;
}

.pricing-brochure-summary > div:last-child {
  border-right: 0;
}

.pricing-brochure-summary span,
.pricing-brochure-summary strong {
  display: block;
}

.pricing-brochure-summary span {
  color: #71809c;
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-brochure-summary strong {
  margin-top: 3px;
  font-size: 8px;
}

.pricing-brochure-sheet-list {
  gap: 12px;
  padding: 12px 10px;
  background: #f2f5f9;
}

.pricing-brochure-sheet {
  border-color: #c6d1e1;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(9, 31, 76, 0.06);
}

.pricing-brochure-sheet > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 11px 12px;
  color: #ffffff;
  border-bottom: 3px solid var(--red);
  background: var(--navy);
}

.pricing-brochure-sheet > header > div {
  grid-row: 1 / 3;
}

.pricing-brochure-sheet > header span {
  color: #b9c9e5;
  font-size: 6px;
}

.pricing-brochure-sheet > header h4 {
  color: #ffffff;
  font-size: 13px;
}

.pricing-brochure-sheet > header aside {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
}

.pricing-brochure-sheet > header aside span,
.pricing-brochure-sheet > header aside strong {
  display: block;
}

.pricing-brochure-sheet > header aside strong {
  margin-top: 2px;
  color: #ffffff;
  font-size: 8px;
}

.pricing-brochure-sheet > header em {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  padding: 3px 6px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  background: transparent;
  font-size: 6px;
  text-transform: uppercase;
}

.pricing-brochure-day-costs {
  padding: 10px;
  background: #f7f9fc;
}

.pricing-brochure-day-costs > header strong {
  font-size: 9px;
}

.pricing-brochure-day-grid {
  gap: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pricing-brochure-day-cost {
  padding: 8px 6px;
  border: 1px solid #d3dcea;
  border-radius: 4px;
  background: #ffffff;
}

.pricing-brochure-day-cost:last-child {
  border-right: 1px solid #d3dcea;
}

.pricing-brochure-day-cost strong {
  font-size: 10px;
}

.pricing-brochure-rate-groups > section + section {
  border-top: 2px solid #d5deea;
}

.pricing-brochure-group-title {
  padding: 8px 9px;
  border-bottom: 1px solid #cfd8e6;
  border-left: 3px solid var(--red);
  background: #edf2f7;
}

.pricing-brochure-rate-head,
.pricing-brochure-rate-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr) auto;
  gap: 7px;
  align-items: center;
}

.pricing-brochure-rate-head {
  padding: 5px 9px;
  color: #6e7d98;
  border-bottom: 1px solid #dfe5ee;
  background: #fafbfd;
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-brochure-rate-head span:last-child {
  text-align: right;
}

.pricing-brochure-rate-row {
  min-height: 38px;
  padding: 7px 9px;
}

.pricing-brochure-rate-row strong {
  font-size: 8px;
}

.pricing-brochure-rate-row small {
  margin-top: 0;
  font-size: 6px;
  line-height: 1.25;
}

.pricing-brochure-rate-row b {
  font-size: 8px;
}

.pricing-brochure-footer {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: end;
  padding: 12px;
  color: #ffffff;
  border-top: 4px solid var(--red);
  background: var(--navy);
}

.pricing-brochure-contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 10px 12px;
  overflow: hidden;
  border: 1px solid #cbd6e5;
  border-left: 4px solid #1b8f98;
  border-radius: 5px;
  background: #ffffff;
}

.pricing-brochure-contact > div {
  min-width: 0;
  padding: 10px;
}

.pricing-brochure-contact > div + div {
  border-left: 1px solid #dce3ed;
}

.pricing-brochure-contact span,
.pricing-brochure-contact strong,
.pricing-brochure-contact small,
.pricing-brochure-contact a {
  display: block;
}

.pricing-brochure-contact span {
  color: #6a7a96;
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-brochure-contact strong {
  margin-top: 4px;
  font-size: 10px;
}

.pricing-brochure-contact small {
  margin-top: 2px;
  color: #536482;
  font-size: 7px;
  font-weight: 700;
}

.pricing-brochure-contact p {
  display: grid;
  gap: 2px;
  margin: 6px 0 0;
}

.pricing-brochure-contact a {
  min-width: 0;
  color: #1646a3;
  font-size: 6px;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.pricing-brochure-footer span,
.pricing-brochure-footer p {
  color: #c4d1e7;
}

.pricing-brochure-footer > div:last-child {
  text-align: right;
}

.pricing-brochure-footer em {
  color: #ffffff;
  font-size: 6px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-brochure-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.pricing-brochure-actions button {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-inline: 8px;
  font-size: 9px;
}

.pricing-brochure-actions svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.brochure-text-dialog {
  width: min(calc(100% - 24px), 340px);
  max-width: 340px;
  border: 0;
  padding: 0;
  background: transparent;
}

.brochure-text-dialog::backdrop {
  background: rgba(3, 12, 44, 0.58);
}

.brochure-text-panel {
  overflow: hidden;
  border: 1px solid #d5ddea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(3, 12, 44, 0.26);
}

.brochure-text-panel > header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 2px solid var(--red);
}

.brochure-text-panel > header span,
.brochure-text-panel > header h2 {
  display: block;
  margin: 0;
}

.brochure-text-panel > header span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.brochure-text-panel > header h2 {
  margin-top: 2px;
  font-size: 16px;
}

.brochure-text-actions {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.brochure-text-actions button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.brochure-text-actions svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.customer-rate-assignment {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.customer-rate-assignment > span {
  min-width: 0;
}

.customer-rate-assignment small,
.customer-rate-assignment strong {
  display: block;
}

.customer-rate-assignment small {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-rate-assignment strong {
  color: var(--navy);
  font-size: 13px;
}

.customer-rate-tier-select {
  min-width: 88px;
}

.customer-tier-rate-summary {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.customer-tier-rate-summary header,
.customer-tier-rate-summary > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.customer-tier-rate-summary header {
  padding: 9px 10px;
  background: #f7faff;
}

.customer-tier-rate-summary header strong {
  color: var(--navy);
  font-size: 12px;
}

.customer-tier-rate-summary header small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.customer-tier-rate-summary > div {
  min-height: 36px;
  padding: 6px 10px;
  border-top: 1px solid #edf1f7;
}

.customer-tier-rate-summary > div span,
.customer-tier-rate-summary > div strong {
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
}

.customer-tier-rate-summary > div span small {
  display: inline;
  margin-left: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.customer-tier-rate-summary > div strong {
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.customer-dynamic-pricing-summary {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.customer-dynamic-pricing-summary header,
.customer-dynamic-pricing-summary > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 10px;
  align-items: center;
}

.customer-dynamic-pricing-summary header {
  padding: 9px 10px;
  background: #f7faff;
}

.customer-dynamic-pricing-summary header strong,
.customer-dynamic-pricing-summary header small {
  color: var(--navy);
  font-size: 11px;
}

.customer-dynamic-pricing-summary header small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-align: right;
}

.customer-dynamic-pricing-summary > div {
  min-height: 40px;
  padding: 7px 10px;
  border-top: 1px solid #edf1f7;
}

.customer-dynamic-pricing-summary > div span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-dynamic-pricing-summary > div strong {
  color: var(--navy);
  font-size: 10px;
  line-height: 1.25;
}

.customer-rate-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(82px, 0.85fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.rate-tier {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--navy);
  font-size: 11px;
  font-weight: 900;
}

.customer-rate-row strong,
.customer-rate-row small {
  display: block;
  min-width: 0;
}

.customer-rate-row strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-rate-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-contact-list {
  display: grid;
  gap: 8px;
}

.customer-contact-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.customer-contact-main {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  border: 0;
  padding: 10px 12px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.customer-contact-main:hover .primary-text,
.customer-contact-main:focus-visible .primary-text {
  text-decoration: underline;
}

.customer-contact-main:focus-visible {
  outline: 2px solid rgba(6, 22, 83, 0.22);
  outline-offset: -2px;
}

.customer-contact-main .customer-avatar {
  width: 42px;
  height: 42px;
  font-size: 14px;
}

.customer-contact-card.open .customer-chevron {
  transform: rotate(90deg);
}

.customer-contact-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 12px 12px 68px;
  border-top: 1px solid var(--line);
  background: #fbfcff;
}

.customer-contact-detail div {
  min-width: 0;
}

.customer-contact-detail span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-contact-detail strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-contact-detail p {
  grid-column: 1 / -1;
  margin: 0;
  color: #31486f;
  font-size: 12px;
  line-height: 1.35;
}

.customer-contact-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.customer-contact-actions button,
.customer-contact-edit-form button {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--navy);
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.customer-contact-actions button:first-child,
.customer-contact-edit-form button:first-of-type {
  border-color: var(--navy);
  color: #ffffff;
  background: var(--navy);
}

.customer-contact-actions .danger {
  color: var(--red);
}

.customer-contact-edit-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.customer-contact-edit-form label {
  display: grid;
  gap: 4px;
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
}

.customer-contact-edit-form label.wide {
  grid-column: 1 / -1;
}

.customer-contact-edit-form input {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid #cbd5e7;
  border-radius: 7px;
  padding: 0 8px;
  color: var(--navy);
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.customer-contact-edit-form > div {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.add-contact-card {
  padding: 10px 12px;
  border-style: dashed;
  background: #fbfcff;
}

.customer-contact-add-row {
  min-height: 44px;
}

.customer-project-list {
  display: grid;
  gap: 8px;
}

.customer-project-row {
  min-height: 56px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.customer-project-row > span:first-child {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--navy);
  background: #f2f5fb;
}

.customer-project-row svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.3;
}

.customer-project-row strong,
.customer-project-row small,
.customer-project-row b {
  display: block;
}

.customer-project-row strong {
  color: var(--navy);
  font-size: 13px;
  line-height: 1.15;
}

.customer-project-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.customer-project-row em {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--green);
  background: #e8f7e6;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.customer-project-row em.missing {
  color: var(--red);
  background: #fff0f0;
}

.customer-project-row b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.customer-notes {
  cursor: pointer;
}

.customer-notes .inline-detail-input {
  width: 100%;
}

.customer-profile-delete-row,
.project-profile-delete-row {
  padding: 8px 12px 28px;
}

.customer-profile-delete-button,
.project-profile-delete-button {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
}

.detail-notes {
  padding-left: 12px;
  padding-right: 12px;
}

.detail-notes p {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.4;
}

.detail-notes small {
  color: var(--muted);
  font-size: 12px;
}

.calendar-screen {
  padding: 14px 12px 0;
  color: var(--navy);
}

.driver-weekly-screen {
  padding: 0;
}

.calendar-controls {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.calendar-controls > button {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: #ffffff;
}

.calendar-controls > button:not(.weekly-date-button) {
  font-size: 22px;
  font-weight: 800;
}

.weekly-date-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--navy);
  background: #ffffff;
  font-size: 12px;
  text-align: center;
  font-weight: 900;
}

.weekly-date-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-date-button small {
  color: var(--muted);
  font-size: 10px;
}

.weekly-mini-calendar {
  top: 42px;
  left: 48px;
  right: 48px;
}

.mini-day.in-week {
  background: #e8f0ff;
}

.mini-day.in-week.selected {
  color: #ffffff;
  background: var(--navy);
}

.dispatch-calendar {
  display: grid;
  grid-template-columns: 82px repeat(7, minmax(38px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #ffffff;
}

.driver-weekly-calendar {
  grid-template-columns: 76px repeat(7, minmax(34px, 1fr));
}

.driver-weekly-calendar .calendar-driver,
.driver-weekly-calendar .calendar-day {
  min-height: 72px;
}

.calendar-head,
.calendar-driver,
.calendar-day {
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.calendar-head {
  min-height: 38px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 5px 3px;
  background: #f7f9fd;
  color: var(--muted);
  text-align: center;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-head strong {
  color: var(--navy);
  font-size: 8px;
  line-height: 1;
}

.driver-head {
  justify-items: start;
  padding-left: 7px;
  color: var(--navy);
  text-align: left;
}

.calendar-driver {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 7px 6px;
  background: #fbfcff;
}

.calendar-driver strong {
  display: block;
  overflow: hidden;
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-driver span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.calendar-day {
  min-height: 58px;
  display: grid;
  gap: 3px;
  align-content: start;
  padding: 3px;
  background: #ffffff;
}

.calendar-day.empty {
  background: #ffffff;
}

.calendar-assignment {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 2px;
  border-radius: 4px;
  padding: 4px;
  line-height: 1.1;
}

button.calendar-assignment {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

button.calendar-assignment:hover,
button.calendar-assignment:focus-visible {
  outline: 2px solid rgba(6, 22, 83, 0.22);
  outline-offset: 1px;
  filter: saturate(1.04);
}

.calendar-assignment strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--navy);
  font-size: 7px;
  font-weight: 900;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.calendar-assignment em {
  display: block;
  overflow: hidden;
  color: #354c75;
  font-size: 6px;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-assignment span {
  color: #344769;
  font-size: 7px;
  font-weight: 700;
}

.calendar-assignment.blue {
  background: #e8f0ff;
}

.calendar-assignment.yellow {
  background: #fff4ce;
}

.calendar-assignment.green {
  background: #e7f6e7;
}

.calendar-assignment.purple {
  background: #eee9ff;
}

.calendar-assignment.gray {
  background: #eef1f5;
}

.calendar-assignment.red {
  background: #fff0f0;
}

.fab {
  position: absolute;
  right: 24px;
  bottom: 116px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--navy);
  box-shadow: var(--shadow);
  z-index: 3;
  transition: transform 180ms ease, opacity 140ms ease;
}

.fab svg {
  width: 30px;
  height: 30px;
}

.bottom-nav {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: max(12px, env(safe-area-inset-bottom));
  height: 78px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(6, 22, 83, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 180ms ease, opacity 140ms ease;
}

.phone-frame.chrome-collapsed .bottom-nav {
  transform: translateY(calc(100% + 40px));
  opacity: 0;
  pointer-events: none;
}

.phone-frame.chrome-collapsed .fab {
  transform: translateY(190px);
  opacity: 0;
  pointer-events: none;
}

.nav-item {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 8px 4px 9px;
  color: var(--navy);
  background: transparent;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.08;
  text-transform: uppercase;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.nav-item > span:not(.work-order-badge) {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: visible;
  text-align: center;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.nav-item .work-order-badge {
  position: absolute;
  top: 7px;
  right: 18px;
  z-index: 2;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.nav-item .work-order-badge[hidden] {
  display: none;
}

.nav-item:last-child {
  border-right: 0;
}

.nav-item.active {
  color: var(--red);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 3px;
  background: var(--red);
}

.entry-dialog {
  width: min(420px, calc(100vw - 32px));
  border: 0;
  border-radius: 12px;
  padding: 0;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.entry-dialog::backdrop {
  background: rgba(6, 22, 83, 0.45);
}

.truck-switch-dialog {
  width: min(420px, calc(100vw - 32px));
  border: 0;
  border-radius: 12px;
  padding: 0;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.truck-switch-dialog::backdrop {
  background: rgba(6, 22, 83, 0.45);
}

.truck-switch-panel {
  padding: 18px;
}

.truck-switch-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.truck-switch-panel h2 {
  margin: 0;
  color: var(--navy);
  font-size: 21px;
}

.truck-switch-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.truck-switch-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--navy);
  background: #ffffff;
  text-align: left;
}

.truck-switch-option:hover,
.truck-switch-option:focus-visible,
.truck-switch-option.active {
  outline: none;
  border-color: rgba(6, 22, 83, 0.28);
  background: #f5f8ff;
}

.truck-switch-option.reassignment {
  border-color: rgba(236, 16, 24, 0.24);
  background: #fffafa;
}

.truck-switch-option.reassignment em {
  color: var(--red);
  background: #fff0f0;
}

.truck-switch-option strong,
.truck-switch-option small {
  display: block;
}

.truck-switch-option strong {
  font-size: 15px;
}

.truck-switch-option small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.truck-switch-option em {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--green);
  background: #e8f7e6;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.truck-switch-option.active em {
  color: var(--navy);
  background: #eef2fb;
}

.truck-switch-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.timesheet-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.timesheet-documents-dialog {
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  border: 0;
  border-radius: 14px;
  padding: 0;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.timesheet-dialog::backdrop {
  background: rgba(6, 22, 83, 0.48);
}

.timesheet-documents-dialog::backdrop {
  background: rgba(6, 22, 83, 0.34);
}

.invoice-dialog {
  width: min(392px, calc(100vw - 28px));
  max-height: min(700px, calc(100vh - 44px));
  border: 0;
  border-radius: 12px;
  padding: 0;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.invoice-dialog::backdrop {
  background: rgba(6, 22, 83, 0.48);
}

.invoice-panel {
  max-height: min(700px, calc(100vh - 44px));
  overflow: auto;
  padding: 14px;
}

.invoice-panel > header {
  position: sticky;
  top: -14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -14px -14px 12px;
  padding: 14px 14px 10px;
  border-bottom: 2px solid var(--red);
  background: #ffffff;
}

.invoice-panel > header span,
.invoice-customer-summary span,
.invoice-charge-section header span,
.invoice-charge-row label span,
.invoice-notes > span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.invoice-panel > header h2 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.15;
}

.invoice-dialog-body {
  display: grid;
  gap: 12px;
}

.invoice-customer-summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faff;
}

.invoice-customer-logo {
  width: 42px;
  height: 42px;
}

.invoice-customer-summary strong,
.invoice-customer-summary small {
  display: block;
}

.invoice-customer-summary strong {
  margin-top: 2px;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.15;
}

.invoice-customer-link {
  display: block;
  margin-top: 2px;
  border: 0;
  padding: 0;
  color: var(--navy);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  cursor: pointer;
}

.invoice-customer-link:focus-visible {
  outline: 2px solid rgba(6, 22, 83, 0.24);
  outline-offset: 2px;
}

.invoice-customer-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.invoice-customer-summary > div:last-child {
  display: grid;
  justify-items: end;
  gap: 3px;
  text-align: right;
}

.invoice-customer-summary em {
  border-radius: 999px;
  padding: 5px 7px;
  color: #9a6c00;
  background: #fff2bf;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.invoice-customer-summary em.approved,
.invoice-customer-summary em.ready {
  color: var(--green);
  background: #e8f7e6;
}

.invoice-pricing-sheet-control {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faff;
}

.invoice-pricing-sheet-control label {
  min-width: 0;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.invoice-pricing-sheet-control label > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-pricing-sheet-control select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid #cdd7e6;
  border-radius: 6px;
  padding: 0 28px 0 8px;
  color: var(--navy);
  background: #ffffff;
  font: inherit;
  font-size: 10px;
  font-weight: 900;
}

.invoice-pricing-sheet-control select:disabled {
  color: var(--muted);
  background: #eef1f6;
}

.invoice-pricing-sheet-control > small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
}

.invoice-pricing-breakdown {
  display: grid;
  gap: 7px;
  margin-top: 5px;
  padding-top: 8px;
  border-top: 1px solid #dbe3ef;
}

.invoice-pricing-breakdown > section {
  overflow: hidden;
  border: 1px solid #e0e6f0;
  border-radius: 7px;
  background: #ffffff;
}

.invoice-pricing-breakdown > section > strong {
  display: block;
  padding: 6px 8px;
  color: var(--navy);
  background: #eef3fb;
  font-size: 9px;
  text-transform: uppercase;
}

.invoice-pricing-breakdown > section > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border-top: 1px solid #edf1f7;
}

.invoice-pricing-breakdown span,
.invoice-pricing-breakdown b,
.invoice-pricing-breakdown small {
  min-width: 0;
  display: block;
}

.invoice-pricing-breakdown b {
  color: var(--navy);
  font-size: 10px;
}

.invoice-pricing-breakdown small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.invoice-pricing-breakdown em {
  color: #1646a3;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.invoice-pricing-empty {
  margin-top: 5px;
  padding: 8px;
  border-radius: 6px;
  color: #9a6c00;
  background: #fff6d8;
  font-size: 9px;
  font-weight: 800;
}

.invoice-charge-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.invoice-charge-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #f8faff;
}

.invoice-charge-section > header strong {
  display: block;
  margin-top: 2px;
  color: var(--navy);
  font-size: 14px;
}

.invoice-charge-section > header small {
  max-width: 190px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-align: right;
}

.invoice-charge-list {
  display: grid;
}

.invoice-charge-row {
  display: grid;
  grid-template-columns: 24px minmax(72px, 1fr) 66px 72px;
  gap: 6px;
  align-items: end;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}

.invoice-description-input {
  grid-column: 2 / -1;
  grid-row: 1;
}

.invoice-charge-row label:nth-of-type(1) {
  grid-column: 2;
  grid-row: 2;
}

.invoice-charge-row label:nth-of-type(2) {
  grid-column: 3;
  grid-row: 2;
}

.invoice-charge-row input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 7px;
  color: var(--navy);
  background: #ffffff;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.invoice-charge-row input[readonly] {
  border-color: transparent;
  background: #f5f7fb;
}

.invoice-charge-row label {
  display: grid;
  gap: 3px;
}

.invoice-charge-row > strong {
  grid-column: 4;
  grid-row: 2;
  align-self: center;
  color: var(--navy);
  font-size: 11px;
  text-align: right;
}

.invoice-charge-row > small {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.invoice-line-remove {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 22px;
  height: 22px;
  align-self: center;
  border: 1px solid rgba(237, 28, 36, 0.28);
  border-radius: 50%;
  color: var(--red);
  background: #ffffff;
  font-size: 15px;
  line-height: 1;
}

.invoice-line-remove:disabled {
  visibility: hidden;
}

.invoice-add-line {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  background: #ffffff;
  font-weight: 900;
}

.invoice-add-line span {
  font-size: 18px;
  font-weight: 500;
}

.invoice-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px;
  color: var(--navy);
  background: #f8faff;
  font-size: 13px;
  font-weight: 900;
}

.invoice-total-row strong {
  font-size: 18px;
}

.invoice-attachment-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.invoice-attachment-button {
  width: 100%;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto 20px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 0;
  color: var(--navy);
  background: #ffffff;
  text-align: left;
}

.invoice-attachment-button > span:first-child {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.invoice-attachment-button svg {
  width: 18px;
  height: 18px;
}

.invoice-attachment-button strong,
.invoice-attachment-button small {
  display: block;
}

.invoice-attachment-button strong {
  font-size: 12px;
}

.invoice-attachment-button small,
.invoice-attachment-button em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.invoice-attachment-button b {
  font-size: 17px;
  text-align: center;
}

.invoice-timesheet-summary {
  display: grid;
  border-top: 1px solid var(--line);
  background: #f8faff;
}

.invoice-timesheet-summary[hidden] {
  display: none;
}

.invoice-timesheet-summary article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}

.invoice-timesheet-summary article:last-child {
  border-bottom: 0;
}

.invoice-timesheet-summary article > span:last-child {
  text-align: right;
}

.invoice-timesheet-summary strong,
.invoice-timesheet-summary small {
  display: block;
}

.invoice-timesheet-summary strong {
  color: var(--navy);
  font-size: 11px;
}

.invoice-timesheet-summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.invoice-timesheet-summary small.approved {
  color: var(--green);
}

.invoice-timesheet-summary small.unapproved,
.invoice-timesheet-summary small.rejected {
  color: var(--red);
}

.invoice-notes {
  display: grid;
  gap: 5px;
}

.invoice-notes textarea {
  min-height: 58px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--navy);
  background: #ffffff;
  font: inherit;
  font-size: 11px;
}

.invoice-notes textarea[readonly] {
  background: #f5f7fb;
}

.invoice-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.invoice-dialog-actions.single-action {
  grid-template-columns: 1fr;
}

.invoice-approval-lock {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid #f0c86b;
  border-radius: 8px;
  color: #654300;
  background: #fff8df;
}

.invoice-approval-lock strong {
  font-size: 11px;
}

.invoice-approval-lock span {
  font-size: 9px;
  font-weight: 700;
}

.invoice-dialog-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-billing-card {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-billing-card:hover,
.admin-billing-card:focus-visible {
  border-color: rgba(6, 22, 83, 0.28);
  box-shadow: 0 0 0 2px rgba(6, 22, 83, 0.06);
  outline: none;
}

.timesheet-panel {
  height: 100dvh;
  max-height: none;
  box-sizing: border-box;
  overflow: auto;
  padding: 14px;
}

@media (min-width: 900px) {
  dialog.timesheet-dialog[open] {
    inset: 0;
    width: min(760px, calc(100vw - 64px)) !important;
    max-width: 760px !important;
    height: min(860px, calc(100dvh - 48px)) !important;
    max-height: calc(100dvh - 48px) !important;
    margin: auto !important;
    border: 1px solid rgba(6, 22, 83, 0.12);
    border-radius: 18px;
    overflow: hidden;
  }

  .timesheet-panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
    padding: 20px 24px;
  }

  .timesheet-dialog-body {
    width: min(680px, 100%);
    margin-inline: auto;
  }
}

.timesheet-documents-panel {
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 14px;
}

.timesheet-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
}

.timesheet-documents-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
}

.timesheet-panel > header span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.timesheet-documents-panel > header span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.timesheet-panel h2 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.15;
}

.timesheet-documents-panel h2 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.15;
}

.timesheet-dialog-body {
  display: grid;
  gap: 10px;
}

.timesheet-documents-body {
  display: grid;
  gap: 10px;
}

.timesheet-ticket-summary {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faff;
  font: inherit;
  text-align: left;
}

.timesheet-ticket-dispatch-link {
  cursor: pointer;
}

.timesheet-ticket-dispatch-link:hover,
.timesheet-ticket-dispatch-link:focus-visible {
  border-color: rgba(6, 22, 83, 0.22);
  box-shadow: 0 0 0 2px rgba(6, 22, 83, 0.08);
  outline: none;
}

.timesheet-customer-logo {
  width: 38px;
  height: 38px;
}

.timesheet-ticket-summary span,
.timesheet-labor-row > div > span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.timesheet-ticket-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.15;
}

.timesheet-ticket-summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.timesheet-ticket-summary em {
  border-radius: 999px;
  padding: 6px 8px;
  color: var(--green);
  background: #e8f7e6;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.timesheet-ticket-summary em.unapproved,
.timesheet-ticket-summary em.rejected {
  color: var(--red);
  background: #fff0f0;
}

.timesheet-ticket-summary em.submitted {
  color: #9a6c00;
  background: #fff2bf;
}

.timesheet-block {
  display: grid;
  gap: 5px;
}

.timesheet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 86px 28px 38px;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 7px 8px;
  border: 2px solid rgba(6, 22, 83, 0.9);
  border-radius: 8px;
  background: #ffffff;
}

.timesheet-row strong {
  color: var(--navy);
  font-size: 13px;
  line-height: 1.15;
}

.timesheet-person-input,
.timesheet-time-input,
.timesheet-hours-input,
.timesheet-item-input {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 3px 4px;
  color: #000000;
  background: #ffffff;
  font-weight: 800;
  line-height: 1.1;
}

.timesheet-person-input {
  margin-top: 2px;
  color: var(--navy);
  font-size: 13px;
}

.timesheet-person-button {
  width: 100%;
  margin-top: 2px;
  border: 0;
  border-radius: 6px;
  padding: 3px 4px;
  color: var(--navy);
  background: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  text-align: left;
}

.timesheet-person-button:hover,
.timesheet-person-button:focus-visible {
  background: #eef2fb;
  outline: none;
}

.timesheet-time-input {
  text-align: center;
  font-size: 11px;
  font-weight: 900;
}

.timesheet-time-select {
  appearance: auto;
  padding: 3px 2px;
}

.timesheet-hours-input {
  color: #000000;
  font-size: 13px;
  text-align: right;
}

.timesheet-item-input {
  min-height: 24px;
  padding: 2px 1px;
  font-size: 10px;
  letter-spacing: 0;
}

.timesheet-person-input:focus,
.timesheet-time-input:focus,
.timesheet-hours-input:focus,
.timesheet-item-input:focus,
.timesheet-notes textarea:focus {
  outline: none;
  border-color: rgba(6, 22, 83, 0.34);
  box-shadow: 0 0 0 2px rgba(6, 22, 83, 0.08);
}

.timesheet-person-input[readonly],
.timesheet-time-input[readonly],
.timesheet-hours-input[readonly],
.timesheet-item-input[readonly],
.timesheet-notes textarea[readonly] {
  border-color: transparent;
  color: var(--muted);
  background: #f8faff;
}

.timesheet-segment-row strong {
  font-size: 14px;
}

.timesheet-row .timesheet-time-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  color: #000000;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.timesheet-row .timesheet-time-cell small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.timesheet-row em {
  color: #000000;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.timesheet-row em {
  font-size: 12px;
}

.timesheet-items-panel {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 2px solid #000000;
  background: #ffffff;
}

.timesheet-items-panel header {
  padding-bottom: 6px;
  border-bottom: 1px solid #cdd3de;
  color: #000000;
}

.timesheet-materials-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  padding: 0;
  color: var(--navy);
  background: transparent;
  text-align: left;
}

.timesheet-materials-toggle strong {
  color: var(--navy);
  font-size: 14px;
}

.timesheet-materials-toggle span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #d6dce8;
  border-radius: 50%;
  color: var(--navy);
  background: #ffffff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.timesheet-materials-toggle:focus-visible {
  outline: 2px solid rgba(6, 22, 83, 0.24);
  outline-offset: 3px;
}

.timesheet-materials-body {
  display: grid;
  gap: 8px;
}

.timesheet-materials-body[hidden] {
  display: none;
}

.timesheet-items-panel.collapsed header {
  padding-bottom: 0;
  border-bottom: 0;
}

.timesheet-item-list {
  display: grid;
  gap: 4px;
}

.timesheet-item-row {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(58px, 0.8fr) 48px minmax(82px, 1.2fr) 86px 18px;
  align-items: center;
  gap: 3px;
  min-height: 21px;
  color: #000000;
  font-size: 11px;
}

.timesheet-quantity-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px;
}

.timesheet-quantity-cell small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.timesheet-quantity-input {
  text-align: right;
}

.timesheet-description-input {
  padding-left: 6px;
}

.timesheet-billable-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
}

.timesheet-billable-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
  color: #000000;
  font-size: 9px;
  font-weight: 700;
}

.timesheet-item-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--navy);
}

.timesheet-item-row input[type="checkbox"]:disabled + span {
  color: var(--muted);
}

.timesheet-line-remove {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #d6dce8;
  border-radius: 50%;
  color: var(--red);
  background: #ffffff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.timesheet-line-spacer {
  width: 18px;
  height: 18px;
}

.timesheet-receipt-button,
.timesheet-item-detail-button {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
}

.timesheet-receipt-button input,
.timesheet-detail-receipt-button input {
  display: none;
}

.timesheet-receipt-button svg,
.timesheet-item-detail-button svg,
.timesheet-detail-receipt-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timesheet-receipt-button.has-receipt {
  color: var(--green);
}

.timesheet-item-detail-button {
  border-radius: 50%;
  color: var(--muted);
}

.timesheet-item-detail-button:hover,
.timesheet-receipt-button:hover {
  background: #eef2fb;
}

.timesheet-item-detail-card {
  display: grid;
  gap: 9px;
  margin-top: 3px;
  padding: 10px;
  border: 1px solid #cdd3de;
  border-radius: 8px;
  background: #f8faff;
}

.timesheet-item-detail-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 0 7px;
  border-bottom: 1px solid #dfe5ef;
}

.timesheet-item-detail-card header span,
.timesheet-item-detail-grid label > span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.timesheet-item-detail-card header strong {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.1;
}

.timesheet-detail-close {
  border: 1px solid #cdd3de;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--navy);
  background: #ffffff;
  font-size: 10px;
  font-weight: 900;
}

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

.timesheet-item-detail-grid label {
  display: grid;
  gap: 4px;
}

.timesheet-item-detail-grid .wide {
  grid-column: 1 / -1;
}

.timesheet-detail-input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cdd3de;
  border-radius: 7px;
  padding: 7px 8px;
  color: #000000;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.timesheet-detail-input:focus {
  outline: none;
  border-color: rgba(6, 22, 83, 0.34);
  box-shadow: 0 0 0 2px rgba(6, 22, 83, 0.08);
}

.timesheet-detail-input[readonly],
.timesheet-detail-input:disabled {
  color: var(--muted);
  background: #f0f4fa;
}

.timesheet-detail-quantity,
.timesheet-detail-receipt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.timesheet-detail-quantity small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.timesheet-detail-receipt-row {
  grid-template-columns: minmax(96px, auto) minmax(0, 1fr);
}

.timesheet-detail-receipt-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px dashed #b9c3d4;
  border-radius: 7px;
  padding: 6px 8px;
  color: var(--navy);
  background: #ffffff;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.timesheet-detail-receipt-button.has-receipt {
  color: var(--green);
  border-style: solid;
}

.timesheet-detail-check {
  display: flex !important;
  align-items: center;
  gap: 6px;
  color: #000000;
  font-size: 11px;
  font-weight: 900;
}

.timesheet-line-add {
  position: relative;
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #9aa4b4;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.timesheet-line-add::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #cdd3de;
}

.timesheet-line-add span {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1px solid #aeb6c4;
  border-radius: 50%;
  color: #8b95a8;
  background: #ffffff;
  font-size: 13px;
}

.timesheet-category-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding-top: 8px;
}

.timesheet-category-tile {
  min-height: 42px;
  border: 2px solid rgba(6, 22, 83, 0.9);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
}

.timesheet-category-tile strong,
.timesheet-category-tile span {
  display: block;
  color: #000000;
  font-weight: 900;
  line-height: 1.1;
}

.timesheet-category-tile strong {
  font-size: 13px;
}

.timesheet-category-tile span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.timesheet-documents-launcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 11px;
  border: 2px solid #000000;
  background: #ffffff;
}

.timesheet-email-attachment {
  margin: 14px 0;
  border: 1px solid #d9e1f0;
  border-radius: 14px;
  background: #f8faff;
  overflow: hidden;
}

.timesheet-email-attachment.has-match { border-color: #f0b7bd; background: #fff8f9; }
.timesheet-email-attachment.has-attachment { border-color: #9bd4ae; background: #f2fbf5; }
.timesheet-email-attachment > button {
  width: 100%;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  color: #071b5b;
  text-align: left;
  cursor: pointer;
}
.timesheet-email-attachment svg { width: 22px; height: 22px; }
.timesheet-email-attachment strong, .timesheet-email-attachment small { display: block; }
.timesheet-email-attachment small { margin-top: 3px; color: #596987; }
.timesheet-email-attachment em { font-style: normal; font-weight: 800; font-size: 12px; color: #c41230; }
.timesheet-email-attachment.has-attachment em { color: #18823b; }
.timesheet-card-attachment { display: inline-flex !important; align-items: center; justify-content: flex-end; gap: 5px; }
.timesheet-card-attachment svg { width: 14px; height: 14px; color: #c41230; }
.timesheet-card-attachment.attached svg { color: #18823b; }
.timesheet-attachment-viewer { display: grid; gap: 16px; }
.timesheet-attachment-match { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: #fff4f5; color: #071b5b; }
.timesheet-attachment-match.matched { background: #eef9f2; }
.timesheet-attachment-match svg { width: 22px; height: 22px; }
.timesheet-attachment-match strong, .timesheet-attachment-match small { display: block; }
.timesheet-attachment-match small { margin-top: 3px; color: #596987; }
.timesheet-attachment-image, .timesheet-attachment-frame { width: 100%; min-height: 420px; max-height: 68vh; border: 1px solid #d9e1f0; border-radius: 12px; background: white; object-fit: contain; }
.timesheet-attachment-actions { display: flex; gap: 10px; justify-content: flex-end; }
.timesheet-attachment-upload { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.timesheet-attachment-upload svg { width: 18px; height: 18px; }
.timesheet-attachment-upload input { display: none; }

.timesheet-documents-launcher strong {
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.timesheet-documents-open {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #d6dce8;
  border-radius: 50%;
  color: var(--navy);
  background: #ffffff;
}

.timesheet-documents-open svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timesheet-dispatch-ticket {
  display: grid;
  gap: 10px;
}

.driver-dispatch-popup {
  display: grid;
  gap: 10px;
}

.driver-dispatch-response {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #f8faff;
}

.driver-dispatch-response span,
.driver-dispatch-response small {
  display: block;
}

.driver-dispatch-response span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-dispatch-response strong {
  display: block;
  margin-top: 3px;
  color: #9a6c00;
  font-size: 15px;
  line-height: 1.15;
}

.driver-dispatch-response strong.accepted {
  color: var(--green);
}

.driver-dispatch-response strong.rejected {
  color: var(--red);
}

.driver-dispatch-response small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.driver-dispatch-popup-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.driver-dispatch-popup-actions button {
  width: 100%;
  min-width: 0;
  height: 38px;
}

.driver-dispatch-popup-actions .danger-action {
  border-color: rgba(237, 28, 36, 0.42);
  color: var(--red);
  background: #fff6f6;
}

.dispatch-cancel-footer {
  display: flex;
  justify-content: center;
  padding: 8px 0 2px;
}

.dispatch-ticket-edit-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}

.dispatch-ticket-edit-footer button {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 900;
}

.dispatch-ticket-input,
.dispatch-ticket-textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #aebbd2;
  border-radius: 7px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 800;
  padding: 7px 8px;
}

.dispatch-ticket-textarea {
  min-height: 76px;
  resize: vertical;
}

.dispatch-ticket-input.hero-input {
  display: block;
  margin-top: 4px;
}

.dispatch-cancel-button {
  border: 0;
  background: transparent;
  color: var(--red);
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.timesheet-dispatch-hero {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #f8faff;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

button.timesheet-dispatch-hero {
  cursor: pointer;
}

button.timesheet-dispatch-hero:hover {
  border-color: #8aa4d1;
  background: #f1f5ff;
}

button.timesheet-dispatch-hero:focus-visible {
  outline: 3px solid rgba(8, 35, 105, 0.24);
  outline-offset: 2px;
}

.project-record-grid {
  margin-top: 10px;
}

.project-record-grid .project-record-link {
  width: 100%;
  border: 1px solid transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.project-record-grid .project-record-link:hover {
  border-color: #8aa4d1;
  background: #f1f5ff;
}

.project-record-grid .project-record-link:focus-visible {
  outline: 3px solid rgba(8, 35, 105, 0.24);
  outline-offset: 2px;
}

.project-record-status {
  margin: 10px 0 0;
  border-left: 4px solid #2857a6;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f3f7ff;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.project-record-status strong {
  display: block;
  color: var(--navy);
  font-size: 12px;
}

.project-record-status.unreconciled,
.project-record-status.canceled {
  border-left-color: var(--red);
  background: #fff2f2;
}

.project-record-status.closed {
  border-left-color: var(--green);
  background: #eff9ef;
}

.timesheet-dispatch-hero div {
  min-width: 0;
}

.timesheet-dispatch-hero span,
.timesheet-dispatch-section h3,
.timesheet-dispatch-item span,
.timesheet-dispatch-note span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.timesheet-dispatch-hero strong {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
}

.timesheet-dispatch-hero small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.timesheet-dispatch-hero em {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--green);
  background: #e8f7e6;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.timesheet-dispatch-hero em.missing,
.timesheet-dispatch-hero em.stop,
.timesheet-dispatch-hero em.not-ready {
  color: var(--red);
  background: #fff0f0;
}

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

.timesheet-dispatch-grid.compact {
  grid-template-columns: 1fr;
}

.timesheet-dispatch-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 3px 7px;
  align-items: center;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  padding: 8px;
  background: #ffffff;
}

.timesheet-dispatch-item b {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 7px;
  color: var(--navy);
  font-size: 9px;
  line-height: 1;
}

.timesheet-dispatch-item strong {
  min-width: 0;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.timesheet-dispatch-section {
  display: grid;
  gap: 7px;
}

.timesheet-dispatch-section h3 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 12px;
}

.timesheet-dispatch-note {
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
}

.timesheet-dispatch-note p {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.timesheet-employee-documents {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px;
  background: #f8faff;
}

.timesheet-employee-documents header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.timesheet-employee-documents header span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.timesheet-employee-documents header strong {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.15;
}

.timesheet-employee-documents header em {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.timesheet-employee-documents header em.complete {
  color: var(--green);
  background: #e8f7e6;
}

.timesheet-employee-documents header em.needs-documents {
  color: var(--red);
  background: #fff0f0;
}

.timesheet-document-list {
  display: grid;
  gap: 5px;
}

.timesheet-document-row {
  display: grid;
  grid-template-columns: minmax(28px, auto) minmax(0, 1fr) minmax(52px, auto) 24px;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  padding: 7px 8px;
  background: #ffffff;
}

.timesheet-document-row b {
  min-width: 28px;
  width: auto;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 7px;
  color: var(--green);
  padding: 0 4px;
  font-size: 10px;
  line-height: 1;
}

.timesheet-document-row.needs-documents b {
  color: var(--red);
}

.timesheet-document-row strong,
.timesheet-document-row span,
.timesheet-document-row small {
  display: block;
  line-height: 1.15;
}

.timesheet-document-row strong {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.timesheet-document-row span {
  margin-top: 2px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.timesheet-document-row.needs-documents span {
  color: var(--red);
}

.timesheet-document-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timesheet-document-row small.has-attachment {
  color: var(--green);
}

.timesheet-document-attach {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #d6dce8;
  border-radius: 50%;
  color: var(--navy);
  background: #ffffff;
  cursor: pointer;
}

.timesheet-document-attach.has-attachment {
  color: var(--green);
  border-color: rgba(0, 135, 36, 0.35);
  background: #f2fbf1;
}

.timesheet-document-attach svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timesheet-document-attach input {
  display: none;
}

.timesheet-notes {
  display: grid;
  gap: 5px;
}

.timesheet-notes span {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.timesheet-notes textarea {
  min-height: 48px;
  resize: vertical;
  border: 2px solid rgba(6, 22, 83, 0.9);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: #ffffff;
}

.timesheet-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.timesheet-dialog-actions button {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 8px;
  font-size: 12px;
  white-space: nowrap;
}

.timesheet-dialog-actions .primary {
  grid-column: 1 / -1;
  height: 42px;
}

.timesheet-dialog-actions.driver-actions .primary {
  grid-column: auto;
  height: 38px;
}

.timesheet-dialog-actions.single-action {
  grid-template-columns: 1fr;
}

.timesheet-dialog-actions .danger-action {
  border-color: rgba(237, 28, 36, 0.42);
  color: var(--red);
  background: #fff6f6;
}

.entry-dialog form {
  padding: 18px;
}

.entry-dialog header,
.entry-dialog menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.entry-dialog h2 {
  margin: 0;
  color: var(--navy);
  font-size: 21px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

.field-grid {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.field-grid label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
}

.field-grid input,
.field-grid select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
}

.secondary,
.primary {
  height: 40px;
  min-width: 94px;
  border-radius: 8px;
  font-weight: 800;
}

.secondary {
  border: 1px solid var(--line);
  color: var(--navy);
  background: #ffffff;
}

.primary {
  border: 1px solid var(--navy);
  color: #ffffff;
  background: var(--navy);
}

@media (max-width: 520px) {
  .driver-summary-switcher {
    position: relative;
    display: block;
  }

  .driver-summary-switcher > [data-driver-view-shift] {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 30px;
    height: 48px;
    border-radius: 8px;
    font-size: 24px;
    transform: translateY(-50%);
  }

  .driver-summary-switcher > [data-driver-view-shift="-1"] {
    left: 4px;
  }

  .driver-summary-switcher > [data-driver-view-shift="1"] {
    right: 4px;
  }

  .driver-mode-summary {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
    min-height: 86px;
    padding: 10px 42px;
  }

  .driver-mode-summary .driver-list-avatar {
    width: 38px;
    height: 38px;
  }

  .driver-mode-summary em {
    grid-column: 2;
    margin-top: -2px;
  }

  .driver-mode-summary strong {
    overflow-wrap: anywhere;
  }

  .timesheet-documents-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 12px;
  }

  .timesheet-documents-panel {
    max-height: calc(100dvh - 12px);
    padding: 12px;
  }

  .timesheet-panel {
    padding: 12px;
  }

  html,
  body {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app-shell {
    min-height: 100dvh;
    padding: 0;
    background: #ffffff;
  }

  .phone-frame {
    height: auto;
    min-height: 640px;
    overflow: visible;
  }

  .content-card,
  .detail-view .content-card,
  .calendar-view .content-card,
  .driver-mode-view .content-card,
  .admin-mode-view .content-card,
  .sales-mode-view .content-card,
  .auth-view .content-card,
  .driver-mode-view.driver-date-view .content-card,
  .phone-frame.chrome-collapsed .content-card {
    height: auto;
    min-height: calc(100dvh - 185px);
    overflow: visible;
  }

  .list,
  .customer-list,
  .detail-list,
  .calendar-list,
  .driver-mode-list,
  .admin-mode-list,
  .sales-mode-list,
  .auth-list {
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  .bottom-nav {
    position: fixed;
    z-index: 50;
  }

  .fab {
    position: fixed;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr);
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar h1 {
    font-size: clamp(19px, 6.3vw, 28px);
  }

  .brand {
    width: 94px;
    height: 75px;
  }

  .view-button {
    width: 38px;
    height: 40px;
    font-size: 8.5px;
  }

  .header-actions {
    gap: 4px;
  }

  .header-menu-button {
    width: 30px;
  }

  .header-menu-button span {
    width: 22px;
  }

  .table-head,
  .row {
    padding-left: 12px;
    padding-right: 12px;
  }

  .row,
  .table-head {
    column-gap: 6px;
  }

  .table-head.drivers,
  .table-head.trucks,
  .row.drivers,
  .row.trucks {
    grid-template-columns: minmax(148px, 1fr) minmax(58px, 0.52fr) minmax(64px, 0.58fr) 26px;
  }

  .table-head.projects,
  .row.projects {
    grid-template-columns: minmax(150px, 1fr) minmax(72px, 0.54fr) 64px;
  }

  .schedule-assign-button {
    min-height: 36px;
    padding: 0 9px;
    font-size: 11px;
  }

  .assignment-candidate {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 12px;
  }

  .assignment-candidate .driver-list-avatar {
    width: 38px;
    height: 38px;
  }

  .assignment-choose-button {
    grid-column: 2;
    width: 100%;
  }

  .assignment-ranking-note {
    display: block;
  }

  .assignment-ranking-note span {
    margin-top: 3px;
    text-align: left;
  }

  .primary-text {
    font-size: 12px;
  }

  .cell,
  .status {
    font-size: 10px;
  }

  .work-order-popup {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-left: 10px;
    margin-right: 10px;
  }

  .work-order-popup-actions {
    justify-content: stretch;
  }

  .work-order-popup-actions button {
    flex: 1;
  }

  .work-order-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .work-order-logo {
    width: 38px;
    height: 38px;
  }

  .work-order-status {
    grid-column: 2;
    justify-self: start;
  }

  .work-order-card-actions {
    grid-column: 1 / -1;
  }

  .rollup-card,
  .inventory-rollup-card {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .inventory-rollup-card {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .rollup-card em {
    grid-column: 2;
    justify-self: start;
  }

  .rollup-card b,
  .rollup-source {
    grid-column: 2;
  }

  .work-order-detail-grid {
    grid-template-columns: 1fr;
  }

  .work-order-field.wide,
  .work-order-choice.wide {
    grid-column: auto;
  }

  .secondary-text,
  .cell-muted {
    font-size: 10px;
  }

  .entity {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 6px;
  }

  .avatar {
    width: 30px;
    height: 30px;
  }

  .nav-item {
    gap: 3px;
    padding-inline: 3px;
    font-size: 8.5px;
  }

  .nav-item svg {
    width: 21px;
    height: 21px;
  }

  .detail-view .topbar {
    grid-template-columns: 1fr auto 1fr;
  }

  .back-title-button {
    font-size: 18px;
  }

  .detail-edit-button {
    gap: 5px;
    font-size: 16px;
  }

  .detail-edit-button svg {
    width: 23px;
    height: 23px;
  }

  .detail-save-button,
  .detail-cancel-button {
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .driver-detail {
    padding: 18px 12px 0;
  }

  .driver-hero {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 13px;
  }

  .truck-profile-hero {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
  }

  .project-profile-hero {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
  }

  .project-profile-logo {
    width: 92px;
    height: 92px;
  }

  .project-profile-logo .logo-symbol {
    font-size: 22px;
  }

  .project-profile-logo .logo-accent {
    right: -20px;
    bottom: -20px;
    width: 60px;
    height: 60px;
  }

  .truck-profile-photo {
    height: 88px;
    padding: 6px;
  }

  .driver-photo {
    width: 92px;
    height: 92px;
  }

  .driver-photo .active-dot {
    right: 6px;
    bottom: 16px;
    width: 21px;
    height: 21px;
  }

  .driver-name-row {
    display: grid;
    gap: 8px;
  }

  .driver-name-row h2 {
    margin-bottom: 0;
    font-size: 24px;
  }

  .active-pill {
    justify-self: start;
    padding: 7px 11px;
    font-size: 12px;
  }

  .contact-item {
    grid-template-columns: 27px minmax(0, 1fr);
    font-size: 12px;
  }

  .detail-info-grid {
    gap: 18px 12px;
  }

  .detail-info-item {
    grid-template-columns: 29px minmax(0, 1fr);
    gap: 7px;
  }

  .detail-label {
    font-size: 11px;
  }

  .detail-info-item strong {
    font-size: 12px;
  }

  .inline-detail-input {
    height: 30px;
    padding: 0 6px;
    font-size: 11px;
  }

  .name-input {
    height: 36px;
    font-size: 19px;
  }

  .compliance-grid {
    gap: 8px;
  }

  .compliance-row {
    grid-template-columns: 30px minmax(0, 1fr) auto 26px;
    min-height: 46px;
    padding: 7px 8px;
  }

  .compliance-row strong {
    font-size: 11px;
  }

  .truck-profile-row {
    grid-template-columns: 10px minmax(0, 1fr) auto 24px;
    gap: 7px;
    padding: 8px;
  }

  .truck-profile-row b {
    grid-column: 2 / 4;
    text-align: left;
  }

  .truck-profile-row .truck-item-actions {
    grid-column: 4;
    grid-row: 1 / span 2;
  }

  .truck-profile-row strong {
    font-size: 12px;
  }

  .truck-profile-row small {
    font-size: 10px;
  }

  .project-dispatch-row {
    grid-template-columns: 10px minmax(0, 1fr) auto;
  }

  .project-dispatch-row b {
    grid-column: 2 / 4;
    text-align: left;
  }

  .truck-inventory-row {
    grid-template-columns: 28px minmax(0, 1fr) auto 24px;
    gap: 7px;
    padding: 8px;
  }

  .truck-inventory-row em {
    grid-column: 2 / 4;
    text-align: left;
  }

  .truck-inventory-row .truck-item-actions {
    grid-column: 4;
    grid-row: 1 / span 2;
  }

  .truck-item-edit-panel,
  .truck-add-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .truck-item-edit-panel .wide,
  .truck-add-form .wide,
  .truck-add-form > div {
    grid-column: 1 / -1;
  }

  .customer-profile-hero {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
  }

  .customer-profile-logo {
    width: 86px;
    height: 86px;
  }

  .customer-profile-logo-image {
    border-radius: 18px;
  }

  .customer-profile-logo-image .logo-symbol,
  .customer-profile-avatar {
    font-size: 22px;
  }

  .customer-profile-logo-image .logo-accent {
    right: -18px;
    bottom: -18px;
    width: 58px;
    height: 58px;
  }

  .customer-document-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .customer-document-row small {
    grid-column: 2;
    text-align: left;
  }

  .credit-grid {
    grid-template-columns: 1fr;
  }

  .customer-rate-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .customer-rate-assignment {
    grid-template-columns: 1fr;
  }

  .customer-rate-row > span:last-child {
    grid-column: 2;
  }

  .customer-contact-main {
    grid-template-columns: 40px minmax(0, 1fr) 16px;
    gap: 10px;
    padding: 9px 10px;
  }

  .customer-contact-main .customer-avatar {
    width: 38px;
    height: 38px;
  }

  .customer-contact-detail {
    grid-template-columns: 1fr;
    padding-left: 60px;
  }

  .customer-contact-detail strong {
    white-space: normal;
  }

  .customer-contact-edit-form {
    grid-template-columns: 1fr;
  }

  .customer-contact-actions,
  .customer-contact-edit-form > div {
    justify-content: stretch;
  }

  .customer-contact-actions button,
  .customer-contact-edit-form button {
    flex: 1;
  }

  .customer-project-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 8px;
  }

  .customer-project-row b {
    grid-column: 2 / -1;
    text-align: left;
  }

  .assigned-truck {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .truck-card-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .truck-thumb {
    height: 62px;
  }

  .calendar-screen {
    padding: 12px 8px 0;
  }

  .calendar-controls {
    grid-template-columns: 34px 1fr 34px;
    gap: 8px;
  }

  .dispatch-calendar {
    grid-template-columns: 70px repeat(7, minmax(31px, 1fr));
  }

  .calendar-head {
    min-height: 34px;
    padding: 4px 2px;
    font-size: 7px;
  }

  .calendar-head strong {
    font-size: 7px;
  }

  .calendar-driver,
  .calendar-day {
    min-height: 54px;
  }

  .calendar-driver {
    padding: 6px 4px;
  }

  .calendar-driver strong {
    font-size: 9px;
  }

  .calendar-assignment {
    min-height: 44px;
    padding: 3px;
  }

  .calendar-assignment strong,
  .calendar-assignment em,
  .calendar-assignment span {
    font-size: 6px;
  }
}
.cloud-save-status {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(94px + env(safe-area-inset-bottom));
  z-index: 12000;
  padding: 10px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: #061653;
  box-shadow: 0 10px 28px rgba(6, 22, 83, 0.24);
  font-size: 0.78rem;
  font-weight: 900;
  transition: opacity 180ms ease, transform 180ms ease;
}

.cloud-save-status.saved { background: #16733f; }
.cloud-save-status.failed { background: #c8152f; }
.cloud-save-status.hidden { opacity: 0; transform: translateY(8px); pointer-events: none; }

/* Microsoft sign-in uses the same branded presentation as the main portal. */
.microsoft-login-view .topbar,
.microsoft-login-view .red-rule {
  display: none;
}

.microsoft-login-view .content-card {
  position: absolute;
  inset: 0;
  height: 100% !important;
  min-height: 640px;
  overflow: hidden;
  background: #ffffff;
}

.microsoft-login-view .auth-list {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 640px;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}

.portal-login-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
  background: #ffffff;
}

.portal-login-watermark {
  position: absolute;
  z-index: 2;
  width: min(72vw, 760px);
  height: auto;
  left: 50%;
  top: 9%;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: center;
  opacity: 0.29;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.portal-login-content {
  position: relative;
  z-index: 4;
  width: min(31vw, 320px);
  margin: 0 auto;
  padding-top: clamp(98px, calc(12vh + 22px), 114px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.portal-brand-lockup {
  width: 290px;
  margin: 0 auto 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #001052;
}

.portal-flag-frame {
  width: 165px;
  height: 103px;
  position: relative;
  overflow: hidden;
  margin-bottom: 4px;
  background: #ffffff;
}

.portal-flag-mark {
  position: absolute;
  display: block;
  width: 170px;
  max-width: none;
  height: auto;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.portal-brand-lockup > strong {
  font-size: 42px;
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: 0.005em;
}

.portal-brand-rule {
  position: relative;
  width: 250px;
  height: 10px;
  margin-top: 5px;
  border-top: 2px solid #ed0b24;
}

.portal-brand-rule i {
  position: absolute;
  left: 50%;
  top: -7px;
  transform: translateX(-50%);
  padding: 0 5px;
  color: #001a73;
  background: #ffffff;
  font-size: 10px;
  font-style: normal;
  line-height: 10px;
}

.portal-brand-lockup > span {
  margin-top: -1px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.32em;
}

.portal-login-copy h2 {
  margin: 0;
  color: #06195f;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.portal-login-copy p {
  margin: 10px 0 25px;
  color: #555555;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.portal-microsoft-login {
  width: 100%;
  min-height: 56px;
  padding: 16px 24px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  background: linear-gradient(90deg, #001052, #001a73);
  box-shadow: 0 7px 16px rgba(0, 26, 115, 0.23);
  font-size: 15px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.portal-microsoft-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 26, 115, 0.28);
  filter: brightness(1.08);
}

.portal-microsoft-login:focus-visible {
  outline: 4px solid rgba(237, 11, 36, 0.28);
  outline-offset: 4px;
}

.portal-login-user-icon {
  position: relative;
  width: 21px;
  height: 21px;
  border: 1.8px solid #ffffff;
  border-radius: 50% 50% 45% 45%;
  clip-path: polygon(0 0, 100% 0, 100% 62%, 82% 62%, 100% 100%, 0 100%, 18% 62%, 0 62%);
}

.portal-login-user-icon::before {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  top: 3px;
  left: 5.5px;
}

.portal-login-wave {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 39vh;
  min-height: 215px;
  overflow: visible;
  background: radial-gradient(circle at 45% 0, #07369b 0, #001a73 43%, #001052 92%);
}

.portal-login-wave::before,
.portal-login-wave::after {
  content: "";
  position: absolute;
  width: 140%;
  left: -33%;
  border-radius: 50%;
}

.portal-login-wave::before {
  z-index: 1;
  height: 390px;
  top: -250px;
  background: #ed0b24;
}

.portal-login-wave::after {
  z-index: 2;
  height: 386px;
  top: -260px;
  background: #ffffff;
}

.portal-login-copyright {
  position: absolute;
  z-index: 3;
  right: 20px;
  bottom: 25px;
  left: 20px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 700px) {
  .microsoft-login-view .content-card,
  .microsoft-login-view .auth-list,
  .portal-login-stage {
    min-height: 620px;
  }

  .portal-login-content {
    width: min(82%, 350px);
    padding-top: 54px;
  }

  .portal-brand-lockup {
    width: 240px;
    margin-bottom: 24px;
  }

  .portal-flag-frame {
    width: 142px;
    height: 88px;
  }

  .portal-flag-mark {
    width: 146px;
  }

  .portal-brand-lockup > strong {
    font-size: 35px;
  }

  .portal-brand-rule {
    width: 210px;
  }

  .portal-brand-lockup > span {
    font-size: 8px;
  }

  .portal-login-watermark {
    width: 118vw;
    top: 11%;
    opacity: 0.29;
  }

  .portal-login-wave {
    height: 38vh;
  }

  .portal-login-wave::before,
  .portal-login-wave::after {
    width: 150%;
    left: -42%;
  }

  .portal-login-copyright {
    bottom: 16px;
    font-size: 10px;
  }
}

@media (max-height: 700px) {
  .portal-login-content {
    padding-top: 42px;
  }

  .portal-brand-lockup {
    margin-bottom: 16px;
  }

  .portal-login-copy p {
    margin-bottom: 18px;
  }

  .portal-login-wave {
    height: 40vh;
  }

  .portal-login-wave::before {
    top: -278px;
  }

  .portal-login-wave::after {
    top: -288px;
  }

  .portal-login-copyright {
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-microsoft-login {
    transition: none;
  }
}
