/* colours and font */
:root {
  --bg: #f4f7f3;
  --surface: #fff;
  --ink: #193d35;
  --muted: #637970;
  --line: #dce6de;
  --brand: #22644f;
  --brand-soft: #e7f0e8;
  --danger: #c62121;
  --shadow: 0 18px 50px rgba(25, 61, 53, .12);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
.hidden {
  display: none !important;
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-weight: 700;
  color: #555c53;
}
.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  outline: none;
}
.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  background: var(--brand);
  color: #fff;
}
.btn:hover {
  filter: brightness(.96);
}
.btn:disabled {
  opacity: .55;
  cursor: wait;
}
.btn.secondary {
  background: #eef0eb;
  color: var(--ink);
}
.btn.block {
  width: 100%;
}
button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.error {
  color: var(--danger);
  font-size: 12px;
  margin: 12px 0 0;
}
.muted {
  color: var(--muted);
}
.brand {
  font-weight: 800;
  font-size: 16px;
}
.account {
  margin-left: auto;
  text-align: right;
}
.account small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.value {
  font-size: 24px;
  font-weight: 750;
}
@media(max-width:640px) {
  .topbar {
    gap: 10px;
  }
  .account {
    max-width: 130px;
    overflow-wrap: anywhere;
  }
  .shell {
    margin-top: 24px;
  }
}
/* login */
.login {
  min-height: 100vh;
  padding: 32px 3.4vw 36px;
}
.mgh-wordmark {
  display: inline-flex;
  align-items: center;
  color: var(--brand);
  font-family: Arial, sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -2px;
}
.mgh-wordmark:before {
  content: "";
  width: 18px;
  height: 25px;
  margin-right: 3px;
  background: repeating-linear-gradient(to bottom, transparent 0 5px, #b8c8be 5px 7px);
}
.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 48px;
  align-items: center;
  margin: 64px auto 0;
  max-width: 1100px;
}
.login .intro h1 {
  font: 700 38px/1.12 Georgia, serif;
  letter-spacing: -1px;
  margin: 16px 0;
}
.login .intro>p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 560px;
}
.group-badge {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 22px;
  padding: 5px 12px;
  letter-spacing: 1px;
  font-weight: 700;
  font-size: 11px;
}
.login-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}
.login-feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.login-feature strong {
  display: block;
  font-size: 14px;
}
.login-feature p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.feature-icon {
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 13px;
  padding: 9px;
  display: grid;
  place-items: center;
}
.login svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.login .card {
  background: #fff;
  padding: 26px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 45px -25px #193d3550;
}
.login .card h2 {
  font-size: 23px;
  margin: 0 0 8px;
}
.login .card>p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.login label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 8px;
}
.login-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 16px;
  color: #849c90;
  gap: 12px;
  background: #fff;
}
.login-input:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px #dceadf;
  color: var(--brand);
}
.login-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 11px 0;
  font-size: 14px;
  color: var(--ink);
}
.login .password-toggle {
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.login #loginBtn {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 600;
  padding: 12px;
  margin-top: 22px;
}
.login #loginBtn:hover {
  background: #164b3b;
}
.login #loginBtn:disabled {
  opacity: .6;
  cursor: wait;
}
.login-help {
  display: block;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 22px;
  padding-top: 18px;
}
.login .error {
  background: #fff2f2;
  border: 1px solid #ffc9c9;
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--danger);
  margin: 24px 0 0;
  font-size: 13px;
}
@media(max-width:850px) {
  .login {
    padding: 24px;
  }
  .login-layout {
    grid-template-columns: 1fr;
    max-width: 540px;
    margin-top: 30px;
    gap: 28px;
  }
  .login .intro h1 {
    font-size: 32px;
  }
  .login .intro>p {
    font-size: 14px;
  }
  .login-features {
    display: none;
  }
  .mgh-wordmark {
    font-size: 34px;
  }
}
select {
  font: inherit;
  color: inherit;
}
.shell {
  width: min(1480px, calc(100% - 40px));
  margin: 24px auto 40px;
}
.topbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
}
.filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}
.filters .field {
  margin: 0;
}
.filters .input {
  height: 38px;
  font-size: 12px;
  padding: 8px 10px;
}
.filter-actions .muted {
  font-size: 11px;
  margin-left: auto;
}
.report-error {
  margin: 14px 0;
  padding: 12px 16px;
  background: #fceeee;
  border: 1px solid #efc9c9;
  border-radius: 10px;
  color: var(--danger);
}
.tab.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}
.table-wrap {
  overflow: auto;
  max-height: 480px;
}
.report-table th,
.report-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #edf0e9;
}
.report-table td.num,
.report-table th.num {
  text-align: right;
}
.report-table tbody tr:hover {
  background: #f8faf6;
}
.link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.badge.overdue {
  background: #fbe9e9;
  color: #9d3838;
}
.badge.needs_review {
  background: #fff1d9;
  color: #97651c;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
}
.pager span {
  font-size: 11px;
  color: var(--muted);
}
.pager .btn {
  padding: 7px 11px;
  font-size: 11px;
}
.report-count {
  margin-left: auto;
}
.panel-head .sort-select {
  width: auto;
  padding: 5px 8px;
  font-size: 11px;
}
.loading {
  opacity: .55;
  pointer-events: none;
}
.empty-row {
  padding: 30px !important;
  text-align: center !important;
  color: var(--muted);
}
dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  width: min(980px, calc(100vw - 32px));
  max-height: 85vh;
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #20231f66;
}
.detail-body {
  padding: 20px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.detail-item {
  overflow-wrap: anywhere;
}
.detail-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.detail-item span {
  font-size: 12px;
}
.detail-body h3 {
  font-size: 13px;
  margin: 18px 0 10px;
}
.job {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  margin: 8px 0;
  font-size: 12px;
}
.job p {
  margin: 4px 0;
  color: var(--muted);
}
.detail-body pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 11px/1.6 ui-monospace, monospace;
  background: #f6f7f3;
  padding: 12px;
  border-radius: 8px;
}
.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;
}
.app,
.account-dialog {
  color: var(--ink);
}
.app .brand {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}
.app .logo {
  display: inline-grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  margin-right: 10px;
  letter-spacing: 0;
}
.profile-area button,
.account-dialog button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 9px;
  padding: 8px 13px;
  font: 600 12px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.profile-area #howItWorks {
  background: #dcece2;
  color: #174f3c;
  border-color: #abcab7;
  white-space: nowrap;
}
.profile-area #howItWorks:hover {
  background: #cbe2d4;
  border-color: var(--brand);
}
.profile-area button:hover,
.account-dialog button:hover {
  background: var(--brand-soft);
}
.profile-area .profile-avatar {
  border: 0;
  padding: 0;
  width: 36px;
  height: 36px;
  font-size: 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: white;
  font-weight: 700;
}
.profile-area .profile-avatar:hover {
  background: #164b3b;
}
.profile-menu {
  position: absolute;
  right: 0;
  top: 45px;
  min-width: 180px;
  max-width: 280px;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 28px #163e3220;
  z-index: 12;
}
.profile-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  white-space: nowrap;
  text-align: left;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}
