/*
 * Abby Portal v48.1.25 — Premium Portal Surface
 *
 * Progressive visual layer for the existing Abby Transport portal.
 * Business logic, element IDs, field names, data contracts, Firebase calls,
 * workflow order and customer-specific configuration remain unchanged.
 */

:root {
  --abby-ink-950: #0a1f2b;
  --abby-ink-900: #102c3b;
  --abby-ink-700: #375263;
  --abby-ink-500: #526a77;
  --abby-canvas: #eef4f4;
  --abby-canvas-deep: #e6eeee;
  --abby-surface: #ffffff;
  --abby-surface-soft: #f7fafa;
  --abby-surface-muted: #edf3f3;
  --abby-teal-950: #042f31;
  --abby-teal-900: #073f3e;
  --abby-teal-800: #0a5553;
  --abby-teal-100: #dff1ef;
  --abby-blue-700: #1259a7;
  --abby-blue-600: #176faf;
  --abby-blue-100: #e4f1fb;
  --abby-red-700: #a5222f;
  --abby-red-600: #b4232f;
  --abby-red-100: #fdebed;
  --abby-green-700: #087a42;
  --abby-green-100: #e1f5e9;
  --abby-amber-700: #9a5a09;
  --abby-amber-100: #fff2d5;
  --abby-border: #d4e0e1;
  --abby-border-strong: #b9cbcd;
  --abby-ring: #2f86d0;
  --abby-radius-xs: 8px;
  --abby-radius-sm: 11px;
  --abby-radius-md: 15px;
  --abby-radius-lg: 20px;
  --abby-radius-xl: 26px;
  --abby-shadow-xs: 0 1px 2px rgba(7, 38, 50, .05);
  --abby-shadow-sm: 0 7px 18px rgba(7, 38, 50, .07), 0 1px 3px rgba(7, 38, 50, .05);
  --abby-shadow-md: 0 16px 38px rgba(7, 38, 50, .11), 0 3px 9px rgba(7, 38, 50, .06);
  --abby-shadow-lg: 0 30px 80px rgba(1, 24, 31, .26), 0 8px 22px rgba(1, 24, 31, .12);
  --abby-ease: cubic-bezier(.22, 1, .36, 1);
}

html {
  background: var(--abby-teal-950);
  color-scheme: light;
}

body {
  color: var(--abby-ink-950);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  text-rendering: optimizeLegibility;
}

body.compact-page {
  min-height: 100vh;
  padding: 14px;
  background:
    radial-gradient(circle at 12% -12%, rgba(61, 156, 166, .26), transparent 31rem),
    radial-gradient(circle at 102% 18%, rgba(23, 111, 175, .19), transparent 33rem),
    linear-gradient(145deg, #062e31 0%, #073f3e 48%, #052d31 100%);
}

::selection {
  background: rgba(23, 111, 175, .22);
  color: var(--abby-ink-950);
}

/* Application frame */
.compact-shell {
  width: min(1500px, 100%);
  min-height: calc(100vh - 28px);
  margin: 0 auto;
  padding: 0 14px 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: var(--abby-radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(242, 247, 247, .99));
  box-shadow: var(--abby-shadow-lg);
}

.wide-shell {
  width: min(1760px, 100%);
}

.app-menu {
  min-height: 58px;
  height: auto;
  margin: 0 -14px 14px;
  padding: 9px 16px;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  border-radius: var(--abby-radius-lg) var(--abby-radius-lg) 0 0;
  background:
    linear-gradient(110deg, #062e31 0%, #073f3e 58%, #0a4b4b 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(4, 47, 49, .15);
  white-space: normal;
}

.app-menu strong {
  min-width: max-content;
  margin: 0 8px 0 0;
  padding: 2px 0 2px 12px;
  border-left: 3px solid #75cad0;
  color: #fff;
  font-size: 14px;
  font-weight: 780;
  letter-spacing: -.01em;
}

.app-menu > span,
.portal-health-badge {
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 650;
}

.portal-health-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.app-menu button,
.app-menu .tiny-btn,
.app-menu .tiny-primary {
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: var(--abby-radius-xs);
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .92);
  font-size: 11.5px;
  font-weight: 750;
  box-shadow: none;
  transition:
    transform .18s var(--abby-ease),
    border-color .18s ease,
    background-color .18s ease,
    color .18s ease;
}

.app-menu button:hover {
  border-color: rgba(255, 255, 255, .30);
  background: rgba(255, 255, 255, .15);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: none;
}

.app-menu #addClientBtn,
.app-menu #adminReportsBtn.reports-active {
  border-color: rgba(120, 199, 241, .52);
  background: rgba(23, 111, 175, .36) !important;
  color: #fff;
}

