:root {
  color-scheme: dark;
  --bg: #0b1428;
  --gold: #ffcc5c;
  --gold-soft: #ffe59a;
  --text: #e7ecf6;
  --muted: #9fb1d4;
  --text-soft: #d8e7ff;
  --card: rgba(21, 31, 58, 0.9);
  --card-deep: rgba(11, 20, 40, 0.92);
  --border: rgba(var(--admin-sky-rgb), 0.28);
  --danger: #ff9d9d;
  --success: #7dffad;
  --danger-soft: #ffd4d4;
  --success-soft: #dfffe8;
  --field-bg: rgba(10, 18, 36, 0.86);
  --field-border: rgba(var(--admin-sky-rgb), 0.35);
  --placeholder: #8fa4c7;
  --button-bg: linear-gradient(120deg, rgba(var(--admin-gold-rgb), 0.18), rgba(var(--admin-gold-rgb), 0.08));
  --button-border: rgba(var(--admin-gold-rgb), 0.55);
  --button-hover: rgba(var(--admin-gold-rgb), 0.18);
  --toggle-rail: rgba(var(--admin-sky-rgb), 0.28);
  --toggle-track: rgba(14, 25, 48, 0.6);
  --toggle-thumb: rgba(11, 20, 32, 0.9);
  --panel-close-hover: #fff;
  --panel-overlay: rgba(5, 10, 20, 0.58);
  --pdf-bg: #030914;
  --chart-line-history: #7ec8ff;
  --chart-label: #8fa4c7;
  --blue-soft: #dce9ff;
  --page-gradient-a: rgba(242, 184, 75, 0.16);
  --page-gradient-b: rgba(247, 201, 107, 0.14);
  --page-gradient-c: rgba(242, 184, 75, 0.18);
  --page-gradient-d: rgba(var(--admin-sky-rgb), 0.12);
  --page-noise: rgba(var(--admin-white-rgb), 0.04);
  --scrollbar-track: rgba(8, 16, 34, 0.22);
  --scrollbar-thumb: rgba(var(--admin-gold-rgb), 0.28);
  --scrollbar-thumb-hover: rgba(var(--admin-gold-rgb), 0.4);
  --scrollbar-thumb-border: rgba(8, 16, 34, 0.2);
  --admin-sidebar-bg: linear-gradient(180deg, rgba(12, 22, 44, 0.98), rgba(16, 30, 57, 0.98));
  --admin-sidebar-control: rgba(12, 22, 43, 0.85);
  --admin-sidebar-control-active: linear-gradient(120deg, rgba(var(--admin-gold-rgb), 0.14), rgba(var(--admin-sky-rgb), 0.2));
  --admin-sidebar-btn: rgba(14, 25, 48, 0.6);
  --admin-sidebar-btn-hover: linear-gradient(120deg, rgba(var(--admin-gold-rgb), 0.14), rgba(var(--admin-sky-rgb), 0.2));
  --admin-sidebar-badge: rgba(7, 12, 24, 0.85);
  --admin-sidebar-badge-text: #ffe7a8;
  --admin-sidebar-border: rgba(var(--admin-gold-rgb), 0.45);
  --admin-surface-base: rgba(10, 18, 36, 0.85);
  --admin-surface-soft: rgba(9, 17, 35, 0.72);
  --admin-surface-muted: rgba(7, 15, 31, 0.76);
  --admin-surface-elevated: rgba(7, 17, 35, 0.6);
  --admin-panel-border: rgba(var(--admin-white-rgb), 0.12);
  --admin-glyph-border: rgba(var(--admin-gold-rgb), 0.18);
  --admin-glyph-fill: rgba(var(--admin-gold-rgb), 0.08);
  --admin-glyph-strong: rgba(var(--admin-gold-rgb), 0.45);
  --admin-shadow-elevated: 0 26px 52px rgba(var(--admin-shadow-rgb), 0.55);
  --admin-shadow-soft: 0 18px 38px rgba(6, 10, 20, 0.5);
  --admin-gold-rgb: 255, 204, 92;
  --admin-sky-rgb: 101, 150, 207;
  --admin-white-rgb: 255, 255, 255;
  --admin-shadow-rgb: 0, 0, 0;
  --input-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.04);
  --focus-ring: rgba(var(--admin-gold-rgb), 0.55);
  --focus-glow: rgba(var(--admin-gold-rgb), 0.2);
  --panel-glass: rgba(9, 18, 36, 0.8);
  --panel-glass-border: rgba(var(--admin-sky-rgb), 0.26);
  --page-overlay-opacity: 0.45;
  --menu-text-active: var(--gold-soft);
  --table-head-bg: rgba(13, 25, 48, 0.9);
  --table-head-text: var(--gold-soft);
  --table-cell-bg: rgba(11, 22, 44, 0.78);
  --table-cell-hover-bg: rgba(11, 22, 44, 0.92);
  --table-cell-hover-border: rgba(var(--admin-gold-rgb), 0.45);
  --table-row-hover-text: var(--gold-soft);
  --rate-confirmation-split-duration: 360ms;
  --rate-panel-gutter: 0.75rem;
  --floating-chat-clearance: calc(6rem + env(safe-area-inset-bottom));
}

body.admin-theme-light {
  color-scheme: light;
  --bg: #f4efe6;
  --gold: #8f5720;
  --gold-soft: #b87835;
  --text: #172534;
  --text-soft: #2a4056;
  --muted: #66778c;
  --card: #fffaf3;
  --card-deep: #f4ebe0;
  --border: rgba(55, 77, 103, 0.16);
  --danger: #b03a32;
  --danger-soft: #f7ded8;
  --success: #1c8a59;
  --success-soft: #e0f4e8;
  --field-bg: rgba(255, 251, 245, 0.96);
  --field-border: rgba(55, 77, 103, 0.24);
  --placeholder: #76869b;
  --button-bg: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.22), rgba(var(--admin-sky-rgb), 0.08));
  --button-border: rgba(61, 89, 120, 0.24);
  --button-hover: rgba(61, 89, 120, 0.14);
  --toggle-rail: rgba(61, 89, 120, 0.2);
  --toggle-track: rgba(252, 248, 241, 0.96);
  --toggle-thumb: #fffdf9;
  --panel-close-hover: #13253b;
  --panel-overlay: rgba(28, 27, 25, 0.18);
  --pdf-bg: #fbf7ef;
  --chart-line-history: #355e92;
  --chart-label: #687b90;
  --blue-soft: #edf4ff;
  --page-gradient-a: rgba(205, 140, 74, 0.12);
  --page-gradient-b: rgba(247, 226, 183, 0.2);
  --page-gradient-c: rgba(210, 170, 113, 0.1);
  --page-gradient-d: rgba(97, 125, 163, 0.1);
  --page-noise: rgba(var(--admin-white-rgb), 0.14);
  --scrollbar-track: #ebe2d5;
  --scrollbar-thumb: rgba(68, 92, 123, 0.22);
  --scrollbar-thumb-hover: rgba(68, 92, 123, 0.34);
  --scrollbar-thumb-border: #fbf7ef;
  --admin-sidebar-bg: linear-gradient(180deg, #fbf7ee 0%, #f3ebdf 52%, #ece3d6 100%);
  --admin-sidebar-control: rgba(255, 248, 240, 0.84);
  --admin-sidebar-control-active: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.18), rgba(var(--admin-sky-rgb), 0.12));
  --admin-sidebar-btn: rgba(252, 247, 240, 0.74);
  --admin-sidebar-btn-hover: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.2), rgba(var(--admin-sky-rgb), 0.1));
  --admin-sidebar-badge: rgba(255, 241, 214, 0.98);
  --admin-sidebar-badge-text: #8c5314;
  --admin-sidebar-border: rgba(61, 89, 120, 0.18);
  --admin-surface-base: rgba(255, 252, 247, 0.98);
  --admin-surface-soft: rgba(251, 246, 238, 0.96);
  --admin-surface-muted: rgba(244, 236, 226, 0.98);
  --admin-surface-elevated: rgba(255, 249, 242, 0.98);
  --admin-panel-border: rgba(61, 89, 120, 0.14);
  --admin-glyph-border: rgba(var(--admin-gold-rgb), 0.22);
  --admin-glyph-fill: rgba(var(--admin-gold-rgb), 0.09);
  --admin-glyph-strong: rgba(var(--admin-sky-rgb), 0.42);
  --admin-shadow-elevated: 0 24px 48px rgba(69, 60, 48, 0.12);
  --admin-shadow-soft: 0 16px 34px rgba(69, 60, 48, 0.09);
  --admin-gold-rgb: 191, 120, 42;
  --admin-sky-rgb: 48, 74, 109;
  --admin-white-rgb: 255, 255, 255;
  --admin-shadow-rgb: 0, 0, 0;
  --input-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.96), 0 1px 0 rgba(61, 89, 120, 0.04);
  --focus-ring: rgba(var(--admin-sky-rgb), 0.48);
  --focus-glow: rgba(var(--admin-sky-rgb), 0.12);
  --panel-glass: rgba(255, 250, 242, 0.92);
  --panel-glass-border: rgba(var(--admin-sky-rgb), 0.18);
  --page-overlay-opacity: 0.28;
  --menu-text-active: #183557;
  --table-head-bg: linear-gradient(180deg, #fbf6ee 0%, #f1e9dd 100%);
  --table-head-text: #284464;
  --table-cell-bg: rgba(255, 252, 247, 0.92);
  --table-cell-hover-bg: linear-gradient(95deg, rgba(var(--admin-gold-rgb), 0.12), rgba(255, 250, 243, 0.98));
  --table-cell-hover-border: rgba(var(--admin-sky-rgb), 0.26);
  --table-row-hover-text: #1b395b;
}

body.admin-theme-light .login-window {
  background: linear-gradient(165deg, var(--admin-surface-base), var(--admin-surface-soft));
  border-color: var(--admin-panel-border);
  box-shadow: var(--admin-shadow-soft);
}

body.admin-theme-light .loadboard-kpi-mini,
body.admin-theme-light .loadboard-kpi,
body.admin-theme-light .sidebar,
body.admin-theme-light .loadboard-sidebar,
body.admin-theme-light .loadboard-sidebar .loadboard-view-btn,
body.admin-theme-light .loadboard-view-btn,
body.admin-theme-light .loadboard-bucket summary,
body.admin-theme-light .window,
body.admin-theme-light .kpi,
body.admin-theme-light .timeoff-calendar-month,
body.admin-theme-light .timeoff-day-cell,
body.admin-theme-light .timeoff-day-cell:hover,
body.admin-theme-light .planner-toggle-option,
body.admin-theme-light .planner-direct-sell-fields,
body.admin-theme-light .planner-section,
body.admin-theme-light .planner-mode-card,
body.admin-theme-light .data-accordion,
body.admin-theme-light .data-accordion > summary,
body.admin-theme-light .route-stop-add-btn,
body.admin-theme-light .route-stop-remove,
body.admin-theme-light .route-stop-row,
body.admin-theme-light .card,
body.admin-theme-light .ghost-link,
body.admin-theme-light .rate-confirmation-action,
body.admin-theme-light .password-reset-window,
body.admin-theme-light th,
body.admin-theme-light tbody tr > td,
body.admin-theme-light .timeline-item,
body.admin-theme-light .loadboard-badge,
body.admin-theme-light .pill,
body.admin-theme-light .panel-window,
body.admin-theme-light .panel-summary,
body.admin-theme-light .panel-summary-item,
body.admin-theme-light .panel-summary-item-kpi,
body.admin-theme-light .shipment-history-nav,
body.admin-theme-light .shipment-history-nav-btn,
body.admin-theme-light .shipment-comments-pane,
body.admin-theme-light .shipment-history-actions,
body.admin-theme-light .shipment-comment-item,
body.admin-theme-light .shipment-history-list .timeline-item,
body.admin-theme-light .client-profile-layout.with-analytics .client-profile-panel--left,
body.admin-theme-light .client-profile-layout.with-analytics .client-profile-panel--right,
body.admin-theme-light .client-profile-metric,
body.admin-theme-light .client-profile-recent-item,
body.admin-theme-light .topbar,
body.admin-theme-light .two-factor-qr {
  background: var(--admin-surface-soft);
  border-color: var(--admin-panel-border);
}

body.admin-theme-light .topbar {
  border-bottom-color: var(--admin-panel-border);
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.9), rgba(247, 239, 229, 0.88));
  backdrop-filter: blur(12px) saturate(1.04);
  box-shadow: 0 14px 28px rgba(88, 73, 53, 0.08);
}

body.admin-theme-light .topbar h1 {
  color: var(--menu-text-active);
}

body.admin-theme-light .sidebar,
body.admin-theme-light .loadboard-sidebar {
  background:
    radial-gradient(circle at top left, rgba(var(--admin-gold-rgb), 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 249, 240, 0.98), rgba(243, 235, 223, 0.98));
  border-right-color: rgba(var(--admin-sky-rgb), 0.14);
  box-shadow: inset -1px 0 0 rgba(var(--admin-white-rgb), 0.72), 18px 0 36px rgba(71, 57, 40, 0.08);
}

body.admin-theme-light .brand {
  border-bottom-color: rgba(var(--admin-sky-rgb), 0.16);
}

body.admin-theme-light .menu-btn,
body.admin-theme-light .menu-group-toggle {
  color: rgba(23, 44, 69, 0.88);
  background: rgba(255, 251, 245, 0.72);
  border-color: rgba(var(--admin-sky-rgb), 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 1px 0 rgba(61, 89, 120, 0.04);
}

body.admin-theme-light .brand-mark {
  background: linear-gradient(145deg, rgba(255, 252, 247, 0.98), rgba(242, 233, 221, 0.96));
  border-color: rgba(var(--admin-sky-rgb), 0.14);
  box-shadow: 0 18px 36px rgba(71, 57, 40, 0.1);
}

body.admin-theme-light .side-footer-kicker {
  color: rgba(16, 73, 127, 0.62);
}

body.admin-theme-light .menu-btn-label,
body.admin-theme-light .menu-group-toggle .menu-btn-label {
  color: rgba(19, 45, 78, 0.92);
}

body.admin-theme-light .menu-btn-meta,
body.admin-theme-light .menu-group-toggle .menu-btn-meta {
  color: rgba(58, 86, 122, 0.82);
}

body.admin-theme-light .menu-group-caret {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 6px 14px rgba(25, 57, 97, 0.08);
}

body.admin-theme-light .theme-mode-control {
  color: rgba(19, 45, 78, 0.82);
}

body.admin-theme-light .menu-btn.active {
  color: var(--menu-text-active);
  border-color: rgba(var(--admin-sky-rgb), 0.22);
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.22), rgba(var(--admin-sky-rgb), 0.12));
  box-shadow: 0 10px 20px rgba(71, 57, 40, 0.1);
}

body.admin-theme-light .menu-badge {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body.admin-theme-light .data-accordion > summary {
  background: linear-gradient(120deg, rgba(var(--admin-gold-rgb), 0.1), rgba(var(--admin-sky-rgb), 0.12));
}

body.admin-theme-light .loadboard-view-btn:hover,
body.admin-theme-light .loadboard-view-btn:focus-visible,
body.admin-theme-light .menu-btn:hover,
body.admin-theme-light .menu-btn.active,
body.admin-theme-light .employee-panel-access .planner-toggle-option {
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.2), rgba(var(--admin-sky-rgb), 0.1));
  color: var(--menu-text-active);
}

body.admin-theme-light .window,
body.admin-theme-light .kpi,
body.admin-theme-light .card,
body.admin-theme-light .panel-window,
body.admin-theme-light .data-accordion {
  background: linear-gradient(160deg, rgba(255, 253, 248, 0.98), rgba(248, 241, 232, 0.96));
  border-color: rgba(var(--admin-sky-rgb), 0.14);
  box-shadow: 0 16px 34px rgba(71, 57, 40, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.admin-theme-light .kpi,
body.admin-theme-light .loadboard-kpi,
body.admin-theme-light .loadboard-kpi-mini {
  background: linear-gradient(160deg, rgba(255, 253, 248, 0.99), rgba(245, 236, 226, 0.97));
}

body.admin-theme-light .kpi strong {
  color: #8f5720;
}

body.admin-theme-light .window h2,
body.admin-theme-light .panel-window h2,
body.admin-theme-light .loadboard-section-head h2,
body.admin-theme-light .planner-mode-head h3 {
  color: var(--gold);
}

body.admin-theme-light .pill {
  color: #264564;
  border-color: rgba(var(--admin-sky-rgb), 0.16);
  background: linear-gradient(140deg, rgba(var(--admin-gold-rgb), 0.12), rgba(255, 255, 255, 0.84));
}

body.admin-theme-light .shipment-row:hover > td {
  color: var(--table-row-hover-text);
  border-color: var(--table-cell-hover-border);
}

body.admin-theme-light .shipment-row:hover {
  background: linear-gradient(90deg, rgba(var(--admin-gold-rgb), 0.1), rgba(255, 252, 247, 0.98));
}

body.admin-theme-light .shipment-row:hover > td {
  box-shadow: none;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid var(--scrollbar-thumb-border);
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}
body {
  margin: 0;
  font-family: "Spline Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, var(--page-gradient-a), transparent 55%),
    radial-gradient(circle at 80% 15%, var(--page-gradient-b), transparent 50%),
    radial-gradient(circle at 65% 65%, var(--page-gradient-c), transparent 55%),
    radial-gradient(circle at 20% 70%, var(--page-gradient-d), transparent 55%),
    var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(125deg, var(--page-gradient-a) 0%, var(--page-gradient-a) 18%, transparent 18%),
    linear-gradient(315deg, var(--toggle-rail) 0%, var(--toggle-rail) 20%, transparent 20%),
    conic-gradient(from 180deg at 82% 18%, var(--page-gradient-b), transparent 65%),
    radial-gradient(var(--page-noise) 1px, transparent 1px);
  background-size: 420px 420px, 360px 360px, 320px 320px, 120px 120px;
  background-position: 0 0, 100% 20%, 70% 10%, 0 0;
  opacity: var(--page-overlay-opacity);
  pointer-events: none;
}

body.admin-theme-light::before {
  background-size: 460px 460px, 420px 420px, 380px 380px, 150px 150px;
  background-position: 0 0, 100% 18%, 74% 8%, 0 0;
}

.side-footer-actions button {
  padding-inline: 0.78rem;
  white-space: nowrap;
}

.theme-mode-control {
  gap: 0.55rem;
}

.theme-mode-control .toggle-slider {
  box-shadow: inset 0 0 0 1px var(--admin-panel-border);
}

.hidden { display: none !important; }
.app-shell { min-height: 100vh; height: 100vh; display: grid; place-items: stretch; padding: 1rem; position: relative; z-index: 1; overflow: hidden; }
/* Center top-level panels within the viewport while preserving full-height layout for dashboard content */
.app-shell { place-items: start center; }

#loadboard-login {
  justify-self: center;
  align-self: center;
}

.login-window {
  width: min(430px, 100%);
  background: linear-gradient(165deg, rgba(15, 25, 49, 0.98), rgba(22, 34, 62, 0.96));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 20px 42px rgba(6, 10, 20, 0.48);
}
.login-window h1 { margin: 0.35rem 0; font-family: "Fraunces", serif; text-align: center; }
.login-subtitle { margin: 0; text-align: center; }
.login-logo { width: 120px; filter: drop-shadow(0 0 16px rgba(var(--admin-gold-rgb), 0.3)); display: block; margin-inline: auto; }
.login-window form { display: grid; gap: 0.65rem; }

#loadboard-login-form {
  gap: 0.95rem;
}

#loadboard-login-form > label {
  gap: 0.35rem;
}

#loadboard-login-form .password-field input {
  padding-right: 2.9rem;
}

.dashboard {
  width: min(2200px, calc(100vw - 2rem));
  justify-self: center;
  min-height: calc(100vh - 2rem);
  max-height: calc(100vh - 2rem);
  height: calc(100vh - 2rem);
  display: grid;
  grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--card-deep);
  box-shadow: var(--admin-shadow-soft);
}

#login-panel {
  align-self: center;
  justify-self: center;
}

.login-submit-btn {
  margin-top: 0.2rem;
}

.dashboard.locked {
  pointer-events: none;
  user-select: none;
  filter: blur(2px) saturate(0.8);
}
.loadboard-app {
  grid-template-columns: minmax(236px, 250px) minmax(0, 1fr);
}
.loadboard-sidebar {
  background: linear-gradient(180deg, rgba(12, 22, 44, 0.98), rgba(16, 30, 57, 0.98));
  border-right: 1px solid var(--border);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-content: start;
  min-width: 0;
  overflow: visible;
}
.loadboard-kpi-stack {
  display: grid;
  gap: 0.55rem;
}
.loadboard-kpi-stack h2 {
  margin: 0;
  color: var(--gold-soft);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.loadboard-kpi-mini {
  background: rgba(10, 18, 36, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
}
.loadboard-kpi-mini p {
  margin: 0 0 0.22rem;
  font-size: 0.76rem;
  color: var(--muted);
}
.loadboard-kpi-mini h3 {
  margin: 0;
  color: var(--gold-soft);
  font-size: 1.3rem;
  line-height: 1;
  font-family: "Fraunces", serif;
}
.loadboard-sidebar-brand {
  display: grid;
  gap: 0.45rem;
}
.loadboard-sidebar-brand img {
  width: 44px;
  filter: drop-shadow(0 0 14px rgba(var(--admin-gold-rgb), 0.3));
}
.loadboard-sidebar-title {
  margin: 0;
  font-family: "Fraunces", serif;
  color: var(--text);
  line-height: 1.1;
}
.loadboard-sidebar-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}
.loadboard-view-nav {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}
.loadboard-view-btn {
  width: 100%;
  text-align: left;
  line-height: 1.2;
  padding: 0.58rem 0.68rem;
  border-radius: 11px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.32);
  background: rgba(14, 25, 48, 0.82);
  color: var(--text);
  white-space: normal;
  word-break: break-word;
  font-size: 0.88rem;
}
.loadboard-view-btn:hover,
.loadboard-view-btn:focus-visible,
.loadboard-view-btn.is-active {
  border-color: rgba(var(--admin-gold-rgb), 0.5);
  background: linear-gradient(120deg, rgba(var(--admin-gold-rgb), 0.16), rgba(var(--admin-gold-rgb), 0.08));
  color: var(--gold-soft);
}
.loadboard-sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 0.45rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}
.loadboard-sidebar-user {
  margin: 0;
  text-transform: none;
  justify-content: flex-start;
}
.loadboard-sidebar-logout {
  width: 100%;
}
.loadboard-skeleton {
  position: relative;
  overflow: hidden;
}
.loadboard-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(var(--admin-white-rgb), 0.08) 45%, transparent 90%);
  transform: translateX(-100%);
  animation: loadboard-skeleton-wave 1.4s infinite;
}
.loadboard-skeleton-line {
  height: 0.8rem;
  border-radius: 999px;
  background: rgba(var(--admin-sky-rgb), 0.22);
  margin-bottom: 0.5rem;
}
.loadboard-skeleton-line:last-child {
  margin-bottom: 0;
}
.loadboard-skeleton-line-sm {
  width: 48%;
}
.loadboard-skeleton-line-md {
  width: 68%;
}
.loadboard-skeleton-line-lg {
  width: 88%;
}
.sidebar {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at top left, rgba(var(--admin-gold-rgb), 0.16), transparent 34%),
    radial-gradient(circle at bottom right, rgba(var(--admin-sky-rgb), 0.18), transparent 32%),
    var(--admin-sidebar-bg);
  color: var(--text);
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-right: 1px solid var(--border);
  min-height: 0;
  overflow: hidden;
  box-shadow: inset -1px 0 0 rgba(var(--admin-white-rgb), 0.05), 26px 0 56px rgba(4, 8, 16, 0.22);
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(var(--admin-white-rgb), 0.06), transparent 22%, transparent 78%, rgba(var(--admin-white-rgb), 0.03)),
    linear-gradient(90deg, rgba(var(--admin-white-rgb), 0.03), transparent 16%);
  pointer-events: none;
}
.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.05rem 1rem 0.95rem;
  border-bottom: 1px solid var(--border);
}
.brand-mark {
  width: 3.3rem;
  height: 3.3rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.28);
  background: linear-gradient(145deg, rgba(var(--admin-white-rgb), 0.08), rgba(var(--admin-white-rgb), 0.02));
  display: grid;
  place-items: center;
  box-shadow: 0 18px 36px rgba(4, 8, 16, 0.24);
  flex-shrink: 0;
}
.brand img { width: 44px; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 0.08rem; }
.brand-copy > strong { font-family: "Fraunces", serif; letter-spacing: 0.02em; font-size: 1.15rem; line-height: 1.05; }
.brand-subtitle { display: block; font-size: 0.78rem; color: var(--muted); }
.sidebar-nav {
  position: relative;
  z-index: 1;
  padding: 0.9rem 0.85rem;
  display: grid;
  gap: 0.38rem;
  align-content: start;
  min-height: 0;
  overflow: auto;
}
.menu-group { display: grid; gap: 0.38rem; }
.menu-group-toggle {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 4rem;
  padding: 0.72rem 0.8rem;
  border-radius: 18px;
  border: 1px solid rgba(var(--admin-sky-rgb),0.35);
  background: var(--admin-sidebar-control);
  color: var(--text-soft);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.menu-group-toggle::after,
.menu-btn::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(var(--admin-white-rgb), 0.08), transparent 38%, transparent 68%, rgba(var(--admin-sky-rgb), 0.08));
  pointer-events: none;
}
.menu-group.open .menu-group-toggle {
  background: var(--admin-sidebar-control-active);
  border-color: var(--admin-sidebar-border);
  box-shadow: 0 14px 28px rgba(var(--admin-shadow-rgb), 0.18);
}
.menu-group-toggle:hover {
  transform: translateX(2px);
  background: var(--admin-sidebar-control-active);
  border-color: var(--admin-sidebar-border);
  box-shadow: 0 14px 28px rgba(var(--admin-shadow-rgb), 0.18);
}
.menu-group-toggle-copy {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}
.menu-group-caret {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.35);
  background: rgba(var(--admin-sky-rgb), 0.12);
  color: var(--text-soft);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.menu-group.open .menu-group-caret {
  transform: rotate(45deg);
  background: rgba(var(--admin-gold-rgb), 0.16);
  border-color: rgba(var(--admin-gold-rgb), 0.34);
}
.submenu {
  display: none;
  gap: 0.38rem;
  padding-left: 0.9rem;
  margin-left: 1.15rem;
  border-left: 1px solid rgba(var(--admin-sky-rgb), 0.18);
}
.menu-group.open .submenu { display: grid; }
.menu-btn {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--admin-sidebar-btn);
  color: var(--text-soft);
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 0.72rem 0.8rem;
  min-height: 4rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.menu-btn-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 0.18rem;
}
.menu-btn-label {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.menu-btn-meta {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-btn-side {
  min-width: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}
.menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.2rem;
  padding: 0 0.46rem;
  border-radius: 999px;
  border: 1px solid var(--admin-sidebar-border);
  color: var(--admin-sidebar-badge-text);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--admin-sidebar-badge);
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.08);
}
.menu-btn:hover, .menu-btn.active {
  transform: translateX(2px);
  background: var(--admin-sidebar-btn-hover);
  border-color: var(--admin-sidebar-border);
  box-shadow: 0 14px 28px rgba(var(--admin-shadow-rgb), 0.18);
}
.menu-btn.has-live-bid-notice:not(.active) {
  border-color: rgba(var(--admin-gold-rgb), 0.38);
  box-shadow: 0 0 0 1px rgba(var(--admin-gold-rgb), 0.16), 0 16px 30px rgba(var(--admin-shadow-rgb), 0.22);
  animation: menu-live-bid-pulse 1.6s ease-in-out infinite;
}
.menu-btn.active .menu-btn-label,
.menu-group.open .menu-group-toggle .menu-btn-label {
  color: var(--menu-text-active);
}
.menu-btn.active .menu-btn-meta,
.menu-group.open .menu-group-toggle .menu-btn-meta {
  color: var(--text-soft);
}
.side-footer {
  position: relative;
  z-index: 1;
  padding: 0.95rem 1rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  background: linear-gradient(180deg, transparent, rgba(var(--admin-white-rgb), 0.03));
}
.side-footer-kicker {
  margin: 0 0 0.18rem;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.side-footer-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: start;
  margin-bottom: 0.82rem;
}
.side-footer-identity,
.side-footer-version {
  min-width: 0;
}
.side-footer-version {
  display: grid;
  gap: 0.18rem;
  justify-items: end;
  text-align: right;
}
#admin-email {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  word-break: break-word;
}
.admin-version-link {
  appearance: none;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.36);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.16), rgba(var(--admin-sky-rgb), 0.16));
  color: var(--gold-soft);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 0.58rem 0.8rem;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 12px 26px rgba(var(--admin-shadow-rgb), 0.18);
}
.admin-version-link:hover,
.admin-version-link.active {
  transform: translateY(-1px);
  border-color: rgba(var(--admin-gold-rgb), 0.56);
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.24), rgba(var(--admin-sky-rgb), 0.2));
  box-shadow: 0 18px 30px rgba(var(--admin-shadow-rgb), 0.22);
}
.admin-version-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--focus-ring), 0 0 0 4px var(--focus-glow), 0 18px 30px rgba(var(--admin-shadow-rgb), 0.22);
}
.side-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.56rem;
}
.theme-mode-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-soft);
}
.theme-mode-state {
  white-space: nowrap;
}
.theme-mode-toggle {
  --_w: 2.55rem;
  --_h: 1.2rem;
}
.workspace { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; height: 100%; overflow: hidden; }
.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(18, 30, 56, 0.85);
  backdrop-filter: blur(10px);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}
