:root {
  --bg: #003b39;
  --panel: #d7e0df;
  --panel-2: #edf3f3;
  --panel-3: #c7d3d1;
  --header: #0f6fba;
  --navy: #081b2e;
  --blue: #064fc8;
  --red: #c60000;
  --green: #047b36;
  --yellow: #fff4a8;
  --line: #6f7d86;
  --text: #071522;
  --muted: #425466;
  --white: #ffffff;
  --input: #ffffe6;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 75% 4%, rgba(255,255,255,.08), transparent 32rem), var(--bg);
  font-size: 12px;
}
button, input, select { font: inherit; }
.compact-shell {
  width: min(1500px, calc(100% - 12px));
  margin: 6px;
  border: 4px solid #145cff;
  background: linear-gradient(180deg, rgba(0,39,54,.82), rgba(0,48,52,.92));
  min-height: calc(100vh - 12px);
  padding: 0 10px 12px;
}
.wide-shell { width: min(1760px, calc(100% - 12px)); }
.app-menu {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 8px;
  background: #f4f6f8;
  border-bottom: 1px solid #b9c3cb;
  color: #111827;
  margin: 0 -10px 6px;
  white-space: nowrap;
  position: relative;
}
.app-menu strong { font-size: 13px; margin-right: 8px; }
.app-menu span { font-size: 12px; }
.app-menu button {
  border: 0;
  background: transparent;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
}
.app-menu #logoutBtn {
  margin-left: auto;
}
.menu-ding {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin-left: 0 !important;
  min-width: 96px;
  height: 22px;
  padding: 2px 12px;
  border: 1px solid #8a95a1 !important;
  background: #ffffff !important;
  color: #1f2937 !important;
  text-align: center;
  font-weight: 900;
}
.menu-ding.ding-on {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-color: #16a34a !important;
}