.app-menu #logoutBtn {
  min-width: 62px;
  margin-left: auto;
  border-color: rgba(255, 174, 181, .26);
  background: rgba(180, 35, 47, .18);
}

.menu-ding,
.client-compact .menu-ding,
.admin-compact .menu-ding {
  position: static;
  left: auto;
  top: auto;
  min-width: 92px;
  min-height: 34px;
  height: 34px;
  margin-left: auto !important;
  padding: 0 12px;
  transform: none;
  border: 1px solid rgba(255, 255, 255, .17) !important;
  border-radius: var(--abby-radius-xs);
  background: rgba(255, 255, 255, .08) !important;
  color: rgba(255, 255, 255, .86) !important;
}

.menu-ding.ding-on {
  border-color: rgba(103, 232, 165, .42) !important;
  background: rgba(8, 122, 66, .34) !important;
  color: #dffbea !important;
  box-shadow: 0 0 0 3px rgba(103, 232, 165, .07);
}

.admin-app-menu .menu-ding {
  margin-left: auto !important;
}

.admin-app-menu #logoutBtn {
  margin-left: 0;
}

/* Brand and summary area */
.top-strip {
  gap: 12px;
  margin-bottom: 14px;
}

.admin-strip.admin-strip-clean {
  grid-template-columns: minmax(270px, .68fr) minmax(460px, 1.32fr);
}

.brand-box,
.summary-box,
.account-box,
.portal-box,
.trip-box,
.trip-complete-box {
  min-height: 104px;
  overflow: hidden;
  border: 1px solid var(--abby-border);
  border-radius: var(--abby-radius-md);
  background: var(--abby-surface);
  box-shadow: var(--abby-shadow-sm);
}

.brand-box {
  grid-template-columns: minmax(110px, 140px) minmax(0, 1fr);
  gap: 14px;
  padding: 13px 15px;
  background:
    linear-gradient(135deg, rgba(23, 111, 175, .035), transparent 56%),
    var(--abby-surface);
}

.brand-logo-wrap,
.access-logo-frame {
  min-height: 76px;
  padding: 7px;
  border: 1px solid #e2eaea;
  border-radius: var(--abby-radius-sm);
  background: #fff;
  box-shadow: none;
}

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

.brand-caption {
  gap: 4px;
}

.brand-caption strong {
  color: var(--abby-ink-900);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.15;
  text-transform: none;
}

.brand-caption span {
  color: var(--abby-red-700);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.brand-caption small,
.coordinator-caption .coordinator-name,
.coordinator-caption .coordinator-phone {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--abby-ink-500);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.35;
}

.coordinator-caption .coordinator-phone {
  color: var(--abby-red-700);
}

.summary-box {
  align-items: stretch;
  gap: 8px;
  padding: 9px;
  background: var(--abby-surface);
}

.summary-box span,
.trip-box span,
.trip-complete-box span {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e0e9e9;
  border-radius: var(--abby-radius-sm);
  background: var(--abby-surface-soft);
  color: var(--abby-ink-500);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .075em;
  line-height: 1.25;
  text-transform: uppercase;
}

.summary-box strong,
.admin-summary-box strong,
.two-metric-box strong,
.trip-box strong,
.trip-complete-box strong {
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--abby-teal-800);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1;
  box-shadow: none;
}

.summary-box span:first-child strong {
  color: var(--abby-blue-600);
}

.summary-box span:last-child strong {
  color: var(--abby-teal-800);
}

/* Section navigation */
.portal-tabs,
.reports-tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--abby-border);
  border-radius: var(--abby-radius-sm);
  background: #e8efef;
  box-shadow: inset 0 1px 2px rgba(7, 38, 50, .05);
}