body[data-admin-active-view="shipments"] .workspace { grid-template-rows: minmax(0, 1fr); }
body[data-admin-active-view="shipments"] .topbar { display: none; }
.topbar h1 { margin: 0; font-family: "Fraunces", serif; font-size: 1.2rem; color: var(--gold-soft); }
.topbar-copy {
  display: grid;
  gap: 0.22rem;
}
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
.top-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-left: auto; }
.view { display: none; padding: 1rem; overflow: auto; gap: 0.9rem; min-width: 0; align-content: start; min-height: 0; height: 100%; }
.view.active { display: grid; }
#clients-view {
  grid-template-columns: minmax(0, 2.3fr) minmax(280px, 1fr);
  align-items: start;
}
#shipper-clients-view {
  grid-template-columns: minmax(0, 1fr);
}
.timeoff-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(280px, 0.95fr);
  gap: 0.9rem;
  min-width: 0;
}
.timeoff-calendar-scroll {
  display: grid;
  gap: 0.9rem;
  max-height: calc(100vh - 6.2rem);
  overflow: auto;
  padding-right: 0.1rem;
}
.timeoff-calendar-month {
  --timeoff-month-lanes: 0;
  margin-bottom: 0;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.18);
  border-radius: 16px;
  padding: 0.8rem 0.88rem 0.92rem;
  background: rgba(8, 16, 32, 0.58);
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.04);
}
.timeoff-calendar-month:last-child {
  margin-bottom: 0;
}
.timeoff-calendar-month-head {
  display: grid;
  gap: 0.72rem;
  margin-bottom: 0.8rem;
}
.timeoff-calendar-month-copy {
  display: grid;
  gap: 0.18rem;
}
.timeoff-calendar-month h3 {
  margin: 0;
  color: var(--gold-soft);
}
.timeoff-calendar-month-meta,
.timeoff-legend-empty {
  margin: 0;
}
.timeoff-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.timeoff-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.44rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--timeoff-person-rgb), 0.34);
  background: rgba(var(--timeoff-person-rgb), 0.12);
}
.timeoff-legend-swatch {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: rgb(var(--timeoff-person-rgb));
  flex: none;
}
.timeoff-legend-copy {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}
.timeoff-legend-copy strong {
  font-size: 0.72rem;
  line-height: 1.1;
  color: var(--text);
}
.timeoff-legend-copy span {
  font-size: 0.63rem;
  line-height: 1.1;
  color: var(--muted);
  white-space: nowrap;
}
.timeoff-weekday-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.34rem;
  margin-bottom: 0.36rem;
}
.timeoff-weekday {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-left: 0.12rem;
}
.timeoff-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.34rem;
}
.timeoff-day-cell {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  min-height: calc(84px + (var(--timeoff-month-lanes, 0) * 24px));
  min-width: 0;
  text-align: left;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.18);
  border-radius: 12px;
  background: rgba(7, 15, 31, 0.72);
  padding: 0.42rem;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.timeoff-day-cell:hover {
  border-color: rgba(var(--admin-sky-rgb), 0.34);
  background: rgba(7, 15, 31, 0.88);
  box-shadow: 0 10px 24px rgba(var(--admin-shadow-rgb), 0.16);
  transform: translateY(-1px);
}
.timeoff-day-cell.has-entries {
  border-color: rgba(var(--admin-sky-rgb), 0.24);
}
.timeoff-day-cell[disabled] {
  pointer-events: none;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.timeoff-day-cell[disabled] .timeoff-day-number {
  visibility: hidden;
}
.timeoff-day-cell-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.4rem;
}
.timeoff-day-number {
  font-size: 0.78rem;
  color: var(--gold-soft);
  line-height: 1;
}
.timeoff-day-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0.38rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-white-rgb), 0.08);
  background: rgba(var(--admin-white-rgb), 0.04);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}
.timeoff-day-note {
  margin-top: 0.28rem;
  padding-top: 0.28rem;
  border-top: 1px solid rgba(var(--admin-white-rgb), 0.06);
  font-size: 0.63rem;
  color: var(--muted);
  line-height: 1.25;
  word-break: break-word;
}
.timeoff-day-segments {
  position: relative;
  margin-top: 0.36rem;
  min-height: calc(var(--timeoff-month-lanes, 0) * 24px + 1px);
}
.timeoff-day-segment {
  position: absolute;
  left: 0;
  right: 0;
  height: 22px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.34rem;
  padding: 0 0.38rem;
  font-size: 0.62rem;
  line-height: 1;
  color: var(--text);
  background: rgba(var(--timeoff-person-rgb), 0.14);
  font-weight: 600;
  top: calc(var(--lane) * 24px);
  border: 1px solid rgba(var(--timeoff-person-rgb), 0.34);
  pointer-events: none;
  overflow: hidden;
}
.timeoff-day-segment-swatch {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgb(var(--timeoff-person-rgb));
  flex: none;
}
.timeoff-day-segment-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timeoff-day-segment-meta {
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(var(--timeoff-person-rgb));
  white-space: nowrap;
}
body.admin-theme-light .timeoff-calendar-month {
  background: rgba(255, 252, 246, 0.96);
  border-color: rgba(var(--admin-sky-rgb), 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}
body.admin-theme-light .timeoff-day-cell {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(var(--admin-sky-rgb), 0.16);
}
body.admin-theme-light .timeoff-day-cell:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(var(--admin-sky-rgb), 0.28);
  box-shadow: 0 12px 24px rgba(var(--admin-shadow-rgb), 0.08);
}
body.admin-theme-light .timeoff-day-count {
  background: rgba(var(--admin-sky-rgb), 0.08);
  border-color: rgba(var(--admin-sky-rgb), 0.12);
}
body.admin-theme-light .timeoff-day-note {
  border-top-color: rgba(var(--admin-sky-rgb), 0.12);
}
body.admin-theme-light .timeoff-legend-item {
  background: rgba(var(--timeoff-person-rgb), 0.08);
}
body.admin-theme-light .timeoff-day-segment {
  background: rgba(var(--timeoff-person-rgb), 0.12);
  border-color: rgba(var(--timeoff-person-rgb), 0.24);
}
.window {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb),0.04);
}
.window h2 { margin: 0 0 0.55rem; font-family: "Fraunces", serif; color: var(--gold-soft); font-size: 1.05rem; }
.kpi-grid { display: grid; gap: 0.65rem; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.kpi {
  background: linear-gradient(145deg, rgba(16, 27, 51, 0.95), rgba(18, 35, 66, 0.9));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem;
}
.kpi p { margin: 0 0 0.3rem; color: var(--muted); font-size: 0.84rem; }
.kpi strong { font-size: 1.45rem; color: var(--gold); }
.priority-list { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; color: var(--muted); }
.grid-form { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.35rem;
}
.panel-access-switches {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.employee-roster-window {
  display: grid;
  gap: 1rem;
}
.employee-roster-header {
  display: grid;
  gap: 0.75rem;
  align-items: start;
}
.employee-roster-header-copy {
  display: grid;
  gap: 0.35rem;
  max-width: 58rem;
}
.employee-roster-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.26);
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.14), rgba(var(--admin-sky-rgb), 0.12));
  color: var(--gold-soft);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.employee-roster-description {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}
.employee-create-shell {
  margin: 0;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.2);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(11, 23, 45, 0.88), rgba(8, 18, 35, 0.96));
  overflow: hidden;
  box-shadow: var(--admin-shadow-soft);
}
.employee-create-shell > summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.15rem;
  cursor: pointer;
}
.employee-create-shell > summary::-webkit-details-marker {
  display: none;
}
.employee-create-summary-copy {
  display: grid;
  gap: 0.22rem;
  max-width: 36rem;
}
.employee-create-summary-copy strong {
  color: var(--text);
  font-size: 0.95rem;
}
.employee-create-summary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.18);
  background: rgba(var(--admin-gold-rgb), 0.08);
  color: var(--gold-soft);
  font-size: 0.75rem;
  white-space: nowrap;
}
.employee-create-summary-action::after {
  content: "+";
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.employee-create-shell[open] .employee-create-summary-action::after {
  transform: rotate(45deg);
}
.employee-create-shell-body {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  gap: 1rem 1.4rem;
  padding: 1rem 1.15rem 1.15rem;
  border-top: 1px solid rgba(var(--admin-sky-rgb), 0.16);
  animation: panel-reveal 0.22s ease both;
  align-items: start;
}
.employee-create-intro {
  margin: 0;
  color: var(--muted);
  max-width: 32ch;
  padding-right: 1rem;
  border-right: 1px solid rgba(var(--admin-sky-rgb), 0.16);
  line-height: 1.55;
}
.employee-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 0.75rem 0.85rem;
}
.employee-form-grid > label,
.employee-form-grid > div {
  min-width: 0;
}
.check-grid label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text);
}
.employee-panel-access {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 0.45rem;
}
.employee-panel-access .planner-toggle-option {
  justify-content: space-between;
  min-height: 2.85rem;
  padding: 0.36rem 0.48rem;
  border-radius: 8px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.2);
  background: rgba(7, 17, 35, 0.45);
}
.employee-panel-access .planner-toggle-option > span:first-child {
  color: var(--text);
  white-space: normal;
  line-height: 1.35;
}
.employee-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.2rem;
}
.employee-form-actions button {
  min-width: 13rem;
}
.employee-roster-list {
  display: grid;
  gap: 1rem;
  min-width: 0;
}
.employee-roster-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}
.employee-roster-metric {
  display: grid;
  gap: 0.24rem;
  padding: 0.78rem 0.88rem;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.18);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(11, 24, 46, 0.82), rgba(9, 18, 34, 0.94));
}
.employee-roster-metric span {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.employee-roster-metric strong {
  color: var(--gold);
  font-size: 1.28rem;
}
.employee-roster-metric small {
  color: var(--muted);
  font-size: 0.74rem;
}
.employee-roster-groups {
  display: grid;
  gap: 0.9rem;
}
.employee-roster-group {
  border: 1px solid rgba(var(--admin-sky-rgb), 0.2);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(9, 18, 34, 0.92), rgba(11, 22, 43, 0.86));
}
.employee-roster-group-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 0.95rem 1rem 0.88rem;
  border-bottom: 1px solid rgba(var(--admin-sky-rgb), 0.16);
}
.employee-roster-group-label {
  display: grid;
  gap: 0.2rem;
}
.employee-roster-group-kicker {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.employee-roster-group h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}
.employee-roster-group-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}
.employee-roster-group-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.16);
  background: rgba(var(--admin-gold-rgb), 0.08);
  color: var(--gold-soft);
  font-size: 0.74rem;
  white-space: nowrap;
}
.employee-roster-table-shell {
  overflow: auto;
}
.employee-roster-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
}
.employee-roster-table thead th {
  padding: 0.82rem 1rem;
  text-align: left;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  background: rgba(var(--admin-sky-rgb), 0.08);
  border-bottom: 1px solid rgba(var(--admin-sky-rgb), 0.14);
}
.employee-roster-table tbody td {
  padding: 0.92rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid rgba(var(--admin-sky-rgb), 0.14);
}
.employee-roster-table tbody tr:last-child td {
  border-bottom: none;
}
.employee-roster-row:hover td {
  background: rgba(var(--admin-sky-rgb), 0.04);
}
button.employee-roster-profile-button {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.78rem;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-align: left;
  overflow: visible;
}
button.employee-roster-profile-button:hover,
button.employee-roster-profile-button:active {
  transform: none;
  box-shadow: none;
  filter: none;
}
button.employee-roster-profile-button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 14px;
}
.employee-roster-avatar {
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border-radius: 0.95rem;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.18);
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.18), rgba(var(--admin-sky-rgb), 0.12));
  color: var(--gold-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.employee-roster-identity-copy {
  display: grid;
  gap: 0.2rem;
}
.employee-roster-identity-copy strong {
  color: var(--text);
  font-size: 0.95rem;
}
.employee-roster-handle {
  color: var(--muted);
  font-size: 0.78rem;
}
.employee-roster-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}
.employee-roster-stack {
  display: grid;
  gap: 0.34rem;
  min-width: 0;
}
.employee-roster-keyline {
  display: grid;
  gap: 0.14rem;
}
.employee-roster-keyline span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.employee-roster-keyline strong {
  color: var(--text);
  font-size: 0.95rem;
}
.employee-roster-presence {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.employee-roster-presence-chip,
.employee-roster-alert-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.56rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.22);
  font-size: 0.72rem;
  white-space: nowrap;
}
.employee-roster-presence-chip {
  background: rgba(var(--admin-sky-rgb), 0.08);
  color: var(--gold-soft);
}
.employee-roster-presence-chip.is-online {
  border-color: rgba(90, 177, 129, 0.35);
  background: rgba(90, 177, 129, 0.14);
  color: #b9f0cb;
}
.employee-roster-alert-chip {
  border-color: rgba(232, 188, 101, 0.28);
  background: rgba(232, 188, 101, 0.14);
  color: var(--gold);
}
.employee-roster-access-editor {
  margin: 0;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.18);
  border-radius: 14px;
  background: rgba(7, 17, 35, 0.48);
  overflow: hidden;
}
.employee-roster-access-editor > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.75rem 0.82rem;
}
.employee-roster-access-editor > summary::-webkit-details-marker {
  display: none;
}
.employee-roster-access-summary-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}
.employee-roster-access-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.employee-roster-access-editor-meta {
  color: var(--gold-soft);
  font-size: 0.74rem;
  white-space: nowrap;
}
.employee-roster-access-editor-body {
  display: grid;
  gap: 0.75rem;
  padding: 0 0.82rem 0.82rem;
  border-top: 1px solid rgba(var(--admin-sky-rgb), 0.14);
}
.employee-row-panel-access {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.38rem;
}
.employee-row-panel-access .planner-toggle-option {
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.3rem 0.38rem;
  border-radius: 10px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.18);
  background: rgba(9, 20, 40, 0.58);
}
.employee-row-panel-access .planner-toggle-option > span:first-child {
  white-space: normal;
}
.employee-roster-inline-actions {
  margin-top: 0;
}
.employee-roster-actions {
  margin-top: 0;
  min-width: 12rem;
}
.employee-roster-empty {
  margin: 0;
  padding: 1rem;
  border: 1px dashed rgba(var(--admin-sky-rgb), 0.24);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}
body.admin-theme-light .employee-create-shell,
body.admin-theme-light .employee-roster-metric,
body.admin-theme-light .employee-roster-group,
body.admin-theme-light .employee-roster-access-editor {
  background: linear-gradient(160deg, rgba(255, 253, 248, 0.99), rgba(245, 236, 226, 0.97));
  border-color: rgba(var(--admin-sky-rgb), 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}
body.admin-theme-light .employee-roster-kicker {
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.16), rgba(var(--admin-sky-rgb), 0.12));
  color: var(--menu-text-active);
}
body.admin-theme-light .employee-create-summary-action,
body.admin-theme-light .employee-roster-group-chip,
body.admin-theme-light .employee-roster-access-editor-meta {
  color: var(--menu-text-active);
}
body.admin-theme-light .employee-create-shell-body,
body.admin-theme-light .employee-roster-group-head,
body.admin-theme-light .employee-roster-table thead th,
body.admin-theme-light .employee-roster-table tbody td,
body.admin-theme-light .employee-roster-access-editor-body {
  border-color: rgba(var(--admin-sky-rgb), 0.12);
}
body.admin-theme-light .employee-roster-table thead th {
  background: rgba(var(--admin-gold-rgb), 0.08);
}
body.admin-theme-light .employee-roster-row:hover td {
  background: rgba(var(--admin-gold-rgb), 0.06);
}
body.admin-theme-light button.employee-roster-profile-button {
  color: var(--text);
  box-shadow: none;
}
body.admin-theme-light .employee-roster-avatar {
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.22), rgba(var(--admin-sky-rgb), 0.18));
  color: var(--menu-text-active);
}
body.admin-theme-light .employee-row-panel-access .planner-toggle-option {
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.16), rgba(var(--admin-sky-rgb), 0.08));
  color: var(--menu-text-active);
}
label { display: grid; gap: 0.25rem; font-size: 0.84rem; color: var(--gold-soft); }
.grid-form label { min-width: 0; }
.grid-form label > input,
.grid-form label > select,
.grid-form label > textarea {
  width: 100%;
  min-width: 0;
}
input[type="file"] {
  width: 100%;
  min-width: 0;
}
.password-field { position: relative; }
.password-field input {
  width: 100%;
  padding-right: 2.45rem;
}
.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  width: 1.8rem;
  height: 1.8rem;
  display: inline-grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: var(--gold-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.password-toggle-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.password-toggle-btn:hover {
  transform: translateY(-50%);
  box-shadow: none;
  color: var(--gold);
}
.password-toggle-btn:active {
  transform: translateY(-50%);
  box-shadow: none;
}
.eye-icon {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
}
.password-toggle-btn .eye-off { display: none; }
.password-toggle-btn[aria-pressed="true"] .eye-open { display: none; }
.password-toggle-btn[aria-pressed="true"] .eye-off { display: block; }
.password-caps-indicator {
  position: absolute;
  top: 50%;
  right: 2.15rem;
  color: var(--danger);
  font-size: 0.78rem;
  line-height: 1;
  transform: translateY(-50%);
  z-index: 3;
  transition: opacity 0.12s ease;
}
.password-field .password-caps-indicator {
  color: var(--danger);
  pointer-events: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.span-2 { grid-column: 1 / -1; }
.twofactor-code-wrap {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.4rem;
  width: min(100%, 320px);
  justify-self: center;
  margin-inline: auto;
  justify-content: center;
}
.twofactor-code-label {
  margin: 0;
  text-align: center;
  color: var(--gold-soft);
}
.twofactor-feedback {
  margin: 0;
  min-height: 1.15rem;
  text-align: center;
  color: var(--success);
}
.admin-auth-form {
  transition: opacity 0.22s ease, transform 0.22s ease, filter 0.22s ease;
}
.admin-auth-form.is-switching {
  opacity: 0;
  transform: translateY(-5px);
  filter: blur(1px);
  pointer-events: none;
}
.twofactor-code-input {
  width: 100%;
  text-align: center;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  padding: 0.45rem 0.2rem;
}
input, select, button {
  font: inherit;
  color: var(--text);
  border: 1px solid var(--field-border);
  border-radius: 9px;
  padding: 0.44rem 0.56rem;
  background: var(--field-bg);
  box-shadow: var(--input-shadow);
}
input::placeholder { color: var(--placeholder); }
textarea {
  font: inherit;
  color: var(--text);
  border: 1px solid var(--field-border);
  border-radius: 9px;
  padding: 0.44rem 0.56rem;
  background: var(--field-bg);
  box-shadow: var(--input-shadow);
  min-height: 4.2rem;
  resize: vertical;
}
input,
select,
textarea {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid transparent;
  border-color: var(--button-border);
  box-shadow: 0 0 0 3px var(--focus-glow), var(--input-shadow);
}

textarea::placeholder { color: var(--placeholder); }
button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-color: var(--button-border);
  background: var(--button-bg);
  box-shadow: 0 6px 14px rgba(var(--admin-shadow-rgb), 0.18);
  transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px var(--button-hover);
}
button:active {
  transform: translateY(1px) scale(0.99);
}
button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}
body.admin-theme-light button {
  color: var(--text-soft);
  box-shadow: 0 6px 14px rgba(73, 60, 45, 0.08);
}

body.admin-theme-light button:hover {
  box-shadow: 0 12px 22px rgba(73, 60, 45, 0.12);
}

button.is-busy {
  cursor: wait;
  color: transparent;
  pointer-events: none;
  filter: saturate(0.75);
}
button.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 1rem;
  height: 1rem;
  margin: auto;
  border: 2px solid rgba(231, 236, 246, 0.25);
  border-top-color: rgba(var(--admin-gold-rgb), 0.95);
  border-radius: 50%;
  animation: ui-spin 0.7s linear infinite;
}
body.admin-theme-light button.is-busy::after {
  border-color: rgba(16, 48, 91, 0.2);
  border-top-color: rgba(var(--admin-sky-rgb), 0.95);
}

@keyframes ui-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes panel-reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.view.active {
  animation: panel-reveal 0.35s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
#shipments-view {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  overflow: hidden;
}

