.job-actions {
  align-items: center;
  display: flex;
  gap: 14px;
}

.dashboard-job-stack {
  display: grid;
  gap: 17px;
}

.customer-branding {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e7ebf3;
  display: flex;
  justify-content: center;
  min-height: 88px;
  padding: 10px 34px;
}

.customer-branding img {
  display: block;
  max-height: 98px;
  max-width: min(760px, 100%);
  object-fit: contain;
}

.customer-branding strong {
  color: #26314a;
  font-size: 24px;
}

.job-overview {
  align-items: stretch;
  display: grid;
  gap: 17px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 17px;
}

.metric-stack {
  display: grid;
  gap: 10px;
  grid-template-rows: repeat(3, 1fr);
}

.metric-stack .metric {
  min-height: 0;
  padding: 12px 17px;
}

.metric-stack .metric-icon {
  height: 39px;
  width: 39px;
}

.metric-stack .metric strong {
  font-size: 20px;
}

.metric-stack .metric small {
  color: #5f6b80;
  font-size: 12px;
}

.metric-stack .metric em {
  color: #667287;
  font-size: 11px;
  line-height: 1.35;
}

.job-overview .compact-delivery-chart {
  margin: 0;
}

.compact-delivery-chart .chart {
  height: 240px;
  padding: 10px 14px 14px;
}

.delivery-chart-meta {
  align-items: center;
  color: #647086;
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  min-height: 24px;
  padding: 0 3px 7px 39px;
}