.profile-menu button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profile-menu .menu-signout {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  padding-top: 11px;
}
.account-dialog {
  box-sizing: border-box;
  width: min(440px, calc(100vw - 24px));
  max-height: 94dvh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 100px #102c2650;
}
.account-dialog[open] {
  display: flex;
  flex-direction: column;
}
.account-dialog.guide-dialog {
  width: min(660px, calc(100vw - 24px));
}
.account-dialog::backdrop {
  background: #112c2680;
}
.modal-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-dialog .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 6px 20px 14px;
  font-size: 12px;
  background: #fff;
}
.account-dialog.guide-dialog .modal-body {
  padding: 14px 20px;
  background: var(--bg);
}
.profile-details {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px 16px;
  margin: 14px 0 4px;
}
.profile-details dt {
  color: var(--muted);
}
.profile-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.account-dialog .actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.account-dialog .primary {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.account-dialog .primary:hover {
  background: #164b3b;
}
.account-dialog button:disabled {
  opacity: .5;
  cursor: wait;
}
.account-dialog input {
  width: 100%;
  border: 1px solid #c7d6cb;
  border-radius: 8px;
  padding: 10px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.account-dialog input:focus {
  outline: 2px solid #7aa88e;
  outline-offset: 2px;
}
.account-dialog .field {
  margin: 0 0 14px;
}
.account-dialog .error {
  color: #c62121;
  margin: 12px 0 0;
}
.account-dialog h3 {
  font-size: 14px;
  margin: 18px 0 6px;
}
.account-dialog p {
  margin: 0 0 10px;
}
.account-dialog ul,
.account-dialog ol {
  padding-left: 20px;
}
.account-toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #193d35;
  color: white;
  padding: 13px 22px;
  border-radius: 10px;
  z-index: 50;
  max-width: 90vw;
  font-size: 14px;
}
@media(max-width:650px) {
  .app .topbar {
    padding: 12px;
  }
  .app .brand {
    font-size: 17px;
  }
  .profile-area {
    gap: 8px;
  }
  .profile-area #howItWorks {
    padding: 8px;
    font-size: 11px;
  }
  .account-dialog .modal-body {
    padding: 12px 16px 12px 12px;
  }
}
.app {
  min-height: 100vh;
  background: var(--bg);
}
.app .shell {
  max-width: 1520px;
  margin: 28px auto 40px;
}
.view {
  flex-shrink: 0;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #6a7e76;
  font-size: 12px;
  font-weight: 600;
}
.view.active {
  background: #e2eee7;
  color: #235940;
  border-color: #cbded1;
}
.view:hover {
  background: #edf2ef;
}
.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  margin: 0;
}
.filter-actions .btn {
  font-size: 11px;
  padding: 7px 13px;
}
.status-context {
  color: var(--brand);
  font-size: 10px;
  margin: 8px 0 0;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  border-radius: 11px;
  box-shadow: 0 1px 5px #183e2406;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 15px 18px;
  min-height: 54px;
}
.panel-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.015em;
}
.panel-head .muted {
  font-size: 10px;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  font-size: 11px;
  padding: 6px 9px;
}
.report-table {
  white-space: nowrap;
  font-size: 11px;
  width: 100%;
  border-collapse: collapse;
}
.report-table th {
  position: sticky;
  top: 0;
  font-weight: 700;
  color: var(--muted);
  z-index: 1;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .045em;
  padding: 11px 14px;
  background: #f7f9f8;
}
.report-table td {
  padding: 12px 14px;
  vertical-align: top;
  border-color: #edf1ef;
}
.report-table .link {
  text-decoration: none;
  font-weight: 550;
}
.report-table .link:hover {
  text-decoration: underline;
}
.report-table td small {
  display: block;
  color: #80908a;
  font-size: 9px;
  line-height: 1.6;
  margin-top: 2px;
}
.main-report th:first-child,
.main-report td:first-child {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  min-width: 180px;
  border-right: 1px solid #edf1ef;
}
.main-report th:first-child {
  z-index: 3;
  background: #f7f9f8;
}
.main-report .customer-cell {
  white-space: normal;
  min-width: 145px;
  max-width: 180px;
  line-height: 1.5;
}
.main-report .owner-cell {
  white-space: normal;
  min-width: 105px;
  max-width: 130px;
}
.main-report td strong {
  font-weight: 550;
}
.late-cell {
  color: #b94a36;
  font-weight: 650;
}
.badge {
  display: inline-block;
  background: #edf1eb;
  color: #52634f;
  font-size: 9px;
  border-radius: 5px;
  padding: 4px 7px;
  font-weight: 550;
}
.note {
  color: var(--muted);
  margin: 0;
  border-top: 1px solid var(--line);
  font-size: 10px;
  padding: 8px 16px;
}
.detail-body .table-wrap table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
}
.detail-body .table-wrap th,
.detail-body .table-wrap td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.detail-body .table-wrap th {
  background: #f4f7f4;
  color: var(--muted);
}
.export-dialog .field {
  margin: 0;
  min-width: 0;
}
.export-dialog label {
  font-size: 10px;
  font-weight: 600;
}
.export-dialog .input {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 7px;
  height: 36px;
}
.export-dialog fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
  min-width: 0;
}
.export-dialog legend {
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 10px;
}
.export-dialog small {
  font-size: 10px;
  display: block;
  margin-top: 5px;
}
.export-preview {
  background: #f4f7f5;
  padding: 12px;
  border-radius: 7px;
  margin: 18px 0 12px;
  font-size: 12px;
  font-weight: 600;
}
.export-dialog[open] {
  display: flex;
  flex-direction: column;
}
.export-limit .field {
  align-content: start;
}
.export-limit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: #f2f7f3;
  border-radius: 9px;
  padding: 12px;
  margin-bottom: 12px;
}
.export-dialog .export-preview {
  flex-shrink: 0;
  margin-top: 12px;
}
.export-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: 90vh;
}
.export-dialog .detail-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  flex: 1;
  background: #f5f8f6;
  padding: 16px;
  gap: 12px;
}
.export-fields {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 3px;
}
.export-card-head h3 {
  font-size: 13px;
  margin: 0;
  font-weight: 700;
}
.export-card-head .muted {
  font-size: 10px;
}
.export-card-head .btn {
  font-size: 10px;
  padding: 6px 10px;
  background: #f0f4f1;
}
.export-card fieldset {
  margin-bottom: 0;
}
.export-card .export-limit {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  gap: 16px;
}
.export-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #dfe7e2;
  border-radius: 10px;
  padding: 12px 16px;
  flex-shrink: 0;
}
.export-summary .export-preview {
  background: transparent;
  padding: 0;
  margin: 0 !important;
  font-size: 12px;
  font-weight: 600;
  flex: 1;
}
.export-summary .btn {
  font-size: 12px;
  white-space: nowrap;
}
.export-options .export-limit {
  grid-template-columns: 1fr 1fr;
}
.export-options .field {
  align-content: start;
}
.export-card {
  background: #fff;
  border: 1px solid #dfe7e2;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px #173c2804;
  padding: 14px;
}
.export-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.export-card .input {
  height: 34px;
}
.app select:not([multiple]),
dialog select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23637970' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
}
.export-dialog .export-summary {
  justify-content: flex-end;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.profile-area .sync-cache {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}
.profile-area .sync-cache:hover {
  background: var(--brand-soft);
}
.sync-cache-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes finance-cache-spin {
  to {
    transform: rotate(360deg)
  }
}
.shipment-filters .field:has(#searchFilter) {
  flex-basis: 210px;
}
.shipment-filters .field:has(#countryFilter) {
  flex-basis: 155px;
}
.shipment-filters .field:has(#userFilter) {
  flex-basis: 190px;
}
.shipment-filters .field:has(#dateFrom),
.shipment-filters .field:has(#dateTo) {
  flex-basis: 140px;
}
.shipment-filters .field:has(#modeFilter),
.shipment-filters .field:has(#directionFilter) {
  flex-basis: 145px;
}
.shipment-filters .field:has(#statusFilter) {
  flex-basis: 220px;
}
.shipment-filters .filter-actions {
  padding-bottom: 3px;
}
.shipment-filters .filter-actions .btn {
  height: 36px;
}
.shipment-filter-head .filter-actions {
  display: flex;
  gap: 8px;
  margin: 0;
}
.shipment-filters {
  flex-wrap: wrap;
  align-items: flex-end;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 12px;
}
.shipment-filters .input {
  width: 100%;
  height: 34px;
  padding: 6px 10px;
  line-height: 20px;
}
.shipment-filters .field {
  flex: 0 1 170px;
  margin: 0;
  min-width: 0;
  gap: 4px;
}
.filter-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 4px #183e2410;
  padding: 12px 14px;
  margin-bottom: 16px;
}
@media(max-width:1250px) {
  .shipment-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media(max-width:900px) {
  .shipment-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.shipment-filters .shipment-search {
  grid-column: span 2;
}
.search-control {
  display: flex;
  border: 1px solid #e0e7e2;
  border-radius: 6px;
  background: #fafcfb;
  overflow: hidden;
  min-width: 0;
}
.shipment-filters .search-control .input {
  border: 0;
  border-radius: 0;
  background-color: transparent;
  min-width: 0;
}
.search-control #searchColumn {
  flex: 0 0 44%;
  width: 44%;
  border-right: 1px solid #e0e7e2;
}
.search-control #searchFilter {
  flex: 1;
  width: 0;
}
.search-control:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.search-control .input:focus {
  box-shadow: none;
}
.shipment-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  min-height: 30px;
}
.shipment-filter-head .filter-actions button:disabled {
  opacity: .45;
  cursor: default;
}
.panel-head .pager {
  padding: 0;
  flex-wrap: wrap;
  gap: 8px;
}
.panel-head:has(.pager) {
  flex-wrap: wrap;
}
.panel-head .pager span {
  white-space: nowrap;
}
.shipment-info {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 5px;
  border: 1px solid #dce6df;
  border-radius: 8px;
  background: #f5f9f6;
  color: #38644e;
  cursor: pointer;
}
.shipment-info:hover {
  background: #e2eee6;
}
.shipment-info svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
.shipment-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.shipment-metrics>div {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #dfe7e2;
  border-radius: 10px;
}
.shipment-metrics small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.shipment-metrics strong {
  display: block;
  font-size: 22px;
  margin-top: 4px;
}
.shipment-metrics>div:last-child strong {
  font-size: 16px;
}
.shipment-section {
  padding: 16px;
  background: #fff;
  border: 1px solid #dfe7e2;
  border-radius: 10px;
  margin: 12px 0;
  scroll-margin-top: 75px;
}
.shipment-section h3 {
  margin: 0 0 14px;
}
.shipment-section .detail-grid {
  margin-bottom: 0;
  gap: 16px 20px;
}
.shipment-section p {
  font-size: 11px;
  line-height: 1.6;
}
.detail-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 16px;
}
#detailDialog {
  background: #f5f8f6;
  width: min(960px, calc(100vw - 28px));
  max-height: 88vh;
}
#detailDialog .detail-body {
  padding: 14px;
}
#detailDialog .shipment-metrics>div {
  padding: 9px 12px;
  border-radius: 8px;
}
#detailDialog .shipment-metrics strong {
  font-size: 18px;
  margin-top: 2px;
}
#detailDialog .shipment-section {
  padding: 12px;
  margin: 8px 0;
  border-radius: 8px;
}
#detailDialog .shipment-section h3 {
  margin: 0 0 9px;
  font-size: 12px;
}
#detailDialog .detail-grid {
  gap: 10px 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