#shipments-view > .window {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.release-notes-window {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 1rem;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  padding: 1.12rem;
  background:
    radial-gradient(circle at top right, rgba(var(--admin-gold-rgb), 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(var(--admin-sky-rgb), 0.18), transparent 34%),
    linear-gradient(160deg, var(--admin-surface-base), var(--admin-surface-soft));
}
.release-notes-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--admin-white-rgb), 0.05), transparent 22%);
  pointer-events: none;
}
.release-notes-hero,
.release-notes-summary,
.release-notes-list {
  position: relative;
  z-index: 1;
}
.release-notes-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) auto;
  gap: 1rem;
  align-items: stretch;
  padding: 1rem;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.22);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.14), rgba(var(--admin-sky-rgb), 0.1)),
    var(--admin-surface-muted);
  box-shadow: var(--admin-shadow-soft);
}
.release-notes-kicker,
.release-notes-entry-kicker {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.release-notes-hero h2 {
  margin: 0;
  font-size: clamp(1.65rem, 2.4vw, 2.45rem);
}
#changelog-intro {
  margin: 0.6rem 0 0;
  max-width: 42rem;
  color: var(--text-soft);
  line-height: 1.6;
}
.release-notes-mark {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.16rem;
  min-width: 10rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(var(--admin-white-rgb), 0.12);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(var(--admin-white-rgb), 0.06), rgba(var(--admin-gold-rgb), 0.12));
  text-align: center;
}
.release-notes-mark span {
  font-family: "Fraunces", serif;
  font-size: 3rem;
  line-height: 1;
  color: var(--gold);
}
.release-notes-mark small {
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.release-notes-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.82rem;
}
.release-notes-stat {
  display: grid;
  gap: 0.28rem;
  padding: 0.88rem 0.94rem;
  border: 1px solid rgba(var(--admin-white-rgb), 0.1);
  border-radius: 18px;
  background: rgba(var(--admin-white-rgb), 0.04);
}
.release-notes-stat-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.release-notes-stat strong {
  color: var(--text);
  font-size: 1.18rem;
}
.release-notes-stat span:last-child {
  color: var(--text-soft);
  font-size: 0.85rem;
  line-height: 1.45;
}
.release-notes-list {
  display: grid;
  gap: 0.92rem;
  min-height: 0;
  overflow: auto;
  align-content: start;
  padding-right: 0.28rem;
}
.release-notes-entry {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.82rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(var(--admin-white-rgb), 0.1);
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(var(--admin-white-rgb), 0.04), transparent 55%),
    var(--admin-surface-muted);
  box-shadow: var(--admin-shadow-soft);
}
.release-notes-entry::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(var(--admin-gold-rgb), 0.92), rgba(var(--admin-sky-rgb), 0.65));
}
.release-notes-entry.is-current {
  border-color: rgba(var(--admin-gold-rgb), 0.34);
}
.release-notes-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.release-notes-entry-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.16rem;
}
.release-notes-entry-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.28);
  border-radius: 999px;
  background: rgba(var(--admin-gold-rgb), 0.08);
  color: var(--gold-soft);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.release-notes-entry-summary {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.62;
}
.release-notes-detail-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.42rem;
  color: var(--text);
}
.release-notes-entry-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.release-notes-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}
.release-notes-file-pill {
  padding: 0.38rem 0.62rem;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.24);
  border-radius: 999px;
  background: rgba(var(--admin-sky-rgb), 0.08);
  color: var(--blue-soft);
  font-size: 0.76rem;
  font-weight: 600;
}
.release-notes-commit {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (max-width: 960px) {
  .release-notes-hero,
  .release-notes-summary {
    grid-template-columns: 1fr;
  }

  .release-notes-mark {
    justify-self: start;
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .side-footer-meta {
    grid-template-columns: 1fr;
  }

  .side-footer-version {
    justify-items: start;
    text-align: left;
  }

  .release-notes-entry-head,
  .release-notes-entry-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
.table-wrap { overflow: auto; }

.shipments-table-wrap {
  --shipments-table-row-height: 2.85rem;
  --shipments-table-header-height: 2.45rem;
  min-height: 0;
  height: 100%;
  max-height: none;
}

.shipments-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.data-accordion {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10, 18, 38, 0.72), rgba(11, 23, 45, 0.78));
}

.data-accordion + .data-accordion {
  margin-top: 0.8rem;
}

.data-accordion > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  font-family: "Fraunces", serif;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--gold-soft);
  padding: 0.68rem 0.9rem;
  background: linear-gradient(120deg, rgba(var(--admin-gold-rgb), 0.18), rgba(var(--admin-gold-rgb), 0.08));
}

.data-accordion > summary::-webkit-details-marker {
  display: none;
}

.data-accordion > summary::after {
  content: "+";
  width: 1rem;
  display: inline-grid;
  place-items: center;
  color: var(--gold-soft);
  transform-origin: center;
  transition: transform 0.18s ease;
}

.data-accordion[open] > summary::after {
  transform: rotate(45deg);
}

.data-accordion[open] > summary {
  border-bottom: 1px solid var(--border);
}

.data-accordion-body {
  display: grid;
  gap: 0.8rem;
  padding: 0.7rem;
}

.list-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 0 0 0.35rem;
}

.inline-search {
  font-size: 0.82rem;
  color: var(--gold-soft);
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0;
  max-width: 420px;
}

.inline-search input {
  min-width: 180px;
  max-width: 260px;
}

.client-view-window {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}

.client-view-head {
  align-items: center;
  margin-bottom: 0;
}

.client-view-head h2 {
  margin-bottom: 0.2rem;
}

.client-view-head-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-left: auto;
}

.client-view-head-actions .inline-search {
  max-width: none;
}

.client-entry-panel {
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem;
  background: linear-gradient(148deg, rgba(9, 20, 40, 0.86), rgba(9, 15, 30, 0.92));
  border-color: rgba(var(--admin-gold-rgb), 0.26);
}

.client-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.client-entry-head h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 0.95rem;
  color: var(--gold-soft);
}

.client-entry-form {
  margin-top: 0.05rem;
}

.client-entry-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.shipper-location-editor {
  display: grid;
  gap: 0.8rem;
  padding: 0.96rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.18);
  background: rgba(8, 16, 31, 0.56);
}

.shipper-location-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.shipper-location-editor-head h3,
.shipper-location-editor-head h4 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 0.98rem;
  color: var(--gold-soft);
}

.shipper-location-editor-head p {
  margin: 0.18rem 0 0;
}

.shipper-location-list {
  display: grid;
  gap: 0.7rem;
}

.shipper-location-row {
  display: grid;
  gap: 0.72rem 0.78rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) auto;
  align-items: start;
  padding: 0.82rem 0.88rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.25);
  background: rgba(6, 13, 27, 0.76);
}

.shipper-location-row label {
  margin: 0;
  display: grid;
  gap: 0.34rem;
  min-width: 0;
}

.shipper-location-row label:nth-of-type(3) {
  grid-column: 1 / -1;
}

.shipper-location-row input {
  min-height: 2.55rem;
}

.shipper-location-row [data-shipper-location-remove] {
  align-self: end;
  min-height: 2.55rem;
  padding-inline: 0.82rem;
}

.shipper-location-empty {
  margin: 0;
}

body.admin-theme-light .shipper-location-editor {
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.92));
}

body.admin-theme-light .shipper-location-row {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(238, 245, 255, 0.9));
  border-color: rgba(var(--admin-sky-rgb), 0.24);
}

.client-table-wrap {
  border: 1px solid rgba(var(--admin-sky-rgb), 0.22);
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(8, 16, 32, 0.88), rgba(7, 14, 28, 0.92));
  padding: 0.24rem;
}

.client-table {
  min-width: 840px;
  border-spacing: 0 0.32rem;
}

.client-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.shipment-row {
  --shipment-row-border: rgba(var(--admin-sky-rgb), 0.34);
  --shipment-row-inner-border: rgba(var(--admin-sky-rgb), 0.16);
  --shipment-row-accent: rgba(var(--admin-sky-rgb), 0.72);
  --shipment-row-glow: rgba(var(--admin-sky-rgb), 0.22);
  cursor: pointer;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  box-shadow: inset 0 0 0 2px var(--shipment-row-accent), inset 0 0 14px var(--shipment-row-glow);
}

.shipment-row--available {
  --shipment-row-border: rgba(56, 197, 133, 0.72);
  --shipment-row-inner-border: rgba(56, 197, 133, 0.22);
  --shipment-row-accent: rgba(56, 197, 133, 0.92);
  --shipment-row-glow: rgba(56, 197, 133, 0.3);
}

.shipment-row--waiting-paperwork {
  --shipment-row-border: rgba(255, 210, 77, 0.72);
  --shipment-row-inner-border: rgba(255, 210, 77, 0.2);
  --shipment-row-accent: rgba(255, 210, 77, 0.9);
  --shipment-row-glow: rgba(255, 210, 77, 0.26);
}

.shipment-row--planned {
  --shipment-row-border: rgba(255, 255, 255, 0.58);
  --shipment-row-inner-border: rgba(255, 255, 255, 0.14);
  --shipment-row-accent: rgba(255, 255, 255, 0.84);
  --shipment-row-glow: rgba(255, 255, 255, 0.2);
}

.shipment-row--dispatched {
  --shipment-row-border: rgba(73, 142, 255, 0.74);
  --shipment-row-inner-border: rgba(73, 142, 255, 0.22);
  --shipment-row-accent: rgba(73, 142, 255, 0.94);
  --shipment-row-glow: rgba(73, 142, 255, 0.3);
}

.shipment-row--loading {
  --shipment-row-border: rgba(255, 91, 214, 0.72);
  --shipment-row-inner-border: rgba(255, 91, 214, 0.22);
  --shipment-row-accent: rgba(255, 91, 214, 0.92);
  --shipment-row-glow: rgba(255, 91, 214, 0.28);
}

.shipment-row--in-transit {
  --shipment-row-border: rgba(166, 176, 191, 0.72);
  --shipment-row-inner-border: rgba(166, 176, 191, 0.2);
  --shipment-row-accent: rgba(166, 176, 191, 0.9);
  --shipment-row-glow: rgba(166, 176, 191, 0.24);
}

.shipment-row--unloading {
  --shipment-row-border: rgba(121, 96, 255, 0.7);
  --shipment-row-inner-border: rgba(121, 96, 255, 0.2);
  --shipment-row-accent: rgba(121, 96, 255, 0.9);
  --shipment-row-glow: rgba(121, 96, 255, 0.28);
}

.shipment-row--delivered {
  --shipment-row-border: rgba(187, 118, 255, 0.72);
  --shipment-row-inner-border: rgba(187, 118, 255, 0.2);
  --shipment-row-accent: rgba(187, 118, 255, 0.92);
  --shipment-row-glow: rgba(187, 118, 255, 0.3);
}

.shipment-row--completed {
  --shipment-row-border: rgba(74, 214, 126, 0.72);
  --shipment-row-inner-border: rgba(74, 214, 126, 0.2);
  --shipment-row-accent: rgba(74, 214, 126, 0.92);
  --shipment-row-glow: rgba(74, 214, 126, 0.28);
}

.shipment-row--hold {
  --shipment-row-border: rgba(255, 160, 76, 0.72);
  --shipment-row-inner-border: rgba(255, 160, 76, 0.2);
  --shipment-row-accent: rgba(255, 160, 76, 0.92);
  --shipment-row-glow: rgba(255, 160, 76, 0.28);
}

.shipment-row--cancelled {
  --shipment-row-border: rgba(255, 87, 87, 0.74);
  --shipment-row-inner-border: rgba(255, 87, 87, 0.22);
  --shipment-row-accent: rgba(255, 87, 87, 0.94);
  --shipment-row-glow: rgba(255, 87, 87, 0.3);
}

.shipment-row--claim {
  --shipment-row-border: rgba(64, 70, 82, 0.72);
  --shipment-row-inner-border: rgba(64, 70, 82, 0.22);
  --shipment-row-accent: rgba(223, 228, 236, 0.86);
  --shipment-row-glow: rgba(18, 21, 28, 0.45);
}

.shipment-row--tonu {
  --shipment-row-border: rgba(150, 97, 67, 0.72);
  --shipment-row-inner-border: rgba(150, 97, 67, 0.22);
  --shipment-row-accent: rgba(182, 122, 89, 0.92);
  --shipment-row-glow: rgba(150, 97, 67, 0.3);
}

.shipment-row--postponed {
  --shipment-row-border: rgba(255, 126, 176, 0.72);
  --shipment-row-inner-border: rgba(255, 126, 176, 0.22);
  --shipment-row-accent: rgba(255, 126, 176, 0.94);
  --shipment-row-glow: rgba(255, 126, 176, 0.3);
}

.shipment-row:hover {
  background: linear-gradient(90deg, rgba(var(--admin-gold-rgb), 0.22), rgba(15, 28, 54, 0.96));
  box-shadow: inset 0 0 0 1px var(--shipment-row-accent), inset 0 0 18px var(--shipment-row-glow);
}

.shipment-row:hover > td {
  color: var(--table-row-hover-text);
  border-color: var(--table-cell-hover-border);
}

.shipment-row:hover > td:first-child {
  box-shadow: inset 3px 0 0 var(--table-row-hover-text);
}

body.admin-theme-light .shipment-row {
  box-shadow: inset 0 0 0 2px var(--shipment-row-accent), inset 0 0 0 999px rgba(255, 255, 255, 0.44);
}

body.admin-theme-light .shipment-row--available {
  --shipment-row-border: rgba(28, 138, 89, 0.52);
  --shipment-row-inner-border: rgba(28, 138, 89, 0.22);
  --shipment-row-accent: rgba(28, 138, 89, 0.9);
  --shipment-row-glow: rgba(28, 138, 89, 0.18);
}

body.admin-theme-light .shipment-row--dispatched {
  --shipment-row-border: rgba(38, 90, 187, 0.54);
  --shipment-row-inner-border: rgba(38, 90, 187, 0.22);
  --shipment-row-accent: rgba(38, 90, 187, 0.9);
  --shipment-row-glow: rgba(38, 90, 187, 0.18);
}

body.admin-theme-light .shipment-row:hover {
  box-shadow: inset 0 0 0 2px var(--shipment-row-accent), inset 0 0 0 999px rgba(255, 255, 255, 0.62), 0 12px 22px rgba(73, 60, 45, 0.12);
}

.shipment-live-list {
  display: grid;
  gap: 0.22rem;
}

.shipment-live-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  font-size: 0.68rem;
  line-height: 1.2;
  color: var(--gold-soft);
  border: 1px solid rgba(var(--admin-gold-rgb), 0.34);
  border-radius: 999px;
  padding: 0.14rem 0.38rem;
  background: rgba(var(--admin-gold-rgb), 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shipment-live-overflow {
  font-size: 0.66rem;
  color: var(--muted);
}

.shipment-live-empty {
  color: var(--muted);
}

.planner-form { display: grid; gap: 0.6rem; }
.planner-form .grid-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.planner-form .planner-field-span-2 {
  grid-column: span 2;
}

.planner-form .planner-field-span-3 {
  grid-column: span 3;
}

.planner-form .planner-field-span-4 {
  grid-column: 1 / -1;
}
.planner-route-basic-fields {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.planner-location-pair {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.46fr);
  align-items: end;
}

.planner-location-pair > label {
  min-width: 0;
}

.planner-location-pair > label > select,
.planner-location-pair > label > input {
  width: 100%;
}

.planner-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: end;
}
.planner-actions button {
  align-self: end;
  justify-self: start;
}
.planner-loadboard-action {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: var(--gold-soft);
}
.planner-loadboard-action select {
  width: auto;
  min-width: 7rem;
}
.planner-form label span,
.planner-form label {
  position: relative;
}

.planner-form .planner-required,
.planner-form input[required],
.planner-form select[required],
.planner-form textarea[required] {
  border-color: var(--danger);
}

.planner-form .planner-required.planner-field-valid,
.planner-form input[required]:not(:disabled):valid,
.planner-form select[required]:not(:disabled):valid,
.planner-form textarea[required]:not(:disabled):valid {
  border-color: var(--success);
}

.planner-form input[required]:not(:disabled),
.planner-form select[required]:not(:disabled),
.planner-form textarea[required]:not(:disabled) {
  transition: border-color 160ms ease;
}
.planner-toggle-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.42rem 0.48rem;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(18, 31, 56, 0.52), rgba(10, 18, 35, 0.62));
  border: 1px solid rgba(var(--admin-gold-rgb), 0.2);
  color: var(--gold-soft);
}
.planner-conditional-field {
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}
.planner-conditional-field.is-hidden {
  visibility: hidden;
  opacity: 0;
  transform: scaleY(0);
  pointer-events: none;
  user-select: none;
}
.planner-toggle-option > .toggle-switch {
  flex-shrink: 0;
}
.toggle-switch {
  position: relative;
  display: inline-flex;
  width: var(--_w, 52px);
  height: var(--_h, 28px);
  cursor: pointer;
}
.toggle-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.toggle-slider {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  position: relative;
  border: 1px solid var(--toggle-rail);
  background: var(--toggle-track);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(var(--_h, 28px) - 8px);
  height: calc(var(--_h, 28px) - 8px);
  border-radius: 50%;
  background: var(--blue-soft);
  box-shadow: 0 1px 6px rgba(var(--admin-shadow-rgb), 0.28);
  transition: transform 0.2s ease;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--button-bg);
  border-color: var(--button-border);
  box-shadow: 0 0 0 1px var(--button-border) inset;
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(calc(var(--_w, 52px) - var(--_h, 28px)));
}
.planner-direct-sell-fields {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.42rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0.58rem;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.24);
  border-radius: 11px;
  background: linear-gradient(155deg, rgba(var(--admin-gold-rgb), 0.08), rgba(10, 18, 35, 0.72));
}
.planner-direct-sell-note {
  margin: 0;
  color: var(--text-soft);
  grid-column: 1 / -1;
}
.planner-direct-sell-fields label {
  margin: 0;
}
.planner-direct-sell-search {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.42rem;
}
.planner-direct-sell-search label {
  display: grid;
  gap: 0.32rem;
}
.planner-direct-sell-search .shipment-direct-sell-search-meta {
  min-height: 1.15rem;
}
.planner-target-rate-field {
  display: grid;
  gap: 0.25rem;
}
.planner-target-rate-field .planner-target-rate-hint {
  margin-top: 0.06rem;
}
.planner-direct-sell-target-disabled {
  opacity: 0.62;
}
.planner-mode-card {
  border: 1px solid rgba(var(--admin-gold-rgb), 0.2);
  border-radius: 14px;
  padding: 0.85rem;
  background: linear-gradient(155deg, rgba(26, 39, 70, 0.9), rgba(12, 20, 40, 0.94));
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb),0.04);
  position: relative;
  overflow: hidden;
}
.planner-mode-card::after {
  content: "";
  position: absolute;
  inset: -45% -20% auto;
  height: 220px;
  background: radial-gradient(circle at center, rgba(var(--admin-gold-rgb), 0.16), transparent 66%);
  pointer-events: none;
}
.planner-mode-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.planner-mode-head h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  color: var(--gold-soft);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.planner-mode-head p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  max-width: 18rem;
}
.planner-route-derived-summary {
  margin: 0.55rem 0 0.6rem;
  padding: 0.62rem 0.74rem;
  border-radius: 11px;
  border: 1px dashed rgba(var(--admin-gold-rgb), 0.34);
  background: rgba(8, 16, 33, 0.7);
  color: var(--text);
  position: relative;
  z-index: 1;
}
.planner-route-stops {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.5rem;
}
.route-stop-actions {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}

.route-stop-add-btn,
.route-stop-remove {
  border: 1px solid rgba(var(--admin-sky-rgb), 0.35);
  border-radius: 10px;
  padding: 0.38rem 0.6rem;
  font-size: 0.78rem;
  color: var(--text);
  background: rgba(8, 18, 36, 0.8);
  cursor: pointer;
}
.route-stop-add-btn:hover,
.route-stop-remove:hover {
  border-color: rgba(var(--admin-gold-rgb), 0.55);
  background: linear-gradient(120deg, rgba(var(--admin-gold-rgb), 0.14), rgba(var(--admin-gold-rgb), 0.06));
}

.route-stop-row {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: auto minmax(130px, 1fr) minmax(160px, 1fr) minmax(170px, 1.6fr) minmax(170px, 1.6fr) minmax(170px, 1.6fr) auto;
  background: rgba(6, 13, 27, 0.76);
  border: 1px solid rgba(var(--admin-sky-rgb), 0.25);
  border-radius: 10px;
  padding: 0.55rem;
}

.route-stop-type {
  width: 100%;
}

.route-stop-row label {
  margin: 0;
  display: grid;
  gap: 0.28rem;
}

.route-stop-row .route-stop-index {
  min-width: 120px;
}

.route-stop-row input,
.route-stop-row select {
  margin-top: 0.05rem;
}
.route-stop-row .route-stop-index {
  font-size: 0.72rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(120, 140, 170, 0.25);
  padding-bottom: 0.28rem;
}

body.admin-theme-light .route-stop-row .route-stop-index {
  border-bottom-color: var(--admin-panel-border);
}
.route-stop-row .route-stop-location,
.route-stop-row .route-stop-address {
  width: 100%;
}

.route-stop-row .route-stop-date-time {
  width: 100%;
}

.route-stop-row .route-stop-note {
  width: 100%;
}

.route-stop-empty-note {
  margin: 0;
  color: var(--muted);
}

.planner-section {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 0.55rem 0.65rem 0.65rem;
  background: rgba(9, 17, 35, 0.72);
}
.planner-section summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--gold-soft);
  margin: 0;
}
.planner-section summary::-webkit-details-marker { display: none; }
.planner-section summary::after { content: "v"; transition: transform 0.2s ease; opacity: 0.8; }
.planner-section[open] summary::after { transform: rotate(180deg); }
.planner-section .grid-form { margin-top: 0.55rem; }

body.admin-theme-light .planner-toggle-option {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(239, 246, 255, 0.92));
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  color: var(--text-soft);
}

body.admin-theme-light .planner-section {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.admin-theme-light .planner-section summary {
  color: var(--menu-text-active);
}

body.admin-theme-light .planner-mode-card {
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.92));
  box-shadow: 0 18px 28px rgba(18, 46, 85, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.admin-theme-light .planner-mode-card::after {
  background: radial-gradient(circle at center, rgba(var(--admin-sky-rgb), 0.14), transparent 66%);
}

body.admin-theme-light .planner-route-derived-summary {
  border-color: rgba(var(--admin-sky-rgb), 0.34);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-soft);
}

body.admin-theme-light .planner-direct-sell-fields {
  border-color: rgba(var(--admin-sky-rgb), 0.28);
  background: linear-gradient(150deg, rgba(var(--admin-sky-rgb), 0.1), rgba(255, 255, 255, 0.92));
}

body.admin-theme-light .route-stop-row {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(238, 245, 255, 0.9));
  border-color: rgba(var(--admin-sky-rgb), 0.24);
}

body.admin-theme-light .route-stop-add-btn,
body.admin-theme-light .route-stop-remove {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(236, 244, 255, 0.92));
  border-color: rgba(var(--admin-sky-rgb), 0.3);
}

body.admin-theme-light .route-stop-add-btn:hover,
body.admin-theme-light .route-stop-remove:hover {
  background: linear-gradient(120deg, rgba(var(--admin-gold-rgb), 0.2), rgba(var(--admin-sky-rgb), 0.12));
}

.shipper-location-static-list {
  display: grid;
  gap: 0.6rem;
}

.shipper-location-static-item,
.shipper-location-performance-card {
  display: grid;
  gap: 0.28rem;
  padding: 0.72rem 0.78rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.24);
  background: rgba(7, 17, 35, 0.54);
}

.shipper-location-performance-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

body.admin-theme-light .shipper-location-static-item,
body.admin-theme-light .shipper-location-performance-card {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.9));
  border-color: rgba(var(--admin-sky-rgb), 0.24);
}

.shipment-planner-window {
  padding: 1.05rem;
  background:
    radial-gradient(circle at top right, rgba(var(--admin-gold-rgb), 0.14), transparent 30%),
    linear-gradient(180deg, rgba(11, 20, 38, 0.98), rgba(7, 13, 27, 0.98));
}

.shipment-planner-head {
  margin-bottom: 0.9rem;
  padding: 0 0 0.8rem;
  border-bottom: 1px solid rgba(var(--admin-gold-rgb), 0.14);
}

.shipment-planner-head-copy {
  display: grid;
  gap: 0.32rem;
}

.shipment-planner-head-copy p {
  margin: 0;
  max-width: 42rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.shipment-planner-window h2 {
  margin: 0;
  font-size: 1.28rem;
}

.planner-form {
  display: grid;
  gap: 0.95rem;
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "core core"
    "timing load"
    "handling compliance"
    "actions actions";
}

.planner-form > * {
  min-width: 0;
}

.planner-core-grid {
  grid-area: core;
  position: relative;
  align-content: start;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.18);
  background: linear-gradient(180deg, rgba(16, 26, 49, 0.96), rgba(8, 15, 30, 0.94));
  box-shadow: 0 16px 28px rgba(var(--admin-shadow-rgb), 0.16), inset 0 1px 0 rgba(var(--admin-white-rgb), 0.05);
}

.planner-card-intro {
  display: grid;
  gap: 0.28rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.24);
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.12), rgba(12, 22, 42, 0.72));
}

.planner-card-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(var(--admin-gold-rgb), 0.8);
}

.planner-card-intro h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.18rem;
  color: var(--gold-soft);
}

.planner-card-intro p:last-child {
  margin: 0;
  max-width: 38rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.planner-form .grid-form {
  gap: 0.8rem;
}

.planner-core-grid > label,
.planner-core-grid > div,
.planner-section .grid-form > label,
.planner-section .grid-form > div {
  min-width: 0;
}

.planner-route-basic-fields {
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.18);
  background: rgba(8, 16, 31, 0.58);
}

.planner-core-grid > #shipment-direct-sell-fields,
.planner-core-grid > #shipment-mailing-list-container {
  grid-column: 1 / -1;
}

.planner-core-grid > #shipment-mailing-list-container label {
  display: grid;
  gap: 0.42rem;
  padding: 0.82rem 0.88rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.18);
  background: rgba(8, 16, 31, 0.56);
}

.planner-section {
  position: relative;
  border-radius: 18px;
  padding: 0.82rem 0.95rem 0.98rem;
  border-color: rgba(var(--admin-sky-rgb), 0.18);
  background: linear-gradient(180deg, rgba(14, 23, 43, 0.94), rgba(8, 15, 29, 0.9));
  box-shadow: 0 14px 24px rgba(var(--admin-shadow-rgb), 0.14), inset 0 1px 0 rgba(var(--admin-white-rgb), 0.04);
}

.planner-section-timing {
  grid-area: timing;
}

.planner-section-load {
  grid-area: load;
}