.portal-tab,
.report-tab {
  min-width: 0;
  height: 36px;
  padding: 0 15px;
  border: 0;
  border-radius: var(--abby-radius-xs);
  background: transparent;
  color: var(--abby-ink-700);
  font-size: 11.5px;
  font-weight: 750;
  box-shadow: none;
  transition:
    transform .18s var(--abby-ease),
    background-color .18s ease,
    color .18s ease,
    box-shadow .18s ease;
}

.portal-tab:hover,
.report-tab:hover {
  background: rgba(255, 255, 255, .68);
  color: var(--abby-ink-900);
  box-shadow: none;
}

.portal-tab.active,
.report-tab.active {
  border: 0;
  background: var(--abby-surface) !important;
  color: var(--abby-blue-700);
  box-shadow: 0 3px 10px rgba(7, 38, 50, .09), inset 0 0 0 1px rgba(23, 111, 175, .11);
}

/* Primary content cards */
.compact-panel,
.admin-reports-panel,
.client-form-section,
.client-route-card,
.route-stops-card,
.organized-notes-box,
.organized-equipment-box,
.client-create-card,
.productivity-tool-card,
.admin-client-box {
  border: 1px solid var(--abby-border);
  border-radius: var(--abby-radius-md);
  background: var(--abby-surface);
  box-shadow: var(--abby-shadow-sm);
}

.compact-panel {
  margin-bottom: 14px;
  overflow: hidden;
}

.panel-title-row {
  min-height: 58px;
  padding: 9px 13px;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--abby-border);
  background: var(--abby-surface);
  box-shadow: none;
}

.panel-title-row > div:first-child,
.quote-title-copy {
  min-width: 0;
}

.panel-title-row strong,
.reports-heading strong,
.report-panel-header strong {
  color: var(--abby-ink-900);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.012em;
  text-transform: none;
}

.panel-title-row span,
.reports-heading span,
.report-panel-header span {
  margin-left: 8px;
  color: var(--abby-ink-500);
  font-size: 11px;
  font-weight: 600;
}

.inline-entry {
  padding: 15px;
  border: 0;
  border-top: 1px solid var(--abby-border);
  background: #f3f7f7;
}

/* Inputs and forms */
.compact-shell input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.compact-shell select,
.compact-shell textarea,
.access-panel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.access-panel select,
.access-panel textarea {
  border: 1px solid #bccdce;
  border-radius: var(--abby-radius-xs);
  background: #fff;
  color: var(--abby-ink-950);
  box-shadow: 0 1px 2px rgba(7, 38, 50, .03);
  outline: none;
  transition:
    border-color .16s ease,
    box-shadow .16s ease,
    background-color .16s ease;
}

.organized-client-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.organized-client-form select,
.organized-client-form textarea,
.client-create-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.client-create-form select,
.client-create-form textarea {
  min-height: 38px;
  padding: 7px 9px;
}

.compact-shell input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
.compact-shell select:hover,
.compact-shell textarea:hover,
.access-panel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover {
  border-color: #8eaaad;
}

.compact-shell input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.compact-shell select:focus,
.compact-shell textarea:focus,
.access-panel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus {
  border-color: var(--abby-ring);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 134, 208, .16);
}

.compact-shell input::placeholder,
.compact-shell textarea::placeholder,
.access-panel input::placeholder {
  color: #879aa4;
  opacity: 1;
}

.tiny-search,
.status-select {
  min-height: 36px;
  height: 36px;
  padding: 6px 9px;
  background: #fff;
}

.filters-row {
  flex-wrap: wrap;
  gap: 7px;
}

.organized-client-form,
.client-create-form {
  color: var(--abby-ink-900);
}

.client-form-section {
  overflow: hidden;
}

.client-form-section-title,
.client-route-card-title,
.route-stops-header,
.admin-client-heading,
.attention-title {
  min-height: 42px;
  padding: 8px 11px;
  border: 0;
  border-bottom: 1px solid var(--abby-border);
  background: #f5f8f8;
  box-shadow: none;
}