/* Admin menu: keep Add Client and Ding as separate controls in normal flow. */
.admin-app-menu .menu-ding {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  margin-left: auto !important;
  flex: 0 0 auto;
}
.admin-app-menu #logoutBtn {
  margin-left: 0;
  flex: 0 0 auto;
}
.top-strip {
  display: grid;
  grid-template-columns: minmax(300px, 1.15fr) minmax(250px, .8fr) minmax(340px, 1.2fr);
  gap: 8px;
  margin-bottom: 8px;
}
.admin-strip { grid-template-columns: minmax(280px, 1.15fr) minmax(230px, .8fr) minmax(320px, 1.2fr); align-items: stretch; }
.account-box, .summary-box, .portal-box, .trip-box, .trip-complete-box, .brand-box {
  background: #e7f1f1;
  border: 2px solid var(--red);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
  min-height: 78px;
}
.box-title {
  background: #f8f8f8;
  border-bottom: 1px solid #95a2aa;
  color: #111827;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 28px;
}
.customer-line {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  gap: 6px;
  padding: 8px 12px 0;
  color: #111827;
}
.customer-line strong { color: #b80000; font-size: 15px; }
.customer-line span { color: #193f79; font-weight: 700; }
.muted-line { padding: 4px 12px; color: #334155; }

.brand-strip { align-items: stretch; }
.brand-box {
  display: grid;
  grid-template-columns: minmax(132px, 150px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: linear-gradient(180deg, #f6f8fb 0%, #e7eef2 100%);
}
.brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #c0ccd4;
  padding: 6px;
  min-height: 76px;
}
.victory-logo-wrap { background: #f3f4f6; }
.abby-logo-wrap { background: #ffffff; }
.brand-logo {
  display: block;
  max-width: 100%;
  max-height: 68px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.victory-logo { max-height: 78px; }
.abby-logo { max-height: 68px; }
.brand-caption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.brand-caption strong {
  color: #0f2e52;
  font-size: 16px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.brand-caption span {
  color: #b00000;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.brand-caption small {
  color: #475569;
  font-size: 11px;
  line-height: 1.25;
}
.coordinator-caption .coordinator-name {
  color: #0f2e52;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1.15;
}
.coordinator-caption .coordinator-phone {
  color: #b00000;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1.15;
}
.brand-caption.align-right,
.brand-box.align-right {
  text-align: right;
}
.admin-brand-strip .summary-box,
.brand-strip .summary-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
}
.admin-summary-box strong,
.two-metric-box strong {
  font-size: 31px;
}
.admin-victory-box .brand-logo-wrap { min-height: 82px; }
.admin-abby-box .brand-logo-wrap { min-height: 82px; }
@media (max-width: 1180px) {
  .top-strip,
  .admin-strip {
    grid-template-columns: 1fr;
  }
  .brand-box {
    grid-template-columns: 120px 1fr;
  }
}

.summary-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 8px;
}
.summary-box span, .trip-box span, .trip-complete-box span {
  display: block;
  color: #193f79;
  font-weight: 900;
  text-transform: uppercase;
}

.two-metric-box span {
  min-width: 0;
  letter-spacing: .02em;
}
.two-metric-box strong {
  font-size: 30px;
}

.summary-box strong, .trip-box strong, .trip-complete-box strong {
  display: block;
  color: #008000;
  font-size: 28px;
  line-height: 1;
  background: #fbffbd;
  border: 1px solid #9a9a4a;
  margin-top: 4px;
  padding: 3px;
}
.portal-box {
  text-align: center;
  padding: 8px;
  background: #f2f7ff;
  border-color: #145cff;
}
.trip-label { color: #c00000; font-size: 18px; font-weight: 900; }
.trip-number { color: #008000; font-size: 24px; font-weight: 900; border: 3px solid #145cff; background: white; margin-top: 4px; }
.trip-box, .trip-complete-box { padding: 10px; text-align: center; }
.carrier-box { border-color: var(--red); }
.compact-panel {
  background: rgba(231, 241, 241, .95);
  border: 1px solid #51717e;
  margin-bottom: 8px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  background: #d7dde1;
  border-bottom: 1px solid #71818b;
  padding: 4px 8px;
  gap: 10px;
}
.panel-title-row strong {
  color: #0f2e52;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.panel-title-row span { color: #475569; margin-left: 10px; font-weight: 600; }
.tiny-primary, .tiny-btn, .mini-save, .mini-pickup, .mini-delivered, .mini-cancel, .mini-restore, .mini-delete {
  border: 1px solid #444;
  cursor: pointer;
  height: 24px;
  padding: 2px 9px;
  font-weight: 900;
  background: #f6f6f6;
  color: #111827;
}
.tiny-primary, .mini-save { background: #0b58d0; border-color: #073b8a; color: white; }
.tiny-btn { background: #f8fafc; }
.mini-delivered { background: #e4f8dc; color: #166534; border-color: #65a30d; }
.mini-pickup { background: #dbeafe; color: #1e3a8a; border-color: #2563eb; }
.mini-cancel { background: #fff1f2; color: #9f1239; border-color: #be123c; }
.mini-restore { background: #ecfdf5; color: #065f46; border-color: #059669; }
.mini-delete { background: #ffe2e2; color: #991b1b; border-color: #c60000; width: auto; }
.hidden-panel { display: none !important; }
.inline-entry {
  padding: 6px 8px 8px;
  border-top: 2px solid #145cff;
  background: #cfd8dc;
}
.inline-grid {
  display: grid;
  grid-template-columns: 120px 110px 130px 90px minmax(230px, 1fr) 130px 90px minmax(230px, 1fr) 160px 100px 140px 150px 150px minmax(260px, 1fr) 130px;
  gap: 4px;
  align-items: end;
  max-width: 100%;
}
.inline-grid label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #15243a;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.inline-grid input, .inline-grid select, .tiny-search, .cell-input {
  height: 24px;
  padding: 2px 5px;
  border: 1px solid #687783;
  background: var(--input);
  color: #111827;
  border-radius: 0;
  outline: none;
  min-width: 0;
}
.inline-grid input:focus, .inline-grid select:focus, .tiny-search:focus, .cell-input:focus {
  border-color: #145cff;
  box-shadow: 0 0 0 1px #145cff inset;
}
.inline-actions { display: flex; gap: 4px; align-items: end; }
/* Client compact entry: professional multi-row line entry.
   Row 1: core pickup/delivery. Row 2: commodity/rate/equipment.
   Row 3: pickup/delivery contacts. Row 4: short notes. Row 5: equal action buttons.
   Tab order follows the HTML order, so keyboard entry stays sequential. */
.client-entry-grid {
  display: grid;
  grid-template-columns: 96px 88px 106px 126px minmax(170px, 1fr) 106px 126px minmax(170px, 1fr);
  gap: 4px;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  align-items: end;
}
.client-entry-grid label,
.client-entry-grid fieldset { min-width: 0; }
.client-entry-grid input,
.client-entry-grid select {
  width: 100%;
  min-width: 0;
  height: 23px;
  padding: 2px 4px;
  font-size: 10.5px;
}
.client-entry-grid input[type="time"],
.time-input {
  min-width: 126px;
  width: 126px;
  padding-left: 4px;
  padding-right: 4px;
}
.client-entry-grid .field-requester { grid-column: 1; grid-row: 1; }
.client-entry-grid .field-ref { grid-column: 2; grid-row: 1; }
.client-entry-grid .field-pu-date { grid-column: 3; grid-row: 1; }
.client-entry-grid .field-pu-time { grid-column: 4; grid-row: 1; }
.client-entry-grid .field-pickup { grid-column: 5; grid-row: 1; }
.client-entry-grid .field-del-date { grid-column: 6; grid-row: 1; }
.client-entry-grid .field-del-time { grid-column: 7; grid-row: 1; }
.client-entry-grid .field-delivery { grid-column: 8; grid-row: 1; }

.client-entry-grid .field-commodity { grid-column: 1 / span 3; grid-row: 2; }
.client-entry-grid .field-weight { grid-column: 4; grid-row: 2; }
.client-entry-grid .field-rate { grid-column: 5; grid-row: 2; }
.client-entry-grid .field-initials { grid-column: 6; grid-row: 2; }
.client-entry-grid .field-equipment { grid-column: 7 / span 2; grid-row: 2; }

.equipment-checks {
  margin: 0;
  padding: 3px 5px 5px;
  border: 1px solid #687783;
  background: #ffffe6;
  min-height: 46px;
  align-self: stretch;
}
.equipment-checks legend {
  padding: 0 3px;
  color: #15243a;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.equipment-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(78px, 1fr));
  column-gap: 6px;
  row-gap: 3px;
  align-content: start;
}
.equipment-checks .check-option {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  min-width: 0;
  color: #111827;
  font-size: 10px;
  font-weight: 800;
  text-transform: none;
  white-space: nowrap;
}
.equipment-checks .check-option input[type="checkbox"] {
  width: 12px;
  height: 12px;
  min-width: 12px;
  padding: 0;
  margin: 0;
  accent-color: #0b58d0;
}
.equipment-checks .equipment-other {
  grid-column: 1 / -1;
  height: 22px;
  margin-top: 1px;
  background: #fffde8;
}


.client-entry-grid .field-pu-contact-name { grid-column: 1 / span 2; grid-row: 3; }
.client-entry-grid .field-pu-contact-phone { grid-column: 3 / span 2; grid-row: 3; }
.client-entry-grid .field-del-contact-name { grid-column: 5 / span 2; grid-row: 3; }
.client-entry-grid .field-del-contact-phone { grid-column: 7 / span 2; grid-row: 3; }

.client-entry-grid .field-notes {
  grid-column: 1 / span 5;
  grid-row: 4;
}
.client-entry-grid .inline-actions {
  grid-column: 1 / span 3;
  grid-row: 5;
  display: grid;
  grid-template-columns: 118px 118px;
  gap: 6px;
  min-width: 0;
  align-self: end;
}
.client-entry-grid .inline-actions button {
  width: 118px;
  padding: 1px 6px;
  height: 24px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.client-entry-grid .field-weight input,
.client-entry-grid .field-rate input { text-align: right; }
.client-entry-grid .field-initials input { text-transform: uppercase; }
.phone-text,
.phone-input { letter-spacing: .02em; }

.form-message { margin: 5px 0 0; color: #065f46; font-weight: 900; }
.form-message.error { color: #991b1b; }
.filters-row { display: flex; align-items: center; gap: 6px; }
.tiny-search { width: 280px; background: #fff; }
.status-select { width: 138px; }
.table-wrap {
  width: 100%;
  overflow: auto;
  background: #bfc8cb;
  min-height: 240px;
}
.compact-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
  background: #c6cdd0;
}
.compact-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ececec;
  color: #263140;
  border: 1px solid #858f95;
  height: 23px;
  padding: 2px 4px;
  text-align: left;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 10px;
}
.compact-table td {
  border: 1px solid #8d979d;
  background: #f8fafc;
  padding: 3px 5px;
  vertical-align: top;
  height: 34px;
  overflow-wrap: anywhere;
}
.compact-table tr:nth-child(even) td { background: #eef2f4; }
.compact-table tr.row-complete td { background: #e8f9e6; }
.subcell { color: #475569; font-size: 10px; }
.read-line { font-weight: 700; color: #111827; }
.status-badge {
  display: inline-block;
  min-width: 86px;
  text-align: center;
  padding: 2px 5px;
  border: 1px solid #777;
  font-weight: 900;
  font-size: 10px;
  white-space: nowrap;
}
.status-badge.submitted { background: #fff4a8; color: #854d0e; }
.status-badge.scheduled { background: #dbeafe; color: #1e3a8a; }
.status-badge.assigned { background: #ccfbf1; color: #134e4a; }
.status-badge.picked { background: #fef3c7; color: #92400e; }
.status-badge.transit { background: #ede9fe; color: #4c1d95; }
.status-badge.delivered { background: #dcfce7; color: #166534; }
.status-badge.canceled { background: #fee2e2; color: #991b1b; border-color: #dc2626; }
.progress-line {
  width: 100%;
  height: 4px;
  margin-top: 3px;
  background: #d1d5db;
  border: 1px solid #9ca3af;
}
.progress-line span { display: block; height: 100%; background: #16a34a; }
.empty-cell {
  text-align: center;
  height: 100px !important;
  color: #475569;
  font-weight: 800;
  background: #f8fafc !important;
}
.admin-table-wrap { min-height: 470px; }
.admin-table { min-width: 1860px; }
.admin-table th:nth-child(1), .admin-table td:nth-child(1) { width: 38px; text-align: center; }
.admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 112px; }
.admin-table th:nth-child(3), .admin-table td:nth-child(3) { width: 90px; }
.admin-table th:nth-child(4), .admin-table td:nth-child(4) { width: 140px; }
.admin-table th:nth-child(5), .admin-table td:nth-child(5) { width: 120px; }
.admin-table th:nth-child(6), .admin-table td:nth-child(6) { width: 230px; }
.admin-table th:nth-child(7), .admin-table td:nth-child(7) { width: 190px; }
.admin-table th:nth-child(8), .admin-table td:nth-child(8) { width: 230px; }
.admin-table th:nth-child(9), .admin-table td:nth-child(9) { width: 190px; }
.admin-table th:nth-child(10), .admin-table td:nth-child(10) { width: 150px; }
.admin-table th:nth-child(11), .admin-table td:nth-child(11) { width: 140px; }
.admin-table th:nth-child(12), .admin-table td:nth-child(12) { width: 120px; }
.admin-table th:nth-child(13), .admin-table td:nth-child(13) { width: 150px; }
.admin-table th:nth-child(14), .admin-table td:nth-child(14) { width: 150px; }
.admin-table th:nth-child(15), .admin-table td:nth-child(15) { width: 245px; }
.cell-input { width: 100%; background: #ffffcf; }
.status-input { margin-bottom: 3px; background: white; }
.trip-input { font-weight: 900; color: #008000; }
.date-input { width: 96px; display: inline-block; }
.time-input { width: 126px; display: inline-block; margin-left: 3px; }
.phone-input { min-width: 126px; }
.notes-input { min-width: 120px; }
.rate-input { width: 72px; display: inline-block; text-align: right; }
.initials-input { width: 44px; display: inline-block; margin-left: 3px; text-transform: uppercase; }
.action-cell { white-space: nowrap; }
.action-cell button { margin: 1px; }
.ln-cell { font-weight: 900; color: #111827; background: #e5e7eb !important; }
@media (max-width: 1100px) {
  .top-strip, .admin-strip { grid-template-columns: 1fr; }
  .compact-shell, .wide-shell { width: calc(100% - 8px); margin: 4px; padding: 0 6px 8px; }
  .inline-grid { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
  .client-entry-grid {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }
  .client-entry-grid .field-requester,
  .client-entry-grid .field-ref,
  .client-entry-grid .field-pu-date,
  .client-entry-grid .field-pu-time,
  .client-entry-grid .field-pickup,
  .client-entry-grid .field-del-date,
  .client-entry-grid .field-del-time,
  .client-entry-grid .field-delivery,
  .client-entry-grid .field-commodity,
  .client-entry-grid .field-weight,
  .client-entry-grid .field-rate,
  .client-entry-grid .field-initials,
  .client-entry-grid .field-equipment,
  .client-entry-grid .field-pu-contact-name,
  .client-entry-grid .field-pu-contact-phone,
  .client-entry-grid .field-del-contact-name,
  .client-entry-grid .field-del-contact-phone,
  .client-entry-grid .field-notes,
  .client-entry-grid .inline-actions {
    grid-column: auto;
    grid-row: auto;
  }
  .client-entry-grid .field-pickup,
  .client-entry-grid .field-delivery,
  .client-entry-grid .field-commodity,
  .client-entry-grid .field-notes { grid-column: span 2; }
  .client-entry-grid .inline-actions { grid-column: span 2; }
  .panel-title-row, .filters-row { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .menu-ding { position: static; transform: none; margin-left: auto !important; }
  .app-menu #logoutBtn { margin-left: 0; }
  .equipment-checks { grid-template-columns: repeat(2, minmax(92px, 1fr)); }
  .inline-grid, .client-entry-grid { grid-template-columns: 1fr; }
  .client-entry-grid .field-requester,
  .client-entry-grid .field-ref,
  .client-entry-grid .field-pu-date,
  .client-entry-grid .field-pu-time,
  .client-entry-grid .field-pickup,
  .client-entry-grid .field-del-date,
  .client-entry-grid .field-del-time,
  .client-entry-grid .field-delivery,
  .client-entry-grid .field-commodity,
  .client-entry-grid .field-weight,
  .client-entry-grid .field-rate,
  .client-entry-grid .field-initials,
  .client-entry-grid .field-equipment,
  .client-entry-grid .field-pu-contact-name,
  .client-entry-grid .field-pu-contact-phone,
  .client-entry-grid .field-del-contact-name,
  .client-entry-grid .field-del-contact-phone,
  .client-entry-grid .field-notes,
  .client-entry-grid .inline-actions {
    grid-column: auto;
    grid-row: auto;
  }
  .app-menu { overflow-x: auto; }
  .box-title { font-size: 18px; }
  .tiny-search { width: 100%; }
}

/* Simple access-code gate */
.access-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 75% 12%, rgba(255,255,255,.12), transparent 30rem),
    linear-gradient(135deg, rgba(5, 28, 45, .98), rgba(0, 65, 59, .98));
}
.access-panel {
  width: min(500px, 100%);
  padding: 26px 28px;
  border: 2px solid #145cff;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fa 100%);
  box-shadow: 0 30px 80px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,255,255,.7);
  text-align: center;
}
.access-panel-branded {
  border-radius: 0;
}
.access-logo-frame {
  width: 100%;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  padding: 12px 18px;
  background: #ffffff;
  border: 1px solid #cbd5df;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8);
}
.access-logo {
  display: block;
  max-width: 310px;
  width: 82%;
  max-height: 72px;
  object-fit: contain;
}
.access-panel h1 {
  margin: 5px 0 8px;
  color: #0f2e52;
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.access-panel .eyebrow {
  margin: 0 0 5px;
  color: #b00000;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.access-panel .muted {
  margin: 0 auto 18px;
  max-width: 360px;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}
.access-form {
  margin: 0 auto;
  max-width: 350px;
  text-align: left;
}
.access-form label {
  display: block;
  color: #15243a;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.access-form input {
  width: 100%;
  height: 34px;
  padding: 5px 8px;
  border: 1px solid #687783;
  background: #ffffe6;
  color: #111827;
  outline: none;
  margin-bottom: 9px;
}
.access-form input:focus {
  border-color: #145cff;
  box-shadow: 0 0 0 1px #145cff inset;
}
.primary-action,
.full {
  width: 100%;
}
.primary-action {
  height: 32px;
  border: 1px solid #073b8a;
  background: #0b58d0;
  color: #ffffff;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}
.login-footer {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}


/* Mobile optimization for client portal only — keep desktop/admin behavior intact */
@media (max-width: 820px) {
  body.client-compact {
    font-size: 13px;
  }
  .client-compact .compact-shell {
    width: calc(100% - 8px);
    margin: 4px;
    min-height: calc(100vh - 8px);
    padding: 0 6px 10px;
    border-width: 3px;
  }
  .client-compact .app-menu {
    height: auto;
    min-height: 34px;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 6px 8px;
    white-space: normal;
    justify-content: space-between;
  }
  .client-compact .app-menu strong {
    flex: 1 1 100%;
    margin-right: 0;
  }
  .client-compact .app-menu span {
    order: 2;
  }
  .client-compact .menu-ding {
    position: static;
    transform: none;
    order: 3;
    margin: 0 auto !important;
    min-width: 108px;
    height: 26px;
  }
  .client-compact #logoutBtn {
    order: 4;
    margin-left: 0;
  }
  .client-compact .top-strip {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .client-compact .brand-box {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
  }
  .client-compact .brand-logo-wrap {
    min-height: 68px;
  }
  .client-compact .brand-caption strong { font-size: 15px; }
  .client-compact .brand-caption span { font-size: 12px; }
  .client-compact .summary-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 10px;
  }
  .client-compact .panel-title-row {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
  }
  .client-compact .panel-title-row > div:first-child {
    min-width: 0;
    flex: 1 1 100%;
  }
  .client-compact .panel-title-row span {
    display: block;
    margin-left: 0;
    margin-top: 2px;
    line-height: 1.25;
  }
  .client-compact #newShipmentBtn {
    width: 100%;
    height: 28px;
  }
  .client-compact .filters-row {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .client-compact .tiny-search,
  .client-compact .status-select {
    width: 100%;
    max-width: none;
    height: 28px;
  }
  .client-compact .client-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .client-compact .client-entry-grid .field-requester,
  .client-compact .client-entry-grid .field-ref,
  .client-compact .client-entry-grid .field-pu-date,
  .client-compact .client-entry-grid .field-pu-time,
  .client-compact .client-entry-grid .field-pickup,
  .client-compact .client-entry-grid .field-del-date,
  .client-compact .client-entry-grid .field-del-time,
  .client-compact .client-entry-grid .field-delivery,
  .client-compact .client-entry-grid .field-commodity,
  .client-compact .client-entry-grid .field-weight,
  .client-compact .client-entry-grid .field-rate,
  .client-compact .client-entry-grid .field-initials,
  .client-compact .client-entry-grid .field-equipment,
  .client-compact .client-entry-grid .field-pu-contact-name,
  .client-compact .client-entry-grid .field-pu-contact-phone,
  .client-compact .client-entry-grid .field-del-contact-name,
  .client-compact .client-entry-grid .field-del-contact-phone,
  .client-compact .client-entry-grid .field-notes,
  .client-compact .client-entry-grid .inline-actions {
    grid-column: auto;
    grid-row: auto;
  }
  .client-compact .client-entry-grid .field-pickup,
  .client-compact .client-entry-grid .field-delivery,
  .client-compact .client-entry-grid .field-commodity,
  .client-compact .client-entry-grid .field-equipment,
  .client-compact .client-entry-grid .field-notes,
  .client-compact .client-entry-grid .inline-actions {
    grid-column: 1 / -1;
  }
  .client-compact .client-entry-grid input,
  .client-compact .client-entry-grid select {
    height: 28px;
    font-size: 12px;
  }
  .client-compact .client-entry-grid input[type="time"],
  .client-compact .client-entry-grid .time-input {
    width: 100%;
    min-width: 0;
  }
  .client-compact .equipment-checks {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    min-height: auto;
  }
  .client-compact .equipment-checks .equipment-other {
    height: 28px;
  }
  .client-compact .client-entry-grid .inline-actions {
    grid-template-columns: 1fr 1fr;
  }
  .client-compact .client-entry-grid .inline-actions button {
    width: 100%;
    height: 28px;
  }
  .client-compact .table-wrap {
    overflow: visible;
    background: transparent;
    min-height: 0;
  }
  .client-compact .compact-table,
  .client-compact .compact-table thead,
  .client-compact .compact-table tbody,
  .client-compact .compact-table tr,
  .client-compact .compact-table td {
    display: block;
    width: 100%;
  }
  .client-compact .compact-table thead {
    display: none;
  }
  .client-compact .compact-table {
    background: transparent;
    border-collapse: separate;
  }
  .client-compact .compact-table tr {
    margin: 0 0 8px;
    border: 1px solid #8d979d;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
  }
  .client-compact .compact-table tr:nth-child(even) td,
  .client-compact .compact-table tr td {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #d4dce1;
    height: auto;
    min-height: 0;
    padding: 6px 8px;
    overflow: visible;
  }
  .client-compact .compact-table tr td:last-child {
    border-bottom: 0;
  }
  .client-compact .compact-table td {
    display: grid;
    grid-template-columns: minmax(92px, 108px) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }
  .client-compact .compact-table td::before {
    content: '';
    color: #475569;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.2;
    padding-top: 2px;
  }
  .client-compact .client-table td:nth-child(1)::before { content: 'Edit'; }
  .client-compact .client-table td:nth-child(2)::before { content: 'Status'; }
  .client-compact .client-table td:nth-child(3)::before { content: "Shipper's No."; }
  .client-compact .client-table td:nth-child(4)::before { content: 'Trip #'; }
  .client-compact .client-table td:nth-child(5)::before { content: 'Pickup'; }
  .client-compact .client-table td:nth-child(6)::before { content: 'Delivery'; }
  .client-compact .client-table td:nth-child(7)::before { content: 'Commodity'; }
  .client-compact .client-table td:nth-child(8)::before { content: 'Rate / Approved'; }
  .client-compact .client-table td:nth-child(9)::before { content: 'Carrier / Driver'; }
  .client-compact .client-table td:nth-child(10)::before { content: 'Abby Update'; }
  .client-compact .client-table .tiny-btn,
  .client-compact .client-table .tiny-primary {
    min-width: 72px;
    height: 24px;
  }
  .client-compact .status-badge {
    min-width: 0;
    width: auto;
  }
  .client-compact .read-line,
  .client-compact .subcell {
    line-height: 1.3;
  }
  .client-compact #loadMoreClientBtn {
    width: 100%;
    height: 30px;
  }
}

@media (max-width: 560px) {
  .client-compact .brand-box {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .client-compact .brand-caption,
  .client-compact .brand-caption.align-right,
  .client-compact .brand-box.align-right {
    text-align: center;
  }
  .client-compact .summary-box strong {
    font-size: 24px;
  }
  .client-compact .client-entry-grid {
    grid-template-columns: 1fr;
  }
  .client-compact .client-entry-grid .field-requester,
  .client-compact .client-entry-grid .field-ref,
  .client-compact .client-entry-grid .field-pu-date,
  .client-compact .client-entry-grid .field-pu-time,
  .client-compact .client-entry-grid .field-pickup,
  .client-compact .client-entry-grid .field-del-date,
  .client-compact .client-entry-grid .field-del-time,
  .client-compact .client-entry-grid .field-delivery,
  .client-compact .client-entry-grid .field-commodity,
  .client-compact .client-entry-grid .field-weight,
  .client-compact .client-entry-grid .field-rate,
  .client-compact .client-entry-grid .field-initials,
  .client-compact .client-entry-grid .field-equipment,
  .client-compact .client-entry-grid .field-pu-contact-name,
  .client-compact .client-entry-grid .field-pu-contact-phone,
  .client-compact .client-entry-grid .field-del-contact-name,
  .client-compact .client-entry-grid .field-del-contact-phone,
  .client-compact .client-entry-grid .field-notes,
  .client-compact .client-entry-grid .inline-actions {
    grid-column: auto;
    grid-row: auto;
  }
  .client-compact .equipment-checks {
    grid-template-columns: 1fr 1fr;
  }
  .client-compact .compact-table td {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .client-compact .compact-table td::before {
    padding-top: 0;
  }
}


/* transport24: Victory editable status plus admin board fitted to one desktop screen */
.client-entry-grid .field-status-edit {
  grid-column: 6 / span 3;
  grid-row: 4;
}
.client-entry-grid .field-status-edit select {
  width: 100%;
  height: 23px;
  background: #fff;
}

.admin-table-wrap {
  overflow-x: hidden;
  min-height: 470px;
}
.admin-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 10px;
}
.admin-table th,
.admin-table td {
  padding: 2px 3px;
}
.admin-table th:nth-child(1), .admin-table td:nth-child(1) { width: 3%; text-align: center; }
.admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 9%; }
.admin-table th:nth-child(3), .admin-table td:nth-child(3) { width: 7%; }
.admin-table th:nth-child(4), .admin-table td:nth-child(4) { width: 12%; }
.admin-table th:nth-child(5), .admin-table td:nth-child(5) { width: 14%; }
.admin-table th:nth-child(6), .admin-table td:nth-child(6) { width: 14%; }
.admin-table th:nth-child(7), .admin-table td:nth-child(7) { width: 12%; }
.admin-table th:nth-child(8), .admin-table td:nth-child(8) { width: 12.5%; }
.admin-table th:nth-child(9), .admin-table td:nth-child(9) { width: 9%; }
.admin-table th:nth-child(10), .admin-table td:nth-child(10) { width: 7%; }
.admin-edit-row td {
  height: auto;
  vertical-align: top;
}
.admin-table .cell-input {
  height: 21px;
  padding: 1px 3px;
  font-size: 10px;
}
.admin-table .status-input {
  margin-bottom: 2px;
}
.admin-table .status-badge {
  min-width: 0;
  width: 100%;
  padding: 1px 2px;
  font-size: 9px;
}
.admin-table .date-time-line,
.admin-table .split-mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 2px;
}
.admin-table .date-input,
.admin-table .time-input,
.admin-table .rate-input,
.admin-table .initials-input,
.admin-table .phone-input,
.admin-table .notes-input {
  width: 100%;
  min-width: 0;
  margin-left: 0;
}
.admin-table .stacked-input {
  margin-top: 2px;
}
.admin-table .read-line {
  font-size: 10px;
  line-height: 1.12;
}
.admin-table .subcell {
  font-size: 9px;
  line-height: 1.12;
}
.admin-table .contact-line {
  display: none;
}
.admin-table .action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}
.admin-table .action-grid button {
  width: 100%;
  height: 20px;
  padding: 1px 2px;
  margin: 0;
  font-size: 9px;
  line-height: 1;
}
.admin-table .mini-delete {
  width: 100%;
}

@media (max-width: 820px) {
  .client-compact .client-entry-grid .field-status-edit {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .client-compact .client-entry-grid .field-status-edit select {
    height: 28px;
    font-size: 12px;
  }
}


/* transport25: tighter Victory history columns and updated operational metric spacing */
.client-table {
  table-layout: fixed;
}
.client-table th:nth-child(1),
.client-table td:nth-child(1) {
  width: 7%;
  text-align: center;
}
.client-table th:nth-child(2),
.client-table td:nth-child(2) {
  width: 7.5%;
}
.client-table th:nth-child(3),
.client-table td:nth-child(3) {
  width: 6%;
  text-align: center;
}
.client-table th:nth-child(4),
.client-table td:nth-child(4) {
  width: 6%;
  text-align: center;
}
.client-table th:nth-child(5),
.client-table td:nth-child(5) {
  width: 15%;
}
.client-table th:nth-child(6),
.client-table td:nth-child(6) {
  width: 15%;
}
.client-table th:nth-child(7),
.client-table td:nth-child(7) {
  width: 13%;
}
.client-table th:nth-child(8),
.client-table td:nth-child(8) {
  width: 9%;
}
.client-table th:nth-child(9),
.client-table td:nth-child(9) {
  width: 10%;
}
.client-table th:nth-child(10),
.client-table td:nth-child(10) {
  width: 10%;
}
.client-table .edit-cell {
  padding-left: 2px;
  padding-right: 2px;
  vertical-align: middle;
}
.client-table .mini-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 22px;
  padding: 1px 6px;
  margin: 0 auto;
  border: 1px solid #073b8a;
  background: #eef5ff;
  color: #0f2e52;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.client-table .mini-copy {
  display: block;
  width: 86px;
  max-width: 100%;
  margin: 4px auto 0;
  padding: 2px 4px;
  border: 1px solid #2b6774;
  background: #4a90a4;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.05;
  cursor: pointer;
  white-space: normal;
}
.client-table .mini-copy:hover {
  background: #357a8a;
}
.client-table td:nth-child(3),
.client-table td:nth-child(4) {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.client-table td:nth-child(2) .status-badge {
  width: 100%;
  min-width: 0;
  padding-left: 2px;
  padding-right: 2px;
}
@media (max-width: 820px) {
  .client-compact .client-table th,
  .client-compact .client-table td {
    width: 100% !important;
    text-align: left;
  }
  .client-compact .client-table .edit-cell {
    text-align: left;
  }
  .client-compact .client-table .mini-edit,
  .client-compact .client-table .mini-copy {
    margin: 0;
    width: 120px;
  }
  .client-compact .client-table .mini-copy {
    margin-top: 4px;
  }
}


/* transport26: Victory Rate currency mask */
.currency-input { text-align: right; font-variant-numeric: tabular-nums; }

/* transport27: Victory history Abby Update notes box + centered compact columns */
.client-table th:nth-child(1),
.client-table th:nth-child(2),
.client-table th:nth-child(3),
.client-table th:nth-child(4),
.client-table td:nth-child(1),
.client-table td:nth-child(2),
.client-table td:nth-child(3),
.client-table td:nth-child(4) {
  text-align: center;
  vertical-align: middle;
}
.client-table td:nth-child(4) strong {
  display: block;
  text-align: center;
}
.client-table td:nth-child(2) {
  padding-left: 3px;
  padding-right: 3px;
}
.client-table .progress-line {
  max-width: 72px;
  margin-left: auto;
  margin-right: auto;
}
.abby-update-cell {
  vertical-align: top;
}
.abby-update-main {
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 4px;
}
.client-note-box {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-height: 21px;
  padding: 2px 4px;
  border: 1px solid #b6c0c7;
  background: #ffffff;
  color: #111827;
}
.client-note-box span {
  color: #475569;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}
.client-note-box em {
  display: block;
  min-height: 14px;
  color: #0f2e52;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 820px) {
  .client-compact .client-table td:nth-child(1),
  .client-compact .client-table td:nth-child(2),
  .client-compact .client-table td:nth-child(3),
  .client-compact .client-table td:nth-child(4) {
    text-align: left;
  }
  .client-compact .client-table td:nth-child(4) strong {
    text-align: left;
  }
  .client-compact .client-table .progress-line {
    margin-left: 0;
    margin-right: 0;
    max-width: 120px;
  }
  .client-compact .client-note-box {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .client-compact .client-note-box em {
    white-space: normal;
  }
}





/* transport30: ABBY UPDATE note is saved with the main Save Changes button */
.client-note-editor {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: start;
  gap: 3px 5px;
  min-height: 44px;
  padding: 3px 4px;
  border: 1px solid #9fb0bb;
  background: #ffffff;
}
.client-note-editor label {
  color: #475569;
  font-size: 8.5px;
  font-weight: 900;
  text-transform: uppercase;
  padding-top: 3px;
}
.client-note-editor textarea {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  resize: vertical;
  padding: 3px 5px;
  border: 1px solid #687783;
  background: #ffffe6;
  color: #111827;
  font-size: 10px;
  line-height: 1.25;
  outline: none;
}
.client-note-editor textarea:focus {
  border-color: #145cff;
  box-shadow: 0 0 0 1px #145cff inset;
}
.client-note-editor small {
  grid-column: 2;
  color: #64748b;
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1;
}
.client-entry-grid .field-pu-date,
.client-entry-grid .field-del-date {
  color: #b00000;
}
.client-entry-grid .field-pu-date input,
.client-entry-grid .field-del-date input,
.client-entry-grid .date-picker {
  color: #b00000;
  background: var(--input);
  border-color: #687783;
}
.history-date {
  color: #b00000;
  font-weight: 900;
}
.history-date-time {
  color: #111827;
}
@media (max-width: 820px) {
  .client-compact .client-note-editor {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .client-compact .client-note-editor textarea {
    min-height: 48px;
    font-size: 12px;
  }
}


/* transport31: ABBY UPDATE is a standalone free-note field, not status-driven */
.abby-update-cell {
  vertical-align: top;
  background: #ffffff !important;
}
.abby-update-main {
  display: none !important;
}
.client-note-box.standalone-abby-note {
  display: block;
  min-height: 28px;
  padding: 4px 6px;
  border: 1px solid #b6c0c7;
  background: #ffffff;
  color: #0f2e52;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
.inline-abby-update-note {
  width: 100%;
  min-height: 54px;
  resize: vertical;
  padding: 5px 6px;
  border: 1px solid #687783;
  background: #ffffe6;
  color: #111827;
  font-size: 10.5px;
  line-height: 1.25;
  outline: none;
}
.inline-abby-update-note:focus {
  border-color: #145cff;
  box-shadow: 0 0 0 1px #145cff inset;
}
@media (max-width: 820px) {
  .client-compact .client-note-box.standalone-abby-note {
    min-height: 34px;
    font-size: 12px;
  }
  .client-compact .inline-abby-update-note {
    min-height: 72px;
    font-size: 12px;
  }
}


/* transport33: persistent ding state + canceled workflow */
.row-canceled td {
  background: #f3f4f6 !important;
  color: #6b7280;
}
.row-canceled .read-line,
.row-canceled strong {
  color: #4b5563;
}
.row-canceled .status-badge {
  opacity: 1;
}
.cancel-locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 22px;
  margin: 0 auto;
  border: 1px solid #dc2626;
  background: #fee2e2;
  color: #991b1b;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}
.admin-table .mini-cancel,
.admin-table .mini-restore,
.admin-table .mini-delete {
  width: 100%;
}
.admin-table .mini-delete {
  font-size: 8.5px;
}
@media (max-width: 820px) {
  .client-compact .cancel-locked {
    margin: 0;
    width: 82px;
  }
}


/* transport33: optional client time fields + wider commodity + smaller Victory Rate + equipment lowered on right */
.client-entry-grid {
  grid-template-columns: 96px 88px 106px 126px minmax(170px, 1fr) 94px 90px minmax(170px, 1fr);
}
.client-entry-grid .field-commodity {
  grid-column: 1 / span 4;
  grid-row: 2;
}
.client-entry-grid .field-weight {
  grid-column: 5;
  grid-row: 2;
}
.client-entry-grid .field-rate {
  grid-column: 6;
  grid-row: 2;
}
.client-entry-grid .field-rate input {
  text-align: right;
  font-size: 10px;
  padding-left: 3px;
  padding-right: 3px;
}
.client-entry-grid .field-initials {
  grid-column: 7;
  grid-row: 2;
}
.client-entry-grid .field-status-edit {
  grid-column: 8;
  grid-row: 2;
}
.client-entry-grid .field-notes {
  grid-column: 1 / span 5;
  grid-row: 4;
}
.client-entry-grid .field-equipment {
  grid-column: 6 / span 3;
  grid-row: 4;
}
.client-entry-grid .equipment-checks {
  align-self: stretch;
  min-height: 54px;
}
.client-entry-grid .inline-actions {
  grid-column: 1 / span 3;
  grid-row: 5;
}

@media (max-width: 820px) {
  .client-compact .client-entry-grid .field-status-edit,
  .client-compact .client-entry-grid .field-equipment {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}


/* transport34: refined desktop layout for Victory Add New Shipment form */
@media (min-width: 821px) {
  .client-compact .client-entry-grid {
    grid-template-columns: repeat(24, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 5px;
    align-items: end;
  }

  .client-compact .client-entry-grid input,
  .client-compact .client-entry-grid select {
    height: 24px;
  }

  .client-compact .client-entry-grid input[type="time"],
  .client-compact .client-entry-grid .time-input {
    width: 100%;
    min-width: 0;
  }

  .client-compact .client-entry-grid .field-requester { grid-column: 1 / span 3; grid-row: 1; }
  .client-compact .client-entry-grid .field-ref { grid-column: 4 / span 2; grid-row: 1; }
  .client-compact .client-entry-grid .field-pu-date { grid-column: 6 / span 2; grid-row: 1; }
  .client-compact .client-entry-grid .field-pu-time { grid-column: 8 / span 3; grid-row: 1; }
  .client-compact .client-entry-grid .field-pickup { grid-column: 11 / span 5; grid-row: 1; }
  .client-compact .client-entry-grid .field-del-date { grid-column: 16 / span 2; grid-row: 1; }
  .client-compact .client-entry-grid .field-del-time { grid-column: 18 / span 3; grid-row: 1; }
  .client-compact .client-entry-grid .field-delivery { grid-column: 21 / span 4; grid-row: 1; }

  .client-compact .client-entry-grid .field-commodity { grid-column: 1 / span 10; grid-row: 2; }
  .client-compact .client-entry-grid .field-weight { grid-column: 11 / span 2; grid-row: 2; }
  .client-compact .client-entry-grid .field-rate { grid-column: 13 / span 2; grid-row: 2; }
  .client-compact .client-entry-grid .field-initials { grid-column: 15 / span 2; grid-row: 2; }
  .client-compact .client-entry-grid .field-pu-contact-name { grid-column: 17 / span 4; grid-row: 2; }
  .client-compact .client-entry-grid .field-pu-contact-phone { grid-column: 21 / span 4; grid-row: 2; }

  .client-compact .client-entry-grid .field-del-contact-name { grid-column: 1 / span 4; grid-row: 3; }
  .client-compact .client-entry-grid .field-del-contact-phone { grid-column: 5 / span 4; grid-row: 3; }
  .client-compact .client-entry-grid .field-notes { grid-column: 9 / span 8; grid-row: 3; }
  .client-compact .client-entry-grid .field-status-edit { grid-column: 17 / span 4; grid-row: 3; }

  .client-compact .client-entry-grid .field-equipment {
    grid-column: 17 / span 8;
    grid-row: 4;
  }

  .client-compact .client-entry-grid .inline-actions {
    grid-column: 1 / span 4;
    grid-row: 5;
    display: grid;
    grid-template-columns: 118px 118px;
    gap: 6px;
  }

  .client-compact .client-entry-grid .inline-actions button {
    width: 118px;
  }

  .client-compact .equipment-checks {
    grid-template-columns: repeat(3, minmax(78px, 1fr));
    min-height: 46px;
  }
}


/* transport35: tighter professional layout requested by user
   - Equipment under Delivery Contact
   - smaller PU/DEL time boxes
   - Pickup and Delivery Location same width
   - Requested By wider and balanced spacing */
@media (min-width: 821px) {
  .client-compact .client-entry-grid {
    grid-template-columns: repeat(24, minmax(0, 1fr));
    column-gap: 6px;
    row-gap: 5px;
    align-items: end;
  }

  .client-compact .client-entry-grid input,
  .client-compact .client-entry-grid select {
    height: 24px;
  }

  .client-compact .client-entry-grid input[type="time"],
  .client-compact .client-entry-grid .time-input {
    width: 100%;
    min-width: 0;
  }

  /* Row 1: equal location widths, smaller time fields, wider requester */
  .client-compact .client-entry-grid .field-requester { grid-column: 1 / span 4; grid-row: 1; }
  .client-compact .client-entry-grid .field-ref { grid-column: 5 / span 2; grid-row: 1; }
  .client-compact .client-entry-grid .field-pu-date { grid-column: 7 / span 2; grid-row: 1; }
  .client-compact .client-entry-grid .field-pu-time { grid-column: 9 / span 2; grid-row: 1; }
  .client-compact .client-entry-grid .field-pickup { grid-column: 11 / span 5; grid-row: 1; }
  .client-compact .client-entry-grid .field-del-date { grid-column: 16 / span 2; grid-row: 1; }
  .client-compact .client-entry-grid .field-del-time { grid-column: 18 / span 2; grid-row: 1; }
  .client-compact .client-entry-grid .field-delivery { grid-column: 20 / span 5; grid-row: 1; }

  /* Row 2: compact money/weight, strong commodity space, pickup contact */
  .client-compact .client-entry-grid .field-commodity { grid-column: 1 / span 10; grid-row: 2; }
  .client-compact .client-entry-grid .field-weight { grid-column: 11 / span 2; grid-row: 2; }
  .client-compact .client-entry-grid .field-rate { grid-column: 13 / span 2; grid-row: 2; }
  .client-compact .client-entry-grid .field-initials { grid-column: 15 / span 2; grid-row: 2; }
  .client-compact .client-entry-grid .field-pu-contact-name { grid-column: 17 / span 4; grid-row: 2; }
  .client-compact .client-entry-grid .field-pu-contact-phone { grid-column: 21 / span 4; grid-row: 2; }

  /* Row 3: delivery contact, notes, status */
  .client-compact .client-entry-grid .field-del-contact-name { grid-column: 1 / span 4; grid-row: 3; }
  .client-compact .client-entry-grid .field-del-contact-phone { grid-column: 5 / span 4; grid-row: 3; }
  .client-compact .client-entry-grid .field-notes { grid-column: 9 / span 8; grid-row: 3; }
  .client-compact .client-entry-grid .field-status-edit { grid-column: 17 / span 4; grid-row: 3; }

  /* Row 4: equipment positioned directly below Delivery Contact */
  .client-compact .client-entry-grid .field-equipment {
    grid-column: 1 / span 8;
    grid-row: 4;
  }

  .client-compact .client-entry-grid .inline-actions {
    grid-column: 9 / span 4;
    grid-row: 4;
    display: grid;
    grid-template-columns: 118px 118px;
    gap: 6px;
    align-self: end;
  }

  .client-compact .client-entry-grid .inline-actions button {
    width: 118px;
  }

  .client-compact .equipment-checks {
    grid-template-columns: repeat(3, minmax(78px, 1fr));
    min-height: 46px;
  }
}

/* clear1: professional customer/admin notification notes workflow */
.notes-textarea,
.admin-notes-textarea,
textarea.cell-input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  resize: none;
  overflow: hidden;
  line-height: 1.28;
  white-space: pre-wrap;
  background: #fffef0;
  border: 1px solid #8ca1b3;
  border-radius: 4px;
  color: #071522;
}

.client-entry-grid .field-notes textarea {
  display: block;
  margin-top: 2px;
  padding: 5px 7px;
  font-size: 11px;
}

.notice-check-card {
  min-height: 54px;
  padding: 7px 8px;
  border: 1px solid #96b5db;
  border-radius: 6px;
  background: linear-gradient(180deg, #f8fbff 0%, #e8f1ff 100%);
  color: #0f2e52;
  align-self: stretch;
  display: flex !important;
  align-items: center;
  gap: 8px;
  text-transform: none;
  font-weight: 800;
}

.notice-check-card.hidden-panel { display: none !important; }
.notice-check-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: #0b58d0;
}
.notice-check-card span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
}
.notice-check-card strong {
  font-size: 11px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.notice-check-card small {
  color: #385a7a;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: none;
}

.status-badge.notice-to-abby {
  background: #ffedd5;
  color: #9a3412;
  border-color: #f97316;
}
.status-badge.notice-to-victory {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #2563eb;
}
.status-row:has(.status-badge.notice-to-abby),
.admin-edit-row:has(.status-badge.notice-to-abby) {
  box-shadow: inset 4px 0 0 #f97316;
}
.status-row:has(.status-badge.notice-to-victory),
.admin-edit-row:has(.status-badge.notice-to-victory) {
  box-shadow: inset 4px 0 0 #2563eb;
}

.admin-note-editor {
  display: grid;
  grid-template-rows: auto auto;
  gap: 4px;
  min-width: 0;
}
.admin-table .admin-notes-textarea {
  height: auto;
  min-height: 58px;
  padding: 5px 6px;
  font-size: 10.5px;
  line-height: 1.25;
}
.notify-mini {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #b9c9dc;
  border-radius: 4px;
  background: #f8fbff;
  color: #0f2e52;
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}
.notify-mini input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin: 0;
  accent-color: #0b58d0;
}

@media (min-width: 821px) {
  .client-compact .client-entry-grid {
    row-gap: 7px;
  }
  .client-compact .client-entry-grid .field-notes {
    grid-column: 9 / span 8;
    grid-row: 3 / span 2;
    align-self: stretch;
  }
  .client-compact .client-entry-grid .field-notes textarea {
    min-height: 76px;
  }
  .client-compact .client-entry-grid .field-status-edit {
    grid-column: 17 / span 4;
    grid-row: 3;
    align-self: end;
  }
  .client-compact .client-entry-grid .field-notify-abby {
    grid-column: 21 / span 4;
    grid-row: 3;
  }
  .client-compact .client-entry-grid .field-equipment {
    grid-column: 1 / span 8;
    grid-row: 4;
  }
  .client-compact .client-entry-grid .inline-actions {
    grid-column: 17 / span 8;
    grid-row: 4;
    grid-template-columns: 138px 118px;
    align-self: end;
  }
  .client-compact .client-entry-grid .inline-actions button:first-child {
    width: 138px;
  }
}

@media (max-width: 820px) {
  .client-compact .client-entry-grid textarea,
  .client-compact .client-entry-grid .notice-check-card {
    min-height: 64px;
  }
  .client-compact .client-entry-grid .field-notify-abby {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (min-width: 1100px) {
  .admin-table th:nth-child(1), .admin-table td:nth-child(1) { width: 3%; }
  .admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 8%; }
  .admin-table th:nth-child(3), .admin-table td:nth-child(3) { width: 6.5%; }
  .admin-table th:nth-child(4), .admin-table td:nth-child(4) { width: 11%; }
  .admin-table th:nth-child(5), .admin-table td:nth-child(5) { width: 13%; }
  .admin-table th:nth-child(6), .admin-table td:nth-child(6) { width: 13%; }
  .admin-table th:nth-child(7), .admin-table td:nth-child(7) { width: 10%; }
  .admin-table th:nth-child(8), .admin-table td:nth-child(8) { width: 11.5%; }
  .admin-table th:nth-child(9), .admin-table td:nth-child(9) { width: 15%; }
  .admin-table th:nth-child(10), .admin-table td:nth-child(10) { width: 8.5%; }
}


/* clear1 final: notices are communication badges, not shipment statuses */
.notice-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
}
.notice-badge {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 2px 5px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 8.5px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: normal;
  text-align: center;
}
.notice-badge.notice-to-abby {
  background: #fff3db;
  color: #994600;
  border-color: #f59e0b;
}
.notice-badge.notice-to-victory {
  background: #e8f0ff;
  color: #1d4ed8;
  border-color: #3b82f6;
}
.status-row:has(.notice-badge.notice-to-abby),
.admin-edit-row:has(.notice-badge.notice-to-abby) {
  box-shadow: inset 4px 0 0 #f59e0b;
}
.status-row:has(.notice-badge.notice-to-victory),
.admin-edit-row:has(.notice-badge.notice-to-victory) {
  box-shadow: inset 4px 0 0 #3b82f6;
}

.client-note-box {
  display: grid;
  gap: 3px;
  min-height: 38px;
  padding: 5px 6px;
  border: 1px solid #c9d7e8;
  border-radius: 6px;
  background: #f8fbff;
  line-height: 1.25;
  white-space: normal;
}
.note-source-label {
  display: inline-block;
  color: #1d4ed8;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.muted-label { color: #64748b; }
.client-note-box span {
  color: #102033;
  font-size: 10px;
}

.customer-note-preview {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid #f0c878;
  border-radius: 5px;
  background: #fff8e8;
  line-height: 1.2;
  white-space: normal;
}
.customer-note-preview strong {
  color: #994600;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.customer-note-preview span {
  color: #2b1e0a;
  font-size: 9.5px;
}

.admin-note-editor {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 4px;
}
.admin-table .admin-notes-textarea {
  min-height: 42px;
  padding: 4px 6px;
  font-size: 10px;
  line-height: 1.24;
}
.notify-mini {
  min-height: 24px;
  justify-content: flex-start;
}

@media (min-width: 821px) {
  .client-compact .client-entry-grid .field-notes {
    grid-column: 9 / span 8;
    grid-row: 3;
    align-self: stretch;
  }
  .client-compact .client-entry-grid .field-notes textarea {
    min-height: 52px;
    max-height: none;
  }
  .client-compact .client-entry-grid .field-notify-abby {
    grid-column: 17 / span 4;
    grid-row: 3;
    align-self: stretch;
  }
  .client-compact .client-entry-grid .field-equipment {
    grid-column: 1 / span 12;
    grid-row: 4;
  }
  .client-compact .client-entry-grid .inline-actions {
    grid-column: 17 / span 8;
    grid-row: 4;
    align-self: end;
    display: grid;
    grid-template-columns: 138px 118px;
    gap: 6px;
  }
  .client-compact .client-entry-grid .inline-actions button:first-child { width: 138px; }
  .client-compact .client-entry-grid .inline-actions button:last-child { width: 118px; }
}

@media (min-width: 1100px) {
  .admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 8.5%; }
  .admin-table th:nth-child(9), .admin-table td:nth-child(9) { width: 16%; }
  .admin-table th:nth-child(10), .admin-table td:nth-child(10) { width: 7.5%; }
}

/* clear1: clickable notice badges + cleaner note spacing */
.notice-stack {
  gap: 5px;
  margin-top: 6px;
}
.notice-badge {
  min-height: 24px;
  padding: 5px 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 9px;
  border-width: 1px;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.notice-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, .14);
  filter: saturate(1.08);
}
.notice-badge:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}
.notice-badge.is-working {
  opacity: .6;
  cursor: wait;
}
.notice-badge.notice-to-victory {
  background: #e8f0ff;
  color: #1d4ed8;
  border-color: #3b82f6;
}
.status-row:has(.notice-badge.notice-to-victory),
.admin-edit-row:has(.notice-badge.notice-to-victory) {
  box-shadow: inset 4px 0 0 #3b82f6;
}

.notice-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 21, 34, .36);
  backdrop-filter: blur(4px);
}
.notice-confirm-card {
  width: min(360px, 92vw);
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid #c9d7e8;
  border-radius: 16px;
  background: #ffffff;
  color: #071522;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}
.notice-confirm-card strong {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.notice-confirm-card span {
  color: #4b5f76;
  font-size: 13px;
  line-height: 1.45;
}
.notice-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.notice-confirm-actions button {
  min-width: 76px;
}

.client-note-box,
.customer-note-preview {
  gap: 6px;
  min-height: 56px;
  padding: 8px 10px;
  border-radius: 8px;
}
.client-note-box span,
.customer-note-preview span {
  font-size: 10.8px;
  line-height: 1.38;
  white-space: pre-wrap;
}
.note-source-label,
.customer-note-preview strong {
  font-size: 9px;
}
.admin-note-editor {
  gap: 8px;
}
.admin-table .admin-notes-textarea,
.admin-notes-textarea,
textarea.cell-input {
  min-height: 70px;
  padding: 8px 9px;
  font-size: 11px;
  line-height: 1.38;
  border-radius: 8px;
}
.client-entry-grid .field-notes textarea,
.notes-textarea {
  min-height: 74px;
  padding: 8px 9px;
  font-size: 11.2px;
  line-height: 1.38;
  border-radius: 8px;
}
.notify-mini {
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 7px;
}
.notice-check-card {
  padding: 9px 10px;
  border-radius: 9px;
}
.notice-check-card small {
  font-size: 10px;
  line-height: 1.25;
}

@media (min-width: 821px) {
  .client-compact .client-entry-grid .field-notes {
    grid-column: 9 / span 9;
    grid-row: 3;
  }
  .client-compact .client-entry-grid .field-notify-abby {
    grid-column: 18 / span 5;
    grid-row: 3;
  }
}

@media (min-width: 1100px) {
  .admin-table th:nth-child(7), .admin-table td:nth-child(7) { width: 9%; }
  .admin-table th:nth-child(8), .admin-table td:nth-child(8) { width: 10.5%; }
  .admin-table th:nth-child(9), .admin-table td:nth-child(9) { width: 18%; }
  .admin-table th:nth-child(10), .admin-table td:nth-child(10) { width: 6.5%; }
}


/* chat1: per-load chat workflow */
.chat-status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
}

.chat-status-btn {
  appearance: none;
  border: 1px solid rgba(22, 48, 74, 0.16);
  background: #ffffff;
  color: #24364b;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.chat-status-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.13);
  border-color: rgba(37, 99, 235, 0.35);
}

.chat-status-btn.new-chat {
  background: linear-gradient(135deg, #0f5fff, #173b8f);
  border-color: rgba(15, 95, 255, 0.45);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 95, 255, 0.24);
}

.chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 18, 31, 0.56);
  backdrop-filter: blur(6px);
}

.chat-card {
  width: min(760px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: 24px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.chat-header strong {
  display: block;
  font-size: 20px;
  color: #142033;
}

.chat-header span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.chat-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: #eef2f7;
  color: #142033;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.chat-thread {
  min-height: 340px;
  max-height: 500px;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-message {
  display: flex;
  width: 100%;
}

.chat-message.own {
  justify-content: flex-end;
}

.chat-message.other {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: min(78%, 520px);
  padding: 13px 15px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.chat-message.own .chat-bubble {
  background: #153c88;
  color: #ffffff;
  border-color: rgba(21, 60, 136, 0.25);
  border-bottom-right-radius: 6px;
}

.chat-message.other .chat-bubble {
  border-bottom-left-radius: 6px;
}

.chat-bubble strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 7px;
  color: inherit;
  opacity: 0.8;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 14px;
}

.chat-bubble span {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.65;
  font-weight: 700;
}

.chat-empty {
  margin: auto;
  max-width: 420px;
  text-align: center;
  color: #64748b;
  font-weight: 700;
  line-height: 1.5;
  padding: 32px;
}

.chat-compose {
  padding: 18px 20px 20px;
  background: #ffffff;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.chat-compose textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  line-height: 1.45;
  outline: none;
  background: #f8fafc;
}

.chat-compose textarea:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
  background: #ffffff;
}

.chat-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.chat-compose-actions span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .chat-overlay { padding: 12px; }
  .chat-card { width: calc(100vw - 20px); max-height: calc(100vh - 24px); border-radius: 18px; }
  .chat-thread { min-height: 280px; padding: 16px; }
  .chat-bubble { max-width: 88%; }
  .chat-header { padding: 16px; }
  .chat-compose { padding: 14px; }
}

/* label1: chat sender labels simplified */
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.chat-pdf-btn {
  appearance: none;
  border: 1px solid rgba(21, 60, 136, 0.18);
  background: #ffffff;
  color: #153c88;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background 120ms ease;
}

.chat-pdf-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(21, 60, 136, 0.42);
  background: #f8fafc;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.13);
}

.chat-pdf-btn:active {
  transform: translateY(0);
}

@media (max-width: 720px) {
  .chat-header-actions { gap: 8px; }
  .chat-pdf-btn { padding: 8px 11px; font-size: 11px; }
}


/* Multi-company portal refinements */
.company-tag {
  display: block;
  margin-top: 5px;
  padding: 3px 5px;
  border-radius: 5px;
  background: #e7f1ff;
  color: #064fc8;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}
.portal-home {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 75% 4%, rgba(255,255,255,.08), transparent 32rem), var(--bg);
}
.portal-home-card {
  width: min(980px, 100%);
  background: #edf3f3;
  border: 4px solid #145cff;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
}
.portal-home-card h1 { margin: 12px 0; font-size: 34px; color: #081b2e; }
.portal-home-card p { color: #334155; font-size: 14px; }
.portal-home-links { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.portal-home-links a { display: block; background: #fff; border: 2px solid #c60000; padding: 16px; color: #081b2e; text-decoration: none; font-weight: 900; text-transform: uppercase; }
.portal-home-links a span { display: block; color: #064fc8; font-size: 11px; margin-bottom: 5px; }
.access-company-hint {
  color: #425466;
  font-size: 11px;
  margin-top: 8px;
}
.access-panel .brand-logo { margin: 0 auto; }
@media (max-width: 850px) { .portal-home-links { grid-template-columns: 1fr; } }


/* admin-company-column-fix: cleaner company identity inside the LN column without widening the whole board */
@media (min-width: 1100px) {
  .admin-table th:nth-child(1),
  .admin-table td:nth-child(1) {
    width: 5.15% !important;
    min-width: 82px;
    max-width: 96px;
    text-align: center;
  }

  .admin-table th:nth-child(2),
  .admin-table td:nth-child(2) { width: 8.1% !important; }

  .admin-table th:nth-child(7),
  .admin-table td:nth-child(7) { width: 8.6% !important; }

  .admin-table th:nth-child(8),
  .admin-table td:nth-child(8) { width: 10.1% !important; }

  .admin-table th:nth-child(9),
  .admin-table td:nth-child(9) { width: 17.65% !important; }

  .admin-table th:nth-child(10),
  .admin-table td:nth-child(10) { width: 6.4% !important; }
}

.admin-table .ln-cell {
  padding: 3px 4px !important;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.05;
}

.admin-table .ln-cell .company-tag {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 86px;
  margin: 4px auto 0;
  padding: 2px 4px;
  border: 1px solid #9fb4d6;
  border-radius: 999px;
  background: linear-gradient(180deg, #f9fbff 0%, #e9f2ff 100%);
  color: #064fc8;
  font-size: 8.4px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-table th:nth-child(1) {
  font-size: 9px;
}

@media (max-width: 1099px) {
  .admin-table .ln-cell .company-tag {
    max-width: 76px;
    font-size: 7.8px;
    padding-left: 3px;
    padding-right: 3px;
  }
}

/* Admin company badge upgrade - professional visual identification without horizontal scroll */
.admin-table th:nth-child(1), .admin-table td:nth-child(1) { width: 8%; text-align: center; }
.admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 8%; }
.admin-table th:nth-child(3), .admin-table td:nth-child(3) { width: 6%; }
.admin-table th:nth-child(4), .admin-table td:nth-child(4) { width: 11%; }
.admin-table th:nth-child(5), .admin-table td:nth-child(5) { width: 13.5%; }
.admin-table th:nth-child(6), .admin-table td:nth-child(6) { width: 13.5%; }
.admin-table th:nth-child(7), .admin-table td:nth-child(7) { width: 11.5%; }
.admin-table th:nth-child(8), .admin-table td:nth-child(8) { width: 11.5%; }
.admin-table th:nth-child(9), .admin-table td:nth-child(9) { width: 9.5%; }
.admin-table th:nth-child(10), .admin-table td:nth-child(10) { width: 7.5%; }

.admin-table .company-ln-cell {
  padding: 3px 4px;
  text-align: center;
  vertical-align: middle;
  background: #e9eef2 !important;
}

.admin-table .company-ln-cell .row-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 17px;
  margin-bottom: 3px;
  padding: 0 5px;
  border: 1px solid #9aa7b3;
  border-radius: 999px;
  background: #ffffff;
  color: #263140;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.admin-table .company-ln-cell .company-tag {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 4px 5px 3px;
  border: 1px solid #8fa3b8;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff 0%, #edf3f8 100%);
  color: #0f2e52;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  font-size: 9.2px;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.admin-table .company-ln-cell .company-tag.company-victory {
  border-color: #1d4ed8;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
}

.admin-table .company-ln-cell .company-tag.company-dnl {
  border-color: #4b5563;
  background: linear-gradient(180deg, #f8fafc 0%, #e5e7eb 100%);
  color: #111827;
}

.admin-table .company-ln-cell .company-tag.company-northwest {
  border-color: #15803d;
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  color: #14532d;
}

.admin-table .company-ln-cell .company-tag.company-rocksolid {
  border-color: #ca8a04;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  color: #713f12;
}

.admin-table .company-ln-cell .company-tag.company-tycon {
  border-color: #f97316;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #9a3412;
}

.admin-table .company-ln-cell .company-tag.company-blackbull {
  border-color: #991b1b;
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  color: #7f1d1d;
}

.admin-table .company-ln-cell .company-tag.company-joeambrosius {
  border-color: #0369a1;
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #0c4a6e;
}

.admin-table .company-ln-cell .company-tag.company-utahtank {
  border-color: #ea580c;
  background: linear-gradient(180deg, #fff7ed 0%, #fed7aa 100%);
  color: #7c2d12;
}

.admin-table .company-ln-cell .company-tag.company-premierperformance {
  border-color: #111827;
  background: linear-gradient(180deg, #f9fafb 0%, #d1d5db 100%);
  color: #030712;
}

.admin-table .company-ln-cell .company-tag.company-saic {
  border-color: #0875bb;
  background: linear-gradient(180deg, #eff8ff 0%, #dbeeff 100%);
  color: #075985;
}

.admin-table .company-ln-cell .company-tag.company-other {
  border-color: #7c3aed;
  background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
  color: #4c1d95;
}

.admin-table th:nth-child(1) {
  font-size: 9px;
  letter-spacing: .03em;
}

@media (max-width: 1250px) {
  .admin-table .company-ln-cell .company-tag {
    font-size: 8.4px;
    padding-left: 3px;
    padding-right: 3px;
    letter-spacing: -0.035em;
  }
}



/* Admin customer identity refinement - removes single Victory logo and improves fast company recognition */
.admin-client-box {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #f6f8fb 0%, #e7eef2 100%);
}

.admin-client-heading {
  gap: 1px;
}

.admin-client-heading strong {
  font-size: 15px;
  color: #0f2e52;
  line-height: 1.05;
}

.admin-client-heading small {
  font-size: 10.5px;
  color: #475569;
  line-height: 1.2;
}

.admin-client-roster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.client-mini-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f2e52;
  white-space: nowrap;
  box-shadow: none;
}

.client-mini-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  width: 32px;
  height: 32px;
  padding: 0 3px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: rgba(255,255,255,.72);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.client-mini-victory .client-mini-logo {
  border-color: #1d4ed8;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
}

.client-mini-dnl .client-mini-logo {
  border-color: #4b5563;
  background: linear-gradient(180deg, #f8fafc 0%, #e5e7eb 100%);
  color: #111827;
}

.client-mini-northwest .client-mini-logo {
  border-color: #15803d;
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  color: #14532d;
}

.client-mini-rocksolid .client-mini-logo {
  border-color: #ca8a04;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  color: #713f12;
}

.client-mini-tycon .client-mini-logo {
  border-color: #f97316;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #9a3412;
}

.client-mini-blackbull .client-mini-logo {
  border-color: #991b1b;
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  color: #7f1d1d;
}

.client-mini-joeambrosius .client-mini-logo {
  border-color: #0369a1;
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #0c4a6e;
}

.client-mini-utahtank .client-mini-logo {
  border-color: #ea580c;
  background: linear-gradient(180deg, #fff7ed 0%, #fed7aa 100%);
  color: #7c2d12;
}

.client-mini-premierperformance .client-mini-logo {
  border-color: #111827;
  background: linear-gradient(180deg, #f9fafb 0%, #d1d5db 100%);
  color: #030712;
}

.client-mini-saic .client-mini-logo {
  border-color: #0875bb;
  background: linear-gradient(180deg, #eff8ff 0%, #dbeeff 100%);
  color: #075985;
}

.client-mini-mtsu .client-mini-logo {
  border-color: #7c3aed;
  background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
  color: #5b21b6;
}

.client-mini-nwis .client-mini-logo {
  border-color: #0f766e;
  background: linear-gradient(180deg, #ecfeff 0%, #ccfbf1 100%);
  color: #115e59;
}

.client-mini-gns .client-mini-logo {
  border-color: #be123c;
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  color: #9f1239;
}

.admin-table .company-ln-cell .company-tag.company-mtsu {
  border-color: #7c3aed;
  background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
  color: #5b21b6;
}

.admin-table .company-ln-cell .company-tag.company-nwis {
  border-color: #0f766e;
  background: linear-gradient(180deg, #ecfeff 0%, #ccfbf1 100%);
  color: #115e59;
}

.admin-table .company-ln-cell .company-tag.company-gns {
  border-color: #be123c;
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  color: #9f1239;
}

@media (max-width: 1250px) {
  .admin-client-roster { gap: 4px; }
  .client-mini-logo {
    min-width: 30px;
    width: 30px;
    height: 30px;
    font-size: 7.3px;
  }
}

/* The admin row badge now uses the shorter market-facing name, while the full name remains in the tooltip. */
.admin-table .company-ln-cell .company-tag.company-northwest {
  font-size: 9.6px;
  letter-spacing: -0.015em;
}

@media (max-width: 1250px) {
  .admin-client-roster { gap: 4px; }
  .client-mini-chip {
    font-size: 9.8px;
    padding-right: 6px;
  }
  .client-mini-logo {
    min-width: 23px;
    font-size: 7.5px;
  }
}

/* quotes-20260607b: chat attachments */
.chat-attachments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.chat-attachment {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 12px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.chat-message.own .chat-attachment {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.chat-attachment:hover {
  text-decoration: underline;
}

.chat-attachment strong {
  margin: 0;
  font-size: 11px;
}

.chat-attachment span {
  margin: 0;
  font-size: 12px;
  opacity: 0.84;
  word-break: break-word;
}

.chat-attachment-image img {
  display: block;
  max-width: 260px;
  max-height: 180px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.08);
}

.chat-attachment-picker {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px dashed rgba(15, 23, 42, 0.18);
}

.chat-attachment-picker label {
  font-size: 12px;
  font-weight: 900;
  color: #334155;
}

.chat-attachment-picker input {
  width: 100%;
  font-size: 12px;
}

.chat-attachment-picker small,
.chat-upload-status {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
}

.chat-upload-status:not(:empty) {
  margin-top: 8px;
}

/* quotes-20260607b: quote request workflow added without changing shipment workflow */
.portal-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0 10px;
}
.portal-tab {
  border: 1px solid #8d979d;
  background: #eef3f7;
  color: #1e293b;
  border-radius: 8px 8px 0 0;
  height: 30px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.portal-tab.active {
  background: #0b58d0;
  border-color: #073b8a;
  color: #fff;
}
.quote-panel,
.quote-admin-panel {
  margin-bottom: 10px;
}
.quote-entry-grid {
  grid-template-columns: repeat(8, minmax(92px, 1fr));
}
.quote-entry-grid .field-requester { grid-column: 1 / span 2; }
.quote-entry-grid .field-pickup { grid-column: 3 / span 3; }
.quote-entry-grid .field-delivery { grid-column: 6 / span 3; }
.quote-entry-grid .field-pu-date { grid-column: 1 / span 1; grid-row: 2; }
.quote-entry-grid .field-del-date { grid-column: 2 / span 1; grid-row: 2; }
.quote-entry-grid .field-equipment-select { grid-column: 3 / span 2; grid-row: 2; }
.quote-entry-grid .field-commodity { grid-column: 5 / span 2; grid-row: 2; }
.quote-entry-grid .field-weight { grid-column: 7 / span 1; grid-row: 2; }
.quote-entry-grid .field-length { grid-column: 8 / span 1; grid-row: 2; }
.quote-entry-grid .field-notes { grid-column: 1 / span 6; grid-row: 3; }
.quote-entry-grid .inline-actions { grid-column: 7 / span 2; grid-row: 3; }
.quote-table-wrap {
  min-height: 160px;
}
.client-quote-table,
.admin-quote-table {
  table-layout: fixed;
}
.client-quote-table th,
.client-quote-table td {
  font-size: 10px;
  padding: 4px 5px;
}
.client-quote-table th:nth-child(1), .client-quote-table td:nth-child(1) { width: 11%; }
.client-quote-table th:nth-child(2), .client-quote-table td:nth-child(2) { width: 30%; }
.client-quote-table th:nth-child(3), .client-quote-table td:nth-child(3) { width: 11%; }
.client-quote-table th:nth-child(4), .client-quote-table td:nth-child(4) { width: 16%; }
.client-quote-table th:nth-child(5), .client-quote-table td:nth-child(5) { width: 13%; }
.client-quote-table th:nth-child(6), .client-quote-table td:nth-child(6) { width: 10%; }
.client-quote-table th:nth-child(7), .client-quote-table td:nth-child(7) { width: 9%; }
.admin-quote-table th,
.admin-quote-table td {
  font-size: 10px;
  padding: 2px 3px;
  vertical-align: top;
}
.admin-quote-table th:nth-child(1), .admin-quote-table td:nth-child(1) { width: 5%; text-align: center; }
.admin-quote-table th:nth-child(2), .admin-quote-table td:nth-child(2) { width: 10%; }
.admin-quote-table th:nth-child(3), .admin-quote-table td:nth-child(3) { width: 18%; }
.admin-quote-table th:nth-child(4), .admin-quote-table td:nth-child(4) { width: 12%; }
.admin-quote-table th:nth-child(5), .admin-quote-table td:nth-child(5) { width: 11%; }
.admin-quote-table th:nth-child(6), .admin-quote-table td:nth-child(6) { width: 13%; }
.admin-quote-table th:nth-child(7), .admin-quote-table td:nth-child(7) { width: 15%; }
.admin-quote-table th:nth-child(8), .admin-quote-table td:nth-child(8) { width: 8%; }
.admin-quote-table th:nth-child(9), .admin-quote-table td:nth-child(9) { width: 8%; }
.quote-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}
.quote-action-grid button,
.quote-action-grid .quote-action-note {
  width: 100%;
  min-height: 20px;
  font-size: 9px;
  line-height: 1;
}
.quote-action-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  border-radius: 5px;
  padding: 3px 5px;
  font-weight: 800;
}
.status-badge.quoted { background: #dbeafe; color: #1e3a8a; }
.status-badge.approved { background: #dcfce7; color: #166534; }
.readonly-prefill {
  background: #eef6ff !important;
  border-color: #60a5fa !important;
  color: #0f172a !important;
  font-weight: 800;
}
.form-message.success { color: #166534; }
.form-message.error { color: #991b1b; }

@media (max-width: 820px) {
  .portal-tabs { flex-wrap: wrap; }
  .portal-tab { flex: 1 1 150px; }
  .quote-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-entry-grid .field-requester,
  .quote-entry-grid .field-pickup,
  .quote-entry-grid .field-delivery,
  .quote-entry-grid .field-pu-date,
  .quote-entry-grid .field-del-date,
  .quote-entry-grid .field-equipment-select,
  .quote-entry-grid .field-commodity,
  .quote-entry-grid .field-weight,
  .quote-entry-grid .field-length,
  .quote-entry-grid .field-notes,
  .quote-entry-grid .inline-actions {
    grid-column: auto;
    grid-row: auto;
  }
  .quote-entry-grid .field-pickup,
  .quote-entry-grid .field-delivery,
  .quote-entry-grid .field-notes,
  .quote-entry-grid .inline-actions {
    grid-column: 1 / -1;
  }
  .client-compact .client-quote-table td:nth-child(1)::before { content: 'Quote'; }
  .client-compact .client-quote-table td:nth-child(2)::before { content: 'Lane'; }
  .client-compact .client-quote-table td:nth-child(3)::before { content: 'Equipment'; }
  .client-compact .client-quote-table td:nth-child(4)::before { content: 'Commodity'; }
  .client-compact .client-quote-table td:nth-child(5)::before { content: 'Rate'; }
  .client-compact .client-quote-table td:nth-child(6)::before { content: 'Status'; }
  .client-compact .client-quote-table td:nth-child(7)::before { content: 'Action'; }
}

/* quotes-20260608a: faster visual feedback for quote/shipment actions */
button.is-busy,
button:disabled {
  opacity: 0.68;
  cursor: wait;
}

tr[data-id^="__quote_"],
tr[data-id^="__load_"] {
  opacity: 0.78;
}

/* ui-readability-20260609: Quote equipment multi-select + cleaner notes/actions/readability */
body {
  font-size: 13px;
}

button,
input,
select,
textarea {
  font-size: 12px;
}

.app-menu strong {
  font-size: 14px;
}

.app-menu span,
.brand-caption small,
.muted-line,
.form-message {
  font-size: 12px;
}

.panel-title-row strong {
  font-size: 16px;
}

.panel-title-row span {
  font-size: 12.5px;
}

.inline-grid label,
.client-entry-grid label,
.client-entry-grid fieldset,
.client-entry-grid legend,
.quote-entry-grid label,
.quote-entry-grid fieldset,
.quote-entry-grid legend,
.access-form label {
  font-size: 11px;
}

.inline-grid input,
.inline-grid select,
.tiny-search,
.cell-input,
.client-entry-grid input,
.client-entry-grid select,
.quote-entry-grid input,
.quote-entry-grid select,
.quote-entry-grid textarea {
  font-size: 12px;
}

.compact-table th,
.compact-table td {
  font-size: 11px;
}

.admin-table,
.admin-quote-table,
.client-quote-table {
  font-size: 10.8px;
}

.admin-table .cell-input,
.admin-table .read-line,
.admin-quote-table .cell-input,
.client-quote-table td {
  font-size: 11px;
}

.admin-table .subcell,
.client-quote-table .subcell {
  font-size: 9.7px;
}

.quote-entry-grid {
  gap: 6px;
  align-items: start;
}

.quote-entry-grid .field-equipment-select {
  grid-column: 3 / span 4;
  grid-row: 2;
}

.quote-entry-grid .field-commodity {
  grid-column: 7 / span 2;
  grid-row: 2;
}

.quote-entry-grid .field-weight {
  grid-column: 1 / span 1;
  grid-row: 3;
}

.quote-entry-grid .field-length {
  grid-column: 2 / span 1;
  grid-row: 3;
}

.quote-entry-grid .field-notes {
  grid-column: 3 / span 4;
  grid-row: 3;
}

.quote-entry-grid .inline-actions {
  grid-column: 3 / span 4;
  grid-row: 4;
  display: grid;
  grid-template-columns: minmax(160px, 180px) minmax(100px, 120px);
  justify-content: start;
  align-items: center;
  gap: 6px;
}

.quote-entry-grid .inline-actions button {
  width: 100%;
  height: 26px;
}

.quote-equipment-checks {
  margin: 0;
  padding: 5px 7px 6px;
  border: 1px solid #8ca1b3;
  border-radius: 8px;
  background: #f8fbff;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 7px;
  align-self: stretch;
}

.quote-equipment-checks legend {
  padding: 0 4px;
  color: #15243a;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.quote-check-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 4px !important;
  min-height: 20px;
  padding: 2px 4px;
  border: 1px solid #d3dde8;
  border-radius: 6px;
  background: #ffffff;
  color: #15243a;
  text-transform: none !important;
  font-weight: 800 !important;
  line-height: 1.1;
  cursor: pointer;
}

.quote-check-option input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  accent-color: #0b58d0;
}

.quote-equipment-other {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 25px;
  padding: 3px 6px;
  border: 1px solid #8ca1b3;
  border-radius: 6px;
  background: #fffef0;
}

.quote-entry-grid .field-notes .notes-textarea,
.quote-entry-grid textarea[name="customerNotes"] {
  min-height: 50px !important;
  height: 54px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.3;
  border-radius: 8px;
}

.row-note-toggle {
  width: 100%;
  min-width: 0;
}

.row-note-toggle summary {
  list-style: none;
  cursor: pointer;
  min-height: 22px;
  padding: 4px 7px;
  border: 1px solid #9fb4c7;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff 0%, #eaf2fb 100%);
  color: #0f2e52;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-note-toggle summary::-webkit-details-marker {
  display: none;
}

.row-note-toggle summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  border-radius: 999px;
  background: #0b58d0;
  color: #ffffff;
  font-size: 10px;
  line-height: 1;
}

.row-note-toggle[open] summary::before {
  content: "−";
}

.row-note-body {
  max-height: 88px;
  overflow: auto;
  margin-top: 4px;
  padding: 6px 7px;
  border: 1px solid #e7bf74;
  border-radius: 7px;
  background: #fff8e8;
  color: #2b1e0a;
  font-size: 11px;
  line-height: 1.3;
  white-space: pre-wrap;
}

.compact-note-editor {
  display: grid;
  grid-template-rows: auto auto;
  gap: 3px;
}

.admin-table .compact-notes-cell,
.admin-quote-table .compact-notes-cell {
  vertical-align: top;
}

.admin-table .admin-notes-textarea,
.admin-quote-table .admin-notes-textarea {
  min-height: 44px !important;
  max-height: 110px;
  margin-top: 4px;
  padding: 6px 7px;
  font-size: 11px;
  line-height: 1.3;
  border-radius: 7px;
}

.admin-table .action-grid,
.admin-quote-table .quote-action-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  align-items: stretch;
}

.admin-table .action-grid button,
.admin-quote-table .quote-action-grid button,
.client-quote-table .quote-action-grid button,
.client-quote-table .quote-action-note {
  height: 20px;
  min-height: 20px;
  padding: 1px 4px;
  margin: 0;
  border-radius: 5px;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}

.admin-table .action-grid .mini-delete {
  grid-column: 1 / -1;
}

.admin-quote-table .quote-action-grid .mini-delete {
  grid-column: auto;
}

.quote-pricing-cell {
  vertical-align: middle !important;
}

.pricing-customer-label {
  display: block;
  margin-bottom: 3px;
  color: #334155;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.client-row-note-toggle {
  margin-top: 4px;
}

.client-row-note-toggle summary {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  min-height: 20px;
  padding: 3px 7px;
  font-size: 9.5px;
}

.abby-update-cell .client-row-note-toggle {
  margin-top: 0;
}

@media (max-width: 820px) {
  .quote-entry-grid .field-requester,
  .quote-entry-grid .field-pickup,
  .quote-entry-grid .field-delivery,
  .quote-entry-grid .field-pu-date,
  .quote-entry-grid .field-del-date,
  .quote-entry-grid .field-equipment-select,
  .quote-entry-grid .field-commodity,
  .quote-entry-grid .field-weight,
  .quote-entry-grid .field-length,
  .quote-entry-grid .field-notes,
  .quote-entry-grid .inline-actions {
    grid-column: 1 / -1;
    grid-row: auto;
  }

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

  .quote-entry-grid .inline-actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* ui-readability-20260609: compact client row actions */
.client-table .edit-cell {
  text-align: center;
  white-space: nowrap;
}

.client-table .mini-edit,
.client-table .mini-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 20px;
  margin: 0 1px;
  padding: 1px 4px;
  border-radius: 5px;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}

.client-table .mini-copy {
  background: #4a90a4;
}

/* quote-layout-20260609b: align client Quote Request form to handwritten layout.
   Equipment is now a smaller left-side square block. Quote Notes sits beside it,
   and Save/Cancel stay under Equipment instead of floating awkwardly across the form. */
@media (min-width: 821px) {
  .quote-entry-grid {
    grid-template-columns: repeat(12, minmax(64px, 1fr));
    gap: 7px 8px;
    align-items: start;
  }

  .quote-entry-grid .field-requester {
    grid-column: 1 / span 4;
    grid-row: 1;
  }

  .quote-entry-grid .field-pickup {
    grid-column: 5 / span 4;
    grid-row: 1;
  }

  .quote-entry-grid .field-delivery {
    grid-column: 9 / span 4;
    grid-row: 1;
  }

  .quote-entry-grid .field-pu-date {
    grid-column: 1 / span 2;
    grid-row: 2;
  }

  .quote-entry-grid .field-del-date {
    grid-column: 3 / span 2;
    grid-row: 2;
  }

  .quote-entry-grid .field-commodity {
    grid-column: 5 / span 4;
    grid-row: 2;
  }

  .quote-entry-grid .field-weight {
    grid-column: 9 / span 2;
    grid-row: 2;
  }

  .quote-entry-grid .field-length {
    grid-column: 11 / span 2;
    grid-row: 2;
  }

  .quote-entry-grid .field-equipment-select {
    grid-column: 1 / span 4;
    grid-row: 3;
    align-self: start;
  }

  .quote-entry-grid .field-notes {
    grid-column: 5 / span 3;
    grid-row: 3;
    align-self: start;
    max-width: 360px;
  }

  .quote-entry-grid .inline-actions {
    grid-column: 1 / span 4;
    grid-row: 4;
    display: grid;
    grid-template-columns: minmax(170px, 210px) minmax(96px, 120px);
    justify-content: start;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
  }

  .quote-entry-grid .inline-actions button {
    height: 28px;
    width: 100%;
  }

  .quote-equipment-checks {
    width: min(100%, 365px);
    min-height: 154px;
    padding: 8px 9px 9px;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 5px 7px;
  }

  .quote-check-option {
    min-height: 24px;
    padding: 3px 6px;
  }

  .quote-equipment-other {
    min-height: 28px;
  }

  .quote-entry-grid .field-notes .notes-textarea,
  .quote-entry-grid textarea[name="customerNotes"] {
    width: min(100%, 340px);
    min-height: 84px !important;
    height: 92px;
    resize: vertical;
  }
}

/* quote-shipment-layout-20260609c:
   Final client form cleanup based on Humberto's sketch.
   - Quote Request: top fields in two clean rows, Equipment left, Quote Notes beside it,
     buttons directly under Equipment.
   - Client Shipment Request: Delivery Contact/Phone moved up; Equipment stays left;
     Shipment Notes sits directly below Equipment; buttons are pulled left.
   - Admin Quote board: Status column is now status-only, no Valid date or Transit boxes. */
@media (min-width: 821px) {
  .quote-entry-grid {
    grid-template-columns: repeat(12, minmax(64px, 1fr));
    gap: 7px 8px;
    align-items: start;
  }

  .quote-entry-grid .field-requester { grid-column: 1 / span 4; grid-row: 1; }
  .quote-entry-grid .field-pickup { grid-column: 5 / span 4; grid-row: 1; }
  .quote-entry-grid .field-delivery { grid-column: 9 / span 4; grid-row: 1; }

  .quote-entry-grid .field-pu-date { grid-column: 1 / span 2; grid-row: 2; }
  .quote-entry-grid .field-del-date { grid-column: 3 / span 2; grid-row: 2; }
  .quote-entry-grid .field-commodity { grid-column: 5 / span 4; grid-row: 2; }
  .quote-entry-grid .field-weight { grid-column: 9 / span 2; grid-row: 2; }
  .quote-entry-grid .field-length { grid-column: 11 / span 2; grid-row: 2; }

  .quote-entry-grid .field-equipment-select {
    grid-column: 1 / span 4;
    grid-row: 3;
    align-self: start;
    justify-self: start;
  }

  .quote-entry-grid .field-notes {
    grid-column: 5 / span 3;
    grid-row: 3;
    align-self: start;
    justify-self: start;
    width: 100%;
    max-width: 340px;
  }

  .quote-entry-grid .inline-actions {
    grid-column: 1 / span 4;
    grid-row: 4;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 7px;
    margin-top: 5px;
  }

  .quote-entry-grid .inline-actions button {
    width: auto;
    min-width: 118px;
    height: 28px;
    padding-inline: 14px;
  }

  .quote-entry-grid .inline-actions button[type="submit"] {
    min-width: 188px;
  }

  .quote-equipment-checks {
    width: 355px;
    min-height: 152px;
    padding: 8px 9px 9px;
    grid-template-columns: repeat(2, minmax(118px, 1fr));
    gap: 5px 7px;
  }

  .quote-entry-grid .field-notes .notes-textarea,
  .quote-entry-grid textarea[name="customerNotes"] {
    width: 100%;
    max-width: 330px;
    min-height: 86px !important;
    height: 92px;
    resize: vertical;
  }

  .client-compact .client-entry-grid {
    grid-template-columns: repeat(24, minmax(0, 1fr));
    column-gap: 6px;
    row-gap: 7px;
    align-items: end;
  }

  .client-compact .client-entry-grid .field-requester { grid-column: 1 / span 4; grid-row: 1; }
  .client-compact .client-entry-grid .field-ref { grid-column: 5 / span 2; grid-row: 1; }
  .client-compact .client-entry-grid .field-pu-date { grid-column: 7 / span 2; grid-row: 1; }
  .client-compact .client-entry-grid .field-pu-time { grid-column: 9 / span 2; grid-row: 1; }
  .client-compact .client-entry-grid .field-pickup { grid-column: 11 / span 5; grid-row: 1; }
  .client-compact .client-entry-grid .field-del-date { grid-column: 16 / span 2; grid-row: 1; }
  .client-compact .client-entry-grid .field-del-time { grid-column: 18 / span 2; grid-row: 1; }
  .client-compact .client-entry-grid .field-delivery { grid-column: 20 / span 5; grid-row: 1; }

  .client-compact .client-entry-grid .field-commodity { grid-column: 1 / span 10; grid-row: 2; }
  .client-compact .client-entry-grid .field-weight { grid-column: 11 / span 2; grid-row: 2; }
  .client-compact .client-entry-grid .field-rate { grid-column: 13 / span 2; grid-row: 2; }
  .client-compact .client-entry-grid .field-initials { grid-column: 15 / span 2; grid-row: 2; }
  .client-compact .client-entry-grid .field-pu-contact-name { grid-column: 17 / span 4; grid-row: 2; }
  .client-compact .client-entry-grid .field-pu-contact-phone { grid-column: 21 / span 4; grid-row: 2; }

  .client-compact .client-entry-grid .field-del-contact-name { grid-column: 1 / span 4; grid-row: 3; }
  .client-compact .client-entry-grid .field-del-contact-phone { grid-column: 5 / span 4; grid-row: 3; }
  .client-compact .client-entry-grid .field-status-edit { grid-column: 17 / span 4; grid-row: 3; align-self: end; }
  .client-compact .client-entry-grid .field-notify-abby { grid-column: 21 / span 4; grid-row: 3; align-self: stretch; }

  .client-compact .client-entry-grid .field-equipment {
    grid-column: 1 / span 8;
    grid-row: 4;
    align-self: start;
  }

  .client-compact .client-entry-grid .field-notes {
    grid-column: 1 / span 8;
    grid-row: 5;
    align-self: start;
  }

  .client-compact .client-entry-grid .field-notes textarea {
    min-height: 62px;
    max-height: none;
  }

  .client-compact .client-entry-grid .inline-actions {
    grid-column: 1 / span 8;
    grid-row: 6;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 7px;
    margin-top: 3px;
  }

  .client-compact .client-entry-grid .inline-actions button,
  .client-compact .client-entry-grid .inline-actions button:first-child,
  .client-compact .client-entry-grid .inline-actions button:last-child {
    width: auto;
    min-width: 118px;
    height: 28px;
    padding-inline: 14px;
  }

  .client-compact .client-entry-grid .inline-actions button[type="submit"] {
    min-width: 150px;
  }

  .admin-quote-table .quote-status-only-cell {
    vertical-align: middle;
  }

  .admin-quote-table .quote-status-only-cell .status-input {
    height: 24px;
    margin: 0;
  }
}

@media (max-width: 820px) {
  .quote-entry-grid .field-requester,
  .quote-entry-grid .field-pickup,
  .quote-entry-grid .field-delivery,
  .quote-entry-grid .field-pu-date,
  .quote-entry-grid .field-del-date,
  .quote-entry-grid .field-commodity,
  .quote-entry-grid .field-weight,
  .quote-entry-grid .field-length,
  .quote-entry-grid .field-equipment-select,
  .quote-entry-grid .field-notes,
  .quote-entry-grid .inline-actions,
  .client-compact .client-entry-grid .field-requester,
  .client-compact .client-entry-grid .field-ref,
  .client-compact .client-entry-grid .field-pu-date,
  .client-compact .client-entry-grid .field-pu-time,
  .client-compact .client-entry-grid .field-pickup,
  .client-compact .client-entry-grid .field-del-date,
  .client-compact .client-entry-grid .field-del-time,
  .client-compact .client-entry-grid .field-delivery,
  .client-compact .client-entry-grid .field-commodity,
  .client-compact .client-entry-grid .field-weight,
  .client-compact .client-entry-grid .field-rate,
  .client-compact .client-entry-grid .field-initials,
  .client-compact .client-entry-grid .field-pu-contact-name,
  .client-compact .client-entry-grid .field-pu-contact-phone,
  .client-compact .client-entry-grid .field-del-contact-name,
  .client-compact .client-entry-grid .field-del-contact-phone,
  .client-compact .client-entry-grid .field-status-edit,
  .client-compact .client-entry-grid .field-notify-abby,
  .client-compact .client-entry-grid .field-equipment,
  .client-compact .client-entry-grid .field-notes,
  .client-compact .client-entry-grid .inline-actions {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .quote-entry-grid .inline-actions,
  .client-compact .client-entry-grid .inline-actions {
    justify-content: flex-start;
  }
}



/* shipment-notes-compact-20260609d:
   Admin shipment notes buttons are shorter, Trip # and Actions get space back.
   Client Shipment Request puts Shipment Notes beside Equipment and buttons under Equipment. */
@media (min-width: 1100px) {
  .admin-table th:nth-child(1),
  .admin-table td:nth-child(1) { width: 5.15% !important; }
  .admin-table th:nth-child(2),
  .admin-table td:nth-child(2) { width: 8.10% !important; }
  .admin-table th:nth-child(3),
  .admin-table td:nth-child(3) { width: 7.40% !important; }
  .admin-table th:nth-child(4),
  .admin-table td:nth-child(4) { width: 11.00% !important; }
  .admin-table th:nth-child(5),
  .admin-table td:nth-child(5) { width: 13.20% !important; }
  .admin-table th:nth-child(6),
  .admin-table td:nth-child(6) { width: 13.20% !important; }
  .admin-table th:nth-child(7),
  .admin-table td:nth-child(7) { width: 8.60% !important; }
  .admin-table th:nth-child(8),
  .admin-table td:nth-child(8) { width: 10.10% !important; }
  .admin-table th:nth-child(9),
  .admin-table td:nth-child(9) { width: 13.20% !important; }
  .admin-table th:nth-child(10),
  .admin-table td:nth-child(10) { width: 10.05% !important; }
}

.admin-table .compact-note-editor {
  gap: 2px;
}

.admin-table .admin-row-note-toggle summary {
  min-height: 18px;
  padding: 2px 6px;
  font-size: 9px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.admin-table .admin-notes-cell.compact-notes-cell {
  overflow: visible;
}

.admin-table .admin-trip-cell .trip-input {
  min-width: 0;
  padding-left: 4px;
  padding-right: 4px;
  font-size: 11px;
}

.admin-table .compact-action-cell .action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 3px !important;
}

.admin-table .compact-action-cell .action-grid button {
  min-width: 0;
  padding-inline: 3px;
}

@media (min-width: 821px) {
  .client-compact .client-entry-grid .field-equipment {
    grid-column: 1 / span 8;
    grid-row: 4;
    align-self: start;
  }

  .client-compact .client-entry-grid .field-notes {
    grid-column: 9 / span 8;
    grid-row: 4;
    align-self: start;
  }

  .client-compact .client-entry-grid .field-notes textarea {
    min-height: 62px;
    height: 68px;
    max-height: 110px;
    resize: vertical;
  }

  .client-compact .client-entry-grid .inline-actions {
    grid-column: 1 / span 8;
    grid-row: 5;
    justify-content: flex-start;
    margin-top: 4px;
  }
}

/* quote-admin-lane-space-20260609f:
   Quote Requests Admin: shorten Notes buttons/column and give Actions more room. */
@media (min-width: 1100px) {
  .admin-quote-table th:nth-child(1),
  .admin-quote-table td:nth-child(1) { width: 4.5% !important; }

  .admin-quote-table th:nth-child(2),
  .admin-quote-table td:nth-child(2) { width: 8.5% !important; }

  .admin-quote-table th:nth-child(3),
  .admin-quote-table td:nth-child(3) { width: 36% !important; }

  .admin-quote-table th:nth-child(4),
  .admin-quote-table td:nth-child(4) { width: 12% !important; }

  .admin-quote-table th:nth-child(5),
  .admin-quote-table td:nth-child(5) { width: 7% !important; }

  .admin-quote-table th:nth-child(6),
  .admin-quote-table td:nth-child(6) { width: 7% !important; }

  .admin-quote-table th:nth-child(7),
  .admin-quote-table td:nth-child(7) { width: 9% !important; }

  .admin-quote-table th:nth-child(8),
  .admin-quote-table td:nth-child(8) { width: 5% !important; }

  .admin-quote-table th:nth-child(9),
  .admin-quote-table td:nth-child(9) { width: 11% !important; }
}

.admin-quote-table .quote-status-only-cell .status-input {
  width: 92px !important;
  max-width: 100%;
  height: 22px;
  padding-left: 4px;
  padding-right: 4px;
}

.admin-quote-table .quote-pricing-cell .rate-input {
  width: 78px !important;
  max-width: 100%;
  height: 22px;
  padding-left: 4px;
  padding-right: 4px;
}

.admin-quote-table .quote-pricing-cell {
  text-align: left;
}

.admin-quote-table .quote-shipment-cell {
  text-align: center;
  white-space: nowrap;
  font-size: 9.8px;
}

.admin-quote-table .quote-action-grid {
  grid-template-columns: repeat(2, max-content) !important;
  justify-content: flex-start;
  align-items: start;
  gap: 2px !important;
}

.admin-quote-table .quote-action-grid button {
  width: auto !important;
  min-width: 0 !important;
  height: 19px !important;
  min-height: 19px !important;
  padding: 1px 4px !important;
  font-size: 8.7px !important;
  line-height: 1 !important;
}

.admin-quote-table td:nth-child(3) .read-line {
  line-height: 1.16;
}



/* quote-admin-notes-actions-20260609f:
   Shorter Notes toggles free width for the Quote Requests Actions column. */
.admin-quote-table .admin-notes-cell.compact-notes-cell {
  padding-left: 3px !important;
  padding-right: 3px !important;
}

.admin-quote-table .admin-notes-cell .compact-note-editor {
  gap: 2px !important;
}

.admin-quote-table .admin-row-note-toggle summary {
  min-height: 18px !important;
  padding: 2px 4px !important;
  font-size: 8.5px !important;
  border-radius: 5px !important;
}

.admin-quote-table .admin-row-note-toggle summary::before {
  width: 11px !important;
  height: 11px !important;
  margin-right: 3px !important;
  font-size: 8px !important;
}

.admin-quote-table .compact-action-cell {
  padding-left: 4px !important;
  padding-right: 4px !important;
}

.admin-quote-table .quote-action-grid {
  justify-content: start !important;
  grid-template-columns: repeat(2, max-content) !important;
}


/* freight-ratecalc-20260610: Quote Request contextual freight calculator */
body.freight-calculator-open {
  overflow: hidden;
}
.mini-rate {
  border-color: #073b8a !important;
  background: linear-gradient(180deg, #0b58d0, #063f9a) !important;
  color: #fff !important;
  font-weight: 900 !important;
}
.calculator-rate-applied {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
  color: #14532d !important;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, .18);
}
.freight-calculator-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(3, 12, 24, .72);
  backdrop-filter: blur(2px);
}
.freight-calculator-overlay[hidden] {
  display: none !important;
}
.freight-calculator-modal {
  width: min(1280px, calc(100vw - 28px));
  height: min(880px, calc(100vh - 28px));
  display: grid;
  grid-template-rows: 42px 1fr;
  background: #d7e0df;
  border: 4px solid #145cff;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .42);
}
.freight-calculator-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 9px;
  background: #f4f6f8;
  border-bottom: 1px solid #95a2aa;
  color: #111827;
}
.freight-calculator-modal-header strong {
  display: block;
  color: #0f2e52;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.freight-calculator-modal-header span {
  display: block;
  margin-top: 2px;
  color: #425466;
  font-size: 11px;
  font-weight: 700;
}
.freight-calculator-close {
  width: 30px;
  height: 28px;
  border: 1px solid #8a95a1;
  background: #ffffff;
  color: #111827;
  border-radius: 5px;
  font-size: 21px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}
.freight-calculator-close:hover {
  background: #fee2e2;
  color: #991b1b;
  border-color: #ef4444;
}
.freight-calculator-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #d7e0df;
}
@media (max-width: 900px) {
  .freight-calculator-overlay { padding: 6px; }
  .freight-calculator-modal {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
  }
}

/* quote-edit-20260610: client-side edit button for quote requests */
.client-quote-table th:nth-child(1), .client-quote-table td:nth-child(1) { width: 5%; text-align: center; }
.client-quote-table th:nth-child(2), .client-quote-table td:nth-child(2) { width: 11%; }
.client-quote-table th:nth-child(3), .client-quote-table td:nth-child(3) { width: 28%; }
.client-quote-table th:nth-child(4), .client-quote-table td:nth-child(4) { width: 11%; }
.client-quote-table th:nth-child(5), .client-quote-table td:nth-child(5) { width: 15%; }
.client-quote-table th:nth-child(6), .client-quote-table td:nth-child(6) { width: 12%; }
.client-quote-table th:nth-child(7), .client-quote-table td:nth-child(7) { width: 9%; }
.client-quote-table th:nth-child(8), .client-quote-table td:nth-child(8) { width: 9%; }
.client-quote-table .quote-edit-cell {
  padding-left: 2px;
  padding-right: 2px;
  text-align: center;
  vertical-align: middle;
}
.client-quote-table .mini-edit.quote-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 22px;
  padding: 1px 6px;
  margin: 0 auto;
  border: 1px solid #073b8a;
  border-radius: 5px;
  background: #eef5ff;
  color: #0f2e52;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.client-quote-table .quote-edit-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 20px;
  color: #64748b;
  font-weight: 900;
}
.quote-editing-mode {
  border-top-color: #0b58d0;
  box-shadow: inset 0 2px 0 rgba(11, 88, 208, .18);
}
.quote-editing-mode .inline-actions .tiny-primary {
  background: #0b58d0;
  border-color: #073b8a;
}
@media (max-width: 820px) {
  .client-compact .client-quote-table td:nth-child(1)::before { content: 'Edit'; }
  .client-compact .client-quote-table td:nth-child(2)::before { content: 'Quote'; }
  .client-compact .client-quote-table td:nth-child(3)::before { content: 'Lane'; }
  .client-compact .client-quote-table td:nth-child(4)::before { content: 'Equipment'; }
  .client-compact .client-quote-table td:nth-child(5)::before { content: 'Commodity'; }
  .client-compact .client-quote-table td:nth-child(6)::before { content: 'Rate'; }
  .client-compact .client-quote-table td:nth-child(7)::before { content: 'Status'; }
  .client-compact .client-quote-table td:nth-child(8)::before { content: 'Action'; }
}
/* mobile-only-20260610: Phone optimization layer.
   Everything below is scoped to narrow screens so desktop/tablet layouts above 820px stay untouched. */
@media (max-width: 820px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    overflow-x: hidden;
  }

  body.compact-page {
    font-size: 14px;
    background-attachment: fixed;
  }

  .compact-shell,
  .wide-shell,
  .client-compact .compact-shell,
  .admin-compact .compact-shell {
    width: 100%;
    margin: 0;
    min-height: 100dvh;
    padding: 0 8px calc(14px + env(safe-area-inset-bottom));
    border-width: 0 0 3px;
  }

  .app-menu,
  .client-compact .app-menu,
  .admin-compact .app-menu {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    min-height: 48px;
    margin: 0 -8px 8px;
    padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    white-space: normal;
    box-shadow: 0 2px 10px rgba(7, 21, 34, .12);
  }

  .app-menu strong,
  .client-compact .app-menu strong,
  .admin-compact .app-menu strong {
    flex: 1 1 100%;
    margin: 0;
    font-size: 15px;
    line-height: 1.15;
  }

  .app-menu span {
    flex: 1 1 auto;
  }

  .menu-ding,
  .client-compact .menu-ding,
  .admin-compact .menu-ding,
  .app-menu #logoutBtn,
  .client-compact #logoutBtn,
  .admin-compact #logoutBtn {
    position: static;
    transform: none;
    margin: 0 !important;
    min-height: 34px;
    min-width: 88px;
    border: 1px solid #8a95a1 !important;
  }

  .top-strip,
  .admin-strip,
  .brand-strip,
  .client-compact .top-strip,
  .admin-compact .top-strip {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .brand-box,
  .client-compact .brand-box,
  .admin-compact .brand-box {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    min-height: 0;
  }

  .brand-logo-wrap,
  .client-compact .brand-logo-wrap,
  .admin-compact .brand-logo-wrap {
    min-height: 64px;
  }

  .brand-logo {
    max-height: 58px;
  }

  .brand-caption strong {
    font-size: 15px;
    line-height: 1.15;
  }

  .brand-caption span,
  .brand-caption small,
  .coordinator-caption .coordinator-name,
  .coordinator-caption .coordinator-phone {
    font-size: 12px;
    line-height: 1.25;
  }

  .summary-box,
  .admin-summary-box,
  .two-metric-box {
    padding: 10px;
    gap: 8px;
  }

  .summary-box strong,
  .admin-summary-box strong,
  .two-metric-box strong {
    font-size: 26px;
    line-height: 1;
  }

  .admin-client-box {
    display: grid;
    grid-template-columns: 1fr !important;
  }

  .admin-client-heading {
    text-align: left;
  }

  .admin-client-roster {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .client-mini-chip {
    width: auto;
    justify-content: center;
    min-height: 0;
    overflow: visible;
  }

  .portal-tabs,
  .admin-portal-tabs {
    position: sticky;
    top: 48px;
    z-index: 35;
    margin: 8px -2px 10px;
    padding-top: 2px;
    background: linear-gradient(180deg, rgba(0,59,57,.96), rgba(0,59,57,.86));
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .portal-tab {
    flex: 1 0 156px;
    min-height: 42px;
    height: auto;
    padding: 8px 12px;
    border-radius: 10px 10px 0 0;
    font-size: 12px;
  }

  .compact-panel,
  .inline-entry,
  .board-panel,
  .add-panel,
  .quote-panel,
  .quote-admin-panel {
    border-radius: 0;
  }

  .panel-title-row,
  .client-compact .panel-title-row,
  .admin-compact .panel-title-row {
    min-height: 0;
    padding: 9px 10px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
  }

  .panel-title-row strong {
    display: block;
    font-size: 15px;
  }

  .panel-title-row span {
    display: block;
    margin: 3px 0 0;
    font-size: 12px;
    line-height: 1.3;
  }

  .filters-row,
  .client-compact .filters-row,
  .admin-compact .filters-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tiny-search,
  .status-select,
  .client-compact .tiny-search,
  .admin-compact .tiny-search,
  .client-compact .status-select,
  .admin-compact .status-select {
    width: 100%;
    max-width: none;
    min-height: 44px;
  }

  button,
  input,
  select,
  textarea,
  .tiny-primary,
  .tiny-btn,
  .mini-save,
  .mini-pickup,
  .mini-delivered,
  .mini-cancel,
  .mini-restore,
  .mini-delete {
    font-size: 16px;
  }

  .tiny-primary,
  .tiny-btn,
  .mini-save,
  .mini-pickup,
  .mini-delivered,
  .mini-cancel,
  .mini-restore,
  .mini-delete,
  .primary-action,
  .portal-tab {
    min-height: 44px;
    touch-action: manipulation;
  }

  .inline-grid,
  .client-entry-grid,
  .quote-entry-grid,
  .client-compact .client-entry-grid,
  .client-compact .quote-entry-grid {
    grid-template-columns: 1fr !important;
    gap: 9px;
  }

  .inline-grid label,
  .client-entry-grid label,
  .client-entry-grid fieldset,
  .quote-entry-grid label,
  .quote-entry-grid fieldset {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    font-size: 11px;
  }

  .inline-grid input,
  .inline-grid select,
  .client-entry-grid input,
  .client-entry-grid select,
  .quote-entry-grid input,
  .quote-entry-grid select,
  .cell-input,
  .date-input,
  .time-input,
  .phone-input,
  .rate-input,
  .initials-input,
  .notes-input {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px;
    height: 44px;
    margin-left: 0 !important;
    padding: 8px 10px;
    font-size: 16px !important;
  }

  .notes-textarea,
  .client-entry-grid textarea,
  .quote-entry-grid textarea,
  textarea.cell-input,
  .admin-notes-textarea,
  .inline-abby-update-note {
    width: 100% !important;
    min-height: 96px !important;
    font-size: 16px !important;
    line-height: 1.35;
  }

  .equipment-checks,
  .quote-equipment-checks,
  .client-compact .equipment-checks,
  .client-compact .quote-equipment-checks {
    grid-template-columns: 1fr !important;
    min-height: 0;
    padding: 8px;
  }

  .equipment-checks .check-option,
  .quote-check-option {
    min-height: 38px;
    font-size: 14px !important;
  }

  .equipment-checks input[type="checkbox"],
  .quote-check-option input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
  }

  .inline-actions,
  .client-entry-grid .inline-actions,
  .quote-entry-grid .inline-actions,
  .client-compact .client-entry-grid .inline-actions,
  .client-compact .quote-entry-grid .inline-actions {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .inline-actions button,
  .client-entry-grid .inline-actions button,
  .quote-entry-grid .inline-actions button,
  .client-compact .client-entry-grid .inline-actions button,
  .client-compact .quote-entry-grid .inline-actions button,
  #newQuoteBtn,
  #newShipmentBtn,
  #adminLoadMoreBtn,
  #loadMoreClientBtn {
    width: 100% !important;
    min-height: 44px;
    height: auto;
    padding: 10px 12px;
    white-space: normal;
  }

  .table-wrap,
  .admin-table-wrap,
  .quote-table-wrap,
  .client-compact .table-wrap,
  .admin-compact .table-wrap {
    overflow: visible !important;
    background: transparent;
    min-height: 0;
  }

  .compact-table,
  .compact-table thead,
  .compact-table tbody,
  .compact-table tr,
  .compact-table td,
  .admin-compact .compact-table,
  .admin-compact .compact-table thead,
  .admin-compact .compact-table tbody,
  .admin-compact .compact-table tr,
  .admin-compact .compact-table td,
  .client-compact .compact-table,
  .client-compact .compact-table thead,
  .client-compact .compact-table tbody,
  .client-compact .compact-table tr,
  .client-compact .compact-table td {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
  }

  .compact-table thead,
  .admin-compact .compact-table thead,
  .client-compact .compact-table thead {
    display: none !important;
  }

  .compact-table,
  .admin-compact .compact-table,
  .client-compact .compact-table {
    border-collapse: separate;
    background: transparent;
    table-layout: auto;
  }

  .compact-table tr,
  .admin-compact .compact-table tr,
  .client-compact .compact-table tr {
    margin: 0 0 10px;
    border: 1px solid #8d979d;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: 0 3px 12px rgba(7, 21, 34, .10);
  }

  .compact-table td,
  .compact-table tr:nth-child(even) td,
  .admin-compact .compact-table td,
  .admin-compact .compact-table tr:nth-child(even) td,
  .client-compact .compact-table td,
  .client-compact .compact-table tr:nth-child(even) td {
    display: grid;
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    height: auto;
    min-height: 0;
    padding: 9px 10px;
    border: 0;
    border-bottom: 1px solid #d7e0e7;
    background: transparent !important;
    text-align: left !important;
    white-space: normal;
    overflow: visible;
  }

  .compact-table td:last-child,
  .admin-compact .compact-table td:last-child,
  .client-compact .compact-table td:last-child {
    border-bottom: 0;
  }

  .compact-table td::before,
  .admin-compact .compact-table td::before,
  .client-compact .compact-table td::before {
    content: '';
    color: #475569;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.25;
    padding-top: 2px;
  }

  .compact-table .empty-cell,
  .admin-compact .compact-table .empty-cell,
  .client-compact .compact-table .empty-cell {
    display: block !important;
    text-align: center !important;
    padding: 18px 12px !important;
  }

  .compact-table .empty-cell::before,
  .admin-compact .compact-table .empty-cell::before,
  .client-compact .compact-table .empty-cell::before {
    content: none !important;
  }

  .admin-compact .admin-quote-table td:nth-child(1)::before { content: 'Company'; }
  .admin-compact .admin-quote-table td:nth-child(2)::before { content: 'Quote'; }
  .admin-compact .admin-quote-table td:nth-child(3)::before { content: 'Lane'; }
  .admin-compact .admin-quote-table td:nth-child(4)::before { content: 'Commodity'; }
  .admin-compact .admin-quote-table td:nth-child(5)::before { content: 'Status'; }
  .admin-compact .admin-quote-table td:nth-child(6)::before { content: 'Pricing'; }
  .admin-compact .admin-quote-table td:nth-child(7)::before { content: 'Notes'; }
  .admin-compact .admin-quote-table td:nth-child(8)::before { content: 'Shipment'; }
  .admin-compact .admin-quote-table td:nth-child(9)::before { content: 'Actions'; }

  .admin-compact .admin-table:not(.admin-quote-table) td:nth-child(1)::before { content: 'Company'; }
  .admin-compact .admin-table:not(.admin-quote-table) td:nth-child(2)::before { content: 'Status'; }
  .admin-compact .admin-table:not(.admin-quote-table) td:nth-child(3)::before { content: 'Trip #'; }
  .admin-compact .admin-table:not(.admin-quote-table) td:nth-child(4)::before { content: "Shipper / Rate"; }
  .admin-compact .admin-table:not(.admin-quote-table) td:nth-child(5)::before { content: 'Pickup'; }
  .admin-compact .admin-table:not(.admin-quote-table) td:nth-child(6)::before { content: 'Delivery'; }
  .admin-compact .admin-table:not(.admin-quote-table) td:nth-child(7)::before { content: 'Commodity'; }
  .admin-compact .admin-table:not(.admin-quote-table) td:nth-child(8)::before { content: 'Carrier / Driver'; }
  .admin-compact .admin-table:not(.admin-quote-table) td:nth-child(9)::before { content: 'Shipment Notes'; }
  .admin-compact .admin-table:not(.admin-quote-table) td:nth-child(10)::before { content: 'Actions'; }

  .client-compact .client-quote-table td:nth-child(1)::before { content: 'Edit'; }
  .client-compact .client-quote-table td:nth-child(2)::before { content: 'Quote'; }
  .client-compact .client-quote-table td:nth-child(3)::before { content: 'Lane'; }
  .client-compact .client-quote-table td:nth-child(4)::before { content: 'Equipment'; }
  .client-compact .client-quote-table td:nth-child(5)::before { content: 'Commodity'; }
  .client-compact .client-quote-table td:nth-child(6)::before { content: 'Rate'; }
  .client-compact .client-quote-table td:nth-child(7)::before { content: 'Status'; }
  .client-compact .client-quote-table td:nth-child(8)::before { content: 'Action'; }

  .client-compact .client-table td:nth-child(1)::before { content: 'Edit'; }
  .client-compact .client-table td:nth-child(2)::before { content: 'Status'; }
  .client-compact .client-table td:nth-child(3)::before { content: "Shipper's No."; }
  .client-compact .client-table td:nth-child(4)::before { content: 'Trip #'; }
  .client-compact .client-table td:nth-child(5)::before { content: 'Pickup'; }
  .client-compact .client-table td:nth-child(6)::before { content: 'Delivery'; }
  .client-compact .client-table td:nth-child(7)::before { content: 'Commodity'; }
  .client-compact .client-table td:nth-child(8)::before { content: 'Rate / Approved'; }
  .client-compact .client-table td:nth-child(9)::before { content: 'Carrier / Driver'; }
  .client-compact .client-table td:nth-child(10)::before { content: 'Abby Update'; }

  .status-badge,
  .admin-table .status-badge,
  .client-table .status-badge {
    width: fit-content !important;
    max-width: 100%;
    min-height: 28px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .action-grid,
  .quote-action-grid,
  .admin-table .action-grid,
  .admin-quote-table .quote-action-grid,
  .client-quote-table .quote-action-grid,
  .admin-compact .action-grid,
  .admin-compact .quote-action-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    justify-content: stretch !important;
  }

  .action-grid button,
  .quote-action-grid button,
  .admin-table .action-grid button,
  .admin-quote-table .quote-action-grid button,
  .client-quote-table .quote-action-grid button,
  .client-table .mini-edit,
  .client-table .mini-copy,
  .client-quote-table .mini-edit.quote-edit-btn,
  .quote-action-note {
    width: 100% !important;
    min-height: 40px !important;
    height: auto !important;
    padding: 8px 10px !important;
    font-size: 13px !important;
    white-space: normal !important;
  }

  .admin-table .company-ln-cell,
  .admin-table .ln-cell,
  .client-table .edit-cell,
  .client-quote-table .quote-edit-cell {
    text-align: left !important;
  }

  .admin-table .company-ln-cell .company-tag,
  .admin-table .ln-cell .company-tag {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    min-height: 30px;
    align-items: center;
    padding: 6px 9px;
    font-size: 12px;
  }

  .admin-table .company-ln-cell .row-number {
    margin-right: 6px;
    margin-bottom: 0;
  }

  .read-line,
  .subcell,
  .admin-table .read-line,
  .admin-table .subcell,
  .client-table .read-line,
  .client-table .subcell,
  .client-quote-table .subcell {
    font-size: 13px;
    line-height: 1.35;
  }

  .row-note-toggle summary,
  .admin-row-note-toggle summary,
  .client-row-note-toggle summary {
    min-height: 40px !important;
    display: flex;
    align-items: center;
    white-space: normal;
    font-size: 12px !important;
  }

  .row-note-body {
    max-height: 180px;
    font-size: 13px;
  }

  .load-more-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .showing-count {
    text-align: center;
  }

  .access-gate {
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    min-height: 100dvh;
  }

  .access-panel {
    width: min(100%, 460px);
    padding: 20px 16px;
  }

  .access-logo-frame {
    min-height: 70px;
  }

  .access-logo,
  .access-panel .brand-logo {
    max-height: 62px;
  }

  .access-panel h1,
  .portal-home-card h1 {
    font-size: 24px;
    line-height: 1.1;
  }

  .access-panel p,
  .portal-home-card p {
    font-size: 14px;
    line-height: 1.4;
  }

  .access-form input,
  .primary-action {
    min-height: 48px;
    font-size: 16px;
  }

  .portal-home {
    padding: 12px;
    min-height: 100dvh;
  }

  .portal-home-card {
    padding: 18px 14px;
    border-width: 3px;
  }

  .portal-home-links {
    grid-template-columns: 1fr !important;
  }

  .portal-home-links a {
    min-height: 54px;
    padding: 14px;
  }

  .chat-overlay {
    align-items: stretch;
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  }

  .chat-card {
    width: 100%;
    max-height: none;
    height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 14px;
  }

  .chat-header {
    padding: 12px;
    gap: 10px;
  }

  .chat-header strong {
    font-size: 16px;
  }

  .chat-header span {
    font-size: 12px;
  }

  .chat-header-actions {
    gap: 6px;
  }

  .chat-pdf-btn,
  .chat-close {
    min-height: 40px;
  }

  .chat-thread {
    min-height: 0;
    max-height: none;
    padding: 12px;
    gap: 10px;
  }

  .chat-bubble {
    max-width: 92%;
    padding: 11px 12px;
  }

  .chat-bubble p {
    font-size: 14px;
  }

  .chat-compose {
    padding: 12px;
  }

  .chat-compose textarea {
    min-height: 84px;
    font-size: 16px;
  }

  .chat-compose-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .chat-compose-actions button {
    width: 100%;
    min-height: 44px;
  }

  .chat-attachment-image img {
    max-width: 100%;
    height: auto;
  }

  .notice-confirm-card {
    width: min(100%, 380px);
    border-radius: 14px;
  }

  .notice-confirm-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .notice-confirm-actions button {
    width: 100%;
    min-height: 44px;
  }

  .freight-calculator-overlay {
    padding: 0;
  }

  .freight-calculator-modal {
    width: 100vw;
    height: 100dvh;
    border-width: 0;
    grid-template-rows: auto 1fr;
  }

  .freight-calculator-modal-header {
    padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  }

  .freight-calculator-modal-header strong {
    font-size: 13px;
  }

  .freight-calculator-modal-header span {
    font-size: 10px;
  }

  .freight-calculator-close {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .brand-box,
  .client-compact .brand-box,
  .admin-compact .brand-box {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .brand-caption,
  .brand-caption.align-right,
  .brand-box.align-right,
  .admin-client-heading {
    text-align: center;
  }

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

  .compact-table td,
  .admin-compact .compact-table td,
  .client-compact .compact-table td {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .compact-table td::before,
  .admin-compact .compact-table td::before,
  .client-compact .compact-table td::before {
    padding-top: 0;
  }

  .summary-box,
  .admin-summary-box,
  .two-metric-box {
    grid-template-columns: 1fr;
  }
}


/* mobile-only-20260610b: keep tabs touch-friendly but avoid sticky overlap under variable-height mobile menu. */
@media (max-width: 820px) {
  .portal-tabs,
  .admin-portal-tabs {
    position: relative;
    top: auto;
  }
}

/* Client registration admin modal - 20260610 */
.client-create-card {
  width: min(920px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 40px));
  grid-template-rows: auto 1fr;
}
.client-create-form {
  overflow: auto;
  padding: 20px 22px 22px;
}
.client-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.client-create-grid label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.client-create-grid input,
.client-create-grid textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
  text-transform: none;
  letter-spacing: normal;
}
.client-create-grid textarea { resize: vertical; min-height: 44px; }
.password-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.client-create-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
@media (max-width: 760px) {
  .client-create-card { width: calc(100vw - 20px); max-height: calc(100vh - 24px); }
  .client-create-grid { grid-template-columns: 1fr; }
  .client-create-form { padding: 16px; }
  .client-create-actions { justify-content: stretch; flex-direction: column; }
  .client-create-actions button { width: 100%; }
}


/* Route stops / multi-stop trips */
.route-stops-card {
  grid-column: 1 / -1;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.95);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.route-stops-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.route-stops-header strong {
  display: block;
  font-size: 0.88rem;
  color: #0f172a;
}
.route-stops-header span {
  display: block;
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 2px;
}
.route-stops-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.route-stops-list {
  display: grid;
  gap: 10px;
}
.route-stop-row {
  display: grid;
  grid-template-columns: minmax(72px, 0.75fr) minmax(130px, 1fr) minmax(120px, 1.35fr) minmax(120px, 1.35fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 14px;
  background: #ffffff;
}
.route-stop-row.shipment-stop-row {
  grid-template-columns: minmax(72px, 0.65fr) minmax(110px, 0.85fr) minmax(90px, 0.65fr) minmax(140px, 1.2fr) minmax(120px, 1fr) minmax(110px, 0.85fr) minmax(140px, 1.1fr) auto;
}
.route-stop-row label {
  min-width: 0;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
}
.route-stop-row input,
.route-stop-row select,
.route-stop-row textarea {
  width: 100%;
  margin-top: 3px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 9px;
  font: inherit;
  font-size: 0.82rem;
  background: #fff;
  color: #0f172a;
}
.route-stop-row textarea {
  min-height: 38px;
  resize: vertical;
}
.route-stop-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-weight: 800;
  font-size: 0.72rem;
  margin-bottom: 4px;
}
.route-stop-remove {
  align-self: end;
  min-height: 34px;
  white-space: nowrap;
}
.route-stops-mini {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  margin-top: 2px;
}
@media (max-width: 980px) {
  .route-stops-header {
    flex-direction: column;
  }
  .route-stops-actions {
    justify-content: flex-start;
  }
  .route-stop-row,
  .route-stop-row.shipment-stop-row {
    grid-template-columns: 1fr;
  }
  .route-stop-remove {
    width: 100%;
  }
}

/* route-inline-approve-refresh-20260615e: Add Stop/Round Trip now lives inside the line-entry form,
   using the same square yellow field style as the original pickup/delivery inputs. */
.route-stops-inline {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  gap: 4px 6px;
  align-items: end;
  align-self: end;
}
.route-actions-label {
  color: #15243a;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  align-self: center;
  padding-right: 2px;
}
.route-stops-inline > button {
  height: 24px;
  min-height: 24px;
  padding: 1px 8px;
  font-size: 9.5px;
  line-height: 1;
  white-space: nowrap;
}
.route-stops-inline .route-stops-list {
  display: none;
}
.field-route-stop-output {
  min-width: 0;
}
.field-route-stop-output .route-stops-list {
  display: grid;
  gap: 4px;
}
.field-route-stop-output:empty,
.field-route-stop-output .route-stops-list:empty {
  display: none;
}
.route-stop-row,
.route-stop-row.shipment-stop-row,
.route-stop-row.quote-stop-row {
  display: grid;
  gap: 4px 6px;
  align-items: end;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.route-stop-row.quote-stop-row {
  grid-template-columns: 96px 112px minmax(240px, 1fr) minmax(180px, .75fr) 74px;
}
.route-stop-row.shipment-stop-row {
  grid-template-columns: 92px 104px 82px minmax(220px, 1fr) minmax(140px, .65fr) 118px minmax(160px, .75fr) 74px;
}
.route-stop-row label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: #15243a;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}
.route-stop-row input,
.route-stop-row select,
.route-stop-row textarea {
  width: 100%;
  min-width: 0;
  height: 24px;
  margin-top: 0;
  padding: 2px 5px;
  border: 1px solid #687783;
  border-radius: 0;
  background: var(--input);
  color: #111827;
  font: inherit;
  font-size: 10.5px;
  outline: none;
}
.route-stop-row input:focus,
.route-stop-row select:focus,
.route-stop-row textarea:focus {
  border-color: #145cff;
  box-shadow: 0 0 0 1px #145cff inset;
}
.route-stop-row textarea {
  min-height: 24px;
  height: 24px;
  resize: vertical;
  line-height: 1.25;
}
.route-stop-remove {
  align-self: end;
  width: 74px;
  height: 24px;
  min-height: 24px;
  padding: 1px 6px;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}

@media (min-width: 821px) {
  .quote-entry-grid {
    grid-template-columns: repeat(15, minmax(50px, 1fr));
    gap: 7px 8px;
  }
  .quote-entry-grid .field-requester { grid-column: 1 / span 4; grid-row: 1; }
  .quote-entry-grid .field-pickup { grid-column: 5 / span 4; grid-row: 1; }
  .quote-entry-grid .field-delivery { grid-column: 9 / span 4; grid-row: 1; }
  .quote-entry-grid .field-route-controls { grid-column: 13 / span 3; grid-row: 1; }

  .quote-entry-grid .field-pu-date { grid-column: 1 / span 2; grid-row: 2; }
  .quote-entry-grid .field-del-date { grid-column: 3 / span 2; grid-row: 2; }
  .quote-entry-grid .field-commodity { grid-column: 5 / span 4; grid-row: 2; }
  .quote-entry-grid .field-weight { grid-column: 9 / span 2; grid-row: 2; }
  .quote-entry-grid .field-length { grid-column: 11 / span 2; grid-row: 2; }
  .quote-entry-grid .field-equipment-select { grid-column: 1 / span 4; grid-row: 3; }
  .quote-entry-grid .field-notes { grid-column: 5 / span 4; grid-row: 3; }
  .quote-entry-grid .inline-actions { grid-column: 1 / span 4; grid-row: 4; }
  .quote-entry-grid .field-route-controls:has([data-route-stop-row]) {
    grid-column: 1 / -1;
    grid-row: 5;
    margin-top: 2px;
  }
  .quote-entry-grid .field-route-controls:has([data-route-stop-row]) .route-stops-list {
    margin-top: 4px;
  }

  .client-compact .client-entry-grid .field-route-controls,
  .client-entry-grid .field-route-controls {
    grid-column: 11 / span 14;
    grid-row: 2;
    margin-top: -1px;
  }
  .client-compact .client-entry-grid .field-commodity,
  .client-entry-grid .field-commodity { grid-row: 3; }
  .client-compact .client-entry-grid .field-weight,
  .client-entry-grid .field-weight { grid-row: 3; }
  .client-compact .client-entry-grid .field-rate,
  .client-entry-grid .field-rate { grid-row: 3; }
  .client-compact .client-entry-grid .field-initials,
  .client-entry-grid .field-initials { grid-row: 3; }
  .client-compact .client-entry-grid .field-pu-contact-name,
  .client-entry-grid .field-pu-contact-name { grid-row: 3; }
  .client-compact .client-entry-grid .field-pu-contact-phone,
  .client-entry-grid .field-pu-contact-phone { grid-row: 3; }
  .client-compact .client-entry-grid .field-del-contact-name,
  .client-entry-grid .field-del-contact-name { grid-row: 4; }
  .client-compact .client-entry-grid .field-del-contact-phone,
  .client-entry-grid .field-del-contact-phone { grid-row: 4; }
  .client-compact .client-entry-grid .field-notes,
  .client-entry-grid .field-notes { grid-row: 4; }
  .client-compact .client-entry-grid .field-status-edit,
  .client-entry-grid .field-status-edit { grid-row: 4; }
  .client-compact .client-entry-grid .field-equipment,
  .client-entry-grid .field-equipment { grid-row: 5; }
  .client-compact .client-entry-grid .inline-actions,
  .client-entry-grid .inline-actions { grid-row: 5; }
  .client-compact .client-entry-grid .field-route-controls:has([data-route-stop-row]),
  .client-entry-grid .field-route-controls:has([data-route-stop-row]) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 820px) {
  .route-stops-inline,
  .quote-entry-grid .field-route-controls,
  .client-entry-grid .field-route-controls,
  .client-compact .client-entry-grid .field-route-controls {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }
  .route-stops-inline {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .route-actions-label {
    grid-column: 1 / -1;
  }
  .route-stops-inline > button {
    width: 100%;
    min-height: 44px;
    height: auto;
    font-size: 14px;
  }
  .route-stop-row,
  .route-stop-row.quote-stop-row,
  .route-stop-row.shipment-stop-row {
    grid-template-columns: 1fr !important;
    gap: 7px;
    padding: 8px;
    border: 1px solid #8ca1b3;
    background: #edf3f3;
  }
  .route-stop-row label {
    font-size: 11px;
  }
  .route-stop-row input,
  .route-stop-row select,
  .route-stop-row textarea {
    width: 100% !important;
    min-height: 44px;
    height: 44px;
    padding: 8px 10px;
    font-size: 16px !important;
  }
  .route-stop-row textarea {
    min-height: 78px !important;
  }
  .route-stop-remove {
    width: 100%;
    min-height: 44px;
    height: auto;
    font-size: 14px;
  }
}

/* legacy inline route-stop relocation disabled by route-stop-layout-fix-20260616b */


/* route-stop-quote-cleanup-20260616c: quote stops belong below Requested By and above PU Estimate.
   Keep buttons fixed, and simplify quote-stop fields to Date + Location only. */
@media (min-width: 821px) {
  .quote-entry-grid .field-route-controls {
    grid-column: 13 / span 3;
    grid-row: 1;
    align-self: end;
  }
  .quote-entry-grid .field-route-stop-output {
    grid-column: 1 / span 12;
    grid-row: 2;
    align-self: start;
  }
  .quote-entry-grid .field-pu-date { grid-column: 1 / span 2; grid-row: 3; }
  .quote-entry-grid .field-del-date { grid-column: 3 / span 2; grid-row: 3; }
  .quote-entry-grid .field-commodity { grid-column: 5 / span 4; grid-row: 3; }
  .quote-entry-grid .field-weight { grid-column: 9 / span 2; grid-row: 3; }
  .quote-entry-grid .field-length { grid-column: 11 / span 2; grid-row: 3; }
  .quote-entry-grid .field-equipment-select { grid-column: 1 / span 4; grid-row: 4; }
  .quote-entry-grid .field-notes { grid-column: 5 / span 4; grid-row: 4; }
  .quote-entry-grid .inline-actions { grid-column: 1 / span 4; grid-row: 5; }
}

.route-stop-row.quote-stop-row {
  grid-template-columns: 120px minmax(260px, 1fr) 74px;
}
.route-stop-row.quote-stop-row .route-stop-date,
.route-stop-row.quote-stop-row .route-stop-location {
  min-width: 0;
}
.route-stop-row.quote-stop-row .route-stop-remove {
  align-self: end;
}


/* route-stop-shipment-cleanup-20260616d: simplify shipment stop rows and keep remove buttons working. */
.route-stop-row.shipment-stop-row {
  grid-template-columns: 104px minmax(150px, 1fr) 118px minmax(260px, 1.25fr) 74px;
}
.route-stop-row.shipment-stop-row .route-stop-date,
.route-stop-row.shipment-stop-row .route-stop-contact,
.route-stop-row.shipment-stop-row .route-stop-phone,
.route-stop-row.shipment-stop-row .route-stop-location {
  min-width: 0;
}
.route-stop-row.shipment-stop-row .route-stop-remove {
  align-self: end;
}

/* shipment-request-layout-fix-20260617:
   Client Shipment Requests desktop cleanup.
   - Round Trip / Add Stop stays below Commodity.
   - Equipment remains its own box.
   - Save Shipment / Cancel stays below Equipment, outside the box.
   This targets the customer-side load form only. */
@media (min-width: 821px) {
  .client-compact #loadForm .client-entry-grid .field-commodity,
  .client-compact #loadForm .client-entry-grid .field-weight,
  .client-compact #loadForm .client-entry-grid .field-rate,
  .client-compact #loadForm .client-entry-grid .field-initials,
  .client-compact #loadForm .client-entry-grid .field-pu-contact-name,
  .client-compact #loadForm .client-entry-grid .field-pu-contact-phone {
    grid-row: 2 !important;
  }

  .client-compact #loadForm .client-entry-grid .field-route-controls {
    grid-column: 1 / span 4 !important;
    grid-row: 3 !important;
    margin-top: 0 !important;
    align-self: end;
  }

  .client-compact #loadForm .client-entry-grid .field-route-stop-output {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    min-width: 0;
  }

  .client-compact #loadForm .client-entry-grid .field-del-contact-name {
    grid-column: 1 / span 4 !important;
    grid-row: 5 !important;
  }

  .client-compact #loadForm .client-entry-grid .field-del-contact-phone {
    grid-column: 5 / span 4 !important;
    grid-row: 5 !important;
  }

  .client-compact #loadForm .client-entry-grid .field-notes {
    grid-column: 9 / span 16 !important;
    grid-row: 5 !important;
    align-self: start;
  }

  .client-compact #loadForm .client-entry-grid .field-equipment {
    grid-column: 1 / span 8 !important;
    grid-row: 6 !important;
    align-self: start;
  }

  .client-compact #loadForm .client-entry-grid .inline-actions {
    grid-column: 1 / span 8 !important;
    grid-row: 7 !important;
    display: flex !important;
    justify-content: flex-start;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
  }

  .client-compact #loadForm .client-entry-grid .inline-actions button {
    width: auto !important;
    min-width: 118px;
    height: 28px;
    padding-inline: 14px;
  }

  .client-compact #loadForm .client-entry-grid .inline-actions button[type="submit"] {
    min-width: 150px;
  }
}

/* shipment-request-layout-fix-20260617b:
   Make Shipment Notes smaller and more square on the client Shipment Requests form,
   aligned with Delivery Contact / Delivery Phone. */
@media (min-width: 821px) {
  .client-compact #loadForm .client-entry-grid .field-notes {
    grid-column: 9 / span 8 !important;
    grid-row: 5 !important;
    align-self: start;
    justify-self: start;
  }

  .client-compact #loadForm .client-entry-grid .field-notes textarea {
    min-height: 62px !important;
    height: 68px !important;
    max-height: 110px;
    resize: vertical;
  }
}


/* shipment-request-polish-20260617c:
   Professional client Shipment Requests alignment requested by Humberto.
   - Delivery Contact, Delivery Phone and Shipment Notes start on the same visual row.
   - Empty route-stop space no longer pushes this block downward.
   - Shipment Notes remains compact/square, but slightly larger and easier to type in. */
@media (min-width: 821px) {
  .client-compact #loadForm .client-entry-grid {
    row-gap: 5px;
    align-items: start;
  }

  .client-compact #loadForm .client-entry-grid .field-route-stop-output:not(:has([data-route-stop-row])) {
    display: none !important;
  }

  .client-compact #loadForm .client-entry-grid .field-del-contact-name,
  .client-compact #loadForm .client-entry-grid .field-del-contact-phone,
  .client-compact #loadForm .client-entry-grid .field-notes {
    grid-row: 4 !important;
    align-self: start !important;
    margin-top: 0 !important;
    line-height: 1.12;
  }

  .client-compact #loadForm .client-entry-grid .field-del-contact-name {
    grid-column: 1 / span 4 !important;
  }

  .client-compact #loadForm .client-entry-grid .field-del-contact-phone {
    grid-column: 5 / span 4 !important;
  }

  .client-compact #loadForm .client-entry-grid .field-notes {
    grid-column: 9 / span 4 !important;
    justify-self: start;
    width: clamp(132px, 12vw, 158px);
    max-width: 158px;
  }

  .client-compact #loadForm .client-entry-grid .field-notes textarea {
    width: 100% !important;
    min-height: 82px !important;
    height: 86px !important;
    max-height: 130px;
    padding: 5px 7px;
    resize: vertical;
  }

  .client-compact #loadForm .client-entry-grid .field-equipment {
    grid-column: 1 / span 8 !important;
    grid-row: 5 !important;
    align-self: start !important;
    margin-top: 0 !important;
  }

  .client-compact #loadForm .client-entry-grid .inline-actions {
    grid-column: 1 / span 8 !important;
    grid-row: 6 !important;
    align-self: start !important;
    margin-top: 4px !important;
  }

  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-del-contact-name,
  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-del-contact-phone,
  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-notes {
    grid-row: 5 !important;
  }

  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-equipment {
    grid-row: 6 !important;
  }

  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .inline-actions {
    grid-row: 7 !important;
  }
}

/* shipment-request-polish-20260617d:
   Final client Shipment Requests refinement.
   - Equipment and action buttons are pulled upward instead of waiting below the Notes row.
   - Shipment Notes is widened and made taller so its textarea bottom visually aligns with the Equipment box.
   - Delivery Contact, Delivery Phone and Shipment Notes still begin on the same line. */
@media (min-width: 821px) {
  .client-compact #loadForm .client-entry-grid .field-del-contact-name,
  .client-compact #loadForm .client-entry-grid .field-del-contact-phone,
  .client-compact #loadForm .client-entry-grid .field-notes,
  .client-compact #loadForm .client-entry-grid .field-equipment,
  .client-compact #loadForm .client-entry-grid .inline-actions {
    grid-row: 4 !important;
  }

  .client-compact #loadForm .client-entry-grid .field-notes {
    grid-column: 9 / span 5 !important;
    width: clamp(158px, 14vw, 190px) !important;
    max-width: 190px !important;
    justify-self: start !important;
  }

  .client-compact #loadForm .client-entry-grid .field-notes textarea {
    min-height: 104px !important;
    height: 110px !important;
    max-height: 150px !important;
    width: 100% !important;
  }

  .client-compact #loadForm .client-entry-grid .field-equipment {
    grid-column: 1 / span 8 !important;
    align-self: start !important;
    margin-top: 36px !important;
  }

  .client-compact #loadForm .client-entry-grid .inline-actions {
    grid-column: 1 / span 8 !important;
    align-self: start !important;
    margin-top: 96px !important;
  }

  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-del-contact-name,
  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-del-contact-phone,
  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-notes,
  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-equipment,
  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .inline-actions {
    grid-row: 5 !important;
  }
}

/* shipment-request-polish-20260617e:
   Fine alignment pass requested from screenshot review.
   Shipment Notes now extends farther down/right, while Equipment and buttons are raised.
   The textarea bottom is tuned to land on the same visual baseline as the Equipment box bottom. */
@media (min-width: 821px) {
  .client-compact #loadForm .client-entry-grid .field-del-contact-name,
  .client-compact #loadForm .client-entry-grid .field-del-contact-phone,
  .client-compact #loadForm .client-entry-grid .field-notes,
  .client-compact #loadForm .client-entry-grid .field-equipment,
  .client-compact #loadForm .client-entry-grid .inline-actions {
    grid-row: 4 !important;
  }

  .client-compact #loadForm .client-entry-grid .field-notes {
    grid-column: 9 / span 5 !important;
    width: clamp(166px, 15vw, 198px) !important;
    max-width: 198px !important;
    justify-self: start !important;
  }

  .client-compact #loadForm .client-entry-grid .field-notes textarea {
    min-height: 98px !important;
    height: 100px !important;
    max-height: 150px !important;
    width: 100% !important;
  }

  .client-compact #loadForm .client-entry-grid .field-equipment {
    grid-column: 1 / span 8 !important;
    align-self: start !important;
    margin-top: 58px !important;
  }

  .client-compact #loadForm .client-entry-grid .inline-actions {
    grid-column: 1 / span 8 !important;
    align-self: start !important;
    margin-top: 114px !important;
  }

  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-del-contact-name,
  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-del-contact-phone,
  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-notes,
  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-equipment,
  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .inline-actions {
    grid-row: 5 !important;
  }
}

/* shipment-request-overlap-fix-20260617f:
   Final client Shipment Requests adjustment after live screenshot review.
   - Keeps Delivery Contact / Delivery Phone / Shipment Notes aligned at the top.
   - Enlarges Shipment Notes slightly down and right.
   - Keeps Equipment pulled up.
   - Moves Save Shipment / Cancel safely below Equipment, no overlap. */
@media (min-width: 821px) {
  .client-compact #loadForm .client-entry-grid .field-notes {
    grid-column: 9 / span 5 !important;
    grid-row: 4 !important;
    justify-self: start !important;
    width: clamp(154px, 13.5vw, 184px) !important;
    max-width: 184px !important;
  }

  .client-compact #loadForm .client-entry-grid .field-notes textarea {
    width: 100% !important;
    min-height: 98px !important;
    height: 102px !important;
    max-height: 150px !important;
    padding: 5px 7px !important;
    resize: vertical;
  }

  .client-compact #loadForm .client-entry-grid .field-equipment {
    grid-column: 1 / span 8 !important;
    grid-row: 5 !important;
    align-self: start !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    min-height: 58px !important;
    box-sizing: border-box;
  }

  .client-compact #loadForm .client-entry-grid .inline-actions {
    grid-column: 1 / span 8 !important;
    grid-row: 6 !important;
    align-self: start !important;
    margin-top: 18px !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 7px !important;
  }

  .client-compact #loadForm .client-entry-grid .inline-actions button {
    width: auto !important;
    min-width: 118px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 2px 14px !important;
  }

  .client-compact #loadForm .client-entry-grid .inline-actions button[type="submit"] {
    min-width: 150px !important;
  }

  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-notes {
    grid-row: 5 !important;
  }

  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-equipment {
    grid-row: 6 !important;
  }

  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .inline-actions {
    grid-row: 7 !important;
  }
}

/* shipment-request-equipment-microdrop-20260617h:
   Micro-adjustment after visual review: keep the sketch layout, but drop
   the Equipment fieldset a few pixels so its legend no longer touches the
   Delivery Contact input above it. */
@media (min-width: 821px) {
  .client-compact #loadForm .client-entry-grid {
    row-gap: 5px !important;
    align-items: start !important;
  }

  .client-compact #loadForm .client-entry-grid .field-del-contact-name,
  .client-compact #loadForm .client-entry-grid .field-del-contact-phone,
  .client-compact #loadForm .client-entry-grid .field-notes,
  .client-compact #loadForm .client-entry-grid .field-equipment {
    grid-row: 4 !important;
    align-self: start !important;
  }

  .client-compact #loadForm .client-entry-grid .field-del-contact-name {
    grid-column: 1 / span 4 !important;
    margin-top: 0 !important;
  }

  .client-compact #loadForm .client-entry-grid .field-del-contact-phone {
    grid-column: 5 / span 4 !important;
    margin-top: 0 !important;
  }

  .client-compact #loadForm .client-entry-grid .field-notes {
    grid-column: 9 / span 6 !important;
    justify-self: start !important;
    width: clamp(190px, 18vw, 235px) !important;
    max-width: 235px !important;
    margin-top: 0 !important;
  }

  .client-compact #loadForm .client-entry-grid .field-notes textarea {
    width: 100% !important;
    min-height: 108px !important;
    height: 112px !important;
    max-height: 170px !important;
    padding: 5px 7px !important;
    resize: vertical;
    box-sizing: border-box;
  }

  .client-compact #loadForm .client-entry-grid .field-equipment {
    grid-column: 1 / span 8 !important;
    margin-top: 38px !important;
    margin-bottom: 0 !important;
    min-height: 88px !important;
    box-sizing: border-box;
  }

  .client-compact #loadForm .client-entry-grid .equipment-checks {
    grid-template-columns: repeat(3, minmax(78px, 1fr)) !important;
    align-content: start !important;
  }

  .client-compact #loadForm .client-entry-grid .inline-actions {
    grid-column: 1 / span 8 !important;
    grid-row: 5 !important;
    align-self: start !important;
    justify-self: start !important;
    margin-top: 8px !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .client-compact #loadForm .client-entry-grid .inline-actions button {
    width: auto !important;
    min-width: 118px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 2px 14px !important;
  }

  .client-compact #loadForm .client-entry-grid .inline-actions button[type="submit"] {
    min-width: 150px !important;
  }

  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-del-contact-name,
  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-del-contact-phone,
  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-notes,
  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .field-equipment {
    grid-row: 5 !important;
  }

  .client-compact #loadForm .client-entry-grid:has(.field-route-stop-output [data-route-stop-row]) .inline-actions {
    grid-row: 6 !important;
  }
}