.planner-section-handling {
  grid-area: handling;
}

.planner-section-compliance {
  grid-area: compliance;
}

.planner-section summary {
  align-items: start;
  gap: 0.8rem;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(var(--admin-sky-rgb), 0.14);
}

.planner-section summary > span:first-child {
  font-family: "Fraunces", serif;
  font-size: 1rem;
  line-height: 1.1;
}

.planner-summary-meta {
  display: block;
  margin-top: 0.16rem;
  max-width: 24rem;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.planner-section summary::after {
  content: "v";
  font-size: 0.95rem;
}

.planner-section .grid-form {
  margin-top: 0.9rem;
}

.planner-context-note {
  margin: 0.9rem 0 0;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px dashed rgba(var(--admin-gold-rgb), 0.34);
  background: rgba(10, 18, 35, 0.72);
  color: var(--text-soft);
  line-height: 1.55;
}

.planner-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: minmax(220px, 280px) auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: end;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(16, 26, 49, 0.96), rgba(9, 16, 31, 0.94));
  box-shadow: 0 14px 24px rgba(var(--admin-shadow-rgb), 0.14), inset 0 1px 0 rgba(var(--admin-white-rgb), 0.05);
}

.planner-actions button {
  align-self: end;
  justify-self: start;
  min-width: 12rem;
  min-height: 3rem;
  font-size: 0.95rem;
}

.planner-loadboard-action {
  display: grid;
  align-items: start;
  gap: 0.35rem;
  padding: 0.82rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.2);
  background: rgba(8, 16, 31, 0.58);
  color: var(--gold-soft);
}

.planner-loadboard-action select {
  width: 100%;
  min-width: 0;
}

#shipment-planner-view #shipments-status {
  max-width: none;
  margin: 0;
  align-self: center;
}

body.admin-theme-light .shipment-planner-window {
  background:
    radial-gradient(circle at top right, rgba(var(--admin-sky-rgb), 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(242, 248, 255, 0.98));
}

body.admin-theme-light .planner-core-grid,
body.admin-theme-light .planner-section,
body.admin-theme-light .planner-actions,
body.admin-theme-light .planner-loadboard-action,
body.admin-theme-light .planner-card-intro,
body.admin-theme-light .planner-route-basic-fields,
body.admin-theme-light .planner-core-grid > #shipment-mailing-list-container label {
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.94));
  box-shadow: 0 18px 30px rgba(18, 45, 81, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body.admin-theme-light .shipment-planner-head {
  border-bottom-color: rgba(var(--admin-sky-rgb), 0.2);
}

body.admin-theme-light .planner-card-kicker {
  color: rgba(16, 73, 127, 0.68);
}

body.admin-theme-light .planner-card-intro p:last-child,
body.admin-theme-light .shipment-planner-head-copy p,
body.admin-theme-light .planner-context-note {
  color: var(--text-soft);
}

body.admin-theme-light .planner-summary-meta {
  color: rgba(58, 86, 122, 0.82);
}

body.admin-theme-light .planner-context-note {
  border-color: rgba(var(--admin-sky-rgb), 0.34);
  background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 1180px) {
  .planner-form {
    grid-template-columns: 1fr;
    grid-template-areas:
      "core"
      "timing"
      "load"
      "handling"
      "compliance"
      "actions";
  }

  #shipment-planner-view #shipments-status {
    margin-left: 0;
    max-width: none;
  }
}

@media (max-width: 720px) {
  .planner-card-intro {
    padding: 0.85rem 0.9rem;
  }

  .planner-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .planner-actions button {
    justify-self: stretch;
    min-width: 0;
  }

  .planner-form .planner-field-span-2,
  .planner-form .planner-field-span-3,
  .planner-form .planner-field-span-4 {
    grid-column: 1 / -1;
  }

  .planner-location-pair {
    grid-template-columns: 1fr;
  }

  .planner-summary-meta {
    max-width: none;
  }
}

table { width: 100%; border-collapse: separate; border-spacing: 0 0.42rem; min-width: 980px; }
th, td { padding: 0.52rem; text-align: left; font-size: 0.82rem; vertical-align: top; }
th { background: var(--table-head-bg); color: var(--table-head-text); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.72rem; border-bottom: 1px solid rgba(var(--admin-sky-rgb),0.2); }

tbody tr > td {
  background: var(--table-cell-bg);
  border-bottom: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--admin-white-rgb), 0.015);
}

tbody tr.shipment-row > td {
  border-top: 1px solid var(--shipment-row-border);
  border-bottom: 1px solid var(--shipment-row-border);
  box-shadow: inset 0 0 0 1px var(--shipment-row-inner-border);
}

tbody tr.ticket-row--complete > td {
  opacity: 0.56;
  color: var(--muted);
}

tbody tr.ticket-row--complete:hover > td {
  opacity: 0.72;
}

tbody tr.shipment-row > td:first-child {
  border-left: 1px solid var(--shipment-row-border);
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

tbody tr.shipment-row > td:last-child {
  border-right: 1px solid var(--shipment-row-border);
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

tbody tr.shipment-row:hover > td {
  background: var(--table-cell-hover-bg);
}

tbody tr.client-table-row > td:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

tbody tr.client-table-row > td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

tbody tr.client-table-row:hover > td {
  background: linear-gradient(90deg, rgba(var(--admin-gold-rgb), 0.2), rgba(14, 28, 54, 0.96));
  color: var(--table-row-hover-text);
  border-bottom-color: var(--table-cell-hover-border);
}

tbody tr.client-table-row:hover > td:first-child {
  box-shadow: inset 3px 0 0 var(--table-row-hover-text);
}

.client-table-primary {
  color: var(--text);
  font-weight: 600;
}

.client-table-subtext {
  margin-top: 0.08rem;
  font-size: 0.73rem;
  color: var(--muted);
}

.client-table-notes {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-table-empty {
  text-align: center;
  color: var(--muted);
  padding: 0.9rem 0.55rem;
}

body.admin-theme-light .client-entry-panel {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(237, 246, 255, 0.92));
  border-color: rgba(var(--admin-sky-rgb), 0.28);
}

body.admin-theme-light .client-table-wrap {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.92));
  border-color: rgba(var(--admin-sky-rgb), 0.26);
}

body.admin-theme-light tbody tr.shipment-row > td {
  border-top-width: 2px;
  border-bottom-width: 2px;
  box-shadow: inset 0 0 0 1px var(--shipment-row-inner-border), inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

body.admin-theme-light tbody tr.shipment-row > td:first-child {
  border-left-width: 2px;
}

body.admin-theme-light tbody tr.shipment-row > td:last-child {
  border-right-width: 2px;
}

body.admin-theme-light tbody tr.client-table-row:hover > td {
  background: linear-gradient(95deg, rgba(var(--admin-sky-rgb), 0.22), rgba(var(--admin-gold-rgb), 0.2));
  color: var(--text-soft);
}
.table-tools { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.5rem; align-items: flex-end; }
.ticket-status-filter {
  display: grid;
  gap: 0.25rem;
  min-width: 220px;
}
.ticket-status-filter-label {
  font-size: 0.84rem;
  color: var(--gold-soft);
}
.ticket-status-filter-options {
  display: inline-flex;
  gap: 0.38rem;
  flex-wrap: wrap;
}
.ticket-status-filter-btn {
  min-height: 2.1rem;
  padding: 0.32rem 0.72rem;
  border-radius: 10px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.34);
  background: rgba(9, 17, 34, 0.74);
  color: var(--text-soft);
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.05);
}
.ticket-status-filter-btn:hover {
  border-color: rgba(var(--admin-gold-rgb), 0.58);
  color: var(--text);
}
.ticket-status-filter-btn.is-active,
.ticket-status-filter-btn[aria-pressed="true"] {
  transform: translateY(1px) scale(0.99);
  border-color: rgba(var(--admin-gold-rgb), 0.72);
  background: linear-gradient(130deg, rgba(var(--admin-gold-rgb), 0.32), rgba(15, 28, 53, 0.95));
  color: var(--gold-soft);
  box-shadow: inset 0 0 0 1px rgba(var(--admin-gold-rgb), 0.38);
}
.ticket-status-filter-btn.is-active:hover,
.ticket-status-filter-btn[aria-pressed="true"]:hover {
  transform: translateY(1px) scale(0.99);
  box-shadow: inset 0 0 0 1px rgba(var(--admin-gold-rgb), 0.38);
}
.shipment-filter-bar {
  position: relative;
  padding: 0.72rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.3);
  background:
    radial-gradient(circle at 12% 10%, rgba(var(--admin-gold-rgb), 0.18), transparent 45%),
    linear-gradient(135deg, rgba(8, 17, 34, 0.94), rgba(12, 26, 52, 0.82));
  box-shadow: inset 0 0 0 1px rgba(233, 239, 251, 0.04), 0 14px 28px rgba(var(--admin-shadow-rgb), 0.24);
}
.shipment-filter-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(var(--admin-gold-rgb), 0.14), transparent 42%, rgba(var(--admin-sky-rgb), 0.14));
  opacity: 0.64;
}
.shipment-filter-bar > * {
  position: relative;
  z-index: 1;
}
.shipment-filter-bar label {
  min-width: 148px;
  padding: 0.44rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.22);
  background: rgba(7, 14, 29, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.shipment-filter-bar label input,
.shipment-filter-bar label select {
  width: 100%;
  min-width: 0;
}
.shipment-filter-search {
  flex: 1 1 240px;
  min-width: 240px;
}
.shipment-search-mode-filter {
  min-width: 220px;
  display: grid;
  gap: 0.42rem;
  padding: 0.44rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.22);
  background: linear-gradient(160deg, rgba(7, 14, 29, 0.78), rgba(12, 20, 39, 0.58));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.shipment-search-mode-label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.shipment-search-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem;
  padding: 0.22rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(var(--admin-gold-rgb), 0.12);
}
.shipment-search-mode-btn {
  min-height: 2rem;
  padding: 0.28rem 0.78rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: none;
}
.shipment-search-mode-btn:hover {
  border-color: rgba(var(--admin-gold-rgb), 0.24);
  color: var(--text);
}
.shipment-search-mode-btn.is-active,
.shipment-search-mode-btn[aria-pressed="true"] {
  transform: translateY(1px) scale(0.99);
  border-color: rgba(var(--admin-gold-rgb), 0.56);
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.34), rgba(21, 37, 68, 0.92));
  color: var(--gold-soft);
  box-shadow: 0 8px 18px rgba(var(--admin-shadow-rgb), 0.2), inset 0 0 0 1px rgba(var(--admin-gold-rgb), 0.26);
}
.shipment-search-mode-btn.is-active:hover,
.shipment-search-mode-btn[aria-pressed="true"]:hover {
  transform: translateY(1px) scale(0.99);
}
.shipment-filter-toggle {
  min-width: 148px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}
.shipment-filter-toggle .toggle-switch {
  flex-shrink: 0;
}
.shipment-filter-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.34rem;
}
.shipment-date-mode-filter {
  min-width: 176px;
}
.shipment-date-control {
  min-width: 176px;
}
.shipment-date-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  min-width: 1.45rem;
  height: 1.45rem;
  min-height: 1.45rem;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(var(--admin-gold-rgb), 0.34);
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.24), rgba(16, 29, 56, 0.88));
  color: var(--gold-soft);
  font-size: 0.76rem;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(var(--admin-gold-rgb), 0.18);
}
.shipment-date-clear-btn:hover {
  border-color: rgba(var(--admin-gold-rgb), 0.58);
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.34), rgba(20, 37, 70, 0.96));
}
.shipment-date-clear-btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
  box-shadow: none;
}
body.admin-theme-light .shipment-filter-bar {
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  background:
    radial-gradient(circle at 16% 14%, rgba(var(--admin-sky-rgb), 0.12), transparent 44%),
    linear-gradient(140deg, rgba(241, 246, 255, 0.96), rgba(232, 240, 252, 0.88));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62), 0 10px 18px rgba(var(--admin-shadow-rgb), 0.1);
}
body.admin-theme-light .shipment-filter-bar::after {
  background: linear-gradient(118deg, rgba(var(--admin-gold-rgb), 0.12), transparent 42%, rgba(var(--admin-sky-rgb), 0.1));
  opacity: 0.7;
}
body.admin-theme-light .shipment-filter-bar label {
  border-color: rgba(var(--admin-sky-rgb), 0.25);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 1px 0 rgba(22, 61, 104, 0.05);
}
body.admin-theme-light .shipment-search-mode-filter {
  border-color: rgba(var(--admin-sky-rgb), 0.25);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(236, 243, 255, 0.74));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 0 rgba(22, 61, 104, 0.05);
}
body.admin-theme-light .shipment-search-mode-label {
  color: rgba(6, 27, 58, 0.6);
}
body.admin-theme-light .shipment-search-mode-options {
  background: rgba(225, 235, 252, 0.6);
  box-shadow: inset 0 0 0 1px rgba(var(--admin-sky-rgb), 0.14);
}
body.admin-theme-light .shipment-search-mode-btn {
  color: rgba(6, 27, 58, 0.78);
}
body.admin-theme-light .shipment-search-mode-btn:hover {
  border-color: rgba(var(--admin-sky-rgb), 0.22);
  color: rgba(6, 27, 58, 0.94);
}
body.admin-theme-light .shipment-search-mode-btn.is-active,
body.admin-theme-light .shipment-search-mode-btn[aria-pressed="true"] {
  border-color: rgba(var(--admin-sky-rgb), 0.5);
  background: linear-gradient(135deg, rgba(var(--admin-sky-rgb), 0.26), rgba(230, 238, 253, 0.98));
  color: rgba(6, 27, 58, 0.94);
  box-shadow: 0 8px 16px rgba(var(--admin-shadow-rgb), 0.08), inset 0 0 0 1px rgba(var(--admin-sky-rgb), 0.22);
}
body.admin-theme-light .shipment-date-clear-btn {
  border-color: rgba(var(--admin-sky-rgb), 0.34);
  background: linear-gradient(135deg, rgba(var(--admin-sky-rgb), 0.22), rgba(233, 241, 255, 0.95));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(var(--admin-sky-rgb), 0.16);
}
body.admin-theme-light .shipment-date-clear-btn:hover {
  border-color: rgba(var(--admin-sky-rgb), 0.5);
  background: linear-gradient(135deg, rgba(var(--admin-sky-rgb), 0.3), rgba(226, 236, 252, 0.98));
}
.route-catalog-window {
  gap: 0.7rem;
}
.route-view-head {
  align-items: center;
  margin-bottom: 0;
}
.route-view-head h2 {
  margin-bottom: 0.18rem;
}
.route-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem;
}
.route-volume-control {
  min-width: 138px;
}
.route-filter-toggle {
  min-width: 168px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}