.client-form-section-title strong,
.client-route-card-title strong {
  color: var(--abby-ink-900);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: none;
}

.client-form-section-title span,
.client-route-card-title span {
  color: var(--abby-ink-500);
  font-size: 10px;
  font-weight: 600;
}

.client-form-grid,
.client-route-card-body {
  padding: 12px;
}

.client-route-card {
  border-color: #d8e4e4;
  box-shadow: var(--abby-shadow-xs);
}

.pickup-route-card {
  border-top: 3px solid var(--abby-blue-600);
}

.delivery-route-card {
  border-top: 3px solid var(--abby-red-600);
}

.equipment-checks,
.quote-equipment-checks,
.organized-equipment-box,
.organized-notes-box {
  border: 1px solid #cfdddd;
  border-radius: var(--abby-radius-sm);
  background: #fff;
  box-shadow: none;
}

.equipment-checks legend {
  color: var(--abby-ink-700);
  font-size: 10px;
  letter-spacing: .055em;
}

.check-option {
  min-height: 24px;
}

.route-stops-inline,
.organized-route-controls,
.address-book-hint {
  border-color: #c9d9da;
  border-radius: var(--abby-radius-sm);
  background: var(--abby-surface-soft);
}

.form-message {
  color: var(--abby-green-700);
  font-size: 11px;
  font-weight: 750;
}

.form-message.error {
  color: var(--abby-red-700);
}

/* Buttons */
.tiny-primary,
.tiny-btn,
.mini-save,
.mini-pickup,
.mini-delivered,
.mini-cancel,
.mini-restore,
.mini-delete,
.mini-edit,
.mini-copy,
.mini-docs,
.mini-audit,
.mini-rate,
.mini-tracking,
.mini-client-tracking,
.primary-action,
.quote-calculator-shortcut,
.chat-status-btn,
.chat-pdf-btn,
.tracking-copy-btn,
.tracking-generate-btn,
.driver-pod-approve,
.driver-pod-reject,
.document-delete-btn,
.notice-confirm-actions button,
.quote-decline-actions button,
.reports-filters button,
.organized-form-actions button,
.client-create-actions button {
  border-radius: var(--abby-radius-xs);
  font-weight: 750;
  letter-spacing: -.005em;
  box-shadow: 0 1px 2px rgba(7, 38, 50, .06);
  transition:
    transform .18s var(--abby-ease),
    border-color .18s ease,
    background-color .18s ease,
    color .18s ease,
    box-shadow .18s ease;
}

.tiny-primary,
.mini-save,
.primary-action,
.tracking-copy-btn,
.tracking-generate-btn {
  min-height: 34px;
  border: 1px solid #0f548c;
  background: linear-gradient(180deg, #1c76b8 0%, #1766a1 100%);
  color: #fff;
  box-shadow: 0 5px 13px rgba(23, 111, 175, .18);
}

.tiny-btn,
.mini-edit,
.mini-copy,
.mini-docs,
.mini-audit,
.mini-rate,
.mini-tracking,
.mini-client-tracking,
.chat-pdf-btn,
.quote-calculator-shortcut {
  min-height: 34px;
  border: 1px solid #c2d0d1;
  background: #fff;
  color: var(--abby-ink-700);
}

.mini-save,
.mini-pickup,
.mini-delivered,
.mini-cancel,
.mini-restore,
.mini-delete,
.mini-edit,
.mini-copy,
.mini-docs,
.mini-audit,
.mini-rate,
.mini-tracking,
.mini-client-tracking,
.document-delete-btn {
  min-height: 28px;
  height: auto;
  padding: 4px 8px;
  font-size: 9.5px;
}

.mini-pickup {
  border-color: #9bc0e9;
  background: var(--abby-blue-100);
  color: #144f91;
}

.mini-delivered,
.mini-restore {
  border-color: #9ad0ad;
  background: var(--abby-green-100);
  color: #116538;
}

.mini-cancel,
.mini-delete,
.driver-pod-reject,
.document-delete-btn,
.portal-danger-action {
  border-color: #e5a5aa !important;
  background: var(--abby-red-100);
  color: #8f1d29;
}

.tiny-primary:hover,
.tiny-btn:hover,
.mini-save:hover,
.mini-pickup:hover,
.mini-delivered:hover,
.mini-cancel:hover,
.mini-restore:hover,
.mini-delete:hover,
.mini-edit:hover,
.mini-copy:hover,
.mini-docs:hover,
.mini-audit:hover,
.mini-rate:hover,
.mini-tracking:hover,
.mini-client-tracking:hover,
.primary-action:hover,
.quote-calculator-shortcut:hover,
.chat-status-btn:hover,
.chat-pdf-btn:hover,
.tracking-copy-btn:hover,
.tracking-generate-btn:hover,
.driver-pod-approve:hover,
.driver-pod-reject:hover,
.document-delete-btn:hover,
.notice-confirm-actions button:hover,
.quote-decline-actions button:hover,
.reports-filters button:hover,
.organized-form-actions button:hover,
.client-create-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(7, 38, 50, .12);
}