.delivery-chart-meta strong { color: #4f5b72; }

.delivery-chart-area {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  height: 176px;
}

.delivery-scale {
  color: #69758a;
  display: flex;
  flex-direction: column;
  font-size: 9px;
  height: 142px;
  justify-content: space-between;
  padding: 0 7px 0 0;
  text-align: right;
}

.delivery-chart-scroll {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 5px;
}

.delivery-bars {
  background-image: linear-gradient(to bottom, #e8ebf2 1px, transparent 1px);
  background-size: 100% 50%;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(var(--delivery-columns), 30px);
  height: 166px;
  margin: 0;
  padding: 0 7px;
  position: relative;
  width: max-content;
}

.delivery-bar {
  display: grid;
  grid-template-rows: 142px 24px;
  min-width: 0;
  position: relative;
}

.delivery-bar-track {
  align-items: end;
  display: flex;
  height: 142px;
  justify-content: center;
}

.delivery-bar-track i {
  background: linear-gradient(180deg,#8c70eb,#557ce8);
  border-radius: 5px 5px 2px 2px;
  box-shadow: 0 3px 8px rgba(80,91,201,.13);
  display: block;
  min-height: 3px;
  transition: filter 140ms ease, transform 140ms ease;
  width: 18px;
}

.delivery-bar:hover .delivery-bar-track i {
  filter: saturate(1.25) brightness(.95);
  transform: scaleX(1.12);
}

.delivery-bar.total-bar .delivery-bar-track i {
  background: linear-gradient(180deg,#34b985,#17815d);
  box-shadow: 0 3px 8px rgba(23,129,93,.18);
}

.delivery-bar.total-bar small {
  color: #24795d;
  font-weight: 800;
}

.search-hero form.single-customer-search {
  grid-template-columns: 1fr auto;
}

.search-button-spinner {
  animation: geo-spin 700ms linear infinite;
  border: 2px solid rgba(255,255,255,.42);
  border-radius: 50%;
  border-top-color: #fff;
  display: none;
  height: 14px;
  width: 14px;
}

.search-hero form.searching .search-button-spinner { display: inline-block; }
.search-hero form.searching .button { cursor: wait; opacity: .88; }

.search-results>a[data-mailpiece-url] {
  cursor: pointer;
}

.search-result-details {
  display: grid;
  gap: 7px 16px;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin: 12px 0 0;
}

.search-result-details>div { min-width: 0; }
.search-result-details dt { color: #737f94; font-size: 9px; font-weight: 800; letter-spacing: .55px; text-transform: uppercase; }
.search-result-details dd { color: #344058; font-size: 10px; line-height: 1.45; margin: 3px 0 0; overflow-wrap: anywhere; }
.search-result-more { color: #6f5bcb!important; display: block; font-weight: 700; margin-top: 8px!important; }
.search-result-arrow { align-self: center; color: #7a68cf; }

.delivery-bar small {
  color: #5f6b80;
  font-size: 10px;
  line-height: 1.2;
  padding-top: 7px;
  text-align: center;
  white-space: nowrap;
}

.delivery-bar small.muted-tick {
  border-top: 3px solid #d9dee8;
  margin: 0 auto;
  padding: 0;
  width: 1px;
}

tbody tr td {
  transition: background-color 150ms ease, color 150ms ease;
}

tbody tr:hover td:not(.empty) {
  background: #f3f1ff;
}

tbody tr:hover .job-icon {
  background: #ddd7ff;
  color: #5138bf;
}

.delivery-panel {
  margin-bottom: 17px;
}

.geography-panel {
  margin-bottom: 17px;
}

.delivery-panel .eyebrow,
.geography-panel .eyebrow,
[data-mailpiece-search] .eyebrow {
  color: #647086;
  font-size: 11px;
}

.geography-panel th,
[data-mailpiece-search] th {
  color: #687489;
  font-size: 11px;
}

.geography-panel .rate-pill {
  font-size: 10px;
}

[data-mailpiece-search] .cell-sub {
  color: #687489;
  font-size: 11px;
}

.progressive-label {
  background: #e9f7f1;
  border-radius: 999px;
  color: #18835f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .7px;
  padding: 6px 10px;
  text-transform: uppercase;
}

.delivery-map {
  background: #e8edf5;
  height: 390px;
  width: 100%;
  z-index: 1;
}

.leaflet-tooltip {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(20, 31, 59, .18);
  color: #26314a;
  font-size: 11px;
  font-weight: 700;
}

.geo-browser {
  display: grid;
  grid-template-columns: minmax(330px, .72fr) minmax(520px, 1.28fr);
  min-height: 380px;
}

.geo-state-panel {
  border-right: 1px solid #e7ebf3;
  max-height: 600px;
  overflow: auto;
}

.geo-section-head,
.piece-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 65px;
  padding: 14px 18px;
}

.geo-section-head strong,
.geo-section-head small,
.piece-head strong,
.piece-head small {
  display: block;
}

.geo-section-head strong,
.piece-head strong {
  font-size: 13px;
}

.geo-section-head small,
.piece-head small {
  color: #667287;
  font-size: 11px;
  margin-top: 4px;
}

.geo-section-head > span {
  background: #eeeaff;
  border-radius: 999px;
  color: #654dcc;
  font-size: 9px;
  font-weight: 800;
  padding: 5px 8px;
}

.geo-table tbody tr {
  cursor: pointer;
}

.geo-table tbody tr.selected td {
  background: #ebe7ff;
  color: #44328f;
}

.rate-pill {
  background: #e5f7f0;
  border-radius: 999px;
  color: #16875e;
  display: inline-flex;
  font-size: 9px;
  font-weight: 800;
  padding: 5px 8px;
}

.geo-drilldown {
  min-width: 0;
  overflow: hidden;
}

.geo-placeholder,
.geo-loading,
.geo-error {
  align-items: center;
  color: #8b96aa;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 300px;
  padding: 30px;
  text-align: center;
}

.geo-placeholder > span {
  background: #eeeaff;
  border-radius: 18px;
  color: #6e56d8;
  display: grid;
  font-size: 28px;
  height: 60px;
  margin-bottom: 15px;
  place-items: center;
  width: 60px;
}

.geo-placeholder strong {
  color: #344058;
  font-size: 14px;
}

.geo-placeholder p {
  font-size: 11px;
  line-height: 1.6;
  max-width: 320px;
}

.geo-loading {
  flex-direction: row;
  font-size: 11px;
  gap: 10px;
}

.geo-loading span {
  animation: geo-spin 800ms linear infinite;
  border: 2px solid #ded9f8;
  border-radius: 50%;
  border-top-color: #7057db;
  height: 18px;
  width: 18px;
}

@keyframes geo-spin { to { transform: rotate(360deg); } }

.text-button,
.pagination button {
  background: transparent;
  border: 0;
  color: #684ed2;
  font-size: 10px;
  font-weight: 800;
}

.pagination button:disabled {
  color: #b0b7c4;
  cursor: default;
}

.pagination.compact {
  padding: 12px 18px;
}

.piece-head {
  background: #faf9ff;
  border-top: 1px solid #ded9f5;
}

.piece-table td small {
  color: #687489;
  display: block;
  font-size: 10px;
  margin-top: 3px;
}

.event-action {
  background: transparent;
  border: 0;
  white-space: nowrap;
}

.event-drilldown {
  background: #f8f7ff;
  border-top: 1px solid #ded9f5;
}

.inline-search[role="search"] {
  align-items: center;
  background: #fff;
  border: 1px solid #dfe4ed;
  border-radius: 9px;
  min-width: min(390px, 42vw);
  overflow: hidden;
}

.inline-search[role="search"] input {
  border: 0;
  border-radius: 0;
  flex: 1;
  min-width: 0;
}

.live-search-state {
  color: #687489;
  flex: 0 0 auto;
  font-size: 10px;
  padding: 0 11px 0 5px;
  white-space: nowrap;
}

.live-search-state.searching { color: #684ed2; }

body.modal-open { overflow: hidden; }

.mailpiece-modal {
  display: grid;
  inset: 0;
  padding: 28px;
  place-items: center;
  position: fixed;
  z-index: 1000;
}

.mailpiece-modal[hidden] { display: none; }

.mailpiece-modal-backdrop {
  background: rgba(11, 18, 37, .68);
  border: 0;
  inset: 0;
  position: absolute;
}

.mailpiece-modal-dialog {
  background: #fff;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(8, 15, 34, .35);
  max-height: min(820px, calc(100vh - 56px));
  max-width: 1040px;
  overflow: hidden;
  position: relative;
  width: min(1040px, calc(100vw - 56px));
}

.mailpiece-modal-dialog>header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px 22px;
}

.mailpiece-modal-dialog>header h2 { font-size: 18px; margin: 4px 0 0; }
.modal-close { background: #f1f3f7; border: 0; border-radius: 9px; color: #647089; font-size: 22px; height: 36px; line-height: 1; width: 36px; }
.modal-close:hover { background: #e8e4fb; color: #5f49c5; }
.mailpiece-modal-body { max-height: calc(100vh - 150px); overflow: auto; }
.modal-overview-grid { background: #fafbfe; border-bottom: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: 1.1fr .9fr; padding: 14px; }
.modal-route-card,.modal-piece-summary { background: #fff; border: 1px solid #e7ebf3; border-radius: 12px; overflow: hidden; }
.modal-card-heading { align-items: center; display: flex; justify-content: space-between; padding: 11px 13px; }
.modal-card-heading h3 { font-size: 12px; margin: 3px 0 0; }
.modal-card-heading>span { background: #eeeaff; border-radius: 99px; color: #654dcc; font-size: 8px; font-weight: 800; padding: 5px 7px; text-transform: uppercase; }
.modal-route-map { background: #e8edf5; height: 205px; }
.modal-route-map .leaflet-control-attribution { font-size: 7px; }
.map-empty { align-items: center; color: #929caf; display: flex; font-size: 10px; height: 100%; justify-content: center; }
.modal-piece-summary { display: block; padding: 15px; }
.modal-piece-summary p { color: #69758a; font-size: 11px; line-height: 1.65; margin: 10px 0 0; }
.modal-piece-summary dl { border-top: 1px solid #eef0f5; display: grid; gap: 10px; grid-template-columns: 1fr; margin: 13px 0 0; padding-top: 12px; }
.modal-piece-summary dl>div,.modal-record-details dl>div { min-width: 0; }
.modal-piece-summary dt,.modal-record-details dt { color: #929caf; font-size: 8px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.modal-piece-summary dd,.modal-record-details dd { color: #344058; font-size: 10px; line-height: 1.5; margin: 5px 0 0; overflow-wrap: anywhere; }
.modal-record-details,.modal-events { padding: 15px 18px; }
.modal-record-details { border-bottom: 1px solid var(--line); }
.modal-record-details h3,.modal-events h3 { font-size: 12px; margin: 0 0 11px; }
.modal-record-details dl { display: grid; gap: 11px 18px; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0; }
.modal-events .scan-events { padding: 0; }

.event-summary {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 17px 20px;
}

.event-summary strong,
.event-summary small {
  display: block;
}

.event-summary strong {
  color: #2c3750;
  font-size: 13px;
}

.event-summary small {
  color: #8994a8;
  font-size: 10px;
  margin-top: 4px;
}

.event-summary a {
  color: #684ed2;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.scan-events {
  display: grid;
  gap: 0;
  padding: 2px 22px 18px;
}

.scan-event {
  display: grid;
  gap: 12px;
  grid-template-columns: 18px minmax(145px, .75fr) minmax(220px, 1.25fr);
  padding: 14px 0;
  position: relative;
}

.scan-event + .scan-event {
  border-top: 1px solid #e7e3f6;
}

.scan-event > span {
  background: #7259dc;
  border: 4px solid #e4dffc;
  border-radius: 50%;
  height: 13px;
  margin-top: 2px;
  width: 13px;
}

.scan-event strong,
.scan-event small {
  display: block;
}

.scan-event strong {
  color: #303b53;
  font-size: 11px;
}

.scan-event small {
  color: #8b96aa;
  font-size: 9px;
  line-height: 1.55;
  margin-top: 4px;
}

.scan-event p {
  color: #59657b;
  font-size: 10px;
  line-height: 1.55;
  margin: 3px 0 0;
}

.upload-layout-modern {
  align-items: start;
  display: grid;
  gap: 17px;
  grid-template-columns: minmax(0, 1fr) 330px;
}

.upload-studio {
  min-width: 0;
}

.upload-hero {
  align-items: center;
  background: linear-gradient(125deg, #191f3b, #293b70);
  color: white;
  display: flex;
  justify-content: space-between;
  min-height: 128px;
  padding: 25px 28px;
}

.upload-hero h2 {
  font-size: 21px;
  margin: 5px 0;
}

.upload-hero > div > p:last-child {
  color: #bdc8df;
  font-size: 11px;
  margin: 0;
}

.upload-steps {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0 0 0 25px;
  padding: 0;
}

.upload-steps li {
  align-items: center;
  color: #7f8cab;
  display: flex;
  font-size: 9px;
  font-weight: 800;
  gap: 5px;
  text-transform: uppercase;
}

.upload-steps li:not(:last-child):after {
  background: #405078;
  content: "";
  height: 1px;
  margin: 0 5px;
  width: 18px;
}

.upload-steps span {
  border: 1px solid #566485;
  border-radius: 50%;
  display: grid;
  height: 25px;
  place-items: center;
  width: 25px;
}

.upload-steps li.active {
  color: white;
}

.upload-steps li.active span {
  background: #765fe1;
  border-color: #8c76ef;
}

.upload-steps li.complete span {
  background: #28a77b;
  border-color: #28a77b;
}

.upload-details {
  display: grid;
  gap: 13px;
  grid-template-columns: 1.25fr 1fr .7fr;
  padding: 22px 24px 8px;
}

.upload-details label,
.control-group > strong {
  color: #77839a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .55px;
  text-transform: uppercase;
}

.upload-details input,
.upload-details select,
.custom-field input {
  background: white;
  border: 1px solid #dfe4ed;
  border-radius: 9px;
  color: #17223b;
  display: block;
  margin-top: 6px;
  outline: none;
  padding: 10px 11px;
  width: 100%;
}

.upload-details input:focus,
.upload-details select:focus,
.custom-field input:focus {
  border-color: #806ae2;
  box-shadow: 0 0 0 3px #eeeaff;
}

.drop-zone {
  border: 2px dashed #d8dcea;
  border-radius: 15px;
  margin: 15px 24px 24px;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.drop-zone.dragging {
  background: #f5f2ff;
  border-color: #745de0;
  transform: scale(.995);
}

.drop-zone input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.drop-zone > label {
  align-items: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 28px;
  text-align: center;
}

.drop-zone strong {
  font-size: 14px;
  margin-top: 10px;
}

.drop-zone small {
  color: #8c97aa;
  font-size: 10px;
  margin: 6px 0 17px;
}

.drop-icon {
  background: #eeeaff;
  border-radius: 15px;
  color: #7058da;
  display: grid;
  font-size: 23px;
  height: 50px;
  place-items: center;
  width: 50px;
}

.selected-file {
  align-items: center;
  background: #f8f9fc;
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  margin: 15px 24px;
  padding: 12px 14px;
}

.selected-file > div {
  flex: 1;
  min-width: 0;
}

.selected-file strong,
.selected-file small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-file strong {
  font-size: 11px;
}

.selected-file small {
  color: #8b96aa;
  font-size: 9px;
  margin-top: 3px;
}

.selected-file button,
.custom-field button {
  background: transparent;
  border: 0;
  color: #684ed2;
  font-size: 10px;
  font-weight: 800;
}

.file-badge {
  background: #e7f2ff;
  border-radius: 8px;
  color: #2776c9;
  font-size: 9px;
  font-weight: 900;
  padding: 8px;
}

.mapping-studio {
  border-top: 1px solid #e7ebf3;
}

.mapping-controls {
  align-items: center;
  background: #fafbfe;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  padding: 14px 24px;
}

.control-group {
  align-items: center;
  display: flex;
  gap: 12px;
}

.segmented {
  background: #eceff5;
  border-radius: 9px;
  display: flex;
  padding: 3px;
}

.segmented input {
  opacity: 0;
  position: absolute;
}

.segmented span {
  border-radius: 7px;
  color: #818ca0;
  cursor: pointer;
  display: block;
  font-size: 9px;
  font-weight: 750;
  padding: 7px 10px;
}

.segmented input:checked + span {
  background: white;
  box-shadow: 0 2px 7px rgba(35, 48, 80, .12);
  color: #5f48c9;
}

.header-toggle {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
}

.header-toggle > input {
  opacity: 0;
  position: absolute;
}

.header-toggle > span {
  background: #ccd2df;
  border-radius: 20px;
  height: 22px;
  position: relative;
  transition: background-color 150ms ease;
  width: 39px;
}

.header-toggle > span:after {
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(20, 30, 50, .2);
  content: "";
  height: 16px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform 150ms ease;
  width: 16px;
}

.header-toggle input:checked + span {
  background: #7058da;
}

.header-toggle input:checked + span:after {
  transform: translateX(17px);
}

.header-toggle strong,
.header-toggle small {
  display: block;
}

.header-toggle strong {
  font-size: 10px;
}

.header-toggle small {
  color: #949daf;
  font-size: 8px;
  margin-top: 2px;
}

.mapper-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  padding: 22px 24px 13px;
}

.mapper-head h3 {
  font-size: 15px;
  margin: 4px 0;
}

.mapper-head > div > p:last-child {
  color: #8994a8;
  font-size: 9px;
  margin: 0;
}

.mapping-status,
.queue-count {
  background: #fff1df;
  border-radius: 999px;
  color: #af6d16;
  font-size: 9px;
  font-weight: 800;
  padding: 6px 9px;
  white-space: nowrap;
}

.mapping-status.complete {
  background: #e5f7f0;
  color: #16875e;
}

.mapping-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 24px 11px;
}

.mapping-tag {
  background: #f0f2f7;
  border: 1px solid #e1e5ee;
  border-radius: 8px;
  color: #68748b;
  cursor: grab;
  font-size: 9px;
  font-weight: 800;
  padding: 7px 10px;
}

.mapping-tag.required {
  background: #eeeaff;
  border-color: #ded7fc;
  color: #654dcc;
}

.mapping-tag.optional {
  background: #e9f4ff;
  border-color: #d6e9fb;
  color: #3476b7;
}

.mapping-tag.selected {
  box-shadow: 0 0 0 3px rgba(112, 88, 218, .18);
  transform: translateY(-1px);
}

.mapping-tag.used {
  background: #e7f8f1;
  border-color: #ccebdd;
  color: #16805b;
}

.mapping-tag.used:after {
  content: " ✓";
}

.custom-field {
  display: flex;
  margin: 0 24px 20px;
  max-width: 330px;
}

.custom-field input {
  border-radius: 8px 0 0 8px;
  margin: 0;
  padding: 8px 10px;
}

.custom-field button {
  border: 1px solid #dfe4ed;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  padding: 0 11px;
  white-space: nowrap;
}

.preview-toolbar {
  align-items: center;
  border-bottom: 1px solid #e7ebf3;
  border-top: 1px solid #e7ebf3;
  display: flex;
  justify-content: space-between;
  padding: 10px 24px;
}

.preview-tabs {
  display: flex;
  gap: 4px;
}

.preview-tabs button,
.record-nav button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #8994a8;
  font-size: 9px;
  font-weight: 800;
  padding: 7px 9px;
}

.preview-tabs button.active {
  background: #eeeaff;
  color: #624bc9;
}

.record-nav {
  align-items: center;
  display: flex;
  gap: 6px;
}

.record-nav span {
  color: #8792a6;
  font-size: 9px;
  min-width: 100px;
  text-align: center;
}

.file-preview {
  background: #fcfcfe;
  min-height: 220px;
}

.preview-scroll {
  max-height: 440px;
  overflow: auto;
}

.preview-table {
  min-width: 760px;
}

.preview-table th {
  background: #f7f8fc;
  min-width: 155px;
  padding: 8px;
  position: sticky;
  top: 0;
  vertical-align: top;
  z-index: 2;
}

.preview-table td {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  max-width: 230px;
  overflow: hidden;
  padding: 9px 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-drop {
  background: white;
  border: 1px dashed #cfd5e1;
  border-radius: 8px;
  display: block;
  min-height: 48px;
  padding: 7px 8px;
  text-align: left;
  width: 100%;
}

.column-drop > span,
.column-drop > small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-drop > span {
  color: #8a95a8;
  font-size: 9px;
  font-weight: 800;
}

.column-drop > small {
  color: #a2aab8;
  font-size: 8px;
  margin-top: 4px;
}

.column-drop.mapped {
  background: #f0edff;
  border-color: #7b65db;
  border-style: solid;
}

.column-drop.mapped > span {
  color: #5d48bd;
}

.column-drop.drag-over {
  background: #e6f7f0;
  border-color: #22a678;
  transform: scale(1.02);
}

.preview-foot {
  border-top: 1px solid #e7ebf3;
  color: #939daf;
  font-size: 9px;
  padding: 10px 14px;
  text-align: right;
}

.record-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px 20px 20px;
}

.record-preview article {
  border-bottom: 1px solid #eceef4;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr);
  padding: 10px 7px;
}

.record-preview article > div strong,
.record-preview article > div p {
  display: block;
  font-size: 9px;
  margin: 0;
}

.record-preview article > div strong {
  color: #8b96aa;
}

.record-preview article > div p {
  color: #465269;
  font-family: "SFMono-Regular", Consolas, monospace;
  line-height: 1.5;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.upload-submit {
  align-items: center;
  border-top: 1px solid #e7ebf3;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 17px 24px;
}

.submission-check {
  align-items: center;
  display: flex;
  gap: 10px;
}

.submission-check > span {
  background: #f0f2f7;
  border-radius: 50%;
  color: #919caf;
  display: grid;
  flex: 0 0 auto;
  height: 29px;
  place-items: center;
  width: 29px;
}

.submission-check strong,
.submission-check small {
  display: block;
}

.submission-check strong {
  font-size: 10px;
}

.submission-check small {
  color: #929caf;
  font-size: 8px;
  margin-top: 3px;
}

.submission-check.ready > span {
  background: #e5f7f0;
  color: #16875e;
}

.upload-submit .button:disabled {
  box-shadow: none;
  cursor: not-allowed;
  filter: grayscale(.4);
  opacity: .48;
}

.queue-panel {
  max-height: calc(100vh - 145px);
  position: sticky;
  top: 120px;
}

.queue-panel .pending-list {
  max-height: calc(100vh - 230px);
  overflow: auto;
}

@media (max-width: 780px) {
  .customer-branding {
    min-height: 62px;
    padding: 8px 16px;
  }

  .customer-branding img {
    max-height: 72px;
  }

  .job-overview {
    grid-template-columns: 1fr;
  }

  .metric-stack {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .job-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
  }

  .delivery-map {
    height: 310px;
  }

  .geo-browser {
    grid-template-columns: 1fr;
  }

  .geo-state-panel {
    border-bottom: 1px solid #e7ebf3;
    border-right: 0;
    max-height: 380px;
  }

  .scan-event {
    grid-template-columns: 18px 1fr;
  }

  .scan-event > div:last-child {
    grid-column: 2;
  }

  .upload-layout-modern,
  .upload-details,
  .record-preview {
    grid-template-columns: 1fr;
  }

  .upload-hero,
  .mapping-controls,
  .mapper-head,
  .upload-submit {
    align-items: flex-start;
    flex-direction: column;
  }

  .upload-steps {
    margin: 18px 0 0;
  }

  .mapping-controls {
    display: flex;
  }

  .header-toggle {
    width: 100%;
  }

  .record-preview article {
    grid-template-columns: 125px minmax(0, 1fr);
  }

  .upload-submit .button {
    width: 100%;
  }

  .queue-panel {
    max-height: none;
    position: static;
  }

  .inline-search[role="search"] { min-width: 0; width: 100%; }
  .mailpiece-modal { padding: 10px; }
  .mailpiece-modal-dialog { border-radius: 14px; max-height: calc(100vh - 20px); width: calc(100vw - 20px); }
  .mailpiece-modal-body { max-height: calc(100vh - 92px); }
  .modal-overview-grid { grid-template-columns: 1fr; }
  .modal-record-details dl { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1100px) and (min-width: 781px) {
  .job-overview {
    grid-template-columns: 1fr;
  }

  .metric-stack {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: none;
  }

  .geo-browser {
    grid-template-columns: 1fr;
  }

  .geo-state-panel {
    border-bottom: 1px solid #e7ebf3;
    border-right: 0;
  }

  .upload-layout-modern {
    grid-template-columns: 1fr;
  }

  .queue-panel {
    max-height: none;
    position: static;
  }
}

/* Hierarchical account management */
.management-hero {
  align-items: center;
  background: linear-gradient(120deg, #17233f, #293f70);
  border-radius: 18px;
  color: white;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  overflow: hidden;
  padding: 23px 26px;
  position: relative;
}

.management-hero h2 { font-size: 21px; margin: 11px 0 5px; }
.management-hero p { color: #bdc9df; font-size: 12px; margin: 0; }
.hierarchy-key { align-items: center; display: flex; gap: 8px; margin-left: 28px; position: relative; }
.hierarchy-key span { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); border-radius: 9px; font-size: 10px; font-weight: 800; padding: 9px 11px; }
.hierarchy-key i { color: #7688ab; font-style: normal; }
.management-tabs { display: flex; gap: 5px; margin: 0 0 13px; }
.management-tabs a { border-radius: 10px; color: #77839a; font-size: 12px; font-weight: 750; padding: 10px 13px; }
.management-tabs a:hover { background: white; }
.management-tabs a.active { background: #edeaff; color: #654dcc; }
.management-tabs b { background: rgba(107,82,211,.1); border-radius: 99px; font-size: 9px; margin-left: 5px; padding: 3px 6px; }
.tenant-admin-workspace,.system-admin-workspace { margin-bottom: 16px; }
.tenant-admin-grid { display: grid; gap: 22px; grid-template-columns: minmax(0,1.2fr) minmax(330px,.8fr); padding: 18px 22px 22px; }
.tenant-admin-create { background: #f7f8fc; border: 1px solid #eceff5; border-radius: 12px; display: grid; gap: 10px; padding: 15px; }
.tenant-admin-create h3 { font-size: 14px; margin: 4px 0 2px; }
.tenant-admin-create label { color: #748097; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.tenant-admin-create input,.tenant-admin-create select { background: #fff; border: 1px solid #dfe4ed; border-radius: 8px; display: block; margin-top: 5px; padding: 9px; width: 100%; }
.system-admin-list { max-height: 340px; overflow: auto; }
.directory-shell { align-items: start; display: grid; grid-template-columns: minmax(300px, .72fr) minmax(500px, 1.6fr); gap: 16px; }
.directory-list,.directory-detail { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.directory-list { position: sticky; top: 120px; }
.directory-tools { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 8px; padding: 13px; }
.directory-search { align-items: center; background: #f6f8fb; border: 1px solid #e5e9f0; border-radius: 9px; display: flex; flex: 1; gap: 7px; padding: 0 10px; }
.directory-search span { color: #8c97aa; }
.directory-search input { background: transparent; border: 0; min-width: 0; outline: 0; padding: 10px 0; width: 100%; }
.button.compact { flex: 0 0 auto; padding: 10px 12px; }
.directory-scroll { max-height: calc(100vh - 275px); min-height: 320px; overflow: auto; padding: 7px; }
.directory-row { align-items: center; border: 1px solid transparent; border-radius: 11px; display: grid; gap: 10px; grid-template-columns: auto 1fr auto auto; padding: 11px; transition: .15s ease; }
.directory-row:hover { background: #f7f6fe; transform: translateX(2px); }
.directory-row.active { background: #f0edff; border-color: #ded7fb; }
.directory-row strong,.directory-row small { display: block; }
.directory-row strong { font-size: 12px; }
.directory-row small { color: #8e99ab; font-size: 9px; margin-top: 4px; }
.directory-row>i { color: #a5adbb; font-style: normal; }
.directory-row>em { background: #e6f7f0; border-radius: 99px; color: #14825b; font-size: 8px; font-style: normal; font-weight: 800; padding: 4px 6px; text-transform: uppercase; }
.entity-icon { border-radius: 10px; display: grid; flex: 0 0 auto; font-size: 11px; font-weight: 850; height: 35px; place-items: center; width: 35px; }
.entity-icon.tenant { background: #e9edff; color: #5269cf; }
.entity-icon.customer { background: #e5f7f0; color: #16875e; }
.entity-icon.user { background: #fff0df; color: #b46f20; }
.entity-icon.large { border-radius: 14px; font-size: 18px; height: 50px; width: 50px; }
.directory-empty { color: #929caf; font-size: 11px; padding: 30px 15px; text-align: center; }
.directory-detail { min-height: 510px; }
.detail-heading { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 14px; min-height: 92px; padding: 20px 24px; }
.detail-heading h2 { font-size: 19px; margin: 4px 0; }
.detail-heading p:not(.eyebrow) { color: #8a95a8; font-size: 10px; margin: 0; }
.entity-metrics { background: #fafbfe; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); }
.entity-metrics div { border-right: 1px solid var(--line); padding: 15px 24px; }
.entity-metrics div:last-child { border: 0; }
.entity-metrics strong,.entity-metrics span { display: block; }
.entity-metrics strong { font-size: 20px; }
.entity-metrics span { color: #8d97a9; font-size: 9px; margin-top: 2px; text-transform: uppercase; }
.detail-section { border-bottom: 1px solid var(--line); padding: 20px 24px; }
.section-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 13px; }
.section-heading h3 { font-size: 14px; margin: 4px 0 0; }
.section-heading>a { color: var(--violet); font-size: 10px; font-weight: 750; }
.role-chip { background: #edeaff; border-radius: 99px; color: #654dcc; font-size: 8px; font-weight: 800; padding: 5px 8px; text-transform: uppercase; }
.people-list article,.people-list>a { align-items: center; border-top: 1px solid #f0f2f6; display: flex; gap: 10px; padding: 10px 2px; }
.people-list article:first-child,.people-list>a:first-child { border: 0; }
.people-list article>div,.people-list>a>div { flex: 1; }
.people-list strong,.people-list small { display: block; }
.people-list strong { font-size: 11px; }
.people-list small { color: #929caf; font-size: 9px; margin-top: 3px; }
.people-list>a:hover strong { color: var(--violet); }
.people-list>a>i { color: #a3acba; font-style: normal; }
.admin-people details { border-top: 1px solid #f0f2f6; }
.admin-people details:first-child { border: 0; }
.admin-people summary { align-items: center; cursor: pointer; display: flex; gap: 10px; list-style: none; padding: 10px 2px; }
.admin-people summary::-webkit-details-marker { display: none; }
.admin-people summary>div { flex: 1; }
.admin-people details form { align-items: end; background: #f7f8fc; border-radius: 10px; display: grid; gap: 9px; grid-template-columns: 1fr 1fr 1fr auto; margin: 0 0 11px; padding: 12px; }
.admin-people details label { color: #748097; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.admin-people details input { border: 1px solid #dfe4ed; border-radius: 8px; display: block; margin-top: 5px; min-width: 0; padding: 8px; width: 100%; }
.linked-list { display: grid; gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.linked-list>a { align-items: center; background: #fafbfe; border: 1px solid #edf0f5; border-radius: 10px; display: grid; gap: 9px; grid-template-columns: auto 1fr auto auto; padding: 9px; }
.linked-list>a:hover { border-color: #d8d0f8; background: #f7f5ff; }
.linked-list strong { font-size: 10px; }
.linked-list small { color: #8d97a9; font-size: 9px; }
.linked-list i { color: #9ba5b4; font-style: normal; }
.muted-copy { color: #929caf; font-size: 10px; }
.form-fields { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-fields.two { align-items: end; grid-template-columns: 1fr 1fr 1fr auto; }
.form-fields label,.detail-section>label { color: #6f7b91; display: block; font-size: 9px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.form-fields input,.form-fields select,.detail-section>label input { background: white; border: 1px solid #dfe4ed; border-radius: 9px; color: var(--ink); display: block; margin-top: 6px; outline: 0; padding: 10px 11px; width: 100%; }
.form-fields input:focus,.form-fields select:focus,.detail-section>label input:focus { border-color: #806ae2; box-shadow: 0 0 0 3px #eeeaff; }
.form-fields label small { color: #9aa4b5; display: block; font-size: 8px; font-weight: 500; letter-spacing: 0; margin-top: 5px; text-transform: none; }
.optional { color: #a1a9b7; float: right; font-weight: 500; text-transform: none; }
.detail-actions { align-items: center; background: #fafbfe; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; padding: 15px 24px; }
.detail-form>.detail-section { border: 0; padding-bottom: 30px; padding-top: 30px; }
.detail-form.embedded>.detail-section { border-bottom: 0; }
.nested-form { background: #fafbfe; }
.customer-profile .form-fields.two { grid-template-columns: 1fr 1fr auto; }
.safe-note { color: #8792a6; font-size: 9px; margin-right: auto; }
.brand-preview { align-items: center; background: #f7f9fc; border: 1px dashed #dbe1ea; border-radius: 12px; display: flex; justify-content: center; min-height: 96px; overflow: hidden; padding: 14px; }
.brand-preview img { display: block; max-height: 100px; max-width: 100%; object-fit: contain; }
.brand-preview>span { background: #eae6fc; border-radius: 12px; color: #6752c8; display: grid; font-size: 18px; font-weight: 850; height: 46px; margin-right: 12px; place-items: center; width: 46px; }
.brand-preview strong,.brand-preview small { display: block; }
.brand-preview strong { font-size: 11px; }.brand-preview small { color: #939dae; font-size: 9px; margin-top: 4px; }
.branding-actions { align-items: center; display: flex; gap: 8px; margin-top: 11px; }
.file-button { background: #edeaff; border-radius: 9px; color: #654dcc; cursor: pointer; flex: 1; font-size: 10px; font-weight: 750; overflow: hidden; padding: 11px; text-overflow: ellipsis; white-space: nowrap; }
.file-button input { font-size: 9px; margin-left: 12px; }
.remove-branding { margin-top: 8px; text-align: right; }
.remove-branding button { background: none; border: 0; color: #ad5a63; font-size: 9px; }
.detail-placeholder { color: #909bad; display: grid; min-height: 510px; place-content: center; text-align: center; }
.detail-placeholder>span { color: #d3cdef; font-size: 42px; }.detail-placeholder h2 { color: var(--ink); font-size: 17px; margin: 10px 0 4px; }.detail-placeholder p { font-size: 10px; }

@media (max-width: 1000px) {
  .management-hero { align-items: flex-start; flex-direction: column; }
  .hierarchy-key { margin: 18px 0 0; }
  .directory-shell { grid-template-columns: 1fr; }
  .directory-list { position: static; }
  .directory-scroll { max-height: 370px; }
  .form-fields.two { grid-template-columns: 1fr 1fr; }
  .admin-people details form { grid-template-columns: 1fr 1fr; }
  .customer-profile .form-fields.two { grid-template-columns: 1fr 1fr auto; }
  .tenant-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .search-hero form.single-customer-search { grid-template-columns: 1fr; }
  .search-result-details { grid-template-columns: 1fr; }
  .hierarchy-key { flex-wrap: wrap; }
  .management-tabs { overflow-x: auto; }
  .directory-tools { align-items: stretch; flex-direction: column; }
  .linked-list,.form-fields,.form-fields.two { grid-template-columns: 1fr; }
  .admin-people details form,.customer-profile .form-fields.two { grid-template-columns: 1fr; }
  .entity-metrics div { padding: 13px; }
  .branding-actions { align-items: stretch; flex-direction: column; }
  .branding-actions .button,.file-button { width: 100%; }
}