.route-filter-toggle input[type="checkbox"] {
  width: auto;
  min-width: 1rem;
  accent-color: rgb(var(--admin-gold-rgb));
}
body.admin-theme-light .route-filter-toggle input[type="checkbox"] {
  accent-color: rgb(var(--admin-sky-rgb));
}
body.admin-theme-light .ticket-status-filter-label {
  color: rgba(6, 27, 58, 0.82);
}
body.admin-theme-light .ticket-status-filter-btn {
  border-color: rgba(var(--admin-sky-rgb), 0.3);
  background: rgba(255, 255, 255, 0.82);
  color: rgba(6, 27, 58, 0.8);
}
body.admin-theme-light .ticket-status-filter-btn.is-active,
body.admin-theme-light .ticket-status-filter-btn[aria-pressed="true"] {
  border-color: rgba(var(--admin-sky-rgb), 0.56);
  background: linear-gradient(130deg, rgba(var(--admin-sky-rgb), 0.24), rgba(225, 235, 252, 0.96));
  color: rgba(6, 27, 58, 0.94);
  box-shadow: inset 0 0 0 1px rgba(var(--admin-sky-rgb), 0.22);
}
.status-line {
  min-height: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s ease;
}
.status-line.status-success {
  color: var(--success);
  font-weight: 600;
}
.status-line.status-error {
  color: var(--danger);
}
.collab-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.42);
  border-radius: 10px;
  background: rgba(var(--admin-gold-rgb), 0.09);
  padding: 0.5rem 0.6rem;
  margin-top: 0.45rem;
}
.collab-status.hidden {
  display: none;
}
.collab-status.is-locked {
  border-color: rgba(241, 97, 97, 0.45);
  background: rgba(241, 97, 97, 0.09);
}
.collab-status-text {
  font-size: 0.82rem;
  color: var(--text);
}
.collab-takeover-btn {
  font-size: 0.74rem;
  padding: 0.35rem 0.55rem;
  min-height: 1.85rem;
}
.collab-takeover-btn.hidden {
  display: none;
}
.rate-confirmation-window.is-collab-locked .rate-confirmation-grid,
.shipment-scheduling-window.is-collab-locked .shipment-scheduling-grid {
  opacity: 0.8;
}
.error { color: var(--danger); }
.card-list { display: grid; gap: 0.5rem; }
.card { border: 1px solid var(--border); border-radius: 10px; padding: 0.68rem; background: rgba(10, 18, 35, 0.8); display: grid; gap: 0.2rem; }
.card h3 { margin: 0; font-size: 0.95rem; color: var(--text); }
.card .row { display: flex; flex-wrap: wrap; gap: 0.35rem; font-size: 0.82rem; color: var(--muted); }
.client-list-card { cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease; }
.client-list-card:hover { border-color: rgba(233, 187, 96, 0.68); transform: translateY(-1px); }
.client-list-card:active { transform: translateY(0); }
.route-card-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}
.route-list-card {
  cursor: pointer;
  gap: 0.45rem;
  border-color: rgba(var(--admin-gold-rgb), 0.28);
  background:
    radial-gradient(circle at 92% 12%, rgba(var(--admin-sky-rgb), 0.16), transparent 34%),
    linear-gradient(148deg, rgba(10, 21, 40, 0.94), rgba(8, 15, 31, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 12px 28px rgba(var(--admin-shadow-rgb), 0.16);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.route-list-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
}
.route-list-card-head h3 {
  font-size: 1rem;
}
.route-list-kicker {
  margin: 0 0 0.16rem;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.route-list-card .route-line {
  font-size: 0.9rem;
  color: var(--text);
}
.route-list-card .route-line span {
  color: var(--text);
  font-weight: 600;
}
.route-list-card .tiny {
  color: var(--text-soft);
}
.route-volume-pill {
  background: rgba(var(--admin-gold-rgb), 0.16);
  border-color: rgba(var(--admin-gold-rgb), 0.28);
  color: var(--gold-soft);
}
.route-list-card:hover { border-color: rgba(233, 187, 96, 0.68); transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 16px 34px rgba(var(--admin-shadow-rgb), 0.22); }
.route-list-card:active { transform: translateY(0); }
body.admin-theme-light .route-list-card {
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  background:
    radial-gradient(circle at 92% 12%, rgba(var(--admin-sky-rgb), 0.1), transparent 34%),
    linear-gradient(145deg, rgba(250, 252, 255, 0.98), rgba(238, 244, 252, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 12px 24px rgba(var(--admin-shadow-rgb), 0.1);
}
body.admin-theme-light .route-list-kicker {
  color: rgba(43, 82, 126, 0.82);
}
body.admin-theme-light .route-volume-pill {
  background: rgba(var(--admin-sky-rgb), 0.14);
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  color: rgba(28, 58, 93, 0.92);
}
.bid-amount-row { font-size: 0.9rem; color: var(--text); }
.bid-amount { color: var(--gold); font-size: 1.25rem; font-weight: 700; letter-spacing: 0.01em; }
.bid-variance-row { font-size: 0.78rem; color: var(--muted); }
.bid-variance-value { font-weight: 600; }
.bid-variance-up { color: var(--danger); }
.bid-variance-down { color: var(--success); }
.bid-variance-even { color: var(--gold-soft); }
.bids-live-notifications {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}
.bids-live-notice {
  border-radius: 12px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.26);
  background:
    radial-gradient(circle at 95% 16%, rgba(var(--admin-gold-rgb), 0.14), transparent 30%),
    linear-gradient(145deg, rgba(13, 24, 42, 0.95), rgba(9, 16, 31, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 10px 20px rgba(var(--admin-shadow-rgb), 0.12);
  padding: 0.62rem 0.76rem;
  color: var(--text);
  animation: bids-live-notice-in 180ms ease-out;
}
.bids-live-notice strong {
  display: block;
  font-size: 0.76rem;
  margin-bottom: 0.14rem;
  color: var(--gold-soft);
}
.bids-live-notice .tiny {
  margin: 0;
  color: var(--text-soft);
}
.bid-queue-summary {
  gap: 0.9rem;
  padding: 0.9rem;
  border-color: rgba(var(--admin-gold-rgb), 0.28);
  background:
    radial-gradient(circle at 95% 14%, rgba(var(--admin-gold-rgb), 0.15), transparent 30%),
    linear-gradient(145deg, rgba(11, 21, 39, 0.96), rgba(8, 16, 31, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 16px 30px rgba(var(--admin-shadow-rgb), 0.18);
}
.bid-queue-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.bid-queue-summary-head h3 {
  font-size: 1.02rem;
}
.bid-queue-summary-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.bid-queue-summary-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
}
.bid-queue-metric {
  display: grid;
  gap: 0.18rem;
  padding: 0.62rem 0.72rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.18);
  background: rgba(6, 12, 24, 0.56);
}
.bid-queue-metric-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.bid-queue-metric strong {
  font-size: 1rem;
  color: var(--text);
}
.bid-shipment-group-list {
  display: grid;
  gap: 0.75rem;
}
.bid-shipment-group.is-realtime-new .bid-shipment-panel {
  border-color: rgba(var(--admin-gold-rgb), 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(var(--admin-gold-rgb), 0.08),
    0 0 0 1px rgba(var(--admin-gold-rgb), 0.12),
    0 18px 36px rgba(var(--admin-shadow-rgb), 0.24);
  animation: bid-shipment-highlight 2.4s ease-out;
}
.bid-shipment-panel {
  border: 1px solid rgba(var(--admin-gold-rgb), 0.22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 8%, rgba(var(--admin-sky-rgb), 0.14), transparent 30%),
    linear-gradient(148deg, rgba(9, 18, 34, 0.95), rgba(8, 14, 28, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 14px 28px rgba(var(--admin-shadow-rgb), 0.14);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.bid-shipment-panel[open] {
  border-color: rgba(var(--admin-gold-rgb), 0.36);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 18px 34px rgba(var(--admin-shadow-rgb), 0.2);
}
.bid-shipment-summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.9fr);
  gap: 0.95rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  cursor: pointer;
  position: relative;
}
.bid-shipment-summary::-webkit-details-marker {
  display: none;
}
.bid-shipment-summary::after {
  content: "";
  position: absolute;
  top: 1.08rem;
  right: 1.1rem;
  width: 0.62rem;
  height: 0.62rem;
  border-right: 2px solid rgba(233, 187, 96, 0.88);
  border-bottom: 2px solid rgba(233, 187, 96, 0.88);
  transform: rotate(45deg);
  transition: transform 0.18s ease, top 0.18s ease;
}
.bid-shipment-panel[open] .bid-shipment-summary::after {
  top: 1.22rem;
  transform: rotate(-135deg);
}
.bid-shipment-summary-main {
  display: grid;
  gap: 0.34rem;
}
.bid-shipment-kicker {
  margin: 0;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.bid-shipment-summary-main h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
  padding-right: 1.5rem;
}
.bid-shipment-route {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.bid-shipment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}
.bid-shipment-rail {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0.42rem;
  padding-right: 1.5rem;
}
.bid-shipment-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.2);
  background: rgba(8, 14, 26, 0.62);
  color: var(--text-soft);
  font-size: 0.74rem;
  white-space: nowrap;
}
.bid-shipment-stat strong {
  color: var(--text);
  font-size: 0.8rem;
}
.bid-shipment-stat.is-pending {
  border-color: rgba(var(--admin-gold-rgb), 0.28);
  color: var(--gold-soft);
}
.bid-shipment-stat.is-ready {
  border-color: rgba(75, 170, 104, 0.32);
  color: #9ee3b1;
}
.bid-shipment-body {
  display: grid;
  gap: 0.78rem;
  padding: 0 1.1rem 1.05rem;
}
.bid-shipment-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.bid-shipment-facts strong {
  color: var(--text);
  font-weight: 600;
}
.bid-shipment-bids {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.7rem;
}
.bid-queue-card {
  gap: 0.48rem;
  min-height: 100%;
  border-radius: 14px;
  border-color: rgba(var(--admin-sky-rgb), 0.22);
  background:
    linear-gradient(155deg, rgba(12, 23, 41, 0.94), rgba(9, 16, 31, 0.9)),
    rgba(10, 18, 35, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.bid-queue-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.bid-queue-card-copy {
  display: grid;
  gap: 0.22rem;
}
.bid-queue-card-kicker {
  margin: 0;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.bid-queue-card-amount-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem;
}
.bid-queue-card-target {
  font-size: 0.79rem;
  color: var(--muted);
}
.bid-queue-card-status {
  display: grid;
  gap: 0.28rem;
  justify-items: end;
  text-align: right;
}
.bid-queue-note {
  color: var(--text-soft);
}
.bid-queue-actions {
  margin-top: 0.15rem;
  align-items: flex-end;
}
.bid-queue-actions label {
  min-width: 9.5rem;
}
body.admin-theme-light .bid-queue-summary {
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  background:
    radial-gradient(circle at 95% 14%, rgba(var(--admin-gold-rgb), 0.14), transparent 30%),
    linear-gradient(145deg, rgba(253, 251, 246, 0.98), rgba(241, 245, 251, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76), 0 16px 28px rgba(var(--admin-shadow-rgb), 0.1);
}
body.admin-theme-light .bid-queue-metric {
  border-color: rgba(var(--admin-sky-rgb), 0.18);
  background: rgba(255, 255, 255, 0.8);
}
body.admin-theme-light .menu-btn.has-live-bid-notice:not(.active) {
  border-color: rgba(var(--admin-gold-rgb), 0.32);
  box-shadow: 0 0 0 1px rgba(var(--admin-gold-rgb), 0.12), 0 14px 26px rgba(var(--admin-shadow-rgb), 0.14);
}
body.admin-theme-light .bids-live-notice {
  border-color: rgba(var(--admin-gold-rgb), 0.24);
  background:
    radial-gradient(circle at 95% 16%, rgba(var(--admin-gold-rgb), 0.14), transparent 30%),
    linear-gradient(145deg, rgba(255, 252, 246, 0.98), rgba(244, 248, 253, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76), 0 10px 18px rgba(var(--admin-shadow-rgb), 0.08);
}
body.admin-theme-light .bid-shipment-panel {
  border-color: rgba(var(--admin-sky-rgb), 0.22);
  background:
    radial-gradient(circle at 92% 8%, rgba(var(--admin-sky-rgb), 0.12), transparent 30%),
    linear-gradient(148deg, rgba(255, 255, 255, 0.98), rgba(240, 245, 252, 0.95));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.74), 0 14px 26px rgba(var(--admin-shadow-rgb), 0.08);
}
body.admin-theme-light .bid-shipment-panel[open] {
  border-color: rgba(var(--admin-gold-rgb), 0.28);
}
body.admin-theme-light .bid-shipment-stat {
  background: rgba(255, 255, 255, 0.84);
}
body.admin-theme-light .bid-shipment-stat.is-ready {
  color: #2e7c4a;
}
body.admin-theme-light .bid-queue-card {
  border-color: rgba(var(--admin-sky-rgb), 0.2);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.97), rgba(244, 248, 253, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76);
}
body.admin-theme-light .bid-shipment-group.is-realtime-new .bid-shipment-panel {
  border-color: rgba(var(--admin-gold-rgb), 0.3);
}
@media (max-width: 920px) {
  .bid-queue-summary-head,
  .bid-shipment-summary {
    grid-template-columns: 1fr;
    display: grid;
  }
  .bid-queue-summary-head {
    display: flex;
    flex-direction: column;
  }
  .bid-shipment-rail {
    justify-content: flex-start;
    padding-right: 1.5rem;
  }
}
@media (max-width: 640px) {
  .bid-shipment-summary,
  .bid-shipment-body {
    padding-left: 0.82rem;
    padding-right: 0.82rem;
  }
  .bid-queue-summary {
    padding: 0.82rem;
  }
  .bid-shipment-bids {
    grid-template-columns: 1fr;
  }
  .bid-queue-card-head {
    flex-direction: column;
  }
  .bid-queue-card-status {
    justify-items: start;
    text-align: left;
  }
}
@keyframes menu-live-bid-pulse {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(2px);
  }
}
@keyframes bids-live-notice-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes bid-shipment-highlight {
  0% {
    box-shadow:
      inset 0 0 0 1px rgba(var(--admin-gold-rgb), 0.16),
      0 0 0 1px rgba(var(--admin-gold-rgb), 0.24),
      0 24px 42px rgba(var(--admin-shadow-rgb), 0.28);
  }
  100% {
    box-shadow:
      inset 0 0 0 1px rgba(var(--admin-gold-rgb), 0.08),
      0 0 0 1px rgba(var(--admin-gold-rgb), 0.12),
      0 18px 36px rgba(var(--admin-shadow-rgb), 0.24);
  }
}
.loadboard-layout { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.loadboard-section-head { display: flex; justify-content: space-between; gap: 0.7rem; align-items: baseline; margin-bottom: 0.55rem; }
.loadboard-section-head h2 { margin: 0; font-size: 1rem; font-family: "Fraunces", serif; color: var(--gold-soft); letter-spacing: 0.01em; }
.loadboard-section-head p { margin: 0; }
.loadboard-list { display: grid; gap: 0.7rem; }
.loadboard-bucket summary { list-style: none; cursor: pointer; }
.loadboard-bucket summary::-webkit-details-marker { display: none; }
.loadboard-bucket summary { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; font-size: 0.84rem; font-weight: 600; color: var(--gold-soft); padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 10px; background: rgba(var(--admin-gold-rgb), 0.08); margin-bottom: 0.55rem; }
.loadboard-badge { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.2rem; padding: 0 0.42rem; border-radius: 999px; border: 1px solid var(--border); color: var(--gold-soft); font-size: 0.72rem; background: rgba(8, 14, 26, 0.65); }
.loadboard-card .route-line span { color: var(--text); }
.loadboard-card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.loadboard-card-head h3 { margin: 0; display: inline-flex; align-items: center; gap: 0.45rem; }
.loadboard-card .row span { color: var(--text); font-weight: 500; }
.loadboard-card .status-pill { text-transform: capitalize; }
.loadboard-history-card .tiny { margin-top: 0.2rem; }
.btnline { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.3rem; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 0.1rem 0.45rem; border: 1px solid var(--border); font-size: 0.72rem; background: rgba(var(--admin-sky-rgb),0.2); color: var(--gold-soft); }
.shipment-status-pill {
  --shipment-status-pill-bg: rgba(var(--admin-sky-rgb), 0.18);
  --shipment-status-pill-border: rgba(var(--admin-sky-rgb), 0.42);
  --shipment-status-pill-text: var(--gold-soft);
  justify-content: center;
  min-width: 7.75rem;
  padding: 0.18rem 0.62rem;
  border-color: var(--shipment-status-pill-border);
  background: var(--shipment-status-pill-bg);
  color: var(--shipment-status-pill-text);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}
.shipment-status-pill--available {
  --shipment-status-pill-bg: rgba(56, 197, 133, 0.18);
  --shipment-status-pill-border: rgba(56, 197, 133, 0.52);
  --shipment-status-pill-text: #7df1bc;
}
.shipment-status-pill--waiting-paperwork {
  --shipment-status-pill-bg: rgba(255, 210, 77, 0.18);
  --shipment-status-pill-border: rgba(255, 210, 77, 0.52);
  --shipment-status-pill-text: #ffe089;
}
.shipment-status-pill--planned {
  --shipment-status-pill-bg: rgba(255, 255, 255, 0.9);
  --shipment-status-pill-border: rgba(255, 255, 255, 0.72);
  --shipment-status-pill-text: #152543;
}
.shipment-status-pill--dispatched {
  --shipment-status-pill-bg: rgba(73, 142, 255, 0.22);
  --shipment-status-pill-border: rgba(73, 142, 255, 0.54);
  --shipment-status-pill-text: #bfd8ff;
}
.shipment-status-pill--loading {
  --shipment-status-pill-bg: rgba(255, 91, 214, 0.18);
  --shipment-status-pill-border: rgba(255, 91, 214, 0.54);
  --shipment-status-pill-text: #ff9de7;
}
.shipment-status-pill--in-transit {
  --shipment-status-pill-bg: rgba(166, 176, 191, 0.2);
  --shipment-status-pill-border: rgba(166, 176, 191, 0.48);
  --shipment-status-pill-text: #d1d9e5;
}
.shipment-status-pill--unloading {
  --shipment-status-pill-bg: rgba(121, 96, 255, 0.2);
  --shipment-status-pill-border: rgba(121, 96, 255, 0.5);
  --shipment-status-pill-text: #b9b0ff;
}
.shipment-status-pill--delivered {
  --shipment-status-pill-bg: rgba(187, 118, 255, 0.2);
  --shipment-status-pill-border: rgba(187, 118, 255, 0.52);
  --shipment-status-pill-text: #d9b6ff;
}
.shipment-status-pill--completed {
  --shipment-status-pill-bg: rgba(74, 214, 126, 0.18);
  --shipment-status-pill-border: rgba(74, 214, 126, 0.5);
  --shipment-status-pill-text: #9cf2bb;
}
.shipment-status-pill--hold {
  --shipment-status-pill-bg: rgba(255, 160, 76, 0.2);
  --shipment-status-pill-border: rgba(255, 160, 76, 0.5);
  --shipment-status-pill-text: #ffbe86;
}
.shipment-status-pill--cancelled {
  --shipment-status-pill-bg: rgba(255, 87, 87, 0.2);
  --shipment-status-pill-border: rgba(255, 87, 87, 0.54);
  --shipment-status-pill-text: #ffb1b1;
}
.shipment-status-pill--claim {
  --shipment-status-pill-bg: rgba(12, 14, 18, 0.92);
  --shipment-status-pill-border: rgba(78, 84, 96, 0.54);
  --shipment-status-pill-text: #f7f8fb;
}
.shipment-status-pill--tonu {
  --shipment-status-pill-bg: rgba(150, 97, 67, 0.2);
  --shipment-status-pill-border: rgba(150, 97, 67, 0.54);
  --shipment-status-pill-text: #d9b39d;
}
.shipment-status-pill--postponed {
  --shipment-status-pill-bg: rgba(255, 126, 176, 0.2);
  --shipment-status-pill-border: rgba(255, 126, 176, 0.52);
  --shipment-status-pill-text: #ffc0db;
}
.shipment-status-pill--other {
  --shipment-status-pill-bg: rgba(var(--admin-sky-rgb), 0.18);
  --shipment-status-pill-border: rgba(var(--admin-sky-rgb), 0.48);
  --shipment-status-pill-text: var(--gold-soft);
}

body.admin-theme-light .shipment-status-pill {
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.82);
}
.equipment-pill {
  --equipment-pill-text: var(--gold-soft);
  --equipment-pill-border: rgba(var(--admin-sky-rgb), 0.35);
  --equipment-pill-bg-start: rgba(41, 66, 112, 0.34);
  --equipment-pill-bg-end: rgba(10, 19, 36, 0.88);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.55rem;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--equipment-pill-border);
  background: linear-gradient(135deg, var(--equipment-pill-bg-start), var(--equipment-pill-bg-end));
  color: var(--equipment-pill-text);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.equipment-pill--reefer {
  --equipment-pill-text: #dff6ff;
  --equipment-pill-border: rgba(142, 224, 255, 0.58);
  --equipment-pill-bg-start: rgba(93, 194, 233, 0.34);
  --equipment-pill-bg-end: rgba(12, 42, 72, 0.9);
}
.equipment-pill--dry-van {
  --equipment-pill-text: #ffe5bc;
  --equipment-pill-border: rgba(255, 194, 117, 0.54);
  --equipment-pill-bg-start: rgba(191, 124, 46, 0.34);
  --equipment-pill-bg-end: rgba(58, 28, 8, 0.9);
}
.equipment-pill--flatbed {
  --equipment-pill-text: #ffd8cd;
  --equipment-pill-border: rgba(255, 145, 124, 0.56);
  --equipment-pill-bg-start: rgba(190, 86, 58, 0.34);
  --equipment-pill-bg-end: rgba(61, 16, 12, 0.9);
}
.equipment-pill--power-only {
  --equipment-pill-text: #dbe8ff;
  --equipment-pill-border: rgba(146, 176, 255, 0.54);
  --equipment-pill-bg-start: rgba(74, 110, 196, 0.34);
  --equipment-pill-bg-end: rgba(17, 28, 63, 0.9);
}
.equipment-pill--box-truck {
  --equipment-pill-text: #dbffe7;
  --equipment-pill-border: rgba(124, 225, 167, 0.54);
  --equipment-pill-bg-start: rgba(44, 153, 100, 0.34);
  --equipment-pill-bg-end: rgba(9, 44, 30, 0.9);
}
.equipment-pill--unknown {
  --equipment-pill-text: #e1e9f5;
  --equipment-pill-border: rgba(150, 170, 198, 0.38);
  --equipment-pill-bg-start: rgba(74, 92, 122, 0.28);
  --equipment-pill-bg-end: rgba(15, 24, 39, 0.88);
}
body.admin-theme-light .equipment-pill {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}
body.admin-theme-light .equipment-pill--reefer {
  --equipment-pill-text: #0f6482;
  --equipment-pill-border: rgba(111, 189, 224, 0.48);
  --equipment-pill-bg-start: rgba(217, 244, 255, 0.96);
  --equipment-pill-bg-end: rgba(238, 250, 255, 0.98);
}
body.admin-theme-light .equipment-pill--dry-van {
  --equipment-pill-text: #8a520d;
  --equipment-pill-border: rgba(226, 172, 98, 0.44);
  --equipment-pill-bg-start: rgba(255, 240, 210, 0.96);
  --equipment-pill-bg-end: rgba(255, 249, 237, 0.98);
}
body.admin-theme-light .equipment-pill--flatbed {
  --equipment-pill-text: #9a4430;
  --equipment-pill-border: rgba(225, 134, 112, 0.42);
  --equipment-pill-bg-start: rgba(255, 228, 221, 0.96);
  --equipment-pill-bg-end: rgba(255, 243, 239, 0.98);
}
body.admin-theme-light .equipment-pill--power-only {
  --equipment-pill-text: #284b96;
  --equipment-pill-border: rgba(124, 155, 231, 0.42);
  --equipment-pill-bg-start: rgba(230, 237, 255, 0.96);
  --equipment-pill-bg-end: rgba(244, 247, 255, 0.98);
}
body.admin-theme-light .equipment-pill--box-truck {
  --equipment-pill-text: #16744b;
  --equipment-pill-border: rgba(98, 194, 142, 0.4);
  --equipment-pill-bg-start: rgba(227, 250, 236, 0.96);
  --equipment-pill-bg-end: rgba(241, 253, 246, 0.98);
}
body.admin-theme-light .equipment-pill--unknown {
  --equipment-pill-text: #47617e;
  --equipment-pill-border: rgba(142, 161, 188, 0.38);
  --equipment-pill-bg-start: rgba(236, 241, 248, 0.95);
  --equipment-pill-bg-end: rgba(246, 249, 253, 0.98);
}
.timeline { display: grid; gap: 0.45rem; }
.timeline-item { border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 8px; background: rgba(9, 16, 32, 0.82); padding: 0.45rem 0.55rem; }
.tiny { font-size: 0.74rem; color: var(--muted); }
.two-factor-qr {
  display: block;
  width: 220px;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(var(--admin-sky-rgb),0.35);
  background: rgba(7, 14, 28, 0.7);
  padding: 0.35rem;
  margin: 0.2rem auto 0.35rem;
}
.expense-chart { width: 100%; height: auto; display: block; margin-top: 0.5rem; }
.chart-line-history,
.chart-line-future {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-line-history { stroke: var(--chart-line-history); }
.chart-line-future { stroke: var(--gold); }
.chart-label { fill: var(--chart-label); font-size: 11px; }

.password-reset-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: rgba(5, 10, 20, 0.82);
  backdrop-filter: blur(7px);
  padding: 1rem;
}

.password-reset-window {
  width: min(460px, 100%);
  border-color: rgba(var(--admin-gold-rgb), 0.55);
  box-shadow: 0 28px 56px rgba(var(--admin-shadow-rgb), 0.58);
}

body.admin-theme-light .password-reset-overlay {
  background: rgba(31, 50, 80, 0.2);
  backdrop-filter: blur(7px) saturate(1.08);
}

body.admin-theme-light .password-reset-window {
  border-color: rgba(var(--admin-sky-rgb), 0.34);
  box-shadow: 0 30px 60px rgba(19, 45, 81, 0.2);
}

@media (max-width: 960px) {
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { grid-template-rows: auto auto auto; }
  .sidebar-nav { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .menu-group { grid-column: 1 / -1; }
  .submenu {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    padding-left: 0;
    margin-left: 0;
    border-left: none;
  }
  .menu-btn,
  .menu-group-toggle { text-align: left; }
  .loadboard-app { grid-template-columns: 1fr; }
  .loadboard-sidebar { border-right: none; border-bottom: 1px solid var(--border); }
  .loadboard-view-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-stop-row { grid-template-columns: 1fr; }
  .timeoff-layout {
    grid-template-columns: 1fr;
  }
  .timeoff-calendar-scroll {
    max-height: none;
    overflow: visible;
  }
  .timeoff-calendar-month {
    padding: 0.72rem 0.74rem 0.8rem;
  }
  .timeoff-legend-item {
    flex: 1 1 12rem;
  }
  .timeoff-day-count,
  .timeoff-day-segment-meta {
    display: none;
  }
  .timeoff-day-segment {
    grid-template-columns: auto 1fr;
  }
  .planner-form .grid-form,
  .planner-route-basic-fields,
  .shipment-scheduling-grid,
  .shipment-tracktrace-grid,
  .shipment-dispatch-grid,
  .planner-direct-sell-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shipment-filter-bar label,
  .shipment-search-mode-filter,
  .shipment-filter-search,
  .shipment-date-control {
    flex: 1 1 190px;
    min-width: 190px;
  }
  .shipment-date-clear-btn {
    width: 100%;
  }
  .planner-actions {
    grid-template-columns: 1fr;
  }
  .planner-loadboard-action {
    display: grid;
    gap: 0.25rem;
  }
  .planner-loadboard-action select {
    width: 100%;
    min-width: 0;
  }
  #clients-view {
    grid-template-columns: 1fr;
  }
  .client-view-head-actions {
    width: 100%;
  }
  .client-view-head-actions .inline-search {
    flex: 1 1 240px;
  }
  .client-view-head-actions .inline-search input {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 820px) {
  .shipment-history-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .shipment-filter-bar {
    padding: 0.6rem;
  }
  .shipment-filter-bar label,
  .shipment-search-mode-filter,
  .shipment-filter-search,
  .shipment-date-control {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .planner-form .grid-form,
  .shipment-scheduling-grid,
  .shipment-tracktrace-grid,
  .shipment-dispatch-grid,
  .planner-direct-sell-fields {
    grid-template-columns: 1fr;
  }
  .shipper-location-row {
    grid-template-columns: 1fr;
  }
  .client-table {
    min-width: 660px;
  }
}

.ghost-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(var(--admin-sky-rgb),0.35);
  border-radius: 9px;
  padding: 0.44rem 0.56rem;
  color: var(--text);
  text-decoration: none;
  background: rgba(10, 18, 36, 0.86);
}

.ghost-link:hover {
  border-color: rgba(var(--admin-gold-rgb),0.55);
  background: linear-gradient(120deg, rgba(var(--admin-gold-rgb),0.18), rgba(var(--admin-gold-rgb),0.08));
}

.rate-confirmation-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(var(--admin-sky-rgb),0.35);
  border-radius: 9px;
  padding: 0.44rem 0.56rem;
  min-height: 1.95rem;
  font-size: 0.8rem;
  line-height: 1;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(120deg, rgba(var(--admin-gold-rgb),0.16), rgba(var(--admin-gold-rgb),0.06));
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.rate-confirmation-action:hover {
  border-color: rgba(var(--admin-gold-rgb),0.55);
  background: linear-gradient(120deg, rgba(var(--admin-gold-rgb),0.18), rgba(var(--admin-gold-rgb),0.08));
  transform: translateY(-0.5px);
}

.rate-confirmation-action:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.rate-confirmation-action + .rate-confirmation-action {
  margin-left: 0.35rem;
}

.partnership-page {
  width: min(840px, 100%);
  display: grid;
  gap: 1rem;
}
.loadboard-app .topbar {
  border-radius: 16px 16px 0 0;
}
.loadboard-dashboard-grid {
  margin-bottom: 0.55rem;
}
.loadboard-kpi {
  background: linear-gradient(160deg, rgba(var(--admin-gold-rgb), 0.16), rgba(15, 26, 54, 0.94));
}
.loadboard-kpi h3 {
  margin: 0.2rem 0 0;
  font-size: 2rem;
  line-height: 1;
  color: var(--gold);
  font-family: "Fraunces", serif;
}
.loadboard-kpi .tiny {
  margin: 0;
  min-height: unset;
}
.loadboard-section-head {
  align-items: flex-start;
}
.loadboard-section-head p {
  margin: 0;
  color: var(--muted);
  text-align: right;
}
.loadboard-filter-grid {
  display: grid;
  gap: 0.52rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 0.75rem;
  align-items: end;
}
.loadboard-filter-grid label {
  margin: 0;
}
.loadboard-filter-actions {
  display: flex;
  gap: 0.48rem;
  align-items: end;
}
.loadboard-section-head div {
  display: grid;
  gap: 0.12rem;
}
.loadboard-layout {
  margin-bottom: 0.8rem;
}
.loadboard-layout .window {
  animation: loadboard-panel-in 0.5s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.loadboard-layout .window:nth-child(1) { animation-delay: 0.05s; }
.loadboard-layout .window:nth-child(2) { animation-delay: 0.12s; }
.loadboard-dashboard-grid .window {
  animation: loadboard-panel-in 0.5s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.loadboard-dashboard-grid .window:nth-child(1) { animation-delay: 0.02s; }
.loadboard-dashboard-grid .window:nth-child(2) { animation-delay: 0.06s; }
.loadboard-dashboard-grid .window:nth-child(3) { animation-delay: 0.1s; }
.loadboard-dashboard-grid .window:nth-child(4) { animation-delay: 0.14s; }
.pill-success {
  border-color: rgba(93, 255, 170, 0.5);
  color: var(--success);
  background: rgba(93, 255, 170, 0.14);
}
.pill-warn {
  border-color: rgba(var(--admin-gold-rgb), 0.5);
  color: var(--gold-soft);
  background: rgba(var(--admin-gold-rgb), 0.15);
}
.pill-muted {
  border-color: rgba(147, 173, 213, 0.35);
  color: var(--muted);
  background: rgba(147, 173, 213, 0.12);
}
@keyframes loadboard-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes loadboard-skeleton-wave {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--panel-overlay);
  backdrop-filter: blur(7px) saturate(1.04);
  pointer-events: auto;
}

#shipment-history-modal {
  --shipment-history-panel-gap: 0.82rem;
  --shipment-history-side-width: clamp(240px, 18vw, 298px);
  --shipment-history-main-width: min(960px, calc(100vw - (2 * var(--shipment-history-side-width)) - (2 * var(--shipment-history-panel-gap)) - 2rem));
  --shipment-history-side-height: min(88vh, calc(100vh - 2.4rem));
  --shipment-history-panel-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

#shipment-history-modal.panel-split-left {
  z-index: 100000;
}

#rate-confirmation-modal.panel-split-right {
  z-index: 100001;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

#shipment-scheduling-modal.panel-split-right {
  z-index: 100001;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

#shipment-tracktrace-modal.panel-split-right {
  z-index: 100001;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

#shipment-dispatch-modal.panel-split-right {
  z-index: 100001;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

#rate-confirmation-modal.panel-split-right .panel-window {
  pointer-events: auto;
}

#shipment-scheduling-modal.panel-split-right .panel-window {
  pointer-events: auto;
}

#shipment-tracktrace-modal.panel-split-right .panel-window {
  pointer-events: auto;
}

#shipment-dispatch-modal.panel-split-right .panel-window {
  pointer-events: auto;
}

.panel-window {
  width: min(980px, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  position: fixed;
  top: 50%;
  left: 50%;
  height: min(92vh, calc(100vh - 1.5rem));
  margin: 0;
  border: 1px solid var(--panel-glass-border);
  border-radius: 14px;
  background: var(--panel-glass);
  padding: 1rem;
  box-shadow: var(--admin-shadow-elevated);
  max-height: min(92vh, 900px);
  overflow: auto;
  display: grid;
  gap: 0.65rem;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  will-change: left, top, width, height, transform, opacity;
  transition:
    left var(--rate-confirmation-split-duration) var(--shipment-history-panel-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    top var(--rate-confirmation-split-duration) var(--shipment-history-panel-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    width var(--rate-confirmation-split-duration) var(--shipment-history-panel-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    height var(--rate-confirmation-split-duration) var(--shipment-history-panel-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    max-height var(--rate-confirmation-split-duration) var(--shipment-history-panel-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    transform var(--rate-confirmation-split-duration) var(--shipment-history-panel-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    opacity calc(var(--rate-confirmation-split-duration) * 0.9) ease,
    filter calc(var(--rate-confirmation-split-duration) * 0.9) ease,
    box-shadow var(--rate-confirmation-split-duration) var(--shipment-history-panel-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-bottom: 0.38rem;
  border-bottom: 1px solid var(--panel-glass-border);
}

.panel-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-family: "Fraunces", serif;
}

.shipment-history-header {
  display: grid;
  align-items: center;
  gap: 0.72rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.shipment-history-title-block {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.shipment-history-nav-index {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.shipment-history-nav {
  display: inline-flex;
  gap: 0.38rem;
  justify-self: end;
  align-items: center;
  padding: 0.12rem;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.24);
  border-radius: 999px;
  background: rgba(7, 17, 35, 0.55);
}

.shipment-history-nav-btn {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.2);
  background: linear-gradient(140deg, rgba(var(--admin-gold-rgb), 0.18), rgba(10, 18, 35, 0.75));
  color: var(--text);
  display: inline-grid;
  place-items: center;
  text-align: center;
  text-indent: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.shipment-history-nav-btn:hover:not(:disabled) {
  border-color: rgba(var(--admin-gold-rgb), 0.75);
  background: linear-gradient(140deg, rgba(var(--admin-gold-rgb), 0.42), rgba(11, 20, 40, 0.86));
  transform: translateY(-1px);
}

.shipment-history-nav-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.shipment-history-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#shipment-history-title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#shipment-history-nav-index {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-close {
  justify-self: end;
  border: 1px solid rgba(var(--admin-white-rgb), 0.2);
  border-radius: 999px;
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 17, 35, 0.72);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.panel-close:hover {
  border-color: rgba(var(--admin-white-rgb), 0.55);
  color: var(--panel-close-hover);
}

.panel-close:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

body.admin-theme-light .panel-overlay {
  background: rgba(31, 50, 80, 0.2);
  backdrop-filter: blur(7px) saturate(1.08);
}

body.admin-theme-light .panel-window {
  border-color: rgba(var(--admin-sky-rgb), 0.22);
  box-shadow: 0 32px 58px rgba(19, 43, 77, 0.22);
}

body.admin-theme-light .client-profile-pane-btn {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  color: #1d3758;
}

body.admin-theme-light .client-profile-pane-btn.is-active {
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.18), rgba(var(--admin-sky-rgb), 0.14));
  border-color: rgba(var(--admin-sky-rgb), 0.34);
}

body.admin-theme-light .client-profile-documents-panel {
  background: linear-gradient(145deg, rgba(255, 248, 238, 0.96), rgba(245, 250, 255, 0.96));
}

body.admin-theme-light .carrier-document-upload {
  background:
    radial-gradient(circle at top right, rgba(var(--admin-gold-rgb), 0.12), transparent 56%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.96));
  border-color: rgba(var(--admin-sky-rgb), 0.28);
}

body.admin-theme-light .carrier-document-upload.is-dragover,
body.admin-theme-light .carrier-document-upload.is-uploading {
  border-color: rgba(var(--admin-sky-rgb), 0.44);
  box-shadow: 0 16px 30px rgba(26, 68, 112, 0.14);
}

body.admin-theme-light .carrier-document-upload-action {
  background: rgba(var(--admin-sky-rgb), 0.08);
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  color: #18365a;
}

body.admin-theme-light .panel-close {
  border-color: rgba(var(--admin-sky-rgb), 0.3);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(238, 246, 255, 0.92));
  color: var(--text-soft);
}

body.admin-theme-light .panel-close:hover {
  border-color: rgba(var(--admin-sky-rgb), 0.52);
  color: var(--text);
}

body.admin-theme-light .shipment-history-nav {
  border-color: rgba(var(--admin-sky-rgb), 0.3);
  background: rgba(243, 249, 255, 0.88);
}

body.admin-theme-light .shipment-history-nav-btn {
  border-color: rgba(var(--admin-sky-rgb), 0.28);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(235, 243, 255, 0.9));
}

body.admin-theme-light .shipment-history-nav-btn:hover:not(:disabled) {
  border-color: rgba(var(--admin-sky-rgb), 0.52);
  background: linear-gradient(140deg, rgba(var(--admin-gold-rgb), 0.2), rgba(238, 246, 255, 0.95));
}

#shipment-history-modal.panel-split-left #shipment-history-window,
#rate-confirmation-modal.panel-split-right .panel-window {
  top: var(--rate-panel-gutter);
  height: calc(100vh - calc(2 * var(--rate-panel-gutter)));
  max-height: calc(100vh - calc(2 * var(--rate-panel-gutter)));
  transform: translateY(0);
  width: calc(50vw - var(--rate-panel-gutter));
}

#shipment-scheduling-modal.panel-split-right .panel-window {
  top: var(--rate-panel-gutter);
  height: calc(100vh - calc(2 * var(--rate-panel-gutter)));
  max-height: calc(100vh - calc(2 * var(--rate-panel-gutter)));
  transform: translateY(0);
  width: calc(50vw - var(--rate-panel-gutter));
}

#shipment-tracktrace-modal.panel-split-right .panel-window {
  top: var(--rate-panel-gutter);
  height: calc(100vh - calc(2 * var(--rate-panel-gutter)));
  max-height: calc(100vh - calc(2 * var(--rate-panel-gutter)));
  transform: translateY(0);
  width: calc(50vw - var(--rate-panel-gutter));
}

#shipment-dispatch-modal.panel-split-right .panel-window {
  top: var(--rate-panel-gutter);
  height: calc(100vh - calc(2 * var(--rate-panel-gutter)));
  max-height: calc(100vh - calc(2 * var(--rate-panel-gutter)));
  transform: translateY(0);
  width: calc(50vw - var(--rate-panel-gutter));
}

#client-profile-modal.client-profile-split {
  --client-profile-panel-width: min(48vw, 720px);
  --client-profile-panel-height: min(88vh, 840px);
}

#client-profile-modal.client-profile-split #client-profile-window-left,
#client-profile-modal.client-profile-split #client-profile-window-right {
  width: var(--client-profile-panel-width);
  top: 50%;
  height: var(--client-profile-panel-height);
  max-height: var(--client-profile-panel-height);
  transform: translateY(-50%);
}

#shipment-history-modal.panel-split-left #shipment-history-window {
  left: var(--rate-panel-gutter);
}