button:active,
.quote-calculator-shortcut:active {
  transform: translateY(0);
}

button:disabled,
button[aria-disabled="true"] {
  transform: none !important;
  box-shadow: none !important;
}

/* Operational data tables */
.table-wrap,
.admin-table-wrap,
.quote-table-wrap,
.report-table-wrap {
  border: 1px solid var(--abby-border);
  border-radius: 0 0 var(--abby-radius-md) var(--abby-radius-md);
  background: #fff;
  box-shadow: none;
}

.compact-table,
.report-table {
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  color: var(--abby-ink-950);
}

.compact-table th,
.report-table th {
  height: 40px;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid #cbd9da;
  background: #edf3f3;
  color: #4b6472;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .055em;
  line-height: 1.25;
  text-shadow: none;
  text-transform: uppercase;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .72);
}

.compact-table th + th,
.report-table th + th {
  border-left: 1px solid rgba(207, 220, 221, .64);
}

.compact-table td,
.report-table td {
  min-height: 44px;
  height: 44px;
  padding: 8px 9px;
  border: 0;
  border-bottom: 1px solid #e1e9e9;
  background: #fff;
  color: var(--abby-ink-900);
  line-height: 1.35;
}

.compact-table tr:nth-child(even) td {
  background: #fafcfc;
}

.compact-table tr.row-complete td {
  background: #f2faf5;
}

.compact-table tbody tr {
  transition: background-color .14s ease;
}

.compact-table tbody tr:hover td,
.report-table tbody tr:hover td {
  background: #f1f7fb;
  box-shadow: none;
}

.compact-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--abby-blue-600);
}

.compact-table tbody tr:last-child td,
.report-table tbody tr:last-child td {
  border-bottom: 0;
}

.compact-table .cell-input,
.admin-table .cell-input {
  min-height: 30px;
  height: 30px;
  padding: 4px 7px;
  border-radius: 7px;
  background: #fff;
}

.ln-cell {
  background: #f1f5f5 !important;
}

.read-line {
  color: var(--abby-ink-900);
  font-weight: 700;
}

.subcell {
  color: var(--abby-ink-500);
}

.status-badge,
.notice-badge,
.doc-count-badge,
.pod-cleared-badge,
.portal-system-status,
.tracking-state,
.pod-review-count-badge {
  min-height: 22px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 750;
  line-height: 1.15;
  box-shadow: none;
}

.status-badge.submitted,
.status-badge.pending {
  border-color: #efd28f;
  background: var(--abby-amber-100);
  color: var(--abby-amber-700);
}

.status-badge.scheduled,
.status-badge.quoted,
.status-badge.picked {
  border-color: #b9d2ef;
  background: var(--abby-blue-100);
  color: #174f87;
}

.status-badge.assigned,
.status-badge.transit {
  border-color: #aad8d4;
  background: var(--abby-teal-100);
  color: #0b6660;
}

.status-badge.delivered,
.status-badge.approved {
  border-color: #aad7b9;
  background: var(--abby-green-100);
  color: #17643b;
}

.status-badge.canceled,
.status-badge.declined {
  border-color: #e8afb4;
  background: var(--abby-red-100);
  color: #8f1d29;
}