#detailDialog .detail-item small {
  font-size: 10px;
}
#detailDialog .detail-item span {
  font-size: 11px;
}
#detailDialog .shipment-section p {
  margin: 8px 0 0;
  font-size: 10px;
}
#detailDialog summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 11px;
}
@media(max-width:700px) {
  #detailDialog .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #detailDialog .detail-body {
    padding: 10px;
  }
}
#clearBtn:not(:disabled) {
  background: #fcecec;
  color: #a83232;
  border: 1px solid #e8aaaa;
}
#clearBtn:not(:disabled):hover {
  background: #f8dada;
}
.flow-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  border: 2px solid #a4b9ac;
  background: #fff;
  border-radius: 50%;
  z-index: 1;
}
.recorded .flow-dot {
  background: #3d7659;
  border-color: #3d7659;
}
.billing-flow small {
  font-size: 10px;
  color: var(--muted);
}
.billing-flow strong {
  font-size: 12px;
  font-weight: 600;
}
.billing-flow li>span:last-child {
  font-size: 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.billing-flow li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 22px 0 0;
  text-align: center;
  align-items: center;
}
.billing-flow .flow-dot {
  left: calc(50% - 6px);
}
.billing-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 5px;
  border-top: 2px solid #d8e4dc;
  left: 50%;
  right: -50%;
}
.billing-flow li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 2px;
  width: 6px;
  height: 6px;
  border-top: 2px solid #8ca899;
  border-right: 2px solid #8ca899;
  transform: rotate(45deg);
  right: -4px;
}
.billing-flow li>strong {
  font-size: 12px !important;
}
.billing-flow li>small {
  font-size: 10px;
}
#detailDialog .shipment-metrics {
  gap: 8px;
  margin: 10px 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