#rate-confirmation-modal.panel-split-right .panel-window {
  left: calc(50vw + var(--rate-panel-gutter));
}

#shipment-scheduling-modal.panel-split-right .panel-window {
  left: calc(50vw + var(--rate-panel-gutter));
}

#shipment-tracktrace-modal.panel-split-right .panel-window {
  left: calc(50vw + var(--rate-panel-gutter));
}

#shipment-dispatch-modal.panel-split-right .panel-window {
  left: calc(50vw + var(--rate-panel-gutter));
}

#shipment-history-modal.panel-split-left #shipment-history-activity-window {
  opacity: 0;
  pointer-events: none;
  transform: translate(calc(-50% - 1rem), -50%) scale(0.982);
  filter: blur(6px);
}

#shipment-history-modal.panel-split-left #shipment-history-comments-window {
  opacity: 0;
  pointer-events: none;
  transform: translate(calc(-50% + 1rem), -50%) scale(0.982);
  filter: blur(6px);
}

#shipment-history-modal.panel-split-left .shipment-history-layout {
  grid-template-columns: 1fr;
}

#shipment-history-modal.panel-split-left .shipment-history-summary-grid,
#shipment-history-modal.panel-split-left .shipment-history-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#client-profile-modal.client-profile-split #client-profile-window-left {
  left: calc(50vw - var(--client-profile-panel-width) - (var(--rate-panel-gutter) / 2));
}

#client-profile-modal.client-profile-split #client-profile-window-right {
  left: calc(50vw + (var(--rate-panel-gutter) / 2));
}

#rate-confirmation-modal.panel-split-right.rate-confirmation-collapsing .panel-window {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.985);
}

#shipment-scheduling-modal.panel-split-right.shipment-scheduling-collapsing .panel-window {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.985);
}

#shipment-tracktrace-modal.panel-split-right.shipment-tracktrace-collapsing .panel-window {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.985);
}

#shipment-dispatch-modal.panel-split-right.shipment-dispatch-collapsing .panel-window {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.985);
}

.panel-window h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  color: var(--gold-soft);
  font-size: 1.12rem;
}

.panel-summary {
  margin: 0.2rem 0 0.35rem;
  border: 1px dashed rgba(var(--admin-gold-rgb), 0.2);
  border-radius: 10px;
  padding: 0.55rem 0.62rem;
  background: linear-gradient(155deg, rgba(var(--admin-gold-rgb), 0.08), rgba(12, 18, 34, 0.7));
}

.shipment-history-summary {
  border-color: rgba(var(--admin-gold-rgb), 0.3);
  background: linear-gradient(155deg, rgba(var(--admin-gold-rgb), 0.12), rgba(12, 18, 34, 0.62));
  padding: 0.62rem 0.7rem 0.68rem;
}

.shipment-history-summary .panel-summary-grid {
  gap: 0.45rem;
}

.shipment-history-summary .panel-summary-item {
  border-color: rgba(var(--admin-gold-rgb), 0.22);
  background: linear-gradient(155deg, rgba(var(--admin-gold-rgb), 0.14), rgba(7, 15, 34, 0.76));
}

.shipment-history-summary .panel-summary-item-kpi .panel-summary-item-value {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.96rem;
}

.shipment-history-summary .panel-summary-item-kpi {
  border-color: rgba(var(--admin-gold-rgb), 0.55);
  box-shadow: inset 0 0 0 1px rgba(var(--admin-gold-rgb), 0.22);
  background: linear-gradient(145deg, rgba(var(--admin-gold-rgb), 0.23), rgba(7, 15, 34, 0.8));
}

.panel-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 0.55rem;
}

.panel-summary-item {
  border: 1px solid rgba(var(--admin-sky-rgb), 0.3);
  background: linear-gradient(145deg, rgba(var(--admin-gold-rgb), 0.1), rgba(9, 16, 32, 0.82));
  border-radius: 12px;
  padding: 0.52rem 0.64rem;
  min-width: 0;
}

.panel-summary-item-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-summary-item-value {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.panel-summary-item-status .panel-summary-item-value {
  color: inherit;
  display: flex;
  align-items: flex-start;
}

body.admin-theme-light .panel-summary {
  border-style: solid;
  border-color: rgba(var(--admin-sky-rgb), 0.22);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(240, 248, 255, 0.9));
}

body.admin-theme-light .shipment-history-summary {
  border-color: rgba(var(--admin-sky-rgb), 0.3);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(236, 246, 255, 0.92));
}

body.admin-theme-light .panel-summary-item {
  border-color: rgba(var(--admin-sky-rgb), 0.26);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(240, 247, 255, 0.9));
}

body.admin-theme-light .shipment-history-summary .panel-summary-item {
  border-color: rgba(var(--admin-sky-rgb), 0.32);
}

body.admin-theme-light .shipment-history-summary .panel-summary-item-kpi {
  border-color: rgba(var(--admin-gold-rgb), 0.58);
  box-shadow: inset 0 0 0 1px rgba(var(--admin-gold-rgb), 0.22);
  background: linear-gradient(145deg, rgba(var(--admin-gold-rgb), 0.2), rgba(255, 255, 255, 0.9));
}

.rate-confirmation-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.shipment-scheduling-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shipment-tracktrace-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shipment-dispatch-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rate-confirmation-pdf-viewer {
  display: grid;
  gap: 0.6rem;
  min-height: 0;
  height: 100%;
}

.rate-confirmation-pdf-viewer iframe {
  width: 100%;
  height: min(65vh, 620px);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--pdf-bg);
  box-shadow: inset 0 0 0 1px rgba(var(--admin-white-rgb), 0.02);
}

.rate-confirmation-window {
  width: min(920px, 100%);
  padding-bottom: calc(1rem + var(--floating-chat-clearance));
  scroll-padding-bottom: var(--floating-chat-clearance);
}

.rate-confirmation-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 0.85rem;
  margin-top: 0.95rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(var(--admin-sky-rgb), 0.24);
  align-items: end;
}

.rate-confirmation-mail-strip,
.rate-confirmation-footer-actions {
  min-width: 0;
}

.rate-confirmation-mail-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: end;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.26);
  border-radius: 14px;
  background:
    linear-gradient(160deg, rgba(10, 18, 36, 0.9), rgba(12, 24, 48, 0.86)),
    radial-gradient(circle at top left, rgba(var(--admin-gold-rgb), 0.12), transparent 58%);
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.04);
}

.rate-confirmation-mail-field,
.rate-confirmation-auto-send-toggle {
  position: relative;
}

.rate-confirmation-mail-field {
  display: grid;
  gap: 0.26rem;
  min-width: 0;
}

.rate-confirmation-mail-field > input {
  width: 100%;
  min-width: 0;
}

#rate-confirmation-send-email {
  min-width: 132px;
  align-self: stretch;
}

.rate-confirmation-footer-actions {
  display: grid;
  gap: 0.72rem;
  justify-items: end;
}

.rate-confirmation-footer .rate-confirmation-buttons {
  margin-top: 0;
  justify-content: flex-end;
}

.rate-confirmation-auto-send-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.58rem 0.8rem;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.28);
  border-radius: 999px;
  background: rgba(var(--admin-gold-rgb), 0.08);
  color: var(--gold-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.rate-confirmation-auto-send-toggle > input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

@media (max-width: 900px) {
  .rate-confirmation-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .rate-confirmation-mail-strip {
    grid-template-columns: 1fr;
  }

  #rate-confirmation-send-email {
    width: 100%;
    align-self: auto;
  }

  .rate-confirmation-footer-actions {
    justify-items: stretch;
  }

  .rate-confirmation-footer .rate-confirmation-buttons {
    justify-content: flex-start;
  }
}

.shipment-scheduling-window {
  width: min(1080px, 100%);
}

.shipment-scheduling-grid .planner-field-span-2,
.shipment-scheduling-grid .planner-field-span-4,
.shipment-scheduling-grid .planner-section,
.shipment-scheduling-grid .shipment-scheduling-file-field,
.shipment-scheduling-grid .shipment-scheduling-loadboard-field {
  grid-column: 1 / -1;
}

.shipment-scheduling-grid .planner-section .grid-form {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.shipment-scheduling-file-field input[type="file"] {
  width: 100%;
}

.shipment-tracktrace-window {
  width: min(920px, 100%);
}

.shipment-tracktrace-lead {
  margin: -0.08rem 0 0.12rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.shipment-dispatch-window {
  width: min(900px, 100%);
}

.shipment-dispatch-carrier-card {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.shipment-dispatch-carrier-card-inner,
.shipment-dispatch-section {
  border: 1px solid rgba(var(--admin-sky-rgb), 0.26);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(10, 18, 36, 0.92), rgba(13, 24, 47, 0.88));
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.04);
}

.shipment-dispatch-carrier-card-inner {
  display: grid;
  gap: 0.3rem;
  padding: 0.82rem 0.9rem;
}

.shipment-dispatch-carrier-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--admin-gold-rgb), 0.78);
}

.shipment-dispatch-carrier-title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.02rem;
  color: var(--gold-soft);
}

.shipment-dispatch-section {
  display: grid;
  gap: 0.62rem;
  padding: 0.85rem 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shipment-dispatch-section-span-2,
.shipment-dispatch-span-2,
.shipment-dispatch-suggestions {
  grid-column: 1 / -1;
}

.shipment-dispatch-section-head {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.2rem;
}

.shipment-dispatch-section-head h3 {
  margin: 0;
  font-size: 0.94rem;
  color: var(--gold-soft);
  font-family: "Fraunces", serif;
}

.shipment-dispatch-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.shipment-dispatch-suggestions {
  display: grid;
  gap: 0.45rem;
  max-height: min(26vh, 240px);
  overflow: auto;
}

.shipment-dispatch-suggestion {
  width: 100%;
  text-align: left;
  padding: 0.68rem 0.78rem;
  display: grid;
  gap: 0.18rem;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.28);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(9, 18, 36, 0.92), rgba(13, 25, 49, 0.88));
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.04);
}

.shipment-dispatch-suggestion strong {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.shipment-dispatch-suggestion span {
  color: var(--muted);
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.shipment-dispatch-suggestion:hover,
.shipment-dispatch-suggestion:focus-visible {
  border-color: rgba(var(--admin-gold-rgb), 0.5);
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.16), rgba(13, 25, 49, 0.92));
}

.shipment-dispatch-carrier-card-empty .shipment-dispatch-carrier-card-inner {
  border-style: dashed;
}

.rate-confirmation-grid label span,
.rate-confirmation-mail-field span,
.rate-confirmation-auto-send-toggle span { color: var(--gold-soft); }

.rate-confirmation-grid label.is-rate-confirmation-field-editing,
.rate-confirmation-mail-field.is-rate-confirmation-field-editing,
.rate-confirmation-auto-send-toggle.is-rate-confirmation-field-editing {
  position: relative;
  border: 1px solid rgba(233, 187, 96, 0.7);
  border-radius: 8px;
  padding: 0.18rem 0.25rem;
  background: rgba(233, 187, 96, 0.06);
}

.rate-confirmation-grid label.is-rate-confirmation-field-editing > input,
.rate-confirmation-grid label.is-rate-confirmation-field-editing > select,
.rate-confirmation-grid label.is-rate-confirmation-field-editing > textarea,
.rate-confirmation-mail-field.is-rate-confirmation-field-editing > input,
.rate-confirmation-auto-send-toggle.is-rate-confirmation-field-editing > input {
  border-color: rgba(233, 187, 96, 0.9);
  box-shadow: 0 0 0 1px rgba(233, 187, 96, 0.25);
}

.rate-confirmation-grid label.is-rate-confirmation-field-editing::after,
.rate-confirmation-mail-field.is-rate-confirmation-field-editing::after,
.rate-confirmation-auto-send-toggle.is-rate-confirmation-field-editing::after {
  content: attr(data-rate-con-editor);
  position: absolute;
  right: 0.4rem;
  top: -0.58rem;
  font-size: 0.64rem;
  line-height: 1;
  color: var(--gold-soft);
  background: rgba(10, 18, 35, 0.95);
  border: 1px solid rgba(233, 187, 96, 0.7);
  border-radius: 999px;
  padding: 0.12rem 0.35rem;
  white-space: nowrap;
  pointer-events: none;
}

.shipment-scheduling-grid label.is-shipment-scheduling-field-editing,
.shipment-tracktrace-grid label.is-shipment-tracktrace-field-editing,
.shipment-history-grid label.is-shipment-history-field-editing {
  position: relative;
  border: 1px solid rgba(118, 182, 255, 0.72);
  border-radius: 8px;
  padding: 0.18rem 0.25rem;
  background: rgba(118, 182, 255, 0.08);
}

.shipment-scheduling-grid label.is-shipment-scheduling-field-editing > input,
.shipment-scheduling-grid label.is-shipment-scheduling-field-editing > select,
.shipment-scheduling-grid label.is-shipment-scheduling-field-editing > textarea,
.shipment-tracktrace-grid label.is-shipment-tracktrace-field-editing > input,
.shipment-tracktrace-grid label.is-shipment-tracktrace-field-editing > select,
.shipment-tracktrace-grid label.is-shipment-tracktrace-field-editing > textarea,
.shipment-history-grid label.is-shipment-history-field-editing > input,
.shipment-history-grid label.is-shipment-history-field-editing > select,
.shipment-history-grid label.is-shipment-history-field-editing > textarea {
  border-color: rgba(118, 182, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(118, 182, 255, 0.28);
}

.shipment-scheduling-grid label.is-shipment-scheduling-field-editing::after,
.shipment-tracktrace-grid label.is-shipment-tracktrace-field-editing::after,
.shipment-history-grid label.is-shipment-history-field-editing::after {
  position: absolute;
  right: 0.4rem;
  top: -0.58rem;
  font-size: 0.64rem;
  line-height: 1;
  color: #d9ecff;
  background: rgba(7, 17, 35, 0.96);
  border: 1px solid rgba(118, 182, 255, 0.7);
  border-radius: 999px;
  padding: 0.12rem 0.35rem;
  white-space: nowrap;
  pointer-events: none;
}

.shipment-scheduling-grid label.is-shipment-scheduling-field-editing::after {
  content: attr(data-shipment-scheduling-editor);
}

.shipment-tracktrace-grid label.is-shipment-tracktrace-field-editing::after {
  content: attr(data-shipment-tracktrace-editor);
}

.shipment-history-grid label.is-shipment-history-field-editing::after {
  content: attr(data-shipment-history-editor);
}

.rate-confirmation-grid label.is-collab-field-locked,
.rate-confirmation-mail-field.is-collab-field-locked,
.rate-confirmation-auto-send-toggle.is-collab-field-locked,
.shipment-scheduling-grid label.is-collab-field-locked,
.shipment-tracktrace-grid label.is-collab-field-locked,
.shipment-history-grid label.is-collab-field-locked {
  border-style: dashed;
  border-color: rgba(223, 88, 88, 0.75);
  background: rgba(223, 88, 88, 0.08);
}

.rate-confirmation-grid label.is-collab-field-locked::before,
.rate-confirmation-mail-field.is-collab-field-locked::before,
.rate-confirmation-auto-send-toggle.is-collab-field-locked::before,
.shipment-scheduling-grid label.is-collab-field-locked::before,
.shipment-tracktrace-grid label.is-collab-field-locked::before,
.shipment-history-grid label.is-collab-field-locked::before {
  content: attr(data-collab-field-lock);
  position: absolute;
  left: 0.4rem;
  top: -0.58rem;
  font-size: 0.62rem;
  line-height: 1;
  color: #ffd7d7;
  background: rgba(45, 10, 10, 0.96);
  border: 1px solid rgba(223, 88, 88, 0.72);
  border-radius: 999px;
  padding: 0.12rem 0.35rem;
  white-space: nowrap;
  pointer-events: none;
}

.rate-confirmation-grid label.is-collab-field-locked > input:disabled,
.rate-confirmation-grid label.is-collab-field-locked > select:disabled,
.rate-confirmation-grid label.is-collab-field-locked > textarea:disabled,
.rate-confirmation-mail-field.is-collab-field-locked > input:disabled,
.rate-confirmation-auto-send-toggle.is-collab-field-locked > input:disabled,
.shipment-scheduling-grid label.is-collab-field-locked > input:disabled,
.shipment-scheduling-grid label.is-collab-field-locked > select:disabled,
.shipment-scheduling-grid label.is-collab-field-locked > textarea:disabled,
.shipment-tracktrace-grid label.is-collab-field-locked > input:disabled,
.shipment-tracktrace-grid label.is-collab-field-locked > select:disabled,
.shipment-tracktrace-grid label.is-collab-field-locked > textarea:disabled,
.shipment-history-grid label.is-collab-field-locked > input:disabled,
.shipment-history-grid label.is-collab-field-locked > select:disabled,
.shipment-history-grid label.is-collab-field-locked > textarea:disabled {
  opacity: 0.66;
  cursor: not-allowed;
}

.shipment-history-window {
  width: var(--shipment-history-main-width);
  max-width: calc(100vw - 1.5rem);
  left: 50%;
}

.shipment-history-side-window {
  width: var(--shipment-history-side-width);
  max-width: calc(100vw - 1.5rem);
  height: auto;
  max-height: var(--shipment-history-side-height);
  overflow: hidden;
  align-content: start;
  gap: 0.72rem;
  padding: 0.92rem 0.84rem 0.9rem;
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  background:
    linear-gradient(180deg, rgba(var(--admin-white-rgb), 0.04), rgba(var(--admin-white-rgb), 0)),
    linear-gradient(160deg, rgba(10, 18, 36, 0.95), rgba(7, 14, 28, 0.92));
  box-shadow: 0 28px 52px rgba(var(--admin-shadow-rgb), 0.38);
}

.shipment-history-activity-window {
  left: calc(50vw - (var(--shipment-history-main-width) / 2) - var(--shipment-history-panel-gap) - (var(--shipment-history-side-width) / 2));
  grid-template-rows: auto auto;
}

.shipment-history-comments-window {
  left: calc(50vw + (var(--shipment-history-main-width) / 2) + var(--shipment-history-panel-gap) + (var(--shipment-history-side-width) / 2));
  grid-template-rows: auto auto auto auto;
}

.shipment-history-side-window-head,
.shipment-history-activity-head,
.shipment-history-comments-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.74rem;
  border-bottom: 1px solid rgba(var(--admin-sky-rgb), 0.16);
}

.shipment-history-side-window-head h3,
.shipment-history-activity-head h3,
.shipment-history-comments-head h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--gold-soft);
  font-family: "Fraunces", serif;
}

.shipment-history-side-window-chip,
.shipment-history-activity-order,
.shipment-history-comments-order {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.52rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.24);
  background: rgba(var(--admin-white-rgb), 0.04);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.shipment-history-comments-order {
  color: var(--text-soft);
}

.shipment-history-activity-window .shipment-history-list {
  min-height: 0;
  max-height: min(56vh, 520px);
  display: grid;
  gap: 0.82rem;
  padding-right: 0.18rem;
}

.shipment-history-activity-window .shipment-history-entry {
  gap: 0.82rem;
  align-items: start;
}

.shipment-history-activity-window .shipment-history-entry-body {
  align-content: start;
  gap: 0.72rem;
  padding: 0.96rem 0.98rem;
}

.shipment-history-activity-window .shipment-history-entry-meta {
  display: grid;
  gap: 0.36rem;
  align-items: start;
}

.shipment-history-activity-window .shipment-history-entry-transition {
  gap: 0.48rem;
}

.shipment-history-activity-window .shipment-history-entry-note {
  padding: 0.68rem 0.76rem;
}

.shipment-history-comments-window .shipment-comments-list {
  min-height: 0;
  max-height: min(46vh, 400px);
  display: grid;
  gap: 0.62rem;
  padding-right: 0.18rem;
}

.shipment-history-comments-window .shipment-comment-item {
  border-radius: 14px;
  padding: 0.7rem 0.78rem;
}

.shipment-history-comments-window .shipment-comment-meta {
  align-items: center;
}

.shipment-history-comments-window .shipment-comment-body {
  margin-top: 0.42rem;
  line-height: 1.45;
}

.shipment-comments-form {
  display: grid;
  gap: 0.48rem;
}

.shipment-history-comments-window .shipment-comments-form label {
  display: grid;
  gap: 0.38rem;
}

.shipment-history-comments-window .shipment-comments-form textarea {
  min-height: 5.6rem;
  resize: vertical;
}
.client-profile-window {
  width: min(1160px, 100%);
  max-height: min(92vh, 860px);
}

#client-profile-modal .client-profile-window {
  width: min(1280px, 100%);
  max-height: min(94vh, 920px);
  padding: 1.12rem 1.14rem;
  gap: 0.82rem;
}

#client-profile-modal .client-profile-window .panel-summary {
  padding: 0.68rem 0.76rem;
}

#client-profile-modal .client-profile-window .panel-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(198px, 1fr));
  gap: 0.62rem;
}

#client-profile-modal .client-profile-window .client-profile-layout {
  gap: 0.72rem;
}