.load-more-row {
  min-height: 48px;
  padding: 8px 11px;
  border-top: 1px solid var(--abby-border);
  background: #fafcfc;
}

.showing-count {
  color: var(--abby-ink-500);
  font-weight: 650;
}

/* Attention and report dashboards */
.needs-attention-dashboard {
  margin: 11px;
  padding: 12px;
  border: 1px solid var(--abby-border);
  border-radius: var(--abby-radius-sm);
  background: #f5f8f8;
  box-shadow: none;
}

.attention-title {
  min-height: 0;
  margin: 0 0 9px;
  padding: 0;
  border: 0;
  background: transparent;
}

.attention-title strong {
  color: var(--abby-ink-900);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.attention-cards {
  gap: 8px;
}

.attention-card {
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid #d7e2e2;
  border-radius: var(--abby-radius-sm);
  background: #fff;
  color: var(--abby-ink-900);
  box-shadow: var(--abby-shadow-xs);
  transition:
    transform .18s var(--abby-ease),
    border-color .18s ease,
    box-shadow .18s ease;
}

.attention-card:hover {
  transform: translateY(-1px);
  border-color: #abc6d8;
  box-shadow: var(--abby-shadow-sm);
}

.attention-card strong {
  color: var(--abby-blue-700);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
}

.attention-card span {
  margin-top: 4px;
  color: var(--abby-ink-500);
  font-size: 8.5px;
  letter-spacing: .05em;
}

.attention-card.active {
  border-color: #82b5da;
  background: #edf6fc;
  box-shadow: 0 0 0 3px rgba(23, 111, 175, .09);
}

.admin-reports-panel {
  overflow: hidden;
  border-color: var(--abby-border);
  background: #f3f7f7;
  box-shadow: var(--abby-shadow-sm);
}

.reports-toolbar {
  min-height: 74px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--abby-border);
  background: #fff;
  box-shadow: none;
}

.reports-tabs {
  width: auto;
  margin: 10px 12px 0;
  padding: 4px;
  border: 1px solid var(--abby-border);
  background: #e7eeee;
}

.reports-content,
.reports-message {
  background: #f3f7f7;
}

.reports-content {
  gap: 12px;
  padding: 12px;
}

.report-card-grid {
  gap: 10px;
}

.report-metric-card,
.report-panel {
  overflow: hidden;
  border: 1px solid var(--abby-border);
  border-radius: var(--abby-radius-sm);
  background: #fff;
  box-shadow: var(--abby-shadow-xs);
}

.report-metric-card {
  min-height: 98px;
  padding: 13px;
  background:
    linear-gradient(135deg, rgba(23, 111, 175, .045), transparent 62%),
    #fff;
}

.report-metric-card span {
  color: var(--abby-ink-500);
  font-size: 9px;
}

.report-metric-card strong {
  color: var(--abby-ink-900);
  font-size: 28px;
  letter-spacing: -.04em;
}

.report-panel-header {
  min-height: 44px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--abby-border);
  background: #f5f8f8;
}

.report-bar-track,
.progress-line {
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #dce7e8;
  box-shadow: inset 0 1px 2px rgba(7, 38, 50, .08);
}

.report-bar-fill,
.progress-line span {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--abby-blue-600), #39a3b2);
  box-shadow: none;
}

/* Dialogs, activity, saved tools and chat */
.chat-overlay,
.notice-confirm-overlay,
.freight-calculator-overlay,
.tracking-overlay,
.quote-decline-overlay,
.company-logo-confirm-overlay {
  padding: 18px;
  background: rgba(3, 24, 30, .58);
  backdrop-filter: blur(8px) saturate(110%);
  -webkit-backdrop-filter: blur(8px) saturate(110%);
}

.chat-card,
.notice-confirm-card,
.freight-calculator-modal,
.tracking-card,
.quote-decline-card,
.document-card,
.audit-card,
.company-logo-confirm-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: var(--abby-radius-lg);
  background: #fff;
  box-shadow: var(--abby-shadow-lg);
}

.chat-header,
.freight-calculator-modal-header,
.tracking-header,
.quote-decline-header,
.company-logo-confirm-header {
  min-height: 64px;
  padding: 12px 15px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(115deg, #073f3e 0%, #0a5553 58%, #176faf 130%);
  box-shadow: none;
}

.chat-close,
.freight-calculator-close,
.tracking-close,
.quote-decline-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  box-shadow: none;
}