/* phase2-20260618k: operational tools: duplicate, saved locations, timeline, docs/POD, admin attention dashboard. */
.address-book-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 6px;
  padding: 4px 7px;
  border: 1px solid #8aa4b2;
  background: #eef8ff;
  color: #0f2e52;
  font-size: 10.5px;
  font-weight: 800;
}
.address-book-hint strong {
  text-transform: uppercase;
  color: #003d6b;
}
.address-book-hint span {
  color: #36566f;
  font-weight: 700;
}
.client-table .mini-docs,
.admin-table .mini-docs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 54px;
  min-height: 22px;
  padding: 2px 6px;
  border: 1px solid #315a38;
  background: #e7f7e9;
  color: #16451e;
  font-size: 9.5px;
  font-weight: 900;
  cursor: pointer;
}
.client-table .mini-docs {
  display: block;
  width: 86px;
  max-width: 100%;
  margin: 4px auto 0;
}
.admin-table .mini-docs { width: 100%; }
.doc-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #166534;
  color: #fff;
  font-size: 9px;
  line-height: 1;
}
.shipment-timeline {
  margin-top: 4px;
  font-size: 9.5px;
  text-align: left;
}
.shipment-timeline summary {
  cursor: pointer;
  color: #0f3d68;
  font-weight: 900;
  list-style-position: inside;
}
.shipment-timeline ol {
  margin: 3px 0 0;
  padding: 4px 5px 4px 16px;
  border: 1px solid #c4d0d7;
  background: #f8fbff;
}
.shipment-timeline li { margin: 1px 0; padding-left: 1px; }
.shipment-timeline li span { font-weight: 900; }
.shipment-timeline li small {
  display: block;
  color: #64748b;
  font-size: 9px;
  line-height: 1.1;
}
.shipment-timeline li.done::marker { color: #15803d; }
.shipment-timeline li.todo::marker { color: #94a3b8; }
.shipment-timeline.canceled li.done::marker { color: #b91c1c; }
.attention-reason {
  margin-top: 3px;
  padding: 2px 3px;
  border: 1px solid #f59e0b;
  background: #fff7ed;
  color: #92400e;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.05;
}
.needs-attention-dashboard {
  margin: 5px 0 7px;
  padding: 6px;
  border: 1px solid #667985;
  background: #e9eef2;
}
.attention-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}
.attention-title strong {
  color: #0f2e52;
  text-transform: uppercase;
  font-size: 12px;
}
.attention-title span {
  color: #475569;
  font-size: 10px;
  font-weight: 800;
}
.attention-cards {
  display: grid;
  grid-template-columns: repeat(8, minmax(90px, 1fr));
  gap: 5px;
}
.attention-card {
  min-height: 45px;
  padding: 4px 6px;
  border: 1px solid #64748b;
  background: #ffffff;
  color: #15243a;
  text-align: left;
  cursor: pointer;
}
.attention-card strong {
  display: block;
  font-size: 18px;
  line-height: 1;
  color: #0f3d68;
}
.attention-card span {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
}
.attention-card.active {
  border-color: #0b58d0;
  box-shadow: 0 0 0 2px rgba(11, 88, 208, .18) inset;
  background: #eef5ff;
}
.attention-card.clear-card { background: #f8fafc; }
.document-card { width: min(760px, calc(100vw - 28px)); }
.documents-body {
  padding: 14px;
  background: #f8fafc;
  overflow: auto;
}
.documents-empty {
  padding: 18px;
  border: 1px dashed #94a3b8;
  background: #fff;
  color: #64748b;
  font-weight: 800;
  text-align: center;
}
.documents-list { display: grid; gap: 8px; }
.document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}
.document-row:hover { border-color: #0b58d0; background: #eef5ff; }
.document-row-link {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.document-row strong {
  color: #0f3d68;
  font-size: 11px;
  text-transform: uppercase;
}
.document-row span {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.document-row small { color: #64748b; font-weight: 700; }
.document-delete-btn {
  align-self: center;
  justify-self: end;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #b91c1c;
  border-radius: 4px;
  background: #fff5f5;
  color: #991b1b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}
.document-delete-btn:hover,
.document-delete-btn:focus {
  background: #fee2e2;
  border-color: #991b1b;
  color: #7f1d1d;
}
.document-delete-btn:disabled {
  cursor: wait;
  opacity: .6;
}
.document-upload-grid {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 10px;
}
.document-upload-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #15243a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.document-upload-grid select,
.document-upload-grid input {
  min-height: 30px;
  border: 1px solid #64748b;
  background: #fff;
  padding: 3px 6px;
}
@media (max-width: 1100px) { .attention-cards { grid-template-columns: repeat(4, minmax(120px, 1fr)); } }
@media (max-width: 720px) {
  .attention-cards { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .document-row { grid-template-columns: 1fr; }
  .document-row-link { grid-template-columns: 1fr; }
  .document-delete-btn { justify-self: stretch; width: 100%; }
  .document-upload-grid { grid-template-columns: 1fr; }
}

/* phase2-20260618k: POD requirement override for delivered loads where Abby does not need to send/upload POD. */
.pod-cleared-badge {
  margin-top: 3px;
  padding: 2px 3px;
  border: 1px solid #16a34a;
  background: #ecfdf5;
  color: #166534;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.05;
}
.pod-requirement-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #f59e0b;
  background: #fff7ed;
  color: #7c2d12;
}
.pod-requirement-panel.cleared {
  border-color: #16a34a;
  background: #ecfdf5;
  color: #14532d;
}
.pod-requirement-panel strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.pod-requirement-panel span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}
.pod-requirement-panel .tiny-btn {
  white-space: nowrap;
  min-width: 145px;
}
@media (max-width: 720px) {
  .pod-requirement-panel { align-items: stretch; flex-direction: column; }
  .pod-requirement-panel .tiny-btn { width: 100%; }
}

/* phase3-20260618m: maintenance buttons, audit log, and CSV/backup tools */
.export-btn,
.backup-btn,
.audit-btn {
  white-space: nowrap;
  font-weight: 800;
}
.audit-btn {
  border-color: #754c24;
}
.mini-audit {
  background: #f5f5dc;
  border: 1px solid #7c6f35;
  color: #12263a;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 6px;
  cursor: pointer;
}
.audit-card {
  width: min(820px, calc(100vw - 42px));
  max-height: calc(100vh - 80px);
}
.audit-body {
  padding: 12px;
  max-height: 62vh;
  overflow: auto;
  background: #f7fbfd;
}
.audit-list {
  display: grid;
  gap: 8px;
}
.audit-row {
  border: 1px solid #b8c8d1;
  background: #fffef0;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
}
.audit-row strong {
  color: #001f33;
  text-transform: capitalize;
}
.audit-row span {
  color: #31495a;
  font-size: 12px;
}
.audit-row small {
  color: #102b3d;
  line-height: 1.35;
}
.documents-empty.error {
  color: #8a1f11;
  border-color: #d6a09a;
  background: #fff4f2;
}
html[data-portal-environment="staging"] body::before {
  content: "STAGING";
  position: fixed;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  background: #fff3cd;
  border: 2px solid #856404;
  color: #533f03;
  padding: 2px 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
}

/* freight-calculator-shortcut-20260625: Admin Quote Requests calculator shortcut */
.quote-title-with-calculator {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.quote-title-copy {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  min-width: 0;
}

.quote-calculator-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 26px;
  padding: 2px 12px;
  border: 1px solid #073b8a;
  border-radius: 4px;
  background: linear-gradient(180deg, #0b58d0 0%, #073b8a 100%);
  color: #ffffff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(8, 27, 46, .28);
}

.quote-calculator-shortcut:hover,
.quote-calculator-shortcut:focus {
  background: linear-gradient(180deg, #1266ef 0%, #064fc8 100%);
  color: #ffffff;
  text-decoration: none;
}

.quote-calculator-shortcut:focus {
  outline: 2px solid rgba(20, 92, 255, .35);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .quote-title-with-calculator {
    align-items: flex-start;
    gap: 7px;
  }

  .quote-title-copy {
    display: block;
  }

  .quote-calculator-shortcut {
    width: max-content;
    max-width: 100%;
  }
}

/* admin-delivery-contact-line-20260626:
   Show pickup/delivery contact and phone in the admin shipment row. */
.admin-table .admin-contact-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-areas:
    "label name"
    "label phone";
  align-items: center;
  gap: 1px 5px;
  margin-top: 3px;
  padding: 4px 5px;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  line-height: 1.12;
}

.admin-table .admin-contact-card.has-contact {
  border-color: rgba(14, 116, 144, .24);
  background: #ecfeff;
}

.admin-table .admin-contact-card.missing-contact {
  border-color: rgba(148, 163, 184, .24);
  background: #f8fafc;
  color: #94a3b8;
}

.admin-table .admin-contact-label {
  grid-area: label;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 18px;
  border-radius: 999px;
  background: #0f3f85;
  color: #ffffff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
}

.admin-table .admin-contact-card.missing-contact .admin-contact-label {
  background: #94a3b8;
}

.admin-table .admin-contact-name {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9.6px;
  font-weight: 900;
  color: #0f172a;
}

.admin-table .admin-contact-phone {
  grid-area: phone;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9.3px;
  font-weight: 800;
  color: #475569;
}

@media (max-width: 900px) {
  .admin-table .admin-contact-card {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 3px 4px;
  }
}

/* safeops45: operational lock and clickable admin contact phone */
.cancel-locked.operational-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-table a.admin-contact-phone {
  text-decoration: none;
  color: #075985;
}

.admin-table a.admin-contact-phone:hover,
.admin-table a.admin-contact-phone:focus {
  color: #0c4a6e;
  text-decoration: underline;
}



/* mobile46-20260710: clean admin mobile layout and remove non-interactive customer roster. */
.admin-strip.admin-strip-clean {
  grid-template-columns: minmax(250px, .72fr) minmax(420px, 1.28fr);
}

.admin-strip-clean .admin-summary-box,
.admin-strip-clean .admin-abby-box {
  min-width: 0;
}

@media (max-width: 1180px) and (min-width: 901px) {
  .admin-strip.admin-strip-clean {
    grid-template-columns: minmax(230px, .72fr) minmax(360px, 1.28fr);
  }
}

@media (max-width: 900px) {
  .admin-strip.admin-strip-clean {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 820px) {
  .admin-compact .app-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .admin-compact .app-menu strong {
    grid-column: 1 / -1;
  }

  .admin-compact .app-menu > button,
  .admin-compact .app-menu #addClientBtn,
  .admin-compact .app-menu #enableDingBtn,
  .admin-compact .app-menu #logoutBtn {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    height: auto;
    padding: 7px 5px;
    font-size: 12px;
    line-height: 1.1;
    white-space: normal;
  }

  .admin-strip-clean .admin-abby-box {
    order: 1;
    grid-template-columns: 76px minmax(0, 1fr) !important;
    min-height: 0;
    padding: 8px 10px;
    text-align: left !important;
  }

  .admin-strip-clean .admin-abby-box .brand-caption,
  .admin-strip-clean .admin-abby-box .brand-caption.align-right {
    text-align: left !important;
  }

  .admin-strip-clean .admin-abby-box .brand-logo-wrap {
    min-height: 54px;
    padding: 4px;
  }

  .admin-strip-clean .admin-abby-box .brand-logo {
    max-height: 48px;
  }

  .admin-strip-clean .admin-abby-box .brand-caption small {
    display: none;
  }

  .admin-strip-clean .admin-summary-box {
    order: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding: 7px;
  }

  .admin-strip-clean .admin-summary-box span {
    font-size: 11px;
  }

  .admin-strip-clean .admin-summary-box strong {
    font-size: 24px;
  }

  .admin-portal-tabs {
    gap: 4px;
  }

  .admin-portal-tabs .portal-tab {
    flex: 1 1 0;
    min-width: 145px;
  }

  .quote-calculator-shortcut {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .admin-compact .compact-table td,
  .admin-compact .compact-table tr:nth-child(even) td {
    grid-template-columns: minmax(88px, 30%) minmax(0, 1fr);
  }

  .admin-compact .admin-table .action-grid,
  .admin-compact .admin-quote-table .quote-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .admin-compact .admin-table .action-grid .mini-delete,
  .admin-compact .admin-quote-table .quote-action-grid .mini-delete {
    grid-column: 1 / -1;
  }

  .admin-compact .action-grid button,
  .admin-compact .quote-action-grid button {
    min-height: 44px !important;
  }

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

  .attention-card {
    min-height: 58px;
    padding: 8px;
  }

  .document-card,
  .audit-card,
  .client-create-card {
    width: 100%;
    max-width: none;
    height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: none;
    border-radius: 14px;
  }

  .document-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .documents-body,
  .audit-body,
  .client-create-form {
    min-height: 0;
    overflow: auto;
  }

  .document-compose {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .admin-strip-clean .admin-abby-box {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    text-align: left !important;
  }

  .admin-strip-clean .admin-summary-box {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .admin-compact .compact-table td,
  .admin-compact .compact-table tr:nth-child(even) td {
    grid-template-columns: 82px minmax(0, 1fr) !important;
    gap: 7px;
    padding: 8px;
  }

  .admin-compact .compact-table td::before {
    padding-top: 2px;
  }

  .admin-compact .app-menu > button,
  .admin-compact .app-menu #addClientBtn,
  .admin-compact .app-menu #enableDingBtn,
  .admin-compact .app-menu #logoutBtn {
    font-size: 11px;
  }
}

/* forms47-20260710: reorganized customer Quote Request and Create Shipment forms.
   Keeps the existing portal colors, typography, controls, IDs and data contract.
   Only grouping, alignment, spacing and responsive presentation are changed. */
.organized-client-form {
  display: grid;
  gap: 8px;
  width: 100%;
}
.client-form-section {
  min-width: 0;
  border: 1px solid #71818b;
  background: #cfd8dc;
}
.client-form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  padding: 4px 7px;
  border-bottom: 1px solid #71818b;
  background: #d7dde1;
  color: #0f2e52;
}
.client-form-section-title strong {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.client-form-section-title span {
  margin: 0;
  color: #475569;
  font-size: 9.5px;
  font-weight: 800;
}
.client-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px 8px;
  align-items: end;
  padding: 7px;
}
.client-form-grid > label,
.client-route-card-body > label,
.organized-notes-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: #15243a;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.client-form-grid input,
.client-form-grid select,
.client-route-card-body input,
.client-route-card-body select,
.organized-notes-box textarea {
  width: 100%;
  min-width: 0;
  height: 24px;
  padding: 2px 5px;
  border: 1px solid #687783;
  border-radius: 0;
  background: var(--input);
  color: #111827;
  outline: none;
}
.client-form-grid input:focus,
.client-form-grid select:focus,
.client-route-card-body input:focus,
.client-route-card-body select:focus,
.organized-notes-box textarea:focus {
  border-color: #145cff;
  box-shadow: 0 0 0 1px #145cff inset;
}
.form-col-12 { grid-column: span 12; }
.form-col-8 { grid-column: span 8; }
.form-col-6 { grid-column: span 6; }
.form-col-4 { grid-column: span 4; }
.form-col-3 { grid-column: span 3; }
.form-col-2 { grid-column: span 2; }
.client-route-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 7px;
}
.client-route-card {
  min-width: 0;
  border: 1px solid #71818b;
  background: #e7f1f1;
}
.client-route-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 27px;
  padding: 4px 7px;
  border-bottom: 1px solid #71818b;
  background: #d7dde1;
  color: #0f2e52;
  text-transform: uppercase;
}
.client-route-card-title strong {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .03em;
}
.client-route-card-title span {
  margin: 0;
  color: #475569;
  font-size: 9px;
  font-weight: 800;
}
.client-route-card-body {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  padding: 7px;
}
.quote-route-pair .client-route-card-body > label { grid-column: 1 / -1; }
.route-col-6 { grid-column: span 6; }
.route-col-3 { grid-column: span 3; }
.route-col-2 { grid-column: span 2; }
.organized-route-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px 7px;
}
.organized-route-output {
  padding: 0 7px 7px;
}
.organized-route-output:empty { display: none; }
.client-form-bottom-pair {
  display: grid;
  grid-template-columns: minmax(330px, .85fr) minmax(390px, 1.15fr);
  gap: 8px;
  align-items: stretch;
}
.organized-equipment-box,
.quote-equipment-checks.organized-equipment-box {
  width: 100%;
  min-height: 134px;
  margin: 0;
  align-self: stretch;
}
.organized-notes-box {
  min-height: 134px;
  padding: 7px;
  border: 1px solid #71818b;
  background: #e7f1f1;
}
.organized-notes-box textarea,
.quote-organized-form .organized-notes-box textarea[name="customerNotes"] {
  flex: 1;
  width: 100%;
  max-width: none;
  min-height: 96px !important;
  height: 96px;
  padding: 5px 6px;
  resize: vertical;
}
.organized-form-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 7px;
  margin-top: 0;
}
.organized-form-actions button {
  width: auto;
  min-width: 118px;
  height: 28px;
  padding-inline: 14px;
}
.organized-form-actions button[type="submit"] { min-width: 180px; }
.shipment-organized-form .field-rate input { text-align: right; }
.shipment-organized-form .field-initials input { text-transform: uppercase; }
.route-company-line {
  display: block;
  margin-bottom: 2px;
  color: #0f2e52;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: .01em;
}

@media (max-width: 900px) {
  .client-route-pair,
  .client-form-bottom-pair {
    grid-template-columns: 1fr;
  }
  .client-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .client-form-grid > .form-col-12,
  .client-form-grid > .form-col-8,
  .client-form-grid > .form-col-6,
  .client-form-grid > .form-col-4,
  .client-form-grid > .form-col-3,
  .client-form-grid > .form-col-2 {
    grid-column: span 1;
  }
  .client-form-grid > .mobile-wide { grid-column: 1 / -1; }
  .organized-equipment-box,
  .quote-equipment-checks.organized-equipment-box,
  .organized-notes-box { min-height: 0; }
}

@media (max-width: 620px) {
  .client-form-section-title { align-items: flex-start; }
  .client-form-section-title span { display: none; }
  .client-form-grid,
  .client-route-card-body {
    grid-template-columns: 1fr;
  }
  .client-form-grid > *,
  .client-route-card-body > * {
    grid-column: 1 !important;
  }
  .client-form-grid input,
  .client-form-grid select,
  .client-route-card-body input,
  .client-route-card-body select {
    min-height: 36px;
    font-size: 12px;
  }
  .client-form-grid > label,
  .client-route-card-body > label,
  .organized-notes-box {
    font-size: 11px;
  }
  .organized-route-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .organized-route-controls .route-actions-label { grid-column: 1 / -1; }
  .organized-route-controls button {
    width: 100%;
    min-height: 36px;
  }
  .organized-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .organized-form-actions button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
  }
  .organized-form-actions button[type="submit"] {
    grid-column: 1 / -1;
    min-width: 0;
  }
  .organized-notes-box textarea,
  .quote-organized-form .organized-notes-box textarea[name="customerNotes"] {
    min-height: 90px !important;
  }
}


/* v47: health, saved tools, time zones, read-only access and paginated chat */
.portal-system-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.portal-system-status.healthy { background: #dcfce7; color: #166534; }
.portal-system-status.warning { background: #fef3c7; color: #92400e; }
.portal-health-warning,
.portal-read-only-banner {
  margin: 10px auto;
  max-width: 1180px;
  padding: 10px 14px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}
.portal-read-only-banner { border-color: #94a3b8; background: #f8fafc; color: #334155; }
.portal-read-only .productivity-tool-actions button,
.portal-read-only [data-quote-action="approve"],
.portal-read-only [data-action="edit"] { opacity: .5; pointer-events: none; }
.productivity-tools-section {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  padding: 12px;
  margin-bottom: 12px;
}
.productivity-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.productivity-tool-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.productivity-tool-card label { display: grid; gap: 5px; font-size: 11px; font-weight: 800; color: #334155; }
.productivity-tool-card select { width: 100%; min-height: 34px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 6px; }
.productivity-tool-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.danger-lite { color: #991b1b !important; border-color: #fecaca !important; }
.saved-location-field { display: grid; gap: 5px; }
.saved-location-field-label { color: #334155; font-size: 11px; font-weight: 800; }
.saved-location-picker { position: relative; min-width: 0; }
.saved-location-picker-trigger {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.saved-location-picker-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-location-picker-trigger:hover,
.saved-location-picker.is-open .saved-location-picker-trigger { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, .12); }
.saved-location-picker-trigger:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.saved-location-chevron { color: #64748b; font-size: 15px; line-height: 1; transition: transform .14s ease; }
.saved-location-picker.is-open .saved-location-chevron { transform: rotate(180deg); }
.saved-location-menu {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 248px;
  overflow: auto;
  padding: 5px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .2);
}
.saved-location-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
  padding: 4px;
  border-radius: 7px;
}
.saved-location-option + .saved-location-option { border-top: 1px solid #eef2f7; }
.saved-location-option:hover,
.saved-location-option.is-selected { background: #eff6ff; }
.saved-location-delete {
  width: 28px;
  min-width: 28px;
  height: 28px;
  align-self: center;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.saved-location-delete:hover { border-color: #ef4444; background: #fee2e2; color: #7f1d1d; }
.saved-location-delete:focus-visible { outline: 2px solid #dc2626; outline-offset: 1px; }
.saved-location-choice {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 5px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}
.saved-location-choice strong { overflow: hidden; color: #0f2e52; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.saved-location-choice span { overflow-wrap: anywhere; color: #64748b; font-size: 10px; line-height: 1.35; }
.saved-location-empty { padding: 12px 10px; color: #64748b; font-size: 11px; text-align: center; }
.portal-read-only .saved-location-delete { display: none; }
.portal-read-only .saved-location-picker-trigger { opacity: .65; }
.saved-tools-confirm-subject {
  padding: 9px 10px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f2e52;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.portal-danger-action { border-color: #b91c1c !important; background: #b91c1c !important; color: #fff !important; }
.portal-danger-action:hover { border-color: #7f1d1d !important; background: #991b1b !important; }
.portal-notice-stack {
  position: fixed;
  z-index: 10020;
  top: 18px;
  right: 18px;
  width: min(360px, calc(100vw - 36px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.portal-notice {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 10px 10px 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 11px;
  background: #f0fdf4;
  color: #166534;
  box-shadow: 0 16px 32px rgba(15, 23, 42, .18);
  font-size: 12px;
  font-weight: 800;
  pointer-events: auto;
  animation: portal-notice-in .18s ease-out;
}
.portal-notice.error { border-color: #fecaca; background: #fff1f2; color: #991b1b; }
.portal-notice.is-leaving { opacity: 0; transform: translateY(-4px); transition: opacity .16s ease, transform .16s ease; }
.portal-notice-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}
.portal-notice.error .portal-notice-icon { background: #dc2626; }
.portal-notice-copy { line-height: 1.35; }
.portal-notice-close { border: 0; background: transparent; color: currentColor; font-size: 18px; font-weight: 900; cursor: pointer; opacity: .72; }
.portal-notice-close:hover { opacity: 1; }
@keyframes portal-notice-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.compact-timezone-field { min-width: 135px; }
.compact-timezone-field select { min-height: 36px; }
.chat-history-tools { display: flex; justify-content: center; padding: 6px 10px 0; background: #f8fafc; }
@media (max-width: 820px) {
  .productivity-tools-grid { grid-template-columns: 1fr; }
  .saved-location-menu { position: static; margin-top: 5px; max-height: 230px; }
  .portal-notice-stack { top: 10px; right: 10px; width: calc(100vw - 20px); }
  .portal-system-status { display: none; }
}

/* ===== v48 Driver Tracking + controlled POD review ===== */
.admin-table .shipment-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
}
.admin-table .shipment-action-grid .mini-delete {
  grid-column: auto !important;
}
.admin-table .shipment-action-grid button {
  min-width: 0;
  height: 22px;
  min-height: 22px;
  border-radius: 5px;
  font-size: 8.8px;
  font-weight: 800;
  letter-spacing: 0;
}
.mini-tracking {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #94a3b8;
}
.mini-tracking:hover { background: #e2e8f0; }
.mini-tracking.active {
  background: #e8f7ef;
  color: #166534;
  border-color: #22a35a;
}
.mini-tracking.pod-review {
  background: #fff4d6;
  color: #8a4b00;
  border-color: #e7a62b;
}
.mini-tracking.closed {
  background: #f8fafc;
  color: #64748b;
  border-color: #cbd5e1;
}
.tracking-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: .78;
}
.mini-tracking.idle .tracking-dot { opacity: .35; }
.admin-table .mini-docs.has-pod-review {
  background: #fff4d6;
  border-color: #e7a62b;
  color: #7c4300;
}
.pod-review-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 14px;
  margin-left: 3px;
  padding: 0 4px;
  border-radius: 999px;
  background: #c2410c;
  color: #fff;
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.tracking-overlay { z-index: 2350; }
.tracking-card {
  width: min(1080px, 96vw);
  max-height: 94vh;
  overflow: hidden;
  border: 1px solid #a8bfca;
  box-shadow: 0 26px 70px rgba(2, 24, 37, .32);
}
.tracking-header {
  background: linear-gradient(135deg, #0f6fba, #07558f);
  color: #fff;
}
.tracking-header span { color: rgba(255,255,255,.82); }
.tracking-body {
  display: grid;
  gap: 14px;
  padding: 16px;
  overflow-y: auto;
  background: #f4f8f9;
}
.tracking-loading,
.tracking-error {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}
.tracking-loading { background: #e8f2fb; color: #0c4a6e; border: 1px solid #93c5d8; }
.tracking-error { background: #fff0f0; color: #991b1b; border: 1px solid #ef9a9a; }
.tracking-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.tracking-summary-card {
  display: flex;
  min-height: 92px;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  border: 1px solid #cbd9de;
  border-radius: 10px;
  background: #fff;
}
.tracking-summary-card > span {
  color: #64748b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.tracking-summary-card strong { color: #0f2638; font-size: 13px; }
.tracking-summary-card small { color: #64748b; font-size: 10px; line-height: 1.35; }
.tracking-state {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f7;
}
.tracking-state.active { background: #dcfce7; color: #166534; }
.tracking-state.warning { background: #fff3cd; color: #854d0e; }
.tracking-state.closed { background: #e2e8f0; color: #475569; }
.tracking-state.lost { background: #fee2e2; color: #991b1b; }
.tracking-pod-warning { color: #b45309 !important; }
.tracking-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #f0bd55;
  border-radius: 8px;
  background: #fff8e6;
  color: #7c4300;
  font-size: 11px;
}
.tracking-notice span { color: #8a5b12; }
.tracking-link-panel,
.tracking-empty-state,
.tracking-map-panel,
.tracking-history-panel {
  padding: 14px;
  border: 1px solid #cbd9de;
  border-radius: 10px;
  background: #fff;
}
.tracking-link-panel label {
  display: grid;
  gap: 7px;
  color: #243b4d;
  font-size: 11px;
  font-weight: 900;
}
.tracking-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 105px;
  gap: 8px;
}
.tracking-link-row input {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #9fb7c3;
  border-radius: 7px;
  background: #f8fbfc;
  color: #163247;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}
.tracking-copy-btn,
.driver-pod-approve,
.driver-pod-reject {
  border-radius: 7px;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.tracking-copy-btn {
  border: 1px solid #073b8a;
  background: #0b58d0;
  color: #fff;
}
.tracking-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.tracking-link-panel > small {
  display: block;
  margin-top: 9px;
  color: #64748b;
  font-size: 10px;
}
.tracking-review-btn { border-color: #e7a62b !important; background: #fff4d6 !important; color: #7c4300 !important; }
.tracking-revoke-btn { border-color: #d33 !important; color: #a11212 !important; background: #fff5f5 !important; }
.tracking-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-block: 24px;
  text-align: center;
}
.tracking-empty-state strong { color: #102a3c; font-size: 16px; }
.tracking-empty-state span { max-width: 650px; color: #607484; font-size: 11px; line-height: 1.5; }
.tracking-generate-btn { min-width: 210px; margin-top: 5px; }
.tracking-section-heading,
.driver-pod-review-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.tracking-section-heading > div,
.driver-pod-review-heading > div { display: grid; gap: 2px; }
.tracking-section-heading strong,
.driver-pod-review-heading strong { color: #102a3c; font-size: 13px; }
.tracking-section-heading span,
.driver-pod-review-heading span { color: #64748b; font-size: 10px; }
.tracking-open-map { display: inline-flex; align-items: center; text-decoration: none; }
.tracking-map-frame {
  width: 100%;
  height: 320px;
  border: 1px solid #bfd0d8;
  border-radius: 8px;
  background: #e7eef1;
}
.tracking-map-empty {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 20px;
  border: 1px dashed #9fb7c3;
  border-radius: 8px;
  background: #edf3f4;
  color: #385568;
  text-align: center;
}
.tracking-map-empty span { margin-top: 4px; color: #607484; font-size: 11px; }
.tracking-history-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}
.tracking-history-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid #d9e3e7;
  border-radius: 7px;
  color: #1f3a4c;
  text-decoration: none;
}
.tracking-history-row:hover { border-color: #0f6fba; background: #eef7fd; }
.tracking-history-index { color: #0f6fba; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.tracking-history-row strong { font-size: 11px; }
.tracking-history-row small { color: #64748b; font-size: 9px; }
.tracking-history-empty { padding: 18px; color: #64748b; font-size: 11px; text-align: center; }

.driver-pod-review-panel {
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid #e4a72e;
  border-radius: 10px;
  background: #fff9e9;
}
.driver-pod-review-total {
  padding: 4px 8px;
  border-radius: 999px;
  background: #c2410c;
  color: #fff !important;
  font-size: 9px !important;
  font-weight: 900;
}
.driver-pod-review-list { display: grid; gap: 8px; }
.driver-pod-review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e6c06a;
  border-radius: 8px;
  background: #fff;
}
.driver-pod-review-row.rejected { border-color: #e2a0a0; background: #fff8f8; }
.driver-pod-preview { display: grid; gap: 3px; color: #173247; text-decoration: none; }
.driver-pod-preview:hover strong { text-decoration: underline; }
.driver-pod-preview strong { font-size: 12px; }
.driver-pod-preview span { color: #8a5b12; font-size: 10px; font-weight: 800; }
.driver-pod-preview small { color: #64748b; font-size: 9px; }
.driver-pod-review-actions { display: grid; gap: 6px; min-width: 170px; }
.driver-pod-approve,
.driver-pod-reject { min-height: 32px; padding: 6px 9px; }
.driver-pod-approve { border: 1px solid #047b36; background: #e4f8dc; color: #166534; }
.driver-pod-reject { border: 1px solid #c2410c; background: #fff1ea; color: #9a3412; }

@media (max-width: 900px) {
  .tracking-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tracking-map-frame { height: 270px; }
}
@media (max-width: 620px) {
  .tracking-card { width: 100%; max-height: 100vh; border-radius: 0; }
  .tracking-body { padding: 11px; }
  .tracking-summary-grid { grid-template-columns: 1fr; }
  .tracking-link-row { grid-template-columns: 1fr; }
  .tracking-copy-btn { min-height: 40px; }
  .tracking-notice,
  .tracking-section-heading,
  .driver-pod-review-heading { align-items: stretch; flex-direction: column; }
  .tracking-history-row { grid-template-columns: 45px 1fr; }
  .tracking-history-row small { grid-column: 2; }
  .driver-pod-review-row { grid-template-columns: 1fr; }
  .driver-pod-review-actions { min-width: 0; }
}

/* ===== v48.1.6 Responsive chat composer visibility =====
   Keeps attachments and Send visible on short laptop screens, Windows display
   scaling, and browser zoom without sacrificing the scrollable message thread. */
.chat-card {
  height: min(760px, calc(100vh - 40px));
  height: min(760px, calc(100dvh - 40px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.chat-header {
  grid-row: 1;
}

.chat-history-tools {
  grid-row: 2;
  min-height: 0;
}

.chat-history-tools:empty {
  display: none;
  padding: 0;
}

.chat-thread {
  grid-row: 3;
  min-height: 0;
  max-height: none;
}

.chat-compose {
  grid-row: 4;
  min-height: 0;
  max-height: min(44dvh, 340px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@media (max-height: 820px) and (min-width: 721px) {
  .chat-overlay {
    padding: 12px;
  }

  .chat-card {
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }

  .chat-header {
    padding: 13px 18px;
  }

  .chat-header strong {
    font-size: 18px;
  }

  .chat-thread {
    padding: 14px 18px;
    gap: 10px;
  }

  .chat-compose {
    max-height: min(48dvh, 300px);
    padding: 10px 16px 12px;
  }

  .chat-compose textarea {
    min-height: 58px;
    max-height: 100px;
    padding: 10px 12px;
  }

  .chat-attachment-picker {
    gap: 4px;
    margin-top: 8px;
    padding: 8px 10px;
  }

  .chat-compose-actions {
    margin-top: 8px;
  }
}

@media (max-width: 720px) {
  .chat-card {
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .chat-compose {
    max-height: min(48dvh, 380px);
    overflow-y: auto;
  }
}


/* ===== v48.1.9 D&L read-only client tracking + symmetric shipment actions ===== */
@media (min-width: 821px) {
  .client-table th:nth-child(1),
  .client-table td:nth-child(1) { width: 9%; }
  .client-table th:nth-child(5),
  .client-table td:nth-child(5),
  .client-table th:nth-child(6),
  .client-table td:nth-child(6) { width: 14%; }
}

.client-table .edit-cell {
  padding: 4px !important;
  white-space: normal;
}

.client-shipment-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  max-width: 100px;
  margin: 0 auto;
  align-items: stretch;
}

.client-shipment-action-grid.has-primary-action .client-action-primary {
  grid-column: 1 / -1;
}

.client-shipment-action-grid button,
.client-table .client-shipment-action-grid .mini-edit,
.client-table .client-shipment-action-grid .mini-copy,
.client-table .client-shipment-action-grid .mini-docs,
.client-table .client-shipment-action-grid .mini-client-tracking {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 23px;
  height: 23px;
  margin: 0;
  padding: 2px 3px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: 8.2px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.client-table .client-shipment-action-grid .mini-docs {
  gap: 2px;
}

.client-table .client-shipment-action-grid .doc-count-badge {
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  font-size: 7px;
}

.client-table .mini-client-tracking {
  border: 1px solid #0f6fba;
  background: linear-gradient(180deg, #eff8ff 0%, #dbeeff 100%);
  color: #07558f;
  cursor: pointer;
}

.client-table .mini-client-tracking:hover,
.client-table .mini-client-tracking:focus-visible {
  border-color: #084f86;
  background: #d7edff;
  color: #063b66;
}

.client-tracking-card {
  width: min(960px, 96vw);
}

.client-tracking-body {
  gap: 12px;
}

.client-tracking-readonly-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #8fb7d4;
  border-radius: 8px;
  background: #eef7fd;
  color: #0c4a6e;
}

.client-tracking-readonly-notice strong {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.client-tracking-readonly-notice span {
  color: #365f79;
  font-size: 10.5px;
  line-height: 1.35;
}

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

.client-tracking-route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.client-tracking-route-grid > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #cbd9de;
  border-radius: 9px;
  background: #fff;
}

.client-tracking-route-grid span {
  color: #64748b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.client-tracking-route-grid strong {
  color: #102a3c;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.client-tracking-map-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 900px) {
  .client-tracking-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .client-shipment-action-grid {
    max-width: 280px;
    margin: 0;
  }
  .client-shipment-action-grid button,
  .client-table .client-shipment-action-grid .mini-edit,
  .client-table .client-shipment-action-grid .mini-copy,
  .client-table .client-shipment-action-grid .mini-docs,
  .client-table .client-shipment-action-grid .mini-client-tracking {
    min-height: 38px !important;
    height: auto !important;
    padding: 7px 9px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 620px) {
  .client-tracking-readonly-notice,
  .client-tracking-map-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .client-tracking-summary-grid,
  .client-tracking-route-grid {
    grid-template-columns: 1fr;
  }
}


/* v48.1.17: uniform company-logo identity in Admin shipment and quote boards */
.admin-table .company-ln-cell .company-logo-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 74px;
  height: 38px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(15,23,42,.08);
}

.admin-table .company-ln-cell .company-logo-frame img {
  position: absolute;
  inset: 4px;
  z-index: 2;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  object-position: center;
  background: #ffffff;
}

.admin-table .company-ln-cell .company-logo-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #64748b;
  background: linear-gradient(180deg,#fff 0%,#f1f5f9 100%);
}

.admin-table .company-ln-cell .company-logo-placeholder svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (max-width: 1250px) {
  .admin-table .company-ln-cell .company-logo-frame {
    max-width: 66px;
    height: 35px;
  }
}

/* v48.1.20: client quote decision controls and admin reports */
.client-quote-table .quote-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 3px;
}
.client-quote-table .quote-action-grid .quote-action-note,
.client-quote-table .quote-action-grid .mini-pickup:only-child {
  grid-column: 1 / -1;
}
.client-quote-table .quote-action-grid .quote-decline-btn,
.client-quote-table .quote-action-grid .quote-approve-btn {
  width: 100% !important;
  min-width: 0 !important;
  font-size: 8.5px !important;
  padding-inline: 2px !important;
}

.quote-decline-card {
  width: min(560px, calc(100vw - 32px));
  grid-template-rows: auto 1fr;
}
.quote-decline-form {
  display: grid;
  gap: 13px;
  overflow: auto;
  padding: 20px 22px 22px;
}
.quote-decline-copy {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #d7dee7;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 650;
}
.quote-decline-form label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.quote-decline-form label span {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}
.quote-decline-form textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid rgba(148,163,184,.7);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
}
.quote-decline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.quote-decline-actions button {
  min-width: 118px;
  height: 30px;
  border-radius: 7px;
}

.admin-app-menu #adminReportsBtn.reports-active {
  background: #0b58d0 !important;
  color: #fff !important;
  border-radius: 5px;
  padding-inline: 10px;
}
.admin-reports-panel {
  min-height: calc(100vh - 54px);
  border: 2px solid #145cff;
  background: #d7e0df;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65);
  overflow: hidden;
}
.reports-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 60px;
  padding: 8px 10px;
  border-bottom: 1px solid #71818b;
  background: #d7dde1;
}
.reports-heading strong {
  display: block;
  color: #0f2e52;
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.reports-heading span {
  display: block;
  margin-top: 3px;
  color: #475569;
  font-size: 11px;
  font-weight: 650;
}
.reports-filters {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}
.reports-filters label {
  display: grid;
  gap: 3px;
  color: #334155;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.reports-filters .tiny-search {
  min-width: 135px;
  height: 27px;
}
.reports-filters button {
  height: 27px;
  border-radius: 5px;
}
.reports-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 10px 0;
  background: #c7d3d1;
  border-bottom: 1px solid #8b989f;
}
.report-tab {
  min-width: 100px;
  height: 30px;
  border: 1px solid #8d979d;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: #eef3f7;
  color: #1e293b;
  font-weight: 900;
  cursor: pointer;
}
.report-tab.active {
  border-color: #073b8a;
  background: #0b58d0;
  color: #fff;
}
.reports-message {
  min-height: 18px;
  margin: 0;
  padding: 4px 10px 0;
  background: #edf3f3;
}
.reports-content {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #edf3f3;
}
.reports-loading,
.reports-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed #94a3b8;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}
.report-card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 7px;
}
.report-metric-card {
  min-height: 82px;
  padding: 10px 11px;
  border: 1px solid #91a1aa;
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 5px rgba(8,27,46,.08);
}
.report-metric-card span {
  display: block;
  min-height: 28px;
  color: #526173;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.report-metric-card strong {
  display: block;
  margin-top: 2px;
  color: #0f2e52;
  font-size: 24px;
  line-height: 1;
}
.report-metric-card small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 9px;
  font-weight: 750;
}
.report-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.report-panel {
  min-width: 0;
  border: 1px solid #91a1aa;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}
.report-panel.report-panel-wide {
  grid-column: 1 / -1;
}
.report-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 6px 9px;
  border-bottom: 1px solid #aeb9bf;
  background: #d7dde1;
}
.report-panel-header strong {
  color: #0f2e52;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .025em;
}
.report-panel-header span {
  color: #64748b;
  font-size: 9px;
  font-weight: 750;
}
.report-bars {
  display: grid;
  gap: 8px;
  padding: 10px;
}
.report-bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 160px) minmax(80px, 1fr) 58px;
  gap: 8px;
  align-items: center;
  font-size: 10px;
}
.report-bar-row > span:first-child {
  overflow: hidden;
  color: #334155;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.report-bar-track {
  height: 9px;
  border: 1px solid #cad3da;
  border-radius: 999px;
  background: #e8edf1;
  overflow: hidden;
}
.report-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: #0b58d0;
}
.report-bar-value {
  color: #0f2e52;
  font-size: 10px;
  font-weight: 900;
  text-align: right;
}
.report-table-wrap {
  max-height: 470px;
  overflow: auto;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
.report-table th,
.report-table td {
  padding: 6px 7px;
  border-bottom: 1px solid #d5dde2;
  color: #1e293b;
  font-size: 10px;
  text-align: left;
  white-space: nowrap;
}
.report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e8eef1;
  color: #475569;
  font-size: 8.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .025em;
}
.report-table th:not(:first-child),
.report-table td:not(:first-child) {
  text-align: center;
  vertical-align: middle;
}
.report-table th:first-child,
.report-table td:first-child {
  text-align: left;
}
.report-table tbody tr:hover {
  background: #f5f9fc;
}
.report-number {
  font-variant-numeric: tabular-nums;
  text-align: center !important;
}
.report-positive { color: #047b36 !important; font-weight: 900; }
.report-warning { color: #a15c00 !important; font-weight: 900; }
.report-negative { color: #a20b1c !important; font-weight: 900; }
.report-footnote {
  margin: 0;
  padding: 8px 10px;
  border-top: 1px dashed #aeb9bf;
  background: #f8fafc;
  color: #64748b;
  font-size: 9px;
  line-height: 1.4;
  font-weight: 650;
}

@media (max-width: 1180px) {
  .report-card-grid { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .reports-toolbar { align-items: flex-start; flex-direction: column; }
  .reports-filters { width: 100%; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .client-quote-table .quote-action-grid { grid-template-columns: 1fr; }
  .client-quote-table .quote-action-grid .quote-decline-btn,
  .client-quote-table .quote-action-grid .quote-approve-btn { grid-column: 1; }
  .quote-decline-card { width: calc(100vw - 20px); }
  .quote-decline-form { padding: 16px; }
  .quote-decline-actions { flex-direction: column-reverse; }
  .quote-decline-actions button { width: 100%; }
  .admin-reports-panel { min-height: calc(100vh - 48px); }
  .reports-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reports-filters label,
  .reports-filters .tiny-search,
  .reports-filters button { width: 100%; min-width: 0; }
  .reports-tabs { overflow-x: auto; }
  .report-tab { flex: 1 0 110px; }
  .report-card-grid { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
  .report-panel-grid { grid-template-columns: 1fr; }
  .report-panel.report-panel-wide { grid-column: auto; }
  .report-bar-row { grid-template-columns: 100px 1fr 48px; }
}

/* v48.1.29: admin shipment economics + private D&L rebate reporting */
.report-tab-internal {
  border-color: #8b5b15;
}
.report-tab-internal.active {
  border-color: #69420c;
  background: #7a4b0a;
}
.report-rpm {
  color: #0b58d0 !important;
  font-weight: 900;
}
.report-internal-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #c99538;
  border-radius: 7px;
  background: #fff8e8;
  color: #5a3a08;
  font-size: 10px;
  font-weight: 700;
}
.report-internal-banner strong {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 4px;
  background: #7a4b0a;
  color: #fff;
  font-size: 9px;
  letter-spacing: .04em;
}
.report-table-wrap-compact {
  max-height: none;
}
.report-current-quarter {
  background: #eef7ff;
}
.report-current-quarter td:first-child {
  box-shadow: inset 3px 0 0 #0b58d0;
}
.dnl-ledger-table td,
.dnl-ledger-table th {
  font-variant-numeric: tabular-nums;
}

/* v48.1.23: structured quote-decline feedback */
.quote-decline-reasons {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.quote-decline-reasons legend {
  margin: 0 0 1px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.quote-decline-reasons legend span {
  color: #b4232f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: normal;
  text-transform: none;
}
.quote-decline-option,
.quote-decline-price-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 9px !important;
  min-width: 0;
  border: 1px solid #d3dde5;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: normal !important;
}
.quote-decline-option {
  padding: 8px 10px;
}
.quote-decline-option input,
.quote-decline-price-option input {
  flex: 0 0 auto;
  margin: 2px 0 0;
}
.quote-decline-option > span,
.quote-decline-price-option > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: #334155;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}
.quote-decline-option strong {
  color: #172b3d;
  font-size: 11.5px;
}
.quote-decline-option small {
  color: #64748b;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
}
.quote-decline-option:has(input:checked),
.quote-decline-price-option:has(input:checked) {
  border-color: #4a82cc;
  background: #eef6ff;
  box-shadow: 0 0 0 2px rgba(20,89,195,.10);
}
.quote-decline-price-panel {
  display: grid;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #9fb9d7;
  border-radius: 10px;
  background: #eef6fd;
}
.quote-decline-price-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.quote-decline-price-heading > div {
  display: grid;
  gap: 2px;
}
.quote-decline-price-heading strong {
  color: #12395e;
  font-size: 12px;
}
.quote-decline-price-heading span,
.quote-decline-price-heading small {
  color: #52708b;
  font-size: 10px;
  font-weight: 700;
}
.quote-decline-price-heading small {
  white-space: nowrap;
}
.quote-decline-price-heading small strong {
  color: #0d4f8f;
  font-size: 10.5px;
}
.quote-decline-price-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.quote-decline-price-option {
  padding: 7px 8px;
}
.quote-decline-price-amount {
  display: grid !important;
  grid-template-columns: minmax(120px, .8fr) minmax(150px, 1fr) !important;
  align-items: center;
  gap: 10px !important;
  padding-top: 2px;
}
.quote-decline-price-amount > span {
  color: #334155 !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  text-transform: none !important;
}
.quote-decline-price-amount input {
  min-width: 0;
}
@media (max-width: 620px) {
  .quote-decline-price-heading {
    flex-direction: column;
    gap: 4px;
  }
  .quote-decline-price-options {
    grid-template-columns: 1fr;
  }
  .quote-decline-price-amount {
    grid-template-columns: 1fr !important;
    gap: 5px !important;
  }
}

/* Keep the decision controls reachable while the structured decline form scrolls. */
.quote-decline-actions {
  position: sticky;
  bottom: -22px;
  z-index: 3;
  margin: 0 -22px -22px;
  padding: 11px 22px 14px;
  border-top: 1px solid rgba(148,163,184,.42);
  background: rgba(248,250,252,.97);
  box-shadow: 0 -8px 18px rgba(15,23,42,.07);
}
.quote-decline-form textarea {
  min-height: 76px;
}
@media (max-width: 620px) {
  .quote-decline-actions {
    bottom: -22px;
    margin-inline: -22px;
    padding-inline: 22px;
  }
}


/* v48.4.1 - client credential mode in Add Client */
.client-credential-card {
  grid-column: 1 / -1;
  border: 1px solid rgba(14, 116, 144, 0.26);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.92), rgba(248, 250, 252, 0.98));
  padding: 14px;
}
.client-credential-toggle {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  cursor: pointer;
}
.client-credential-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #0f548c;
}
.client-credential-toggle span { display: grid; gap: 3px; }
.client-credential-toggle strong { color: #0f172a; font-size: 13px; }
.client-credential-toggle small { color: #64748b; font-size: 12px; font-weight: 600; line-height: 1.45; }
.client-manual-password {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}
.client-manual-password-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.client-manual-password-grid label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.client-manual-password-grid input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  color: #0f172a;
  background: #fff;
  text-transform: none;
  letter-spacing: normal;
}
.client-password-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.client-password-security-note { margin: 10px 0 0; color: #475569; font-size: 12px; line-height: 1.45; }
@media (max-width: 760px) {
  .client-manual-password-grid { grid-template-columns: 1fr; }
  .client-password-actions button { flex: 1 1 150px; }
}