#client-profile-modal .client-profile-window .client-profile-panel {
  gap: 0.72rem;
}

#client-profile-modal .client-profile-window .card {
  gap: 0.3rem;
  padding: 0.82rem 0.88rem;
}

.client-profile-window h2 { margin: 0; }

.client-profile-layout {
  display: grid;
  gap: 0.55rem;
}

.client-profile-layout .card { margin: 0; }

.client-profile-layout.with-analytics {
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr);
  align-items: start;
}

.client-profile-panel {
  display: grid;
  gap: 0.55rem;
}

.client-profile-panel--right {
  gap: 0.55rem;
}

.client-profile-layout.with-analytics .client-profile-panel--left,
.client-profile-layout.with-analytics .client-profile-panel--right {
  border: 1px dashed rgba(var(--admin-sky-rgb), 0.36);
  border-radius: 12px;
  padding: 0.65rem;
  background: rgba(7, 17, 35, 0.6);
  display: grid;
  gap: 0.55rem;
}

.client-profile-layout.with-analytics .client-profile-panel--right {
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.1), rgba(9, 16, 32, 0.78));
}

.client-profile-pane-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.client-profile-pane-btn {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.28);
  background: rgba(7, 17, 35, 0.52);
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, color 160ms ease;
}

.client-profile-pane-btn:hover,
.client-profile-pane-btn:focus-visible {
  border-color: rgba(var(--admin-gold-rgb), 0.44);
  color: var(--text);
  transform: translateY(-1px);
}

.client-profile-pane-btn.is-active {
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.26), rgba(var(--admin-sky-rgb), 0.2));
  border-color: rgba(var(--admin-gold-rgb), 0.52);
  color: var(--text);
  box-shadow: 0 12px 24px rgba(var(--admin-shadow-rgb), 0.24);
}

.client-profile-documents-panel {
  background: linear-gradient(145deg, rgba(30, 24, 12, 0.36), rgba(9, 16, 32, 0.82));
}

.carrier-document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}

.carrier-document-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: flex-start;
}

.carrier-document-card-head h3,
.carrier-document-upload-copy p {
  margin: 0;
}

.carrier-document-meta {
  display: grid;
  gap: 0.25rem;
}

.carrier-document-upload {
  border: 1px dashed rgba(var(--admin-sky-rgb), 0.36);
  border-radius: 14px;
  padding: 0.88rem;
  background:
    radial-gradient(circle at top right, rgba(var(--admin-gold-rgb), 0.12), transparent 55%),
    linear-gradient(155deg, rgba(9, 18, 34, 0.92), rgba(12, 24, 44, 0.76));
  display: grid;
  gap: 0.55rem;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.carrier-document-upload.is-replace {
  border-color: rgba(var(--admin-gold-rgb), 0.4);
}

.carrier-document-upload.is-dragover,
.carrier-document-upload.is-uploading {
  border-color: rgba(var(--admin-gold-rgb), 0.62);
  background:
    radial-gradient(circle at top right, rgba(var(--admin-gold-rgb), 0.22), transparent 52%),
    linear-gradient(155deg, rgba(20, 30, 52, 0.98), rgba(18, 34, 58, 0.9));
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(var(--admin-shadow-rgb), 0.24);
}

.carrier-document-upload-copy {
  display: grid;
  gap: 0.28rem;
}

.carrier-document-upload-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 2.4rem;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.32);
  background: rgba(var(--admin-gold-rgb), 0.14);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.carrier-document-upload-action:hover,
.carrier-document-upload-action:focus-within {
  background: rgba(var(--admin-gold-rgb), 0.22);
  border-color: rgba(var(--admin-gold-rgb), 0.5);
  transform: translateY(-1px);
}

.carrier-document-upload-action input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.client-profile-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.45rem;
}

.client-profile-metric {
  border: 1px solid rgba(var(--admin-sky-rgb), 0.32);
  border-radius: 10px;
  padding: 0.45rem 0.52rem;
  background: rgba(7, 17, 35, 0.58);
  display: grid;
  gap: 0.22rem;
}

.client-profile-status-bars {
  margin-top: 0.32rem;
  display: grid;
  gap: 0.35rem;
}

.client-profile-status-item {
  display: grid;
  gap: 0.2rem;
}

.client-profile-status-label {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.client-profile-status-label span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-profile-info-panel {
  border-right: 1px solid rgba(var(--admin-sky-rgb), 0.22);
}

.client-profile-finance-panel {
  border-left: 1px solid rgba(var(--admin-sky-rgb), 0.22);
}

@media (max-width: 1180px) {
  .employee-create-shell-body {
    grid-template-columns: 1fr;
  }
  .employee-create-intro {
    max-width: none;
    padding-right: 0;
    padding-bottom: 0.9rem;
    border-right: 0;
    border-bottom: 1px solid rgba(var(--admin-sky-rgb), 0.16);
  }
  .employee-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .employee-roster-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .employee-panel-access {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .employee-row-panel-access {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .employee-form-grid {
    grid-template-columns: 1fr;
  }
  .employee-panel-access {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .employee-form-actions {
    justify-content: stretch;
  }
  .employee-form-actions button {
    width: 100%;
  }
  .employee-roster-overview {
    grid-template-columns: 1fr;
  }
  .employee-create-shell > summary,
  .employee-roster-group-head,
  .employee-roster-access-summary-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .employee-create-summary-action,
  .employee-roster-group-meta {
    justify-content: flex-start;
  }
  .employee-roster-table {
    min-width: 920px;
  }
  .employee-row-panel-access {
    grid-template-columns: 1fr;
  }
  .client-profile-info-panel,
  .client-profile-finance-panel {
    border: none;
    border-top: 1px dashed rgba(var(--admin-sky-rgb), 0.38);
  }

  .client-profile-layout.with-analytics .client-profile-panel--left,
  .client-profile-layout.with-analytics .client-profile-panel--right {
    border: 1px dashed rgba(var(--admin-sky-rgb), 0.38);
    border-radius: 10px;
    padding: 0.55rem;
  }

  .client-profile-layout.with-analytics .client-profile-panel--right {
    background: rgba(7, 17, 35, 0.6);
  }

  .carrier-document-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .employee-panel-access {
    grid-template-columns: 1fr;
  }
}

.client-profile-status-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-white-rgb), 0.14);
  background: rgba(var(--admin-white-rgb), 0.08);
  overflow: hidden;
}

.client-profile-status-fill {
  --bar-width: 0;
  display: block;
  width: calc(var(--bar-width) * 1%);
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--admin-gold-rgb), 0.95), rgba(var(--admin-sky-rgb), 0.95));
}

.client-profile-recent-list {
  display: grid;
  gap: 0.42rem;
  max-height: min(220px, 38vh);
  overflow: auto;
}

.client-profile-recent-item {
  border: 1px solid rgba(var(--admin-white-rgb), 0.2);
  border-radius: 10px;
  padding: 0.48rem 0.58rem;
  background: rgba(7, 17, 35, 0.58);
}

.client-profile-recent-item div {
  overflow-wrap: anywhere;
}

.client-profile-panel--right .expense-chart {
  margin-top: 0.35rem;
}

.client-profile-layout.with-analytics .tiny,
.client-profile-layout.with-analytics .row {
  overflow-wrap: anywhere;
}

.shipment-history-activity-window.is-loading .shipment-history-list {
  min-height: 228px;
  opacity: 0.8;
}

.shipment-history-comments-window.is-loading .shipment-comments-list,
.shipment-history-comments-window.is-loading .shipment-comments-form,
.shipment-history-comments-window.is-loading .shipment-history-side-actions {
  opacity: 0.72;
}

.shipment-history-actions {
  border: 1px dashed rgba(var(--admin-sky-rgb), 0.38);
  border-radius: 14px;
  padding: 0.72rem;
  display: grid;
  gap: 0.45rem;
  background: linear-gradient(180deg, rgba(7, 17, 35, 0.68), rgba(5, 13, 26, 0.84));
}

.shipment-history-actions h3 {
  margin: 0;
  font-size: 0.86rem;
  color: var(--gold-soft);
  font-family: "Fraunces", serif;
}

.shipment-history-actions.is-collab-locked {
  border-color: rgba(241, 97, 97, 0.42);
}

.shipment-history-action-line {
  align-items: stretch;
}

.shipment-history-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: stretch;
}

.shipment-history-action-slot {
  min-height: 2.2rem;
}

.shipment-history-action-btn {
  width: 100%;
  min-height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
  padding: 0.42rem 0.5rem;
}

.shipment-history-action-btn:disabled,
.shipment-history-action-btn[disabled],
.shipment-history-action-btn[aria-disabled="true"] {
  opacity: 0.56;
  color: var(--muted);
  border-color: rgba(var(--admin-sky-rgb), 0.25);
  background: linear-gradient(120deg, rgba(10, 18, 36, 0.78), rgba(18, 31, 57, 0.88));
  cursor: help;
}

.shipment-history-action-btn:disabled:hover,
.shipment-history-action-btn[disabled]:hover,
.shipment-history-action-btn[aria-disabled="true"]:hover,
.shipment-history-action-btn:disabled:focus-visible,
.shipment-history-action-btn[disabled]:focus-visible {
  transform: none;
  box-shadow: none;
  outline: none;
}

body.admin-theme-light .shipment-history-action-btn:disabled,
body.admin-theme-light .shipment-history-action-btn[disabled],
body.admin-theme-light .shipment-history-action-btn[aria-disabled="true"] {
  background: var(--admin-surface-soft);
  border-color: var(--admin-panel-border);
  color: var(--muted);
}

body.admin-theme-light .shipment-direct-sell-coi-alert {
  border-color: rgba(var(--admin-gold-rgb), 0.32);
  background: linear-gradient(135deg, rgba(255, 245, 214, 0.98), rgba(255, 255, 255, 0.95));
}

body.admin-theme-light .shipment-direct-sell-coi-alert span {
  color: var(--text-soft);
}

body.admin-theme-light .shipment-direct-sell-coi-alert[data-tone="error"] {
  border-color: rgba(183, 40, 40, 0.3);
  background: linear-gradient(135deg, rgba(255, 232, 232, 0.98), rgba(255, 255, 255, 0.95));
}

.shipment-direct-sell-search-meta[data-state="loading"] {
  color: var(--gold-soft);
}

.shipment-direct-sell-search-meta[data-state="error"] {
  color: var(--danger);
}

.shipment-direct-sell-search-meta[data-state="success"] {
  color: var(--success);
}

.shipment-direct-sell-coi-alert {
  display: grid;
  gap: 0.25rem;
  padding: 0.72rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.34);
  background: linear-gradient(135deg, rgba(72, 53, 10, 0.34), rgba(16, 22, 39, 0.9));
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.04);
}

.shipment-direct-sell-coi-alert strong {
  color: var(--gold-soft);
  font-size: 0.8rem;
}

.shipment-direct-sell-coi-alert span {
  color: var(--text-soft);
  font-size: 0.75rem;
}

.shipment-direct-sell-coi-alert[data-tone="error"] {
  border-color: rgba(183, 40, 40, 0.42);
  background: linear-gradient(135deg, rgba(88, 18, 18, 0.38), rgba(20, 16, 30, 0.9));
}

.shipment-direct-sell-coi-alert[data-tone="error"] strong {
  color: var(--danger);
}

.shipment-direct-sell-selected,
.shipment-direct-sell-results {
  display: grid;
  gap: 0.45rem;
}

.shipment-direct-sell-results {
  max-height: min(28vh, 240px);
  overflow: auto;
}

.shipment-direct-sell-selected-card,
.shipment-direct-sell-search-result {
  border: 1px solid rgba(var(--admin-sky-rgb), 0.28);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(9, 18, 36, 0.92), rgba(13, 25, 49, 0.88));
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.04);
}

.shipment-direct-sell-selected-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
}

.shipment-direct-sell-selected-copy {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.shipment-direct-sell-selected-copy strong,
.shipment-direct-sell-search-result strong {
  color: var(--text-soft);
  font-size: 0.83rem;
}

.shipment-direct-sell-selected-copy span,
.shipment-direct-sell-search-result span {
  color: var(--muted);
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.shipment-direct-sell-search-result {
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.8rem;
  display: grid;
  gap: 0.2rem;
}

.shipment-direct-sell-search-result:hover,
.shipment-direct-sell-search-result:focus-visible {
  border-color: rgba(var(--admin-gold-rgb), 0.5);
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.16), rgba(13, 25, 49, 0.92));
}

.shipment-history-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.shipment-history-list {
  max-height: 100%;
  overflow: auto;
  display: grid;
  gap: 0.45rem;
}

.shipment-history-list .timeline-item {
  border-left-color: var(--gold-soft);
  background: linear-gradient(90deg, rgba(var(--admin-gold-rgb), 0.13), rgba(9, 16, 32, 0.82));
}

.shipment-history-list .shipment-history-step {
  display: grid;
  gap: 0.45rem;
}

.shipment-history-list .shipment-history-arrow {
  position: relative;
  height: 0.95rem;
}

.shipment-history-list .shipment-history-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 0.65rem;
  border-radius: 999px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, rgba(var(--admin-gold-rgb), 0.45), rgba(var(--admin-gold-rgb), 0.1));
}

.shipment-history-list .shipment-history-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--gold-soft);
  border-bottom: 2px solid var(--gold-soft);
  transform: translate(-50%, 45%) rotate(45deg);
}

.shipment-history-list .tiny {
  margin-top: 0.28rem;
}

.shipment-history-layout {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr);
  align-items: start;
}

.shipment-history-column {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
}

.shipment-comments-pane {
  border: 1px dashed rgba(var(--admin-sky-rgb), 0.38);
  border-radius: 14px;
  padding: 0.72rem;
  display: grid;
  gap: 0.5rem;
  background: linear-gradient(180deg, rgba(7, 17, 35, 0.68), rgba(5, 13, 26, 0.84));
  min-width: 0;
}

.shipment-comments-pane h3 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gold-soft);
  font-family: "Fraunces", serif;
}

body.admin-theme-light .shipment-history-actions,
body.admin-theme-light .shipment-history-comments-window {
  border-color: rgba(var(--admin-sky-rgb), 0.3);
  border-style: solid;
  background: linear-gradient(180deg, rgba(251, 254, 255, 0.97), rgba(241, 248, 255, 0.92));
}

body.admin-theme-light .shipment-dispatch-carrier-card-inner,
body.admin-theme-light .shipment-dispatch-section,
body.admin-theme-light .shipment-dispatch-suggestion {
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.97), rgba(239, 246, 255, 0.92));
}

body.admin-theme-light .shipment-dispatch-carrier-title,
body.admin-theme-light .shipment-dispatch-section-head h3 {
  color: var(--menu-text-active);
}

body.admin-theme-light .shipment-history-actions h3,
body.admin-theme-light .shipment-history-comments-window h3 {
  color: var(--menu-text-active);
}

body.admin-theme-light .shipment-history-list .timeline-item {
  border-left-color: #aa6708;
  background: linear-gradient(100deg, rgba(var(--admin-gold-rgb), 0.14), rgba(255, 255, 255, 0.93));
}

#shipment-tracktrace-open,
#shipment-dispatch-open {
  width: 100%;
}

.shipment-history-side-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.shipment-history-summary {
  display: grid;
  gap: 0.72rem;
  padding: 0.88rem 0.92rem 0.96rem;
  border-style: solid;
  border-color: rgba(var(--admin-gold-rgb), 0.34);
  background:
    radial-gradient(circle at top right, rgba(var(--admin-sky-rgb), 0.18), transparent 32%),
    linear-gradient(145deg, rgba(18, 28, 48, 0.94), rgba(8, 14, 28, 0.9));
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.04);
}

.shipment-history-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(240px, 0.95fr);
  gap: 0.8rem;
  align-items: stretch;
}

.shipment-history-hero-copy,
.shipment-history-highlight,
.shipment-history-actions,
.shipment-history-section,
.shipment-history-documents-shell {
  border: 1px solid rgba(var(--admin-sky-rgb), 0.26);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(var(--admin-white-rgb), 0.04), rgba(var(--admin-white-rgb), 0)),
    linear-gradient(160deg, rgba(10, 18, 36, 0.92), rgba(12, 24, 44, 0.84));
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.04);
}

.shipment-history-hero-copy {
  display: grid;
  gap: 0.72rem;
  padding: 1rem 1.02rem;
}

.shipment-history-kicker,
.shipment-history-section-kicker,
.shipment-history-document-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(var(--admin-gold-rgb), 0.82);
}

.shipment-history-hero-title-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.shipment-history-hero-title-row h3 {
  margin: 0;
  font-size: 1.48rem;
  line-height: 1.02;
  color: var(--text);
  font-family: "Fraunces", serif;
}

.shipment-history-lane {
  margin: 0.22rem 0 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.4;
}

.shipment-history-hero-status {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.shipment-history-hero-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.shipment-history-hero-details span {
  display: grid;
  gap: 0.18rem;
  padding: 0.6rem 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.22);
  background: rgba(5, 13, 26, 0.48);
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.35;
}

.shipment-history-hero-details strong {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.shipment-history-hero-rail {
  display: grid;
  gap: 0.72rem;
}

.shipment-history-highlight {
  display: grid;
  gap: 0.25rem;
  padding: 0.95rem 1rem;
}

.shipment-history-highlight-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.shipment-history-highlight strong {
  font-family: "Fraunces", serif;
  font-size: 1.06rem;
  color: var(--gold-soft);
  line-height: 1.1;
}

.shipment-history-highlight small {
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.4;
}

.shipment-history-document-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.shipment-history-document-pill,
.shipment-history-document-state {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.24);
  background: rgba(5, 13, 26, 0.42);
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.shipment-history-document-pill.is-ready,
.shipment-history-document-state.is-ready {
  border-color: rgba(106, 194, 146, 0.45);
  background: rgba(21, 72, 46, 0.42);
  color: #d8ffe5;
}

.shipment-history-document-pill.is-pending,
.shipment-history-document-state.is-pending {
  border-color: rgba(var(--admin-gold-rgb), 0.45);
  background: rgba(90, 66, 12, 0.42);
  color: #ffe8b8;
}

.shipment-history-document-pill.is-missing,
.shipment-history-document-state.is-missing,
.shipment-history-document-pill.is-locked,
.shipment-history-document-state.is-locked {
  border-color: rgba(var(--admin-sky-rgb), 0.28);
  background: rgba(10, 18, 36, 0.46);
  color: var(--muted);
}

.shipment-history-summary-grid {
  gap: 0.55rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shipment-history-summary-grid .panel-summary-item {
  min-height: 5rem;
  border-radius: 16px;
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  background: rgba(5, 13, 26, 0.45);
}

.shipment-history-summary-grid .panel-summary-item-value {
  color: var(--text-soft);
}

.shipment-history-layout {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.92rem;
}

.shipment-history-column {
  display: grid;
  gap: 0.82rem;
  min-width: 0;
}

.shipment-history-section,
.shipment-history-documents-shell,
.shipment-history-actions {
  padding: 0.9rem 0.95rem;
}

.shipment-history-section-head,
.shipment-history-actions-copy,
.shipment-history-documents-head {
  display: grid;
  gap: 0.22rem;
}

.shipment-history-section-head {
  margin-bottom: 0.72rem;
}

.shipment-history-section-head h3,
.shipment-history-actions-copy h3,
.shipment-history-documents-head h3 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--gold-soft);
  font-family: "Fraunces", serif;
}

.shipment-history-section-head p,
.shipment-history-actions-copy p:last-child,
.shipment-history-documents-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.shipment-history-actions {
  gap: 0.72rem;
  border-style: solid;
}

.shipment-history-action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.shipment-history-action-slot {
  min-height: 2.85rem;
}

.shipment-history-action-btn {
  min-height: 2.85rem;
  padding: 0.68rem 0.82rem;
  justify-content: flex-start;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.26);
  background: linear-gradient(145deg, rgba(18, 29, 53, 0.9), rgba(10, 18, 36, 0.86));
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.shipment-history-action-btn:hover:not(:disabled):not([aria-disabled="true"]),
.shipment-history-action-btn:focus-visible:not(:disabled):not([aria-disabled="true"]) {
  border-color: rgba(var(--admin-gold-rgb), 0.5);
  background: linear-gradient(145deg, rgba(var(--admin-gold-rgb), 0.18), rgba(11, 20, 40, 0.92));
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(var(--admin-shadow-rgb), 0.2);
}

.shipment-history-action-btn[aria-disabled="true"]:focus-visible {
  transform: none;
  box-shadow: none;
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.shipment-history-action-btn.is-active {
  border-color: rgba(var(--admin-gold-rgb), 0.56);
  background: linear-gradient(145deg, rgba(var(--admin-gold-rgb), 0.22), rgba(12, 24, 44, 0.92));
  color: var(--text);
}

.shipment-history-list {
  display: grid;
  gap: 0.55rem;
  max-height: min(46vh, 430px);
  overflow: auto;
  padding-right: 0.18rem;
}

.shipment-history-entry {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.82rem;
  align-items: stretch;
}

.shipment-history-entry-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.shipment-history-entry:not(:last-child) .shipment-history-entry-rail::after {
  content: "";
  position: absolute;
  top: 1.15rem;
  bottom: -0.62rem;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(to bottom, rgba(var(--admin-gold-rgb), 0.44), rgba(var(--admin-sky-rgb), 0.12));
}

.shipment-history-entry-dot {
  width: 0.8rem;
  height: 0.8rem;
  margin-top: 0.7rem;
  border-radius: 999px;
  border: 2px solid rgba(var(--admin-gold-rgb), 0.76);
  background: rgba(8, 16, 31, 0.96);
  box-shadow: 0 0 0 5px rgba(var(--admin-gold-rgb), 0.12);
}

.shipment-history-entry-body {
  display: grid;
  gap: 0.58rem;
  padding: 0.82rem 0.92rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.24);
  background: linear-gradient(145deg, rgba(14, 24, 44, 0.88), rgba(7, 14, 28, 0.82));
}

.shipment-history-entry.is-latest .shipment-history-entry-body {
  border-color: rgba(var(--admin-gold-rgb), 0.38);
  background:
    radial-gradient(circle at top right, rgba(var(--admin-gold-rgb), 0.14), transparent 34%),
    linear-gradient(145deg, rgba(18, 28, 48, 0.92), rgba(7, 14, 28, 0.84));
}

.shipment-history-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.72rem;
}

.shipment-history-entry-time {
  color: var(--text-soft);
  font-weight: 700;
}

.shipment-history-entry-actor {
  position: relative;
  padding-left: 0.62rem;
  color: var(--muted);
}

.shipment-history-entry-actor::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(var(--admin-sky-rgb), 0.6);
}

.shipment-history-entry-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.38);
  background: rgba(var(--admin-gold-rgb), 0.16);
  color: var(--gold-soft);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shipment-history-entry-transition {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  align-items: center;
}

.shipment-history-entry-transition--single {
  gap: 0.58rem;
}

.shipment-history-entry-transition-label,
.shipment-history-entry-transition-arrow {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.shipment-history-entry-transition-fallback {
  color: var(--muted);
  font-size: 0.76rem;
}

.shipment-history-entry-note {
  margin: 0;
  padding: 0.62rem 0.72rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.18);
  background: rgba(var(--admin-white-rgb), 0.04);
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.52;
}

.shipment-history-documents-panel {
  outline: none;
}

.shipment-history-documents-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.shipment-history-documents-list {
  display: grid;
  gap: 0.62rem;
  margin-top: 0.82rem;
}

.shipment-history-document-card {
  display: grid;
  gap: 0.52rem;
  padding: 0.82rem 0.86rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.24);
  background: rgba(5, 13, 26, 0.46);
}

.shipment-history-document-card.is-ready {
  border-color: rgba(106, 194, 146, 0.34);
}

.shipment-history-document-card.is-pending {
  border-color: rgba(var(--admin-gold-rgb), 0.34);
}

.shipment-history-document-head {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: flex-start;
}

.shipment-history-document-head h4 {
  margin: 0.1rem 0 0;
  font-size: 0.96rem;
  color: var(--text);
}

.shipment-history-document-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.shipment-history-document-meta {
  display: grid;
  gap: 0.16rem;
  color: var(--text-soft);
  font-size: 0.74rem;
}

.shipment-history-document-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.shipment-history-document-btn {
  width: 100%;
  min-height: 2.35rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.24);
  background: linear-gradient(145deg, rgba(18, 29, 53, 0.88), rgba(10, 18, 36, 0.82));
  color: var(--text-soft);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.shipment-history-document-btn:hover:not(:disabled),
.shipment-history-document-btn:focus-visible:not(:disabled) {
  border-color: rgba(var(--admin-gold-rgb), 0.46);
  background: linear-gradient(145deg, rgba(var(--admin-gold-rgb), 0.18), rgba(11, 20, 40, 0.9));
  color: var(--text);
  transform: translateY(-1px);
}

.shipment-history-document-btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

body.admin-theme-light .shipment-history-summary {
  border-color: rgba(var(--admin-sky-rgb), 0.28);
  background:
    radial-gradient(circle at top right, rgba(var(--admin-gold-rgb), 0.1), transparent 36%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(238, 246, 255, 0.94));
}

body.admin-theme-light .shipment-history-activity-window,
body.admin-theme-light .shipment-history-hero-copy,
body.admin-theme-light .shipment-history-highlight,
body.admin-theme-light .shipment-history-actions,
body.admin-theme-light .shipment-history-section,
body.admin-theme-light .shipment-history-comments-window,
body.admin-theme-light .shipment-history-documents-shell {
  border-color: rgba(var(--admin-sky-rgb), 0.22);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 255, 0.94));
}