.chat-thread,
.documents-body,
.audit-body,
.tracking-body,
.quote-decline-form {
  background: #f5f8f8;
}

.chat-bubble,
.chat-attachment,
.saved-location-picker-trigger,
.saved-location-menu,
.saved-tools-confirm-subject,
.address-book-hint,
.shipment-timeline,
.attention-card,
.document-row,
.audit-row,
.tracking-summary-card,
.tracking-history-row,
.driver-pod-review-row,
.client-tracking-route-grid > div,
.client-tracking-readonly-notice {
  border-radius: var(--abby-radius-sm);
}

.saved-location-menu {
  border: 1px solid var(--abby-border);
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--abby-shadow-md);
}

.document-row,
.audit-row,
.tracking-history-row {
  border-color: var(--abby-border);
  background: #fff;
}

.quote-decline-option,
.quote-decline-price-option {
  border: 1px solid var(--abby-border);
  border-radius: var(--abby-radius-sm);
  background: #fff;
  box-shadow: none;
}

.quote-decline-option:has(input:checked),
.quote-decline-price-option:has(input:checked) {
  border-color: #8dbce0;
  background: #eef6fc;
  box-shadow: 0 0 0 3px rgba(23, 111, 175, .09);
}

/* Access and redirect screens */
.access-gate,
.portal-home {
  background:
    radial-gradient(circle at 18% 6%, rgba(72, 166, 175, .22), transparent 28rem),
    radial-gradient(circle at 92% 88%, rgba(23, 111, 175, .22), transparent 31rem),
    linear-gradient(145deg, #052f32 0%, #073f3e 52%, #042a2e 100%);
}

.access-gate::before,
.portal-home::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .024) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .72), transparent 76%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .72), transparent 76%);
}

.access-panel,
.portal-home-card {
  position: relative;
  width: min(520px, 100%);
  padding: 30px 38px 36px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: var(--abby-radius-xl);
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--abby-shadow-lg);
  text-align: center;
}

.access-panel::before,
.portal-home-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--abby-red-600), var(--abby-blue-600), #38a5ae);
}

.access-logo-frame {
  width: min(310px, 100%);
  min-height: 82px;
  margin: 0 auto 18px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
}

.access-logo {
  width: 100%;
  max-width: 280px;
  max-height: 74px;
}

.access-panel .eyebrow,
.portal-home-card .eyebrow {
  margin: 0 0 8px;
  color: var(--abby-red-700);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}

.access-panel h1,
.portal-home-card h1 {
  margin: 0 0 10px;
  color: var(--abby-ink-900);
  font-size: clamp(25px, 5vw, 32px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
  text-transform: none;
}

.access-panel .muted,
.portal-home-card p {
  max-width: 390px;
  margin: 0 auto 22px;
  color: var(--abby-ink-500);
  font-size: 12.5px;
  line-height: 1.55;
}

.access-form {
  max-width: 390px;
}

.access-form .field {
  margin-bottom: 12px;
}

.access-form label {
  margin-bottom: 6px;
  color: var(--abby-ink-700);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
}

.access-form input {
  height: 48px;
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
}

.access-form .primary-action,
.access-form .tiny-btn {
  min-height: 46px;
  height: 46px;
  margin-top: 3px;
  font-size: 12px;
}

.access-company-hint {
  margin: 15px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--abby-border);
  color: var(--abby-ink-500);
  font-size: 10.5px;
  line-height: 1.45;
  text-align: center;
}

.portal-home-card .brand-logo {
  max-width: 285px;
  max-height: 82px;
  margin: 0 auto 18px;
}

.portal-home-links a {
  min-height: 52px;
  padding: 11px 14px;
  border: 1px solid var(--abby-border);
  border-radius: var(--abby-radius-sm);
  background: #fff;
  color: var(--abby-ink-900);
  box-shadow: var(--abby-shadow-xs);
}

.portal-home-links a:hover {
  border-color: #9dc3df;
  background: #f2f8fc;
  box-shadow: var(--abby-shadow-sm);
}