#detailDialog .shipment-metrics>div:last-child strong {
  font-size: 13px;
}
.billing-flow {
  display: grid;
  list-style: none;
  padding: 0;
  width: 100%;
  margin: 12px 0 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
/* phones: two steps per row, without the connecting lines */
@media(max-width:600px) {
  .billing-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 14px;
  }
  .billing-flow li::before,
  .billing-flow li::after {
    display: none;
  }
}
.modal-table-wrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid #e1e8e3;
  border-radius: 6px;
}
.modal-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  line-height: 1.5;
}
.modal-data-table th,
.modal-data-table td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e8eee9;
  min-width: 75px;
}
.modal-data-table th {
  background: #f3f7f4;
  color: #64756c;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}
.modal-data-table td {
  background: #fff;
  max-width: 220px;
  overflow-wrap: anywhere;
}
.modal-data-table strong {
  font-weight: 600;
}
.modal-data-table small {
  display: block;
  color: #748178;
  font-size: 9px;
  margin-top: 2px;
}
.modal-data-table .num {
  text-align: right;
  white-space: nowrap;
}
.modal-data-table .invoice-expansion>td {
  background: #fafcfb;
  padding: 5px 10px;
}
.invoice-expansion details>summary {
  color: var(--brand);
  font-size: 10px !important;
}
.invoice-expansion .detail-grid {
  padding: 12px 0;
}
.invoice-table-note {
  margin: 0 0 10px !important;
  color: var(--muted);
  font-size: 10px !important;
}
.modal-data-table tbody tr:last-child>td {
  border-bottom: 0;
}
.filter-card input,
.filter-card select,
.filter-card button {
  font-family: inherit;
}
.filter-card .field label {
  color: #6c7c76;
  font-size: 11px;
  font-weight: 500;
}
.filter-card .input {
  background: #fafcfb;
  border-color: #e0e7e2;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}
.shipment-filter-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.shipment-filter-head .btn {
  height: 30px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
}
/* Total rows sit first, under the headings */
#pivotPanel .pivot-total td {
  font-weight: 600;
  color: var(--ink);
  background: #f6f8f6;
  border-bottom: 2px solid var(--line);
}
#pivotPanel .report-table {
  table-layout: fixed;
  white-space: normal;
  font-size: 10px;
}
#pivotPanel .report-table th,
#pivotPanel .report-table td {
  padding: 8px 6px;
  overflow-wrap: anywhere;
  min-width: 0;
}
#pivotPanel .report-table .num {
  font-variant-numeric: tabular-nums;
}
#pivotPanel .report-table th:first-child,
#pivotPanel .report-table td:first-child {
  width: 32%;
  white-space: normal;
  min-width: 0;
  padding-left: 14px;
}
#pivotPanel .report-table th:last-child,
#pivotPanel .report-table td:last-child {
  padding-right: 14px;
}
@media(max-width:1000px) {
  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pivot-layout {
    grid-template-columns: 1fr;
  }
}
.pivot-wide,
.pivot-full {
  grid-column: 1 / -1;
}
/* Dashboard tabs on the left, the direction switch on the right */
.dashboard-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
}
.dashboard-bar .dashboard-tabs {
  margin: 0;
}
/* a card's Direction and Mode filters: two small dropdowns right of its title; a used one is tinted */
.card-filters {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
  order: 5;
}
.card-filter {
  height: 28px;
  padding: 0 24px 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background-color: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.card-filter.filtered {
  background-color: #edf6ef;
  border-color: #71a083;
  color: #214f38;
  font-weight: 600;
}
.pivot-wide .panel-head > .muted {
  order: 2;
}
/* Dashboard tabs: one per use case, a smaller version of the header tabs */
.dashboard-tabs {
  display: inline-flex;
  gap: 2px;
  margin: 0 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
}
.dashboard-tabs button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  cursor: pointer;
  white-space: nowrap;
}
.dashboard-tabs button:hover:not(.active) {
  background: var(--brand-soft);
}
.dashboard-tabs button.active {
  background: var(--brand);
  color: #fff;
}
.customer-search {
  width: 220px;
  height: 32px;
  order: 6;
}
.customer-count {
  order: 7;
}
.customer-count {
  font-size: 11px;
  white-space: nowrap;
}
.pivot-wide .panel-head {
  flex-wrap: wrap;
}
@media(max-width:600px) {
  .dashboard-tabs {
    display: flex;
    overflow-x: auto;
  }
  .dashboard-tabs button {
    flex: 1;
    padding: 7px 10px;
  }
  .customer-search {
    width: 100%;
  }
}
/* the month table scrolls sideways under a fixed country column */
#pivotPanel .pivot-wide .table-wrap {
  overflow-x: auto;
}
#pivotPanel .pivot-wide .monthly-table {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
}
#pivotPanel .pivot-wide .monthly-table th,
#pivotPanel .pivot-wide .monthly-table td {
  white-space: nowrap;
  overflow-wrap: normal;
  min-width: 104px;
}
#pivotPanel .pivot-wide .monthly-table th:first-child,
#pivotPanel .pivot-wide .monthly-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  white-space: normal;
  overflow-wrap: break-word;
  background: var(--surface);
  box-shadow: inset -1px 0 0 var(--line);
}
#pivotPanel .pivot-wide .monthly-table thead th:first-child {
  z-index: 3;
  background: #e7eee9;
}
#pivotPanel .pivot-wide .monthly-table .pivot-total td:first-child {
  background: #f6f8f6;
  z-index: 3;
}
.monthly-table td strong {
  display: block;
  font-weight: 600;
}
.month-line {
  display: block;
  white-space: nowrap;
  line-height: 1.5;
}
.month-label {
  margin-right: 6px;
  color: var(--muted);
  font-size: 10px;
}
.month-link,
.month-count {
  font: inherit;
  color: var(--muted);
}
.month-link {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.month-link.invoiced {
  color: var(--brand);
}
.month-link.pending {
  color: #a35a00;
}
.month-link:hover,
.month-link:focus-visible {
  text-decoration-style: solid;
}
.pivot-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
#pivotPanel .table-wrap {
  overflow-x: hidden;
  max-height: 420px;
}
/* the Countries, Customers and Ops users tables show every row: the page scrolls, not the card */
#pivotPanel .pivot-wide .table-wrap,
#pivotPanel .pivot-full .table-wrap {
  max-height: none;
}
/* the month columns start after a clear divider, under their own group heading */
#pivotPanel .pivot-wide .monthly-table .month-first {
  border-left: 2px solid var(--line);
}
#pivotPanel .pivot-wide .monthly-table .head-groups th {
  padding-top: 6px;
  padding-bottom: 4px;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  background: #f3f6f4;
}
#pivotPanel .pivot-wide .monthly-table .head-groups th:first-child {
  background: #f3f6f4;
}
/* customer names are long: the name column takes the spare width so the months sit together */
#pivotPanel .pivot-wide .customer-table th:first-child,
#pivotPanel .pivot-wide .customer-table td:first-child {
  width: 34%;
  min-width: 220px;
  max-width: none;
}
#pivotPanel .pivot-wide .monthly-table td.stat,
#pivotPanel .pivot-wide .monthly-table th.stat {
  min-width: 84px;
  white-space: normal;
}
@media(max-width:750px) {
  .pivot-layout {
    grid-template-columns: 1fr;
  }
}
.pivot-drill {
  cursor: pointer;
}
.pivot-drill:hover td,
.pivot-drill:focus td {
  background: #eaf3ed;
}
.pivot-drill:focus {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}
.filter-card .input.filter-applied,
.filter-card .search-control.filter-applied {
  background-color: #edf6ef;
  border-color: #71a083;
  box-shadow: 0 0 0 1px #71a083;
  color: #214f38;
}
.filter-card .search-control.filter-applied .input {
  box-shadow: none;
  background-color: transparent;
}
.filter-card .field:has(.filter-applied)>label {
  color: #286044;
  font-weight: 600;
}
#filterActions button[type="submit"] {
  font-weight: 400;
  background: #e4eee7;
  color: #315d43;
  border: 1px solid #c1d5c7;
}
#filterActions button[type="submit"]:not(:disabled):hover {
  background: #d5e5da;
}
.table-loading-cell {
  text-align: center !important;
  height: 150px;
  vertical-align: middle !important;
  color: var(--muted);
  font-size: 12px;
}
.table-loader {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 9px;
  vertical-align: middle;
  border: 2px solid #dce8df;
  border-top-color: #3e7155;
  border-radius: 50%;
  animation: finance-cache-spin .8s linear infinite;
}
#dashboardContent.loading {
  opacity: 1;
}
@media(prefers-reduced-motion:reduce) {
  .table-loader {
    animation: none;
  }
}
.counted-select {
  position: relative;
  min-width: 0;
}
.counted-select select {
  color: transparent !important;
}
.counted-select select option {
  color: var(--ink);
  background: #fff;
}
.selected-filter-label {
  position: absolute;
  left: 10px;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 20px;
  color: var(--ink);
}
.counted-select:has(.filter-applied) .selected-filter-label {
  color: #214f38;
}
@media(forced-colors:active) {
  .app select:not([multiple]),
    dialog select:not([multiple]) {
    appearance: auto;
    -webkit-appearance: auto;
    background-image: none;
  }
  .counted-select select {
    color: CanvasText !important;
  }
  .selected-filter-label {
    display: none;
  }
}
.panel-head h2,
.shipment-filter-head h2,
.export-card-head h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}
.report-table th,
.modal-data-table th {
  text-transform: none;
  letter-spacing: normal;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  background: #f2f6f3;
  color: #596e62;
}
#pivotPanel .report-table th {
  line-height: 1.35;
  font-size: 11px;
  font-weight: 700;
  background: #e7eee9;
  color: var(--ink);
}
.profile-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
/* brand | tabs | buttons: equal side columns keep the tabs in the exact centre */
.app .topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  padding: 14px 32px;
}
/* Home / Dashboard: centred pill tabs */
.finance-view-tabs {
  display: flex;
  gap: 2px;
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 3px;
}
.finance-view-tabs button {
  white-space: nowrap;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 20px;
  cursor: pointer;
}
.finance-view-tabs button:hover:not(.active) {
  background: var(--brand-soft);
}
.finance-view-tabs button.active {
  background: var(--ink);
  color: #fff;
}
@media(max-width:760px) {
  .finance-view-tabs button {
    flex: 1;
    padding: 8px 10px;
  }
  .app .shell {
    margin-top: 16px;
  }
  .finance-view-tabs {
    order: 3;
    flex-basis: 100%;
    margin: 0;
  }
  .app .topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
  }
  .profile-area {
    gap: 7px;
  }
}
@media(max-width:600px) {
  .shell {
    width: calc(100% - 24px);
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .filter-actions {
    flex-wrap: wrap;
  }
  .filter-actions .muted {
    margin-left: 0;
    width: 100%;
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .account small {
    display: none;
  }
  .app .topbar {
    padding: 12px;
  }
  .panel-head {
    flex-wrap: wrap;
    padding: 12px;
  }
  .tab {
    padding: 5px 7px;
    font-size: 10px;
  }
  .report-table th,
    .report-table td {
    padding: 10px;
  }
  .export-dialog {
    max-height: 90vh;
  }
  .export-limit {
    padding: 10px;
    gap: 10px;
    grid-template-columns: 1fr;
  }
  .export-limit .field:first-child {
    margin-bottom: 4px;
  }
  .app .brand {
    font-size: 15px;
  }
  .app .profile-area {
    gap: 7px;
  }
  .export-dialog .detail-body {
    padding: 10px;
    gap: 10px;
  }
  .export-fields {
    gap: 10px;
  }
  .export-card-head {
    margin-bottom: 10px;
  }
  .export-card-head .muted {
    font-size: 9px;
  }
  .export-summary {
    padding: 10px;
    gap: 8px;
  }
  .export-summary .export-preview {
    font-size: 10px;
  }
  .export-summary .btn {
    font-size: 10px;
    padding: 9px 10px;
  }
  .export-options .export-limit {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .sync-cache-label {
    display: none;
  }
  .profile-area .sync-cache {
    padding: 7px;
    min-width: 30px;
  }
  .profile-area #howItWorks {
    font-size: 0 !important;
    width: 30px;
    padding: 7px !important;
  }
  .profile-area #howItWorks::after {
    content: '?';
    font-size: 14px;
    font-weight: 700;
  }
  .shipment-filters .field {
    flex: 1 1 calc(50% - 10px) !important;
  }
  .shipment-filters .filter-actions {
    flex-basis: 100%;
    justify-content: flex-end;
    padding: 0;
  }
  .shipment-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .filter-card {
    padding: 12px;
  }
  .shipment-filter-head {
    margin-bottom: 10px;
  }
  .shipment-filters .shipment-search {
    grid-column: 1/-1;
  }
  .shipment-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .shipment-section {
    padding: 12px;
  }
  .billing-flow strong {
    font-size: 10px;
  }
  .billing-flow li>span:last-child {
    font-size: 9px;
  }
  #detailDialog .shipment-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shipment-filters .field:has(#dateFrom) {
    grid-column: 1;
  }
}
dialog.finance-modal {
  border-radius: 14px;
  color: var(--ink);
}
dialog.finance-modal>.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 20px 12px;
  margin: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