body.admin-theme-light .shipment-history-hero-title-row h3,
body.admin-theme-light .shipment-history-activity-head h3,
body.admin-theme-light .shipment-history-document-head h4 {
  color: #17365a;
}

body.admin-theme-light .shipment-history-lane,
body.admin-theme-light .shipment-history-highlight small,
body.admin-theme-light .shipment-history-document-meta,
body.admin-theme-light .shipment-history-hero-details span {
  color: #315173;
}

body.admin-theme-light .shipment-history-highlight strong,
body.admin-theme-light .shipment-history-activity-head h3,
body.admin-theme-light .shipment-history-actions-copy h3,
body.admin-theme-light .shipment-history-section-head h3,
body.admin-theme-light .shipment-history-documents-head h3,
body.admin-theme-light .shipment-history-comments-window h3 {
  color: var(--menu-text-active);
}

body.admin-theme-light .shipment-history-hero-details span,
body.admin-theme-light .shipment-history-summary-grid .panel-summary-item,
body.admin-theme-light .shipment-history-document-card {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(var(--admin-sky-rgb), 0.18);
}

body.admin-theme-light .shipment-history-document-pill,
body.admin-theme-light .shipment-history-document-state {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(var(--admin-sky-rgb), 0.22);
  color: #315173;
}

body.admin-theme-light .shipment-history-activity-order {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(var(--admin-sky-rgb), 0.22);
  color: #315173;
}

body.admin-theme-light .shipment-history-action-btn,
body.admin-theme-light .shipment-history-document-btn {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(235, 244, 255, 0.96));
  border-color: rgba(var(--admin-sky-rgb), 0.22);
  color: #1a395d;
}

body.admin-theme-light .shipment-history-action-btn:hover:not(:disabled):not([aria-disabled="true"]),
body.admin-theme-light .shipment-history-action-btn:focus-visible:not(:disabled):not([aria-disabled="true"]),
body.admin-theme-light .shipment-history-document-btn:hover:not(:disabled),
body.admin-theme-light .shipment-history-document-btn:focus-visible:not(:disabled) {
  border-color: rgba(var(--admin-sky-rgb), 0.42);
  background: linear-gradient(145deg, rgba(var(--admin-gold-rgb), 0.18), rgba(244, 249, 255, 0.98));
  color: #102d4f;
}

body.admin-theme-light .shipment-history-action-btn.is-active {
  border-color: rgba(var(--admin-gold-rgb), 0.52);
  background: linear-gradient(145deg, rgba(var(--admin-gold-rgb), 0.22), rgba(240, 247, 255, 0.98));
}

body.admin-theme-light .shipment-history-entry-dot {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 5px rgba(var(--admin-gold-rgb), 0.1);
}

body.admin-theme-light .shipment-history-entry-body {
  border-color: rgba(var(--admin-sky-rgb), 0.2);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.94));
}

body.admin-theme-light .shipment-history-entry.is-latest .shipment-history-entry-body {
  border-color: rgba(var(--admin-gold-rgb), 0.36);
  background:
    radial-gradient(circle at top right, rgba(var(--admin-gold-rgb), 0.14), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(242, 248, 255, 0.96));
}

body.admin-theme-light .shipment-history-entry-time,
body.admin-theme-light .shipment-history-entry-note {
  color: #234569;
}

body.admin-theme-light .shipment-history-entry-note {
  border-color: rgba(var(--admin-sky-rgb), 0.14);
  background: rgba(247, 251, 255, 0.96);
}

.shipment-comments-list {
  max-height: min(38vh, 340px);
  overflow: auto;
  display: grid;
  gap: 0.55rem;
}

.shipment-comment-item {
  border: 1px solid rgba(var(--admin-gold-rgb), 0.25);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: linear-gradient(135deg, rgba(var(--admin-gold-rgb), 0.12), rgba(9, 16, 32, 0.76));
}

.shipment-comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.shipment-comment-meta strong {
  color: var(--gold-soft);
}

.shipment-comment-body {
  margin-top: 0.35rem;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#shipment-tracktrace-list {
  display: grid;
  gap: 0.45rem;
  max-height: min(40vh, 360px);
  overflow: auto;
}

@media (max-width: 1180px) {
  #shipment-history-modal {
    --shipment-history-side-width: clamp(220px, 20vw, 254px);
    --shipment-history-main-width: min(860px, calc(100vw - (2 * var(--shipment-history-side-width)) - (2 * var(--shipment-history-panel-gap)) - 1.5rem));
  }

  .shipment-history-activity-window .shipment-history-list {
    max-height: min(30vh, 260px);
  }
}

@media (max-width: 1024px) {
  #shipment-history-modal {
    --shipment-history-side-width: clamp(196px, 21vw, 226px);
    --shipment-history-main-width: min(760px, calc(100vw - (2 * var(--shipment-history-side-width)) - (2 * var(--shipment-history-panel-gap)) - 1.25rem));
  }

  .shipment-history-hero,
  .shipment-history-layout {
    grid-template-columns: 1fr;
  }

  .client-profile-layout.with-analytics {
    grid-template-columns: 1fr;
  }

  .shipment-history-summary-grid,
  .shipment-history-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #shipment-history-modal {
    --shipment-history-panel-gap: 0.5rem;
    --shipment-history-side-width: clamp(160px, 22vw, 182px);
    --shipment-history-main-width: min(640px, calc(100vw - (2 * var(--shipment-history-side-width)) - (2 * var(--shipment-history-panel-gap)) - 1rem));
  }

  .shipment-history-hero-details,
  .shipment-history-summary-grid,
  .shipment-history-action-grid,
  .shipment-history-side-actions {
    grid-template-columns: 1fr;
  }

  .shipment-history-side-window {
    padding: 0.82rem 0.72rem 0.8rem;
  }

  .shipment-history-side-window-head,
  .shipment-history-activity-head,
  .shipment-history-comments-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .shipment-history-hero-title-row,
  .shipment-history-document-head,
  .shipment-history-documents-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .shipment-history-document-actions {
    grid-template-columns: 1fr;
  }
}

.shipment-history-comments-window {
  grid-template-rows: auto auto auto;
}

.shipment-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin-bottom: 0.78rem;
  border: none;
  background: none;
  box-shadow: none;
}

.shipment-history-actions:empty {
  display: none;
}

.shipment-history-action-slot {
  flex: 1 1 144px;
  min-height: 0;
  max-width: 188px;
}

.shipment-history-action-btn {
  min-height: 2.55rem;
  padding: 0.56rem 0.82rem;
  justify-content: center;
  text-align: center;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.shipment-history-inline-prompt,
[data-shipment-direct-sell-prompt],
[data-shipment-detach-prompt] {
  flex: 1 1 100%;
  width: 100%;
  padding: 0.9rem 0.96rem;
}

.shipment-history-summary {
  gap: 0.84rem;
  padding: 0.98rem 1rem 1.04rem;
}

.shipment-history-summary > .shipment-history-document-pills,
.shipment-history-summary > .panel-summary-grid.shipment-history-summary-grid {
  display: none;
}

.shipment-history-hero {
  grid-template-columns: minmax(0, 1fr) minmax(168px, 196px);
  gap: 0.9rem;
}

.shipment-history-hero-copy {
  gap: 0.78rem;
  padding: 1rem 1.02rem;
}

.shipment-history-hero-title-row h3 {
  font-size: 1.62rem;
  line-height: 0.98;
}

.shipment-history-lane {
  max-width: 56ch;
  margin-top: 0.28rem;
}

.shipment-history-meta-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.shipment-history-meta-card {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.62rem 0.68rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.22);
  background: rgba(5, 13, 26, 0.42);
}

.shipment-history-meta-label,
.shipment-history-detail-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.shipment-history-meta-value,
.shipment-history-detail-value {
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.shipment-history-meta-detail {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.shipment-history-board-frame {
  padding: 0.72rem;
  border-radius: 18px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.42);
  background:
    linear-gradient(180deg, rgba(var(--admin-white-rgb), 0.03), rgba(var(--admin-white-rgb), 0)),
    linear-gradient(160deg, rgba(8, 16, 31, 0.8), rgba(12, 24, 44, 0.88));
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.04);
}

.shipment-history-summary-grid {
  gap: 0.52rem;
  grid-template-columns: minmax(0, 1.38fr) minmax(0, 1.14fr) minmax(124px, 0.84fr) minmax(124px, 0.84fr);
}

.shipment-history-detail-card {
  display: grid;
  gap: 0.28rem;
  min-height: 5rem;
  padding: 0.68rem 0.72rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.2);
  background: rgba(5, 13, 26, 0.5);
  box-shadow: inset 0 1px 0 rgba(var(--admin-white-rgb), 0.03);
}

.shipment-history-detail-value {
  font-size: 0.82rem;
  font-weight: 600;
}

.shipment-history-board-footer {
  display: grid;
  gap: 0.62rem;
}

.shipment-history-footer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.shipment-history-footer-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.22);
  background: rgba(var(--admin-white-rgb), 0.04);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
}

.shipment-history-document-pills {
  gap: 0.4rem;
  margin: 0;
}

.shipment-history-document-pill,
.shipment-history-document-state {
  padding: 0.32rem 0.56rem;
  font-size: 0.68rem;
}

.shipment-history-hero-rail {
  gap: 0.52rem;
}

.shipment-history-highlight--rate {
  min-height: 0;
  padding: 0.76rem 0.78rem;
}

.shipment-history-highlight--rate strong {
  font-size: 1.02rem;
}

.shipment-history-highlight--rate .shipment-history-highlight-label {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
}

.shipment-history-highlight--rate small {
  font-size: 0.71rem;
}

.shipment-history-highlight--profit {
  border-color: rgba(106, 194, 146, 0.38);
}

.shipment-history-highlight--profit small {
  color: var(--success);
}

.shipment-history-highlight--loss {
  border-color: rgba(255, 128, 128, 0.34);
}

.shipment-history-highlight--loss small {
  color: var(--danger);
}

.shipment-history-highlight--profit small span,
.shipment-history-highlight--loss small span {
  color: inherit;
}

.shipment-history-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(196px, 220px);
  gap: 0.82rem;
  align-items: start;
}

.shipment-history-section--update {
  min-width: 0;
}

.shipment-history-tooldock {
  display: grid;
  gap: 0.52rem;
  align-self: stretch;
}

.shipment-history-tool-btn {
  width: 100%;
  min-height: 3.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.72rem 0.86rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.24);
  background: linear-gradient(145deg, rgba(18, 29, 53, 0.9), rgba(10, 18, 36, 0.86));
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 700;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.shipment-history-tool-btn:hover:not(:disabled),
.shipment-history-tool-btn:focus-visible:not(:disabled) {
  border-color: rgba(var(--admin-gold-rgb), 0.52);
  background: linear-gradient(145deg, rgba(var(--admin-gold-rgb), 0.18), rgba(11, 20, 40, 0.92));
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 16px 24px rgba(var(--admin-shadow-rgb), 0.18);
}

.shipment-history-tool-btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.shipment-history-update-actions {
  justify-content: space-between;
  align-items: center;
}

.shipment-history-delete-btn {
  margin-left: auto;
  border-color: rgba(255, 128, 128, 0.46);
  background: linear-gradient(145deg, rgba(96, 18, 18, 0.48), rgba(38, 12, 18, 0.88));
  color: var(--danger-soft);
}

.shipment-history-delete-btn:hover,
.shipment-history-delete-btn:focus-visible {
  border-color: rgba(255, 164, 164, 0.6);
  background: linear-gradient(145deg, rgba(122, 20, 20, 0.56), rgba(48, 14, 20, 0.92));
  color: #fff1f1;
}

body.admin-theme-light .shipment-history-actions {
  background: none;
}

body.admin-theme-light .shipment-history-meta-card,
body.admin-theme-light .shipment-history-board-frame,
body.admin-theme-light .shipment-history-detail-card,
body.admin-theme-light .shipment-history-footer-chip,
body.admin-theme-light .shipment-history-tooldock {
  border-color: rgba(var(--admin-sky-rgb), 0.18);
  background: rgba(255, 255, 255, 0.88);
}

body.admin-theme-light .shipment-history-meta-value,
body.admin-theme-light .shipment-history-detail-value {
  color: #1a395d;
}

body.admin-theme-light .shipment-history-meta-detail,
body.admin-theme-light .shipment-history-meta-label,
body.admin-theme-light .shipment-history-detail-label,
body.admin-theme-light .shipment-history-footer-chip {
  color: #55718f;
}

body.admin-theme-light .shipment-history-tool-btn {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.96));
  border-color: rgba(var(--admin-sky-rgb), 0.22);
  color: #1a395d;
}

body.admin-theme-light .shipment-history-tool-btn:hover:not(:disabled),
body.admin-theme-light .shipment-history-tool-btn:focus-visible:not(:disabled) {
  border-color: rgba(var(--admin-gold-rgb), 0.42);
  background: linear-gradient(145deg, rgba(var(--admin-gold-rgb), 0.16), rgba(244, 249, 255, 0.98));
  color: #102d4f;
}

body.admin-theme-light .shipment-history-highlight--profit {
  border-color: rgba(28, 138, 89, 0.26);
}

body.admin-theme-light .shipment-history-highlight--profit small {
  color: #1c8a59;
}

body.admin-theme-light .shipment-history-highlight--loss {
  border-color: rgba(176, 58, 50, 0.24);
}

body.admin-theme-light .shipment-history-highlight--loss small {
  color: #b03a32;
}

body.admin-theme-light .shipment-history-delete-btn {
  background: linear-gradient(145deg, rgba(255, 239, 239, 0.98), rgba(255, 248, 248, 0.96));
  border-color: rgba(183, 40, 40, 0.22);
  color: #9b2f2f;
}

body.admin-theme-light .shipment-history-delete-btn:hover,
body.admin-theme-light .shipment-history-delete-btn:focus-visible {
  border-color: rgba(183, 40, 40, 0.36);
  background: linear-gradient(145deg, rgba(255, 228, 228, 0.98), rgba(255, 245, 245, 0.98));
  color: #842222;
}

@media (max-width: 1024px) {
  .shipment-history-action-slot {
    flex: 1 1 160px;
    max-width: none;
  }

  .shipment-history-meta-strip,
  .shipment-history-control-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shipment-history-meta-strip,
  .shipment-history-control-row {
    grid-template-columns: 1fr;
  }

  .shipment-history-action-slot {
    flex: 1 1 calc(50% - 0.5rem);
    max-width: none;
  }

  .shipment-history-update-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .shipment-history-delete-btn {
    margin-left: 0;
    width: 100%;
  }
}

.admin-chat-widget {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100050;
  display: grid;
  justify-items: end;
  gap: 0.55rem;
}

.admin-chat-toggle {
  min-width: 148px;
  border-radius: 999px;
  padding-inline: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.admin-chat-toggle-meta {
  font-size: 0.7rem;
  color: var(--muted);
}

.admin-chat-panel {
  width: min(760px, calc(100vw - 2rem));
  height: min(84vh, 780px);
  max-height: min(84vh, 780px);
  min-height: min(84vh, 780px);
  border: 1px solid rgba(var(--admin-gold-rgb), 0.28);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(8, 16, 33, 0.96), rgba(11, 21, 43, 0.96));
  box-shadow: 0 24px 54px rgba(var(--admin-shadow-rgb), 0.58);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.admin-chat-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(var(--admin-sky-rgb), 0.28);
}

.admin-chat-panel-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-family: "Fraunces", serif;
  color: var(--gold-soft);
}

.admin-chat-panel-body {
  display: grid;
  grid-template-columns: minmax(180px, 210px) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.admin-chat-online {
  border-right: 1px solid rgba(var(--admin-sky-rgb), 0.24);
  padding: 0.7rem;
  display: grid;
  gap: 0.45rem;
  align-content: start;
  min-height: 0;
  height: 100%;
}

.admin-chat-online h3,
.admin-chat-conversation h3 {
  margin: 0;
  font-size: 0.82rem;
  color: var(--gold-soft);
  font-family: "Fraunces", serif;
}

.admin-chat-online-list {
  display: grid;
  gap: 0.38rem;
  min-height: 0;
  overflow: auto;
}

.admin-chat-online-btn {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.3);
  border-radius: 9px;
  background: rgba(10, 20, 40, 0.82);
  color: var(--text);
  padding: 0.42rem 0.55rem;
  font-size: 0.78rem;
}

.admin-chat-online-btn:hover,
.admin-chat-online-btn:active {
  transform: none;
}

.admin-chat-online-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.45rem;
}

.admin-chat-online-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
  top: 0.08rem;
}

.admin-chat-online-btn.active {
  border-color: rgba(var(--admin-gold-rgb), 0.55);
  background: linear-gradient(120deg, rgba(var(--admin-gold-rgb), 0.18), rgba(var(--admin-sky-rgb), 0.16));
}

.admin-chat-online-btn.is-online {
  border-color: rgba(102, 215, 142, 0.78);
  box-shadow: 0 0 0 1px rgba(102, 215, 142, 0.22) inset;
}

.admin-chat-conversation {
  padding: 0.7rem;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  min-height: 0;
}

.admin-chat-messages {
  border: 1px dashed rgba(var(--admin-sky-rgb), 0.32);
  border-radius: 10px;
  padding: 0.55rem;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  background: rgba(7, 15, 31, 0.66);
}

.admin-chat-message {
  border: 1px solid rgba(var(--admin-sky-rgb), 0.26);
  border-radius: 10px;
  padding: 0.42rem 0.5rem;
  display: inline-grid;
  width: fit-content;
  max-width: min(95%, 440px);
  background: rgba(10, 20, 40, 0.84);
  row-gap: 0.22rem;
  box-shadow: 0 10px 22px rgba(var(--admin-shadow-rgb), 0.22);
}

.admin-chat-message.self {
  margin-left: auto;
  border-color: rgba(var(--admin-gold-rgb), 0.36);
  background: linear-gradient(140deg, rgba(var(--admin-gold-rgb), 0.16), rgba(10, 21, 43, 0.85));
}

.admin-chat-message-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.admin-chat-message-time {
  white-space: nowrap;
}

.admin-chat-message-footer {
  justify-self: end;
}

.admin-chat-message-read {
  display: inline-flex;
  font-size: 0.66rem;
  font-weight: 600;
  margin: 0;
}

.admin-chat-message-read--seen {
  color: #8ee2a2;
}

.admin-chat-message-read--pending {
  color: #9bb2d8;
}

.admin-chat-hint {
  margin: 0;
  opacity: 0.86;
}

.admin-chat-unread-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #06111f;
  background: linear-gradient(180deg, rgba(255, 230, 156, 1), rgba(255, 193, 106, 1));
  border: 1px solid rgba(var(--admin-gold-rgb), 0.65);
}

.admin-chat-message-text {
  margin: 0;
  line-height: 1.34;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-chat-toasts {
  width: min(360px, calc(100vw - 2rem));
  display: grid;
  justify-items: end;
  gap: 0.45rem;
  pointer-events: none;
}

.admin-chat-toast {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.42);
  background: rgba(8, 17, 34, 0.95);
  box-shadow: 0 12px 24px rgba(var(--admin-shadow-rgb), 0.45);
  padding: 0.5rem 0.65rem;
  color: var(--text);
  animation: admin-chat-toast-in 160ms ease-out;
}

.admin-chat-toast strong {
  display: block;
  font-size: 0.74rem;
  margin-bottom: 0.14rem;
  color: var(--gold-soft);
}

.admin-chat-toast .tiny {
  margin: 0;
}

.admin-chat-emoji-toolbar {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.admin-chat-emoji-toggle {
  min-width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.45);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(10, 18, 34, 0.85));
  color: var(--text);
  font-size: 1rem;
}

.admin-chat-emoji-toggle:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(var(--admin-gold-rgb), 0.68);
}

.admin-chat-emoji-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.4rem);
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.3rem;
  width: min(340px, 76vw);
  padding: 0.45rem;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.45);
  border-radius: 12px;
  background: linear-gradient(170deg, rgba(11, 22, 45, 0.98), rgba(8, 16, 31, 0.98));
  box-shadow: 0 16px 36px rgba(var(--admin-shadow-rgb), 0.45);
}

.admin-chat-emoji-option {
  border-radius: 9px;
  border: 1px solid rgba(var(--admin-sky-rgb), 0.28);
  background: rgba(8, 16, 30, 0.93);
  min-height: 2rem;
  min-width: 2rem;
  font-size: 1rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.admin-chat-emoji-option:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--admin-gold-rgb), 0.66);
  background: linear-gradient(150deg, rgba(var(--admin-gold-rgb), 0.24), rgba(255, 255, 255, 0.02));
}

.admin-chat-emoji-option:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

body.admin-theme-light .admin-chat-toggle {
  border-color: rgba(var(--admin-sky-rgb), 0.32);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(238, 246, 255, 0.9));
  color: var(--text-soft);
  box-shadow: 0 14px 28px rgba(20, 56, 97, 0.18);
}

body.admin-theme-light .admin-chat-toggle-meta {
  color: rgba(26, 58, 94, 0.72);
}

body.admin-theme-light .admin-chat-panel {
  border-color: rgba(var(--admin-sky-rgb), 0.28);
  background: linear-gradient(165deg, rgba(253, 255, 255, 0.98), rgba(240, 247, 255, 0.95));
  box-shadow: 0 30px 62px rgba(18, 43, 77, 0.26);
}

body.admin-theme-light .admin-chat-panel-head {
  border-bottom-color: rgba(var(--admin-sky-rgb), 0.22);
  background: rgba(255, 255, 255, 0.72);
}

body.admin-theme-light .admin-chat-panel-head h2 {
  color: var(--gold);
}

body.admin-theme-light .admin-chat-online {
  border-right-color: rgba(var(--admin-sky-rgb), 0.2);
  background: rgba(247, 252, 255, 0.84);
}

body.admin-theme-light .admin-chat-online h3,
body.admin-theme-light .admin-chat-conversation h3 {
  color: var(--menu-text-active);
}

body.admin-theme-light .admin-chat-online-btn {
  border-color: rgba(var(--admin-sky-rgb), 0.26);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-soft);
}

body.admin-theme-light .admin-chat-online-btn.active {
  border-color: rgba(var(--admin-sky-rgb), 0.5);
  background: linear-gradient(120deg, rgba(var(--admin-gold-rgb), 0.18), rgba(var(--admin-sky-rgb), 0.16));
}

body.admin-theme-light .admin-chat-messages {
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  border-style: solid;
  background: rgba(252, 255, 255, 0.9);
}

body.admin-theme-light .admin-chat-message {
  border-color: rgba(var(--admin-sky-rgb), 0.24);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.92));
  box-shadow: 0 9px 18px rgba(21, 53, 92, 0.12);
}

body.admin-theme-light .admin-chat-message.self {
  border-color: rgba(var(--admin-gold-rgb), 0.42);
  background: linear-gradient(140deg, rgba(var(--admin-gold-rgb), 0.2), rgba(255, 255, 255, 0.94));
}

body.admin-theme-light .admin-chat-message-read--pending {
  color: #55739d;
}

body.admin-theme-light .admin-chat-unread-badge {
  color: #3f2500;
  box-shadow: 0 6px 14px rgba(171, 104, 8, 0.24);
}

body.admin-theme-light .admin-chat-toast {
  border-color: rgba(var(--admin-sky-rgb), 0.32);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(21, 54, 91, 0.2);
}

body.admin-theme-light .admin-chat-toast strong {
  color: var(--menu-text-active);
}

body.admin-theme-light .admin-chat-emoji-toggle {
  border-color: rgba(var(--admin-sky-rgb), 0.34);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(238, 247, 255, 0.9));
  color: var(--text-soft);
}

body.admin-theme-light .admin-chat-emoji-popover {
  border-color: rgba(var(--admin-sky-rgb), 0.3);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.98), rgba(239, 248, 255, 0.95));
  box-shadow: 0 20px 38px rgba(18, 48, 84, 0.18);
}

body.admin-theme-light .admin-chat-emoji-option {
  border-color: rgba(var(--admin-sky-rgb), 0.22);
  background: rgba(255, 255, 255, 0.94);
}

body.admin-theme-light .admin-chat-emoji-option:hover {
  background: linear-gradient(150deg, rgba(var(--admin-gold-rgb), 0.2), rgba(var(--admin-sky-rgb), 0.12));
}

@keyframes admin-chat-toast-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .admin-chat-widget {
    right: 0.6rem;
    bottom: 0.6rem;
  }

  .admin-chat-panel {
    width: min(680px, calc(100vw - 1.2rem));
    height: min(88vh, 840px);
    max-height: min(88vh, 840px);
    min-height: min(88vh, 840px);
  }

  .admin-chat-panel-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .admin-chat-online {
    border-right: none;
    border-bottom: 1px solid rgba(var(--admin-sky-rgb), 0.24);
  }

  .admin-chat-online-list {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    max-height: none;
  }
}

.admin-chat-conversation .btnline {
  justify-content: flex-end;
}

#admin-direct-chat-send {
  min-width: 120px;
  border-radius: 11px;
  border: 1px solid rgba(var(--admin-gold-rgb), 0.6);
  background: linear-gradient(135deg, rgba(255, 211, 116, 0.95), rgba(247, 171, 71, 0.96));
  color: #1f1202;
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(247, 171, 71, 0.22);
}

#admin-direct-chat-send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(247, 171, 71, 0.3);
}

body.admin-theme-light #admin-direct-chat-send {
  border-color: rgba(var(--admin-gold-rgb), 0.5);
  background: linear-gradient(135deg, rgba(255, 210, 120, 0.92), rgba(239, 167, 72, 0.94));
  box-shadow: 0 10px 22px rgba(207, 134, 42, 0.22);
}