/* Keyboard and assistive input */
.compact-shell :is(button, a, input, select, textarea, summary):focus-visible,
.access-panel :is(button, a, input, select, textarea):focus-visible,
.portal-home-card a:focus-visible {
  outline: 3px solid var(--abby-ring);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .top-strip,
  .admin-strip,
  .admin-strip.admin-strip-clean {
    grid-template-columns: 1fr;
  }

  .reports-toolbar {
    align-items: flex-start;
  }

  .panel-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters-row {
    width: 100%;
  }
}

@media (max-width: 820px) {
  body.compact-page {
    padding: 0;
    background: var(--abby-canvas);
  }

  .compact-shell,
  .wide-shell {
    width: 100%;
    min-height: 100dvh;
    padding: 0 10px 18px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .app-menu,
  .admin-compact .app-menu {
    margin: 0 -10px 12px;
    padding: 10px;
    border-radius: 0;
  }

  .app-menu strong,
  .admin-compact .app-menu strong {
    min-width: 0;
    padding-left: 9px;
  }

  .app-menu > button,
  .app-menu .tiny-btn,
  .app-menu .tiny-primary,
  .app-menu #logoutBtn,
  .menu-ding,
  .client-compact .menu-ding,
  .admin-compact .menu-ding {
    min-height: 42px;
    height: auto;
  }

  .brand-box,
  .summary-box,
  .compact-panel,
  .admin-reports-panel {
    border-radius: 13px;
  }

  .portal-tabs,
  .reports-tabs {
    width: 100%;
  }

  .portal-tab,
  .report-tab {
    flex: 1 1 140px;
    min-height: 42px;
    height: 42px;
  }

  .panel-title-row {
    min-height: 0;
    padding: 12px;
  }

  .panel-title-row span {
    display: block;
    margin: 3px 0 0;
  }

  .filters-row .tiny-search,
  .filters-row .status-select {
    flex: 1 1 180px;
    width: auto;
    min-height: 44px;
    height: 44px;
  }

  .tiny-primary,
  .tiny-btn,
  .quote-calculator-shortcut {
    min-height: 42px;
    height: auto;
  }

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

  .compact-table tbody tr {
    border: 1px solid var(--abby-border);
    border-radius: var(--abby-radius-sm);
    background: #fff;
    box-shadow: var(--abby-shadow-xs);
  }

  .compact-table td,
  .compact-table tr:nth-child(even) td,
  .compact-table tr.row-complete td {
    min-height: 0;
    height: auto;
    border-bottom: 1px solid #e5ecec;
    background: #fff;
  }

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

  .compact-table tbody tr:hover td:first-child {
    box-shadow: none;
  }

  .chat-overlay,
  .notice-confirm-overlay,
  .tracking-overlay,
  .quote-decline-overlay,
  .company-logo-confirm-overlay {
    padding: 8px;
  }
}

@media (max-width: 520px) {
  .brand-box,
  .admin-strip-clean .admin-abby-box {
    grid-template-columns: 76px minmax(0, 1fr) !important;
    gap: 10px;
    padding: 10px;
    text-align: left !important;
  }

  .brand-caption,
  .brand-caption.align-right,
  .brand-box.align-right {
    text-align: left;
  }

  .brand-logo-wrap {
    min-height: 58px;
  }

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

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

  .summary-box span {
    padding: 10px 8px;
    font-size: 8.5px;
  }

  .summary-box strong,
  .admin-summary-box strong,
  .two-metric-box strong {
    font-size: 25px;
  }

  .access-gate {
    padding: 12px;
  }

  .access-panel,
  .portal-home-card {
    padding: 26px 20px 28px;
    border-radius: 20px;
  }

  .access-logo-frame {
    min-height: 66px;
    margin-bottom: 14px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (forced-colors: active) {
  .compact-shell,
  .brand-box,
  .summary-box,
  .compact-panel,
  .access-panel,
  .portal-home-card {
    border: 1px solid CanvasText;
  }

  .status-badge,
  .portal-tab.active,
  .report-tab.active {
    border: 1px solid CanvasText;
  }
}