dialog.finance-modal>.modal-header>div {
  min-width: 0;
}
dialog.finance-modal>.modal-header h2 {
  color: var(--ink);
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: normal;
  margin: 0;
  overflow-wrap: anywhere;
}
dialog.finance-modal>.modal-header p {
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  margin: 3px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
dialog.finance-modal>.modal-header>.modal-close {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 6px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
dialog.finance-modal>.modal-header>.modal-close:hover {
  background: var(--brand-soft);
}
.sla-guide {
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid #dce6de;
  border-radius: 8px;
  background: #f3f7f4;
}
.sla-flow {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  color: #24563e;
}
.sla-flow>span {
  white-space: nowrap;
  line-height: 20px;
}
.sla-connector {
  flex: 1;
  min-width: 0;
  padding-bottom: 9px;
}
.sla-rule-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 9px;
}
.sla-rule {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}
.sla-rule strong {
  font-weight: 600;
  color: #24563e;
}
.sla-flow-arrow {
  display: block;
  position: relative;
  height: 1px;
  background: #8da995;
}
.sla-flow-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  border-top: 1px solid #8da995;
  border-right: 1px solid #8da995;
  transform: rotate(45deg);
}
.account-dialog .sla-caption {
  margin: 9px 0 0;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
}

/* search list for long dropdowns (select[data-searchable]) */
.select-picker {
  position: fixed;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(360px, 60vh);
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.select-picker .input {
  flex-shrink: 0;
  width: 100%;
  height: 34px;
}
.select-picker ul {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}
.select-picker li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink);
  cursor: pointer;
}
.select-picker li small {
  flex-shrink: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.select-picker li.active {
  background: var(--brand-soft);
}
.select-picker li[aria-selected="true"] {
  font-weight: 600;
  color: var(--brand);
}
.select-picker li.picker-note {
  color: var(--muted);
  font-size: 12px;
  cursor: default;
}

/* export: all shipments, or the shipment list's filters when ticked */
.export-scope {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.export-scope input {
  margin: 3px 0 0;
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}
.export-scope span {
  display: grid;
  gap: 2px;
  font-size: 13px;
}
.export-scope.disabled {
  cursor: default;
}
.export-scope.disabled strong {
  color: var(--muted);
}
.export-scope small {
  color: var(--muted);
  font-size: 12px;
}
.export-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0 26px;
  padding: 0;
  list-style: none;
}
.export-filter-list li {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--ink);
  font-size: 12px;
}
/* shipment modal: created after departure */
#detailDialog .shipment-note {
  background: #fff8e6;
  border-color: #f0dca8;
}
#detailDialog .shipment-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}
