:root {
  --graphite: #283142;
  --sidebar: #172233;
  --sidebar-deep: #111a28;
  --cobalt: #0057b8;
  --cobalt-active: #0867d8;
  --white: #ffffff;
  --page: #f3f6fa;
  --panel: #f8fafc;
  --border: #dde3ea;
  --text: #111827;
  --muted: #667085;
  --success: #16a34a;
  --warning: #f59e0b;
  --critical: #dc2626;
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.08);
  --soft-shadow: 0 10px 30px rgba(17, 24, 39, 0.07);
}

/* Requests · pre-shipment sales workflow */
.requests-page {
  display: grid;
  gap: 18px;
}

.requests-registry-view,
.requests-detail-view {
  display: grid;
  gap: 16px;
}

.requests-hero {
  padding: 22px 24px 18px;
}

.requests-hero-top,
.requests-register-toolbar,
.request-detail-title-row,
.request-panel-head,
.requests-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.requests-hero-copy p,
.request-panel-head p {
  margin: 0 0 4px;
  color: var(--cobalt);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.requests-hero-copy h2,
.requests-register-toolbar h2,
.request-panel-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 680;
}

.requests-hero-copy > span,
.requests-register-toolbar > div > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.requests-create-button {
  min-height: 40px;
  padding-inline: 17px;
}

.requests-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.requests-stat {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
  padding: 17px 18px 0;
  border-left: 1px solid var(--border);
}

.requests-stat:first-child { border-left: 0; padding-left: 0; }
.requests-stat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.requests-stat.blue::before, .requests-stat.cobalt::before { background: var(--cobalt); }
.requests-stat.amber::before { background: #d89112; }
.requests-stat strong { color: var(--text); font-size: 22px; font-weight: 720; }
.requests-stat span { color: var(--muted); font-size: 12px; font-weight: 560; }

.requests-register { overflow: hidden; }
.requests-register-toolbar { padding: 18px 20px 14px; }
.requests-search { width: min(360px, 42vw); }
.requests-filter-bar { padding: 0 20px 14px; border-bottom: 1px solid var(--border); }
.requests-stage-tabs, .requests-type-tabs { display: flex; align-items: center; gap: 4px; }
.requests-stage-tabs { min-width: 0; overflow-x: auto; }
.requests-stage-tabs button,
.requests-type-tabs button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #637083;
  font: inherit;
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
  cursor: pointer;
}
.requests-stage-tabs button:hover,
.requests-type-tabs button:hover { background: #f2f5f9; color: var(--text); }
.requests-stage-tabs button.active,
.requests-type-tabs button.active { color: var(--cobalt); background: #edf5ff; border-color: #d6e7fb; }
.requests-type-tabs { padding-left: 12px; border-left: 1px solid var(--border); }

.requests-register-head,
.requests-register-row {
  display: grid;
  grid-template-columns: 132px 1.03fr 1.38fr .88fr 1fr;
  gap: 16px;
  align-items: center;
}
.requests-register-head {
  min-height: 36px;
  padding: 0 20px;
  color: #7a8798;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.requests-register-row {
  position: relative;
  width: 100%;
  min-height: 86px;
  padding: 14px 20px;
  border: 0;
  border-bottom: 1px solid #e7ebf0;
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}
.requests-register-row:last-child { border-bottom: 0; }
.requests-register-row:hover { z-index: 1; background: #fbfdff; box-shadow: inset 3px 0 0 var(--cobalt); }
.requests-register-row.attention { box-shadow: inset 3px 0 0 #e29a20; }
.requests-register-row > span { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.requests-register-row b, .requests-register-row strong { min-width: 0; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.requests-register-row small { min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.request-cargo-cell > b {
  display: -webkit-box;
  line-height: 1.35;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.request-stage-cell { position: relative; padding-left: 16px; }
.request-stage-dot { position: absolute; top: 5px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: #7b8795; box-shadow: 0 0 0 4px #eef1f5; }
.request-stage-dot.new, .request-stage-dot.calculation, .request-stage-dot.proposal_ready, .request-stage-dot.proposal_sent { background: var(--cobalt); box-shadow: 0 0 0 4px #e8f2ff; }
.request-stage-dot.negotiation { background: #d89112; box-shadow: 0 0 0 4px #fff5df; }
.request-stage-dot.won { background: #139a55; box-shadow: 0 0 0 4px #e8f7ef; }
.request-stage-dot.rejected { background: #d63b46; box-shadow: 0 0 0 4px #fdecee; }
.request-identity-cell > strong { color: var(--cobalt); font-size: 12px; }
.request-proposal-cell > b { font-size: 14px; }
.request-owner-cell small.overdue { color: #a96508; font-weight: 650; }

.requests-detail-toolbar { margin-bottom: -4px; }
.request-detail { display: grid; gap: 16px; }
.request-detail-header { padding: 22px 24px 18px; overflow: hidden; }
.request-detail-title-row { align-items: flex-start; }
.request-detail-identity > span { color: var(--cobalt); font-size: 11px; font-weight: 720; letter-spacing: .075em; text-transform: uppercase; }
.request-detail-identity h2 { margin: 4px 0 3px; color: var(--text); font-size: 30px; font-weight: 690; line-height: 1; }
.request-detail-identity p { margin: 0; color: #4f5d70; font-size: 14px; font-weight: 590; }
.request-detail-actions { display: flex; align-items: center; gap: 10px; }
.request-detail .secondary-button,
.request-dialog .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #cbd7e4;
  border-radius: 9px;
  color: #34445a;
  background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.request-detail .secondary-button:hover:not(:disabled),
.request-dialog .secondary-button:hover:not(:disabled) {
  border-color: #9db9d8;
  color: var(--cobalt);
  background: #f4f8fd;
  box-shadow: 0 4px 12px rgba(17, 24, 39, .07);
}
.request-detail .secondary-button:active:not(:disabled),
.request-dialog .secondary-button:active:not(:disabled) { transform: translateY(1px); }
.request-detail .secondary-button:focus-visible,
.request-dialog .secondary-button:focus-visible { outline: 3px solid rgba(0, 87, 184, .15); outline-offset: 2px; }
.request-detail .secondary-button:disabled,
.request-dialog .secondary-button:disabled { opacity: .48; cursor: not-allowed; }
.request-edit-button { min-width: 126px; }
.request-detail-status { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; border: 1px solid #d8e5f4; border-radius: 999px; color: var(--cobalt); background: #f1f7ff; font-size: 11px; font-weight: 690; }
.request-detail-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.request-detail-status.negotiation { color: #9b6205; border-color: #f3ddb4; background: #fff8ea; }
.request-detail-status.won { color: #138449; border-color: #cdebd9; background: #effbf4; }
.request-detail-status.rejected { color: #bd303c; border-color: #f3d2d6; background: #fff3f4; }

.request-pipeline { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; margin: 24px 0 20px; }
.request-pipeline::before { content: ""; position: absolute; top: 15px; left: 8%; right: 8%; height: 1px; background: #dbe2ea; }
.request-pipeline button, .request-pipeline-decision { position: relative; z-index: 1; display: grid; justify-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: #8a96a5; font: inherit; font-size: 11px; font-weight: 590; }
.request-pipeline button:not(:disabled) { cursor: pointer; }
.request-pipeline button i, .request-pipeline-decision i { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid #d8e0e8; border-radius: 50%; color: #8894a3; background: #fff; font-style: normal; font-size: 10px; font-weight: 720; }
.request-pipeline button.done { color: #3d5269; }
.request-pipeline button.done i { color: #fff; border-color: var(--cobalt); background: var(--cobalt); }
.request-pipeline button.current { color: var(--cobalt); font-weight: 680; }
.request-pipeline button.current i { color: var(--cobalt); border-color: var(--cobalt); box-shadow: 0 0 0 5px #eaf3ff; }
.request-pipeline-decision.won { color: #138449; }
.request-pipeline-decision.won i { color: #fff; border-color: #139a55; background: #139a55; }
.request-pipeline-decision.rejected { color: #bd303c; }
.request-pipeline-decision.rejected i { color: #fff; border-color: #d63b46; background: #d63b46; }

.request-facts { display: grid; grid-template-columns: 1.4fr 1fr .75fr .8fr; border-top: 1px solid var(--border); }
.request-fact { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 16px 18px 0; border-left: 1px solid var(--border); }
.request-fact:first-child { padding-left: 0; border-left: 0; }
.request-fact > i, .request-cargo-highlight > i { flex: 0 0 auto; width: 24px; height: 24px; background: var(--cobalt); mask: var(--request-icon) center / contain no-repeat; -webkit-mask: var(--request-icon) center / contain no-repeat; }
.request-fact > span { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.request-fact small { color: var(--muted); font-size: 10px; }
.request-fact strong { overflow: hidden; color: var(--text); font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }

.request-detail-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(390px, .82fr); gap: 16px; align-items: start; }
.request-info-panel, .request-sales-panel { padding: 20px; }
.request-panel-head { align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.request-panel-head h3 { font-size: 17px; }
.request-cargo-highlight { display: flex; align-items: center; gap: 13px; padding: 18px 0 16px; }
.request-cargo-highlight > i { width: 31px; height: 31px; }
.request-cargo-highlight > div { display: grid; gap: 4px; }
.request-cargo-highlight small, .request-info-grid small, .request-route-strip small, .request-next-step small { color: var(--muted); font-size: 10px; }
.request-cargo-highlight strong { color: var(--text); font-size: 15px; font-weight: 660; line-height: 1.4; }
.request-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--border); }
.request-info-grid > div { display: grid; gap: 5px; min-width: 0; padding: 12px; background: #fff; }
.request-info-grid strong {
  display: -webkit-box;
  overflow: hidden;
  color: #263244;
  font-size: 12px;
  font-weight: 620;
  line-height: 1.35;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.request-route-strip { display: grid; grid-template-columns: 1fr 22px 1fr 1.4fr; gap: 12px; align-items: center; margin-top: 14px; padding: 13px 14px; border-radius: 10px; background: #f5f8fb; }
.request-route-strip > div { display: grid; gap: 4px; min-width: 0; }
.request-route-strip strong { overflow: hidden; color: #263244; font-size: 12px; font-weight: 630; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.request-route-strip > i { color: var(--cobalt); font-style: normal; text-align: center; }
.request-proposal-total { color: var(--cobalt); font-size: 15px; font-weight: 710; white-space: nowrap; }

.request-attachments { padding: 15px 0; border-bottom: 1px solid var(--border); }
.request-attachments-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.request-attachments-head strong { color: #2b3748; font-size: 12px; font-weight: 650; }
.request-attachments-head span { color: var(--muted); font-size: 10px; }
.request-file-list { display: grid; gap: 7px; }
.request-file-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px; border: 1px solid #e2e8ef; border-radius: 9px; color: inherit; text-decoration: none; }
.request-file-row:hover { border-color: #bdd5ee; background: #fbfdff; }
.request-file-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #fff; background: #657286; font-size: 10px; font-weight: 760; }
.request-file-icon.proposal { background: var(--cobalt); }
.request-file-row > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.request-file-row strong { overflow: hidden; color: #263244; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.request-file-row small { color: var(--muted); font-size: 9px; }
.request-file-row > b { color: #8a96a5; font-size: 9px; font-weight: 650; }
.request-file-row > b.sent { color: #138449; }
.request-file-empty { padding: 14px; border: 1px dashed #ccd6e0; border-radius: 9px; color: var(--muted); background: #fafbfd; font-size: 11px; line-height: 1.45; }
.request-file-upload { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 7px; margin-top: 9px; }
.request-file-upload select, .request-file-upload label { min-width: 0; height: 34px; border: 1px solid #d8e0e8; border-radius: 8px; background: #fff; color: #445166; font: inherit; font-size: 10px; }
.request-file-upload label { display: flex; align-items: center; padding: 0 10px; cursor: pointer; }
.request-file-upload label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.request-file-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.request-file-upload button { min-height: 34px; padding: 0 11px; font-size: 10px; }
.request-next-step { display: grid; gap: 9px; padding: 15px 0; }
.request-next-step > div { display: flex; justify-content: space-between; gap: 12px; }
.request-next-step strong { color: #263244; font-size: 11px; }
.request-next-step p { margin: 0; color: #536176; font-size: 11px; line-height: 1.45; }
.request-sales-actions { display: grid; gap: 9px; }
.request-sales-actions > div { display: grid; grid-template-columns: 1fr 1.35fr; gap: 8px; }
.request-sales-actions button { min-height: 38px; }
.request-sales-actions > small { color: var(--muted); font-size: 9px; text-align: right; }
.request-reject-button { border: 1px solid #e6cbd0; border-radius: 8px; color: #b3323e; background: #fff; font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.request-won-button { background: #087346; }
.request-send-button:disabled, .request-won-button:disabled { opacity: .5; cursor: not-allowed; }
.request-terminal-meta { display: flex; justify-content: space-between; padding-top: 15px; color: var(--muted); font-size: 11px; }
.request-terminal-meta strong { color: #263244; }

.request-decision-banner { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid; border-radius: 11px; }
.request-decision-banner > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-weight: 760; }
.request-decision-banner > div { display: grid; flex: 1; gap: 2px; }
.request-decision-banner strong { color: var(--text); font-size: 12px; }
.request-decision-banner small, .request-decision-banner time { color: var(--muted); font-size: 10px; }
.request-decision-banner button { border: 0; color: var(--cobalt); background: transparent; font: inherit; font-size: 11px; font-weight: 680; cursor: pointer; }
.request-decision-banner.won { border-color: #cfe9da; background: #f3fbf6; }
.request-decision-banner.won > span { background: #139a55; }
.request-decision-banner.rejected { border-color: #f0d0d4; background: #fff5f6; }
.request-decision-banner.rejected > span { background: #d63b46; }

.request-dialog { width: min(1020px, calc(100vw - 36px)); max-width: 1020px; padding: 0; border: 0; border-radius: 14px; }
.request-dialog > form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: min(860px, calc(100vh - 40px)); }
.request-form-scroll { overflow-y: auto; padding: 0 24px 20px; }
.request-form-section { padding: 20px 0; border-bottom: 1px solid var(--border); }
.request-form-section:last-child { border-bottom: 0; }
.request-form-section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.request-form-section-head > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--cobalt); background: #edf5ff; font-size: 10px; font-weight: 750; }
.request-form-section-head h3 { margin: 0; color: var(--text); font-size: 16px; line-height: 1.2; }
.request-form-section-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.request-form-grid { display: grid; gap: 13px; }
.request-form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.request-form-grid .wide { grid-column: span 2; }
.request-dialog .field { align-content: start; }
.request-dialog .field > span { color: #59667a; font-size: 12px; font-weight: 660; }
.request-dialog .field input,
.request-dialog .field select,
.request-dialog .field textarea,
.request-dialog .field .pantera-control-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d6dee8;
  border-radius: 9px;
  color: #172033;
  background: #fff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 540;
}
.request-dialog .field input,
.request-dialog .field select { padding: 0 12px; }
.request-dialog .field textarea {
  min-height: 76px;
  padding: 11px 12px;
  line-height: 1.45;
  resize: vertical;
}
.request-dialog .field input:hover,
.request-dialog .field select:hover,
.request-dialog .field textarea:hover,
.request-dialog .field .pantera-control-button:hover { border-color: #b9c6d4; }
.request-dialog .field input:focus,
.request-dialog .field select:focus,
.request-dialog .field textarea:focus,
.request-dialog .field .pantera-control-button:focus-visible {
  border-color: rgba(0, 87, 184, .68);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 87, 184, .09);
}
.request-dialog .field small { color: #748095; font-size: 10.5px; line-height: 1.35; }
.request-cargo-description-field textarea { font-size: 13.5px; font-weight: 560; }
.request-container-count-field.disabled { color: #8792a2; }
.request-container-count-field.disabled input {
  border-color: #e1e6ec;
  color: #98a2b1;
  background: #f3f5f8;
  box-shadow: none;
  cursor: not-allowed;
}
.request-container-count-field.disabled small { color: #7b8797; }
.request-combobox-field { position: relative; align-content: start; }
.request-combobox-field.open { z-index: 20; }
.request-combobox-control { position: relative; }
.request-combobox-control input { padding-right: 38px; }
.request-combobox-control > button {
  position: absolute;
  top: 1px;
  right: 1px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  padding: 0;
  border: 0;
  border-left: 1px solid #e7ebf0;
  border-radius: 0 8px 8px 0;
  color: #68768a;
  background: #fff;
  font-size: 0;
  line-height: 1;
}
.request-combobox-control > button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .16s ease, color .16s ease;
}
.request-combobox-field.open .request-combobox-control > button { color: var(--cobalt); }
.request-combobox-field.open .request-combobox-control > button::before { transform: translateY(2px) rotate(225deg); }
.request-combobox-popover {
  position: absolute;
  top: 65px;
  right: 0;
  left: 0;
  z-index: 30;
  max-height: 290px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #d6dee8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(17, 24, 39, .15);
}
.request-combobox-option,
.request-combobox-create {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  color: #263244;
  background: transparent;
  text-align: left;
  font: inherit;
}
.request-combobox-option { justify-content: space-between; gap: 10px; }
.request-combobox-option:hover,
.request-combobox-option:focus { outline: 0; background: #f2f7fd; }
.request-combobox-option > span { min-width: 0; overflow: hidden; font-size: 12px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.request-combobox-option small { flex: 0 0 auto; max-width: 44%; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.request-combobox-option mark { color: var(--cobalt); background: transparent; font-weight: 750; }
.request-combobox-option.similar { margin-top: 2px; background: #fff9ed; }
.request-combobox-create { gap: 9px; margin-top: 4px; border-top: 1px solid #e7ebf0; border-radius: 0 0 7px 7px; color: var(--cobalt); font-size: 11px; font-weight: 680; }
.request-combobox-create:hover { background: #edf5ff; }
.request-combobox-create b { display: grid; flex: 0 0 auto; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: #fff; background: var(--cobalt); font-size: 15px; }
.request-combobox-create:disabled { opacity: .55; cursor: wait; }
.request-combobox-empty { padding: 12px 10px; color: var(--muted); font-size: 11px; font-weight: 520; }
.request-combobox-warning { display: grid; gap: 3px; margin: -1px -1px 5px; padding: 10px; border: 1px solid #f0d39d; border-radius: 8px; background: #fff9ed; }
.request-combobox-warning strong { color: #815513; font-size: 11px; }
.request-combobox-warning span { color: #8b672e; font-size: 9px; line-height: 1.4; font-weight: 520; }
.transport-dialog-actions.request-dialog-actions { display: flex; justify-content: flex-end; }
.request-dialog-action-group { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.request-dialog-action-group .request-dialog-cancel {
  min-width: 112px;
  min-height: 44px;
  padding-inline: 18px;
  border-color: #c7d5e4;
  color: #3d4d63;
  background: linear-gradient(180deg, #fff, #f6f9fc);
}
.request-dialog-action-group .request-dialog-cancel:hover:not(:disabled) { border-color: #99b7d8; color: var(--cobalt); background: #f2f7fd; }
.transport-dialog-actions.request-dialog-actions .request-dialog-action-group button { min-height: 44px; }
.request-dialog-action-group .primary-button {
  min-width: 164px;
  padding-inline: 20px;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 680;
}
.request-reject-dialog { width: min(500px, calc(100vw - 32px)); }
.request-reject-note { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.request-reject-dialog .primary-button.danger { background: #bd303c; }

@media (max-width: 1120px) {
  .requests-register-head, .requests-register-row { grid-template-columns: 120px 1fr 1.2fr .8fr; }
  .requests-register-head span:last-child, .request-owner-cell { display: none; }
  .request-detail-grid { grid-template-columns: 1fr; }
  .request-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-fact:nth-child(3) { padding-left: 0; border-left: 0; }
}

@media (max-width: 820px) {
  .requests-hero { padding: 18px; }
  .requests-hero-top, .requests-register-toolbar, .requests-filter-bar { align-items: stretch; flex-direction: column; }
  .requests-search { width: 100%; }
  .requests-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .requests-stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .requests-filter-bar { gap: 9px; }
  .requests-type-tabs { padding: 8px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .requests-register-head { display: none; }
  .requests-register-body { display: grid; gap: 10px; padding: 12px; background: #f4f7fa; }
  .requests-register-row { grid-template-columns: 1fr 1fr; gap: 12px; min-height: 0; padding: 14px; border: 1px solid var(--border); border-radius: 11px; }
  .request-cargo-cell, .request-proposal-cell { grid-column: span 2; }
  .request-detail-title-row { flex-direction: column; }
  .request-pipeline { grid-template-columns: repeat(3, 1fr); row-gap: 16px; }
  .request-pipeline::before { display: none; }
  .request-facts { grid-template-columns: 1fr; }
  .request-fact, .request-fact:nth-child(3) { padding: 12px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .request-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-route-strip { grid-template-columns: 1fr 20px 1fr; }
  .request-route-strip > div:last-child { grid-column: span 3; }
  .request-file-upload { grid-template-columns: 1fr; }
  .request-form-grid.three { grid-template-columns: 1fr; }
  .request-form-grid .wide { grid-column: auto; }
  .request-dialog-action-group { width: 100%; }
  .request-dialog-action-group button { flex: 1; min-width: 0; }
}

/* Dashboard catalog v206 */
.dashboard-catalog-intro {
  min-height: 110px;
  border-bottom: 1px solid rgba(209, 217, 227, .92);
  padding: 16px 4px 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.dashboard-catalog-intro p,
.dashboard-catalog-intro h2,
.dashboard-catalog-intro span { display: block; }
.dashboard-catalog-intro p { margin: 0 0 8px; color: var(--cobalt); font-size: 11px; line-height: 1.2; font-weight: 650; }
.dashboard-catalog-intro h2 { margin: 0; color: var(--text); font-size: 24px; line-height: 1.15; font-weight: 640; }
.dashboard-catalog-intro div > span { max-width: 610px; margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.dashboard-catalog-count { flex: 0 0 auto; border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; color: #536074; background: rgba(255, 255, 255, .72); font-size: 10px; font-weight: 620; }

.dashboard-catalog-grid {
  padding-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  align-items: start;
  gap: 16px;
}

.dashboard-catalog-card {
  min-width: 0;
  min-height: 354px;
  border: 1px solid rgba(210, 219, 229, .98);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  color: inherit;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 34px rgba(17, 24, 39, .055);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.dashboard-catalog-card:hover { border-color: rgba(0, 87, 184, .38); box-shadow: 0 18px 42px rgba(17, 24, 39, .09); transform: translateY(-2px); }
.dashboard-catalog-card:focus-visible { outline: 3px solid rgba(0, 87, 184, .18); outline-offset: 3px; }
.dashboard-catalog-card-head,
.dashboard-catalog-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dashboard-catalog-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--cobalt); box-shadow: 0 8px 18px rgba(0, 87, 184, .2); }
.dashboard-catalog-icon.finance { background: #273348; box-shadow: 0 8px 18px rgba(39, 51, 72, .2); }
.dashboard-catalog-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-catalog-tag { border: 1px solid rgba(0, 87, 184, .16); border-radius: 999px; padding: 6px 10px; color: var(--cobalt); background: rgba(0, 87, 184, .055); font-size: 9px; line-height: 1; font-weight: 650; }

.dashboard-catalog-preview { min-height: 112px; margin-top: 20px; border: 1px solid #e3e8ef; border-radius: 11px; padding: 12px 14px; display: grid; align-content: center; gap: 9px; background: #f8fafc; }
.dashboard-catalog-preview-line { min-width: 0; min-height: 22px; display: grid; grid-template-columns: 7px minmax(84px, .82fr) minmax(118px, 1.18fr); align-items: center; gap: 9px; }
.dashboard-catalog-preview-line i { width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt); }
.dashboard-catalog-preview-line i.critical { background: #e5473a; }
.dashboard-catalog-preview-line i.warning { background: #dc8500; }
.dashboard-catalog-preview-line i.success { background: #208344; }
.dashboard-catalog-preview-line i.expense { background: #657386; }
.dashboard-catalog-preview-line b { overflow: hidden; color: #536074; font-size: 9px; line-height: 1.2; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-catalog-preview-value { min-width: 0; display: grid; justify-items: end; gap: 2px; text-align: right; }
.dashboard-catalog-preview-value strong { max-width: 100%; overflow: hidden; color: #263244; font-size: 12px; line-height: 1.15; font-weight: 680; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-catalog-preview-line:has(i.critical) .dashboard-catalog-preview-value strong { color: #c53b31; }
.dashboard-catalog-preview-line:has(i.success) .dashboard-catalog-preview-value strong { color: #18753a; }
.dashboard-catalog-preview-value small { max-width: 100%; overflow: hidden; color: #8792a2; font-size: 7.5px; line-height: 1.15; font-weight: 540; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-catalog-preview-state { min-height: 72px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: #667085; text-align: center; }
.dashboard-catalog-preview-state strong { font-size: 11px; font-weight: 650; }
.dashboard-catalog-preview-state small { max-width: 230px; font-size: 8.5px; line-height: 1.35; }

.dashboard-catalog-card-copy { margin-top: 18px; display: block; }
.dashboard-catalog-card-copy strong { display: block; color: var(--text); font-size: 18px; line-height: 1.25; font-weight: 640; }
.dashboard-catalog-card-copy small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.48; }
.dashboard-catalog-card-footer { margin-top: auto; padding-top: 17px; border-top: 1px solid #e8ecf1; }
.dashboard-catalog-card-footer > span { min-width: 0; overflow: hidden; color: #7a8494; font-size: 9px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-catalog-card-footer b { flex: 0 0 auto; color: var(--cobalt); font-size: 10px; line-height: 1.2; font-weight: 650; }
.dashboard-catalog-card-footer b span { margin-left: 4px; font-size: 13px; }

.dashboard-backbar { min-height: 36px; display: flex; align-items: center; }
.dashboard-backbar .back-button { padding-left: 0; }

@media (max-width: 1180px) {
  .dashboard-catalog-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}

@media (max-width: 700px) {
  .dashboard-catalog-intro { min-height: 0; padding: 12px 2px 18px; align-items: flex-start; flex-direction: column; gap: 14px; }
  .dashboard-catalog-intro h2 { font-size: 21px; }
  .dashboard-catalog-count { align-self: flex-start; }
  .dashboard-catalog-grid { grid-template-columns: 1fr; padding-top: 14px; }
  .dashboard-catalog-card { min-height: 340px; padding: 16px; }
  .dashboard-catalog-preview-line { grid-template-columns: 7px minmax(96px, .9fr) minmax(130px, 1.1fr); }
  .dashboard-catalog-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-catalog-card { transition: none; }
}

/* Finance performance dashboard v207 */
body.is-finance-performance-dashboard .title-block p {
  display: block;
  margin: 0 0 8px;
  color: var(--cobalt);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 650;
}

body.is-finance-performance-dashboard .topbar {
  min-height: 70px;
  margin-bottom: 16px;
}

body.is-finance-performance-dashboard .overview-page { min-width: 0; }
body.is-finance-performance-dashboard .dashboard-page {
  display: grid;
  gap: 14px;
  padding-bottom: 28px;
}

.finance-performance-controls,
.finance-performance-kpis,
.finance-performance-trend,
.finance-performance-cash,
.finance-performance-structure,
.finance-performance-loans,
.finance-performance-forecast,
.finance-performance-quality,
.finance-performance-loading,
.finance-performance-error {
  border: 1px solid rgba(221, 227, 234, .94);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 28px rgba(17, 24, 39, .055);
}

.finance-performance-controls {
  min-height: 126px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
}

.finance-performance-heading { min-width: 0; }
.finance-performance-heading > span,
.finance-performance-panel-head > div > span,
.finance-performance-forecast-head > div > span,
.finance-performance-quality > div > span {
  display: block;
  color: var(--cobalt);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 660;
}
.finance-performance-heading h2 { margin: 6px 0 0; color: var(--text); font-size: 21px; line-height: 1.2; font-weight: 650; }
.finance-performance-heading p { max-width: 660px; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }

.finance-performance-period-controls {
  min-width: 418px;
  display: grid;
  grid-template-columns: 150px 254px;
  align-items: center;
  gap: 10px;
}
.finance-performance-mode {
  min-height: 46px;
  padding: 4px;
  border: 1px solid #d8e0e9;
  border-radius: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  background: #f3f6fa;
}
.finance-performance-mode button,
.finance-performance-period-nav > button {
  min-height: 44px;
  border: 0;
  color: #536074;
  background: transparent;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.finance-performance-mode button { border-radius: 7px; font-size: 11px; font-weight: 620; }
.finance-performance-mode button:hover { color: var(--cobalt); background: rgba(255, 255, 255, .78); }
.finance-performance-mode button.active { color: #fff; background: var(--cobalt); box-shadow: 0 5px 14px rgba(0, 87, 184, .18); }
.finance-performance-mode button:focus-visible,
.finance-performance-period-nav > button:focus-visible,
.finance-performance-chart-month:focus-visible { outline: 3px solid rgba(0, 87, 184, .2); outline-offset: 2px; }

.finance-performance-period-nav {
  min-height: 54px;
  border: 1px solid #d8e0e9;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: stretch;
  overflow: hidden;
  background: #fff;
}
.finance-performance-period-nav > button { display: grid; place-items: center; font-size: 24px; line-height: 1; }
.finance-performance-period-nav > button:hover { color: var(--cobalt); background: rgba(0, 87, 184, .045); }
.finance-performance-period-nav > button:disabled { color: #c5ccd5; cursor: not-allowed; background: transparent; }
.finance-performance-period-nav > div { min-width: 0; padding: 8px 6px; border-inline: 1px solid #e5e9ef; display: grid; place-content: center; text-align: center; }
.finance-performance-period-nav small,
.finance-performance-period-nav strong { display: block; }
.finance-performance-period-nav small { color: #7a8494; font-size: 8.5px; line-height: 1.15; font-weight: 570; }
.finance-performance-period-nav strong { margin-top: 4px; color: #344054; font-size: 12px; line-height: 1.15; font-weight: 650; white-space: nowrap; }
.finance-performance-refresh-state { grid-column: 1 / -1; justify-self: end; color: #7a8494; font-size: 9px; }

.finance-performance-kpis {
  min-height: 126px;
  padding: 18px 8px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.finance-performance-kpi { min-width: 0; padding: 7px 18px; border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; }
.finance-performance-kpi:last-child { border-right: 0; }
.finance-performance-kpi > span { color: #536074; font-size: 10.5px; line-height: 1.25; font-weight: 580; }
.finance-performance-kpi > strong { margin-top: 12px; overflow: hidden; color: #344054; font-size: clamp(18px, 1.6vw, 25px); line-height: 1.05; font-weight: 650; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.finance-performance-kpi > small { margin-top: 9px; overflow: hidden; color: #7a8494; font-size: 9px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.finance-performance-kpi.blue > strong { color: var(--cobalt); }
.finance-performance-kpi.green > strong,
.finance-performance-kpi strong.positive,
.finance-performance-cash strong.positive,
.finance-performance-forecast strong.positive { color: #16803c; }
.finance-performance-kpi.red > strong,
.finance-performance-cash strong.negative,
.finance-performance-forecast strong.negative { color: #d92d20; }
.finance-performance-kpi.amber > strong { color: #b66a00; }

.finance-performance-main-grid { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .7fr); gap: 14px; }
.finance-performance-trend,
.finance-performance-cash { min-width: 0; min-height: 316px; padding: 20px 22px; }
.finance-performance-panel-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.finance-performance-panel-head h3,
.finance-performance-forecast-head h3 { margin: 5px 0 0; color: var(--text); font-size: 17px; line-height: 1.25; font-weight: 640; }
.finance-performance-panel-head > b { color: #344054; font-size: 13px; line-height: 1.25; font-weight: 630; font-variant-numeric: tabular-nums; }
.finance-performance-legend { flex: 0 0 auto; display: flex; align-items: center; gap: 13px; color: #667085; font-size: 9px; }
.finance-performance-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.finance-performance-legend span::before { width: 8px; height: 8px; border-radius: 2px; background: var(--cobalt); content: ""; }
.finance-performance-legend .expense::before { background: #8b98a9; }
.finance-performance-legend .result::before { background: #20a05a; }

.finance-performance-chart {
  height: 226px;
  margin-top: 18px;
  border-bottom: 1px solid #dfe5ec;
  padding: 10px 4px 0;
  display: grid;
  grid-template-columns: repeat(var(--finance-month-count, 6), minmax(54px, 1fr));
  align-items: end;
  gap: 5px;
  background-image: linear-gradient(to bottom, rgba(221, 227, 234, .56) 1px, transparent 1px);
  background-size: 100% 25%;
}
.finance-performance-chart-month { min-width: 0; height: 100%; border: 0; border-radius: 8px 8px 0 0; padding: 0 4px 8px; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; color: inherit; background: transparent; font: inherit; cursor: pointer; transition: background-color 180ms ease, box-shadow 180ms ease; }
.finance-performance-chart-month:hover { background: rgba(0, 87, 184, .045); }
.finance-performance-chart-month.selected { background: rgba(0, 87, 184, .07); box-shadow: inset 0 -2px 0 var(--cobalt); }
.finance-performance-bars { min-height: 0; display: flex; align-items: end; justify-content: center; gap: 3px; }
.finance-performance-bars i { width: min(10px, 28%); height: var(--finance-bar); min-height: 3px; border-radius: 3px 3px 0 0; background: var(--cobalt); }
.finance-performance-bars i.expense { background: #8b98a9; }
.finance-performance-bars i.result { background: #20a05a; }
.finance-performance-bars i.result.negative { background: #e55245; }
.finance-performance-chart-month > strong { margin-top: 7px; color: #475467; font-size: 10px; line-height: 1.2; font-weight: 630; }
.finance-performance-chart-month > small { margin-top: 3px; color: #98a2b3; font-size: 8px; line-height: 1.1; }

.finance-performance-cash { display: flex; flex-direction: column; }
.finance-performance-cash-values { margin-top: 20px; border: 1px solid #e1e6ed; border-radius: 10px; overflow: hidden; }
.finance-performance-cash-values > div { min-height: 58px; padding: 10px 14px; border-bottom: 1px solid #e7ebf0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.finance-performance-cash-values > div:last-child { border-bottom: 0; }
.finance-performance-cash-values > div.net { background: #f7f9fc; }
.finance-performance-cash-values span { color: #667085; font-size: 10px; }
.finance-performance-cash-values strong { color: #344054; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.finance-performance-cash > p { margin: auto 0 0; color: #7a8494; font-size: 9px; line-height: 1.45; }

.finance-performance-structures { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.finance-performance-structure { min-width: 0; min-height: 302px; padding: 19px 20px; }
.finance-performance-structure-list { margin-top: 16px; display: grid; gap: 14px; }
.finance-performance-structure-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 12px; }
.finance-performance-structure-row > div { min-width: 0; }
.finance-performance-structure-row strong,
.finance-performance-structure-row small { display: block; }
.finance-performance-structure-row > div strong { overflow: hidden; color: #475467; font-size: 10.5px; line-height: 1.25; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.finance-performance-structure-row > div small { margin-top: 3px; color: #98a2b3; font-size: 8.5px; }
.finance-performance-structure-row > span { text-align: right; }
.finance-performance-structure-row > span b { display: block; color: #344054; font-size: 10px; line-height: 1.2; font-weight: 630; font-variant-numeric: tabular-nums; }
.finance-performance-structure-row > span small { margin-top: 3px; color: #7a8494; font-size: 8px; }
.finance-performance-structure-row > i { grid-column: 1 / -1; height: 5px; border-radius: 999px; overflow: hidden; background: #edf1f5; }
.finance-performance-structure-row > i > em { width: var(--finance-share); height: 100%; border-radius: inherit; display: block; background: var(--cobalt); }
.finance-performance-structure.direct .finance-performance-structure-row > i > em { background: #748195; }
.finance-performance-structure.admin .finance-performance-structure-row > i > em { background: #d88919; }
.finance-performance-structure-row.drilldown {
  width: calc(100% + 16px);
  margin: -7px -8px;
  padding: 7px 8px;
  border: 0;
  border-radius: 9px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}
.finance-performance-structure-row.drilldown:hover { background: rgba(0, 87, 184, .045); }
.finance-performance-structure-row.drilldown:focus-visible { outline: 3px solid rgba(0, 87, 184, .18); outline-offset: 2px; }

.finance-performance-loans { min-width: 0; overflow: hidden; }
.finance-performance-loans-head {
  min-height: 116px;
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}
.finance-performance-loans-head > div:first-child { min-width: 0; }
.finance-performance-loans-head > div:first-child > span {
  display: block;
  color: #7b4d16;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 660;
}
.finance-performance-loans-head h3 { margin: 5px 0 0; color: var(--text); font-size: 17px; line-height: 1.25; font-weight: 640; }
.finance-performance-loans-head p { max-width: 760px; margin: 7px 0 0; color: #667085; font-size: 10px; line-height: 1.5; }
.finance-performance-loans-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.finance-performance-loans-actions button { white-space: nowrap; }
.finance-performance-loans-summary {
  border-block: 1px solid #e5e9ef;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #f8fafc;
}
.finance-performance-loans-summary article { min-width: 0; min-height: 88px; padding: 15px 22px; border-right: 1px solid #e5e9ef; display: flex; flex-direction: column; justify-content: center; }
.finance-performance-loans-summary article:last-child { border-right: 0; }
.finance-performance-loans-summary span { color: #667085; font-size: 9px; font-weight: 580; }
.finance-performance-loans-summary strong { margin-top: 7px; color: #344054; font-size: 18px; line-height: 1.1; font-weight: 650; font-variant-numeric: tabular-nums; }
.finance-performance-loans-summary small { margin-top: 6px; color: #98a2b3; font-size: 8.5px; line-height: 1.3; }
.finance-performance-loans .positive,
.finance-performance-detail-dialog .positive { color: #16803c; }
.finance-performance-loans .negative,
.finance-performance-detail-dialog .negative { color: #d92d20; }
.finance-performance-loan-relationships { min-width: 0; }
.finance-performance-loan-relationships > button {
  width: 100%;
  min-height: 64px;
  padding: 11px 22px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 150px 150px 170px 12px;
  align-items: center;
  gap: 14px;
  color: inherit;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.finance-performance-loan-relationships > button:last-child { border-bottom: 0; }
.finance-performance-loan-relationships > button:hover { background: rgba(0, 87, 184, .035); }
.finance-performance-loan-relationships > button:focus-visible { position: relative; outline: 3px solid rgba(0, 87, 184, .18); outline-offset: -3px; }
.finance-performance-loan-relationships span { min-width: 0; }
.finance-performance-loan-relationships strong,
.finance-performance-loan-relationships small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-performance-loan-relationships strong { color: #344054; font-size: 10.5px; line-height: 1.25; font-weight: 620; font-variant-numeric: tabular-nums; }
.finance-performance-loan-relationships small { margin-bottom: 4px; color: #98a2b3; font-size: 8.5px; line-height: 1.2; }
.finance-performance-loan-relationships span:first-child small { margin: 4px 0 0; }
.finance-performance-loan-relationships i { color: var(--cobalt); font-size: 18px; font-style: normal; }

.finance-performance-detail-dialog {
  width: min(980px, calc(100vw - 32px));
  max-width: none;
  max-height: min(760px, calc(100vh - 48px));
  padding: 0;
  border: 1px solid rgba(207, 216, 227, .98);
  border-radius: 16px;
  overflow: hidden;
  color: var(--text);
  background: #fff;
  box-shadow: 0 28px 80px rgba(17, 24, 39, .24);
}
.finance-performance-detail-dialog::backdrop { background: rgba(18, 28, 43, .4); backdrop-filter: blur(3px); }
.finance-performance-detail-dialog > section { min-width: 0; max-height: inherit; display: flex; flex-direction: column; }
.finance-performance-detail-dialog header { min-height: 92px; padding: 18px 20px; border-bottom: 1px solid #e5e9ef; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.finance-performance-detail-dialog header > div { min-width: 0; }
.finance-performance-detail-dialog header span { display: block; color: var(--cobalt); font-size: 9px; font-weight: 660; }
.finance-performance-detail-dialog header h3 { margin: 5px 0 0; color: var(--text); font-size: 18px; line-height: 1.25; font-weight: 650; }
.finance-performance-detail-dialog header p { margin: 5px 0 0; color: #7a8494; font-size: 9px; line-height: 1.3; }
.finance-performance-detail-register { min-width: 0; overflow: auto; }
.finance-performance-detail-row {
  min-width: 760px;
  width: 100%;
  min-height: 62px;
  padding: 10px 20px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  display: grid;
  grid-template-columns: 105px minmax(240px, 1fr) 180px 190px;
  align-items: center;
  gap: 14px;
  color: inherit;
  background: #fff;
  font: inherit;
  text-align: left;
}
button.finance-performance-detail-row { cursor: pointer; transition: background-color 160ms ease; }
button.finance-performance-detail-row:hover { background: rgba(0, 87, 184, .035); }
button.finance-performance-detail-row:focus-visible { position: relative; outline: 3px solid rgba(0, 87, 184, .18); outline-offset: -3px; }
.finance-performance-detail-row.head { min-height: 38px; color: #7a8494; background: #f8fafc; font-size: 9px; font-weight: 620; }
.finance-performance-detail-row > span { min-width: 0; }
.finance-performance-detail-row strong,
.finance-performance-detail-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-performance-detail-row strong { color: #344054; font-size: 10px; line-height: 1.25; font-weight: 620; font-variant-numeric: tabular-nums; }
.finance-performance-detail-row small { margin-top: 4px; color: #98a2b3; font-size: 8.3px; line-height: 1.2; }

.finance-performance-forecast { min-width: 0; overflow: hidden; }
.finance-performance-forecast-head { min-height: 102px; padding: 19px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.finance-performance-forecast-head p { max-width: 700px; margin: 7px 0 0; color: #667085; font-size: 10px; line-height: 1.45; }
.finance-performance-forecast-head > b { flex: 0 0 auto; border: 1px solid rgba(0, 87, 184, .18); border-radius: 999px; padding: 7px 11px; color: var(--cobalt); background: rgba(0, 87, 184, .055); font-size: 9px; font-weight: 650; }
.finance-performance-forecast-summary { border-block: 1px solid #e5e9ef; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #f9fbfd; }
.finance-performance-forecast-summary article { min-width: 0; min-height: 76px; padding: 14px 22px; border-right: 1px solid #e5e9ef; display: flex; flex-direction: column; justify-content: center; }
.finance-performance-forecast-summary article:last-child { border-right: 0; }
.finance-performance-forecast-summary span { color: #667085; font-size: 9px; }
.finance-performance-forecast-summary strong { margin-top: 7px; color: #344054; font-size: 17px; line-height: 1.1; font-weight: 650; font-variant-numeric: tabular-nums; }
.finance-performance-forecast-table { min-width: 0; overflow-x: auto; }
.finance-performance-forecast-row { min-width: 760px; min-height: 56px; border-top: 1px solid #edf0f4; padding: 0 22px; display: grid; grid-template-columns: 150px minmax(180px, 1fr) 140px 140px 140px; align-items: center; gap: 12px; }
.finance-performance-forecast-row.head { min-height: 38px; border-top: 0; color: #7a8494; background: #fbfcfe; font-size: 9px; font-weight: 620; }
.finance-performance-forecast-row > span { min-width: 0; }
.finance-performance-forecast-row strong,
.finance-performance-forecast-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-performance-forecast-row strong { color: #344054; font-size: 10.5px; line-height: 1.25; font-weight: 600; font-variant-numeric: tabular-nums; }
.finance-performance-forecast-row small { margin-top: 3px; color: #98a2b3; font-size: 8.5px; }

.finance-performance-quality { min-height: 86px; padding: 15px 20px; display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.6fr); align-items: center; gap: 24px; }
.finance-performance-quality > div > strong { display: block; margin-top: 6px; color: #344054; font-size: 13px; font-weight: 630; }
.finance-performance-quality.warning > div > span { color: #b66a00; }
.finance-performance-quality.ready > div > span { color: #16803c; }
.finance-performance-quality ul { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; }
.finance-performance-quality li { min-width: 0; border-left: 1px solid #e1e6ed; }
.finance-performance-quality li > button {
  position: relative;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 9px;
  padding: 8px 30px 8px 14px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.finance-performance-quality li > button:hover:not(:disabled) { background: rgba(0, 87, 184, .045); }
.finance-performance-quality li > button:focus-visible { outline: 3px solid rgba(0, 87, 184, .18); outline-offset: -2px; }
.finance-performance-quality li > button:disabled { cursor: default; }
.finance-performance-quality li > button > i { position: absolute; top: 50%; right: 13px; color: var(--cobalt); font-size: 17px; font-style: normal; transform: translateY(-50%); }
.finance-performance-quality li b,
.finance-performance-quality li span { display: block; }
.finance-performance-quality li b { color: #344054; font-size: 17px; line-height: 1.1; font-weight: 650; font-variant-numeric: tabular-nums; }
.finance-performance-quality li span { margin-top: 5px; color: #7a8494; font-size: 8.5px; line-height: 1.25; }

.finance-performance-quality-detail-row {
  min-width: 720px;
  width: 100%;
  min-height: 68px;
  padding: 11px 20px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(300px, 1.5fr) 170px;
  align-items: center;
  gap: 16px;
  color: inherit;
  background: #fff;
  font: inherit;
  text-align: left;
}
button.finance-performance-quality-detail-row { cursor: pointer; transition: background-color 160ms ease; }
button.finance-performance-quality-detail-row:hover { background: rgba(0, 87, 184, .035); }
button.finance-performance-quality-detail-row:focus-visible { position: relative; outline: 3px solid rgba(0, 87, 184, .18); outline-offset: -3px; }
.finance-performance-quality-detail-row.head { min-height: 38px; color: #7a8494; background: #f8fafc; font-size: 9px; font-weight: 620; }
.finance-performance-quality-detail-row > span { min-width: 0; }
.finance-performance-quality-detail-row strong,
.finance-performance-quality-detail-row small { display: block; overflow: hidden; text-overflow: ellipsis; }
.finance-performance-quality-detail-row strong { color: #344054; font-size: 10px; line-height: 1.35; font-weight: 620; }
.finance-performance-quality-detail-row small { margin-top: 4px; color: #98a2b3; font-size: 8.5px; line-height: 1.3; }
.finance-performance-quality-detail-row > span:last-child strong { color: var(--cobalt); text-align: right; white-space: nowrap; }

.finance-performance-empty { min-height: 190px; display: grid; place-content: center; color: #98a2b3; font-size: 10px; text-align: center; }
.finance-performance-empty.compact { min-height: 92px; }
.finance-performance-loading,
.finance-performance-error { min-height: 180px; padding: 28px; display: flex; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.finance-performance-loading > div,
.finance-performance-error { flex-direction: column; }
.finance-performance-loading strong,
.finance-performance-loading small,
.finance-performance-error strong,
.finance-performance-error span { display: block; }
.finance-performance-loading strong,
.finance-performance-error strong { color: var(--text); font-size: 14px; font-weight: 640; }
.finance-performance-loading small,
.finance-performance-error span { margin-top: 6px; color: var(--muted); font-size: 10px; }

@media (max-width: 1180px) {
  .finance-performance-controls { grid-template-columns: 1fr; gap: 16px; }
  .finance-performance-period-controls { min-width: 0; width: min(100%, 520px); }
  .finance-performance-refresh-state { justify-self: start; }
  .finance-performance-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finance-performance-kpi:nth-child(3) { border-right: 0; }
  .finance-performance-kpi:nth-child(n+4) { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
  .finance-performance-structures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-performance-structure.admin { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .finance-performance-main-grid,
  .finance-performance-structures { grid-template-columns: 1fr; }
  .finance-performance-structure.admin { grid-column: auto; }
  .finance-performance-chart { overflow-x: auto; grid-template-columns: repeat(var(--finance-month-count, 6), minmax(70px, 1fr)); }
  .finance-performance-quality { grid-template-columns: 1fr; }
  .finance-performance-quality ul { border-top: 1px solid #e1e6ed; padding-top: 12px; }
  .finance-performance-loans-head { flex-direction: column; gap: 14px; }
  .finance-performance-loans-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .finance-performance-loan-relationships { overflow-x: auto; }
  .finance-performance-loan-relationships > button { min-width: 780px; }
}

@media (max-width: 700px) {
  body.is-finance-performance-dashboard .dashboard-page { gap: 11px; }
  .finance-performance-controls,
  .finance-performance-trend,
  .finance-performance-cash,
  .finance-performance-structure { padding: 16px; }
  .finance-performance-period-controls { grid-template-columns: 1fr; }
  .finance-performance-refresh-state { grid-column: auto; }
  .finance-performance-kpis { grid-template-columns: 1fr 1fr; padding: 10px; }
  .finance-performance-kpi { min-height: 98px; padding: 12px; border-bottom: 1px solid var(--border); }
  .finance-performance-kpi:nth-child(2n) { border-right: 0; }
  .finance-performance-kpi:nth-child(n+4) { margin-top: 0; border-top: 0; }
  .finance-performance-kpi:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .finance-performance-trend { min-height: 292px; }
  .finance-performance-chart { height: 205px; }
  .finance-performance-panel-head { flex-direction: column; }
  .finance-performance-legend { flex-wrap: wrap; }
  .finance-performance-forecast-head { padding: 16px; flex-direction: column; gap: 12px; }
  .finance-performance-forecast-summary { grid-template-columns: 1fr; }
  .finance-performance-forecast-summary article { min-height: 66px; border-right: 0; border-bottom: 1px solid #e5e9ef; }
  .finance-performance-forecast-summary article:last-child { border-bottom: 0; }
  .finance-performance-quality ul { grid-template-columns: 1fr 1fr; gap: 12px 0; }
  .finance-performance-loans-head { padding: 16px; }
  .finance-performance-loans-summary { grid-template-columns: 1fr; }
  .finance-performance-loans-summary article { min-height: 70px; border-right: 0; border-bottom: 1px solid #e5e9ef; }
  .finance-performance-loans-summary article:last-child { border-bottom: 0; }
  .finance-performance-detail-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); border-radius: 13px; }
  .finance-performance-detail-dialog header { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .finance-performance-chart-month,
  .finance-performance-structure-row.drilldown,
  .finance-performance-loan-relationships > button,
  button.finance-performance-detail-row,
  .finance-performance-quality li > button,
  button.finance-performance-quality-detail-row { transition: none; }
}

/* Invoice control dashboard v206 */
body.is-invoice-dashboard .title-block p {
  display: block;
  margin: 0 0 8px;
  color: var(--cobalt);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 650;
}

body.is-invoice-dashboard .topbar {
  min-height: 70px;
  margin-bottom: 16px;
}

body.is-invoice-dashboard .overview-page {
  min-width: 0;
}

body.is-invoice-dashboard .dashboard-page {
  display: grid;
  gap: 14px;
  padding-bottom: 24px;
}

.invoice-dashboard-summary,
.invoice-dashboard-mode-panel,
.invoice-dashboard-aging,
.invoice-dashboard-register,
.invoice-dashboard-loading,
.invoice-dashboard-error {
  border: 1px solid rgba(221, 227, 234, .92);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 28px rgba(17, 24, 39, .055);
}

.invoice-dashboard-mode-panel {
  min-height: 126px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(390px, .95fr) minmax(0, 1.35fr);
  align-items: stretch;
  gap: 18px;
}

.invoice-dashboard-mode-switch {
  min-width: 0;
  padding: 5px;
  border: 1px solid #d8e0e9;
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  background: #f3f6fa;
}

.invoice-dashboard-mode-switch button {
  min-width: 0;
  min-height: 82px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: #475467;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.invoice-dashboard-mode-switch button:hover { color: var(--cobalt); background: rgba(255, 255, 255, .72); }
.invoice-dashboard-mode-switch button.active { border-color: rgba(0, 87, 184, .18); color: #fff; background: linear-gradient(145deg, var(--cobalt-active), var(--cobalt)); box-shadow: 0 7px 18px rgba(0, 87, 184, .18); }
.invoice-dashboard-mode-switch button:focus-visible { outline: 3px solid rgba(0, 87, 184, .2); outline-offset: 2px; }
.invoice-dashboard-mode-switch small,
.invoice-dashboard-mode-switch strong { display: block; }
.invoice-dashboard-mode-switch small { margin-bottom: 7px; font-size: 10px; line-height: 1.2; font-weight: 560; opacity: .82; }
.invoice-dashboard-mode-switch strong { font-size: 13px; line-height: 1.25; font-weight: 650; }

.invoice-dashboard-balance {
  min-width: 0;
  border: 1px solid #e3e8ef;
  border-radius: 11px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  background: #fbfcfe;
}

.invoice-dashboard-balance article {
  min-width: 0;
  padding: 15px 18px;
  border-right: 1px solid #e3e8ef;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.invoice-dashboard-balance article:last-child { border-right: 0; }
.invoice-dashboard-balance article > span { color: #667085; font-size: 10px; line-height: 1.3; font-weight: 570; }
.invoice-dashboard-balance article.delta { background: rgba(0, 87, 184, .045); }
.invoice-dashboard-balance article.delta > small { margin-top: 7px; color: #667085; font-size: 9px; line-height: 1.2; }

.invoice-dashboard-summary {
  min-height: 124px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  padding: 20px 18px;
}

.invoice-dashboard-metric {
  min-width: 0;
  padding: 6px 24px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.invoice-dashboard-metric:last-child { border-right: 0; }
.invoice-dashboard-metric > span { color: #344054; font-size: 13px; line-height: 1.3; font-weight: 540; }
.invoice-dashboard-metric > small { margin-top: 9px; color: #475467; font-size: 11px; line-height: 1.25; font-weight: 520; }

.invoice-dashboard-currency-list { min-width: 0; display: grid; }
.invoice-dashboard-currency-row { min-width: 0; display: grid; grid-template-columns: 43px minmax(0, 1fr); align-items: center; gap: 13px; }
.invoice-dashboard-currency-row > b {
  min-width: 0;
  min-height: 24px;
  border: 1px solid currentColor;
  border-radius: 6px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-size: 10px;
  line-height: 1;
  font-weight: 680;
}
.invoice-dashboard-currency-row > strong {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: inherit;
  line-height: 1.05;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.invoice-dashboard-currency-list.summary { margin-top: 14px; gap: 11px; color: var(--cobalt); font-size: clamp(18px, 1.55vw, 24px); }
.invoice-dashboard-currency-list.compact { margin-top: 9px; gap: 7px; color: #344054; font-size: 13px; }
.invoice-dashboard-currency-list.compact .invoice-dashboard-currency-row { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
.invoice-dashboard-currency-list.compact .invoice-dashboard-currency-row > b { min-height: 20px; border-radius: 5px; padding-inline: 4px; font-size: 8px; }
.invoice-dashboard-balance article.delta .invoice-dashboard-currency-list { color: var(--cobalt); }
.invoice-dashboard-metric.critical .invoice-dashboard-currency-list { color: #e5473a; }
.invoice-dashboard-metric.warning .invoice-dashboard-currency-list { color: #dc8500; }
.invoice-dashboard-metric.success .invoice-dashboard-currency-list { color: #208344; }

.invoice-dashboard-aging {
  min-height: 0;
  padding: 20px 24px 22px;
}

.invoice-dashboard-aging-head h2,
.invoice-dashboard-aging-head span { display: block; }
.invoice-dashboard-aging-head h2 { margin: 0; color: var(--text); font-size: 20px; line-height: 1.2; font-weight: 650; }
.invoice-dashboard-aging-head span { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; }

.invoice-dashboard-horizon-tabs {
  margin-top: 16px;
  border: 1px solid #d6dee8;
  border-radius: 9px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  background: #fbfcfe;
}
.invoice-dashboard-horizon-tabs button {
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-right: 1px solid #d6dee8;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #536074;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.invoice-dashboard-horizon-tabs button:last-child { border-right: 0; }
.invoice-dashboard-horizon-tabs button b { font: inherit; font-variant-numeric: tabular-nums; }
.invoice-dashboard-horizon-tabs button:hover { color: var(--cobalt); background: rgba(0, 87, 184, .045); }
.invoice-dashboard-horizon-tabs button.active { color: #fff; background: var(--cobalt); box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .2); }
.invoice-dashboard-horizon-tabs button:focus-visible { outline: 3px solid rgba(0, 87, 184, .2); outline-offset: -3px; }

.invoice-dashboard-register {
  min-width: 0;
  overflow: hidden;
}

.invoice-dashboard-register-head {
  min-height: 66px;
  padding: 18px 22px 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.invoice-dashboard-register-head h2 { margin: 0; color: var(--text); font-size: 20px; line-height: 1.2; font-weight: 630; }
.invoice-dashboard-register-head > div > span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.invoice-dashboard-freshness { flex: 0 0 auto; color: var(--muted); font-size: 10px; }

.invoice-dashboard-toolbar {
  padding: 0 22px 14px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(125px, 145px) minmax(125px, 145px) minmax(190px, 215px) auto;
  align-items: center;
  gap: 10px;
}

.invoice-dashboard-toolbar select,
.invoice-dashboard-export,
.invoice-dashboard-page-size select,
.invoice-dashboard-footer button,
.invoice-dashboard-footer b {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #344054;
  background: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 560;
}

.invoice-dashboard-toolbar select:focus-visible,
.invoice-dashboard-export:focus-visible,
.invoice-dashboard-page-size select:focus-visible,
.invoice-dashboard-row:focus-visible,
.invoice-dashboard-footer button:focus-visible { outline: 3px solid rgba(0, 87, 184, .18); outline-offset: 2px; }

.invoice-dashboard-search {
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
}

.invoice-dashboard-search:focus-within { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(0, 87, 184, .08); }
.invoice-dashboard-search .nav-icon { width: 16px; height: 16px; flex: 0 0 16px; color: #667085; }
.invoice-dashboard-search input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font: inherit; font-size: 10.5px; }
.invoice-dashboard-search input::placeholder { color: #98a2b3; }
.invoice-dashboard-toolbar select { min-width: 0; width: 100%; padding: 0 30px 0 10px; outline: 0; }
.invoice-dashboard-paid-sort-field { min-width: 0; }
.invoice-dashboard-export { min-width: 94px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-color: rgba(0, 87, 184, .36); color: var(--cobalt); }
.invoice-dashboard-export:hover { background: rgba(0, 87, 184, .06); }
.invoice-dashboard-export:disabled { cursor: not-allowed; opacity: .45; }
.invoice-dashboard-export .nav-icon { width: 15px; height: 15px; }

.invoice-dashboard-table-scroll { min-width: 0; overflow-x: auto; border-top: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; }
.invoice-dashboard-table-head,
.invoice-dashboard-row {
  min-width: 1010px;
  display: grid;
  grid-template-columns: 126px minmax(160px, 1.25fr) 126px minmax(128px, .82fr) 112px 108px 116px 124px;
  align-items: center;
}

.invoice-dashboard-table-head { min-height: 42px; color: #667085; background: #fbfcfe; }
.invoice-dashboard-table-head > span { padding: 0 10px; font-size: 10px; font-weight: 620; white-space: nowrap; }
.invoice-dashboard-row { min-height: 70px; border-top: 1px solid #edf0f4; cursor: pointer; transition: background-color 180ms ease, box-shadow 180ms ease; }
.invoice-dashboard-row:first-child { border-top: 0; }
.invoice-dashboard-row:hover { background: #f7faff; box-shadow: inset 3px 0 0 var(--cobalt); }
.invoice-dashboard-row > span { min-width: 0; padding: 0 10px; }
.invoice-dashboard-row strong,
.invoice-dashboard-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invoice-dashboard-row strong { color: #344054; font-size: 12px; line-height: 1.35; font-weight: 590; font-variant-numeric: tabular-nums; }
.invoice-dashboard-row small { margin-top: 4px; color: #667085; font-size: 10px; line-height: 1.3; }

.invoice-dashboard-status { display: flex; align-items: center; gap: 8px; }
.invoice-dashboard-status img { width: 28px; height: 28px; flex: 0 0 28px; object-fit: contain; }
.invoice-dashboard-status > span { min-width: 0; }
.invoice-dashboard-row.critical .invoice-dashboard-status strong,
.invoice-dashboard-row.critical .invoice-dashboard-status small,
.invoice-dashboard-row.critical .invoice-dashboard-due strong,
.invoice-dashboard-row.critical .invoice-dashboard-due small,
.invoice-dashboard-row.critical .invoice-dashboard-amount.remaining strong { color: #f04438; }
.invoice-dashboard-row.warning .invoice-dashboard-status strong,
.invoice-dashboard-row.warning .invoice-dashboard-due strong,
.invoice-dashboard-row.warning .invoice-dashboard-due small,
.invoice-dashboard-row.warning .invoice-dashboard-amount.remaining strong { color: #e78900; }
.invoice-dashboard-row.success .invoice-dashboard-status strong,
.invoice-dashboard-row.success .invoice-dashboard-due strong,
.invoice-dashboard-row.success .invoice-dashboard-due small,
.invoice-dashboard-row.success .invoice-dashboard-amount.remaining strong { color: #16803c; }
.invoice-dashboard-amount strong { text-align: right; }

.invoice-dashboard-empty {
  min-height: 210px;
  padding: 36px;
  display: grid;
  place-content: center;
  text-align: center;
}

.invoice-dashboard-empty strong { color: var(--text); font-size: 14px; font-weight: 620; }
.invoice-dashboard-empty span { max-width: 520px; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }

.invoice-dashboard-footer {
  min-height: 58px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 10px;
}

.invoice-dashboard-footer-controls { display: flex; align-items: center; gap: 14px; }
.invoice-dashboard-page-size { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.invoice-dashboard-page-size > span { color: #667085; font-size: 10px; }
.invoice-dashboard-page-size select { min-width: 68px; padding: 0 26px 0 10px; outline: 0; cursor: pointer; }
.invoice-dashboard-pagination { display: flex; align-items: center; gap: 7px; }
.invoice-dashboard-footer button { min-width: 64px; padding: 0 10px; }
.invoice-dashboard-footer button.invoice-dashboard-page-number { min-width: 34px; padding: 0 8px; }
.invoice-dashboard-footer button:not(:disabled):hover { border-color: var(--cobalt); color: var(--cobalt); }
.invoice-dashboard-footer button:disabled { cursor: not-allowed; opacity: .38; }
.invoice-dashboard-footer b { width: 34px; display: grid; place-items: center; border-color: var(--cobalt); color: var(--cobalt); font-weight: 650; }
.invoice-dashboard-page-ellipsis { width: 18px; color: #98a2b3; text-align: center; font-size: 12px; }

.invoice-dashboard-loading,
.invoice-dashboard-error {
  min-height: 250px;
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.invoice-dashboard-loading strong,
.invoice-dashboard-loading small,
.invoice-dashboard-error strong,
.invoice-dashboard-error small { display: block; }
.invoice-dashboard-loading strong,
.invoice-dashboard-error strong { color: var(--text); font-size: 15px; font-weight: 620; }
.invoice-dashboard-loading small,
.invoice-dashboard-error small { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.invoice-dashboard-error { flex-direction: column; text-align: center; }

@media (max-width: 1220px) {
  .invoice-dashboard-mode-panel { grid-template-columns: 1fr; }
  .invoice-dashboard-toolbar { grid-template-columns: minmax(200px, 1fr) repeat(2, minmax(115px, 135px)) minmax(180px, 195px) auto; }
}

@media (max-width: 980px) {
  body.is-invoice-dashboard .topbar { min-height: 62px; }
  .invoice-dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .invoice-dashboard-metric { min-height: 96px; border-bottom: 1px solid var(--border); }
  .invoice-dashboard-metric:nth-child(2n) { border-right: 0; }
  .invoice-dashboard-metric:nth-last-child(-n + 2) { border-bottom: 0; }
  .invoice-dashboard-horizon-tabs { grid-template-columns: repeat(6, minmax(132px, 1fr)); overflow-x: auto; }
  .invoice-dashboard-horizon-tabs button:last-child { border-right: 0; }
  .invoice-dashboard-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(120px, 1fr)); }
  .invoice-dashboard-paid-sort-field { grid-column: 1 / span 2; }
  .invoice-dashboard-export { grid-column: 3; }
}

@media (max-width: 700px) {
  body.is-invoice-dashboard .title-block h1 { font-size: 23px; }
  body.is-invoice-dashboard .title-block p { font-size: 10px; }
  .invoice-dashboard-mode-panel { padding: 12px; }
  .invoice-dashboard-mode-switch { grid-template-columns: 1fr; }
  .invoice-dashboard-mode-switch button { min-height: 64px; }
  .invoice-dashboard-balance { grid-template-columns: 1fr; }
  .invoice-dashboard-balance article { min-height: 76px; border-right: 0; border-bottom: 1px solid #e3e8ef; }
  .invoice-dashboard-balance article:last-child { border-bottom: 0; }
  .invoice-dashboard-summary { grid-template-columns: 1fr; }
  .invoice-dashboard-metric { min-height: 86px; border-right: 0; border-bottom: 1px solid var(--border); }
  .invoice-dashboard-metric:nth-last-child(2) { border-bottom: 1px solid var(--border); }
  .invoice-dashboard-aging { padding: 18px 14px; }
  .invoice-dashboard-horizon-tabs { grid-template-columns: repeat(6, minmax(126px, 1fr)); }
  .invoice-dashboard-register-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .invoice-dashboard-toolbar { display: grid; grid-template-columns: 1fr; }
  .invoice-dashboard-paid-sort-field,
  .invoice-dashboard-export { grid-column: auto; }
  .invoice-dashboard-export { min-height: 42px; }
  .invoice-dashboard-search { min-height: 42px; }
  .invoice-dashboard-toolbar select { min-height: 42px; }
  .invoice-dashboard-footer { align-items: flex-start; flex-direction: column; }
  .invoice-dashboard-footer-controls { width: 100%; align-items: flex-start; flex-direction: column; gap: 10px; }
  .invoice-dashboard-page-size { width: 100%; justify-content: space-between; }
  .invoice-dashboard-page-size select { min-height: 42px; }
  .invoice-dashboard-pagination { width: 100%; overflow-x: auto; padding: 2px; }
  .invoice-dashboard-footer button { min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .invoice-dashboard-row,
  .invoice-dashboard-mode-switch button,
  .invoice-dashboard-horizon-tabs button { transition: none; }
}

/* Shipment completion checklist v187 */
.shipment-completion-page {
  gap: 14px;
}

.shipment-completion-hero,
.shipment-completion-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(17, 24, 39, .045);
}

.shipment-completion-hero {
  min-height: 132px;
  padding: 25px 28px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.shipment-completion-hero.ready,
.shipment-completion-hero.completed {
  border-color: #bfe3ca;
  background: linear-gradient(105deg, #f5fbf7 0%, #fff 68%);
}

.shipment-completion-hero.blocked {
  border-color: #ecd7b5;
  background: linear-gradient(105deg, #fffaf1 0%, #fff 68%);
}

.shipment-completion-hero-icon {
  width: 58px;
  height: 58px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #b7791f;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 22px rgba(17, 24, 39, .05);
}

.shipment-completion-hero.ready .shipment-completion-hero-icon,
.shipment-completion-hero.completed .shipment-completion-hero-icon {
  color: var(--success);
}

.shipment-completion-hero-icon i,
.shipment-completion-action-copy > i {
  display: block;
  background: currentColor;
  -webkit-mask: url('/assets/icons/phosphor-check-circle-regular.svg?v=187') center / contain no-repeat;
  mask: url('/assets/icons/phosphor-check-circle-regular.svg?v=187') center / contain no-repeat;
}

.shipment-completion-hero-icon i {
  width: 29px;
  height: 29px;
}

.shipment-completion-hero > div > span,
.shipment-completion-card .shipment-section-head > div > span {
  color: var(--cobalt);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 730;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.shipment-completion-hero h3 {
  margin: 7px 0 6px;
  color: var(--text);
  font-size: 21px;
  line-height: 1.2;
  font-weight: 670;
}

.shipment-completion-hero p {
  max-width: 750px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.shipment-completion-hero > strong {
  min-width: 86px;
  color: #9b6417;
  font-size: 34px;
  line-height: 1;
  font-weight: 660;
  text-align: right;
}

.shipment-completion-hero.ready > strong,
.shipment-completion-hero.completed > strong {
  color: var(--success);
}

.shipment-completion-hero > strong small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.shipment-completion-card {
  overflow: hidden;
}

.shipment-completion-card > .shipment-section-head {
  margin: 0;
  padding: 23px 26px 19px;
  border-bottom: 1px solid var(--border);
}

.shipment-completion-checklist {
  padding: 8px 26px;
}

.shipment-completion-check {
  min-height: 92px;
  border-bottom: 1px solid #e7ebf0;
  padding: 17px 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
}

.shipment-completion-check:last-child {
  border-bottom: 0;
}

.shipment-completion-check-index {
  width: 36px;
  height: 36px;
  border: 1px solid #d7dee8;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #687589;
  background: #f7f9fb;
}

.shipment-completion-check.complete .shipment-completion-check-index {
  border-color: #bfe3ca;
  color: var(--success);
  background: #edf9f1;
}

.shipment-completion-check.blocked .shipment-completion-check-index {
  border-color: #efc9c7;
  color: #b42318;
  background: #fff4f3;
}

.shipment-completion-check.optional .shipment-completion-check-index {
  border-color: #ccd7e5;
  color: #667085;
  background: #f3f6fa;
}

.shipment-completion-check-index i {
  width: 18px;
  height: 18px;
  display: block;
  background: currentColor;
  -webkit-mask: url('/assets/icons/phosphor-check-circle-regular.svg?v=187') center / contain no-repeat;
  mask: url('/assets/icons/phosphor-check-circle-regular.svg?v=187') center / contain no-repeat;
}

.shipment-completion-check-index b {
  font-size: 12px;
  font-weight: 720;
}

.shipment-completion-check > div > strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 660;
}

.shipment-completion-check > div > p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.shipment-completion-check.blocked > div > p {
  color: #9f3027;
}

.shipment-completion-check ul {
  max-width: 720px;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  list-style: none;
}

.shipment-completion-check li {
  border-left: 2px solid #e4a09b;
  padding: 5px 9px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #7a2520;
  background: #fff7f6;
  font-size: 11px;
  line-height: 1.35;
}

.shipment-completion-check li b {
  white-space: nowrap;
}

.shipment-completion-check .secondary-button {
  min-width: 162px;
  min-height: 40px;
}

.shipment-completion-check-state {
  min-width: 82px;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #147a38;
  background: #eaf7ee;
  font-size: 11px;
  font-weight: 720;
}

.shipment-completion-check-state.optional {
  min-width: 112px;
  color: #536176;
  background: #edf1f6;
}

.shipment-completion-footer {
  border-top: 1px solid var(--border);
  padding: 21px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  background: #f9fbfd;
}

.shipment-completion-action-copy {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  color: #a54d20;
}

.shipment-completion-action-copy.ready {
  color: var(--success);
}

.shipment-completion-action-copy > i {
  width: 26px;
  height: 26px;
}

.shipment-completion-action-copy span,
.shipment-completion-action-copy strong,
.shipment-completion-action-copy small {
  display: block;
}

.shipment-completion-action-copy strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}

.shipment-completion-action-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.shipment-completion-submit {
  min-width: 238px;
  min-height: 48px;
}

.shipment-completion-submit:disabled {
  border-color: #d9e0e8;
  color: #8994a4;
  background: #e8edf3;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .78;
}

.shipment-completion-error {
  min-height: 0;
  margin: 0;
  padding: 0 26px;
  color: var(--critical);
  font-size: 12px;
  line-height: 1.4;
}

.shipment-completion-error:not(:empty) {
  padding-block: 0 18px;
}

@media (max-width: 760px) {
  .shipment-completion-hero {
    padding: 20px 18px;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
  }

  .shipment-completion-hero-icon {
    width: 46px;
    height: 46px;
  }

  .shipment-completion-hero > strong {
    grid-column: 2;
    justify-self: start;
    font-size: 25px;
    text-align: left;
  }

  .shipment-completion-card > .shipment-section-head,
  .shipment-completion-checklist,
  .shipment-completion-footer {
    padding-inline: 16px;
  }

  .shipment-completion-check {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .shipment-completion-check > .secondary-button,
  .shipment-completion-check-state {
    grid-column: 2;
    justify-self: start;
  }

  .shipment-completion-check li {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .shipment-completion-check li b {
    white-space: normal;
  }

  .shipment-completion-footer {
    grid-template-columns: 1fr;
  }

  .shipment-completion-submit {
    width: 100%;
  }
}

/* Transport calculator v116 — approved compact financial workspace */
.calculator-page { gap: 14px; }
.calculator-layout { grid-template-columns: minmax(0, 1.7fr) minmax(350px, .98fr); gap: 18px; }
.calculator-form,
.calculator-result { border-color: #d9e0e9; box-shadow: 0 14px 38px rgba(17, 24, 39, .055); }
.calculator-form-head,
.calculator-result-head { min-height: 82px; padding: 17px 22px; }
.calculator-form-head > div > span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.calculator-reset { min-width: 104px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.calculator-reset .nav-icon { width: 17px; height: 17px; }
.calculator-intro { padding: 20px 22px 17px; display: grid; grid-template-columns: 164px minmax(0, 1fr); align-items: end; gap: 22px; }
.calculator-invoice { padding: 0 22px 20px; border-bottom: 1px solid var(--border); }
.calculator-invoice-fields { grid-template-columns: 1.05fr 1.15fr .92fr 1.12fr; gap: 12px; }
.calculator-product-field { min-width: 0; }
.calculator-operational-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.calculator-operational-grid .calculator-section { min-width: 0; border-bottom: 0; border-right: 1px solid var(--border); padding: 22px 22px 24px; }
.calculator-operational-grid .calculator-section:last-child { border-right: 0; }
.calculator-operational-grid .calculator-section legend { margin-bottom: 18px; gap: 11px; line-height: 1.25; }
.calculator-section legend > span:last-child { min-width: 0; }
.calculator-section legend strong,
.calculator-section legend small { display: block; }
.calculator-section legend strong { color: var(--text); font-size: 13px; font-weight: 680; }
.calculator-section legend small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.35; }
.calculator-section-icon { width: 36px; height: 36px; min-width: 36px !important; flex: 0 0 36px; border-radius: 50%; color: #fff !important; background: linear-gradient(145deg, var(--cobalt-active), #0049aa); box-shadow: 0 6px 14px rgba(0, 87, 184, .2); }
.calculator-section-icon svg { width: 20px; height: 20px; }
.calculator-operational-grid .calculator-fields { grid-template-columns: 1fr; gap: 14px; }
.calculator-intro .calculator-mode-switch { gap: 4px; }
.calculator-intro .calculator-mode-switch label > span { min-height: 44px; border-radius: 8px; padding: 8px 14px; align-items: center; }
.calculator-intro .calculator-mode-switch strong { font-size: 13px; }
.calculator-intro .calculator-mode-switch input:checked + span { color: #fff; background: linear-gradient(145deg, #0867d8, #004fbd); box-shadow: 0 5px 12px rgba(0, 87, 184, .18); }
.calculator-check { min-height: 50px; padding: 9px 10px; }
.calculator-form-footer { min-height: 78px; padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fbfcfe; }
.calculator-status { min-width: 0; display: flex; align-items: center; gap: 11px; }
.calculator-status > i { width: 11px; height: 11px; flex: 0 0 11px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 8px rgba(22, 163, 74, .1); }
.calculator-status strong,
.calculator-status small { display: block; }
.calculator-status strong { font-size: 11px; font-weight: 650; }
.calculator-status small { margin-top: 4px; color: var(--muted); font-size: 9.5px; }
.calculator-form-actions { display: flex; align-items: center; gap: 10px; }
.calculator-form-actions button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.calculator-form-actions .nav-icon { width: 18px; height: 18px; }
.calculator-primary-total { padding-bottom: 18px; }
.calculator-composition { padding: 0 22px 18px; background: #f7faff; }
.calculator-composition-bar { height: 11px; display: flex; gap: 3px; overflow: hidden; border-radius: 999px; background: #e8edf4; }
.calculator-composition-bar i { display: block; min-width: 0; height: 100%; transition: width 220ms ease; }
.calculator-composition-bar .cost { background: #075dcc; }
.calculator-composition-bar .tax { background: #98a3b3; }
.calculator-composition-bar .profit { background: #17a344; }
.calculator-composition-legend { margin-top: 15px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calculator-composition-legend > div { min-width: 0; }
.calculator-composition-legend span,
.calculator-composition-legend strong,
.calculator-composition-legend output { display: block; }
.calculator-composition-legend span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.calculator-composition-legend span i { width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; display: inline-block; }
.calculator-composition-legend span i.cost { background: #075dcc; }
.calculator-composition-legend span i.tax { background: #98a3b3; }
.calculator-composition-legend span i.profit { background: #17a344; }
.calculator-composition-legend strong { margin-top: 7px; font-size: 11px; font-weight: 650; }
.calculator-composition-legend output { margin-top: 4px; overflow: hidden; font-size: 10px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1180px) {
  .calculator-layout { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .9fr); }
  .calculator-invoice-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calculator-operational-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calculator-operational-grid .calculator-section:nth-child(2) { border-right: 0; }
  .calculator-operational-grid .calculator-final-section { border-top: 1px solid var(--border); }
}

@media (max-width: 900px) {
  .calculator-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .calculator-form-head { align-items: flex-start; }
  .calculator-form-head > div > span { display: none; }
  .calculator-reset { min-width: 44px; width: 44px; padding-inline: 0; overflow: hidden; color: transparent; gap: 0; }
  .calculator-reset .nav-icon { color: var(--cobalt); }
  .calculator-intro { padding: 18px 16px 15px; grid-template-columns: 1fr; gap: 14px; }
  .calculator-invoice { padding: 0 16px 18px; }
  .calculator-invoice-fields,
  .calculator-operational-grid { grid-template-columns: 1fr; }
  .calculator-operational-grid .calculator-section { border-right: 0; border-bottom: 1px solid var(--border); padding: 20px 16px; }
  .calculator-operational-grid .calculator-section:last-child { border-bottom: 0; }
  .calculator-intro .calculator-mode-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calculator-intro .calculator-mode-switch label > span { min-height: 48px; }
  .calculator-form-footer { padding: 16px; align-items: stretch; flex-direction: column; }
  .calculator-form-actions { display: grid; grid-template-columns: 1fr; }
  .calculator-composition { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .calculator-composition-bar i { transition: none; }
}

/* Transport calculator v107 */
.calculator-page {
  display: grid;
  gap: 16px;
  padding-bottom: 24px;
}

.calculator-hero {
  min-height: 148px;
  padding: 24px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  background: var(--white);
}

.calculator-hero-copy { max-width: 690px; }
.calculator-hero-copy p,
.calculator-form-head p,
.calculator-result-head p {
  margin: 0 0 7px;
  color: var(--cobalt);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.calculator-hero-copy h2 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 650; }
.calculator-hero-copy > span { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.55; }

.calculator-hero-note {
  width: min(320px, 34%);
  min-height: 76px;
  border: 1px solid rgba(0, 87, 184, .14);
  border-radius: 12px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  background: rgba(255, 255, 255, .76);
}
.calculator-hero-note > .nav-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  color: var(--cobalt);
  background: rgba(0, 87, 184, .08);
}
.calculator-hero-note strong,
.calculator-hero-note small { display: block; }
.calculator-hero-note strong { font-size: 13px; font-weight: 650; }
.calculator-hero-note small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(340px, .88fr);
  align-items: start;
  gap: 16px;
}
.calculator-form,
.calculator-result { padding: 0; }
.calculator-form { overflow: hidden; }
.calculator-form-head,
.calculator-result-head {
  min-height: 74px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}
.calculator-form-head h2,
.calculator-result-head h2 { margin: 0; font-size: 17px; line-height: 1.25; font-weight: 650; }
.calculator-reset { min-width: 80px; min-height: 44px; }

.calculator-section {
  min-width: 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 22px;
}
.calculator-section:last-child { border-bottom: 0; }
.calculator-section[hidden] { display: none; }
.calculator-section legend {
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 650;
}
.calculator-section legend span {
  min-width: 26px;
  color: var(--cobalt);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.calculator-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.calculator-fields-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.calculator-field-wide { grid-column: 1 / -1; }
.calculator-field > span {
  display: block;
  margin: 0 0 7px;
  color: #4d5a6d;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 600;
}
.calculator-field input,
.calculator-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d7dee7;
  border-radius: 9px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  outline: none;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.calculator-field input:hover,
.calculator-field select:hover { border-color: #b7c3d2; }
.calculator-field input:focus-visible,
.calculator-field select:focus-visible {
  border-color: var(--cobalt-active);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, .11);
}
.calculator-field input::placeholder { color: #9aa5b5; }
.calculator-helper { margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }

.calculator-mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.calculator-mode-switch label { position: relative; min-width: 0; cursor: pointer; }
.calculator-mode-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.calculator-mode-switch label > span {
  min-height: 62px;
  border: 1px solid #d7dee7;
  border-radius: 10px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.calculator-mode-switch strong,
.calculator-mode-switch small { display: block; }
.calculator-mode-switch strong { font-size: 13px; font-weight: 680; }
.calculator-mode-switch small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.calculator-mode-switch input:checked + span {
  border-color: var(--cobalt);
  color: var(--cobalt);
  background: rgba(0, 87, 184, .045);
  box-shadow: inset 0 0 0 1px rgba(0, 87, 184, .14);
}
.calculator-mode-switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 87, 184, .14); }

.calculator-check {
  min-height: 56px;
  margin-top: 14px;
  border-radius: 9px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: #f7f9fc;
  cursor: pointer;
}
.calculator-check input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--cobalt); }
.calculator-check strong,
.calculator-check small { display: block; }
.calculator-check strong { font-size: 11px; font-weight: 650; }
.calculator-check small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }

.calculator-result { position: sticky; top: 72px; overflow: hidden; }
.calculator-result-head h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calculator-result-head > div { min-width: 0; }
.calculator-live-badge {
  min-height: 28px;
  border-radius: 999px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: #117b3e;
  background: rgba(22, 163, 74, .08);
  font-size: 10px;
  font-weight: 650;
}
.calculator-live-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.calculator-primary-total { padding: 25px 22px 22px; background: #f7faff; }
.calculator-primary-total > span,
.calculator-primary-total small { display: block; }
.calculator-primary-total > span { color: var(--muted); font-size: 11px; font-weight: 600; }
.calculator-primary-total output {
  margin-top: 7px;
  display: block;
  color: var(--text);
  font-size: clamp(29px, 2.35vw, 38px);
  line-height: 1.1;
  font-weight: 660;
  font-variant-numeric: tabular-nums;
}
.calculator-primary-total small { margin-top: 7px; color: var(--muted); font-size: 10px; }
.calculator-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.calculator-kpis > div { min-width: 0; min-height: 78px; padding: 14px 11px; border-right: 1px solid var(--border); }
.calculator-kpis > div:last-child { border-right: 0; }
.calculator-kpis span,
.calculator-kpis output { display: block; }
.calculator-kpis span { color: var(--muted); font-size: 9.5px; line-height: 1.3; }
.calculator-kpis output { margin-top: 8px; overflow: hidden; font-size: 12px; font-weight: 680; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.calculator-kpis .calculator-profit output { color: var(--success); }
.calculator-breakdown-head { padding: 18px 22px 10px; display: flex; align-items: center; justify-content: space-between; }
.calculator-breakdown-head h3 { margin: 0; font-size: 13px; font-weight: 650; }
.calculator-breakdown-head span { color: var(--muted); font-size: 9px; font-weight: 650; }
.calculator-breakdown { margin: 0; padding: 0 22px; }
.calculator-breakdown > div { min-height: 38px; border-bottom: 1px solid #edf0f4; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.calculator-breakdown dt { min-width: 0; color: #586579; font-size: 10.5px; line-height: 1.35; }
.calculator-breakdown dd { margin: 0; color: var(--text); font-size: 11px; font-weight: 620; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calculator-breakdown > .emphasis { border-top: 1px solid #cfd7e2; }
.calculator-breakdown > .emphasis dt,
.calculator-breakdown > .emphasis dd { color: var(--text); font-weight: 700; }
.calculator-disclaimer { margin: 0; padding: 16px 22px 20px; color: #7b8797; font-size: 9.5px; line-height: 1.5; }

@media (max-width: 1180px) {
  .calculator-layout { grid-template-columns: minmax(0, 1.4fr) minmax(320px, .9fr); }
  .calculator-fields-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calculator-kpis { grid-template-columns: 1fr; }
  .calculator-kpis > div { min-height: 58px; border-right: 0; border-bottom: 1px solid var(--border); }
  .calculator-kpis > div:last-child { border-bottom: 0; }
}

@media (max-width: 900px) {
  .calculator-hero { align-items: flex-start; flex-direction: column; }
  .calculator-hero-note { width: 100%; }
  .calculator-layout { grid-template-columns: 1fr; }
  .calculator-result { position: static; }
  .calculator-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calculator-kpis > div { min-height: 74px; border-right: 1px solid var(--border); border-bottom: 0; }
}

@media (max-width: 600px) {
  .calculator-page { gap: 12px; padding-bottom: 100px; }
  .calculator-hero { min-height: 0; padding: 20px 16px; }
  .calculator-hero-copy h2 { font-size: 24px; }
  .calculator-hero-copy > span { font-size: 13px; }
  .calculator-form-head,
  .calculator-result-head { padding-inline: 16px; }
  .calculator-section { padding: 20px 16px; }
  .calculator-fields,
  .calculator-fields-three,
  .calculator-mode-switch { grid-template-columns: 1fr; }
  .calculator-field-wide { grid-column: auto; }
  .calculator-field input,
  .calculator-field select { min-height: 48px; font-size: 16px; }
  .calculator-mode-switch label > span { min-height: 58px; }
  .calculator-kpis { grid-template-columns: 1fr; }
  .calculator-kpis > div { min-height: 58px; border-right: 0; border-bottom: 1px solid var(--border); }
  .calculator-primary-total,
  .calculator-breakdown-head,
  .calculator-breakdown,
  .calculator-disclaimer { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .calculator-field input,
  .calculator-field select,
  .calculator-mode-switch label > span { transition: none; }
}

/* Commercial proposal generator */
.calculator-tool-switch {
  width: fit-content;
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(238px, 1fr));
  gap: 4px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 6px 18px rgba(17, 24, 39, .04);
}
.calculator-tool-switch button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5b6678;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.calculator-tool-switch button:hover { color: var(--text); background: #f6f8fb; }
.calculator-tool-switch button.active { color: var(--cobalt); background: #fff; box-shadow: 0 3px 12px rgba(17, 24, 39, .08); }
.calculator-tool-switch .nav-icon { width: 25px; height: 25px; flex: 0 0 25px; }
.calculator-tool-switch strong,
.calculator-tool-switch small { display: block; }
.calculator-tool-switch strong { font-size: 12px; line-height: 1.3; font-weight: 660; }
.calculator-tool-switch small { margin-top: 2px; color: var(--muted); font-size: 9.5px; line-height: 1.25; }
.calculator-tool-switch button:focus-visible { outline: 3px solid rgba(0, 87, 184, .18); outline-offset: 2px; }

#transportCalculatorView,
.commercial-offer-view { display: grid; gap: 16px; }
#transportCalculatorView[hidden],
.commercial-offer-view[hidden] { display: none; }
.offer-hero { min-height: 138px; }
.offer-hero-note { background: #f8fbff; }

.offer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(330px, .78fr);
  align-items: start;
  gap: 16px;
}
.offer-form { padding: 0; overflow: hidden; }
.offer-form-head { border-bottom-color: var(--border); }
.offer-section {
  min-width: 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 22px;
}
.offer-section legend {
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.offer-section legend > span {
  width: 27px;
  padding-top: 2px;
  flex: 0 0 27px;
  color: var(--cobalt);
  font-size: 10px;
  font-weight: 650;
}
.offer-section legend div { display: grid; gap: 3px; }
.offer-section legend div:not(span) { color: var(--text); font-size: 13px; line-height: 1.3; font-weight: 650; }
.offer-section legend small { color: var(--muted); font-size: 10px; line-height: 1.35; font-weight: 450; }
.offer-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.offer-fields-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.offer-field { min-width: 0; display: block; }
.offer-field-wide { grid-column: 1 / -1; }
.offer-field > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: #4d5a6d;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 600;
}
.offer-field.required > span:first-child::after { content: "  *"; color: var(--cobalt); }
.offer-field input,
.offer-field textarea,
.offer-parameter input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d7dee7;
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  outline: none;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.offer-field textarea { min-height: 80px; resize: vertical; }
.offer-field input:hover,
.offer-field textarea:hover,
.offer-parameter input:hover { border-color: #b7c3d2; }
.offer-field input:focus-visible,
.offer-field textarea:focus-visible,
.offer-parameter input:focus-visible { border-color: var(--cobalt-active); box-shadow: 0 0 0 3px rgba(0, 87, 184, .11); }
.offer-field input::placeholder,
.offer-field textarea::placeholder,
.offer-parameter input::placeholder { color: #9aa5b5; }

.offer-file-field { position: relative; }
.offer-file-field input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.offer-file-control {
  min-height: 64px;
  border: 1px dashed #bdc9d8;
  border-radius: 9px;
  padding: 10px 12px 10px 42px;
  display: grid;
  align-content: center;
  gap: 2px;
  position: relative;
  background: #f9fbfd;
  cursor: pointer;
}
.offer-file-control::before {
  content: "+";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 21px;
  height: 21px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, .08);
  font-size: 16px;
  transform: translateY(-50%);
}
.offer-file-control b { font-size: 11px; font-weight: 650; }
.offer-file-control small { overflow: hidden; color: var(--muted); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.offer-file-field input:focus-visible + .offer-file-control { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(0, 87, 184, .11); }

.offer-items { display: grid; gap: 12px; }
.offer-item { border: 1px solid #dfe5ec; border-radius: 10px; padding: 15px; background: #fbfcfe; }
.offer-item-head { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.offer-item-head strong { font-size: 12px; font-weight: 660; }
.offer-item-head button { min-height: 36px; border: 0; padding: 0 7px; color: var(--critical); background: transparent; font: inherit; font-size: 10px; font-weight: 620; cursor: pointer; }
.offer-add-item {
  min-height: 44px;
  margin-top: 12px;
  border: 1px dashed #b8c6d7;
  border-radius: 9px;
  padding: 0 15px;
  color: var(--cobalt);
  background: #f9fbfd;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.offer-add-item span { margin-right: 5px; font-size: 17px; vertical-align: -1px; }
.offer-add-item:hover { border-color: var(--cobalt); background: rgba(0, 87, 184, .04); }

.offer-details { border-bottom: 1px solid var(--border); background: #fff; }
.offer-details summary {
  min-height: 66px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  cursor: pointer;
}
.offer-details summary::-webkit-details-marker { display: none; }
.offer-details summary > span { display: flex; align-items: center; gap: 10px; }
.offer-details summary b { width: 27px; color: var(--cobalt); font-size: 10px; font-weight: 650; }
.offer-details summary strong { font-size: 13px; font-weight: 650; }
.offer-details summary > small { color: var(--muted); font-size: 10px; }
.offer-details summary::after { content: "+"; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px; display: grid; place-items: center; color: var(--cobalt); background: rgba(0, 87, 184, .07); font-size: 16px; }
.offer-details[open] summary::after { content: "−"; }
.offer-details-body { border-top: 1px solid #edf0f4; padding: 20px 22px 22px; }
.offer-parameter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.offer-parameter { min-width: 0; border: 1px solid #e0e6ed; border-radius: 10px; padding: 12px; display: grid; gap: 8px; background: #fbfcfe; }
.offer-parameter strong { margin-bottom: 2px; color: var(--cobalt); font-size: 10px; font-weight: 650; }
.offer-parameter input { min-height: 39px; padding: 8px 10px; font-size: 11px; }
.offer-contact-fields { margin-top: 16px; }

.offer-summary { position: sticky; top: 72px; padding: 0; overflow: hidden; }
.offer-summary-preview { height: 192px; display: grid; grid-template-rows: 56px 1fr; background: #eef4fb; }
.offer-preview-brand { padding: 11px 15px; position: relative; overflow: hidden; background: var(--sidebar); }
.offer-preview-brand img { width: 102px; height: 32px; object-fit: contain; object-position: left center; }
.offer-preview-brand i { position: absolute; right: -25px; bottom: -31px; width: 190px; height: 54px; border: 2px solid rgba(54, 146, 255, .55); border-radius: 50%; transform: rotate(-7deg); }
.offer-preview-body { padding: 22px 20px; display: grid; align-content: start; gap: 7px; background: linear-gradient(140deg, #fff 0%, #f2f7fd 100%); }
.offer-preview-body > span { color: var(--cobalt); font-size: 8px; font-weight: 720; text-transform: uppercase; letter-spacing: .08em; }
.offer-preview-body > strong { max-width: 260px; overflow: hidden; font-size: 19px; line-height: 1.2; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.offer-preview-body > div { margin-top: 11px; display: flex; gap: 6px; }
.offer-preview-body > div i { width: 48px; height: 7px; border-radius: 4px; background: rgba(0, 87, 184, .12); }
.offer-summary-body { padding: 20px; }
.offer-summary-body > p:first-child { margin: 0 0 10px; color: var(--muted); font-size: 10px; font-weight: 620; }
.offer-progress { height: 6px; overflow: hidden; border-radius: 999px; background: #e8edf3; }
.offer-progress i { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--cobalt); transition: width 220ms ease; }
.offer-progress-copy { margin-top: 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.offer-progress-copy strong { font-size: 12px; font-weight: 660; }
.offer-progress-copy span { color: var(--muted); font-size: 9px; text-align: right; }
.offer-checklist { margin: 18px 0; border-top: 1px solid var(--border); padding: 9px 0 0; display: grid; list-style: none; }
.offer-checklist li { min-height: 36px; display: flex; align-items: center; gap: 9px; color: #758195; font-size: 10.5px; font-weight: 560; }
.offer-checklist li i { width: 17px; height: 17px; border: 1px solid #cdd5df; border-radius: 50%; display: grid; place-items: center; }
.offer-checklist li.ready { color: var(--text); }
.offer-checklist li.ready i { border-color: var(--success); color: #fff; background: var(--success); }
.offer-checklist li.ready i::after { content: "✓"; font-size: 10px; }
.offer-generate-button { width: 100%; min-height: 48px; justify-content: center; gap: 8px; }
.offer-generate-button .nav-icon { width: 18px; height: 18px; }
.offer-generate-button:disabled { opacity: .68; cursor: wait; }
.offer-generate-button.loading .nav-icon { animation: offerPulse 900ms ease-in-out infinite alternate; }
@keyframes offerPulse { to { opacity: .3; } }
.offer-status { display: none; margin-top: 12px; border-radius: 8px; padding: 10px 11px; font-size: 10.5px; line-height: 1.4; }
.offer-status.pending,
.offer-status.success,
.offer-status.error { display: block; }
.offer-status.pending { color: #4d5a6d; background: #f3f6fa; }
.offer-status.success { color: #11743b; background: rgba(22, 163, 74, .08); }
.offer-status.error { color: #a52424; background: rgba(220, 38, 38, .07); }
.offer-status a { color: inherit; font-weight: 700; }
.offer-privacy-note { margin: 12px 0 0; color: #8792a2; font-size: 9px; line-height: 1.4; text-align: center; }

@media (max-width: 1100px) {
  .offer-layout { grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); }
  .offer-fields-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offer-parameter-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .calculator-tool-switch { width: 100%; }
  .offer-layout { grid-template-columns: 1fr; }
  .offer-summary { position: static; }
}
@media (max-width: 600px) {
  .calculator-tool-switch { grid-template-columns: 1fr 1fr; }
  .calculator-tool-switch button { min-width: 0; padding-inline: 10px; }
  .calculator-tool-switch .nav-icon,
  .calculator-tool-switch small { display: none; }
  .calculator-tool-switch strong { font-size: 10.5px; }
  .offer-section { padding: 20px 16px; }
  .offer-fields,
  .offer-fields-three { grid-template-columns: 1fr; }
  .offer-field-wide { grid-column: auto; }
  .offer-field input,
  .offer-field textarea { font-size: 16px; }
  .offer-details summary { padding-inline: 16px; }
  .offer-details summary > small { display: none; }
  .offer-details-body { padding-inline: 16px; }
  .offer-summary-preview { height: 168px; }
}
@media (prefers-reduced-motion: reduce) {
  .calculator-tool-switch button,
  .offer-field input,
  .offer-field textarea,
  .offer-parameter input,
  .offer-progress i { transition: none; }
  .offer-generate-button.loading .nav-icon { animation: none; }
}

/* Operational directories v72 */
.directory-page.operational-directory-mode { gap: 18px; }
.directory-page.operational-directory-mode .directory-hero {
  min-height: 154px;
  padding: 20px 26px 0;
  grid-template-columns: minmax(0, 1fr);
}

.directory-page.operational-directory-mode .directory-hero-copy p { color: var(--cobalt); font-weight: 650; }
.directory-page.operational-directory-mode .directory-hero h2 { font-size: 28px; }
.directory-page.operational-directory-mode .directory-counter { display: none; }
.directory-page.operational-directory-mode .directory-tabs {
  min-height: 54px;
  grid-template-columns: repeat(5, minmax(132px, 210px));
  justify-content: start;
}
.directory-page.operational-directory-mode .directory-toolbar {
  min-height: 82px;
  padding: 16px 20px;
}
.directory-page.operational-directory-mode .directory-toolbar .panel-head { display: none; }
.directory-page.operational-directory-mode .directory-toolbar-actions { width: 100%; justify-content: space-between; }
.directory-page.operational-directory-mode .directory-search { position: relative; }
.directory-page.operational-directory-mode .directory-search::before {
  content: "";
  position: absolute;
  top: 50%; left: 14px;
  width: 15px; height: 15px;
  border: 1.7px solid #758296;
  border-radius: 50%;
  transform: translateY(-56%);
}
.directory-page.operational-directory-mode .directory-search::after {
  content: "";
  position: absolute;
  top: 28px; left: 27px;
  width: 6px; height: 1.7px;
  border-radius: 2px;
  background: #758296;
  transform: rotate(45deg);
}
.directory-page.operational-directory-mode .directory-search input { width: 310px; padding-left: 42px; }
.directory-operational-shell {
  min-height: 615px;
  display: grid;
  grid-template-columns: 250px minmax(420px, 1fr) 330px;
  background: var(--white);
}
.directory-operational-filters,
.directory-operational-register { border-right: 1px solid var(--border); }
.directory-operational-filters { padding: 20px 14px; background: #fbfcfe; }
.directory-filter-group + .directory-filter-group { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.directory-filter-group > strong { display: block; margin: 0 10px 10px; color: var(--text); font-size: 12px; font-weight: 680; }
.directory-filter-group button {
  width: 100%; min-height: 42px;
  border: 0; border-radius: 8px;
  padding: 0 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  color: #536074; background: transparent;
  font: inherit; font-size: 12px; text-align: left; cursor: pointer;
}
.directory-filter-group button b { color: #7d899a; font-size: 11px; font-weight: 600; }
.directory-filter-group button.active { color: var(--cobalt); background: rgba(0, 87, 184, .065); box-shadow: inset 2px 0 0 var(--cobalt-active); }
.directory-filter-group button.active b { color: var(--cobalt); }
.directory-supplier-purpose {
  margin: 0 8px;
  padding: 12px;
  border: 1px solid rgba(0, 87, 184, .16);
  border-radius: 9px;
  background: rgba(0, 87, 184, .05);
}
.directory-supplier-purpose span,
.directory-supplier-purpose small { display: block; }
.directory-supplier-purpose span { color: var(--cobalt); font-size: 11px; font-weight: 680; }
.directory-supplier-purpose small { margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.directory-active-dot { width: 7px; height: 7px; margin-right: 8px; display: inline-block; border-radius: 50%; background: #18a957; }
.directory-operational-register { min-width: 0; display: grid; grid-template-rows: 54px 1fr 50px; }
.directory-operational-head { padding: 0 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.directory-operational-head strong { font-size: 14px; font-weight: 680; }
.directory-operational-head span { color: var(--muted); font-size: 11px; }
.directory-operational-rows { min-height: 0; }
.directory-operational-row {
  position: relative;
  width: 100%; min-height: 76px;
  border: 0; border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: grid; align-items: center; gap: 12px;
  color: var(--text); background: var(--white);
  font: inherit; text-align: left; cursor: pointer;
}
.directory-operational-row::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: transparent; }
.directory-operational-row:hover { background: #fafcff; }
.directory-operational-row.active { background: rgba(0, 87, 184, .06); }
.directory-operational-row.active::before { background: var(--cobalt-active); }
.directory-operational-row strong,
.directory-operational-row small { display: block; }
.directory-operational-row strong { overflow: hidden; font-size: 13px; line-height: 1.3; font-weight: 670; text-overflow: ellipsis; white-space: nowrap; }
.directory-operational-row small { margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10.5px; line-height: 1.3; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.directory-operational-row em { justify-self: end; color: var(--cobalt); font-size: 11px; font-style: normal; font-weight: 650; }
.directory-operational-shell.counterparties .directory-operational-row { grid-template-columns: minmax(0, 1fr) auto; }
.directory-operational-shell.cities .directory-operational-row { grid-template-columns: 28px minmax(0, 1fr) 66px; }
.directory-operational-shell.cities .directory-operational-row > b { color: var(--text); text-align: right; font-size: 13px; }
.directory-location-icon { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--cobalt); background: rgba(0,87,184,.07); }
.directory-location-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.directory-point-icon { width: 15px; height: 15px; background-color: currentColor; }
.directory-operational-footer { padding: 0 18px; border-top: 1px solid var(--border); display: flex; align-items: center; color: var(--muted); font-size: 11px; }
.directory-operational-inspector { min-width: 0; padding: 20px 18px; background: #fcfdff; }
.directory-inspector-title { padding-bottom: 18px; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.directory-inspector-title span { color: var(--cobalt); font-size: 10px; font-weight: 650; }
.directory-inspector-title h3 { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 16px; line-height: 1.25; font-weight: 680; }
.directory-inspector-title em { max-width: 100%; border-radius: 6px; padding: 5px 8px; color: var(--cobalt); background: rgba(0,87,184,.075); font-size: 10px; font-style: normal; font-weight: 650; white-space: normal; }
.directory-operational-inspector dl { margin: 0; }
.directory-operational-inspector dl > div { padding: 14px 0; border-bottom: 1px solid var(--border); }
.directory-operational-inspector dt { color: var(--muted); font-size: 10px; }
.directory-operational-inspector dd { margin: 6px 0 0; color: var(--text); font-size: 12px; line-height: 1.45; font-weight: 620; overflow-wrap: anywhere; }
.directory-operational-inspector dd small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.directory-inspector-edit { margin-top: 18px; border: 0; padding: 0; display: inline-flex; align-items: center; gap: 8px; color: var(--cobalt); background: transparent; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.directory-inspector-edit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; }
.directory-inspector-empty { min-height: 300px; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; }
.directory-inspector-actions { margin-top: 18px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.directory-inspector-actions .directory-inspector-edit { min-height: 44px; margin-top: 0; }
.directory-inspector-merge {
  min-height: 44px; border: 0; padding: 0 4px;
  color: #9a5b00; background: transparent;
  font: inherit; font-size: 12px; font-weight: 670; cursor: pointer;
}
.directory-operational-row.has-duplicate em {
  border: 1px solid rgba(245, 158, 11, .26); border-radius: 999px; padding: 5px 8px;
  color: #8a5100; background: rgba(245, 158, 11, .09);
}
.directory-duplicate-inline { color: #8a5100 !important; font-weight: 650 !important; }

.directory-merge-notice {
  margin: 0 20px 16px; border: 1px solid rgba(22, 163, 74, .2); border-radius: 10px; padding: 13px 15px;
  color: #137a3b; background: rgba(22, 163, 74, .07);
  font-size: 12px; line-height: 1.45; font-weight: 620;
  animation: directory-feedback-enter 180ms ease-out;
}
.directory-duplicate-watch {
  margin: 0 20px 18px; border: 1px solid rgba(245, 158, 11, .24); border-radius: 12px;
  overflow: hidden; background: #fffdf8; box-shadow: 0 8px 24px rgba(56, 42, 18, .045);
}
.directory-duplicate-watch-head {
  min-height: 76px; padding: 15px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border-bottom: 1px solid rgba(245, 158, 11, .18);
}
.directory-duplicate-watch-head span,
.directory-duplicate-watch-head strong,
.directory-duplicate-watch-head p { display: block; margin: 0; }
.directory-duplicate-watch-head span { margin-bottom: 4px; color: #8a5100; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.directory-duplicate-watch-head strong { color: var(--text); font-size: 14px; font-weight: 680; }
.directory-duplicate-watch-head p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.directory-duplicate-watch-head > b {
  border-radius: 999px; padding: 6px 10px;
  color: #8a5100; background: rgba(245, 158, 11, .11);
  font-size: 10px; font-weight: 680; white-space: nowrap;
}
.directory-duplicate-groups { display: grid; }
.directory-duplicate-group {
  min-height: 68px; padding: 12px 18px;
  display: grid; grid-template-columns: 138px minmax(0, 1fr) auto; align-items: center; gap: 18px;
  border-bottom: 1px solid rgba(221, 227, 234, .78);
}
.directory-duplicate-group:last-child { border-bottom: 0; }
.directory-duplicate-inn span,
.directory-duplicate-inn strong { display: block; }
.directory-duplicate-inn span { color: var(--muted); font-size: 9px; font-weight: 650; }
.directory-duplicate-inn strong { margin-top: 4px; color: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; }
.directory-duplicate-names { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.directory-duplicate-names span {
  max-width: 320px; border: 1px solid var(--border); border-radius: 7px; padding: 6px 8px;
  overflow: hidden; color: #475467; background: var(--white);
  font-size: 10px; font-weight: 590; text-overflow: ellipsis; white-space: nowrap;
}
.directory-duplicate-group .text-button { min-height: 44px; color: #8a5100; font-weight: 670; }

@media (max-width: 1220px) {
  .directory-operational-shell { grid-template-columns: 210px minmax(360px, 1fr) 280px; }
}

@media (max-width: 980px) {
  .directory-operational-shell { grid-template-columns: 190px minmax(340px, 1fr); }
  .directory-operational-inspector { grid-column: 1 / -1; border-top: 1px solid var(--border); }
}

@media (max-width: 760px) {
  .directory-duplicate-group { grid-template-columns: 1fr; gap: 9px; }
  .directory-duplicate-group .text-button { justify-self: start; padding-inline: 0; }
  .directory-duplicate-watch-head { align-items: flex-start; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--page);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.auth-loading .app-shell,
body.auth-loading .bottom-nav,
body:not(.is-authenticated) .app-shell,
body:not(.is-authenticated) .bottom-nav {
  display: none;
}

body.is-authenticated .auth-screen {
  display: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-screen {
  min-height: 100vh;
  padding: 42px;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 520px);
  gap: 42px;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(23, 35, 52, 0.98) 0%, rgba(23, 35, 52, 0.92) 42%, rgba(243, 246, 250, 0.92) 42%, rgba(243, 246, 250, 1) 100%),
    var(--page);
}

.auth-brand {
  min-height: calc(100vh - 84px);
  padding: 42px 46px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--white);
  background:
    radial-gradient(circle at 88% 16%, rgba(8, 103, 216, 0.28), transparent 30%),
    linear-gradient(180deg, #172334, #111a28);
  box-shadow: var(--shadow);
}

.auth-brand .brand-logo {
  width: 220px;
}

.auth-brand p,
.auth-copy p,
.auth-pending p {
  margin: 0;
}

.auth-brand h1 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 620;
}

.auth-brand p {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
}

.auth-brand span {
  max-width: 520px;
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.55;
}

.auth-card {
  padding: 28px;
  border: 1px solid rgba(221, 227, 234, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.auth-tabs {
  height: 42px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--panel);
}

.auth-tabs button {
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 620;
}

.auth-tabs button.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-active));
  box-shadow: 0 10px 24px rgba(0, 87, 184, 0.18);
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form .primary-button {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
}

.auth-copy {
  margin-bottom: 2px;
}

.auth-copy p {
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.auth-copy h2,
.auth-pending h2 {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.14;
  font-weight: 620;
}

.auth-message {
  min-height: 18px;
  margin-top: 16px;
  color: var(--critical);
  font-size: 13px;
  font-weight: 560;
}

.auth-message.success {
  color: var(--success);
}

.auth-pending {
  padding: 22px 0 8px;
  text-align: center;
}

.auth-pending-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--success);
  font-size: 24px;
  font-weight: 800;
}

.auth-pending p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.app-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  overflow: hidden;
}

.sidebar {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 40px 20px 28px;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 18%, rgba(8, 103, 216, 0.22), transparent 28%),
    linear-gradient(180deg, #172334, var(--sidebar-deep));
  display: flex;
  flex-direction: column;
  gap: 38px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.brand,
.mobile-brand,
.manager-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 204px;
  height: auto;
  display: block;
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: var(--white);
  font-weight: 800;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.brand-name {
  font-size: 29px;
  font-weight: 800;
  line-height: 1;
}

.brand-caption {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 14px;
}

.nav-item {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  font-size: 16px;
  font-weight: 480;
}

.nav-item.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-active));
  box-shadow: 0 12px 32px rgba(0, 87, 184, 0.34);
}

.nav-item.disabled,
.nav-item:disabled {
  cursor: default;
  color: rgba(255, 255, 255, 0.28);
  background: transparent;
  box-shadow: none;
  opacity: 1;
}

.nav-item.disabled .nav-icon {
  opacity: 0.42;
}

.bottom-nav button.disabled,
.bottom-nav button:disabled {
  cursor: default;
  color: #a8b1bf;
  background: transparent;
  opacity: 1;
}

.nav-icon,
.stage-node svg,
.metric svg,
.summary-item svg,
.doc-action svg,
.cost-icon svg,
.small-copy svg {
  width: 22px;
  height: 22px;
  display: block;
}

.nav-icon svg,
.stage-node svg,
.metric svg,
.summary-item svg,
.doc-action svg,
.cost-icon svg,
.small-copy svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.sidebar-footer {
  margin-top: auto;
  display: none;
  gap: 22px;
}

.client-card,
.role-field,
.topbar-actions label.manager-only {
  display: none !important;
}

.client-card {
  min-height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.client-card > .muted {
  display: none;
}

.client-card small,
.manager-line span,
.muted {
  color: var(--muted);
}

.client-card .muted,
.manager-line span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #edf6ff, #b8d7ff);
  color: var(--graphite);
  font-weight: 800;
}

.avatar-photo {
  object-fit: cover;
  overflow: hidden;
}

.workspace {
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  padding: 32px 38px 28px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.workspace::before,
.workspace::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 104px;
  pointer-events: none;
}

.workspace::before {
  background:
    linear-gradient(90deg, rgba(243, 246, 250, 0) 0%, rgba(248, 250, 253, 0.82) 18%, rgba(248, 250, 253, 0.74) 72%, rgba(243, 246, 250, 0) 100%);
}

.workspace::after {
  background-image: url("/assets/pantera-header-wave.svg");
  background-repeat: no-repeat;
  background-position: 40px 0;
  background-size: 900px 104px;
  opacity: 1;
}

.topbar,
.hero-panel,
.content-grid,
.overview-page,
.containers-page,
.empty-page {
  position: relative;
  z-index: 1;
}

.topbar {
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.mobile-brand {
  display: none;
}

.title-block p,
.panel-head p,
.dialog-head p {
  margin: 0 0 6px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.title-block p {
  display: none;
}

.title-block h1,
.panel-head h2,
.dialog-head h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0;
}

.title-block h1 {
  font-size: 28px;
  line-height: 1.08;
  font-weight: 620;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.role-field,
.topbar-actions > .manager-only {
  display: none !important;
}

.company-chip {
  min-height: 44px;
  padding: 0 14px;
  border-left: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
}

.company-chip > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.company-chip strong {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 520;
  letter-spacing: 0;
}

.company-chip::after {
  display: none;
}

#topUserRole {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-chip .nav-icon,
.top-icon .nav-icon {
  color: var(--graphite);
}

.top-icon {
  width: 42px;
  height: 42px;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  display: grid;
  place-items: center;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.field input,
.field select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: var(--white);
  outline: 0;
}

.field input:focus,
.field select:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(0, 87, 184, 0.1);
}

.field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 520;
}

.field.compact {
  min-width: 158px;
}

.icon-button,
.primary-button,
.text-button {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 16px;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.08);
  font-weight: 620;
}

.icon-button {
  width: 42px;
  padding: 0;
  font-size: 22px;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-active));
}

.text-button {
  background: transparent;
}

.documents-panel .text-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
}

.documents-panel .text-button::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.text-button.danger {
  color: var(--critical);
}

.detail-toolbar {
  min-height: 42px;
  margin: -4px 0 12px;
  display: flex;
  align-items: center;
}

.back-button {
  min-height: 38px;
  border: 1px solid rgba(221, 227, 234, 0.9);
  border-radius: 8px;
  padding: 0 14px 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--graphite);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.04);
  font-size: 13px;
  font-weight: 560;
}

.back-button:hover {
  color: var(--cobalt);
  border-color: rgba(0, 87, 184, 0.22);
  background: var(--white);
}

.back-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--cobalt);
  font-size: 24px;
  line-height: 1;
}

.hero-panel,
.panel {
  border: 1px solid rgba(221, 227, 234, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.hero-panel {
  height: 369px;
  padding: 22px 26px 22px;
  margin-bottom: 16px;
}

.hero-top {
  display: grid;
  grid-template-columns: 390px 224px 154px 222px;
  gap: 18px;
  align-items: start;
  margin-bottom: 26px;
}

.container-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.container-title {
  margin: 6px 0 8px;
  font-size: 38px;
  line-height: 1;
  white-space: nowrap;
  font-weight: 510;
}

.small-copy {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 8px;
  color: var(--muted);
}

.small-copy svg {
  width: 16px;
  height: 16px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--muted);
  font-size: 13px;
}

.mobile-client-line {
  display: none;
}

.meta-line strong {
  color: var(--text);
}

.status-line {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cobalt);
}

.status-text {
  color: var(--cobalt);
  font-size: 25px;
  font-weight: 590;
}

.status-caption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.metric {
  min-height: 70px;
  padding-left: 22px;
  border-left: 1px solid var(--border);
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 11px;
  align-items: start;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.15;
}

.metric-label {
  white-space: nowrap;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 17px;
  font-weight: 520;
  line-height: 1.15;
}

.metric svg,
.metric .svg-icon {
  grid-row: span 3;
  margin-top: 18px;
  color: var(--graphite);
}

.metric:last-child strong {
  white-space: nowrap;
}

.risk-low {
  color: var(--success);
}

.risk-medium {
  color: var(--warning);
}

.risk-high {
  color: var(--critical);
}

.route {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
}

.route-stage {
  position: relative;
  min-width: 0;
  text-align: center;
}

.route-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 26px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: #d9dfe7;
}

.route-stage:first-child::before {
  display: none;
}

.route-stage.done::before,
.route-stage.current::before {
  background: #0a5fbe;
}

.stage-node {
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 2px solid #d9dfe7;
  display: grid;
  place-items: center;
  color: #687386;
  background: var(--white);
  font-weight: 800;
}

.stage-node svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}

.stage-node .svg-icon {
  width: 25px;
  height: 25px;
}

.route-stage.done .stage-node::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cobalt);
  border: 2px solid var(--white);
  box-shadow: 0 3px 8px rgba(0, 87, 184, 0.2);
}

.route-stage.done .stage-node::before {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  z-index: 2;
  width: 5px;
  height: 3px;
  border-left: 1.5px solid var(--white);
  border-bottom: 1.5px solid var(--white);
  transform: rotate(-45deg);
}

.route-stage.current .stage-node::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cobalt);
  transform: translateX(-50%);
}

.route-stage.done .stage-node,
.route-stage.current .stage-node {
  border-color: #0a5fbe;
  color: #0a5fbe;
  box-shadow: 0 8px 22px rgba(0, 87, 184, 0.16);
}

.route-stage.current .stage-node {
  background: var(--white);
}

.route-stage.is-future .stage-node {
  color: #687386;
  border-color: #d9dfe7;
  box-shadow: none;
}

.route-stage strong {
  display: block;
  font-size: 14px;
  font-weight: 520;
}

.route-stage span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.panel {
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 16px 20px 14px;
}

.content-grid > .panel {
  height: 396px;
  min-height: 396px;
}

.list-panel,
.access-panel {
  display: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.panel-head h2 {
  font-size: 16px;
  font-weight: 520;
}

.panel-head p:empty {
  display: none;
}

.count-pill,
.badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(0, 87, 184, 0.08);
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 750;
}

.container-list {
  display: grid;
}

.container-row {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--border);
  padding: 15px 0;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.8fr) minmax(112px, 0.7fr) 34px;
  gap: 12px;
  text-align: left;
  color: var(--text);
  background: transparent;
}

.container-row.active {
  color: var(--cobalt);
}

.container-row strong,
.line-item strong,
.doc-row strong {
  display: block;
  font-weight: 560;
}

.container-row span,
.line-item span,
.doc-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.row-arrow {
  align-self: center;
  justify-self: end;
  color: var(--muted);
}

.segmented {
  min-width: 164px;
  height: 30px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--panel);
}

.segmented button {
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 560;
}

.segmented button.active {
  color: var(--white);
  background: var(--cobalt);
}

.size-segmented {
  min-width: 108px;
  width: 108px;
  grid-template-columns: repeat(2, 1fr);
}

.size-segmented button {
  font-size: 12px;
}

.total-line {
  margin: 4px 0 16px;
}

.total-line span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.total-line strong {
  display: block;
  margin-top: 8px;
  font-size: 36px;
  letter-spacing: 0;
}

.cost-table {
  display: grid;
}

.cost-head,
.line-item,
.doc-row {
  min-height: 40px;
  border-top: 1px solid var(--border);
  display: grid;
  align-items: center;
  gap: 12px;
}

.cost-head {
  min-height: 34px;
  grid-template-columns: minmax(220px, 1fr) 90px 90px 100px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.line-item {
  grid-template-columns: minmax(220px, 1fr) 90px 90px 100px;
}

.cost-table .line-item {
  min-height: 39px;
}

.cost-table .line-item strong {
  font-size: 14px;
  font-weight: 450;
}

.cost-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cost-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  background: transparent;
}

.cost-icon.blue {
  background: transparent;
}

.cost-icon.neutral {
  background: transparent;
}

.cost-tile-img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.total-row {
  min-height: 42px;
  background: var(--panel);
  padding: 0 10px;
  border-radius: 0 0 8px 8px;
  font-weight: 540;
}

.doc-row {
  min-height: 54px;
  grid-template-columns: 42px minmax(0, 1fr) 100px 38px 38px;
  gap: 14px;
}

.doc-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.08);
  font-size: 11px;
  font-weight: 800;
}

.doc-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.doc-icon .svg-icon {
  width: 22px;
  height: 22px;
}

.doc-picto {
  width: 25px;
  height: 25px;
  display: block;
}

.doc-icon.pdf {
  color: #ef3f3f;
  background: rgba(239, 68, 68, 0.08);
}

.doc-icon.sheet {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
}

.doc-icon.doc {
  color: #0b66d8;
  background: rgba(11, 102, 216, 0.1);
}

.doc-meta strong,
.doc-meta span {
  display: block;
  font-size: 12px;
}

.doc-meta strong {
  color: var(--muted);
  font-weight: 520;
}

.doc-action {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: var(--white);
}

.doc-action svg {
  width: 16px;
  height: 16px;
}

.doc-action .svg-icon {
  width: 16px;
  height: 16px;
}

.doc-action.disabled {
  color: #aeb6c2;
  background: #f1f3f6;
}

.doc-status {
  font-size: 13px;
  font-weight: 520;
}

.doc-row strong {
  font-size: 14px;
  font-weight: 500;
}

.doc-row span {
  font-size: 12px;
}

.access-panel {
  grid-column: 2;
}

.access-group + .access-group {
  margin-top: 18px;
}

.access-group h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.access-row {
  min-height: 54px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.access-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.access-status {
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.dashboard-page {
  display: grid;
  gap: 8px;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-kpi {
  min-height: 108px;
  border: 1px solid rgba(221, 227, 234, 0.9);
  border-radius: 12px;
  padding: 14px 18px 12px;
  display: grid;
  grid-template-columns: 46px 1fr;
  column-gap: 14px;
  align-items: start;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--soft-shadow);
}

.dashboard-kpi-icon {
  width: 38px;
  height: 38px;
  grid-row: span 3;
  object-fit: contain;
}

.dashboard-kpi span {
  min-height: 32px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.24;
  font-weight: 560;
}

.dashboard-kpi strong {
  display: block;
  margin-top: 2px;
  font-size: 28px;
  line-height: 1;
  font-weight: 590;
}

.dashboard-kpi small {
  display: block;
  margin-top: 6px;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 520;
}

.dashboard-kpi.green small {
  color: var(--success);
}

.dashboard-route-panel {
  height: 108px;
  min-height: 108px;
  padding: 13px 20px 11px;
}

.dashboard-panel-head {
  margin-bottom: 10px;
}

.dashboard-panel-head h2 {
  font-size: 16px;
  line-height: 1.15;
  font-weight: 560;
}

.dashboard-panel-head h2 span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.dashboard-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.dashboard-updated .summary-refresh-img {
  width: 16px;
  height: 16px;
}

.dashboard-route {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
}

.dashboard-route-stage {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 12px;
  align-items: center;
}

.dashboard-route-stage::before {
  content: "";
  position: absolute;
  top: 31px;
  right: 19px;
  width: 18px;
  height: 18px;
  border-top: 1.5px solid #9aa5b5;
  border-right: 1.5px solid #9aa5b5;
  transform: rotate(45deg);
  opacity: 0.76;
}

.dashboard-route-stage::after {
  display: none;
}

.dashboard-route-stage.last::before {
  display: none;
}

.dashboard-route-node {
  width: 38px;
  height: 38px;
  grid-row: span 3;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--cobalt);
  background: linear-gradient(180deg, #eff6ff, #dfeeff);
}

.dashboard-route-stage.cyan .dashboard-route-node {
  color: #087fa3;
  background: linear-gradient(180deg, #eefbff, #d9f5fb);
}

.dashboard-route-stage.amber .dashboard-route-node {
  color: var(--cobalt);
  background: linear-gradient(180deg, #eff6ff, #e3efff);
}

.dashboard-route-stage.gray .dashboard-route-node {
  color: #7b8797;
  background: linear-gradient(180deg, #f6f8fb, #edf1f6);
}

.dashboard-route-node .svg-icon {
  width: 27px;
  height: 27px;
  margin: 0;
  color: inherit;
  background: currentColor;
}

.dashboard-route-stage strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dashboard-route-stage b {
  display: block;
  margin-top: 3px;
  font-size: 22px;
  line-height: 1;
  font-weight: 620;
}

.dashboard-route-stage span {
  display: block;
  margin: 3px 0 11px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: 8px 12px;
}

.dashboard-grid .panel {
  height: auto;
  min-height: 0;
  padding: 16px 20px 14px;
}

.dashboard-chart-panel,
.dashboard-rates-panel {
  min-height: 262px !important;
}

.dashboard-trend-panel,
.dashboard-savings-panel {
  min-height: 202px !important;
}

.dashboard-trend-panel {
  position: relative;
}

.dashboard-select {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--graphite);
  background: rgba(248, 250, 252, 0.82);
  font-size: 12px;
  font-weight: 520;
}

.dashboard-select::after {
  content: "⌄";
  margin-left: 8px;
  color: var(--muted);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart-legend i {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}

.legend-plan,
.legend-pantera {
  background: var(--cobalt);
}

.legend-fact {
  background: #9fc8ff;
}

.legend-market {
  background: #9aa5b5;
}

.shipment-chart {
  height: 174px;
  margin-top: 10px;
  padding: 12px 4px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.shipment-month {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr 22px;
  text-align: center;
}

.bars {
  height: 128px;
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 10px;
}

.bars i {
  position: relative;
  width: 22px;
  min-height: 4px;
  border-radius: 2px 2px 0 0;
  display: block;
}

.bars .plan {
  background: var(--cobalt);
}

.bars .fact {
  background: #9fc8ff;
}

.bars span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  transform: translateX(-50%);
  color: var(--text);
  font-size: 11px;
  font-weight: 540;
}

.shipment-month strong {
  color: var(--graphite);
  font-size: 12px;
  font-weight: 520;
}

.rate-table {
  display: grid;
  margin-top: 6px;
}

.rate-head,
.rate-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.18fr) 94px 94px 82px;
  gap: 12px;
  align-items: center;
}

.rate-head {
  min-height: 38px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 560;
}

.rate-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 520;
}

.rate-row {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-bottom: 1px solid rgba(221, 227, 234, 0.82);
  padding: 0;
  text-align: left;
  color: var(--text);
  background: transparent;
}

.rate-row span {
  overflow: hidden;
  color: var(--graphite);
  font-size: 12px;
  font-weight: 540;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rate-row strong {
  font-size: 12px;
  font-weight: 520;
}

.rate-row .pantera-rate {
  color: var(--cobalt);
  font-weight: 650;
}

.rate-row .saving-rate {
  color: var(--success);
  font-weight: 650;
}

.trend-chart {
  position: relative;
  height: 124px;
  margin: 12px 110px 0 0;
  border: 0;
}

.trend-svg {
  width: 100%;
  height: 124px;
  display: block;
  overflow: visible;
}

.trend-grid-line {
  stroke: rgba(221, 227, 234, 0.8);
  stroke-width: 1;
}

.trend-line {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-line.market {
  stroke: #9aa5b5;
}

.trend-line.pantera {
  stroke: var(--cobalt);
}

.trend-circle {
  stroke: var(--white);
  stroke-width: 2;
}

.trend-circle.market {
  fill: #9aa5b5;
}

.trend-circle.pantera {
  fill: var(--cobalt);
}

.trend-label,
.trend-month-label {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 520;
  text-anchor: middle;
}

.trend-label.market {
  fill: var(--muted);
}

.trend-label.pantera {
  fill: var(--cobalt);
}

.trend-month-label {
  fill: var(--muted);
}

.trend-summary {
  position: absolute;
  right: 20px;
  bottom: 18px;
  width: 90px;
  min-height: 98px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  align-content: start;
  gap: 6px;
  background: rgba(248, 250, 252, 0.86);
}

.trend-summary span,
.trend-summary small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 520;
}

.trend-summary strong {
  color: var(--cobalt);
  font-size: 20px;
  line-height: 1;
  font-weight: 560;
}

.trend-summary b {
  color: var(--success);
  font-size: 13px;
  font-weight: 540;
}

.dashboard-savings-panel {
  position: relative;
}

.savings-table {
  padding-right: 150px;
}

.savings-head,
.saving-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 96px 62px 30px;
  gap: 10px;
  align-items: center;
}

.savings-head {
  min-height: 28px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 560;
}

.saving-row {
  min-height: 28px;
  border-bottom: 1px solid rgba(221, 227, 234, 0.76);
  font-size: 12px;
}

.saving-row span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.saving-row strong {
  font-weight: 560;
}

.saving-row b {
  color: var(--graphite);
  font-weight: 520;
}

.saving-bar {
  height: 7px;
  border-radius: 99px;
  background: #ecf3f0;
  overflow: hidden;
}

.saving-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #24b26b;
}

.total-saving {
  position: absolute;
  top: 56px;
  right: 20px;
  width: 124px;
  min-height: 116px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 12px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: rgba(248, 250, 252, 0.9);
}

.total-saving span {
  color: var(--graphite);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 560;
}

.total-saving strong {
  color: var(--cobalt);
  font-size: 21px;
  line-height: 1.05;
  font-weight: 590;
  white-space: nowrap;
}

.total-saving small {
  color: var(--success);
  font-size: 13px;
  font-weight: 520;
}

.dashboard-summary-strip {
  height: 68px;
  min-height: 68px;
  border: 1px solid rgba(221, 227, 234, 0.86);
  border-radius: 12px;
  padding: 7px 18px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.dashboard-summary-strip .summary-item {
  min-height: 40px;
  grid-template-columns: 32px 1fr;
  column-gap: 12px;
}

.dashboard-summary-strip .summary-item:last-child {
  border-right: 0;
}

.dashboard-summary-strip .summary-item strong {
  font-size: 15px;
  line-height: 1.12;
}

.containers-page {
  display: grid;
  gap: 16px;
}

.containers-hero {
  min-height: 158px;
  height: auto;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(520px, 1.35fr);
  gap: 28px;
  align-items: center;
}

.containers-hero-copy p,
.register-toolbar p {
  margin: 0 0 6px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.containers-hero-copy h2,
.register-toolbar h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: 0;
}

.containers-hero-copy span,
.register-toolbar span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.containers-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  min-height: 88px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.76);
  overflow: hidden;
}

.register-stat {
  min-width: 0;
  padding: 15px 16px;
  border-right: 1px solid var(--border);
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 12px;
  align-items: center;
}

.register-stat:last-child {
  border-right: 0;
}

.register-stat .svg-icon,
.register-stat .metric-icon-img {
  width: 28px;
  height: 28px;
  grid-row: span 2;
  color: var(--graphite);
}

.register-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.register-stat strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  font-weight: 560;
  line-height: 1.15;
}

.containers-register {
  min-height: 608px;
  height: auto;
  padding: 18px 20px 14px;
}

.register-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.register-toolbar h2 {
  font-size: 21px;
}

.register-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-field {
  width: 238px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  background: var(--white);
}

.search-field .nav-icon,
.search-field .nav-icon svg {
  width: 18px;
  height: 18px;
}

.search-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}

.register-segmented {
  min-width: 218px;
  height: 42px;
}

.register-table {
  display: grid;
}

.register-head,
.register-row {
  display: grid;
  grid-template-columns: minmax(64px, 0.34fr) minmax(148px, 1.13fr) minmax(154px, 1.04fr) minmax(104px, 0.74fr) minmax(128px, 0.86fr) minmax(112px, 0.72fr) minmax(92px, 0.58fr) 24px;
  gap: 12px;
  align-items: center;
}

.register-head {
  min-height: 36px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.register-row {
  width: 100%;
  min-height: 88px;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 11px 0;
  text-align: left;
  color: var(--text);
  background: transparent;
}

.register-row:hover {
  background: linear-gradient(90deg, rgba(0, 87, 184, 0.055), rgba(255, 255, 255, 0));
}

.register-row:hover .register-container-cell strong {
  color: var(--cobalt);
}

.register-deal-cell strong {
  color: var(--graphite);
  font-size: 17px;
  font-weight: 560;
}

.register-row strong {
  display: block;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.2;
}

.register-row span,
.register-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.register-container-cell strong {
  font-size: 18px;
  font-weight: 560;
  white-space: nowrap;
}

.status-pill {
  width: fit-content;
  min-height: 24px;
  margin: 0 0 8px !important;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--cobalt) !important;
  background: rgba(0, 87, 184, 0.08);
  font-size: 12px !important;
  font-weight: 620;
}

.mini-route {
  width: min(154px, 100%);
  height: 18px;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
  gap: 5px;
}

.mini-route span {
  height: 6px;
  margin: 0;
  border-radius: 99px;
  background: #d9dfe7;
}

.mini-route span.done,
.mini-route span.current {
  background: var(--cobalt);
}

.mini-route span.current {
  box-shadow: 0 0 0 4px rgba(0, 87, 184, 0.12);
}

.register-empty {
  min-height: 220px;
  border-top: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.shipment-plan-page {
  position: relative;
  z-index: 1;
}

.shipment-plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 12px;
  align-items: start;
}

.shipment-plan-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.shipment-plan-stats {
  height: 102px;
  min-height: 102px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.shipment-stat {
  min-width: 0;
  padding: 19px 24px;
  border-right: 1px solid var(--border);
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-content: center;
}

.shipment-stat:last-child {
  border-right: 0;
}

.shipment-stat-icon {
  width: 38px;
  height: 38px;
  grid-row: span 2;
  align-self: center;
  object-fit: contain;
}

.shipment-stat span {
  color: var(--graphite);
  font-size: 13px;
  font-weight: 540;
  line-height: 1.22;
}

.shipment-stat strong {
  margin-top: 4px;
  font-size: 27px;
  line-height: 1;
  font-weight: 590;
}

.shipment-plan-register {
  height: auto;
  min-height: 702px;
  padding: 14px 0 0;
  overflow: hidden;
}

.shipment-filters {
  padding: 0 14px 10px;
  border-bottom: 1px solid rgba(221, 227, 234, 0.72);
}

.shipment-filter-grid {
  display: grid;
  grid-template-columns: 136px 104px 104px 126px minmax(210px, 1fr);
  gap: 10px;
  align-items: end;
}

.shipment-filter {
  gap: 6px;
}

.shipment-filter span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
}

.shipment-filter input,
.shipment-filter select {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.shipment-status-filter {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.shipment-status-filter button {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 8px;
  color: var(--graphite);
  background: rgba(248, 250, 252, 0.82);
  font-size: 11px;
  font-weight: 560;
  white-space: nowrap;
}

.shipment-status-filter button.active {
  color: var(--white);
  border-color: var(--cobalt);
  background: var(--cobalt);
  box-shadow: 0 8px 20px rgba(0, 87, 184, 0.16);
}

.shipment-search-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) 38px auto;
  gap: 10px;
  align-items: center;
}

.shipment-search {
  width: 100%;
  height: 36px;
  border-radius: 8px;
}

.shipment-filter-button {
  width: 36px;
  height: 36px;
}

.shipment-filter-button .svg-icon {
  width: 16px;
  height: 16px;
}

.shipment-new-button {
  min-height: 36px;
  padding: 0 16px;
  font-size: 12px;
  white-space: nowrap;
}

.shipment-table {
  display: grid;
}

.shipment-table-head,
.shipment-table-row {
  display: grid;
  grid-template-columns: 32px 58px minmax(128px, 1fr) 88px minmax(104px, 0.82fr) 48px 82px 90px;
  gap: 8px;
  align-items: center;
}

.shipment-table-head {
  min-height: 43px;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  color: var(--graphite);
  font-size: 12px;
  font-weight: 620;
}

.shipment-table-row {
  position: relative;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid rgba(221, 227, 234, 0.78);
  padding: 0 16px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.shipment-table-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
}

.shipment-table-row:hover,
.shipment-table-row.active {
  background: linear-gradient(90deg, rgba(0, 87, 184, 0.08), rgba(255, 255, 255, 0));
}

.shipment-table-row.active::before {
  background: var(--cobalt);
}

.shipment-table-row span,
.shipment-table-row strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}

.shipment-table-row strong {
  color: var(--cobalt);
  font-weight: 580;
}

.shipment-table-row .row-index {
  color: var(--cobalt);
  font-weight: 520;
}

.plan-status-pill {
  width: fit-content;
  min-height: 22px;
  border-radius: 6px;
  padding: 4px 8px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.08);
  font-size: 11px !important;
  font-weight: 650;
  white-space: nowrap;
}

.plan-status-pill.amber {
  color: #d97706;
  background: rgba(245, 158, 11, 0.12);
}

.plan-status-pill.gray {
  color: #606b7b;
  background: #eef1f5;
}

.shipment-table-footer {
  min-height: 58px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.shipment-pages {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shipment-pages button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  color: var(--graphite);
  background: transparent;
  font-size: 12px;
  font-weight: 560;
}

.shipment-pages button.active {
  color: var(--white);
  background: var(--cobalt);
  box-shadow: 0 8px 20px rgba(0, 87, 184, 0.18);
}

.shipment-table-footer label {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.shipment-table-footer select {
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--graphite);
  background: var(--white);
}

.shipment-detail {
  height: auto;
  min-height: 812px;
  padding: 0;
  overflow: hidden;
}

.plan-detail-head {
  min-height: 56px;
  padding: 18px 16px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-detail-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 620;
}

.plan-detail-actions {
  padding: 0 16px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px 36px;
  gap: 8px;
}

.plan-detail-actions .primary-button {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
}

.button-icon {
  width: 16px;
  height: 16px;
  color: currentColor;
}

.edit-action svg {
  width: 16px;
  height: 16px;
}

.plan-detail-section {
  border-top: 1px solid var(--border);
  padding: 13px 16px;
}

.plan-detail-section h3 {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--graphite);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 620;
}

.plan-detail-section h3 svg,
.plan-detail-section h3 .svg-icon {
  width: 17px;
  height: 17px;
  color: var(--graphite);
}

.plan-definition-grid,
.plan-finance-grid {
  margin: 0;
  display: grid;
  gap: 10px 14px;
}

.plan-definition-grid {
  grid-template-columns: 1fr 1fr;
}

.plan-finance-grid {
  grid-template-columns: 1fr 1fr;
}

.plan-definition-grid div,
.plan-finance-grid div {
  min-width: 0;
}

.plan-definition-grid dt,
.plan-finance-grid dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
}

.plan-definition-grid dd,
.plan-finance-grid dd {
  margin: 0;
  overflow: hidden;
  color: var(--graphite);
  font-size: 12px;
  line-height: 1.24;
  font-weight: 560;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.plan-route {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.plan-route::before {
  content: "";
  position: absolute;
  left: 33px;
  right: 33px;
  top: 19px;
  height: 2px;
  background: var(--cobalt);
}

.plan-route div {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  text-align: center;
}

.plan-route div::before {
  content: "";
  width: 38px;
  height: 38px;
  border: 1px solid rgba(0, 87, 184, 0.38);
  border-radius: 50%;
  background: var(--white);
  grid-row: 1;
  grid-column: 1;
}

.plan-route .svg-icon {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  margin-top: 9px;
  color: var(--cobalt);
  grid-row: 1;
  grid-column: 1;
}

.plan-route strong {
  margin-top: 7px;
  max-width: 88px;
  overflow: hidden;
  color: var(--graphite);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 620;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.plan-route span {
  margin-top: 3px;
  max-width: 94px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.plan-doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.plan-doc {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
}

.plan-doc .doc-icon {
  width: 28px;
  height: 28px;
  grid-row: span 3;
}

.plan-doc .doc-picto {
  width: 19px;
  height: 19px;
}

.plan-doc strong,
.plan-doc span,
.plan-doc small {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.plan-doc strong {
  color: var(--graphite);
  font-size: 10px;
  font-weight: 620;
}

.plan-doc span {
  color: var(--muted);
  font-size: 10px;
}

.plan-doc small {
  color: var(--success);
  font-size: 10px;
}

.plan-doc.pending small {
  color: var(--warning);
}

.plan-doc.missing small {
  color: var(--muted);
}

.plan-date-list {
  display: grid;
  gap: 0;
}

.plan-date-item {
  position: relative;
  min-height: 28px;
  padding-left: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.plan-date-item::before {
  content: "";
  position: absolute;
  top: 13px;
  bottom: -13px;
  left: 6px;
  width: 1px;
  background: rgba(0, 87, 184, 0.42);
}

.plan-date-item:last-child::before {
  display: none;
}

.plan-date-item i {
  position: absolute;
  left: 2px;
  top: 7px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--cobalt);
  border-radius: 50%;
  background: var(--white);
}

.plan-date-item span {
  color: var(--graphite);
  font-size: 11px;
  line-height: 1.2;
}

.plan-date-item strong {
  color: var(--graphite);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 520;
  white-space: nowrap;
}

.plan-date-item.muted-date i {
  border-color: #b9c2cf;
}

.plan-date-item.muted-date::before {
  background: #d8dee7;
}

.plan-date-item.muted-date span,
.plan-date-item.muted-date strong {
  color: var(--muted);
}

.plan-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
}

.plan-note span {
  min-width: 0;
  overflow: hidden;
  color: var(--graphite);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ready {
  color: var(--success);
}

.pending {
  color: var(--cobalt);
}

.missing {
  color: var(--muted);
}

.summary-strip-panel {
  margin-top: 14px;
  height: 85px;
  min-height: 85px;
  border: 1px solid rgba(221, 227, 234, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
  padding: 10px 20px;
  display: grid;
  grid-template-columns: repeat(5, 1fr) 34px;
  align-items: center;
  gap: 18px;
}

.summary-item {
  min-width: 0;
  min-height: 48px;
  border-right: 1px solid var(--border);
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 18px;
  align-items: center;
}

.summary-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.summary-item strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  grid-column: 2;
  font-weight: 500;
}

.summary-item svg,
.summary-item .svg-icon,
.metric-icon-img {
  grid-row: span 2;
  align-self: center;
  justify-self: start;
  color: var(--graphite);
}

.metric-icon-img {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
}

.summary-refresh {
  color: var(--muted);
  display: grid;
  place-items: center;
}

.summary-refresh svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-refresh .svg-icon {
  width: 20px;
  height: 20px;
}

.summary-refresh-img {
  width: 22px;
  height: 22px;
  display: block;
}

.manager-tools {
  margin-top: 22px;
  display: flex;
  gap: 10px;
}

.finance-page {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.finance-calculation-page {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.finance-hero {
  height: auto;
  min-height: 156px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(560px, 1.42fr);
  gap: 28px;
  align-items: center;
}

.finance-hero-copy p,
.finance-detail-head p,
.finance-entry-toolbar p {
  margin: 0 0 6px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.finance-hero-copy h2,
.finance-detail-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: 0;
}

.finance-hero-copy span,
.finance-detail-head span,
.finance-empty-detail span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.finance-hero-stats {
  min-height: 88px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: rgba(248, 250, 252, 0.76);
  overflow: hidden;
}

.finance-stat {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--border);
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 4px 9px;
  align-items: center;
}

.finance-stat:last-child {
  border-right: 0;
}

.finance-stat-icon {
  width: 28px;
  height: 28px;
  grid-row: span 2;
  object-fit: contain;
}

.finance-stat span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 520;
  overflow-wrap: anywhere;
}

.finance-stat strong {
  min-width: 0;
  display: block;
  grid-column: 1 / -1;
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.15;
  font-weight: 580;
  white-space: nowrap;
}

.finance-stat.green strong,
.finance-positive {
  color: var(--success);
}

.finance-stat.amber strong {
  color: var(--warning);
}

.finance-stat.red strong,
.finance-negative {
  color: var(--critical);
}

.finance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.finance-register {
  height: auto;
  min-height: 0;
  padding: 18px 20px 16px;
}

.finance-toolbar {
  margin-bottom: 14px;
}

.finance-register-controls {
  grid-template-columns: minmax(240px, 1fr) auto;
}

.finance-search {
  width: 280px;
}

.finance-new-button {
  min-height: 42px;
  padding: 0 16px;
  white-space: nowrap;
}

.finance-register-table {
  display: grid;
  overflow-x: auto;
}

.finance-register-head {
  min-width: 1040px;
  display: grid;
  grid-template-columns: 104px minmax(142px, 0.72fr) minmax(230px, 1.15fr) minmax(150px, 0.74fr) 108px 108px 108px 78px;
  gap: 10px;
  align-items: center;
}

.finance-register-head {
  min-height: 38px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.finance-register-row {
  min-width: 1040px;
  width: 100%;
  min-height: 82px;
  border: 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 10px;
  align-items: center;
  color: var(--text);
  background: transparent;
}

.finance-row-select {
  min-width: 0;
  min-height: 82px;
  border: 0;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 104px minmax(142px, 0.72fr) minmax(230px, 1.15fr) minmax(150px, 0.74fr) 108px 108px 108px;
  gap: 10px;
  align-items: center;
  color: inherit;
  background: transparent;
  text-align: left;
}

.finance-register-row:hover,
.finance-register-row.active {
  background: linear-gradient(90deg, rgba(0, 87, 184, 0.06), rgba(255, 255, 255, 0));
}

.finance-register-row.active {
  color: var(--cobalt);
}

.finance-row-select strong,
.finance-entry-row strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 560;
}

.finance-row-select span,
.finance-entry-row span,
.finance-entry-row small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.finance-route-cell strong,
.finance-route-cell span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.finance-register-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.finance-register-actions .doc-action {
  width: 32px;
  height: 32px;
}

.finance-detail {
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.finance-detail-toolbar {
  margin: -4px 0 0;
}

.finance-calculation-hero {
  min-height: 138px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(520px, 1.08fr);
  gap: 28px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.86));
}

.finance-calculation-hero p {
  margin: 0 0 7px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.finance-calculation-hero h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: 0;
}

.finance-calculation-hero span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.finance-calculation-kpis {
  min-height: 86px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.finance-calculation-kpis article {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  display: grid;
  align-content: center;
}

.finance-calculation-kpis article:last-child {
  border-right: 0;
}

.finance-calculation-kpis span,
.finance-calculation-kpis small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.finance-calculation-kpis strong {
  display: block;
  margin: 6px 0;
  font-size: 22px;
  line-height: 1.08;
  font-weight: 590;
  white-space: nowrap;
}

.finance-detail-head {
  min-height: 92px;
  padding: 18px 18px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.finance-detail-head h2 {
  font-size: 22px;
}

.finance-detail-actions {
  padding: 0 18px 16px;
  display: grid;
  grid-template-columns: 156px 156px 38px 38px;
  gap: 8px;
}

.finance-detail-actions .primary-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 12px;
}

.finance-detail-actions .primary-button.expense {
  color: var(--graphite);
  background: rgba(40, 49, 66, 0.1);
}

.finance-cargo-summary {
  margin: 0 18px 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.finance-cargo-summary-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.finance-cargo-summary-head p,
.finance-cargo-head p,
.directory-hero p {
  margin: 0 0 4px;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 700;
}

.finance-cargo-summary-head h3,
.finance-cargo-head h3,
.directory-hero h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.14;
  font-weight: 620;
  letter-spacing: 0;
}

.finance-cargo-summary-list {
  display: grid;
}

.finance-cargo-summary-row {
  min-height: 58px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(156px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.finance-cargo-summary-row strong,
.directory-item-row strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 560;
}

.finance-cargo-summary-row span,
.directory-item-row span,
.directory-hero span,
.directory-counter span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.finance-cargo-form {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.finance-cargo-head {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.finance-cargo-rows {
  display: grid;
  gap: 10px;
}

.finance-cargo-row {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 96px minmax(128px, 0.86fr) minmax(128px, 0.86fr) minmax(128px, 0.86fr) 38px;
  gap: 10px;
  align-items: end;
  background: var(--panel);
}

.finance-cargo-row .doc-action {
  width: 38px;
  height: 42px;
}

.finance-cargo-row.complex {
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) 38px;
}

.finance-client-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.finance-client-control .icon-button {
  width: 42px;
  height: 42px;
  color: var(--cobalt);
  font-size: 22px;
}

.finance-type-filter {
  min-height: 58px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fbfcfe;
}

.finance-type-filter button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 620;
  cursor: pointer;
}

.finance-type-filter button.active {
  border-color: rgba(0, 87, 184, 0.16);
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.08);
}

.counterparty-confirm-dialog {
  width: min(580px, calc(100vw - 32px));
}

.counterparty-confirm-dialog .edit-form {
  padding: 24px;
}

.counterparty-confirm-copy p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

.counterparty-confirm-copy span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.counterparty-suggestions {
  margin-top: 18px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 14px;
  background: rgba(245, 158, 11, 0.055);
}

.counterparty-suggestions-head strong,
.counterparty-suggestions-head span {
  display: block;
}

.counterparty-suggestions-head strong {
  color: var(--text);
  font-size: 13px;
}

.counterparty-suggestions-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.counterparty-suggestion-list {
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

.counterparty-suggestion-list button {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text);
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.counterparty-suggestion-list button:hover {
  border-color: rgba(0, 87, 184, 0.35);
  background: rgba(0, 87, 184, 0.035);
}

.counterparty-suggestion-list strong,
.counterparty-suggestion-list small {
  display: block;
}

.counterparty-suggestion-list strong {
  font-size: 13px;
}

.counterparty-suggestion-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.counterparty-suggestion-list b {
  flex: 0 0 auto;
  color: #9a6700;
  font-size: 11px;
  font-weight: 650;
}

.dds-page {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.dds-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.dds-register {
  min-height: 620px;
  padding: 22px 22px 18px;
}

.dds-import-panel,
.dds-mail-panel,
.dds-side-panel {
  padding: 18px;
}

.dds-register-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.dds-toolbar {
  align-items: center;
}

.dds-toolbar h2 {
  white-space: nowrap;
}

.dds-search {
  width: 288px;
  min-width: 220px;
  flex: 1 1 220px;
}

.dds-register-controls .pantera-control {
  width: 132px;
  min-width: 132px;
  flex: 0 0 132px;
  display: inline-flex;
  margin-top: 0;
}

.dds-filter {
  height: 42px;
  width: 132px;
  min-width: 132px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 11px;
  color: var(--text);
  background: var(--white);
  font-size: 13px;
}

.dds-bulk-delete {
  min-width: 196px;
  border: 1px solid rgba(220, 38, 38, 0.16);
  background: rgba(220, 38, 38, 0.05);
  font-size: 13px;
  white-space: nowrap;
}

.dds-import-journal-button {
  min-height: 42px;
  white-space: nowrap;
}

.dds-bulk-delete:disabled {
  border-color: var(--border);
  color: var(--muted);
  background: transparent;
  cursor: not-allowed;
  opacity: 0.68;
}

.dds-status-nav {
  min-height: 52px;
  margin: 18px 0 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.045);
}

.dds-status-tabs {
  min-width: 0;
  align-self: stretch;
  display: flex;
  align-items: stretch;
}

.dds-status-nav [data-dds-status-tab] {
  position: relative;
  min-width: 164px;
  border: 0;
  border-right: 1px solid rgba(221, 227, 234, 0.72);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #43516a;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 620;
  letter-spacing: 0;
  cursor: pointer;
}

.dds-status-nav [data-dds-status-tab]:last-child {
  border-right: 0;
}

.dds-status-nav [data-dds-status-tab]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: transparent;
}

.dds-status-nav [data-dds-status-tab]:hover {
  color: var(--text);
  background: rgba(0, 87, 184, 0.035);
}

.dds-status-nav [data-dds-status-tab].active {
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.045);
}

.dds-status-nav [data-dds-status-tab].active::after {
  background: var(--cobalt);
}

.dds-status-nav-action {
  min-height: 38px;
  margin: 6px 10px 6px auto;
  align-self: center;
}

#ddsAddManualOperationBtn {
  display: inline-flex;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  align-items: center;
  white-space: nowrap;
}

#ddsAddManualOperationBtn.hidden {
  display: none;
}

#ddsAddManualOperationBtn .nav-icon,
#ddsAddManualOperationBtn .nav-icon svg {
  width: 16px;
  height: 16px;
}

.dds-status-nav .nav-icon,
.dds-status-nav .nav-icon svg {
  width: 16px;
  height: 16px;
}

.dds-status-dot {
  width: 10px;
  height: 10px;
  border: 2px solid #f59e0b;
  border-radius: 999px;
  background: #fffaf0;
}

.dds-status-nav strong {
  min-width: 26px;
  min-height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  color: #9a5b05;
  background: rgba(245, 158, 11, 0.16);
  font-size: 12px;
  font-weight: 720;
}

.dds-operation-table {
  display: grid;
  gap: 14px;
  overflow-x: auto;
}

.dds-pagination-footer {
  min-width: 860px;
  min-height: 58px;
  border-top: 1px solid var(--border);
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 10px;
}

.dds-pagination-footer > span {
  white-space: nowrap;
}

.dds-pagination-footer button,
.dds-pagination-footer b {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid #d8e0e9;
  border-radius: 7px;
  padding: 0 9px;
  display: grid;
  place-items: center;
  color: #526078;
  background: #fff;
  font: inherit;
  font-size: 11px;
}

.dds-pagination-footer button {
  min-width: 64px;
  cursor: pointer;
}

.dds-pagination-footer button.invoice-dashboard-page-number {
  min-width: 34px;
}

.dds-pagination-footer b {
  border-color: var(--cobalt);
  color: var(--cobalt);
  font-weight: 680;
}

.dds-pagination-footer button:not(:disabled):hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
}

.dds-pagination-footer button:focus-visible {
  outline: 2px solid rgba(0, 87, 184, .22);
  outline-offset: 2px;
}

.dds-pagination-footer button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.dds-operation-head,
.dds-operation-row {
  min-width: 820px;
  display: grid;
  grid-template-columns: 152px minmax(360px, 1fr) 184px 162px;
  gap: 24px;
  align-items: center;
  box-sizing: border-box;
}

.dds-operation-head {
  min-height: 42px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.dds-operation-row {
  width: 100%;
  border: 0;
  min-height: 78px;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.dds-operation-row:hover {
  background: rgba(0, 87, 184, 0.032);
}

.dds-operation-row.needs-review {
  background: rgba(255, 255, 255, 0.78);
}

.dds-operation-row.needs-category {
  background: rgba(255, 255, 255, 0.78);
}

.dds-operation-row.needs-category:first-of-type {
  box-shadow: inset 2px 0 0 var(--cobalt);
}

.dds-unified-register {
  min-width: 860px;
}

.dds-unified-operation-head,
.dds-unified-operation-row {
  min-width: 860px;
  grid-template-columns: 104px 112px minmax(250px, 1fr) 150px 132px;
  gap: 16px;
}

.dds-unified-operation-head {
  border-top: 0;
}

.dds-unified-operation-row {
  min-height: 86px;
  padding-block: 12px;
}

.dds-unified-operation-row.linked-start,
.dds-unified-operation-row.linked-continued {
  background: rgba(0, 87, 184, 0.042);
  box-shadow: inset 3px 0 0 rgba(0, 87, 184, 0.82);
}

.dds-unified-operation-row.linked-continued {
  border-top-color: rgba(0, 87, 184, 0.16);
}

.dds-unified-operation-row.linked-end {
  border-bottom-color: rgba(0, 87, 184, 0.28);
}

.dds-operation-source-cell {
  min-width: 0;
  align-self: stretch;
  display: grid;
  place-items: center;
}

.dds-operation-source-cell .dds-bank-logo,
.dds-operation-source-cell .dds-cash-tile {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 10px;
}

.dds-unified-summary strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dds-operation-group {
  min-width: 820px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.dds-operation-group-head {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.92));
  border-bottom: 1px solid var(--border);
}

.dds-operation-group-head p,
.dds-operation-group-totals span {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.dds-operation-group-head h3,
.dds-operation-group-totals strong {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
}

.dds-operation-group-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.dds-operation-group-title > div {
  min-width: 0;
}

.dds-operation-group-title .dds-bank-logo,
.dds-operation-group-title .dds-cash-tile {
  flex: 0 0 auto;
}

.dds-operation-group-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dds-operation-group-meta span {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  color: #43516a;
  background: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 560;
}

.dds-operation-group-totals {
  text-align: right;
}

.dds-operation-row strong,
.dds-account-row strong,
.dds-import-row strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 560;
}

.dds-operation-row span,
.dds-account-row span,
.dds-import-row span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dds-counterparty-cell strong,
.dds-counterparty-cell span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dds-operation-amount-cell,
.dds-operation-status-cell {
  min-width: 0;
}

.dds-operation-status-cell {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.dds-operation-row span.dds-reconciliation-row-match {
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  margin-top: 0;
  border: 1px solid rgba(0, 87, 184, 0.18);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.06);
  font-size: 10px;
  line-height: 1;
  font-weight: 650;
}

.dds-operation-amount-cell strong {
  white-space: nowrap;
}

.dds-category-select {
  display: grid;
  gap: 4px;
}

.dds-category-select select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--text);
  background: var(--white);
  font-size: 13px;
}

.dds-category-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dds-category-chip.missing strong {
  color: var(--critical);
  font-weight: 620;
}

.dds-category-chip span {
  margin: 0;
  color: var(--critical);
  font-size: 15px;
  line-height: 1;
  overflow: visible;
}

.dds-status {
  width: fit-content;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 0 !important;
  padding: 6px 12px 6px 11px;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dds-status::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex: 0 0 auto;
  content: "";
}

.dds-status.review {
  border-color: rgba(245, 158, 11, 0.22);
  color: #8a5208 !important;
  background: #fff7e8;
}

.dds-status.review::before {
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.dds-status.ready {
  border-color: rgba(22, 163, 74, 0.18);
  color: var(--success) !important;
  background: rgba(22, 163, 74, 0.08);
}

.dds-status.ready::before {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.dds-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dds-allocate-button {
  min-height: 28px;
  border: 1px solid rgba(0, 87, 184, 0.16);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.08);
  font-size: 12px;
  font-weight: 640;
  cursor: pointer;
}

.dds-allocate-button:hover {
  border-color: rgba(0, 87, 184, 0.3);
  background: rgba(0, 87, 184, 0.12);
}

.dds-delete-button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--critical);
  background: rgba(220, 38, 38, 0.06);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.dds-delete-button:hover {
  border-color: rgba(220, 38, 38, 0.32);
  background: rgba(220, 38, 38, 0.1);
}

.dds-row-open {
  color: var(--cobalt) !important;
  font-weight: 620;
}

.dds-operation-summary {
  min-height: 70px;
  display: grid;
  grid-template-columns: 1fr 1.08fr 1.08fr 1.08fr;
  align-items: center;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.74), rgba(255, 255, 255, 0.94));
}

.dds-operation-summary article {
  min-height: 44px;
  padding: 0 20px;
  border-right: 1px solid var(--border);
  display: grid;
  align-content: center;
}

.dds-operation-summary article:last-child {
  border-right: 0;
}

.dds-operation-summary span {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.dds-operation-summary article:first-child span {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 620;
}

.dds-operation-summary strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 650;
}

.dds-balance-panel {
  margin-bottom: 16px;
  padding: 24px 28px 26px;
  overflow: hidden;
}

.dds-balance-head {
  min-height: 66px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.dds-balance-head p {
  margin: 0 0 7px;
  color: var(--cobalt);
  font-size: 14px;
  line-height: 1.1;
  font-weight: 720;
}

.dds-balance-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: 0;
}

.dds-balance-head > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 520;
  white-space: nowrap;
}

.dds-balance-head > span.complete {
  color: #17864a;
  font-weight: 650;
}

.dds-balance-head > span.partial,
.dds-balance-date-stale {
  color: #b7791f !important;
  font-weight: 650 !important;
}

.dds-balance-summary {
  min-height: 102px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 300px));
  align-items: center;
}

.dds-balance-summary-card {
  min-width: 0;
  min-height: 64px;
  padding: 2px 40px 2px 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 4px 16px;
  align-items: center;
}

.dds-balance-summary-card + .dds-balance-summary-card {
  border-left: 1px solid var(--border);
  padding-left: 40px;
}

.dds-balance-summary-mark {
  width: 46px;
  height: 46px;
  grid-row: span 3;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.07);
  font-size: 25px;
  line-height: 1;
  font-weight: 650;
}

.dds-balance-summary-card > span:not(.dds-balance-summary-mark) {
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.15;
  font-weight: 540;
}

.dds-balance-summary-card strong {
  min-width: 0;
  color: var(--text);
  font-size: 31px;
  line-height: 1.05;
  font-weight: 620;
  letter-spacing: 0;
  white-space: nowrap;
}

.dds-balance-summary-card small {
  min-width: 0;
  color: #8a94a6;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 520;
}

.dds-balance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 0.72fr);
  column-gap: 22px;
  align-items: start;
}

.dds-balance-section {
  min-width: 0;
  padding-top: 24px;
}

.dds-balance-section-cash {
  border-left: 1px solid var(--border);
  padding-left: 24px;
}

.dds-balance-section-title {
  min-height: 28px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dds-balance-section-title .nav-icon {
  width: 22px;
  height: 22px;
  color: var(--cobalt);
}

.dds-balance-section-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
  font-weight: 620;
  letter-spacing: 0;
}

.dds-balance-table {
  display: grid;
}

.dds-balance-table-head,
.dds-balance-row {
  display: grid;
  gap: 14px;
  align-items: center;
}

.dds-bank-balance-head,
.dds-bank-row {
  grid-template-columns: minmax(200px, 1fr) 56px minmax(104px, 0.42fr) 80px;
}

.dds-cash-balance-head,
.dds-cash-row {
  grid-template-columns: minmax(0, 1fr) minmax(118px, 0.46fr);
}

.dds-balance-table-head {
  min-height: 35px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 540;
}

.dds-bank-balance-head span:nth-child(3),
.dds-bank-balance-head span:nth-child(4),
.dds-cash-balance-head span:last-child {
  text-align: right;
}

.dds-balance-row {
  min-height: 72px;
  border-bottom: 1px solid var(--border);
}

.dds-balance-row > strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.15;
  font-weight: 620;
  text-align: right;
  white-space: nowrap;
}

.dds-bank-balance-value {
  min-width: 0;
  text-align: right;
}

.dds-bank-balance-value strong,
.dds-bank-balance-value small {
  display: block;
}

.dds-bank-balance-value strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 620;
  white-space: nowrap;
}

.dds-bank-balance-value small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.dds-balance-row > span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.dds-bank-row > span:last-child {
  text-align: right;
}

.dds-balance-name-cell {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.dds-balance-name-cell strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 620;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dds-cash-row .dds-balance-name-cell strong {
  white-space: normal;
  text-overflow: clip;
}

.dds-balance-name-cell span:not(.dds-bank-logo):not(.dds-cash-tile) {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dds-bank-logo,
.dds-cash-tile {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 87, 184, 0.12);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dds-bank-logo {
  overflow: hidden;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
  white-space: nowrap;
}

.dds-bank-logo-vtb {
  border-color: rgba(0, 94, 184, 0.2);
  color: #005eb8;
  background: #eef6ff;
}

.dds-bank-logo-sber {
  border-color: rgba(33, 160, 56, 0.2);
  color: #168a2f;
  background: #edf9ef;
}

.dds-bank-logo-tbank {
  border-color: rgba(35, 35, 38, 0.12);
  background: #ffdd2d;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
}

.dds-bank-logo-tbank img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.dds-bank-logo-custom img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.dds-bank-logo-generic svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dds-cash-tile-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.dds-cash-tile svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dds-balance-total-row {
  min-height: 58px;
  margin-top: 12px;
  border: 1px solid rgba(221, 227, 234, 0.88);
  border-radius: 10px;
  padding: 0 12px;
  display: grid;
  align-items: center;
  background: rgba(248, 250, 252, 0.9);
}

.dds-bank-total-row {
  grid-template-columns: minmax(0, 1fr) minmax(128px, max-content) minmax(128px, max-content);
  gap: 18px;
}

.dds-cash-total-row {
  grid-template-columns: minmax(0, 1fr) minmax(138px, max-content);
  gap: 14px;
}

.dds-balance-total-row span {
  color: var(--text);
  font-size: 15px;
  font-weight: 620;
}

.dds-balance-total-row strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.1;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}

.dds-balance-total-accent {
  color: var(--cobalt) !important;
}

.dds-balance-empty {
  min-height: 72px;
  border-bottom: 1px solid var(--border);
  display: grid;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.edit-dialog.dds-operation-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(620px, 100vw);
  max-width: 620px;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  border-radius: 0;
  overflow: hidden;
  box-shadow: -24px 0 70px rgba(17, 24, 39, 0.18);
}

.edit-dialog.dds-operation-dialog.complex-mode {
  width: min(760px, 100vw);
  max-width: 760px;
}

.dds-operation-dialog[open] {
  animation: dds-sheet-enter 180ms ease-out;
}

.dds-operation-dialog::backdrop {
  background: rgba(17, 24, 39, 0.42);
}

@keyframes dds-sheet-enter {
  from {
    transform: translateX(24px);
    opacity: 0.72;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.dds-operation-dialog .edit-form {
  height: 100%;
  max-height: 100dvh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
}

.dds-operation-dialog .dialog-head {
  flex: 0 0 auto;
  margin: 0;
  padding: 28px 32px 20px;
  align-items: flex-start;
}

.dds-operation-dialog .dialog-head h2 {
  font-size: 24px;
  line-height: 1.12;
  font-weight: 650;
}

.dds-operation-dialog-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dds-operation-dialog-head-actions .icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 25px;
  line-height: 1;
}

.dds-operation-dialog-head-actions .icon-button:focus-visible {
  outline: 3px solid rgba(0, 87, 184, 0.2);
  outline-offset: 2px;
}

.dds-operation-dialog-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 32px 28px;
}

.dds-operation-dialog-scroll::-webkit-scrollbar {
  width: 8px;
}

.dds-operation-dialog-scroll::-webkit-scrollbar-thumb {
  border: 2px solid var(--white);
  border-radius: 999px;
  background: #cfd6df;
}

.dds-import-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-width: 1120px;
}

.dds-import-dialog .edit-form {
  max-height: calc(100vh - 42px);
  overflow: auto;
}

.dds-import-dialog-stack {
  display: grid;
  gap: 12px;
}

.dds-manual-import-panel {
  padding: 16px 18px;
}

.dds-manual-import-panel .dds-import-form {
  display: grid;
  grid-template-columns: minmax(148px, 0.44fr) minmax(210px, 1fr) minmax(220px, 1.2fr) 190px;
  gap: 12px;
  align-items: end;
}

.dds-manual-import-panel .dds-import-form > div {
  align-self: center;
}

.dds-manual-import-panel p,
.dds-import-accordion summary p {
  margin: 0 0 5px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 720;
}

.dds-manual-import-panel h2,
.dds-import-accordion summary h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 620;
}

.dds-manual-import-panel .field {
  gap: 6px;
}

.dds-manual-import-panel .dds-import-form textarea {
  min-height: 42px;
  height: 42px;
  resize: none;
}

.dds-manual-import-panel .primary-button {
  min-height: 42px;
  justify-content: center;
}

.dds-manual-import-panel .dds-import-result {
  grid-column: 1 / -1;
  min-height: 18px;
}

.dds-import-accordion {
  padding: 0;
  overflow: hidden;
}

.dds-import-accordion summary {
  min-height: 70px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.dds-import-accordion summary::-webkit-details-marker {
  display: none;
}

.dds-import-accordion summary > span {
  min-width: 112px;
  min-height: 36px;
  border: 1px solid rgba(0, 87, 184, 0.22);
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.07);
  font-size: 13px;
  font-weight: 700;
}

.dds-import-accordion summary > span::after {
  content: "↓";
  margin-left: 7px;
  font-size: 12px;
}

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

.dds-import-accordion[open] summary > span::after {
  content: "↑";
}

.dds-import-accordion .dds-mail-panel,
.dds-import-accordion .dds-side-panel {
  padding: 16px 18px 18px;
}

.dds-import-log-panel {
  max-height: 420px;
  overflow: auto;
}

/* DDS import workspace: compact manual upload and visible auto-import health. */
.dds-import-dialog {
  width: min(1344px, calc(100vw - 40px));
  max-width: 1344px;
}

.dds-import-dialog .edit-form {
  max-height: calc(100vh - 40px);
  padding: 28px 32px 30px;
}

.dds-import-dialog-stack {
  gap: 24px;
}

.dds-manual-import-panel {
  padding: 0;
}

.dds-manual-import-panel .dds-import-form {
  display: block;
}

.dds-import-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.dds-import-dropzone {
  min-height: 284px;
  border: 1.5px dashed #c9d2df;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fbfcfe;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.dds-import-dropzone.is-dragover {
  border-color: var(--cobalt);
  background: rgba(0, 87, 184, 0.035);
  box-shadow: inset 0 0 0 1px rgba(0, 87, 184, 0.08);
}

.dds-import-dropzone-content {
  width: min(520px, calc(100% - 32px));
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  cursor: pointer;
}

.dds-import-dropzone-icon {
  width: 66px;
  height: 66px;
  margin-bottom: 2px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.075);
}

.dds-import-dropzone-icon .nav-icon {
  width: 30px;
  height: 30px;
}

.dds-import-dropzone strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 650;
}

.dds-import-dropzone span:not(.nav-icon) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.dds-import-dropzone .primary-button {
  min-width: 188px;
  min-height: 44px;
  margin-top: 6px;
  justify-content: center;
  color: var(--white);
  font-size: 13px;
}

.dds-import-dropzone small {
  color: var(--muted);
  font-size: 12px;
}

.dds-import-selected-row {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 240px;
  gap: 14px;
  align-items: center;
}

.dds-import-selected-row > span:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.dds-import-selected-file {
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  background: var(--white);
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dds-import-dropzone.has-file + .dds-import-selected-row .dds-import-selected-file {
  color: var(--text);
}

.dds-import-selected-file .nav-icon {
  flex: 0 0 auto;
  color: var(--cobalt);
}

.dds-import-selected-row .primary-button {
  min-height: 44px;
  justify-content: center;
}

.dds-import-result {
  min-height: 18px;
  margin: 8px 0 0;
}

.dds-mail-import-section {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.dds-mail-import-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.dds-mail-import-icon {
  width: 54px;
  height: 54px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.075);
}

.dds-mail-import-icon .nav-icon {
  width: 26px;
  height: 26px;
}

.dds-mail-import-copy p {
  margin: 0 0 5px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 720;
}

.dds-mail-import-copy h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 650;
}

.dds-mail-import-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dds-mail-import-actions .primary-button,
.dds-mail-import-actions .secondary-button {
  min-height: 42px;
}

.dds-mail-import-actions .nav-icon {
  width: 17px;
  height: 17px;
}

.dds-mail-settings-button[aria-expanded="true"] {
  color: var(--cobalt);
  border-color: rgba(0, 87, 184, 0.28);
  background: rgba(0, 87, 184, 0.06);
}

.dds-mail-import-stats {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 11px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  background: var(--white);
}

.dds-mail-stat {
  min-height: 64px;
  padding: 11px 16px;
  border-right: 1px solid var(--border);
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
}

.dds-mail-stat:last-child {
  border-right: 0;
}

.dds-mail-stat-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9aa7b8;
  box-shadow: 0 0 0 4px rgba(154, 167, 184, 0.13);
}

.dds-mail-stat > .nav-icon {
  width: 18px;
  height: 18px;
  color: #7d8ba0;
}

.dds-mail-stat.connected .dds-mail-stat-mark {
  background: #22a45d;
  box-shadow: 0 0 0 4px rgba(34, 164, 93, 0.12);
}

.dds-mail-stat strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 680;
}

.dds-mail-stat b {
  color: var(--cobalt);
  font: inherit;
  font-weight: 750;
}

.dds-mail-panel:not([hidden]) {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.dds-journal-dialog {
  width: min(960px, calc(100vw - 40px));
  max-width: 960px;
}

.dds-journal-dialog .edit-form {
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.dds-journal-dialog .dds-import-log-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
}

.dds-operation-dialog-summary {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}

.dds-operation-dialog-summary-main {
  min-height: 132px;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #fbfcfe;
}

.dds-operation-dialog-summary-main .dds-bank-logo,
.dds-operation-dialog-summary-main .dds-cash-tile {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 12px;
}

.dds-operation-dialog-summary-main > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dds-operation-dialog-summary-main span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.dds-operation-dialog-summary-main b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 620;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dds-operation-dialog-amount {
  margin-bottom: 2px;
  color: var(--text) !important;
  font-size: 23px !important;
  line-height: 1.08 !important;
  font-weight: 680 !important;
  white-space: nowrap;
}

.dds-operation-dialog-purpose {
  border-top: 1px solid var(--border);
  padding: 15px 18px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.dds-operation-dialog-purpose p {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dds-operation-dialog-purpose.expanded p {
  display: block;
  overflow: visible;
}

.dds-operation-dialog-purpose button {
  border: 0;
  padding: 0;
  color: var(--cobalt);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.dds-reconciliation-panel {
  margin: 0 0 20px;
  border: 1px solid rgba(0, 87, 184, 0.24);
  border-radius: 10px;
  padding: 16px;
  background: rgba(0, 87, 184, 0.035);
}

.dds-invoice-match-panel {
  margin: 0 0 20px;
  border: 1px solid rgba(0, 87, 184, 0.26);
  border-radius: 10px;
  padding: 16px;
  background: rgba(0, 87, 184, 0.035);
}

.dds-invoice-match-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dds-invoice-match-head p,
.dds-invoice-match-head h3,
.dds-invoice-match-intro {
  margin: 0;
}

.dds-invoice-match-head p {
  margin-bottom: 4px;
  color: var(--cobalt);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.dds-invoice-match-head h3 {
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 670;
}

.dds-invoice-match-count {
  min-height: 26px;
  border: 1px solid rgba(0, 87, 184, 0.18);
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.07);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.dds-invoice-match-intro {
  margin-top: 9px;
  color: #536176;
  font-size: 12px;
  line-height: 1.45;
}

.dds-invoice-match-candidates {
  margin-top: 13px;
  display: grid;
  gap: 8px;
}

.dds-invoice-match-candidate {
  width: 100%;
  min-height: 78px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--text);
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.dds-invoice-match-candidate:hover {
  border-color: rgba(0, 87, 184, 0.36);
}

.dds-invoice-match-candidate:focus-visible {
  outline: 3px solid rgba(0, 87, 184, 0.18);
  outline-offset: 2px;
}

.dds-invoice-match-candidate.active {
  border-color: rgba(0, 87, 184, 0.52);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: inset 0 0 0 1px rgba(0, 87, 184, 0.09), 0 7px 18px rgba(17, 24, 39, 0.045);
}

.dds-invoice-match-radio {
  width: 14px;
  height: 14px;
  border: 1.5px solid #b6c0cd;
  border-radius: 50%;
}

.dds-invoice-match-candidate.active .dds-invoice-match-radio {
  border: 4px solid var(--cobalt);
}

.dds-invoice-match-main,
.dds-invoice-match-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dds-invoice-match-main > span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.dds-invoice-match-main strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dds-invoice-match-main b {
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.dds-invoice-match-main small,
.dds-invoice-match-main em,
.dds-invoice-match-meta small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dds-invoice-match-main em {
  color: #52667f;
}

.dds-invoice-match-meta {
  justify-items: end;
}

.dds-invoice-match-meta strong {
  font-size: 13px;
  white-space: nowrap;
}

.dds-invoice-match-meta small {
  color: #168447;
}

.dds-invoice-match-note {
  margin-top: 12px;
  color: #536176;
  font-size: 12px;
  line-height: 1.45;
}

.dds-invoice-match-note + .text-button {
  min-height: 44px;
  margin-top: 4px;
  padding-inline: 0;
}

.dds-reconciliation-panel.is-dismissed {
  border-color: rgba(102, 112, 133, 0.2);
  background: #f8fafc;
}

.dds-reconciliation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dds-reconciliation-head p,
.dds-reconciliation-head h3 {
  margin: 0;
}

.dds-reconciliation-head p {
  margin-bottom: 4px;
  color: var(--cobalt);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.dds-reconciliation-head h3 {
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 670;
}

.dds-reconciliation-confidence {
  min-height: 26px;
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  color: #168447;
  background: rgba(22, 163, 74, 0.07);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.dds-reconciliation-candidates {
  margin-top: 13px;
  display: grid;
  gap: 8px;
}

.dds-reconciliation-candidate {
  width: 100%;
  min-height: 66px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--text);
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dds-reconciliation-candidate.active {
  border-color: rgba(0, 87, 184, 0.48);
  box-shadow: inset 0 0 0 1px rgba(0, 87, 184, 0.08);
}

.dds-reconciliation-radio {
  width: 14px;
  height: 14px;
  border: 1.5px solid #b6c0cd;
  border-radius: 50%;
}

.dds-reconciliation-candidate.active .dds-reconciliation-radio {
  border: 4px solid var(--cobalt);
}

.dds-reconciliation-candidate-main,
.dds-reconciliation-candidate-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dds-reconciliation-candidate-main strong,
.dds-reconciliation-candidate-meta strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dds-reconciliation-candidate-main small,
.dds-reconciliation-candidate-meta small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dds-reconciliation-candidate-meta {
  justify-items: end;
}

.dds-reconciliation-note {
  margin-top: 12px;
  color: #536176;
  font-size: 12px;
  line-height: 1.45;
}

.dds-reconciliation-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.dds-reconciliation-actions .primary-button,
.dds-reconciliation-actions .text-button {
  min-height: 38px;
}

.dds-operation-dialog-section {
  margin-top: 20px;
}

.dds-operation-dialog-section h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 650;
}

.dds-operation-dialog-section h3 span {
  color: var(--cobalt);
}

.dds-manual-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dds-manual-mode-tabs button {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  color: #344054;
  background: var(--white);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.dds-manual-mode-tabs button.active {
  border-color: rgba(0, 87, 184, 0.58);
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.05);
  box-shadow: inset 0 0 0 1px rgba(0, 87, 184, 0.08);
}

.dds-manual-mode-tabs button:disabled {
  color: #98a2b3;
  background: #f8fafc;
  cursor: not-allowed;
  opacity: 0.72;
}

.dds-manual-core-grid,
.dds-manual-transfer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dds-manual-category-field,
#ddsManualProjectField,
#ddsManualCounterpartyField {
  margin-top: 12px;
}

#ddsManualCounterpartyField > small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.dds-manual-balance-note,
.dds-manual-transfer-preview {
  min-height: 66px;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
}

.dds-manual-balance-note strong,
.dds-manual-transfer-preview strong {
  color: var(--text);
  font-size: 14px;
}

.dds-manual-balance-note small,
.dds-manual-transfer-preview small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.dds-manual-operation-dialog .dds-operation-comment-field > span {
  display: block;
}

.dds-allocation-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.dds-allocation-tabs button {
  position: relative;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 42px 0 14px;
  color: #344054;
  background: var(--white);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.dds-allocation-tabs button::after {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 16px;
  height: 16px;
  border: 1px solid #cfd6df;
  border-radius: 999px;
  background: var(--white);
  content: "";
  transform: translateY(-50%);
  box-sizing: border-box;
}

.dds-allocation-tabs button.active {
  border-color: rgba(0, 87, 184, 0.58);
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.035);
  box-shadow: inset 0 0 0 1px rgba(0, 87, 184, 0.08);
}

.dds-allocation-tabs button.active::after {
  border-color: var(--cobalt);
  background: var(--cobalt);
  box-shadow: inset 0 0 0 4px var(--white);
}

.dds-operation-category-field > span:not(.pantera-control),
.dds-operation-comment-field > span:not(.pantera-control) {
  display: none;
}

.dds-operation-category-field select,
.dds-operation-project-field select {
  height: 44px;
}

.dds-operation-dialog .field.pending select {
  border-color: rgba(0, 87, 184, 0.22);
  box-shadow: none;
}

.dds-cash-withdrawal-fields {
  margin-top: 12px;
  border: 1px solid rgba(0, 87, 184, 0.18);
  border-radius: 10px;
  padding: 14px;
  background: rgba(0, 87, 184, 0.03);
}

.dds-cash-withdrawal-fields .field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.dds-transfer-route {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.dds-transfer-source {
  min-width: 0;
}

.dds-transfer-source > span {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.dds-transfer-source > strong {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #344054;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dds-cash-withdrawal-fields select,
.dds-cash-withdrawal-fields input[type="number"] {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: var(--white);
  font: inherit;
}

.dds-cash-withdrawal-fields .field.invalid select {
  border-color: rgba(220, 38, 38, 0.55);
}

.dds-commission-toggle {
  margin-top: 12px;
  background: var(--white);
}

.dds-commission-details {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.dds-commission-preview {
  min-height: 44px;
  border-left: 3px solid var(--cobalt);
  padding: 6px 0 6px 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}

.dds-commission-preview span,
.dds-commission-preview strong {
  display: block;
}

.dds-commission-preview strong {
  margin-top: 2px;
  color: var(--text);
  font-size: 12px;
}

.dds-operation-project-field {
  margin-top: 0;
}

.dds-operation-exchange-field {
  margin-top: 12px;
}

.dds-operation-exchange-field select {
  height: 44px;
}

.dds-exchange-rate-preview {
  margin-top: 10px;
  border-left: 3px solid var(--cobalt);
  padding: 8px 12px;
  color: #344054;
  background: rgba(0, 87, 184, 0.035);
  font-size: 12px;
  line-height: 1.45;
}

.dds-operation-fx-field {
  margin-top: 12px;
  border: 1px solid rgba(0, 87, 184, 0.2);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(0, 87, 184, 0.035);
}

.dds-operation-fx-field > strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 12px;
}

.dds-operation-fx-preview {
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
}

.dds-operation-fx-preview.error {
  color: #b42318;
}

.dds-operation-counterparty-field.pending select {
  border-color: #dc2626;
}

.dds-operation-counterparty-field > small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.dds-operation-comment-field textarea {
  width: 100%;
  min-height: 86px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  resize: vertical;
  color: var(--text);
  background: var(--white);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  outline: 0;
}

.dds-operation-comment-field textarea:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(0, 87, 184, 0.08);
}

.dds-operation-review-toggle {
  margin-top: 20px;
  border: 1px solid #d9e0e8;
  border-radius: 8px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  color: var(--text);
  background: #f8fafc;
  cursor: pointer;
}

.dds-operation-review-toggle > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dds-operation-review-check {
  width: 20px;
  height: 20px;
  border: 1px solid #b8c2cf;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: var(--white);
}

.dds-operation-review-toggle > input:checked + .dds-operation-review-check {
  border-color: var(--cobalt);
  background: var(--cobalt);
}

.dds-operation-review-toggle > input:checked + .dds-operation-review-check::after {
  width: 5px;
  height: 9px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  content: "";
  transform: translateY(-1px) rotate(45deg);
}

.dds-operation-review-toggle > input:focus-visible + .dds-operation-review-check {
  outline: 3px solid rgba(0, 87, 184, 0.16);
  outline-offset: 2px;
}

.dds-operation-review-toggle strong,
.dds-operation-review-toggle small {
  display: block;
}

.dds-operation-review-toggle strong {
  font-size: 13px;
  line-height: 1.35;
}

.dds-operation-review-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.dds-complex-allocation-toggle {
  margin-top: 0;
  margin-bottom: 20px;
  border-color: #cbd8e7;
  background: #f6f9fd;
}

.dds-complex-allocation-toggle:has(input:checked) {
  border-color: rgba(0, 87, 184, 0.42);
  background: rgba(0, 87, 184, 0.045);
}

.dds-complex-allocation {
  margin-top: 0;
}

.dds-complex-allocation-head {
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.dds-complex-allocation-head h3 {
  margin-bottom: 4px;
}

.dds-complex-allocation-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.dds-split-balance {
  min-width: 212px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.dds-split-balance span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.dds-split-balance strong {
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.dds-split-balance.ready strong:last-child {
  color: var(--success);
}

.dds-split-balance.invalid strong:last-child {
  color: var(--critical);
}

.dds-split-lines {
  display: grid;
  gap: 12px;
}

.dds-split-line {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfe;
}

.dds-split-line-head {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dds-split-line-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dds-split-line-head span {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: #eaf2fd;
  font-size: 11px;
  font-weight: 700;
}

.dds-split-line-head strong {
  font-size: 13px;
  font-weight: 650;
}

.dds-split-line-head .icon-button {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.dds-split-line-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dds-split-line-grid .field {
  margin: 0;
}

.dds-split-line-grid .field > span {
  font-size: 11px;
}

.dds-split-line-grid input,
.dds-split-line-grid select {
  height: 42px;
  min-width: 0;
  font-size: 13px;
}

.dds-split-amount-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.dds-split-amount-control input {
  border-radius: 8px 0 0 8px;
}

.dds-split-amount-control button {
  border: 1px solid #cfd8e3;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  padding: 0 10px;
  color: var(--cobalt);
  background: #f1f6fc;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.dds-split-comment-field {
  grid-column: 1 / -1;
}

.dds-add-split-line {
  margin-top: 12px;
  min-height: 40px;
  color: var(--cobalt);
}

.dds-operation-selection-summary {
  position: relative;
  margin-top: 20px;
  padding-left: 22px;
  color: var(--cobalt);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 620;
}

.dds-operation-selection-summary::before {
  position: absolute;
  top: 1px;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--cobalt);
  box-shadow: inset 0 0 0 4px var(--white);
  content: "";
}

.field.invalid span {
  color: var(--critical);
}

.field.invalid select,
.field.invalid input {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.dds-operation-dialog-hint {
  margin-top: 12px;
  color: #8a5208;
  font-size: 13px;
  line-height: 1.35;
}

.dds-operation-dialog .dialog-actions {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-height: 80px;
  margin: 0;
  border-top: 1px solid var(--border);
  padding: 16px 32px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.98);
}

.dds-operation-dialog .dialog-actions .primary-button,
.dds-operation-dialog .dialog-actions .text-button {
  min-height: 44px;
}

.dds-operation-row.is-dialog-source {
  background: rgba(0, 87, 184, 0.055);
  box-shadow: inset 3px 0 0 var(--cobalt);
}

.dds-operation-row.is-resolved-removing {
  opacity: 0;
  transform: translateY(-4px) scale(0.995);
  pointer-events: none;
  transition:
    opacity 220ms ease-in,
    transform 220ms ease-in;
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
  .dds-operation-row.is-resolved-removing {
    transform: none;
    transition: none;
  }
}

.dds-income-amount {
  color: #17864a !important;
}

.dds-expense-amount {
  color: var(--text) !important;
}

.dds-transfer-amount {
  color: var(--cobalt) !important;
}

.dds-import-form,
.dds-mail-form {
  display: grid;
  gap: 12px;
}

.dds-import-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 128px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 12px;
  color: var(--text);
  background: var(--white);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
}

.dds-mail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dds-mail-grid .field:not(.compact) {
  min-width: 0;
}

.dds-mail-grid .field.wide {
  grid-column: span 2;
}

.dds-mail-grid textarea {
  width: 100%;
  min-height: 86px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--white);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  resize: vertical;
  outline: 0;
}

.dds-mail-grid textarea:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(0, 87, 184, 0.1);
}

.dds-mail-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.dds-mail-toggle {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 560;
}

.dds-mail-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--cobalt);
}

.dds-mail-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dds-mail-actions .text-button,
.dds-mail-actions .primary-button {
  min-width: 188px;
  min-height: 40px;
  justify-content: center;
}

.dds-import-result,
.dds-mail-result {
  min-height: 20px;
  color: var(--critical);
  font-size: 12px;
  line-height: 1.35;
}

.dds-mail-progress {
  margin-top: 10px;
  color: var(--accent);
}

.dds-import-result.success,
.dds-mail-result.success {
  color: var(--success);
}

.dds-mail-result.warning {
  color: #9a5b08;
}

.dds-account-list,
.dds-import-list {
  display: grid;
}

.dds-account-row,
.dds-import-row {
  min-height: 58px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(128px, auto);
  gap: 12px;
  align-items: center;
}

.dds-account-row > div,
.dds-import-row > div {
  min-width: 0;
}

.dds-import-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dds-import-row span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

.dds-account-row:first-child,
.dds-import-row:first-child {
  border-top: 0;
}

.dds-account-row > div:last-child,
.dds-import-row > div:last-child {
  text-align: right;
}

.dds-import-row.failed strong {
  color: var(--critical);
}

.dds-empty-line {
  min-height: 48px;
  border-top: 1px solid var(--border);
  display: grid;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 1320px) {
  .dds-layout {
    grid-template-columns: 1fr;
  }

  .dds-manual-import-panel .dds-import-form,
  .dds-mail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dds-manual-import-panel .dds-import-form > div,
  .dds-manual-import-panel .dds-import-result {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .dds-import-dialog .edit-form {
    padding: 24px;
  }

  .dds-import-selected-row {
    grid-template-columns: 1fr 210px;
  }

  .dds-import-selected-row > span:first-child {
    grid-column: 1 / -1;
  }

  .dds-mail-import-head {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .dds-mail-import-actions {
    grid-column: 1 / -1;
    padding-left: 70px;
  }

  .dds-mail-import-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dds-mail-stat:nth-child(2) {
    border-right: 0;
  }

  .dds-mail-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
}

.directory-page {
  display: grid;
  gap: 18px;
}

.directory-hero {
  min-height: 174px;
  padding: 24px 26px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 28px;
  overflow: hidden;
}

.directory-hero h2 {
  font-size: 32px;
  line-height: 1.08;
  font-weight: 650;
}

.directory-hero span {
  max-width: 760px;
  font-size: 14px;
  line-height: 1.45;
}

.directory-tabs {
  grid-column: 1 / -1;
  min-height: 58px;
  margin: 0 -26px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.directory-page.money-accounts-mode .directory-toolbar-actions > .primary-button {
  display: none;
}

.directory-money-grid {
  min-height: 420px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.directory-money-column {
  min-width: 0;
}

.directory-money-column + .directory-money-column {
  border-left: 1px solid var(--border);
}

.directory-money-column-head {
  min-height: 72px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fbfcfe;
}

.directory-money-column-head h3,
.directory-money-column-head span {
  margin: 0;
}

.directory-money-column-head h3 {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 650;
}

.directory-money-column-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.directory-money-column-head .text-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.055);
}

.directory-money-list .directory-item-row {
  min-height: 92px;
  padding: 14px 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  cursor: pointer;
}

.directory-money-list .directory-item-row > :nth-child(2) {
  display: none;
}

.directory-money-list .directory-row-actions {
  align-self: center;
}

.directory-money-list .directory-row-actions .danger {
  display: none;
}

.directory-money-empty {
  min-height: 160px;
  padding: 28px 18px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.directory-tabs button {
  position: relative;
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--border);
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 620;
  cursor: pointer;
}

.directory-tabs button:last-child {
  border-right: 0;
}

.directory-tabs button::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}

.directory-tabs button.active {
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.025);
}

.directory-tabs button.active::after {
  background: var(--cobalt);
}

.directory-tabs button:focus-visible {
  outline: 3px solid rgba(0, 87, 184, 0.14);
  outline-offset: -3px;
}

.directory-counter {
  min-width: 156px;
  min-height: 82px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(248, 250, 252, 0.86);
}

.directory-counter strong {
  color: var(--cobalt);
  font-size: 32px;
  line-height: 1;
  font-weight: 620;
}

.directory-list {
  padding: 0;
  overflow: hidden;
}

.directory-toolbar {
  min-height: 100px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.directory-toolbar .panel-head {
  margin: 0;
}

.directory-toolbar .panel-head h2 {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 650;
}

.directory-toolbar .panel-head span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.directory-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.directory-search {
  display: block;
}

.directory-search > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.directory-search input {
  width: 280px;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 14px;
  color: var(--text);
  background: var(--white);
  font: inherit;
  font-size: 14px;
}

.directory-search input:focus {
  outline: 3px solid rgba(0, 87, 184, 0.12);
  border-color: rgba(0, 87, 184, 0.58);
}

.directory-toolbar-actions .primary-button {
  min-height: 46px;
  padding: 0 18px;
  font-size: 14px;
}

.directory-item-list {
  min-height: 360px;
  display: block;
}

.directory-table-head {
  min-height: 54px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, 0.72fr) 108px;
  gap: 22px;
  align-items: center;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 13px;
  font-weight: 620;
}

.directory-item-row {
  min-height: 84px;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, 0.72fr) 108px;
  gap: 22px;
  align-items: center;
}

.directory-item-row:last-child {
  border-bottom: 0;
}

.directory-item-row.active {
  background: rgba(0, 87, 184, 0.04);
}

.directory-bank-account-primary {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.directory-bank-account-primary > .dds-bank-logo {
  margin-top: 0;
}

.directory-bank-account-primary > .dds-cash-tile {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.directory-bank-icon-field > small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.directory-bank-icon-editor {
  display: flex;
  align-items: center;
  gap: 10px;
}

.directory-bank-icon-preview {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}

.directory-bank-icon-preview .dds-bank-logo {
  width: 52px;
  height: 52px;
}

.directory-bank-icon-preview .dds-cash-tile {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}

.directory-bank-icon-upload {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.directory-bank-icon-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.directory-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.directory-category-empty {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: var(--muted);
  font-size: 14px;
}

.directory-page.dds-category-mode .directory-hero {
  min-height: 156px;
  padding-top: 20px;
}

.directory-page.dds-category-mode .directory-hero h2 {
  font-size: 28px;
}

.directory-page.dds-category-mode .directory-counter {
  display: none;
}

.directory-page.dds-category-mode .directory-tabs {
  min-height: 54px;
}

.directory-page.dds-category-mode .directory-toolbar {
  min-height: 88px;
  padding-block: 16px;
}

.directory-page.dds-category-mode .directory-toolbar .panel-head h2 {
  font-size: 21px;
}

.directory-category-shell {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(210px, 0.27fr) minmax(420px, 1fr) minmax(224px, 0.31fr);
  grid-template-rows: 64px minmax(500px, 1fr) 54px;
  background: var(--white);
}

.directory-category-modebar {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--border);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #fbfcfe;
}

.directory-category-segmented {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(98px, 1fr));
  background: #f4f6f9;
}

.directory-category-segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
}

.directory-category-segmented button.active {
  color: var(--white);
  background: var(--cobalt-active);
  box-shadow: 0 4px 10px rgba(0, 87, 184, 0.16);
}

.directory-category-modebar-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.directory-category-modebar-meta span + span {
  position: relative;
}

.directory-category-modebar-meta span + span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #aeb7c4;
}

.directory-category-tree,
.directory-category-articles,
.directory-category-inspector {
  min-width: 0;
}

.directory-category-tree {
  border-right: 1px solid var(--border);
  background: #fcfdff;
}

.directory-category-inspector {
  border-left: 1px solid var(--border);
  background: #fcfdff;
}

.directory-category-column-head {
  min-height: 72px;
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.directory-category-column-head span,
.directory-category-column-head strong {
  display: block;
}

.directory-category-column-head span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 560;
}

.directory-category-column-head strong {
  margin-top: 4px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-category-add-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: var(--white);
  font-size: 21px;
  line-height: 1;
}

.directory-category-add-button:hover {
  border-color: rgba(0, 87, 184, 0.32);
  background: rgba(0, 87, 184, 0.05);
}

.directory-category-group-list {
  padding: 8px 0;
}

.directory-category-group-row {
  min-height: 52px;
  padding: 0 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.directory-category-group-row > button:first-child {
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  text-align: left;
  color: var(--text);
  background: transparent;
}

.directory-category-group-row > button:first-child strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-category-group-row > button:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.directory-category-group-row.active > button:first-child {
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.075);
  box-shadow: inset 2px 0 0 var(--cobalt-active);
}

.directory-category-group-actions {
  width: 0;
  display: flex;
  gap: 2px;
  overflow: hidden;
  opacity: 0;
  transition: width 140ms ease, opacity 140ms ease;
}

.directory-category-group-row:hover .directory-category-group-actions,
.directory-category-group-row:focus-within .directory-category-group-actions {
  width: 58px;
  opacity: 1;
}

.directory-category-group-actions .doc-action {
  width: 28px;
  height: 28px;
  border: 0;
}

.directory-category-table-head,
.directory-category-article-row {
  display: grid;
  grid-template-columns: minmax(142px, 0.78fr) minmax(180px, 1.16fr) 82px;
  gap: 14px;
  align-items: center;
}

.directory-category-table-head {
  min-height: 42px;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 11px;
  font-weight: 560;
}

.directory-category-article-row {
  position: relative;
  width: 100%;
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid rgba(221, 227, 234, 0.86);
  padding: 0 16px;
  text-align: left;
  color: var(--text);
  background: var(--white);
}

.directory-category-article-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
}

.directory-category-article-row:hover {
  background: #fafcff;
}

.directory-category-article-row.active {
  background: rgba(0, 87, 184, 0.055);
}

.directory-category-article-row.active::before {
  background: var(--cobalt-active);
}

.directory-category-article-name {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.directory-category-article-name > span,
.directory-category-inspector-title > span {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.075);
}

.directory-category-article-name svg,
.directory-category-inspector-title svg,
.directory-preview-group-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directory-category-article-row strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-category-article-row > span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.directory-category-article-row .directory-category-usage {
  color: var(--cobalt);
  text-align: right;
  font-size: 14px;
}

.directory-category-inspector-body {
  padding: 18px 16px;
}

.directory-category-inspector-title {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.directory-category-inspector-title > span {
  width: 34px;
  height: 34px;
  color: var(--graphite);
  background: #eef2f6;
}

.directory-category-inspector-title strong,
.directory-category-inspector-title small {
  display: block;
}

.directory-category-inspector-title strong {
  font-size: 14px;
  font-weight: 650;
}

.directory-category-inspector-title small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.directory-category-inspector-metrics {
  margin: 18px 0 0;
}

.directory-category-inspector-metrics > div {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}

.directory-category-inspector-metrics dt {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 650;
}

.directory-category-inspector-metrics dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.directory-category-edit-link {
  min-height: 36px;
  border: 0;
  padding: 0;
  color: var(--cobalt);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
}

.directory-category-inspector-empty {
  padding: 20px 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.directory-category-footer {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(210px, 0.27fr) minmax(420px, 1fr) minmax(224px, 0.31fr);
  align-items: center;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 11px;
}

.directory-category-footer span:nth-child(2),
.directory-category-footer span:nth-child(3) {
  padding-left: 16px;
}

.edit-dialog.directory-editor-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(620px, 100vw);
  max-width: 620px;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  border-radius: 0;
  overflow: hidden;
  box-shadow: -24px 0 70px rgba(17, 24, 39, 0.18);
}

.directory-editor-dialog[open] {
  animation: dds-sheet-enter 180ms ease-out;
}

.directory-editor-dialog::backdrop {
  background: rgba(17, 24, 39, 0.42);
}

.directory-editor-dialog .edit-form {
  height: 100%;
  max-height: 100dvh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
}

.directory-editor-dialog .dialog-head {
  flex: 0 0 auto;
  margin: 0;
  padding: 16px 30px 8px;
  align-items: flex-start;
}

.directory-editor-dialog .dialog-head h2 {
  font-size: 24px;
  line-height: 1.12;
  font-weight: 650;
}

.directory-editor-dialog .dialog-head .icon-button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 26px;
}

.directory-dialog-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 30px 28px;
}

.directory-dialog-path {
  min-height: 24px;
  margin-bottom: 10px;
  padding: 0;
  display: flex;
  align-items: center;
  color: var(--cobalt);
  background: transparent;
  font-size: 12px;
  font-weight: 560;
}

.directory-form-fields {
  display: grid;
  gap: 18px;
}

.directory-editor-dialog.category-editor .directory-form-fields {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "name group"
    "code code"
    "description description";
  gap: 8px 16px;
}

.directory-editor-dialog.category-editor .directory-name-field {
  grid-area: name;
}

.directory-editor-dialog.category-editor .directory-group-field {
  grid-area: group;
}

.directory-editor-dialog.category-editor .directory-code-field {
  grid-area: code;
  max-width: calc(50% - 8px);
}

.directory-editor-dialog.category-editor .directory-description-field {
  grid-area: description;
}

.directory-editor-dialog .field > span {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.directory-editor-dialog .field input,
.directory-editor-dialog .field select,
.directory-editor-dialog .field textarea {
  min-height: 44px;
  border-color: var(--border);
  border-radius: 8px;
  font-size: 14px;
}

.directory-editor-dialog .field textarea {
  min-height: 70px;
  resize: vertical;
}

.directory-category-settings,
.directory-preview,
.directory-category-rules {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.directory-category-settings h3,
.directory-category-rules h3,
.directory-preview > p {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 650;
}

.directory-setting-row {
  min-height: 40px;
  border-bottom: 1px solid rgba(221, 227, 234, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.directory-setting-row:last-child {
  border-bottom: 0;
}

.directory-setting-row strong,
.directory-setting-row small {
  display: block;
}

.directory-setting-row strong {
  font-size: 13px;
  font-weight: 620;
}

.directory-setting-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.directory-setting-row input {
  appearance: none;
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  border: 1px solid #cbd3de;
  border-radius: 999px;
  background: #dfe4eb;
  transition: background 140ms ease, border-color 140ms ease;
}

.directory-setting-row input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.24);
  transition: transform 140ms ease;
}

.directory-setting-row input:checked {
  border-color: var(--cobalt-active);
  background: var(--cobalt-active);
}

.directory-setting-row input:checked::after {
  transform: translateX(16px);
}

.directory-secondary-group-toggle {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
}

.directory-secondary-group-field {
  margin-top: 10px;
}

.directory-preview {
  margin-top: 12px;
}

.directory-preview > p {
  margin-bottom: 8px;
}

.directory-preview-row {
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.directory-preview-row > img,
.directory-preview-group-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  object-fit: contain;
}

.directory-preview-group-icon {
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.08);
}

.directory-preview-row strong,
.directory-preview-row small {
  display: block;
}

.directory-preview-row strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.directory-preview-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.directory-preview-badge {
  min-height: 24px;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--success);
  background: rgba(22, 163, 74, 0.1);
  font-size: 11px;
  font-weight: 650;
}

.directory-preview-row.expense .directory-preview-badge {
  color: var(--graphite);
  background: #eef1f5;
}

.directory-category-rules button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-bottom: 0;
  padding: 7px 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  text-align: left;
  color: var(--text);
  background: var(--white);
}

.directory-category-rules button:first-of-type {
  border-radius: 8px 8px 0 0;
}

.directory-category-rules button:last-child {
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
}

.directory-category-rules button:hover {
  background: #fafcff;
}

.directory-category-rules .nav-icon {
  color: var(--graphite);
}

.directory-category-rules strong,
.directory-category-rules small {
  display: block;
}

.directory-category-rules strong {
  font-size: 12px;
  font-weight: 620;
}

.directory-category-rules small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.directory-category-rules b {
  color: var(--muted);
  text-align: right;
  font-size: 22px;
  font-weight: 400;
}

.directory-category-usage {
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
}

.directory-editor-dialog .dialog-actions {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-height: 80px;
  margin: 0;
  border-top: 1px solid var(--border);
  padding: 16px 30px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.98);
}

.directory-editor-dialog .dialog-actions .primary-button,
.directory-editor-dialog .dialog-actions .text-button {
  min-height: 44px;
}

.edit-dialog.directory-merge-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(820px, calc(100dvh - 28px));
  overflow: hidden;
  border-radius: 16px;
}
.directory-merge-dialog[open] { animation: directory-merge-enter 180ms ease-out; }
.directory-merge-dialog::backdrop { background: rgba(17, 24, 39, .5); }
.directory-merge-form {
  max-height: min(820px, calc(100dvh - 28px));
  display: flex; flex-direction: column;
  background: var(--white);
}
.directory-merge-form .dialog-head {
  flex: 0 0 auto; min-height: 88px; margin: 0; padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.directory-merge-form .dialog-head p,
.directory-merge-form .dialog-head h2 { margin: 0; }
.directory-merge-form .dialog-head p { margin-bottom: 5px; color: var(--cobalt); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .045em; }
.directory-merge-form .dialog-head h2 { font-size: 21px; line-height: 1.2; font-weight: 680; }
.directory-merge-form .dialog-head .icon-button { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 10px; font-size: 25px; }
.directory-merge-body { min-height: 0; padding: 22px 24px; display: grid; gap: 18px; overflow-y: auto; }
.directory-merge-inn {
  min-height: 58px; border: 1px solid rgba(0, 87, 184, .14); border-radius: 10px; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(0, 87, 184, .045);
}
.directory-merge-inn span { color: var(--muted); font-size: 11px; }
.directory-merge-inn strong { color: var(--cobalt); font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.directory-merge-body h3 { margin: 0; color: var(--text); font-size: 14px; font-weight: 680; }
.directory-merge-body h3 + p { max-width: 660px; margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.directory-merge-candidates { min-width: 0; margin: 0; border: 0; padding: 0; display: grid; gap: 10px; }
.directory-merge-candidates legend {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.directory-merge-candidate {
  min-height: 76px; border: 1px solid var(--border); border-radius: 11px; padding: 13px 14px;
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  color: var(--text); background: var(--white); cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.directory-merge-candidate:hover { border-color: rgba(0, 87, 184, .34); background: #fbfdff; }
.directory-merge-candidate:has(input:focus-visible) { outline: 3px solid rgba(0, 87, 184, .16); outline-offset: 2px; }
.directory-merge-candidate:has(input:checked) {
  border-color: rgba(0, 87, 184, .6); background: rgba(0, 87, 184, .045);
  box-shadow: inset 3px 0 0 var(--cobalt-active);
}
.directory-merge-candidate input { position: absolute; opacity: 0; pointer-events: none; }
.directory-merge-radio {
  width: 20px; height: 20px; border: 1.5px solid #a5afbd; border-radius: 50%;
  display: grid; place-items: center; background: var(--white);
}
.directory-merge-radio::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--cobalt-active); transform: scale(0); transition: transform 150ms ease;
}
.directory-merge-candidate input:checked + .directory-merge-radio { border-color: var(--cobalt-active); }
.directory-merge-candidate input:checked + .directory-merge-radio::after { transform: scale(1); }
.directory-merge-candidate-copy { min-width: 0; }
.directory-merge-candidate-copy strong,
.directory-merge-candidate-copy small { display: block; }
.directory-merge-candidate-copy strong { font-size: 13px; line-height: 1.35; font-weight: 670; overflow-wrap: anywhere; }
.directory-merge-candidate-copy small { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.directory-merge-candidate em {
  border-radius: 999px; padding: 5px 8px;
  color: var(--muted); background: var(--panel);
  font-size: 9px; font-style: normal; font-weight: 650;
}
.directory-merge-candidate:has(input:checked) em { color: var(--cobalt); background: rgba(0, 87, 184, .09); }
.directory-merge-impact {
  border: 1px solid rgba(102, 112, 133, .16); border-radius: 10px; padding: 14px 16px;
  color: #475467; background: #f8fafc;
}
.directory-merge-impact strong { color: var(--text); font-size: 11px; font-weight: 680; }
.directory-merge-impact ul { margin: 9px 0 0; padding-left: 17px; }
.directory-merge-impact li { margin-top: 5px; font-size: 10.5px; line-height: 1.45; }
.directory-merge-error {
  border: 1px solid rgba(220, 38, 38, .2); border-radius: 9px; padding: 11px 13px;
  color: #b42318; background: rgba(220, 38, 38, .055);
  font-size: 11px; line-height: 1.45; font-weight: 620;
}
.directory-merge-form .dialog-actions {
  flex: 0 0 auto; min-height: 76px; margin: 0; border-top: 1px solid var(--border); padding: 14px 24px;
  display: flex; justify-content: flex-end; background: rgba(255, 255, 255, .98);
}
.directory-merge-form .dialog-actions button { min-height: 44px; }
.directory-merge-form .dialog-actions .primary-button:disabled { opacity: .45; cursor: not-allowed; }

@keyframes directory-merge-enter {
  from { opacity: 0; transform: translateY(8px) scale(.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes directory-feedback-enter {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .edit-dialog.directory-merge-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; border-radius: 0; }
  .directory-merge-form { max-height: 100dvh; }
  .directory-merge-form .dialog-head,
  .directory-merge-body,
  .directory-merge-form .dialog-actions { padding-left: 18px; padding-right: 18px; }
  .directory-merge-candidate { grid-template-columns: 22px minmax(0, 1fr); }
  .directory-merge-candidate em { display: none; }
  .directory-merge-form .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .directory-merge-form .dialog-actions button { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .directory-merge-dialog[open],
  .directory-merge-notice { animation: none; }
  .directory-merge-candidate,
  .directory-merge-radio::after { transition: none; }
}

.admin-page {
  display: grid;
  gap: 16px;
}

.admin-hero {
  min-height: 152px;
  padding: 24px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
}

.admin-hero p {
  margin: 0 0 4px;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 700;
}

.admin-hero h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.14;
  font-weight: 620;
}

.admin-hero span {
  max-width: 680px;
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.admin-stats {
  min-width: 416px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  background: rgba(248, 250, 252, 0.86);
}

.admin-stat {
  min-height: 82px;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  display: grid;
  align-content: center;
}

.admin-stat:last-child {
  border-right: 0;
}

.admin-stat span,
.admin-user-meta > span:not(.access-editor-kicker) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.admin-stat strong {
  margin-top: 6px;
  color: var(--text);
  font-size: 25px;
  line-height: 1;
  font-weight: 620;
}

.admin-stat.alert strong {
  color: var(--critical);
}

.admin-security-tabs {
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  display: inline-flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 7px 20px rgba(17, 24, 39, 0.045);
}

.admin-security-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: color 170ms ease, background-color 170ms ease, box-shadow 170ms ease;
}

.admin-security-tabs button .nav-icon {
  width: 17px;
  height: 17px;
}

.admin-security-tabs button:hover {
  color: var(--cobalt);
}

.admin-security-tabs button.active {
  color: var(--cobalt);
  background: var(--white);
  box-shadow: 0 5px 14px rgba(17, 24, 39, 0.07);
}

.security-audit-panel {
  padding: 18px 18px 20px;
}

.security-audit-filters {
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(4, minmax(130px, 0.8fr)) auto auto;
  gap: 10px;
  align-items: end;
  background: #f8fafc;
}

.security-audit-filters .field {
  min-width: 0;
  gap: 5px;
}

.security-audit-filters input,
.security-audit-filters select {
  width: 100%;
  min-height: 42px;
}

.security-audit-filters button {
  min-height: 42px;
  white-space: nowrap;
}

.security-audit-meta {
  min-height: 38px;
  padding: 12px 2px 8px;
  color: var(--muted);
  font-size: 12px;
}

.security-audit-register {
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  background: var(--white);
}

.security-audit-columns,
.security-audit-event {
  display: grid;
  grid-template-columns: 142px minmax(210px, 1.7fr) minmax(150px, 1fr) minmax(150px, 1fr) 102px;
  gap: 14px;
  align-items: center;
}

.security-audit-columns {
  min-height: 38px;
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 10px;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.security-audit-event {
  position: relative;
  min-height: 78px;
  border-bottom: 1px solid var(--border);
  padding: 12px 14px 12px 17px;
  transition: background-color 170ms ease;
}

.security-audit-event::before {
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--cobalt);
  content: "";
}

.security-audit-event.warning::before {
  background: var(--warning);
}

.security-audit-event.critical::before {
  background: var(--critical);
}

.security-audit-event:last-child {
  border-bottom: 0;
}

.security-audit-event:hover {
  background: #fbfcfe;
}

.security-audit-event > time {
  color: var(--graphite);
  font-size: 11px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.security-audit-event-main,
.security-audit-actor,
.security-audit-source,
.security-audit-result {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.security-audit-event-main strong,
.security-audit-actor strong,
.security-audit-source strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 630;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-audit-event-main span,
.security-audit-event-main small,
.security-audit-actor span,
.security-audit-source span,
.security-audit-result small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-outcome {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 7px;
  color: #166534;
  background: #e9f8ee;
  font-size: 10px;
  font-weight: 700;
}

.security-outcome.failure {
  color: #991b1b;
  background: #feecec;
}

.security-outcome.denied {
  color: #92400e;
  background: #fff4d6;
}

.security-audit-technical {
  grid-column: 1 / -1;
  margin-top: -2px;
  color: var(--muted);
  font-size: 10px;
}

.security-audit-technical summary {
  width: fit-content;
  color: var(--cobalt);
  cursor: pointer;
}

.security-audit-technical > div {
  margin-top: 8px;
  border-radius: 8px;
  padding: 9px 11px;
  display: grid;
  gap: 5px;
  background: #f8fafc;
  overflow-wrap: anywhere;
}

.security-audit-technical b {
  color: var(--graphite);
  font-weight: 650;
}

.security-audit-state {
  min-height: 180px;
  padding: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.security-audit-state.error {
  color: var(--critical);
}

.security-audit-pagination {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.security-audit-pagination span {
  color: var(--muted);
  font-size: 11px;
}

.security-audit-pagination button {
  min-height: 40px;
}

.admin-security-tabs button:focus-visible,
.security-audit-filters button:focus-visible,
.security-audit-technical summary:focus-visible,
.security-audit-pagination button:focus-visible {
  outline: 3px solid rgba(0, 87, 184, 0.2);
  outline-offset: 2px;
}

.admin-users {
  padding: 18px 18px 20px;
}

.admin-user-list {
  display: grid;
}

.admin-refresh-button {
  min-height: 44px;
  padding: 0 15px;
}

.access-workbench {
  min-height: 640px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  overflow: hidden;
  background: var(--white);
}

.access-user-register {
  min-width: 0;
  border-right: 1px solid var(--border);
  background: #f8fafc;
}

.access-register-head {
  min-height: 74px;
  border-bottom: 1px solid var(--border);
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.access-register-head div {
  display: grid;
  gap: 3px;
}

.access-register-head div > span,
.access-editor-kicker,
.access-section-heading div > span {
  color: var(--cobalt);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.access-register-head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 620;
}

.access-user-rows {
  padding: 8px;
  display: grid;
  gap: 4px;
}

.access-user-item {
  width: 100%;
  min-height: 76px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.access-user-item:hover {
  border-color: #d5deea;
  background: rgba(255, 255, 255, 0.72);
}

.access-user-item.active {
  border-color: rgba(0, 87, 184, 0.24);
  background: var(--white);
  box-shadow: 0 7px 20px rgba(17, 24, 39, 0.06);
}

.access-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.1);
  font-size: 12px;
  font-weight: 720;
}

.access-user-item-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.access-user-item-copy strong {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 620;
}

.access-user-item-copy strong small {
  border-radius: 999px;
  padding: 2px 5px;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.08);
  font-size: 9px;
  font-weight: 720;
  text-transform: uppercase;
}

.access-user-item-copy > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-user-state {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  color: transparent;
  background: var(--warning);
}

.access-user-state.active {
  background: var(--success);
}

.access-user-state.blocked {
  background: var(--critical);
}

.access-editor-shell {
  min-width: 0;
}

.admin-user-row {
  margin: 0;
  display: block;
}

.admin-user-meta {
  min-width: 0;
}

.admin-user-head {
  min-height: 74px;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-user-main {
  display: grid;
  gap: 0;
}

.admin-user-meta strong {
  margin-top: 4px;
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 620;
}

.admin-user-meta span {
  display: block;
  margin-top: 3px;
}

.access-profile-section,
.access-client-binding,
.admin-user-sections {
  padding: 20px;
}

.access-profile-section {
  border-bottom: 1px solid var(--border);
}

.access-client-binding {
  display: none;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: #f8fbff;
}

.access-client-binding > .field {
  max-width: 460px;
}

.admin-user-row[data-access-scope="client"] .access-client-binding {
  display: grid;
}

.admin-user-row[data-access-scope="client"] .admin-user-sections {
  display: none;
}

.access-section-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.access-section-heading div {
  display: grid;
  gap: 4px;
}

.access-section-heading div > strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 620;
}

.access-section-heading p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.admin-user-status {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-user-profile {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-user-profile .field {
  gap: 5px;
}

.admin-user-profile input {
  min-height: 42px;
}

.admin-user-status .field {
  gap: 5px;
}

.admin-user-status .field select {
  min-height: 42px;
}

.admin-user-sections {
  display: grid;
  gap: 16px;
}

.access-permissions-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.access-permissions-head .access-section-heading {
  flex: 1;
}

.access-permission-presets {
  border: 1px solid var(--border);
  border-radius: 9px;
  display: inline-flex;
  overflow: hidden;
  background: #f8fafc;
}

.access-permission-presets button {
  min-height: 40px;
  border: 0;
  border-right: 1px solid var(--border);
  padding: 0 11px;
  color: var(--graphite);
  background: transparent;
  font-size: 11px;
  font-weight: 620;
  white-space: nowrap;
  cursor: pointer;
}

.access-permission-presets button:last-child {
  border-right: 0;
}

.access-permission-presets button:hover {
  color: var(--cobalt);
  background: var(--white);
}

.admin-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.access-permission-group {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px 12px;
  background: #fbfcfe;
}

.access-permission-group legend {
  width: calc(100% + 2px);
  margin-left: -1px;
  border-bottom: 1px solid var(--border);
  padding: 12px 0 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.access-permission-group legend > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.access-permission-group legend strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.access-permission-group legend small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.access-permission-group legend > b {
  border-radius: 999px;
  padding: 3px 6px;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.08);
  font-size: 9px;
  font-weight: 720;
}

.access-permission-options {
  padding-top: 10px;
  display: grid;
  gap: 6px;
}

.section-check {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--graphite);
  background: var(--white);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 580;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.section-check:has(input:checked) {
  border-color: rgba(0, 87, 184, 0.26);
  background: rgba(0, 87, 184, 0.045);
}

.section-check input {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  accent-color: var(--cobalt);
}

.admin-user-actions {
  min-height: 76px;
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #fbfcfe;
}

.access-account-actions,
.access-save-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-actions button {
  min-height: 44px;
  padding: 0 14px;
  font-size: 11px;
}

.access-save-area {
  justify-content: flex-end;
}

.access-save-status {
  max-width: 260px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

.access-save-status.saved {
  color: var(--success);
}

.access-save-status.error {
  color: var(--critical);
}

.access-save-button {
  min-width: 174px;
}

.access-save-button:disabled {
  color: #7a8597;
  background: #e8edf3;
  box-shadow: none;
  cursor: default;
}

.access-user-item:focus-visible,
.access-permission-presets button:focus-visible,
.admin-refresh-button:focus-visible,
.admin-user-actions button:focus-visible {
  outline: 3px solid rgba(0, 87, 184, 0.2);
  outline-offset: 2px;
}

.section-check:has(input:focus-visible) {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.12);
}

.admin-trash {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.admin-trash-row {
  min-height: 62px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 16px;
  align-items: center;
}

.admin-trash-row:first-of-type {
  border-top: 0;
}

.admin-trash-row strong,
.admin-trash-row span {
  display: block;
}

.admin-trash-row span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.status-chip {
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--graphite);
  background: rgba(40, 49, 66, 0.08);
  font-size: 12px;
  font-weight: 650;
}

.status-chip.active {
  color: var(--success);
  background: rgba(22, 163, 74, 0.1);
}

.status-chip.pending {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.12);
}

.status-chip.blocked {
  color: var(--critical);
  background: rgba(220, 38, 38, 0.1);
}

.finance-definition-grid {
  margin: 0;
  border-top: 1px solid var(--border);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px 16px;
}

.finance-definition-grid dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
}

.finance-definition-grid dd {
  margin: 0;
  overflow: hidden;
  color: var(--graphite);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 560;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.finance-summary-grid {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: rgba(248, 250, 252, 0.84);
}

.finance-summary-grid div {
  min-width: 0;
  min-height: 68px;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.finance-summary-grid div:last-child {
  border-right: 0;
}

.finance-summary-grid div {
  border-bottom: 0;
}

.finance-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
}

.finance-summary-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 580;
  white-space: nowrap;
}

.finance-entry-toolbar {
  min-height: 58px;
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finance-entry-toolbar h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 560;
}

.finance-entry-filter {
  min-width: 198px;
}

.finance-entry-table {
  display: grid;
}

.finance-entry-head,
.finance-entry-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) 132px minmax(160px, 0.95fr) 90px 118px 78px;
  gap: 12px;
  align-items: center;
}

.finance-entry-head {
  min-height: 34px;
  border-top: 1px solid rgba(221, 227, 234, 0.72);
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.finance-entry-row {
  min-height: 76px;
  border-bottom: 1px solid rgba(221, 227, 234, 0.78);
  padding: 11px 18px;
  align-items: start;
}

.finance-entry-title {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.finance-entry-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--graphite);
  background: #eef1f5;
}

.finance-entry-icon.income {
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.08);
}

.finance-entry-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.finance-entry-img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.finance-entry-kind {
  width: fit-content;
  min-height: 22px;
  border-radius: 6px;
  padding: 4px 7px;
  color: var(--cobalt) !important;
  background: rgba(0, 87, 184, 0.08);
  font-size: 11px !important;
  font-weight: 650;
}

.finance-entry-kind.expense {
  color: var(--graphite) !important;
  background: #eef1f5;
}

.finance-entry-reconciliation.pending {
  width: fit-content;
  margin-top: 4px;
  color: #a15c08;
  font-size: 10px;
  font-weight: 650;
}

.finance-entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.finance-entry-actions .doc-action {
  width: 32px;
  height: 32px;
}

.finance-entry-actions .finance-entry-dds-link {
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.05);
}

.doc-action.danger {
  color: var(--critical);
}

.register-empty.compact {
  min-height: 130px;
}

.dds-load-error {
  align-content: center;
  gap: 12px;
  text-align: center;
}

.dds-load-error .secondary-button {
  min-height: 44px;
  justify-self: center;
}

.finance-empty-detail {
  min-height: 420px;
  padding: 22px 18px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.finance-empty-detail p {
  margin: 0;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.finance-empty-detail h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 620;
}

.finance-empty-detail .primary-button {
  width: fit-content;
  margin-top: 4px;
}

.finance-dialog {
  width: min(900px, calc(100vw - 28px));
}

.finance-entry-classification {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0 18px;
}

.finance-entry-classification h3:not(:first-child) {
  margin-top: 18px;
}

.finance-entry-classification .field > span {
  display: block;
}

.finance-entry-classification .field small {
  min-height: 14px;
}

.finance-entry-classification .field.invalid select {
  border-color: rgba(220, 38, 38, 0.55);
}

.bottom-nav {
  display: none;
}

.hidden {
  display: none !important;
}

.settlements-page {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.settlements-summary-panel {
  padding: 24px 28px 0;
  overflow: hidden;
}

.settlements-summary-head,
.settlements-operations-head {
  min-height: 66px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.settlements-summary-head p,
.settlements-operations-head p {
  margin: 0 0 7px;
  color: var(--cobalt);
  font-size: 14px;
  line-height: 1.1;
  font-weight: 720;
}

.settlements-summary-head h2,
.settlements-operations-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: 0;
}

.settlements-summary-head > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 520;
  white-space: nowrap;
}

.settlements-summary {
  min-height: 122px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.settlements-summary-card {
  min-width: 0;
  padding: 24px 24px 22px 0;
  display: grid;
  align-content: center;
  gap: 7px;
}

.settlements-summary-card + .settlements-summary-card {
  border-left: 1px solid var(--border);
  padding-left: 24px;
}

.settlements-summary-card > span,
.settlements-summary-card small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 540;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settlements-summary-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 21px;
  line-height: 1.05;
  font-weight: 620;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settlements-summary-card.receivable strong,
.settlements-balance.receivable,
.settlements-money.receivable,
.settlements-final-balance strong.receivable {
  color: #0873cf;
}

.settlements-summary-card.payable strong,
.settlements-balance.payable,
.settlements-money.payable,
.settlements-final-balance strong.payable {
  color: #c2413b;
}

.settlements-register {
  min-height: 420px;
  padding: 22px 22px 18px;
  overflow: hidden;
}

.settlements-toolbar {
  align-items: center;
}

.settlements-toolbar h2 {
  white-space: nowrap;
}

.settlements-register-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.settlements-search {
  width: 320px;
  min-width: 240px;
  flex: 1 1 240px;
}

.settlements-currency-filter {
  width: 132px;
}

.settlements-add-operation {
  min-height: 38px;
  min-width: 0;
  margin: 0;
  padding: 0 16px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.settlements-add-operation .nav-icon {
  width: 16px;
  height: 16px;
}

.settlements-status-nav {
  margin-bottom: 18px;
}

.settlements-status-nav [data-settlements-status] {
  min-width: 154px;
}

.settlements-counterparty-table,
.settlements-operation-table {
  overflow-x: auto;
}

.settlements-counterparty-head,
.settlements-counterparty-row {
  min-width: 980px;
  display: grid;
  grid-template-columns: minmax(230px, 1.45fr) 118px minmax(132px, 0.78fr) minmax(132px, 0.78fr) minmax(158px, 0.9fr) 66px;
  gap: 14px;
  align-items: center;
}

.settlements-counterparty-head {
  min-height: 42px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.settlements-counterparty-head span:nth-child(n + 3) {
  text-align: right;
}

.settlements-counterparty-row {
  width: 100%;
  min-height: 76px;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
  color: inherit;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.settlements-counterparty-row:hover {
  background: rgba(0, 87, 184, 0.03);
}

.settlements-counterparty-row.selected {
  background: rgba(0, 87, 184, 0.055);
  box-shadow: inset 3px 0 0 var(--cobalt);
}

.settlements-counterparty-name,
.settlements-operation-row > span {
  min-width: 0;
}

.settlements-counterparty-name strong,
.settlements-operation-row strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settlements-counterparty-name small,
.settlements-operation-row small,
.settlements-operation-count small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settlements-status {
  min-height: 30px;
  width: fit-content;
  border: 1px solid rgba(0, 87, 184, 0.13);
  border-radius: 999px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.055);
  font-size: 12px;
  line-height: 1;
  font-weight: 650;
  white-space: nowrap;
}

.settlements-status.payable {
  border-color: rgba(194, 65, 59, 0.15);
  color: #ae3732;
  background: rgba(194, 65, 59, 0.06);
}

.settlements-status.closed {
  border-color: rgba(22, 163, 74, 0.14);
  color: var(--success);
  background: rgba(22, 163, 74, 0.065);
}

.settlements-status.mixed {
  border-color: rgba(102, 112, 133, 0.16);
  color: #536176;
  background: rgba(102, 112, 133, 0.07);
}

.settlements-money {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 610;
  text-align: right;
  white-space: normal;
}

.settlements-balance {
  color: var(--cobalt);
  font-weight: 680;
}

.settlements-balance.closed {
  color: var(--success);
}

.settlements-operation-count {
  text-align: right;
}

.settlements-operation-count strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  font-weight: 650;
}

.settlements-operations-panel {
  min-height: 310px;
  padding: 22px 22px 18px;
  overflow: hidden;
}

.settlements-operations-head {
  min-height: 76px;
  padding: 0 6px 16px;
  align-items: flex-start;
}

.settlements-operations-head h2 {
  font-size: 22px;
}

.settlements-operations-head > div:first-child > span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.settlements-final-balance {
  min-width: 210px;
  padding-left: 24px;
  text-align: right;
}

.settlements-final-balance span,
.settlements-final-balance small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 520;
}

.settlements-final-balance strong {
  display: block;
  margin: 6px 0 5px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
  font-weight: 680;
  white-space: nowrap;
}

.settlements-operation-head,
.settlements-operation-row {
  min-width: 1000px;
  display: grid;
  grid-template-columns: 170px 105px minmax(300px, 1fr) 140px 150px 40px;
  gap: 16px;
  align-items: center;
}

.settlements-operation-head {
  min-height: 42px;
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.settlements-operation-head span:nth-child(4),
.settlements-operation-head span:nth-child(5) {
  text-align: right;
}

.settlements-operation-head span:last-child {
  text-align: center;
}

.settlements-operation-row {
  min-height: 96px;
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
}

.settlements-operation-source {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.settlements-operation-source .dds-bank-logo,
.settlements-operation-source .dds-cash-tile,
.settlements-operation-source .settlement-adjustment-tile {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
}

.settlement-adjustment-tile {
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 87, 184, 0.13);
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.055);
}

.settlement-adjustment-tile svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settlement-operation-dialog .dds-operation-dialog-section {
  display: grid;
  gap: 13px;
}

.settlement-operation-dialog .field > span {
  color: #43516a;
  font-size: 12px;
  font-weight: 620;
}

.settlement-operation-values {
  grid-template-columns: 1.15fr 1.15fr 0.8fr;
  gap: 14px;
}

.settlement-counterparty-field {
  position: relative;
}

.settlement-counterparty-field > input[type="search"] {
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, #667085 50%),
    linear-gradient(135deg, #667085 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.settlement-counterparty-field > input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.settlement-counterparty-field.invalid > input[type="search"] {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.dds-manual-counterparty-field.is-auto > input[type="search"] {
  border-color: rgba(0, 87, 184, 0.26);
  color: var(--cobalt);
  background-color: #f4f8fd;
  background-image: none;
  cursor: default;
}

.settlement-counterparty-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 248px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.14);
}

.settlement-counterparty-option {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  display: grid;
  gap: 3px;
  color: #344054;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.settlement-counterparty-option strong,
.settlement-counterparty-option small {
  display: block;
}

.settlement-counterparty-option strong {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 620;
}

.settlement-counterparty-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 500;
}

.settlement-counterparty-option:hover,
.settlement-counterparty-option.active,
.settlement-counterparty-option[aria-selected="true"] {
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.055);
}

.settlement-counterparty-option:focus-visible {
  outline: 2px solid rgba(0, 87, 184, 0.28);
  outline-offset: -2px;
}

.settlement-counterparty-empty {
  min-height: 58px;
  padding: 10px 12px;
  display: grid;
  align-content: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.settlement-kind-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settlement-kind-group {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: grid;
  gap: 8px;
  background: #f8fafc;
}

.settlement-kind-group legend {
  padding: 0 6px;
  color: #43516a;
  font-size: 12px;
  line-height: 1;
  font-weight: 680;
}

.settlement-kind-group button {
  position: relative;
  min-height: 62px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 44px 10px 14px;
  display: grid;
  align-content: center;
  gap: 4px;
  color: #344054;
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.settlement-kind-group button::after {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 17px;
  height: 17px;
  border: 1px solid #cfd6df;
  border-radius: 999px;
  background: var(--white);
  content: "";
  transform: translateY(-50%);
  box-sizing: border-box;
}

.settlement-kind-group button strong,
.settlement-kind-group button small {
  display: block;
}

.settlement-kind-group button strong {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 620;
}

.settlement-kind-group button small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 500;
}

.settlement-kind-group button:hover {
  border-color: rgba(0, 87, 184, 0.3);
  background: rgba(0, 87, 184, 0.025);
}

.settlement-kind-group button.active {
  border-color: rgba(0, 87, 184, 0.58);
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.04);
  box-shadow: inset 0 0 0 1px rgba(0, 87, 184, 0.08);
}

.settlement-kind-group button.active::after {
  border-color: var(--cobalt);
  background: var(--cobalt);
  box-shadow: inset 0 0 0 4px var(--white);
}

.settlement-kind-group button:focus-visible {
  outline: 3px solid rgba(0, 87, 184, 0.18);
  outline-offset: 2px;
}

.settlement-operation-explainer,
.settlement-operation-field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.settlement-operation-explainer {
  border: 1px solid rgba(0, 87, 184, 0.11);
  border-radius: 9px;
  padding: 10px 12px;
  color: #43516a;
  background: rgba(0, 87, 184, 0.035);
}

.settlement-operation-hint:empty {
  display: none;
}

.settlement-operation-hint.error {
  color: #ae3732;
}

.settlements-operation-source > span:last-child {
  min-width: 0;
}

.settlements-operation-date {
  min-width: 0;
}

.settlements-operation-date strong,
.settlements-operation-date small {
  display: block;
}

.settlements-operation-date strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 650;
  white-space: nowrap;
}

.settlements-operation-date small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.settlements-operation-story {
  min-width: 0;
}

.settlements-operation-story > span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #43516a;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settlements-operation-story small {
  max-width: 100%;
  margin-top: 3px;
}

.settlements-operation-change,
.settlements-operation-balance {
  min-width: 0;
  text-align: right;
}

.settlements-operation-change small,
.settlements-operation-balance small {
  min-height: 30px;
  white-space: normal;
}

.settlements-running-balance {
  color: var(--text);
  font-weight: 680;
}

.settlements-operation-open {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 87, 184, 0.13);
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.045);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.settlements-operation-open:hover {
  border-color: rgba(0, 87, 184, 0.26);
  background: rgba(0, 87, 184, 0.09);
  transform: translateY(-1px);
}

.settlements-operation-open:focus-visible {
  outline: 2px solid rgba(0, 87, 184, 0.3);
  outline-offset: 2px;
}

.settlements-operation-open svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

  .settlements-summary-card:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-left: 0;
  }

  .settlements-summary-card:nth-child(4) {
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 720px) {
  .settlements-summary-panel,
  .settlements-register,
  .settlements-operations-panel {
    padding-left: 18px;
    padding-right: 18px;
  }

  .settlements-summary-head,
  .settlements-operations-head {
    min-height: 0;
    padding-bottom: 18px;
    display: grid;
  }

  .settlements-summary-head h2 {
    font-size: 24px;
  }

  .settlements-summary-head > span {
    white-space: normal;
  }

  .settlements-summary {
    grid-template-columns: 1fr;
  }

  .settlements-summary-card,
  .settlements-summary-card + .settlements-summary-card,
  .settlements-summary-card:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 18px 0;
  }

  .settlements-summary-card:first-child {
    border-top: 0;
  }

  .settlements-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .settlements-register-controls,
  .settlements-search,
  .settlements-currency-filter {
    width: 100%;
  }

  .settlements-add-operation {
    width: 100%;
  }

  .settlement-operation-values {
    grid-template-columns: 1fr;
  }

  .settlement-kind-groups {
    grid-template-columns: 1fr;
  }

  .settlements-status-nav {
    overflow-x: auto;
  }

  .settlements-status-nav .dds-status-tabs {
    min-width: max-content;
  }

  .settlements-final-balance {
    padding-left: 0;
    text-align: left;
  }
}

.loading {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.empty-page {
  min-height: calc(100vh - 136px);
}

.empty-page-card {
  min-height: 369px;
  border: 1px solid rgba(221, 227, 234, 0.86);
  border-radius: 12px;
  padding: 22px 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.empty-page-card p {
  margin: 0 0 8px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.empty-page-card h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: 0;
}

.edit-dialog {
  width: min(860px, calc(100vw - 28px));
  border: 0;
  border-radius: 18px;
  padding: 0;
  box-shadow: var(--shadow);
}

#financeShipmentDialog {
  width: min(1180px, calc(100vw - 28px));
}

.edit-dialog::backdrop {
  background: rgba(17, 24, 39, 0.46);
}

.edit-form {
  padding: 24px;
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dialog-head {
  margin-bottom: 20px;
}

.icon-button.subtle {
  color: var(--muted);
  background: var(--panel);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.field.wide {
  grid-column: span 3;
}

.dialog-actions {
  margin-top: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
}

@media (max-width: 1080px) {
  .auth-screen {
    grid-template-columns: 1fr;
    padding: 22px;
    background: var(--page);
  }

  .auth-brand {
    min-height: 280px;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    height: auto;
    overflow: visible;
    padding: 0 18px 92px;
  }

  .workspace::before {
    height: 198px;
    background:
      linear-gradient(180deg, var(--graphite), #182231 74%, transparent 74%),
      linear-gradient(168deg, transparent 0 46%, rgba(0, 87, 184, 0.96) 47% 50%, transparent 51% 100%);
  }

  .workspace::after {
    display: none;
  }

  .topbar {
    min-height: 170px;
    padding-top: 22px;
    color: var(--white);
    align-items: flex-start;
  }

  .mobile-brand {
    display: flex;
  }

  .mobile-brand .brand-logo {
    width: 166px;
  }

  .mobile-brand .brand-mark {
    width: 44px;
    height: 44px;
    font-size: 21px;
  }

  .mobile-brand .brand-name {
    font-size: 23px;
  }

  .title-block {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .role-field,
  .manager-only.field.compact {
    display: none !important;
  }

  .topbar-actions {
    gap: 10px;
  }

  .top-icon {
    border-left: 0;
  }

  .top-icon .nav-icon {
    color: var(--white);
  }

  .field.compact {
    min-width: 118px;
  }

  .field.compact span {
    color: rgba(255, 255, 255, 0.7);
  }

  .field.compact select {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
  }

  .hero-panel {
    margin-top: -42px;
    padding: 20px;
    border-radius: 16px;
  }

  .overview-page.is-container-card .hero-panel {
    margin-top: 12px;
  }

  .empty-page {
    min-height: calc(100vh - 184px);
    margin-top: -42px;
  }

  .containers-page {
    margin-top: -42px;
  }

  .finance-page {
    margin-top: -42px;
  }

  .finance-calculation-page {
    margin-top: -42px;
  }

  .empty-page-card {
    min-height: 300px;
    border-radius: 16px;
    padding: 20px;
  }

  .hero-top {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }

  .metric {
    min-height: auto;
    padding: 0;
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 14px;
  }

  .route {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .route-stage {
    min-height: 68px;
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    text-align: left;
    column-gap: 12px;
  }

  .route-stage::before {
    top: -28px;
    left: 22px;
    width: 2px;
    height: 56px;
  }

  .stage-node {
    width: 38px;
    height: 38px;
    margin: 0;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page {
    margin-top: -42px;
  }

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

  .dashboard-kpi:last-child {
    grid-column: span 2;
  }

  .dashboard-route-panel {
    height: auto;
    min-height: 0;
  }

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

  .dashboard-route-stage::after {
    left: 52px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-panel,
  .dashboard-rates-panel,
  .dashboard-trend-panel,
  .dashboard-savings-panel {
    min-height: 0 !important;
  }

  .rate-table {
    overflow-x: auto;
  }

  .size-segmented {
    min-width: 108px;
  }

  .rate-head,
  .rate-row {
    min-width: 540px;
  }

  .trend-chart {
    margin-right: 0;
  }

  .trend-summary,
  .total-saving {
    position: static;
    width: 100%;
    min-height: 0;
    margin-top: 14px;
  }

  .savings-table {
    padding-right: 0;
  }

  .dashboard-summary-strip {
    height: auto;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-summary-strip .summary-item:nth-child(2n) {
    border-right: 0;
  }

  .containers-hero {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .finance-hero {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .finance-calculation-hero {
    grid-template-columns: 1fr;
    border-radius: 16px 16px 0 0;
  }

  .finance-calculation-kpis {
    grid-template-columns: 1fr;
  }

  .finance-calculation-kpis article {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .finance-calculation-kpis article:last-child {
    border-bottom: 0;
  }

  .finance-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-stat {
    border-bottom: 1px solid var(--border);
  }

  .finance-stat:nth-child(2n) {
    border-right: 0;
  }

  .finance-stat:last-child {
    grid-column: span 2;
    border-bottom: 0;
  }

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

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

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 16px;
  }

  .admin-stats {
    width: 100%;
    min-width: 0;
  }

  .admin-user-main {
    grid-template-columns: 1fr;
  }

  .finance-register,
  .dds-register,
  .finance-detail {
    min-height: 0;
    border-radius: 16px;
  }

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

  .register-stat:nth-child(2) {
    border-right: 0;
  }

  .register-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .register-toolbar,
  .register-controls {
    display: grid;
  }

  .register-controls {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .finance-register-controls {
    grid-template-columns: 1fr auto;
  }

  .dds-register-controls {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 132px 132px;
  }

  .search-field,
  .register-segmented {
    width: 100%;
    min-width: 0;
  }

  .finance-search,
  .dds-search {
    width: 100%;
  }

  .register-head {
    display: none;
  }

  .register-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    padding: 16px 0;
  }

  .list-panel {
    grid-row: auto;
  }

  .access-panel {
    grid-column: auto;
  }

  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .bottom-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 64px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  .bottom-nav button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
  }

  .bottom-nav button.active {
    color: var(--cobalt);
  }
}

@media (max-width: 720px) {
  .auth-screen {
    padding: 14px;
  }

  .auth-brand,
  .auth-card {
    border-radius: 12px;
    padding: 22px;
  }

  .auth-brand h1 {
    font-size: 28px;
  }

  .topbar {
    gap: 12px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .container-title {
    font-size: 34px;
  }

  .meta-line {
    display: grid;
    gap: 7px;
  }

  .mobile-client-line {
    display: block;
    margin: 8px 0 8px;
    color: var(--muted);
    font-size: 13px;
  }

  .mobile-client-line strong {
    color: var(--text);
  }

  .content-grid {
    gap: 12px;
  }

  .panel {
    padding: 18px;
  }

  .panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .container-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .containers-hero-copy h2 {
    font-size: 25px;
  }

  .finance-hero-copy h2 {
    font-size: 25px;
  }

  .dds-balance-panel {
    padding: 18px;
  }

  .dds-balance-head {
    display: grid;
    gap: 10px;
  }

  .dds-balance-head h2 {
    font-size: 25px;
  }

  .dds-balance-head > span {
    margin-top: 0;
  }

  .dds-balance-summary {
    grid-template-columns: 1fr;
    padding: 12px 0;
  }

  .dds-balance-summary-card {
    min-height: 78px;
    padding: 10px 0;
  }

  .dds-balance-summary-card + .dds-balance-summary-card {
    border-top: 1px solid var(--border);
    border-left: 0;
    padding-left: 0;
  }

  .dds-balance-summary-card strong {
    font-size: 25px;
    white-space: normal;
  }

  .dds-balance-grid {
    grid-template-columns: 1fr;
    row-gap: 22px;
  }

  .dds-balance-section-cash {
    border-top: 1px solid var(--border);
    border-left: 0;
    padding-left: 0;
    padding-top: 22px;
  }

  .dds-bank-balance-head,
  .dds-cash-balance-head {
    display: none;
  }

  .dds-bank-row,
  .dds-cash-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 0;
    align-items: start;
  }

  .dds-balance-row > strong,
  .dds-bank-balance-value,
  .dds-bank-row > span:last-child,
  .dds-cash-row > strong {
    text-align: left;
  }

  .dds-bank-total-row,
  .dds-cash-total-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .dds-balance-total-row strong {
    text-align: left;
  }

  .finance-hero-stats,
  .finance-summary-grid {
    grid-template-columns: 1fr;
  }

  .finance-stat,
  .finance-summary-grid div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .finance-stat:last-child,
  .finance-summary-grid div:last-child {
    grid-column: auto;
    border-bottom: 0;
  }

  .finance-register-controls,
  .dds-register-controls {
    grid-template-columns: 1fr;
  }

  .dds-status-nav {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .dds-status-tabs {
    flex: 0 0 auto;
  }

  .dds-status-nav [data-dds-status-tab] {
    min-width: max-content;
    padding: 0 18px;
    white-space: nowrap;
  }

  .dds-status-nav-action {
    flex: 0 0 auto;
  }

  .dds-filter {
    width: 100%;
  }

  .dds-register-controls .pantera-control {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }

  .admin-stats,
  .admin-user-status {
    grid-template-columns: 1fr;
  }

  .admin-user-head {
    display: grid;
  }

  .finance-register-head {
    display: none;
  }

  .dds-operation-head {
    display: none;
  }

  .finance-register-row {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 0;
  }

  .dds-operation-row {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
  }

  .dds-unified-register,
  .dds-unified-operation-row {
    min-width: 0;
  }

  .dds-pagination-footer {
    min-width: 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .dds-pagination {
    width: 100%;
    overflow-x: auto;
    padding: 2px;
  }

  .dds-unified-operation-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px 14px;
  }

  .dds-unified-operation-row .dds-operation-source-cell {
    grid-row: 1 / span 4;
    align-self: start;
  }

  .dds-unified-operation-row > :not(.dds-operation-source-cell) {
    grid-column: 2;
  }

  .dds-operation-group-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .dds-operation-group-meta {
    margin-left: 0;
  }

  .dds-operation-summary {
    grid-template-columns: 1fr;
  }

  .dds-operation-summary article {
    min-height: 54px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .dds-operation-summary article:last-child {
    border-bottom: 0;
  }

  .dds-account-row,
  .dds-import-row {
    grid-template-columns: 1fr;
  }

  .dds-mail-grid,
  .dds-manual-import-panel .dds-import-form {
    grid-template-columns: 1fr;
  }

  .dds-mail-grid .field.wide,
  .dds-manual-import-panel .dds-import-form > div,
  .dds-manual-import-panel .dds-import-result {
    grid-column: auto;
  }

  .dds-import-accordion summary {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dds-import-accordion summary > span {
    width: 100%;
  }

  .dds-account-row > div:last-child,
  .dds-import-row > div:last-child {
    text-align: left;
  }

  .finance-row-select {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0;
  }

  .finance-register-actions {
    justify-content: flex-start;
  }

  .finance-detail-head,
  .finance-entry-toolbar {
    display: grid;
  }

  .finance-detail-actions {
    grid-template-columns: 1fr 1fr 38px 38px;
  }

  .finance-definition-grid {
    grid-template-columns: 1fr;
  }

  .finance-entry-head {
    display: none;
  }

  .finance-entry-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .finance-entry-row > div:not(.finance-entry-title):not(.finance-entry-actions) {
    padding-left: 44px;
    text-align: left;
  }

  .finance-entry-actions {
    justify-content: flex-start;
    padding-left: 44px;
  }

  .containers-summary {
    grid-template-columns: 1fr;
  }

  .register-stat {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .register-stat:last-child {
    border-bottom: 0;
  }

  .register-row {
    grid-template-columns: 1fr;
  }

  .register-container-cell strong {
    font-size: 20px;
  }

  .row-arrow {
    display: none;
  }

  .segmented {
    width: 100%;
    min-width: 0;
  }

  .total-line strong {
    font-size: 32px;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-kpis,
  .dashboard-route,
  .dashboard-summary-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi:last-child {
    grid-column: auto;
  }

  .dashboard-route-stage {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .dashboard-route-stage::after {
    left: 52px;
    right: 0;
  }

  .dashboard-route-stage::before {
    right: 8px;
  }

  .shipment-chart {
    gap: 8px;
    padding-left: 0;
    padding-right: 0;
  }

  .bars {
    gap: 5px;
  }

  .bars i {
    width: 15px;
  }

  .savings-head,
  .saving-row {
    grid-template-columns: minmax(0, 1fr) 90px 52px 28px;
    gap: 8px;
  }

  .dashboard-summary-strip .summary-item {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
  }

  .dashboard-summary-strip .summary-item:last-child {
    border-bottom: 0;
  }

  .access-row {
    grid-template-columns: 1fr;
    padding: 12px 0;
  }

  .finance-cargo-row,
  .finance-cargo-summary-row,
  .directory-layout,
  .directory-item-row {
    grid-template-columns: 1fr;
  }

  .finance-cargo-row .doc-action {
    width: 100%;
  }

  .directory-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.wide {
    grid-column: auto;
  }

  .dialog-actions {
    grid-template-columns: 1fr 1fr;
  }

  .dialog-actions span {
    display: none;
  }
}

@media (max-width: 720px) {
  .edit-dialog.dds-operation-dialog {
    width: 100vw;
    max-width: 100vw;
  }

  .edit-dialog.dds-operation-dialog.complex-mode {
    width: 100vw;
    max-width: 100vw;
  }

  .dds-operation-dialog .dialog-head {
    padding: 20px 18px 16px;
  }

  .dds-operation-dialog .dialog-head h2 {
    font-size: 21px;
  }

  .dds-operation-dialog-head-actions {
    gap: 8px;
  }

  .dds-operation-dialog-head-actions .dds-status {
    display: none !important;
  }

  .dds-operation-dialog-scroll {
    padding: 0 18px 22px;
  }

  .dds-operation-dialog-summary-main {
    padding: 15px;
  }

  .dds-operation-dialog-summary-main .dds-bank-logo,
  .dds-operation-dialog-summary-main .dds-cash-tile {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .dds-operation-dialog-amount {
    font-size: 20px !important;
  }

  .dds-operation-dialog-purpose {
    grid-template-columns: 1fr;
  }

  .dds-operation-dialog-purpose button {
    justify-self: start;
  }

  .dds-reconciliation-head {
    display: grid;
  }

  .dds-invoice-match-head {
    display: grid;
  }

  .dds-invoice-match-count {
    width: fit-content;
  }

  .dds-invoice-match-candidate {
    grid-template-columns: 16px minmax(0, 1fr);
  }

  .dds-invoice-match-meta {
    grid-column: 2;
    justify-items: start;
  }

  .dds-reconciliation-confidence {
    width: fit-content;
  }

  .dds-reconciliation-candidate {
    grid-template-columns: 16px minmax(0, 1fr);
  }

  .dds-reconciliation-candidate-meta {
    grid-column: 2;
    justify-items: start;
  }

  .dds-reconciliation-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dds-allocation-tabs {
    grid-template-columns: 1fr;
  }

  .dds-complex-allocation-head {
    display: grid;
  }

  .dds-split-balance {
    min-width: 0;
    text-align: left;
  }

  .dds-split-line-grid {
    grid-template-columns: 1fr;
  }

  .dds-split-comment-field {
    grid-column: auto;
  }

  .dds-operation-dialog .dialog-actions {
    min-height: 126px;
    padding: 14px 18px;
    grid-template-columns: 1fr 1fr;
  }

  .dds-operation-dialog .dialog-actions > span {
    display: none;
  }

  .dds-operation-dialog .dialog-actions #deleteDdsOperationBtn,
  .dds-operation-dialog .dialog-actions #deleteDdsManualOperationBtn {
    justify-self: start;
  }

  .dds-operation-dialog .dialog-actions #cancelDdsOperationDialogBtn,
  .dds-operation-dialog .dialog-actions #cancelDdsManualOperationDialogBtn {
    justify-self: end;
  }

  .dds-operation-dialog .dialog-actions #saveDdsOperationBtn,
  .dds-operation-dialog .dialog-actions #saveDdsManualOperationBtn {
    width: 100%;
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .directory-page {
    gap: 12px;
  }

  .directory-money-grid {
    grid-template-columns: 1fr;
  }

  .directory-money-column + .directory-money-column {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .directory-hero {
    min-height: 0;
    padding: 20px 18px 0;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .directory-hero h2 {
    font-size: 27px;
  }

  .directory-counter {
    width: 100%;
    min-width: 0;
    min-height: 64px;
    grid-template-columns: 1fr auto;
    justify-items: start;
    padding: 0 18px;
  }

  .directory-counter strong {
    font-size: 26px;
  }

  .directory-tabs {
    margin: 0 -18px;
    display: flex;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .directory-tabs::-webkit-scrollbar {
    display: none;
  }

  .directory-tabs button {
    min-width: 154px;
    min-height: 58px;
    flex: 0 0 auto;
  }

  .directory-toolbar {
    min-height: 0;
    padding: 18px;
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .directory-toolbar-actions {
    width: 100%;
  }

  .directory-search {
    min-width: 0;
    flex: 1 1 auto;
  }

  .directory-search input {
    width: 100%;
  }

  .directory-toolbar-actions .primary-button {
    flex: 0 0 auto;
  }

  .directory-page.operational-directory-mode .directory-operational-shell {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .directory-page.operational-directory-mode .directory-operational-filters,
  .directory-page.operational-directory-mode .directory-operational-register {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .directory-page.operational-directory-mode .directory-operational-filters {
    padding: 16px 12px;
  }

  .directory-page.operational-directory-mode .directory-operational-register {
    grid-template-rows: 54px auto 48px;
  }

  .directory-page.operational-directory-mode .directory-operational-inspector {
    padding: 18px 16px 28px;
  }

  .directory-table-head {
    display: none;
  }

  .directory-item-row {
    min-height: 0;
    padding: 16px 18px;
    gap: 10px;
  }

  .directory-row-actions {
    justify-content: flex-start;
  }

  .directory-category-shell {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .directory-category-modebar,
  .directory-category-footer {
    grid-column: 1;
  }

  .directory-category-modebar {
    align-items: stretch;
    flex-direction: column;
  }

  .directory-category-segmented {
    width: 100%;
  }

  .directory-category-modebar-meta {
    flex-wrap: wrap;
  }

  .directory-category-tree {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .directory-category-inspector {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .directory-category-column-head {
    min-height: 64px;
    padding: 12px 16px;
  }

  .directory-category-group-list {
    padding-block: 6px;
  }

  .directory-category-group-row {
    min-height: 48px;
  }

  .directory-category-table-head {
    display: none;
  }

  .directory-category-article-row {
    min-height: 0;
    padding: 16px 18px;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 7px 12px;
    align-items: start;
  }

  .directory-category-article-name,
  .directory-category-article-row > span {
    grid-column: 1;
  }

  .directory-category-article-row .directory-category-usage {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
  }

  .directory-category-inspector-body {
    padding: 16px;
  }

  .directory-category-footer {
    min-height: 66px;
    padding: 12px 16px;
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .directory-category-footer span:nth-child(2),
  .directory-category-footer span:nth-child(3) {
    padding-left: 0;
  }

  .edit-dialog.directory-editor-dialog {
    width: 100vw;
    max-width: 100vw;
  }

  .directory-editor-dialog .dialog-head {
    padding: 20px 18px 16px;
  }

  .directory-editor-dialog .dialog-head h2 {
    font-size: 21px;
  }

  .directory-editor-dialog.category-editor .directory-form-fields {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "group"
      "code"
      "description";
  }

  .directory-editor-dialog.category-editor .directory-code-field {
    max-width: none;
  }

  .directory-dialog-scroll {
    padding: 0 18px 22px;
  }

  .directory-editor-dialog .dialog-actions {
    min-height: 80px;
    padding: 14px 18px;
    grid-template-columns: 1fr 1fr;
  }

  .directory-editor-dialog .dialog-actions > span {
    display: none;
  }

  .directory-editor-dialog .dialog-actions .danger:not(.hidden) {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .directory-editor-dialog .dialog-actions .primary-button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .directory-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .directory-toolbar-actions .primary-button {
    width: 100%;
    justify-content: center;
  }

  .directory-category-articles-head {
    align-items: stretch;
    flex-direction: column;
  }

  .directory-category-articles-head .primary-button {
    width: 100%;
    justify-content: center;
  }
}

/* Margin register v72 — aligned with the approved DDS visual language. */
.finance-page {
  gap: 18px;
}

.finance-hero {
  min-height: 258px;
  padding: 28px 30px 30px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.finance-hero-copy {
  max-width: 680px;
}

.finance-hero-copy h2 {
  font-size: 32px;
}

.finance-hero-copy span {
  max-width: 650px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.finance-hero-stats {
  width: 100%;
  min-height: 108px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.finance-stat {
  padding: 18px 20px;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 0 14px;
}

.finance-stat-icon {
  width: 38px;
  height: 38px;
  grid-row: auto;
}

.finance-stat-copy {
  min-width: 0;
}

.finance-stat span,
.finance-stat small {
  display: block;
}

.finance-stat span {
  font-size: 13px;
  line-height: 1.2;
}

.finance-stat strong {
  grid-column: auto;
  margin-top: 7px;
  font-size: 21px;
  line-height: 1.08;
  font-weight: 620;
}

.finance-stat small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.finance-stat.green small {
  color: var(--success);
  font-weight: 620;
}

.finance-register {
  padding: 0;
  overflow: hidden;
}

.finance-toolbar {
  min-height: 98px;
  margin: 0;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.finance-toolbar h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 650;
}

.finance-register-meta {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.finance-register-controls {
  width: min(680px, 68%);
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 166px auto;
  gap: 12px;
  align-items: center;
}

.finance-search {
  width: 100%;
}

.finance-status-filter {
  display: block;
}

.finance-status-filter > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.finance-status-filter select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 38px 0 14px;
  color: var(--text);
  background: var(--white);
  font: inherit;
  font-size: 14px;
}

.finance-status-filter select:focus {
  outline: 3px solid rgba(0, 87, 184, 0.12);
  border-color: rgba(0, 87, 184, 0.55);
}

.finance-new-button {
  min-height: 46px;
  padding-inline: 20px;
}

.finance-register-table {
  overflow-x: auto;
}

.finance-register-head,
.finance-row-select {
  min-width: 1080px;
  grid-template-columns: 70px 98px minmax(145px, 0.82fr) minmax(205px, 1.16fr) 122px 102px 102px 102px 32px;
  gap: 12px;
}

.finance-register-head {
  min-height: 54px;
  padding: 0 24px;
  border-top: 0;
  background: #fbfcfe;
  font-size: 12px;
  font-weight: 620;
}

.finance-register-row {
  min-width: 1080px;
  min-height: 96px;
  grid-template-columns: 1fr;
  gap: 0;
}

.finance-row-select {
  width: 100%;
  min-height: 96px;
  padding: 14px 24px;
  cursor: pointer;
}

.finance-register-row:hover {
  background: rgba(0, 87, 184, 0.025);
}

.finance-register-row.active {
  color: var(--text);
  background: rgba(0, 87, 184, 0.042);
  box-shadow: inset 3px 0 0 var(--cobalt);
}

.finance-row-select strong {
  font-weight: 620;
}

.finance-status-badge {
  width: fit-content;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 11px;
  display: inline-flex !important;
  align-items: center;
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 650;
}

.finance-status-badge.open {
  border-color: rgba(8, 103, 216, 0.12);
  color: var(--cobalt-active);
  background: rgba(8, 103, 216, 0.08);
}

.finance-status-badge.closed {
  border-color: rgba(22, 163, 74, 0.12);
  color: var(--success);
  background: rgba(22, 163, 74, 0.08);
}

.finance-route-compact {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(56px, auto) 34px minmax(88px, 1fr);
  gap: 8px;
  align-items: center;
}

.finance-route-compact strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.finance-route-icon {
  width: 28px;
  height: 28px;
  color: var(--cobalt);
}

.finance-open-action {
  display: grid !important;
  place-items: center;
  margin: 0 !important;
  color: var(--cobalt);
}

.finance-open-icon {
  width: 19px;
  height: 19px;
  transform: rotate(-90deg);
}

@media (max-width: 1080px) {
  .finance-hero {
    min-height: 0;
    padding: 22px;
  }

  .finance-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-stat:last-child {
    grid-column: span 2;
  }

  .finance-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .finance-register-controls {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .finance-hero {
    padding: 20px 18px;
  }

  .finance-hero-copy h2 {
    font-size: 27px;
  }

  .finance-hero-stats {
    grid-template-columns: 1fr;
  }

  .finance-stat,
  .finance-stat:nth-child(2n) {
    min-height: 76px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .finance-stat:last-child {
    grid-column: auto;
    border-bottom: 0;
  }

  .finance-toolbar {
    padding: 18px;
  }

  .finance-register-controls {
    grid-template-columns: 1fr;
  }

  .finance-new-button {
    width: 100%;
    justify-content: center;
  }

  .finance-register-head {
    display: none;
  }

  .finance-register-row {
    min-width: 0;
    min-height: 0;
  }

  .finance-row-select {
    min-width: 0;
    min-height: 0;
    padding: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    align-items: start;
  }

  .finance-row-select > :nth-child(1) {
    grid-column: 1;
  }

  .finance-row-select > :nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  .finance-row-select > :nth-child(3),
  .finance-row-select > :nth-child(4),
  .finance-row-select > :nth-child(5) {
    grid-column: 1 / -1;
  }

  .finance-row-select > :nth-child(6),
  .finance-row-select > :nth-child(8) {
    grid-column: 1;
  }

  .finance-row-select > :nth-child(7) {
    grid-column: 2;
  }

  .finance-row-select > :nth-child(9) {
    grid-column: 2;
    grid-row: 5;
    align-self: center;
  }

  .finance-route-compact {
    grid-template-columns: minmax(0, auto) 32px minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .dds-import-dialog,
  .dds-journal-dialog {
    width: calc(100vw - 16px);
  }

  .dds-import-dialog .edit-form,
  .dds-journal-dialog .edit-form {
    padding: 20px 16px;
  }

  .dds-import-dropzone {
    min-height: 238px;
  }

  .dds-import-selected-row,
  .dds-mail-import-head,
  .dds-mail-import-stats {
    grid-template-columns: 1fr;
  }

  .dds-import-selected-row > span:first-child,
  .dds-mail-import-actions {
    grid-column: auto;
  }

  .dds-mail-import-actions {
    padding-left: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .dds-mail-stat,
  .dds-mail-stat:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .dds-mail-stat:last-child {
    border-bottom: 0;
  }
}

/* Keep DDS administration dialogs wider than the shared editor default. */
.edit-dialog.dds-import-dialog {
  width: min(1180px, calc(100vw - 40px));
  max-width: 1180px;
}

.edit-dialog.dds-import-dialog .edit-form {
  max-height: calc(100vh - 40px);
  padding: 26px 28px 28px;
  overflow: auto;
}

.edit-dialog.dds-import-dialog .dialog-head {
  margin-bottom: 18px;
}

.edit-dialog.dds-import-dialog .dds-import-dialog-stack {
  gap: 18px;
}

.edit-dialog.dds-import-dialog .dds-import-dropzone {
  min-height: 230px;
  border-radius: 12px;
}

.edit-dialog.dds-import-dialog .dds-import-dropzone-content {
  gap: 8px;
}

.edit-dialog.dds-import-dialog .dds-import-dropzone-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
}

.edit-dialog.dds-import-dialog .dds-import-dropzone-icon .nav-icon {
  width: 26px;
  height: 26px;
}

.dds-import-file-button {
  min-width: 178px;
  min-height: 42px;
  margin-top: 5px;
  padding: 0 18px;
  border: 1px solid rgba(0, 87, 184, 0.24);
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cobalt) !important;
  background: var(--white);
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.04);
  font-size: 13px !important;
  line-height: 1;
  font-weight: 650;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.dds-import-dropzone-content:hover .dds-import-file-button {
  border-color: rgba(0, 87, 184, 0.38);
  background: rgba(0, 87, 184, 0.035);
  box-shadow: 0 6px 18px rgba(0, 87, 184, 0.08);
}

.edit-dialog.dds-import-dialog .dds-import-selected-row {
  grid-template-columns: 136px minmax(0, 1fr) 214px;
  gap: 12px;
}

.edit-dialog.dds-import-dialog .dds-import-selected-file,
.edit-dialog.dds-import-dialog .dds-import-selected-row .primary-button {
  min-height: 42px;
}

.edit-dialog.dds-import-dialog .dds-import-selected-row .primary-button:disabled {
  cursor: default;
  color: #98a2b3;
  border: 1px solid var(--border);
  background: #f3f5f8;
  box-shadow: none;
  opacity: 1;
}

.edit-dialog.dds-import-dialog .dds-mail-import-section {
  padding-top: 20px;
}

.edit-dialog.dds-import-dialog .dds-mail-import-head {
  grid-template-columns: 52px minmax(220px, 1fr) auto;
  gap: 14px;
}

.edit-dialog.dds-import-dialog .dds-mail-import-icon {
  width: 52px;
  height: 52px;
}

.edit-dialog.dds-import-dialog .dds-mail-import-actions {
  display: grid;
  grid-template-columns: 300px 196px;
  gap: 10px;
}

.edit-dialog.dds-import-dialog .dds-mail-import-actions .text-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--graphite);
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 650;
  white-space: nowrap;
}

.edit-dialog.dds-import-dialog .dds-mail-import-actions .dds-mail-run-button {
  color: var(--cobalt);
  border-color: rgba(0, 87, 184, 0.24);
  background: var(--white);
}

.edit-dialog.dds-import-dialog .dds-mail-import-actions .text-button:hover {
  border-color: rgba(0, 87, 184, 0.32);
  background: rgba(0, 87, 184, 0.045);
}

.edit-dialog.dds-import-dialog .dds-mail-import-stats {
  margin-top: 16px;
}

.edit-dialog.dds-import-dialog .dds-mail-stat {
  min-height: 60px;
  padding: 10px 14px;
}

.edit-dialog.dds-journal-dialog {
  width: min(1180px, calc(100vw - 40px));
  max-width: 1180px;
}

.dds-journal-dialog .edit-form {
  max-height: calc(100vh - 40px);
  padding: 28px 30px 30px;
  overflow: hidden;
}

.dds-journal-dialog .dialog-head {
  margin-bottom: 20px;
}

.dds-journal-dialog .dialog-head > div > span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.dds-journal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}

.dds-journal-summary-card {
  min-width: 0;
  min-height: 92px;
  padding: 15px 17px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 5px 12px;
  border-left: 1px solid var(--border);
}

.dds-journal-summary-card:first-child {
  border-left: 0;
}

.dds-journal-summary-card span,
.dds-journal-summary-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 580;
}

.dds-journal-summary-card span {
  align-self: end;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dds-journal-summary-card strong {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  color: var(--text);
  font-size: 25px;
  line-height: 1;
  font-weight: 690;
}

.dds-journal-summary-card.success strong { color: var(--success); }
.dds-journal-summary-card.critical strong { color: var(--critical); }
.dds-journal-summary-card.cobalt strong { color: var(--cobalt); }

.dds-journal-toolbar {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
}

.dds-journal-search {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  background: var(--white);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.dds-journal-search:focus-within {
  border-color: rgba(0, 87, 184, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.1);
}

.dds-journal-search .nav-icon {
  width: 18px;
  height: 18px;
  margin-left: 13px;
  color: var(--muted);
}

.dds-journal-search input {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 13px;
}

.dds-journal-search input { padding: 0 13px 0 10px; }

.dds-journal-filter-rail {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--panel);
}

.dds-journal-segments {
  display: flex;
  align-items: center;
  gap: 2px;
}

.dds-journal-segments button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 11px;
  line-height: 1;
  font-weight: 620;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.dds-journal-segments button:hover { color: var(--text); background: rgba(0, 87, 184, 0.045); }
.dds-journal-segments button:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 1px; }
.dds-journal-segments button.active {
  color: var(--cobalt);
  background: var(--white);
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.09);
}

.dds-journal-segments button[data-journal-status="failed"].active { color: var(--critical); }
.dds-journal-filter-divider { width: 1px; height: 22px; background: var(--border); }

.dds-journal-dialog .dds-import-log-panel {
  max-height: min(540px, calc(100vh - 320px));
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  background: var(--white);
}

.dds-import-entry {
  border-top: 1px solid var(--border);
  background: var(--white);
}

.dds-import-entry:first-child { border-top: 0; }

.dds-import-entry summary {
  min-height: 84px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 250px 92px 24px;
  gap: 12px;
  align-items: center;
  list-style: none;
  cursor: pointer;
  transition: background-color 180ms ease;
}

.dds-import-entry summary::-webkit-details-marker { display: none; }
.dds-import-entry summary:hover { background: rgba(0, 87, 184, 0.025); }
.dds-import-entry summary:focus-visible { outline: 2px solid var(--cobalt); outline-offset: -2px; }
.dds-import-entry[open] summary { background: rgba(0, 87, 184, 0.035); }

.dds-import-bank-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--graphite);
  font-size: 16px;
  line-height: 1;
  font-weight: 750;
}

.dds-import-bank-mark.tbank { color: #111827; background: #ffdd2d; }
.dds-import-bank-mark.sber { background: #16a34a; }
.dds-import-bank-mark.vtb { background: #0a4fa3; }
.dds-import-bank-mark.generic { background: var(--graphite); }
.dds-import-bank-mark.directory-icon { overflow: hidden; color: transparent; background: var(--white); }
.dds-import-bank-mark.directory-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }

.dds-journal-group-title {
  min-height: 52px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.dds-journal-group-title span,
.dds-journal-history summary > span:nth-child(2) { min-width: 0; }
.dds-journal-group-title strong,
.dds-journal-group-title small,
.dds-journal-history summary strong,
.dds-journal-history summary small { display: block; }
.dds-journal-group-title strong,
.dds-journal-history summary strong { color: var(--text); font-size: 12px; line-height: 1.2; font-weight: 680; }
.dds-journal-group-title small,
.dds-journal-history summary small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.2; }
.dds-journal-group-title > b {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.07);
  font-size: 10px;
  line-height: 1;
  font-weight: 650;
}

.dds-journal-day-empty {
  min-height: 86px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.dds-journal-history {
  border-top: 1px solid var(--border);
  background: var(--white);
}

.dds-journal-history > summary {
  min-height: 66px;
  padding: 11px 16px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 18px;
  gap: 12px;
  align-items: center;
  list-style: none;
  cursor: pointer;
  background: linear-gradient(180deg, var(--white), var(--panel));
  transition: background-color 180ms ease;
}

.dds-journal-history > summary::-webkit-details-marker { display: none; }
.dds-journal-history > summary:hover { background: rgba(0, 87, 184, 0.035); }
.dds-journal-history > summary:focus-visible { outline: 2px solid var(--cobalt); outline-offset: -2px; }
.dds-journal-history-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.07);
}
.dds-journal-history-icon .nav-icon { width: 18px; height: 18px; }
.dds-journal-history-meta { display: flex; align-items: center; gap: 8px; }
.dds-journal-history-meta b,
.dds-journal-history-meta i {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  background: var(--page);
  font-size: 10px;
  line-height: 1;
  font-style: normal;
  font-weight: 650;
}
.dds-journal-history-meta i { color: var(--critical); background: rgba(220, 38, 38, 0.07); }
.dds-journal-history > summary .dds-import-expand { justify-self: center; }
.dds-journal-history[open] > summary .dds-import-expand { transform: rotate(225deg) translate(-2px, -2px); }
.dds-journal-history-list { border-top: 1px solid var(--border); }

.dds-import-source-main,
.dds-import-outcome,
.dds-import-entry time { min-width: 0; }

.dds-import-source-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dds-import-source-line strong,
.dds-import-file-name,
.dds-import-outcome > strong,
.dds-import-entry time strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dds-import-source-line strong { font-size: 13px; line-height: 1.2; font-weight: 680; }
.dds-import-source-line i {
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--muted);
  background: var(--page);
  font-size: 9px;
  line-height: 1;
  font-style: normal;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dds-import-file-name { margin-top: 5px; font-size: 12px; line-height: 1.25; font-weight: 560; }
.dds-import-source-main > small,
.dds-import-outcome > small,
.dds-import-entry time span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dds-import-outcome { text-align: right; }
.dds-import-status {
  width: fit-content;
  margin: 0 0 5px auto;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  font-weight: 690;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.dds-import-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.dds-import-status.success { color: var(--success); }
.dds-import-status.critical { color: var(--critical); }
.dds-import-status.processing { color: var(--cobalt); }
.dds-import-outcome > strong { font-size: 12px; line-height: 1.25; font-weight: 650; }

.dds-import-entry time { text-align: right; }
.dds-import-entry time strong { font-size: 12px; line-height: 1.2; font-weight: 620; }

.dds-import-expand {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms ease;
}

.dds-import-entry[open] .dds-import-expand { transform: rotate(225deg) translate(-2px, -2px); }

.dds-import-entry-details {
  padding: 14px 52px 16px 68px;
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(4, minmax(110px, 1fr));
  gap: 12px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.dds-import-entry-details > div { min-width: 0; }
.dds-import-entry-details span,
.dds-import-entry-details strong { display: block; }
.dds-import-entry-details span { color: var(--muted); font-size: 10px; line-height: 1.2; font-weight: 570; }
.dds-import-entry-details strong { margin-top: 5px; overflow: hidden; color: var(--text); font-size: 12px; line-height: 1.35; font-weight: 620; text-overflow: ellipsis; }
.dds-import-entry-details .dds-import-error-detail { grid-column: 1 / -1; border-top: 1px solid rgba(220, 38, 38, 0.16); padding-top: 10px; }
.dds-import-error-detail span,
.dds-import-error-detail strong { color: var(--critical); }

.dds-journal-empty {
  min-height: 180px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dds-journal-empty strong { color: var(--text); font-size: 14px; font-weight: 650; }
.dds-journal-empty span { margin-top: 6px; color: var(--muted); font-size: 12px; }
.dds-journal-empty.error strong,
.dds-journal-empty.error span { color: var(--critical); }

.dds-journal-skeleton {
  min-height: 84px;
  padding: 18px;
  display: grid;
  grid-template-columns: 40px 1fr 220px;
  gap: 14px;
  align-items: center;
  border-top: 1px solid var(--border);
}
.dds-journal-skeleton:first-child { border-top: 0; }
.dds-journal-skeleton i { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #edf1f5, #f7f9fb, #edf1f5); background-size: 200% 100%; animation: dds-journal-shimmer 1.2s linear infinite; }
.dds-journal-skeleton i:first-child { width: 40px; height: 40px; border-radius: 10px; }
@keyframes dds-journal-shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  .dds-journal-skeleton i { animation: none; }
}

@media (max-width: 680px) {
  .dds-manual-mode-tabs,
  .dds-manual-core-grid,
  .dds-manual-transfer-grid {
    grid-template-columns: 1fr;
  }

  .dds-manual-mode-tabs button {
    min-height: 42px;
  }

  .edit-dialog.dds-import-dialog,
  .edit-dialog.dds-journal-dialog {
    width: calc(100vw - 16px);
  }

  .edit-dialog.dds-import-dialog .edit-form,
  .edit-dialog.dds-journal-dialog .edit-form {
    padding: 20px 16px;
  }

  .edit-dialog.dds-import-dialog .dds-import-dropzone {
    min-height: 220px;
  }

  .edit-dialog.dds-import-dialog .dds-import-selected-row,
  .edit-dialog.dds-import-dialog .dds-mail-import-head,
  .edit-dialog.dds-import-dialog .dds-mail-import-actions {
    grid-template-columns: 1fr;
  }

  .edit-dialog.dds-import-dialog .dds-mail-import-actions {
    grid-column: auto;
    padding-left: 0;
  }

  .dds-journal-dialog .edit-form { padding: 20px 14px; }
  .dds-journal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dds-journal-summary-card { min-height: 80px; border-top: 1px solid var(--border); }
  .dds-journal-summary-card:nth-child(odd) { border-left: 0; }
  .dds-journal-summary-card:nth-child(-n + 2) { border-top: 0; }
  .dds-journal-toolbar { grid-template-columns: 1fr; }
  .dds-journal-filter-rail { display: grid; grid-template-columns: 1fr; }
  .dds-journal-filter-divider { display: none; }
  .dds-journal-segments { width: 100%; }
  .dds-journal-segments button { min-width: 0; flex: 1; padding: 0 5px; }
  .dds-journal-dialog .dds-import-log-panel { margin-top: 14px; max-height: calc(100vh - 470px); }
  .dds-journal-history > summary { grid-template-columns: 34px minmax(0, 1fr) 18px; }
  .dds-journal-history-meta { grid-column: 2; flex-wrap: wrap; }
  .dds-journal-history > summary .dds-import-expand { grid-column: 3; grid-row: 1 / 3; }
  .dds-import-entry summary { grid-template-columns: 38px minmax(0, 1fr) 18px; min-height: 122px; padding: 12px; }
  .dds-import-bank-mark { width: 38px; height: 38px; }
  .dds-import-outcome { grid-column: 2; grid-row: 2; text-align: left; }
  .dds-import-status { margin: 7px 0 4px; }
  .dds-import-entry time { grid-column: 2; grid-row: 3; display: flex; align-items: center; gap: 8px; text-align: left; }
  .dds-import-entry time span { margin-top: 0; }
  .dds-import-expand { grid-column: 3; grid-row: 1 / 4; }
  .dds-import-entry-details { padding: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dds-import-entry-details > div:first-child,
  .dds-import-entry-details .dds-import-error-detail { grid-column: 1 / -1; }
}

@media (max-height: 520px) and (min-width: 681px) {
  .dds-journal-dialog .edit-form { overflow: auto; }
  .dds-journal-dialog .dds-import-log-panel { max-height: 280px; }
}

@media (min-width: 681px) and (max-width: 980px) {
  .edit-dialog.dds-import-dialog .dds-mail-import-head {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .edit-dialog.dds-import-dialog .dds-mail-import-actions {
    grid-column: 1 / -1;
    justify-content: end;
    padding-left: 66px;
  }
}

/* Operational shipments v102 */
.transport-page {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.transport-registry-view,
.transport-detail-view {
  display: grid;
  gap: 16px;
}

.transport-hero {
  min-height: 150px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(310px, 0.84fr) minmax(550px, 1.4fr);
  gap: 28px;
  align-items: center;
}

.transport-hero-copy p,
.transport-detail-head p,
.transport-section-heading p {
  margin: 0 0 6px;
  color: var(--cobalt);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.transport-hero-copy h2,
.transport-detail-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: 0;
}

.transport-hero-copy > span {
  display: block;
  max-width: 470px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
}

.transport-hero-summary {
  min-height: 88px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: rgba(248, 250, 252, 0.76);
  overflow: hidden;
}

.transport-hero-summary article {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--border);
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-content: center;
}

.transport-hero-summary article:last-child {
  border-right: 0;
}

.transport-summary-icon,
.transport-section-title > span {
  width: 30px;
  height: 30px;
  grid-row: 1 / 3;
  align-self: center;
  display: block;
  background: var(--cobalt);
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.transport-hero-summary strong {
  color: var(--text);
  font-size: 21px;
  line-height: 1;
  font-weight: 610;
}

.transport-hero-summary small {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.transport-hero-summary article.attention .transport-summary-icon,
.transport-hero-summary article.attention strong {
  color: var(--warning);
  background-color: var(--warning);
}

.transport-register {
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.transport-register-toolbar {
  min-height: 78px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.transport-register-toolbar h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 620;
}

.transport-register-toolbar > div > span,
.transport-section-heading > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.transport-register-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.transport-register-actions .primary-button,
.transport-filter-toggle {
  min-height: 42px;
  white-space: nowrap;
}

.transport-search {
  width: 286px;
}

.transport-filter-toggle.active {
  color: var(--cobalt);
  border-color: rgba(0, 87, 184, 0.24);
  background: rgba(0, 87, 184, 0.06);
}

.transport-filters {
  min-height: 78px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto auto;
  gap: 9px;
  align-items: end;
  background: #fbfcfe;
}

.transport-filters[hidden] {
  display: none;
}

.transport-filters label:not(.transport-needs-filter) {
  display: grid;
  gap: 5px;
}

.transport-filters label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.transport-filters select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 28px 0 10px;
  color: var(--text);
  background: var(--white);
  font: inherit;
  font-size: 12px;
}

.transport-needs-filter {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  background: var(--white);
  white-space: nowrap;
}

.transport-register-table {
  min-width: 0;
  border-top: 1px solid var(--border);
  overflow-x: auto;
}

.transport-register-head,
.transport-register-row {
  min-width: 1010px;
  display: grid;
  grid-template-columns: 110px minmax(168px, 0.9fr) 124px minmax(180px, 1.02fr) 134px minmax(132px, 0.7fr) 88px;
  gap: 12px;
  align-items: center;
}

.transport-register-head {
  min-height: 38px;
  padding: 0 20px;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 11px;
  font-weight: 620;
}

.transport-register-row {
  position: relative;
  min-height: 78px;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  color: var(--text);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.transport-register-row:first-of-type {
  border-top: 0;
}

.transport-register-row:hover,
.transport-register-row.selected {
  background: linear-gradient(90deg, rgba(0, 87, 184, 0.055), rgba(255, 255, 255, 0));
}

.transport-register-row.selected {
  box-shadow: inset 3px 0 var(--cobalt);
}

.transport-row-open {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.transport-register-row > span {
  position: relative;
  z-index: 1;
  min-width: 0;
  pointer-events: none;
}

.transport-register-row strong {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 590;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.transport-register-row small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.transport-needs-badge {
  width: fit-content;
  margin-top: 6px;
  border-radius: 999px;
  padding: 4px 7px;
  display: block;
  color: #9a6700;
  background: #fff4d6;
  font-size: 10px;
  line-height: 1;
  font-weight: 650;
}

.transport-status {
  width: fit-content;
  min-height: 23px;
  border-radius: 999px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  color: #0b63c8;
  background: #eaf3ff;
  font-size: 10px;
  line-height: 1;
  font-weight: 650;
  white-space: nowrap;
}

.transport-status.success { color: #147a38; background: #eaf7ee; }
.transport-status.warning { color: #9a6700; background: #fff4d6; }
.transport-status.danger { color: #b42318; background: #feeceb; }
.transport-status.neutral { color: #596579; background: #eef1f5; }

.transport-stage-cell > strong + .transport-status,
.transport-stage-cell > .transport-status {
  margin-top: 5px;
}

.transport-row-action {
  display: flex;
  justify-content: flex-end;
  pointer-events: auto !important;
}

.transport-row-action button {
  position: relative;
  z-index: 2;
}

.transport-fill-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 11px;
}

.transport-chevron {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cobalt);
  background: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.transport-detail-toolbar {
  margin-bottom: -4px;
}

.transport-detail {
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.transport-detail-head {
  min-height: 126px;
  padding: 22px 24px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.72));
}

.transport-detail-head h2 {
  font-size: 30px;
}

.transport-detail-meta {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.transport-detail-meta > span {
  min-height: 26px;
  border-left: 1px solid var(--border);
  padding-left: 10px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.transport-detail-meta > span:first-child {
  border-left: 0;
  padding-left: 0;
  color: var(--text);
  font-weight: 600;
}

.transport-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.transport-detail-actions .secondary-button {
  min-height: 38px;
}

.transport-tabs {
  min-height: 52px;
  padding: 0 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  gap: 24px;
  background: #fbfcfe;
}

.transport-tabs button {
  position: relative;
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 630;
  cursor: pointer;
}

.transport-tabs button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}

.transport-tabs button.active { color: var(--cobalt); }
.transport-tabs button.active::after { background: var(--cobalt); }
.transport-tabs button span { margin-left: 5px; color: #98a2b3; font-size: 11px; }

.transport-detail-body {
  min-height: 300px;
}

.transport-incomplete-state {
  min-height: 250px;
  padding: 44px 48px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.transport-incomplete-icon {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(0, 87, 184, 0.16);
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cobalt);
  background: #eff6ff;
  font-size: 17px;
  font-weight: 700;
}

.transport-incomplete-state p {
  margin: 0 0 5px;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 700;
}

.transport-incomplete-state h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.18;
  font-weight: 620;
}

.transport-incomplete-state div > span {
  display: block;
  max-width: 650px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.transport-route-progress,
.transport-finance-summary,
.transport-finance-register {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}

.transport-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.transport-section-heading h3,
.transport-section-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 620;
}

.transport-stage-line {
  position: relative;
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.transport-stage-line::before {
  content: "";
  position: absolute;
  top: 24px;
  right: 7.5%;
  left: 7.5%;
  height: 1px;
  background: var(--border);
}

.transport-stage {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  justify-items: center;
  text-align: center;
}

.transport-stage-node {
  width: 48px;
  height: 48px;
  border: 1px solid #ccd4df;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  box-shadow: 0 5px 14px rgba(17, 24, 39, 0.04);
}

.transport-stage-node i {
  width: 22px;
  height: 22px;
  display: block;
  background: #7a8698;
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.transport-stage.done .transport-stage-node,
.transport-stage.current .transport-stage-node {
  border-color: rgba(0, 87, 184, 0.5);
}

.transport-stage.done .transport-stage-node i,
.transport-stage.current .transport-stage-node i {
  background: var(--cobalt);
}

.transport-stage.current .transport-stage-node {
  box-shadow: 0 0 0 5px rgba(0, 87, 184, 0.08), 0 6px 18px rgba(0, 87, 184, 0.1);
}

.transport-stage > strong {
  margin-top: 9px;
  color: var(--text);
  font-size: 12px;
  font-weight: 620;
}

.transport-stage > small,
.transport-stage > time {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.transport-stage > button {
  margin-top: 8px;
  border: 0;
  padding: 0;
  color: var(--cobalt);
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.transport-overview-sections {
  padding: 0 24px;
}

.transport-detail-section {
  min-height: 82px;
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
}

.transport-section-title {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.transport-section-title > span {
  width: 25px;
  height: 25px;
  grid-row: auto;
  flex: 0 0 auto;
}

.transport-section-title h3 {
  padding-top: 2px;
  font-size: 15px;
}

.transport-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 28px;
}

.transport-facts > div {
  min-width: 0;
}

.transport-facts span,
.transport-date-list span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.transport-facts strong,
.transport-date-list strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 580;
  white-space: pre-wrap;
}

.transport-object-list,
.transport-document-list,
.transport-date-list {
  display: grid;
}

.transport-object-row,
.transport-document-row {
  min-height: 54px;
  border-top: 1px solid var(--border);
  display: grid;
  align-items: center;
  gap: 11px;
}

.transport-object-row:first-child,
.transport-document-row:first-child {
  border-top: 0;
}

.transport-object-row {
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
}

.transport-object-mark,
.transport-doc-icon {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 87, 184, 0.14);
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cobalt);
  background: #f0f6ff;
  font-size: 10px;
  font-weight: 700;
}

.transport-object-row strong,
.transport-document-row strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 590;
}

.transport-object-row div > span,
.transport-object-row div > small,
.transport-document-row div > span,
.transport-document-row div > small {
  display: inline-block;
  margin: 4px 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.transport-route-points {
  min-height: 48px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.transport-route-points > div {
  min-width: 0;
  flex: 1;
}

.transport-route-points small {
  display: block;
  color: var(--cobalt);
  font-size: 10px;
  font-weight: 700;
}

.transport-route-points strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 590;
}

.transport-route-points i {
  color: #98a2b3;
  font-style: normal;
}

.transport-date-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}

.transport-date-list > div {
  min-height: 50px;
  border-bottom: 1px solid var(--border);
  padding: 9px 0;
}

.transport-document-row {
  grid-template-columns: 38px minmax(0, 1fr) 100px auto auto;
}

.transport-document-row time {
  color: var(--muted);
  font-size: 11px;
}

.transport-long-copy {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.transport-audit-line {
  min-height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 11px;
}

.transport-currency-summary {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.transport-currency-summary article {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  display: grid;
  gap: 8px;
  background: #fbfcfe;
}

.transport-currency-summary article:last-child { border-right: 0; }
.transport-currency-summary article > strong { color: var(--cobalt); font-size: 12px; font-weight: 700; }
.transport-currency-summary article > span { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.transport-currency-summary article b { color: var(--text); font-weight: 600; white-space: nowrap; }
.transport-currency-summary .transport-margin { margin-top: 2px; border-top: 1px solid var(--border); padding-top: 9px; }
.transport-currency-summary .transport-margin.positive b { color: var(--success); }
.transport-currency-summary .transport-margin.negative b { color: var(--critical); }

.transport-finance-register .transport-section-heading {
  align-items: center;
}

.transport-finance-register .primary-button.compact {
  min-height: 38px;
  padding: 0 14px;
  font-size: 12px;
}

.transport-finance-head,
.transport-finance-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) 128px 142px minmax(150px, 0.8fr) 128px 34px;
  gap: 12px;
  align-items: center;
}

.transport-finance-head {
  min-height: 38px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
}

.transport-finance-row {
  min-height: 66px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.transport-finance-row > span { min-width: 0; }
.transport-finance-row strong { display: block; overflow: hidden; color: var(--text); font-size: 12px; font-weight: 590; white-space: nowrap; text-overflow: ellipsis; }
.transport-finance-row small { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.transport-money { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.transport-dds-link { border: 0; padding: 0; color: var(--cobalt); background: transparent; font: inherit; font-size: 11px; font-weight: 620; cursor: pointer; }

.edit-dialog.transport-dialog {
  width: min(1040px, calc(100vw - 42px));
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  border: 0;
  border-radius: 20px 0 0 20px;
  padding: 0;
  color: var(--text);
  background: var(--white);
  box-shadow: -26px 0 70px rgba(17, 24, 39, 0.18);
  overflow: hidden;
}

.transport-dialog::backdrop {
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(2px);
}

.transport-edit-form {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.transport-dialog-head {
  min-height: 78px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255, 255, 255, 0.96);
}

.transport-dialog-head p {
  margin: 0 0 4px;
  color: var(--cobalt);
  font-size: 11px;
  font-weight: 700;
}

.transport-dialog-head h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 620;
}

.transport-dialog-head .icon-button {
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: var(--panel);
  font-size: 24px;
}

.transport-form-scroll {
  min-height: 0;
  padding: 0 28px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.transport-create-scope-note {
  margin: 20px 0 0;
  border: 1px solid rgba(0, 87, 184, 0.14);
  border-radius: 11px;
  padding: 12px 14px;
  color: #475467;
  background: #f5f9ff;
  font-size: 11px;
  line-height: 1.5;
}

.transport-shipment-type-picker {
  margin: 18px 0 0;
  border: 0;
  padding: 0;
}

.transport-shipment-type-picker legend {
  margin-bottom: 9px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.transport-shipment-type-picker > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.transport-shipment-type-picker label {
  min-width: 0;
  cursor: pointer;
}

.transport-shipment-type-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.transport-shipment-type-picker label > span {
  position: relative;
  min-height: 82px;
  border: 1px solid #d7e0eb;
  border-radius: 13px;
  padding: 13px 42px 13px 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text);
  background: #fbfcfe;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.transport-shipment-type-picker label > span::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 18px;
  height: 18px;
  border: 2px solid #b8c3d1;
  border-radius: 50%;
  background: var(--white);
  transform: translateY(-50%);
  box-shadow: inset 0 0 0 4px var(--white);
  transition: border-color 160ms ease, background 160ms ease;
}

.transport-shipment-type-picker img {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 50px;
  height: 50px;
  object-fit: contain;
  transform: translateY(-50%);
}

.transport-shipment-type-picker b {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 750;
}

.transport-shipment-type-picker small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.transport-shipment-type-picker label:hover > span {
  border-color: rgba(0, 87, 184, .34);
  background: #f8fbff;
}

.transport-shipment-type-picker input:checked + span {
  border-color: var(--cobalt);
  color: #064f9e;
  background: #f2f7ff;
  box-shadow: 0 8px 24px rgba(0, 87, 184, .1);
}

.transport-shipment-type-picker input:checked + span::after {
  border-color: var(--cobalt);
  background: var(--cobalt);
}

.transport-shipment-type-picker input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(0, 87, 184, .18);
}

.transport-shipment-type-picker input:active + span {
  transform: translateY(1px);
}

.transport-form-section {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.transport-form-section:last-child { border-bottom: 0; }

.transport-form-section-head {
  margin-bottom: 17px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
}

.transport-form-section-head.action {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
}

.transport-form-section-head > span {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(0, 87, 184, 0.16);
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cobalt);
  background: #f2f7ff;
  font-size: 10px;
  font-weight: 700;
}

.transport-form-section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 620;
}

.transport-form-section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.transport-form-section-head .secondary-button {
  min-height: 36px;
  font-size: 11px;
}

.transport-form-grid {
  display: grid;
  gap: 13px;
}

.transport-form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.transport-form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.transport-form-grid.dates { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.transport-form-grid .wide { grid-column: span 2; }

.transport-form-grid .field,
.transport-editor-row .field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.transport-form-grid .field > span,
.transport-editor-row .field > span,
.transport-stage-editor-row label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
}

.transport-form-grid input,
.transport-form-grid select,
.transport-form-grid textarea,
.transport-editor-row input,
.transport-editor-row select,
.transport-stage-editor-row input,
.transport-stage-editor-row select {
  width: 100%;
  min-height: 41px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 11px;
  color: var(--text);
  background: var(--white);
  outline: none;
  font: inherit;
  font-size: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.transport-form-grid textarea {
  min-height: 68px;
  padding: 10px 11px;
  resize: vertical;
}

.transport-form-grid input:focus,
.transport-form-grid select:focus,
.transport-form-grid textarea:focus,
.transport-editor-row input:focus,
.transport-editor-row select:focus,
.transport-stage-editor-row input:focus,
.transport-stage-editor-row select:focus {
  border-color: rgba(0, 87, 184, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.08);
}

.transport-switch {
  min-height: 41px;
  align-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.transport-switch input { position: absolute; opacity: 0; }
.transport-switch > span { position: relative; width: 36px; height: 21px; border-radius: 999px; background: #dce2ea; transition: background 160ms ease; }
.transport-switch > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(17, 24, 39, 0.2); transition: transform 160ms ease; }
.transport-switch input:checked + span { background: var(--cobalt); }
.transport-switch input:checked + span::after { transform: translateX(15px); }

.transport-repeat-list {
  display: grid;
  gap: 9px;
}

.transport-create-container-row {
  border: 1px solid #d7e0eb;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 13px;
  background: #fbfcfe;
}

.transport-create-container-row > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.transport-create-container-row > header span {
  display: block;
  color: var(--cobalt);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.transport-create-container-row > header strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
}

.transport-create-container-row > header .doc-action {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: 19px;
}

.transport-create-container-route {
  border-top: 1px solid #e5eaf0;
  padding-top: 13px;
}

.transport-editor-row {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px;
  display: grid;
  gap: 10px;
  align-items: end;
  background: #fbfcfe;
}

.transport-container-editor-row { grid-template-columns: minmax(180px, 1fr) 120px minmax(180px, 1.3fr) 38px; }
.transport-document-editor-row { grid-template-columns: minmax(150px, 0.9fr) minmax(150px, 1fr) 136px minmax(180px, 1.2fr) 38px; }
.transport-editor-row .doc-action { width: 38px; height: 41px; font-size: 20px; }
.transport-form-hint { display: block; margin-top: 9px; color: var(--muted); font-size: 10px; }

.transport-supplier-selector {
  align-content: start;
}

.transport-supplier-create-toggle {
  min-height: 32px;
  width: max-content;
  border: 0;
  padding: 0 2px;
  color: var(--cobalt);
  background: transparent;
  font: inherit;
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
}

.transport-supplier-create-toggle:hover,
.transport-supplier-create-toggle:focus-visible {
  color: #004da3;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.transport-supplier-create-panel {
  grid-column: 1 / -1;
  border: 1px solid rgba(0, 87, 184, .16);
  border-radius: 12px;
  padding: 15px;
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(160px, .75fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  background: #f6f9fd;
}

.transport-supplier-create-panel.hidden {
  display: none;
}

.transport-supplier-create-panel > div:first-child {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
}

.transport-supplier-create-panel > div:first-child span {
  color: var(--cobalt);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.transport-supplier-create-panel > div:first-child strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
}

.transport-supplier-create-panel > .text-button {
  min-height: 41px;
  white-space: nowrap;
}

.transport-directory-source {
  min-height: 72px;
  border: 1px solid #dce4ed;
  border-radius: 10px;
  padding: 11px 12px;
  display: grid;
  gap: 5px;
  align-content: center;
  background: #f8fafc;
}

.transport-directory-source > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
}

.transport-directory-source > strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 620;
}

.transport-directory-source > small,
.transport-form-grid .field > small {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}

.transport-form-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.transport-cargo-lots-editor {
  display: grid;
  gap: 13px;
}

.transport-cargo-lot-editor {
  overflow: hidden;
  border: 1px solid #d7e0eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(22, 49, 82, 0.045);
}

.transport-cargo-lot-editor > header {
  min-height: 54px;
  border-bottom: 1px solid #e1e7ef;
  padding: 10px 13px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #f8fafd;
}

.transport-cargo-lot-editor > header > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.transport-cargo-lot-editor > header span {
  color: var(--cobalt);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.transport-cargo-lot-editor > header input {
  width: min(320px, 62vw);
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  outline: none;
  font: 620 15px/1.25 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.transport-cargo-lot-grid {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.transport-cargo-lot-grid .field,
.transport-cargo-lot-route-grid .field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.transport-cargo-lot-grid .wide {
  grid-column: span 2;
}

.transport-cargo-lot-grid .field > span,
.transport-cargo-lot-route-grid .field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 560;
}

.transport-cargo-lot-grid input,
.transport-cargo-lot-grid textarea,
.transport-cargo-lot-route-grid select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 10px;
  color: var(--text);
  background: #fff;
  outline: none;
  font: inherit;
  font-size: 11px;
}

.transport-cargo-lot-grid textarea {
  min-height: 66px;
  padding-block: 9px;
  resize: vertical;
}

.transport-cargo-lot-containers {
  border-top: 1px solid #e1e7ef;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: minmax(155px, 0.42fr) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.transport-cargo-lot-containers > div:first-child,
.transport-cargo-lot-route-head > div {
  display: grid;
  gap: 3px;
}

.transport-cargo-lot-containers strong,
.transport-cargo-lot-route-head strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 620;
}

.transport-cargo-lot-containers > div:first-child span,
.transport-cargo-lot-route-head span {
  color: var(--muted);
  font-size: 9px;
}

.transport-cargo-lot-container-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.transport-container-choice {
  min-width: 0;
  min-height: 43px;
  border: 1px solid #dce3ec;
  border-radius: 9px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  background: #fbfcfe;
  cursor: pointer;
}

.transport-container-choice:has(input:checked) {
  border-color: rgba(0, 87, 184, 0.34);
  background: #f0f6ff;
}

.transport-container-choice input {
  width: 15px;
  height: 15px;
  accent-color: var(--cobalt);
}

.transport-container-choice span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.transport-container-choice strong,
.transport-container-choice small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.transport-container-choice strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 620;
}

.transport-container-choice small,
.transport-cargo-lot-empty {
  color: var(--muted);
  font-size: 9px;
}

.transport-cargo-lot-route {
  border-top: 1px solid #dce5ef;
  padding: 13px 16px 16px;
  background: #f4f8fc;
}

.transport-cargo-lot-route-head {
  margin-bottom: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.transport-cargo-lot-route-head .text-button {
  min-height: 28px;
  font-size: 10px;
}

.transport-cargo-lot-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

.transport-cargo-lot-waypoints {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
}

.transport-cargo-lot-waypoint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: end;
  gap: 8px;
}

.transport-cargo-lot-waypoint .doc-action {
  width: 38px;
  height: 40px;
  font-size: 18px;
}

.transport-stages-editor {
  border-top: 1px solid var(--border);
  display: grid;
}

.transport-stage-editor-row {
  min-height: 68px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 28px 110px 130px 128px 128px minmax(170px, 1fr);
  gap: 10px;
  align-items: center;
}

.transport-stage-editor-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cobalt);
  background: #edf5ff;
  font-size: 10px;
  font-weight: 700;
}

.transport-stage-editor-row > strong {
  font-size: 12px;
  font-weight: 600;
}

.transport-stage-editor-row label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.transport-stage-editor-row input,
.transport-stage-editor-row select {
  min-height: 37px;
  font-size: 11px;
}

.transport-dialog-actions {
  min-height: 72px;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 9px;
  align-items: center;
  background: rgba(255, 255, 255, 0.97);
}

.transport-edit-form > .transport-dialog-actions {
  grid-template-columns: 1fr auto auto;
}

.transport-dialog-actions .primary-button,
.transport-dialog-actions .secondary-button {
  min-height: 42px;
}

@media (max-width: 1220px) {
  .transport-hero { grid-template-columns: 1fr; }
  .transport-hero-summary { width: 100%; }
  .transport-register-toolbar { align-items: flex-start; flex-direction: column; }
  .transport-register-actions { width: 100%; justify-content: stretch; }
  .transport-search { width: auto; flex: 1; }
  .transport-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .transport-form-grid.four,
  .transport-form-grid.dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transport-supplier-create-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transport-supplier-create-panel > .text-button { width: 100%; }
  .transport-stage-editor-row { grid-template-columns: 28px 100px repeat(3, minmax(112px, 0.55fr)) minmax(150px, 1fr); }
}

@media (max-width: 760px) {
  .transport-hero { padding: 18px; }
  .transport-hero-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transport-hero-summary article:nth-child(2) { border-right: 0; }
  .transport-hero-summary article:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
  .transport-register-actions { align-items: stretch; flex-direction: column; }
  .transport-filters { grid-template-columns: 1fr; }
  .transport-detail-head { flex-direction: column; }
  .transport-detail-actions { width: 100%; }
  .transport-stage-line { grid-template-columns: 1fr; }
  .transport-stage-line::before { top: 24px; bottom: 24px; left: 23px; right: auto; width: 1px; height: auto; }
  .transport-stage { grid-template-columns: 48px minmax(0, 1fr) auto; justify-items: start; gap: 0 12px; text-align: left; }
  .transport-stage-node { grid-row: 1 / 5; }
  .transport-stage > strong { margin-top: 5px; }
  .transport-detail-section { grid-template-columns: 1fr; gap: 14px; }
  .transport-facts,
  .transport-date-list,
  .transport-currency-summary { grid-template-columns: 1fr; }
  .transport-currency-summary article { border-right: 0; border-bottom: 1px solid var(--border); }
  .transport-incomplete-state { grid-template-columns: 1fr; padding: 32px 24px; }
  .edit-dialog.transport-dialog { width: 100vw; border-radius: 0; }
  .transport-form-scroll { padding: 0 16px 20px; }
  .transport-shipment-type-picker > div { grid-template-columns: 1fr; }
  .transport-form-grid.four,
  .transport-form-grid.three,
  .transport-form-grid.dates { grid-template-columns: 1fr; }
  .transport-form-grid .wide { grid-column: auto; }
  .transport-container-editor-row,
  .transport-document-editor-row { grid-template-columns: 1fr; }
  .transport-supplier-create-panel { grid-template-columns: 1fr; }
  .transport-supplier-create-panel > .text-button { width: 100%; }
  .transport-create-container-row { padding: 12px; }
  .transport-stage-editor-row { grid-template-columns: 28px 1fr; padding: 12px 0; }
  .transport-stage-editor-row label { grid-column: 2; }
  .transport-dialog-actions { grid-template-columns: 1fr 1fr; }
  .transport-edit-form > .transport-dialog-actions { grid-template-columns: 1fr 1fr; }
  .transport-dialog-actions > span { display: none; }
}

/* DDS-style shipment register v113 */
.transport-hero {
  min-height: 356px;
  padding: 36px 42px;
  grid-template-columns: minmax(350px, 0.92fr) minmax(0, 2.08fr);
  gap: 0;
  align-items: stretch;
}

.transport-hero-copy {
  min-width: 0;
  padding: 0 50px 0 0;
  display: flex;
  flex-direction: column;
}

.transport-hero-copy-head {
  min-width: 0;
  min-height: 174px;
  padding: 6px 0 24px;
  display: grid;
  align-content: center;
}

.transport-hero-copy-head h2 {
  font-size: 34px;
}

.transport-hero-copy-head > span {
  max-width: 380px;
  font-size: 14px;
}

.transport-hero-total {
  max-width: none;
  min-height: 116px;
  margin-top: 0;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: grid;
  gap: 10px;
  align-content: start;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.transport-hero-total > span,
.transport-hero-total > strong {
  grid-column: 1 / -1;
}

.transport-hero-total > span {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 560;
}

.transport-hero-total > strong {
  color: var(--text);
  font-size: clamp(31px, 2.4vw, 42px);
  line-height: 1;
  font-weight: 650;
  white-space: nowrap;
}

.transport-hero-total > strong.positive { color: #178a4c; }
.transport-hero-total > strong.negative { color: var(--critical); }

.transport-hero-summary {
  min-width: 0;
  min-height: 284px;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: transparent;
  overflow: visible;
}

.transport-hero-summary .transport-hero-summary-row {
  min-width: 0;
  min-height: 284px;
  padding: 0 clamp(20px, 1.8vw, 42px);
  border-left: 1px solid var(--border);
  border-right: 0 !important;
  border-bottom: 0;
  display: block !important;
  container-type: inline-size;
}

.transport-hero-summary-main {
  min-width: 0;
  min-height: 284px;
  display: flex;
  flex-direction: column;
}

.transport-hero-summary-head {
  min-width: 0;
  min-height: 174px;
  padding: 32px 0 28px;
  display: grid;
  grid-template-columns: clamp(44px, 11.5cqw, 56px) minmax(0, 1fr);
  gap: clamp(12px, 3.5cqw, 24px);
  align-content: center;
  align-items: start;
}

.transport-hero-summary-head .transport-summary-icon {
  width: clamp(44px, 11.5cqw, 56px);
  height: clamp(44px, 11.5cqw, 56px);
  grid-row: auto;
  align-self: center;
  display: block;
  object-fit: contain;
  background: transparent;
  -webkit-mask: none;
  mask: none;
}

.transport-hero-summary-head .transport-summary-icon.complex {
  background: transparent;
}

.transport-hero-summary-name strong,
.transport-hero-summary-name small {
  display: block;
}

.transport-hero-summary-name strong {
  font-size: clamp(16px, 4.15cqw, 22px);
  line-height: 1.2;
  font-weight: 640;
  white-space: normal;
}

.transport-hero-summary-name small {
  margin-top: 8px;
  color: var(--muted);
  font-size: clamp(11px, 2.85cqw, 14px);
  line-height: 1.3;
}

.transport-hero-summary-name .transport-hero-status {
  position: relative;
  padding-left: 18px;
  font-variant-numeric: tabular-nums;
}

.transport-hero-summary-name .transport-hero-status::before {
  position: absolute;
  top: 0.38em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #178a4c;
  content: "";
}

.transport-hero-summary-name .transport-hero-status.in-work::before {
  background: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.08);
}

.transport-hero-metrics {
  min-width: 0;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(82px, 0.66fr);
  gap: 0;
  align-items: start;
}

.transport-hero-metric {
  min-width: 0;
  padding: 0 clamp(8px, 2.4cqw, 14px);
  display: grid;
  grid-template-rows: 16px auto;
  align-content: start;
}

.transport-hero-metric small,
.transport-hero-metric strong {
  display: block;
}

.transport-hero-metric small {
  font-size: clamp(10.5px, 2.75cqw, 13px);
  line-height: 16px;
  white-space: nowrap;
}

.transport-hero-metric:first-child {
  padding-left: 0;
}

.transport-hero-metric + .transport-hero-metric {
  border-left: 1px solid var(--border);
}

.transport-hero-metric strong {
  margin-top: 10px;
  font-size: clamp(16px, 4.35cqw, 23px);
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (min-width: 761px) {
  .transport-hero-total > span { white-space: nowrap; }
}

.transport-hero-metric strong.positive { color: #178a4c; }
.transport-hero-metric strong.negative { color: var(--critical); }

@media (min-width: 1481px) {
  .transport-hero-summary .transport-hero-summary-row {
    display: flex !important;
    align-items: stretch;
  }

  .transport-hero-summary-main {
    min-height: 0;
    flex: 1 1 auto;
  }
}

.transport-register-toolbar {
  min-height: 96px;
  padding: 20px 24px;
}

.transport-register-toolbar h2 {
  font-size: 22px;
}

.transport-register-actions {
  width: min(800px, 74%);
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 258px 190px;
  gap: 10px;
}

.transport-search {
  width: 100%;
}

.transport-register-actions > label,
.transport-register-actions .transport-search {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  align-self: center;
}

.transport-inline-filter {
  min-width: 0;
}

.transport-inline-filter > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.transport-inline-filter select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 34px 0 12px;
  color: var(--text);
  background: var(--white);
  font: inherit;
  font-size: 13px;
}

.transport-inline-filter select:focus {
  outline: 3px solid rgba(0, 87, 184, 0.12);
  border-color: rgba(0, 87, 184, 0.55);
}

.transport-lifecycle-switch {
  height: 42px;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  background: #f3f6fa;
}

.transport-lifecycle-switch button {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: #5f6c80;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.transport-lifecycle-switch button:hover {
  color: var(--text);
}

.transport-lifecycle-switch button.active {
  color: var(--cobalt);
  background: var(--white);
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.09);
}

.transport-lifecycle-switch button:focus-visible {
  outline: 3px solid rgba(0, 87, 184, 0.14);
  outline-offset: 1px;
}

.transport-type-nav {
  min-height: 58px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  background: #fbfcfe;
}

.transport-type-nav [data-transport-type] {
  position: relative;
  min-width: 182px;
  border: 0;
  border-right: 1px solid var(--border);
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #43516a;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 620;
  cursor: pointer;
}

.transport-type-nav [data-transport-type]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: transparent;
}

.transport-type-nav [data-transport-type]:hover {
  color: var(--text);
  background: rgba(0, 87, 184, 0.035);
}

.transport-type-nav [data-transport-type].active {
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.045);
}

.transport-type-nav [data-transport-type].active::after {
  background: var(--cobalt);
}

.transport-type-nav .nav-icon,
.transport-type-nav .nav-icon svg,
.transport-tab-trash-icon,
.transport-tab-trash-icon svg {
  width: 16px;
  height: 16px;
}

.transport-tab-trash-icon {
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6m4-6v6M9 7l1-3h4l1 3m-9 0 1 14h10l1-14'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6m4-6v6M9 7l1-3h4l1 3m-9 0 1 14h10l1-14'/%3E%3C/svg%3E") center / contain no-repeat;
}

.transport-create-button {
  min-height: 40px;
  margin: 8px 12px 8px auto;
  align-self: center;
  white-space: nowrap;
}

.transport-register-table {
  border-top: 0;
  overflow-x: hidden;
}

.transport-register-head,
.transport-register-row {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  grid-template-columns: 54px 112px minmax(190px, 1fr) minmax(110px, 150px) minmax(300px, 1fr);
  gap: 12px;
}

.transport-register-head {
  min-height: 46px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  font-size: 12px;
  font-weight: 560;
}

.transport-register-head > span:nth-child(4) {
  justify-self: end;
  padding-right: 24px;
}

.transport-register-row {
  min-height: 104px;
  padding: 14px 24px;
  border-top: 0;
  border-bottom: 1px solid var(--border);
}

.transport-register-row:first-of-type {
  border-top: 0;
}

.transport-register-row:hover,
.transport-register-row.selected {
  background: rgba(0, 87, 184, 0.032);
}

.transport-register-row.selected {
  box-shadow: inset 3px 0 0 var(--cobalt);
}

.transport-type-cell {
  align-self: stretch;
  display: grid;
  place-items: center;
}

.transport-type-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: block;
  object-fit: contain;
  background: transparent;
}

.transport-type-icon.complex {
  background: transparent;
}

.transport-type-icon.completed {
  filter: hue-rotate(285deg) saturate(.9);
}

.transport-type-icon.complex.completed {
  filter: brightness(2.3) hue-rotate(285deg) saturate(.86);
}

.transport-type-icon:not(img)::before {
  content: "";
  width: 25px;
  height: 25px;
  display: block;
  background: var(--cobalt);
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.transport-type-icon.complex:not(img)::before {
  background-color: #334e77;
}

.transport-number-cell strong {
  font-size: 14px;
  font-weight: 650;
}

.transport-description-cell strong {
  font-size: 14px;
  font-weight: 620;
}

.transport-description-cell small {
  margin-top: 6px;
  font-size: 12px;
}

.transport-description-cell .transport-route-line {
  color: #596579;
}

.transport-description-cell .transport-route-line b {
  color: #43516a;
  font-weight: 620;
}

.transport-row-margin-cell {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 9px;
  padding-right: 24px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.transport-row-margin-cell strong {
  overflow: visible;
  color: #178a4c;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 640;
  text-overflow: clip;
}

.transport-row-margin-cell small {
  margin-top: 0;
  overflow: visible;
  color: #748096;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: clip;
}

.transport-row-margin-cell > span {
  color: #8e99aa;
  font-size: 13px;
}

.transport-row-margin-cell.negative strong,
.transport-row-margin-cell.negative small { color: var(--critical); }

.transport-row-margin-cell.neutral strong { color: #596579; }

.transport-registry-state-cell {
  min-height: 62px;
  border-left: 1px solid #cbd3de;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}

.transport-registry-status-line {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.transport-row-delete,
.transport-trash-action {
  position: relative;
  z-index: 3;
  pointer-events: auto;
  border: 0;
  color: #9b4a43;
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.transport-row-delete {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 9px;
}

.transport-row-delete svg,
.transport-trash-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.transport-row-delete:hover,
.transport-row-delete:focus-visible,
.transport-trash-action.permanent:hover,
.transport-trash-action.permanent:focus-visible {
  color: #b42318;
  background: #fff2f0;
}

.transport-row-delete:focus-visible,
.transport-trash-action:focus-visible {
  outline: 3px solid rgba(0, 87, 184, 0.16);
  outline-offset: 1px;
}

.transport-row-delete:disabled,
.transport-trash-action:disabled {
  opacity: .45;
  cursor: wait;
}

.transport-register-row.deleted {
  background: #fbfcfe;
}

.transport-register-row.deleted .transport-type-icon,
.transport-register-row.deleted .transport-number-cell,
.transport-register-row.deleted .transport-description-cell,
.transport-register-row.deleted .transport-row-margin-cell {
  opacity: .66;
}

.transport-registry-state-cell.deleted {
  gap: 5px;
}

.transport-deleted-meta {
  color: #667085 !important;
  font-size: 10px !important;
}

.transport-trash-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  pointer-events: auto;
}

.transport-trash-action {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 7px;
  padding: 0 7px;
  color: #455166;
  font-size: 10px;
  font-weight: 620;
  white-space: nowrap;
}

.transport-trash-action.restore:hover,
.transport-trash-action.restore:focus-visible {
  color: var(--cobalt);
  background: rgba(0, 87, 184, .07);
}

.transport-trash-action.permanent {
  color: #9b4a43;
}

.transport-registry-state-cell .transport-status {
  min-height: 26px;
  border: 0;
  border-radius: 0;
  padding: 0;
  gap: 9px;
  background: transparent;
  font-size: 14px;
  font-weight: 540;
}

.transport-registry-state-cell .transport-status i {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 0;
  background: currentColor;
  box-shadow: none;
  -webkit-mask: var(--transport-status-icon) center / contain no-repeat;
  mask: var(--transport-status-icon) center / contain no-repeat;
}

.transport-registry-state-cell .transport-status.success {
  --transport-status-icon: url('/assets/icons/phosphor-check-circle-regular.svg?v=135');
  color: #16833d;
}

.transport-registry-state-cell .transport-status.warning,
.transport-registry-state-cell .transport-status.neutral {
  --transport-status-icon: url('/assets/icons/phosphor-clock-regular.svg?v=135');
  color: #a76500;
}

.transport-registry-state-cell .transport-status.danger {
  --transport-status-icon: url('/assets/icons/phosphor-x-circle-regular.svg?v=135');
  color: #c33229;
}

.transport-registry-closing-documents {
  display: grid;
  gap: 3px;
}

.transport-register-row .transport-registry-closing-documents small {
  margin: 0;
  overflow: visible;
  color: #667085;
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: clip;
}

.transport-register-row .transport-registry-closing-documents small b {
  color: #455166;
  font-weight: 650;
}

.transport-register-row .transport-registry-close-date {
  margin: -2px 0 0;
  color: #667085;
  font-size: 10px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.transport-register-row .transport-registry-close-date b {
  color: #455166;
  font-weight: 650;
}

.transport-register-row .transport-registry-closing-documents small.ready {
  color: #16833d;
}

.transport-register-row .transport-registry-closing-documents small.missing {
  color: #a34538;
}

@media (max-width: 1220px) {
  .transport-type-nav {
    overflow-x: hidden;
  }

  .transport-type-nav [data-transport-type] {
    min-width: 0;
    flex: 1 1 0;
    padding-inline: 12px;
  }

  .transport-register-head,
  .transport-register-row {
    grid-template-columns: 46px 84px minmax(180px, 1fr) 112px 164px;
    gap: 8px;
    padding-inline: 14px;
  }

  .transport-type-icon {
    width: 40px;
    height: 40px;
  }

  .transport-register-head > span:nth-child(4),
  .transport-row-margin-cell {
    padding-right: 8px;
  }

  .transport-registry-state-cell {
    padding-left: 14px;
  }

  .transport-registry-state-cell .transport-status {
    font-size: 12px;
  }
}

@media (max-width: 760px) {
  .transport-type-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .transport-type-nav [data-transport-type] {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border-bottom: 1px solid var(--border);
    padding-inline: 10px;
  }

  .transport-create-button {
    width: auto;
    min-width: 0;
    margin: 7px;
    grid-column: 1 / -1;
  }

  .transport-register-head {
    display: none;
  }

  .transport-register-row {
    min-height: 0;
    padding: 14px 16px;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-areas:
      "type number"
      "type description"
      "margin margin"
      "state state";
    gap: 8px 12px;
  }

  .transport-type-cell {
    grid-area: type;
    align-self: start;
  }

  .transport-number-cell {
    grid-area: number;
  }

  .transport-description-cell {
    grid-area: description;
  }

  .transport-row-margin-cell {
    grid-area: margin;
    justify-content: flex-start;
    padding: 8px 0 0 56px;
  }

  .transport-registry-state-cell {
    grid-area: state;
    min-height: 0;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    border-left: 0;
    padding: 11px 0 0 56px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
  }

  .transport-registry-status-line {
    max-width: 320px;
  }

  .transport-trash-actions {
    flex-wrap: wrap;
  }

  .transport-trash-action {
    min-height: 44px;
    padding-inline: 10px;
  }

  .transport-registry-state-cell .transport-status {
    flex: 0 0 auto;
  }
}

/* Planned shipment map v105 */
.transport-journey-panel {
  overflow: hidden;
}

.transport-journey-panel .transport-journey-caption {
  margin-top: 18px;
}

.transport-route-map-shell {
  position: relative;
  height: 430px;
  margin: 14px -26px 0;
  border-top: 1px solid #d8e1ec;
  border-bottom: 1px solid #d8e1ec;
  overflow: hidden;
  background: #edf3f9;
}

.transport-route-map {
  width: 100%;
  height: 100%;
  background: #edf3f9;
}

.transport-route-map .maplibregl-canvas {
  outline: none;
}

.transport-route-map .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(90, 108, 132, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 7px 18px rgba(26, 48, 78, 0.08);
}

.transport-route-map .maplibregl-ctrl-group button {
  width: 31px;
  height: 31px;
}

.transport-route-map .maplibregl-ctrl-attrib {
  border-radius: 5px 0 0;
  color: #718096;
  background: rgba(255, 255, 255, 0.82);
  font-size: 8px;
}

.transport-route-map .maplibregl-ctrl-attrib a {
  color: #4d6687;
}

.transport-route-map .leaflet-tile-pane {
  filter: grayscale(0.58) saturate(0.62) contrast(0.93) brightness(1.08);
}

.transport-route-map .leaflet-control-zoom {
  border: 1px solid rgba(90, 108, 132, 0.2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 7px 18px rgba(26, 48, 78, 0.08);
}

.transport-route-map .leaflet-control-zoom a {
  width: 30px;
  height: 30px;
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  font: 500 18px/30px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.transport-route-map .leaflet-control-attribution {
  padding: 2px 5px;
  color: #718096;
  background: rgba(255, 255, 255, 0.8);
  font-size: 8px;
}

.transport-route-map .leaflet-control-attribution a {
  color: #4d6687;
}

.transport-route-map-note {
  position: absolute;
  z-index: 500;
  top: 14px;
  right: 14px;
  min-width: 178px;
  border: 1px solid rgba(93, 116, 146, 0.18);
  border-radius: 11px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 9px 24px rgba(24, 49, 82, 0.08);
  pointer-events: none;
}

.transport-route-map-note strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 630;
}

.transport-route-map-note span {
  color: var(--muted);
  font-size: 9px;
}

.transport-route-map-note.attention {
  border-color: rgba(197, 128, 0, 0.22);
  background: rgba(255, 249, 232, 0.95);
}

.transport-route-map-legend {
  position: absolute;
  z-index: 4;
  right: 14px;
  bottom: 22px;
  min-height: 34px;
  border: 1px solid rgba(93, 116, 146, 0.16);
  border-radius: 10px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #66758a;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 7px 20px rgba(24, 49, 82, 0.07);
  font-size: 9px;
  pointer-events: none;
}

.transport-route-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.transport-route-map-legend i {
  width: 22px;
  height: 0;
  border-top: 3px solid #153d73;
  border-radius: 999px;
}

.transport-route-map-legend i.sea {
  border-top-color: #0867d8;
  border-top-style: dashed;
}

.transport-map-marker {
  position: relative;
  width: 32px;
  height: 32px;
  pointer-events: none;
}

.transport-map-marker-pin {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0867d8;
  box-shadow: 0 6px 18px rgba(19, 58, 108, 0.25);
}

.transport-map-marker-pin img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.transport-map-marker-label {
  position: absolute;
  bottom: 40px;
  left: 50%;
  min-width: 112px;
  border: 1px solid rgba(72, 96, 126, 0.16);
  border-radius: 9px;
  padding: 7px 9px;
  display: grid;
  gap: 2px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 22px rgba(25, 48, 78, 0.11);
  text-align: left;
  white-space: nowrap;
}

.transport-map-marker-label strong {
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 640;
}

.transport-map-marker-label small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.2;
}

.transport-map-unavailable {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #718096;
  font-size: 12px;
}

.transport-map-label {
  border: 1px solid rgba(72, 96, 126, 0.18);
  border-radius: 9px;
  padding: 7px 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(25, 48, 78, 0.12);
}

.transport-map-label::before {
  border-top-color: rgba(255, 255, 255, 0.96);
}

.transport-map-label strong,
.transport-map-label span {
  display: block;
  white-space: nowrap;
}

.transport-map-label strong {
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 640;
}

.transport-map-label span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.2;
}

.transport-stage-journey {
  margin: 0 -26px;
  padding: 22px 26px 20px;
  background: rgba(255, 255, 255, 0.76);
}

.transport-current-stage-card {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .transport-route-map-shell {
    height: 360px;
    margin-inline: -16px;
  }

  .transport-route-map-note {
    top: 10px;
    right: 10px;
    min-width: 150px;
  }

  .transport-stage-journey {
    margin-inline: -16px;
    padding-inline: 16px;
  }
}

/* Shipment focused document workflow v152 */
.shipment-information-layout {
  grid-template-columns: minmax(0, 1fr);
}

/* Shipment information ledger v167 */
.shipment-ledger {
  border-color: #d9e2ec;
  box-shadow: 0 14px 38px rgba(31, 52, 79, .045);
}

.shipment-ledger-band {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(236px, .72fr) minmax(0, 2.45fr);
  background: #fff;
}

.shipment-ledger-band + .shipment-ledger-band {
  border-top: 1px solid #dce3eb;
}

.shipment-ledger-identity {
  min-width: 0;
  border-right: 1px solid #dce3eb;
  padding: 24px 22px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-content: center;
  align-items: start;
  gap: 16px;
  background: #fff;
}

.shipment-ledger-icon {
  width: 44px;
  height: 44px;
  display: block;
  color: var(--cobalt);
  background: currentColor;
  -webkit-mask: var(--ledger-icon) center / contain no-repeat;
  mask: var(--ledger-icon) center / contain no-repeat;
}

.shipment-ledger-identity > div {
  min-width: 0;
}

.shipment-ledger-identity span {
  display: block;
  margin: 1px 0 7px;
  color: #526078;
  font-size: 9px;
  line-height: 1.25;
  font-weight: 720;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.shipment-ledger-identity h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 660;
}

.shipment-ledger-edit {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 18px;
  min-height: 30px;
  border: 1px solid var(--cobalt);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-active));
  box-shadow: 0 5px 14px rgba(0, 87, 184, .16);
  font: 620 10px/1 inherit;
  cursor: pointer;
}

.shipment-ledger-edit:hover {
  border-color: var(--cobalt-active);
  filter: brightness(.97);
}

.shipment-ledger-edit:focus-visible,
.shipment-ledger-status:focus-visible,
.shipment-ledger-file:focus-visible {
  outline: 3px solid rgba(8, 103, 216, .18);
  outline-offset: 2px;
}

.shipment-ledger-value,
.shipment-ledger-fact {
  min-width: 0;
}

.shipment-ledger-value dt,
.shipment-ledger-fact dt {
  color: #78859a;
  font-size: 9.5px;
  line-height: 1.35;
  font-weight: 570;
}

.shipment-ledger-value dd,
.shipment-ledger-fact dd {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 620;
  overflow-wrap: anywhere;
}

.shipment-ledger-value dd.is-empty,
.shipment-ledger-fact dd.is-empty {
  color: #9aa4b2;
  font-weight: 520;
}

.shipment-ledger-value.actual dt,
.shipment-ledger-value.actual dd {
  color: var(--cobalt);
}

.shipment-ledger-value.warning dd {
  color: #9a6700;
}

.shipment-ledger-value.success dd {
  color: #168043;
}

.shipment-ledger-cargo-content {
  min-width: 0;
  padding: 52px 22px 20px;
  display: grid;
  grid-template-columns: minmax(220px, 1.65fr) repeat(4, minmax(105px, 1fr));
  grid-template-rows: auto auto;
  align-items: stretch;
}

.shipment-ledger-cargo {
  position: relative;
}

.shipment-ledger-cargo-content > .shipment-ledger-value {
  border-left: 1px solid #dce3eb;
  padding: 2px 18px 13px;
}

.shipment-ledger-cargo-content > .shipment-ledger-value.cargo {
  grid-row: 1 / span 2;
  border-left: 0;
  padding-left: 0;
}

.shipment-ledger-cargo-content > .shipment-ledger-value.ready-date {
  grid-column: 2 / -1;
  border-top: 1px solid #dce3eb;
  padding-top: 14px;
  padding-bottom: 0;
}

.shipment-ledger-tnved .shipment-tnved-list,
.shipment-ledger-containers .shipment-container-manifest {
  border: 0;
  background: #fff;
}

.shipment-ledger-tnved .shipment-tnved-row {
  grid-template-columns: minmax(148px, .32fr) minmax(0, 1.68fr);
}

.shipment-ledger-tnved .shipment-tnved-row > div {
  padding: 20px 22px;
}

.shipment-ledger-tnved .shipment-tnved-row > div:first-child {
  border-right: 1px solid #dce3eb;
}

.shipment-ledger-tnved .shipment-tnved-row + .shipment-tnved-row {
  border-top-color: #dce3eb;
}

.shipment-ledger-tnved .shipment-tnved-row dt {
  font-size: 9.5px;
}

.shipment-ledger-tnved .shipment-tnved-row dd {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.48;
}

.shipment-ledger-tnved .shipment-tnved-row > div:first-child dd {
  font-size: 13px;
  font-weight: 650;
}

.shipment-ledger-containers .shipment-container-manifest > header,
.shipment-ledger-containers .shipment-container-manifest-row {
  grid-template-columns: minmax(120px, .36fr) minmax(155px, .55fr) minmax(110px, .38fr) minmax(280px, 1.7fr);
}

.shipment-ledger-containers .shipment-container-manifest > header {
  min-height: 42px;
  border-bottom: 1px solid #dce3eb;
  background: #fff;
}

.shipment-ledger-containers .shipment-container-manifest-row {
  min-height: 58px;
  border-top: 0;
}

.shipment-ledger-containers .shipment-container-manifest-row + .shipment-container-manifest-row {
  border-top: 1px solid #e5eaf0;
}

.shipment-ledger-containers .shipment-container-manifest > header span,
.shipment-ledger-containers .shipment-container-manifest-row > div,
.shipment-ledger-containers .shipment-container-manifest-row > strong,
.shipment-ledger-containers .shipment-container-manifest-row > b,
.shipment-ledger-containers .shipment-container-manifest-row > span {
  padding-inline: 18px;
}

.shipment-ledger-parties-content {
  min-width: 0;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) minmax(170px, 1fr) minmax(190px, 1fr) minmax(210px, 1.15fr);
}

.shipment-ledger-parties-content > .shipment-ledger-value {
  border-left: 1px solid #dce3eb;
  padding: 2px 18px;
}

.shipment-ledger-parties-content > .shipment-ledger-value:first-child {
  border-left: 0;
  padding-left: 0;
}

.shipment-information-ledger .shipment-ledger-identity span {
  font-size: 10px;
}

.shipment-information-ledger .shipment-ledger-identity h3 {
  font-size: 18px;
}

.shipment-information-ledger .shipment-ledger-value dt {
  font-size: 10.5px;
}

.shipment-information-ledger .shipment-ledger-value dd {
  font-size: 13px;
}

.shipment-information-ledger .shipment-ledger-tnved .shipment-tnved-row dt {
  font-size: 10.5px;
}

.shipment-information-ledger .shipment-ledger-tnved .shipment-tnved-row dd {
  font-size: 12px;
}

.shipment-information-ledger .shipment-ledger-tnved .shipment-tnved-row > div:first-child dd {
  font-size: 14px;
}

.shipment-information-ledger .shipment-container-manifest > header {
  font-size: 11px;
}

.shipment-information-ledger .shipment-container-manifest-row > strong,
.shipment-information-ledger .shipment-container-manifest-row > b,
.shipment-information-ledger .shipment-container-manifest-row em {
  font-size: 13.5px;
}

.shipment-information-ledger .shipment-container-sequence > span {
  font-size: 11px;
}

.shipment-documents-ledger .shipment-ledger-band {
  grid-template-columns: minmax(250px, .8fr) minmax(460px, 1.55fr) minmax(240px, .72fr);
}

.shipment-document-ledger-band .shipment-ledger-identity {
  min-height: 184px;
}

.shipment-documents-ledger .shipment-ledger-identity span {
  font-size: 10px;
}

.shipment-documents-ledger .shipment-ledger-identity h3 {
  font-size: 18px;
}

.shipment-document-ledger-band {
  position: relative;
}

.shipment-ledger-status {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 20px;
  width: fit-content;
  min-height: 34px;
  border: 1px solid #d8dee7;
  border-radius: 999px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #667085;
  background: #f3f5f7;
  box-shadow: 0 2px 7px rgba(31, 52, 79, .045);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.shipment-ledger-status i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(119, 131, 151, .09);
}

.shipment-ledger-status b {
  font-weight: 620;
}

.shipment-ledger-status.complete {
  color: #169947;
  border-color: #bfe7cb;
  background: #eef9f2;
  box-shadow: 0 2px 8px rgba(22, 153, 71, .065);
}

.shipment-ledger-status.complete i {
  box-shadow: 0 0 0 5px rgba(22, 153, 71, .1);
}

.shipment-ledger-status.warning {
  color: #b77908;
  border-color: #efd69d;
  background: #fff8e8;
  box-shadow: 0 2px 8px rgba(183, 121, 8, .07);
}

.shipment-ledger-status.warning i {
  box-shadow: 0 0 0 5px rgba(183, 121, 8, .1);
}

.shipment-ledger-status:hover {
  border-color: #aeb8c5;
  background: #eceff3;
}

.shipment-ledger-status.complete:hover {
  border-color: #99d7ac;
  background: #e6f6ec;
}

.shipment-ledger-status.warning:hover {
  border-color: #dfbd70;
  background: #fff3d5;
}

.shipment-document-ledger-band.is-warning {
  background: linear-gradient(90deg, rgba(255, 248, 232, .52), rgba(255, 255, 255, 0) 38%);
}

.shipment-bill-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.shipment-bill-file-card {
  min-width: 0;
  border: 1px solid #dbe3ed;
  border-radius: 14px;
  padding: 14px;
  background: #fbfcfe;
}

.shipment-bill-file-card > header {
  min-height: 48px;
  margin-bottom: 11px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.shipment-bill-file-card > header > span {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #c58a16;
  font-size: 11px;
  font-weight: 720;
}

.shipment-bill-file-card.release > header > span {
  background: #169947;
}

.shipment-bill-file-card > header strong,
.shipment-bill-file-card > header small {
  display: block;
}

.shipment-bill-file-card > header strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 680;
}

.shipment-bill-file-card > header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.shipment-bill-file-card .shipment-file-drop {
  min-height: 94px;
}

.shipment-bill-file-card .shipment-existing-file {
  margin-top: 10px;
}

.shipment-bill-file-card .shipment-upload-status {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .shipment-bill-file-grid {
    grid-template-columns: 1fr;
  }
}

.shipment-ledger-status:not(button) {
  cursor: default;
}

.shipment-documents-ledger .shipment-etrn-ledger-band {
  grid-template-columns: minmax(250px, .8fr) minmax(0, 2.27fr);
}

.shipment-etrn-workflow {
  min-width: 0;
  padding: 58px 28px 22px;
  display: grid;
  align-content: center;
  gap: 15px;
}

.shipment-etrn-progress {
  position: relative;
  z-index: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
}

.shipment-etrn-progress::before {
  position: absolute;
  z-index: -1;
  top: 17px;
  right: 16.667%;
  left: 16.667%;
  height: 2px;
  background: #dce3eb;
  content: "";
}

.shipment-etrn-progress li {
  min-width: 0;
  padding: 0 10px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 9px;
  color: #8d98a8;
  text-align: center;
}

.shipment-etrn-progress li b {
  width: 34px;
  height: 34px;
  border: 1px solid #cfd7e2;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #7b8798;
  background: #fff;
  box-shadow: 0 0 0 5px #fff;
  font-size: 11px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}

.shipment-etrn-progress li span {
  max-width: 210px;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 590;
  overflow-wrap: anywhere;
}

.shipment-etrn-progress li.done,
.shipment-etrn-progress li.current {
  color: #184d86;
}

.shipment-etrn-progress li.done b {
  border-color: var(--cobalt);
  color: #fff;
  background: var(--cobalt);
}

.shipment-etrn-progress li.current b {
  border: 2px solid var(--cobalt);
  color: var(--cobalt);
  box-shadow: 0 0 0 5px #fff, 0 0 0 8px rgba(8, 103, 216, .11);
}

.shipment-etrn-audit {
  color: #7c8899;
  font-size: 9.5px;
  line-height: 1.35;
  text-align: center;
}

.shipment-ledger-facts {
  min-width: 0;
  border-right: 1px solid #dce3eb;
  padding: 18px 22px;
  display: grid;
  align-content: center;
}

.shipment-ledger-fact {
  min-height: 32px;
  padding: 9px 0;
  display: grid;
  grid-template-columns: minmax(160px, .88fr) minmax(0, 1.12fr);
  align-items: start;
  gap: 14px;
}

.shipment-ledger-fact + .shipment-ledger-fact {
  border-top: 1px solid #e4e9ef;
}

.shipment-ledger-fact dd {
  margin: 0;
}

.shipment-documents-ledger .shipment-ledger-fact dt {
  font-size: 10.5px;
}

.shipment-documents-ledger .shipment-ledger-fact dd {
  font-size: 13px;
}

.shipment-ledger-files {
  min-width: 0;
  padding: 56px 18px 18px;
  display: grid;
  align-content: center;
}

.shipment-ledger-file {
  min-width: 0;
  min-height: 52px;
  border-bottom: 1px solid #e4e9ef;
  padding: 10px 0;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.shipment-ledger-file:last-child {
  border-bottom: 0;
}

.shipment-ledger-file > i {
  width: 27px;
  height: 31px;
  display: block;
  background: url("/assets/icons/doc-pdf-colored.svg") center / contain no-repeat;
}

.shipment-ledger-file span {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.shipment-ledger-file b {
  min-width: 0;
  color: var(--cobalt);
  font-size: 11.5px;
  line-height: 1.35;
  font-weight: 630;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-ledger-file small {
  color: #647087;
  font-size: 10.5px;
  white-space: nowrap;
}

.shipment-ledger-file-empty,
.shipment-pickup-ledger-empty {
  color: #98a2b3;
  font-size: 11px;
}

.shipment-pickup-ledger-list {
  min-width: 0;
  border-right: 1px solid #dce3eb;
  padding: 56px 22px 18px;
  display: grid;
  align-content: center;
}

.shipment-pickup-ledger-row {
  min-width: 0;
  min-height: 68px;
  display: flex;
  align-items: stretch;
}

.shipment-pickup-ledger-row + .shipment-pickup-ledger-row {
  border-top: 1px solid #dce3eb;
}

.shipment-pickup-ledger-row .shipment-ledger-fact {
  width: 100%;
  min-height: 0;
  padding: 9px 0;
  display: grid;
  grid-template-columns: minmax(160px, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 14px;
  border-top: 0;
}

.shipment-pickup-ledger-row .shipment-ledger-fact dd {
  margin: 0;
}

.shipment-pickup-ledger-files .shipment-ledger-file {
  min-height: 68px;
}

.shipment-pickup-ledger-empty {
  min-height: 92px;
  padding: 24px;
  display: grid;
  align-content: center;
}

@media (max-width: 1320px) {
  .shipment-ledger-cargo-content {
    grid-template-columns: minmax(190px, 1.4fr) repeat(4, minmax(90px, 1fr));
    padding-inline: 18px;
  }

  .shipment-ledger-cargo-content > .shipment-ledger-value {
    padding-inline: 13px;
  }

  .shipment-ledger-parties-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 0;
  }

  .shipment-ledger-parties-content > .shipment-ledger-value:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .shipment-documents-ledger .shipment-ledger-band {
    grid-template-columns: 230px minmax(0, 1fr) 250px;
  }

}

@media (max-width: 1050px) {
  .shipment-ledger-band,
  .shipment-documents-ledger .shipment-ledger-band,
  .shipment-pickup-ledger-band {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .shipment-ledger-identity {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid #dce3eb;
    padding: 18px 20px;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
  }

  .shipment-ledger-icon {
    width: 36px;
    height: 36px;
  }

  .shipment-ledger-identity h3 {
    font-size: 16px;
  }

  .shipment-ledger-cargo > .shipment-ledger-edit {
    top: 14px;
    right: 20px;
  }

  .shipment-ledger-cargo .shipment-ledger-identity {
    padding-right: 170px;
  }

  .shipment-ledger-cargo-content {
    padding-top: 20px;
  }

  .shipment-document-ledger-band .shipment-ledger-identity {
    padding-right: 190px;
  }

  .shipment-document-ledger-band > .shipment-ledger-status {
    top: 14px;
    right: 20px;
  }

  .shipment-document-ledger-band .shipment-ledger-files {
    padding-top: 18px;
  }

  .shipment-pickup-ledger-list {
    padding-top: 10px;
    border-right: 0;
    border-bottom: 1px solid #dce3eb;
  }

  .shipment-ledger-facts {
    border-right: 0;
    border-bottom: 1px solid #dce3eb;
  }

  .shipment-etrn-workflow {
    padding-top: 58px;
  }
}

@media (max-width: 760px) {
  .shipment-etrn-ledger-band .shipment-ledger-identity {
    padding-right: 20px;
  }

  .shipment-etrn-ledger-band > .shipment-ledger-status {
    position: static;
    width: fit-content;
    max-width: calc(100% - 32px);
    min-height: 36px;
    margin: 14px 16px 0;
    white-space: normal;
  }

  .shipment-etrn-workflow {
    padding: 18px 16px 20px;
  }

  .shipment-etrn-progress {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .shipment-etrn-progress::before {
    top: 17px;
    bottom: 29px;
    left: 17px;
    width: 2px;
    height: auto;
  }

  .shipment-etrn-progress li {
    min-height: 58px;
    padding: 0;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    justify-items: start;
    gap: 13px;
    text-align: left;
  }

  .shipment-etrn-progress li span {
    max-width: none;
    padding-top: 9px;
  }

  .shipment-etrn-audit {
    text-align: left;
  }

  .shipment-ledger-cargo-content,
  .shipment-ledger-parties-content {
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .shipment-ledger-cargo-content > .shipment-ledger-value,
  .shipment-ledger-cargo-content > .shipment-ledger-value.cargo,
  .shipment-ledger-cargo-content > .shipment-ledger-value.ready-date,
  .shipment-ledger-parties-content > .shipment-ledger-value,
  .shipment-ledger-parties-content > .shipment-ledger-value:first-child,
  .shipment-ledger-parties-content > .shipment-ledger-value:nth-child(3) {
    grid-column: auto;
    grid-row: auto;
    border-top: 1px solid #e4e9ef;
    border-left: 0;
    padding: 14px 16px;
  }

  .shipment-ledger-cargo-content > .shipment-ledger-value:first-child,
  .shipment-ledger-parties-content > .shipment-ledger-value:first-child {
    border-top: 0;
  }

  .shipment-ledger-tnved .shipment-tnved-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .shipment-ledger-tnved .shipment-tnved-row > div {
    padding: 14px 16px;
  }

  .shipment-ledger-tnved .shipment-tnved-row > div:first-child {
    border-right: 0;
  }

  .shipment-ledger-containers .shipment-container-manifest-row {
    grid-template-columns: 76px minmax(0, 1fr) auto;
  }

  .shipment-ledger-facts,
  .shipment-ledger-files {
    padding: 10px 16px;
  }

  .shipment-ledger-fact {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .shipment-pickup-ledger-list {
    padding: 0 16px;
  }

  .shipment-pickup-ledger-row {
    padding: 14px 0;
  }

  .shipment-pickup-ledger-row .shipment-ledger-fact {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .shipment-ledger-file span {
    gap: 8px;
  }

  .shipment-ledger-file b {
    white-space: normal;
  }
}

.pantera-sync-banner {
  position: fixed;
  z-index: 10000;
  top: 14px;
  right: 18px;
  left: max(274px, calc(50% - 420px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 12px 14px 12px 18px;
  border: 1px solid rgba(0, 87, 184, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 54px rgba(17, 24, 39, 0.16);
  backdrop-filter: blur(18px);
}

.pantera-sync-banner.hidden,
.pantera-sync-toast.hidden {
  display: none;
}

.pantera-sync-banner > div:first-child {
  display: grid;
  gap: 3px;
}

.pantera-sync-banner strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.pantera-sync-banner span {
  color: var(--muted);
  font-size: 12px;
}

.pantera-sync-banner.blocked {
  border-color: rgba(245, 158, 11, 0.34);
}

.pantera-sync-banner.in-dialog {
  top: 18px;
  right: 18px;
  left: auto;
  width: min(470px, calc(100vw - 36px));
}

.pantera-sync-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.pantera-sync-toast {
  position: fixed;
  z-index: 10001;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 15px;
  border: 1px solid rgba(0, 87, 184, 0.18);
  border-radius: 11px;
  color: #283142;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 42px rgba(17, 24, 39, 0.14);
  font-size: 13px;
  font-weight: 570;
}

.pantera-sync-toast.warning,
.pantera-sync-toast.offline {
  border-color: rgba(245, 158, 11, 0.32);
}

.pantera-sync-toast.error {
  border-color: rgba(220, 38, 38, 0.28);
}

@media (max-width: 760px) {
  .pantera-sync-banner {
    top: 10px;
    right: 10px;
    left: 10px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .pantera-sync-actions,
  .pantera-sync-actions button {
    width: 100%;
  }
}

.shipment-field.actual {
  background: rgba(8, 103, 216, .035);
}

.shipment-field.actual dt {
  color: var(--cobalt);
}

.shipment-field.actual dd {
  color: #075aae;
}

.shipment-operational-card .shipment-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shipment-operational-card .shipment-field:nth-child(2n) {
  border-right: 0;
}

.shipment-upload-status {
  border: 1px solid #dce4ee;
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 9px;
  background: #f9fbfd;
}

.shipment-upload-status > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shipment-upload-status span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.shipment-upload-status span > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #98a2b3;
}

.shipment-upload-status b {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 650;
}

.shipment-upload-status small {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.shipment-upload-status.preparing span > i,
.shipment-upload-status.uploading span > i {
  background: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(8, 103, 216, .1);
}

.shipment-upload-status.ready {
  border-color: rgba(22, 163, 74, .25);
  background: #f3fbf6;
}

.shipment-upload-status.ready span > i,
.shipment-upload-status.existing span > i {
  background: #16a34a;
}

.shipment-upload-status.error {
  border-color: rgba(198, 54, 54, .24);
  background: #fff7f7;
}

.shipment-upload-status.error span > i {
  background: #c63636;
}

.shipment-upload-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.shipment-upload-progress > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cobalt);
  transition: width .18s ease;
}

.shipment-upload-status.ready .shipment-upload-progress > i,
.shipment-upload-status.existing .shipment-upload-progress > i {
  background: #16a34a;
}

button.shipment-workflow-index {
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

button.shipment-workflow-index:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(8, 103, 216, .14);
}

button.shipment-workflow-index:focus-visible {
  outline: 3px solid rgba(8, 103, 216, .2);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .shipment-upload-status > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .shipment-upload-status small {
    text-align: left;
  }
}

/* Shipment workflow interaction v151 */
.shipment-stage-rail-item > button,
.shipment-stage-rail-item > i {
  z-index: 1;
  width: 29px;
  height: 29px;
  border: 1px solid #d4dce7;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #8c97a8;
  background: #fff;
  font-family: inherit;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.shipment-stage-rail-item > button {
  position: relative;
  padding: 0;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.shipment-stage-rail-item > button::after {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  content: "";
}

.shipment-stage-rail-item > button:hover {
  border-color: #8cb5e4;
  color: var(--cobalt);
  background: #f5f9ff;
}

.shipment-stage-rail-item > button:focus-visible {
  outline: 3px solid rgba(8, 103, 216, .2);
  outline-offset: 3px;
}

.shipment-stage-rail-item.done > button,
.shipment-stage-rail-item.done > i {
  border-color: rgba(22, 163, 74, .3);
  color: #168043;
  background: #effaf3;
}

.shipment-stage-rail-item.current > button,
.shipment-stage-rail-item.current > i {
  border-color: #0867d8;
  color: #fff;
  background: #0867d8;
  box-shadow: 0 0 0 4px rgba(8, 103, 216, .1);
}

.shipment-stage-rail-item.done > button:hover {
  border-color: rgba(22, 163, 74, .52);
  color: #126d39;
  background: #e5f7eb;
}

.shipment-stage-rail-item.current > button:hover {
  color: #fff;
  background: #0057b8;
}

.shipment-stage-log-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d8e1eb;
  border-radius: 9px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 17px 1fr auto;
  align-items: center;
  gap: 8px;
  color: #344054;
  background: #f8fafc;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.shipment-stage-log-button:hover {
  border-color: #aac7e8;
  background: #f3f8fe;
}

.shipment-stage-log-button:focus-visible {
  outline: 3px solid rgba(8, 103, 216, .2);
  outline-offset: 2px;
}

.shipment-stage-log-button > i {
  width: 17px;
  height: 17px;
  background: var(--transport-icon) center / contain no-repeat;
}

.shipment-stage-log-button > b {
  min-width: 22px;
  border-radius: 999px;
  padding: 4px 6px;
  color: var(--cobalt);
  background: rgba(8, 103, 216, .08);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.edit-dialog.shipment-stage-dialog {
  width: min(470px, calc(100vw - 32px));
  max-width: none;
  border: 0;
  border-radius: 16px;
  padding: 0;
  color: var(--text);
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
  overflow: hidden;
}

.edit-dialog.shipment-stage-dialog.shipment-completion-dialog {
  overflow: visible;
}

.shipment-completion-confirm-form {
  border-radius: inherit;
  overflow: hidden;
  background: #fff;
}

.shipment-stage-dialog::backdrop,
.shipment-stage-log-dialog::backdrop {
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(2px);
}

.shipment-stage-form > header,
.shipment-stage-log-dialog > section > header {
  min-height: 84px;
  border-bottom: 1px solid var(--border);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.shipment-stage-form > header span,
.shipment-stage-log-dialog > section > header span {
  display: block;
  color: var(--cobalt);
  font-size: 8.5px;
  font-weight: 720;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.shipment-stage-form > header h2,
.shipment-stage-log-dialog > section > header h2 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 17px;
}

.shipment-stage-form-body {
  padding: 22px 20px 24px;
  background: #f8fafc;
}

.shipment-stage-form-body > p {
  margin: 0 0 18px;
  color: #667085;
  font-size: 11px;
  line-height: 1.55;
}

.shipment-stage-form-body .field input {
  min-height: 44px;
  background: #fff;
}

.shipment-completion-confirm-form .field small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.shipment-completion-dialog-error {
  min-height: 0;
  margin: 12px 0 0 !important;
  color: var(--critical) !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
}

.shipment-completion-dialog-error:empty {
  display: none;
}

.shipment-stage-form > footer {
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.edit-dialog.shipment-stage-log-dialog {
  width: min(620px, calc(100vw - 32px));
  max-width: none;
  max-height: min(720px, calc(100dvh - 32px));
  border: 0;
  border-radius: 16px;
  padding: 0;
  color: var(--text);
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
  overflow: hidden;
}

.shipment-stage-log-dialog > section {
  max-height: min(720px, calc(100dvh - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.shipment-stage-log-dialog > section > header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.shipment-stage-log-list {
  min-height: 230px;
  padding: 8px 20px 22px;
  overflow-y: auto;
  background: #f8fafc;
}

.shipment-stage-log-entry {
  position: relative;
  min-height: 84px;
  padding: 18px 0 18px 36px;
  display: grid;
  grid-template-columns: 1fr;
}

.shipment-stage-log-entry:not(:last-child) {
  border-bottom: 1px solid #e5eaf0;
}

.shipment-stage-log-entry > i {
  position: absolute;
  top: 21px;
  left: 1px;
  width: 20px;
  height: 20px;
  border: 5px solid #e6f0fb;
  border-radius: 50%;
  background: var(--cobalt);
}

.shipment-stage-log-entry span,
.shipment-stage-log-entry strong,
.shipment-stage-log-entry p {
  display: block;
}

.shipment-stage-log-entry span {
  color: #7b8797;
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.shipment-stage-log-entry strong {
  margin-top: 4px;
  color: #27364a;
  font-size: 10.5px;
  line-height: 1.4;
}

.shipment-stage-log-entry p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 9.5px;
  line-height: 1.45;
}

.shipment-stage-log-empty {
  min-height: 230px;
  display: grid;
  place-content: center;
  gap: 6px;
  color: #667085;
  text-align: center;
}

.shipment-stage-log-empty strong {
  color: #344054;
  font-size: 12px;
}

.shipment-stage-log-empty span {
  max-width: 300px;
  font-size: 10px;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .shipment-stage-rail-item > button,
  .shipment-stage-log-button {
    transition: none;
  }
}

@media (max-width: 760px) {
  .shipment-stage-rail-item {
    min-height: 54px;
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .shipment-stage-rail::before {
    left: 21px;
  }

  .shipment-stage-rail-item > button,
  .shipment-stage-rail-item > i {
    width: 44px;
    height: 44px;
    font-size: 11px;
  }

  .edit-dialog.shipment-stage-dialog,
  .edit-dialog.shipment-stage-log-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
  }

  .shipment-stage-log-dialog > section {
    max-height: calc(100dvh - 20px);
  }
}

.shipment-container-editor-row {
  border: 1px solid #dce4ee;
  border-radius: 11px;
  padding: 14px;
  background: #fbfcfe;
}

.shipment-container-editor-row > header {
  min-height: 31px;
  margin-bottom: 11px;
  border-bottom: 1px solid #e5eaf0;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shipment-container-editor-row > header span,
.shipment-container-editor-row > header strong {
  display: block;
}

.shipment-container-editor-row > header span {
  color: #8792a2;
  font-size: 8px;
  font-weight: 690;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.shipment-container-editor-row > header strong {
  margin-top: 2px;
  color: var(--text);
  font-size: 11px;
  font-weight: 680;
}

.shipment-container-editor-identity {
  display: grid;
  grid-template-columns: minmax(150px, .55fr) minmax(0, 1fr) minmax(130px, .35fr);
  gap: 10px;
}

.shipment-container-editor-route {
  margin-top: 10px;
  border-top: 1px solid #e5eaf0;
  padding-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 760px) {
  .shipment-container-editor-identity,
  .shipment-container-editor-route {
    grid-template-columns: 1fr;
  }
}

/* Shipment passport v104 — matched to the approved PANTERA light reference. */
.transport-shipment-summary {
  min-height: 116px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) repeat(4, minmax(126px, 0.72fr)) minmax(190px, 0.95fr);
  align-items: stretch;
  gap: 0;
  background: #fff;
}

.transport-summary-identity {
  min-width: 0;
  padding-right: 22px;
  display: grid;
  align-content: center;
}

.transport-summary-identity p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
}

.transport-summary-identity h2 {
  overflow: hidden;
  font-size: 25px;
  font-weight: 620;
  line-height: 1.08;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.transport-summary-status {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 600;
}

.transport-summary-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(0, 87, 184, 0.08);
}

.transport-summary-metric {
  min-width: 0;
  border-left: 1px solid var(--border);
  padding: 8px 17px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 9px;
  align-content: center;
}

.transport-summary-metric i {
  width: 18px;
  height: 18px;
  grid-row: 1 / 3;
  margin-top: 2px;
  display: block;
  background: #667085;
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.transport-summary-metric span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.transport-summary-metric strong {
  min-width: 0;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 590;
  white-space: normal;
}

.transport-summary-actions {
  border-left: 1px solid var(--border);
  padding-left: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px 10px;
}

.transport-summary-actions .primary-button {
  width: 100%;
  min-height: 44px;
  padding-inline: 15px;
  white-space: nowrap;
}

.transport-summary-actions .text-button {
  min-height: 24px;
  font-size: 10px;
}

.transport-card-tabs {
  min-height: 43px;
  background: #fbfcfe;
}

.transport-completion-note {
  min-height: 46px;
  border-bottom: 1px solid #f2d58a;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #8a5b00;
  background: #fff9e8;
}

.transport-completion-note span {
  font-size: 12px;
  font-weight: 650;
}

.transport-completion-note p {
  margin: 0;
  flex: 1;
  color: #9a6b16;
  font-size: 11px;
}

.transport-shipment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(390px, 0.88fr);
  align-items: stretch;
}

.transport-journey-panel {
  min-width: 0;
  min-height: 760px;
  border-right: 1px solid var(--border);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  background: #f5f8fc;
}

.transport-journey-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.transport-journey-head p,
.transport-passport header p {
  margin: 0 0 5px;
  color: var(--cobalt);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.transport-journey-head h3,
.transport-passport header h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 620;
}

.transport-journey-caption {
  margin-top: 76px;
  display: grid;
  grid-template-columns: minmax(140px, auto) minmax(80px, 1fr) minmax(140px, auto);
  align-items: center;
  gap: 13px;
  color: #68758a;
  font-size: 11px;
  font-weight: 600;
}

.transport-journey-caption span:last-child {
  text-align: right;
}

.transport-journey-caption i {
  height: 1px;
  background: #d2dbe7;
}

.transport-stage-journey {
  border: 0;
  padding: 0;
}

.transport-stage-journey .transport-stage-line {
  margin-top: 22px;
  gap: 4px;
}

.transport-stage-journey .transport-stage-line::before {
  top: 26px;
  right: 8%;
  left: 8%;
  background: #c8d4e2;
}

.transport-stage-journey .transport-stage-node {
  width: 52px;
  height: 52px;
  border-color: #c7d2df;
  box-shadow: 0 7px 22px rgba(20, 43, 72, 0.06);
}

.transport-stage-journey .transport-stage-node i {
  width: 23px;
  height: 23px;
}

.transport-stage-journey .transport-stage > strong {
  margin-top: 11px;
  font-size: 11px;
}

.transport-stage-journey .transport-stage > button {
  min-height: 26px;
  border: 1px solid rgba(0, 87, 184, 0.16);
  border-radius: 7px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.82);
}

.transport-current-stage-card {
  min-height: 92px;
  margin-top: auto;
  border: 1px solid #d8e1ec;
  border-radius: 14px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(22, 51, 86, 0.06);
}

.transport-current-stage-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--cobalt);
  -webkit-mask: var(--transport-icon) center / 24px 24px no-repeat;
  mask: var(--transport-icon) center / 24px 24px no-repeat;
}

.transport-current-stage-card span,
.transport-current-stage-card small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.transport-current-stage-card strong {
  display: block;
  margin: 3px 0 4px;
  color: var(--text);
  font-size: 15px;
  font-weight: 620;
}

.transport-current-stage-card .secondary-button {
  min-height: 34px;
  font-size: 11px;
}

.transport-passport {
  min-width: 0;
  padding: 24px 22px 18px;
  background: #fff;
}

.transport-passport header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.transport-passport header h3 {
  font-size: 19px;
}

.transport-passport-group {
  border-bottom: 1px solid var(--border);
  padding: 15px 0 12px;
}

.transport-passport-group h4 {
  margin: 0 0 8px;
  color: #7a8698;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.transport-passport-cargo-lots {
  display: grid;
  gap: 8px;
}

.transport-passport-cargo-lots > h4 {
  margin-bottom: 0;
}

.transport-passport-cargo-lot {
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  padding: 10px 11px;
  display: grid;
  gap: 5px;
  background: #f9fbfd;
}

.transport-passport-cargo-lot > header {
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.transport-passport-cargo-lot > header span {
  color: var(--cobalt);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.transport-passport-cargo-lot > header strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 630;
  text-align: right;
}

.transport-passport-cargo-lot p,
.transport-passport-cargo-lot small,
.transport-passport-cargo-lot b,
.transport-passport-cargo-lot em {
  margin: 0;
  font-style: normal;
  line-height: 1.35;
}

.transport-passport-cargo-lot p {
  color: var(--text);
  font-size: 11px;
  font-weight: 570;
}

.transport-passport-cargo-lot small,
.transport-passport-cargo-lot em {
  color: #7b8798;
  font-size: 9px;
}

.transport-passport-cargo-lot b {
  color: #536174;
  font-size: 9px;
  font-weight: 600;
}

.transport-passport-empty {
  color: #98a2b3;
  font-size: 10px;
}

.transport-passport-row {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: 17px minmax(92px, auto) minmax(18px, 1fr) minmax(126px, 0.9fr);
  align-items: start;
  gap: 8px;
}

.transport-passport-row > i {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  display: block;
  background: #718096;
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.transport-passport-row > span {
  min-width: 0;
  color: #6f7c90;
  font-size: 11px;
  line-height: 1.4;
}

.transport-passport-row > b {
  min-width: 12px;
  height: 10px;
  border-bottom: 1px dotted #d5dce6;
}

.transport-passport-row > strong {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.42;
  font-weight: 570;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.transport-passport-row > strong.is-empty {
  color: #9aa4b3;
  font-weight: 500;
}

.transport-passport-audit {
  padding-top: 13px;
  display: grid;
  gap: 4px;
  color: #98a2b3;
  font-size: 9px;
  line-height: 1.35;
}

@media (max-width: 1320px) {
  .transport-shipment-summary {
    grid-template-columns: minmax(190px, 1.1fr) repeat(4, minmax(110px, 0.72fr));
  }

  .transport-summary-actions {
    grid-column: 1 / -1;
    min-height: 58px;
    margin: 14px -20px -18px;
    border-top: 1px solid var(--border);
    border-left: 0;
    padding: 9px 20px;
    justify-content: flex-end;
  }

  .transport-summary-actions .primary-button {
    width: auto;
  }

  .transport-shipment-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(370px, 0.9fr);
  }
}

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

  .transport-summary-identity {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--border);
    padding: 0 0 14px;
  }

  .transport-summary-metric {
    min-height: 70px;
  }

  .transport-shipment-layout {
    grid-template-columns: 1fr;
  }

  .transport-journey-panel {
    min-height: 590px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 760px) {
  .transport-shipment-summary {
    padding: 16px;
  }

  .transport-summary-metric {
    border-left: 0;
    border-bottom: 1px solid var(--border);
    padding: 12px 6px;
  }

  .transport-summary-actions {
    margin: 8px -16px -16px;
    padding-inline: 16px;
  }

  .transport-completion-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .transport-journey-panel {
    min-height: 710px;
    padding: 20px 16px;
  }

  .transport-journey-caption {
    margin-top: 34px;
    grid-template-columns: 1fr;
  }

  .transport-journey-caption i {
    display: none;
  }

  .transport-journey-caption span:last-child {
    text-align: left;
  }

  .transport-stage-journey .transport-stage-line {
    grid-template-columns: 1fr;
  }

  .transport-stage-journey .transport-stage-line::before {
    top: 26px;
    right: auto;
    bottom: 26px;
    left: 25px;
    width: 1px;
    height: auto;
  }

  .transport-current-stage-card {
    margin-top: 28px;
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .transport-current-stage-card .secondary-button {
    grid-column: 1 / -1;
  }

  .transport-passport {
    padding: 22px 16px 16px;
  }

  .transport-passport-row {
    grid-template-columns: 17px minmax(84px, 0.7fr) minmax(100px, 1fr);
  }

  .transport-passport-row > b {
    display: none;
  }
}

.transport-journey-panel .transport-stage-journey {
  margin: 0 -26px;
  padding: 22px 26px 20px;
  background: rgba(255, 255, 255, 0.76);
}

.transport-journey-panel .transport-current-stage-card {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .transport-journey-panel .transport-stage-journey {
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .transport-form-section-head.action {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .transport-form-section-actions {
    grid-column: 2;
    align-items: stretch;
    flex-direction: column;
  }

  .transport-cargo-lot-grid,
  .transport-cargo-lot-route-grid,
  .transport-cargo-lot-containers {
    grid-template-columns: 1fr;
  }

  .transport-cargo-lot-grid .wide,
  .transport-cargo-lot-waypoints {
    grid-column: auto;
  }

  .transport-cargo-lot-container-options {
    grid-template-columns: 1fr;
  }

  .transport-route-map-legend {
    right: 10px;
    bottom: 20px;
  }
}

@media (max-width: 1320px) {
  .security-audit-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .security-audit-search {
    grid-column: span 2;
  }

  .security-audit-columns,
  .security-audit-event {
    grid-template-columns: 132px minmax(190px, 1.5fr) minmax(130px, 1fr) minmax(130px, 1fr) 96px;
    gap: 10px;
  }

  .access-workbench {
    grid-template-columns: 240px minmax(0, 1fr);
  }

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

  .access-permission-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .access-permissions-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 1050px) {
  .security-audit-columns {
    display: none;
  }

  .security-audit-event {
    grid-template-columns: 132px minmax(0, 1.5fr) minmax(145px, 1fr) 100px;
  }

  .security-audit-source {
    grid-column: 2 / 4;
  }

  .security-audit-result {
    grid-column: 4;
    grid-row: 1;
  }

  .access-workbench {
    grid-template-columns: 1fr;
  }

  .access-user-register {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .access-user-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .access-save-area {
    justify-content: space-between;
  }
}

@media (max-width: 760px) {
  .admin-security-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-security-tabs button {
    justify-content: flex-start;
  }

  .security-audit-panel {
    padding: 14px;
  }

  .security-audit-head {
    align-items: flex-start;
    gap: 12px;
  }

  .security-audit-filters,
  .security-audit-event {
    grid-template-columns: 1fr;
  }

  .security-audit-filters input,
  .security-audit-filters select,
  .security-audit-filters button,
  .security-audit-technical summary {
    min-height: 44px;
  }

  .security-audit-technical summary {
    display: inline-flex;
    align-items: center;
  }

  .security-audit-search,
  .security-audit-source,
  .security-audit-result,
  .security-audit-technical {
    grid-column: 1;
  }

  .security-audit-result {
    grid-row: auto;
  }

  .security-audit-event {
    gap: 8px;
    padding: 14px 14px 14px 18px;
  }

  .security-audit-event-main strong,
  .security-audit-actor strong,
  .security-audit-source strong {
    white-space: normal;
  }

  .security-audit-pagination {
    justify-content: space-between;
  }

  .admin-hero,
  .admin-user-head,
  .access-section-heading,
  .access-save-area {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .admin-stat:nth-child(2) {
    border-right: 0;
  }

  .admin-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .access-user-rows,
  .admin-user-profile,
  .admin-user-status,
  .access-permission-options {
    grid-template-columns: 1fr;
  }

  .access-permission-presets {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .access-permission-presets button {
    min-height: 44px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .access-profile-section .field input,
  .access-profile-section .field select,
  .section-check {
    min-height: 44px;
  }

  .access-permission-presets button:last-child {
    border-bottom: 0;
  }

  .access-account-actions,
  .access-save-area,
  .access-save-button {
    width: 100%;
  }

  .access-account-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .access-save-status {
    max-width: none;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-security-tabs button,
  .security-audit-event,
  .access-user-item,
  .section-check {
    transition: none;
  }
}

/* Calculator v116 cascade lock */
.calculator-page { gap: 14px; }
#transportCalculatorView .calculator-layout { grid-template-columns: minmax(0, 1.7fr) minmax(350px, .98fr); gap: 18px; }
#transportCalculatorView .calculator-form,
#transportCalculatorView .calculator-result { border-color: #d9e0e9; box-shadow: 0 14px 38px rgba(17, 24, 39, .055); }
#transportCalculatorView .calculator-form-head,
#transportCalculatorView .calculator-result-head { min-height: 82px; padding: 17px 22px; }
#transportCalculatorView .calculator-reset { min-width: 104px; }
#transportCalculatorView .calculator-operational-grid .calculator-section { border-bottom: 0; padding: 22px 22px 24px; }
#transportCalculatorView .calculator-operational-grid .calculator-section:last-child { border-right: 0; }
#transportCalculatorView .calculator-operational-grid .calculator-fields { grid-template-columns: 1fr; }
#transportCalculatorView .calculator-intro .calculator-mode-switch label > span { min-height: 44px; border-radius: 8px; padding: 8px 14px; }
#transportCalculatorView .calculator-intro .calculator-mode-switch input:checked + span { color: #fff; background: linear-gradient(145deg, #0867d8, #004fbd); box-shadow: 0 5px 12px rgba(0, 87, 184, .18); }
#transportCalculatorView .calculator-check { min-height: 50px; padding: 9px 10px; }
#transportCalculatorView .calculator-section-icon { width: 36px; height: 36px; min-width: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg, var(--cobalt-active), #0049aa); box-shadow: 0 6px 14px rgba(0, 87, 184, .2); }
#transportCalculatorView .calculator-section-icon svg { width: 20px; height: 20px; }

@media (max-width: 1180px) {
  #transportCalculatorView .calculator-layout { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .9fr); }
  #transportCalculatorView .calculator-invoice-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  #transportCalculatorView .calculator-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  #transportCalculatorView .calculator-form-head { padding-inline: 16px; }
  #transportCalculatorView .calculator-reset { min-width: 44px; width: 44px; padding-inline: 0; overflow: hidden; color: var(--cobalt); font-size: 0; gap: 0; }
  #transportCalculatorView .calculator-reset .nav-icon { width: 18px; height: 18px; color: var(--cobalt); }
  #transportCalculatorView .calculator-invoice-fields { grid-template-columns: 1fr; }
  #transportCalculatorView .calculator-operational-grid { grid-template-columns: 1fr; }
  #transportCalculatorView .calculator-operational-grid .calculator-section { border-right: 0; border-bottom: 1px solid var(--border); padding: 20px 16px; }
  #transportCalculatorView .calculator-operational-grid .calculator-section:last-child { border-bottom: 0; }
  #transportCalculatorView .calculator-intro .calculator-mode-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #transportCalculatorView .calculator-intro .calculator-mode-switch label > span { min-height: 48px; }
}

/* Calculator v117 polish — aligned with DDS typography and action language */
#transportCalculatorView .calculator-currency-control {
  position: relative;
  min-width: 0;
}

#transportCalculatorView .calculator-currency-control img {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  width: 23px;
  height: 17px;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 3px;
  object-fit: cover;
  transform: translateY(-50%);
  pointer-events: none;
}

#transportCalculatorView .calculator-currency-control select {
  padding-left: 46px;
}

#transportCalculatorView .calculator-operational-grid .calculator-section {
  padding: 26px 22px 26px;
}

#transportCalculatorView .calculator-section-head {
  min-height: 44px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 13px;
}

#transportCalculatorView .calculator-section-head > span:last-child {
  min-width: 0;
}

#transportCalculatorView .calculator-section-head strong,
#transportCalculatorView .calculator-section-head small {
  display: block;
}

#transportCalculatorView .calculator-section-head strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 670;
}

#transportCalculatorView .calculator-section-head small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
}

#transportCalculatorView .calculator-section-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #0870e8, #0052bc);
  box-shadow: 0 8px 18px rgba(0, 87, 184, .2);
}

#transportCalculatorView .calculator-section-icon .svg-icon,
#transportCalculatorView .calculator-section-icon > .nav-icon,
#transportCalculatorView .calculator-section-icon > .nav-icon svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

#transportCalculatorView .calculator-result-head p {
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: .075em;
}

#transportCalculatorView .calculator-result-head h2 {
  font-size: 19px;
  font-weight: 650;
}

#transportCalculatorView .calculator-live-badge {
  min-height: 32px;
  padding: 0 12px;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 680;
}

#transportCalculatorView .calculator-live-badge i {
  width: 7px;
  height: 7px;
}

#transportCalculatorView .calculator-primary-total > span {
  font-size: 13px;
  font-weight: 570;
}

#transportCalculatorView .calculator-primary-total output {
  margin-top: 9px;
  font-size: clamp(36px, 2.65vw, 44px);
  font-weight: 650;
}

#transportCalculatorView .calculator-primary-total small {
  margin-top: 9px;
  font-size: 11.5px;
  line-height: 1.4;
}

#transportCalculatorView .calculator-composition-legend span {
  font-size: 10.5px;
  line-height: 1.3;
}

#transportCalculatorView .calculator-composition-legend strong {
  margin-top: 8px;
  font-size: 13px;
}

#transportCalculatorView .calculator-composition-legend output {
  margin-top: 5px;
  font-size: 12px;
}

#transportCalculatorView .calculator-kpis > div {
  min-height: 86px;
  padding: 16px 13px;
}

#transportCalculatorView .calculator-kpis span {
  font-size: 11px;
  line-height: 1.35;
}

#transportCalculatorView .calculator-kpis output {
  margin-top: 10px;
  font-size: 14px;
}

#transportCalculatorView .calculator-breakdown-head {
  padding: 21px 22px 11px;
}

#transportCalculatorView .calculator-breakdown-head h3 {
  font-size: 15px;
  font-weight: 660;
}

#transportCalculatorView .calculator-breakdown-head span {
  font-size: 10.5px;
}

#transportCalculatorView .calculator-breakdown > div {
  min-height: 42px;
}

#transportCalculatorView .calculator-breakdown dt {
  color: #59677c;
  font-size: 12px;
  line-height: 1.4;
}

#transportCalculatorView .calculator-breakdown dd {
  font-size: 12.5px;
  font-weight: 640;
}

#transportCalculatorView .calculator-disclaimer {
  padding-top: 18px;
  font-size: 11px;
  line-height: 1.55;
}

#transportCalculatorView .calculator-form-footer {
  min-height: 86px;
  padding: 16px 22px;
  border-top: 0;
  background: #fbfcfe;
}

#transportCalculatorView .calculator-status {
  gap: 14px;
}

#transportCalculatorView .calculator-status > i {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
  box-shadow: 0 0 0 9px rgba(22, 163, 74, .11);
}

#transportCalculatorView .calculator-status strong {
  font-size: 13px;
  font-weight: 660;
}

#transportCalculatorView .calculator-status small {
  margin-top: 5px;
  font-size: 11px;
}

#transportCalculatorView .calculator-form-actions button {
  min-height: 46px;
  border-radius: 9px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 630;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease, transform 180ms ease;
}

#transportCalculatorView .calculator-primary-action {
  border: 1px solid transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-active));
  box-shadow: 0 8px 18px rgba(0, 87, 184, .18);
}

#transportCalculatorView .calculator-primary-action:hover {
  box-shadow: 0 10px 22px rgba(0, 87, 184, .24);
  transform: translateY(-1px);
}

#transportCalculatorView .calculator-secondary-action {
  border: 1px solid #cfd8e4;
  color: #42516a;
  background: #fff;
  box-shadow: 0 3px 10px rgba(17, 24, 39, .035);
}

#transportCalculatorView .calculator-secondary-action:hover {
  border-color: rgba(0, 87, 184, .32);
  color: var(--cobalt);
  background: #f8fbff;
}

#transportCalculatorView .calculator-form-actions button:focus-visible {
  outline: 3px solid rgba(0, 87, 184, .17);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  #transportCalculatorView .calculator-operational-grid .calculator-section {
    padding: 22px 16px 24px;
  }

  #transportCalculatorView .calculator-section-head {
    margin-bottom: 18px;
  }

  #transportCalculatorView .calculator-section-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex-basis: 40px;
  }

  #transportCalculatorView .calculator-form-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #transportCalculatorView .calculator-form-actions button {
    transition: none;
  }
}

/* Calculator v118 alignment and hierarchy refinement */
#transportCalculatorView .calculator-currency-control {
  height: 44px;
}

#transportCalculatorView .calculator-currency-control select {
  display: block;
  height: 44px;
  min-height: 44px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 42px;
}

#transportCalculatorView .calculator-section-head {
  height: 72px;
  min-height: 72px;
  margin-bottom: 18px;
  align-items: flex-start;
}

#transportCalculatorView .calculator-section-head strong {
  font-size: 15px;
  line-height: 1.28;
  font-weight: 690;
}

#transportCalculatorView .calculator-section-head small {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.4;
}

#transportCalculatorView .calculator-section-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  flex-basis: 46px;
  border: 1px solid rgba(255, 255, 255, .82);
  background: #0867d8;
  box-shadow: 0 8px 20px rgba(0, 87, 184, .2), inset 0 1px 0 rgba(255, 255, 255, .24);
}

#transportCalculatorView .calculator-section-icon-customs {
  background: #075fc9;
}

#transportCalculatorView .calculator-section-icon-pricing {
  background: #064fae;
}

#transportCalculatorView .calculator-section-icon .svg-icon,
#transportCalculatorView .calculator-section-icon > .nav-icon,
#transportCalculatorView .calculator-section-icon > .nav-icon svg {
  width: 24px;
  height: 24px;
}

#transportCalculatorView .calculator-kpis > div {
  min-height: 92px;
  padding: 17px 15px;
}

#transportCalculatorView .calculator-kpis span {
  font-size: 12px;
  line-height: 1.35;
}

#transportCalculatorView .calculator-kpis output {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
}

#transportCalculatorView .calculator-status {
  gap: 15px;
}

#transportCalculatorView .calculator-status > i {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
  box-shadow: 0 0 0 10px rgba(22, 163, 74, .11);
}

#transportCalculatorView .calculator-status strong {
  font-size: 14px;
  font-weight: 680;
}

#transportCalculatorView .calculator-status small {
  font-size: 11.5px;
}

#transportCalculatorView .calculator-form-actions {
  margin-left: auto;
}

#transportCalculatorView .calculator-primary-action {
  min-width: 176px;
}

#transportCalculatorView .calculator-section-glyph {
  width: 27px;
  height: 27px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: .98;
}

@media (max-width: 600px) {
  #transportCalculatorView .calculator-currency-control,
  #transportCalculatorView .calculator-currency-control select {
    height: 48px;
    min-height: 48px;
  }

  #transportCalculatorView .calculator-currency-control select {
    line-height: 46px;
  }

  #transportCalculatorView .calculator-section-head {
    height: auto;
    min-height: 0;
  }

  #transportCalculatorView .calculator-section-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex-basis: 44px;
  }

  #transportCalculatorView .calculator-section-glyph {
    width: 26px;
    height: 26px;
  }

  #transportCalculatorView .calculator-primary-action {
    min-width: 0;
  }
}

/* Calculator v120 saved scenarios and native-select collision fix */
.calculator-tool-switch {
  grid-template-columns: repeat(3, minmax(214px, 1fr));
}

.calculator-saved-count {
  min-width: 19px;
  height: 19px;
  margin-left: 5px;
  border-radius: 999px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, .09);
  font-size: 10px;
  font-weight: 740;
  vertical-align: middle;
}

.calculator-saved-count[hidden] { display: none; }

#transportCalculatorView .calculator-currency-control {
  height: 44px;
  border: 1px solid #d7dee7;
  border-radius: 9px;
  padding-left: 12px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

#transportCalculatorView .calculator-currency-control:hover { border-color: #b7c3d2; }
#transportCalculatorView .calculator-currency-control:focus-within {
  border-color: var(--cobalt-active);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, .11);
}

#transportCalculatorView .calculator-currency-control img {
  position: static;
  z-index: auto;
  width: 25px;
  height: 18px;
  transform: none;
}

#transportCalculatorView .calculator-currency-control select {
  height: 42px;
  min-height: 42px;
  border: 0;
  border-radius: 0 8px 8px 0;
  padding: 0 34px 0 0;
  line-height: normal;
  background-color: transparent;
  box-shadow: none;
}

#transportCalculatorView .calculator-currency-control select:focus-visible { box-shadow: none; }

.saved-calculations-view { display: grid; gap: 16px; }
.saved-calculations-view[hidden] { display: none; }
.saved-calculations-panel { overflow: hidden; }
.saved-calculations-head {
  min-height: 112px;
  border-bottom: 1px solid var(--border);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.saved-calculations-head p { margin: 0 0 7px; color: var(--cobalt); font-size: 11px; font-weight: 740; letter-spacing: .09em; text-transform: uppercase; }
.saved-calculations-head h2 { margin: 0; color: var(--text); font-size: 22px; line-height: 1.2; font-weight: 670; }
.saved-calculations-head > div > span { margin-top: 7px; display: block; color: var(--muted); font-size: 12px; line-height: 1.45; }
.saved-calculations-search {
  width: min(340px, 38vw);
  min-height: 44px;
  border: 1px solid #d7dee7;
  border-radius: 9px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
}
.saved-calculations-search:focus-within { border-color: var(--cobalt-active); box-shadow: 0 0 0 3px rgba(0, 87, 184, .11); }
.saved-calculations-search .nav-icon { width: 18px; height: 18px; flex: 0 0 18px; color: #7c889a; }
.saved-calculations-search input { min-width: 0; width: 100%; border: 0; padding: 0; outline: 0; color: var(--text); background: transparent; font-size: 13px; }
.saved-calculations-search input::placeholder { color: #98a3b3; }
.saved-calculations-list { display: grid; }
.saved-calculations-state { min-height: 160px; padding: 48px 24px; display: none; place-items: center; color: var(--muted); font-size: 13px; text-align: center; }
.saved-calculations-state.loading,
.saved-calculations-state.empty,
.saved-calculations-state.error { display: grid; }
.saved-calculations-state.error { color: #a52424; }
.saved-calculation-card {
  min-height: 102px;
  border-bottom: 1px solid #e8edf3;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 24px;
  transition: background-color 160ms ease;
}
.saved-calculation-card:last-child { border-bottom: 0; }
.saved-calculation-card:hover { background: #fbfcfe; }
.saved-calculation-copy { min-width: 0; }
.saved-calculation-copy h3 { margin: 0; overflow: hidden; color: var(--text); font-size: 15px; line-height: 1.35; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.saved-calculation-copy p { margin: 5px 0 0; overflow: hidden; color: #586579; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.saved-calculation-copy span { margin-top: 7px; display: block; color: #8994a4; font-size: 10.5px; line-height: 1.35; }
.saved-calculation-figures { display: flex; align-items: center; gap: 8px; }
.saved-calculation-figures > span:not(:last-child) { min-height: 28px; border-radius: 7px; padding: 0 9px; display: inline-flex; align-items: center; color: #536176; background: #f1f4f8; font-size: 10.5px; font-weight: 690; }
.saved-calculation-figures > span:last-child { margin-left: 8px; display: grid; gap: 3px; }
.saved-calculation-figures small { color: var(--muted); font-size: 9.5px; }
.saved-calculation-figures strong { color: var(--text); font-size: 14px; font-weight: 710; font-variant-numeric: tabular-nums; white-space: nowrap; }
.saved-calculation-open { min-height: 42px; border-color: #cbd5e1; padding: 0 15px; color: #42516a; background: #fff; font-size: 12px; font-weight: 650; }

.edit-dialog.calculator-save-dialog { width: min(520px, calc(100vw - 28px)); }
.calculator-save-dialog form { padding: 24px; }
.calculator-save-dialog .dialog-head { align-items: flex-start; }
.calculator-save-dialog .dialog-head > div > span { margin-top: 7px; display: block; color: var(--muted); font-size: 12px; line-height: 1.45; }
.calculator-save-dialog .dialog-close { width: 36px; height: 36px; border: 0; border-radius: 9px; display: grid; place-items: center; flex: 0 0 36px; color: #6a7688; background: #f3f5f8; font-size: 24px; line-height: 1; cursor: pointer; }
.calculator-save-name > span { margin-bottom: 8px; display: block; color: #4d5a6d; font-size: 12px; font-weight: 650; }
.calculator-save-name input { width: 100%; min-height: 46px; border: 1px solid #d4dce7; border-radius: 9px; padding: 0 13px; color: var(--text); background: #fff; outline: 0; font-size: 14px; }
.calculator-save-name input:focus { border-color: var(--cobalt-active); box-shadow: 0 0 0 3px rgba(0, 87, 184, .11); }
.calculator-save-status { min-height: 20px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.calculator-save-status.error { color: #a52424; }
.calculator-save-dialog .dialog-actions { grid-template-columns: 1fr auto auto; }
.calculator-save-dialog .dialog-actions button { min-height: 42px; padding-inline: 16px; }
.calculator-save-dialog .dialog-actions .primary-button:disabled { opacity: .65; cursor: wait; }

@media (max-width: 900px) {
  .calculator-tool-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .saved-calculation-card { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
  .saved-calculation-figures { grid-column: 1; }
  .saved-calculation-open { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 600px) {
  .calculator-tool-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calculator-tool-switch button { justify-content: center; padding-inline: 7px; text-align: center; }
  .calculator-tool-switch strong { font-size: 10px; }
  .calculator-saved-count { display: none; }
  #transportCalculatorView .calculator-currency-control { height: 48px; }
  #transportCalculatorView .calculator-currency-control select { height: 46px; min-height: 46px; }
  .saved-calculations-head { padding: 20px 16px; align-items: stretch; flex-direction: column; gap: 16px; }
  .saved-calculations-search { width: 100%; min-height: 48px; }
  .saved-calculation-card { padding: 17px 16px; grid-template-columns: 1fr; gap: 13px; }
  .saved-calculation-figures { grid-column: auto; flex-wrap: wrap; }
  .saved-calculation-open { width: 100%; min-height: 46px; grid-column: auto; grid-row: auto; }
  .calculator-save-dialog form { padding: 20px 16px; }
  .calculator-save-name input { min-height: 48px; font-size: 16px; }
  .calculator-save-dialog .dialog-actions { grid-template-columns: 1fr 1fr; }
  .calculator-save-dialog .dialog-actions > span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .saved-calculation-card,
  #transportCalculatorView .calculator-currency-control { transition: none; }
}

/* Calculator v121 — paired journals, editable title and DDS-style history */
.calculator-tool-switch {
  min-height: 58px;
  display: flex;
  grid-template-columns: none;
  align-items: stretch;
}

.calculator-tool-group {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 48px;
  gap: 3px;
}

.calculator-tool-switch .calculator-tool-main { min-width: 220px; }
.calculator-tool-switch .calculator-tool-journal {
  position: relative;
  width: 48px;
  min-width: 48px;
  padding: 0;
  justify-content: center;
  color: #69768a;
}
.calculator-tool-switch .calculator-tool-journal .nav-icon { width: 21px; height: 21px; flex-basis: 21px; }
.calculator-tool-switch .calculator-tool-journal.active { color: var(--cobalt); }
.calculator-tool-switch .calculator-tool-journal .calculator-saved-count {
  position: absolute;
  top: 5px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  margin: 0;
  padding: 0 4px;
  font-size: 9px;
}
.calculator-tool-divider {
  width: 1px;
  height: 36px;
  margin: auto 7px;
  flex: 0 0 1px;
  background: var(--border);
}

#transportCalculatorView .calculator-intro { align-items: end; }
.calculator-name-editor {
  min-width: 0;
  grid-column: 1 / -1;
  border-bottom: 1px solid #e7ebf0;
  padding: 0 0 17px;
}
.calculator-name-label {
  margin-bottom: 8px;
  display: block;
  color: #56647a;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 640;
}
.calculator-name-view {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.calculator-name-view[hidden],
.calculator-name-edit[hidden] { display: none; }
.calculator-name-view h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calculator-name-view button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  color: var(--cobalt);
  background: rgba(0, 87, 184, .065);
  cursor: pointer;
}
.calculator-name-view button:hover { background: rgba(0, 87, 184, .11); }
.calculator-name-view .nav-icon { width: 17px; height: 17px; }
.calculator-name-edit {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}
.calculator-name-edit input {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid #d3dce7;
  border-radius: 9px;
  padding: 0 13px;
  color: var(--text);
  background: #fff;
  outline: 0;
  font-size: 14px;
  font-weight: 560;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.calculator-name-edit input:focus { border-color: var(--cobalt-active); box-shadow: 0 0 0 3px rgba(0, 87, 184, .1); }
.calculator-name-editor.has-error .calculator-name-edit input { border-color: rgba(220, 38, 38, .5); box-shadow: 0 0 0 3px rgba(220, 38, 38, .07); }
.calculator-name-edit button {
  min-height: 44px;
  border: 1px solid rgba(0, 87, 184, .18);
  border-radius: 9px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--cobalt);
  background: rgba(0, 87, 184, .065);
  font: inherit;
  font-size: 12px;
  font-weight: 660;
  cursor: pointer;
}
.calculator-name-edit button:hover { border-color: rgba(0, 87, 184, .3); background: rgba(0, 87, 184, .1); }
.calculator-name-edit .nav-icon { width: 16px; height: 16px; }

.calculator-history-panel {
  min-height: 520px;
  padding: 22px;
  overflow: hidden;
}
.calculator-history-head {
  min-height: 74px;
  border-bottom: 0;
  padding: 0;
  align-items: flex-end;
}
.calculator-history-head p { margin-bottom: 5px; font-size: 10px; letter-spacing: .1em; }
.calculator-history-head h2 { font-size: 20px; font-weight: 660; }
.calculator-history-head > div > span { margin-top: 5px; font-size: 11.5px; }
.calculator-history-head .saved-calculations-search { width: min(360px, 38vw); min-height: 42px; }
.calculator-history-table {
  min-width: 0;
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(17, 24, 39, .035);
}
.calculator-history-columns,
.saved-calculation-card {
  min-width: 806px;
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 96px 140px 180px 90px;
  gap: 12px;
  align-items: center;
}
.calculator-history-columns {
  min-height: 42px;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 10.5px;
  font-weight: 620;
}
.saved-calculation-card {
  min-height: 82px;
  border-bottom: 1px solid var(--border);
  padding: 13px 16px;
  background: transparent;
}
.saved-calculation-card:last-child { border-bottom: 0; }
.saved-calculation-card:hover { background: rgba(0, 87, 184, .025); }
.saved-calculation-copy h3 { font-size: 13.5px; font-weight: 650; }
.saved-calculation-copy p { margin-top: 5px; font-size: 11.5px; }
.saved-calculation-parameters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.saved-calculation-parameters span {
  min-height: 27px;
  border: 1px solid rgba(221, 227, 234, .9);
  border-radius: 7px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  color: #526078;
  background: #f6f8fb;
  font-size: 10px;
  line-height: 1;
  font-weight: 660;
  white-space: nowrap;
}
.saved-calculation-total,
.saved-calculation-meta { min-width: 0; display: grid; gap: 4px; }
.saved-calculation-total strong,
.saved-calculation-meta strong { overflow: hidden; color: var(--text); font-size: 12.5px; line-height: 1.25; font-weight: 670; text-overflow: ellipsis; white-space: nowrap; }
.saved-calculation-total strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.saved-calculation-total small,
.saved-calculation-meta small { overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.saved-calculation-open {
  min-height: 36px;
  border: 1px solid rgba(0, 87, 184, .18);
  border-radius: 8px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--cobalt);
  background: rgba(0, 87, 184, .06);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.saved-calculation-open::after { content: "\2192"; font-size: 14px; }
.saved-calculation-open:hover { border-color: rgba(0, 87, 184, .3); background: rgba(0, 87, 184, .1); }
.calculator-history-table .saved-calculations-state { border: 0; }
.commercial-offer-history-row .saved-calculation-total strong { font-size: 12.5px; }
.offer-history-parameters { flex-wrap: nowrap; }

@media (max-width: 900px) {
  .calculator-tool-switch { width: 100%; }
  .calculator-tool-group { flex: 1 1 0; grid-template-columns: minmax(0, 1fr) 46px; }
  .calculator-tool-switch .calculator-tool-main { min-width: 0; }
  .calculator-history-head { align-items: stretch; flex-direction: column; gap: 14px; }
  .calculator-history-head .saved-calculations-search { width: 100%; }
  .saved-calculation-card { grid-template-columns: minmax(220px, 1.4fr) 96px 140px 180px 90px; }
}

@media (max-width: 600px) {
  .calculator-tool-switch { min-height: 54px; }
  .calculator-tool-group { grid-template-columns: minmax(0, 1fr) 44px; }
  .calculator-tool-switch .calculator-tool-main { justify-content: flex-start; text-align: left; }
  .calculator-tool-switch .calculator-tool-main .nav-icon { display: none; }
  .calculator-tool-switch .calculator-tool-journal .nav-icon { display: block; }
  .calculator-tool-divider { margin-inline: 3px; }
  .calculator-name-editor { padding-bottom: 15px; }
  .calculator-name-view h3 { font-size: 18px; }
  .calculator-name-edit { grid-template-columns: 1fr; }
  .calculator-name-edit input { height: 48px; font-size: 16px; }
  .calculator-name-edit button { min-height: 44px; }
  .calculator-history-panel { min-height: 420px; padding: 18px 16px; }
  .calculator-history-table { margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .calculator-name-edit input,
  .saved-calculation-card { transition: none; }
}

/* Calculator v122 — shared-history actions and quieter title editing */
.calculator-name-view button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0;
  flex: 0 0 44px;
  color: #7b8797;
  background: transparent;
}
.calculator-name-view button:hover { color: #4f5d70; background: transparent; }
.calculator-name-view button:focus-visible { outline: 2px solid rgba(0, 87, 184, .34); outline-offset: -5px; }
.calculator-name-view .nav-icon { width: 16px; height: 16px; }

.calculator-history-columns,
.saved-calculation-card {
  min-width: 824px;
  grid-template-columns: minmax(205px, 1.4fr) 90px 132px 170px 132px;
  gap: 10px;
}
.saved-calculation-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.saved-calculation-delete {
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  color: #8a6570;
  background: transparent;
  cursor: pointer;
}
.saved-calculation-delete svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.saved-calculation-delete:hover { border-color: rgba(165, 36, 36, .14); color: #a52424; background: rgba(165, 36, 36, .055); }
.saved-calculation-delete:focus-visible { outline: 2px solid rgba(165, 36, 36, .25); outline-offset: 2px; }

.edit-dialog.calculator-delete-dialog { width: min(500px, calc(100vw - 28px)); }
.calculator-delete-dialog form { padding: 24px; }
.calculator-delete-dialog .dialog-head { align-items: flex-start; }
.calculator-delete-dialog .dialog-head > div > span { margin-top: 7px; display: block; color: var(--muted); font-size: 12px; line-height: 1.45; }
.calculator-delete-dialog .dialog-close { width: 36px; height: 36px; border: 0; border-radius: 9px; display: grid; place-items: center; flex: 0 0 36px; color: #6a7688; background: #f3f5f8; font-size: 24px; line-height: 1; cursor: pointer; }
.calculator-delete-dialog-body { padding-block: 20px 8px; }
.calculator-delete-dialog-body > strong { display: block; overflow-wrap: anywhere; color: var(--text); font-size: 15px; line-height: 1.4; font-weight: 680; }
.calculator-delete-dialog-body > p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.calculator-delete-dialog .dialog-actions { grid-template-columns: 1fr auto auto; }
.calculator-delete-dialog .dialog-actions button { min-height: 42px; padding-inline: 16px; }
.calculator-delete-dialog .calculator-delete-submit { border-color: #a52424; background: #a52424; }
.calculator-delete-dialog .calculator-delete-submit:hover { border-color: #8f1f1f; background: #8f1f1f; }
.calculator-delete-dialog .calculator-delete-submit:disabled { opacity: .65; cursor: wait; }

@media (max-width: 900px) {
  .saved-calculation-card { grid-template-columns: minmax(205px, 1.4fr) 90px 132px 170px 132px; }
}

@media (max-width: 600px) {
  .calculator-delete-dialog form { padding: 20px 16px; }
  .calculator-delete-dialog .dialog-actions { grid-template-columns: 1fr 1fr; }
  .calculator-delete-dialog .dialog-actions > span { display: none; }
}

/* Calculator v123 — operational journal and branded PDF export */
.calculator-pdf-action img { width: 17px; height: 17px; display: block; }
.calculator-pdf-action.loading { cursor: wait; opacity: .72; }

#savedCalculationsView .calculator-history-panel { padding: 24px; }
#savedCalculationsView .calculator-history-head { min-height: 90px; align-items: flex-start; }
.calculator-history-head-actions { min-width: 360px; display: grid; justify-items: end; gap: 12px; }
.calculator-history-new {
  min-height: 42px;
  border-color: rgba(0, 87, 184, .38);
  padding-inline: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--cobalt);
  background: #fff;
}
.calculator-history-new span { width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-size: 15px; line-height: 1; }
.calculator-history-head-actions .saved-calculations-search { width: min(360px, 38vw); }

.calculator-history-toolbar {
  min-height: 84px;
  margin-top: 22px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #fbfcfe;
}
.calculator-history-metrics { min-width: 0; display: flex; align-items: stretch; }
.calculator-history-metrics > div { min-width: 132px; padding: 0 22px; display: grid; align-content: center; gap: 7px; border-right: 1px solid var(--border); }
.calculator-history-metrics > div:first-child { padding-left: 0; }
.calculator-history-metrics span { color: var(--muted); font-size: 10.5px; line-height: 1.2; }
.calculator-history-metrics strong { color: var(--text); font-size: 17px; line-height: 1; font-weight: 680; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calculator-history-filters { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.calculator-history-entity-filter { display: flex; align-items: center; gap: 6px; }
.calculator-history-entity-filter button,
.calculator-history-filters select {
  min-height: 38px;
  border: 1px solid #d8e0e9;
  border-radius: 8px;
  padding: 0 12px;
  color: #48566b;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 620;
  cursor: pointer;
}
.calculator-history-entity-filter button.active { border-color: rgba(0, 87, 184, .48); color: var(--cobalt); background: rgba(0, 87, 184, .045); }
.calculator-history-filters select { min-width: 128px; padding-right: 30px; }
#calculatorHistorySort { min-width: 150px; }

#savedCalculationsView .calculator-history-table {
  margin-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, .035);
}
#savedCalculationsView .calculator-history-columns,
#savedCalculationsView .saved-calculation-card {
  min-width: 1160px;
  grid-template-columns: minmax(220px, 1.45fr) 88px 120px 125px 128px 150px 178px;
  gap: 10px;
}
#savedCalculationsView .calculator-history-columns { min-height: 46px; padding-inline: 18px; }
#savedCalculationsView .saved-calculation-card { min-height: 84px; padding: 14px 18px; }
#savedCalculationsView .saved-calculation-copy h3 { font-size: 13.5px; }
#savedCalculationsView .saved-calculation-total strong { font-size: 13px; }
.saved-calculation-profit { min-width: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 7px; row-gap: 5px; }
.saved-calculation-profit strong { overflow: hidden; color: #159640; font-size: 13px; line-height: 1.2; font-weight: 690; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.saved-calculation-profit small { color: #627086; font-size: 10px; font-weight: 620; }
.saved-calculation-profit > span { height: 4px; grid-column: 1 / -1; overflow: hidden; border-radius: 3px; background: #e5e9ee; }
.saved-calculation-profit > span i { height: 100%; display: block; border-radius: inherit; background: #16a34a; }
.saved-calculation-profit.negative strong { color: #a52424; }
.saved-calculation-profit.negative > span i { background: #a52424; }
#savedCalculationsView .saved-calculation-actions { gap: 6px; }
.calculator-history-pdf {
  min-width: 42px;
  height: 40px;
  border: 1px solid #d5dde7;
  border-radius: 8px;
  padding: 0 9px;
  color: #526078;
  background: #fff;
  font: inherit;
  font-size: 10px;
  line-height: 1;
  font-weight: 720;
  cursor: pointer;
}
.calculator-history-pdf:hover { border-color: rgba(0, 87, 184, .28); color: var(--cobalt); background: rgba(0, 87, 184, .035); }
.calculator-history-pdf.loading { cursor: wait; opacity: .68; }
#savedCalculationsView .saved-calculation-open { min-height: 40px; }

.calculator-history-pagination {
  min-width: 1160px;
  min-height: 58px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}
.calculator-history-pagination[hidden] { display: none; }
.calculator-history-pagination > div,
.calculator-history-pagination > div > span { display: flex; align-items: center; gap: 6px; }
.calculator-history-pagination button { width: 34px; height: 34px; border: 1px solid transparent; border-radius: 7px; display: grid; place-items: center; color: #526078; background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.calculator-history-pagination button.active { border-color: #cfd8e4; color: var(--text); background: #fff; }
.calculator-history-pagination button:disabled { opacity: .35; cursor: default; }

@media (max-width: 1180px) {
  .calculator-history-toolbar { align-items: stretch; flex-direction: column; }
  .calculator-history-metrics { width: 100%; }
  .calculator-history-filters { justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 700px) {
  #savedCalculationsView .calculator-history-panel { padding: 18px 16px; }
  .calculator-history-head-actions { min-width: 0; width: 100%; justify-items: stretch; }
  .calculator-history-head-actions .saved-calculations-search { width: 100%; }
  .calculator-history-new { justify-content: center; }
  .calculator-history-metrics { overflow-x: auto; }
  .calculator-history-metrics > div { min-width: 126px; padding-inline: 16px; }
  .calculator-history-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .calculator-history-entity-filter { grid-column: 1 / -1; }
  .calculator-history-filters select { min-width: 0; width: 100%; }
  .calculator-form-actions { width: 100%; grid-template-columns: 1fr; }
}

/* Calculator v124 — light outlined operational icons */
#transportCalculatorView .calculator-section-icon,
#transportCalculatorView .calculator-section-icon-customs,
#transportCalculatorView .calculator-section-icon-pricing {
  width: 52px;
  height: 52px;
  min-width: 52px;
  flex-basis: 52px;
  border: 1px solid rgba(6, 96, 211, .5);
  color: #0867d8;
  background: #fff;
  box-shadow:
    0 0 0 4px #fff,
    0 0 0 5px rgba(68, 116, 176, .18),
    0 10px 22px rgba(20, 54, 97, .1);
}

#transportCalculatorView .calculator-section-glyph {
  width: 30px;
  height: 30px;
  color: #0867d8;
  filter: brightness(0) saturate(100%) invert(30%) sepia(97%) saturate(1728%) hue-rotate(198deg) brightness(91%) contrast(101%);
  opacity: 1;
}

@media (max-width: 600px) {
  #transportCalculatorView .calculator-section-icon,
  #transportCalculatorView .calculator-section-icon-customs,
  #transportCalculatorView .calculator-section-icon-pricing {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex-basis: 48px;
  }

  #transportCalculatorView .calculator-section-glyph {
    width: 28px;
    height: 28px;
  }
}

/* Calculator v125 — DDS-inspired Apple-like calculation register */
#savedCalculationsView .calculator-history-panel {
  padding: 22px;
  background: rgba(255, 255, 255, .94);
}

#savedCalculationsView .calculator-history-head {
  min-height: 82px;
}

#savedCalculationsView .calculator-history-head h2 {
  font-size: 21px;
  line-height: 1.2;
  font-weight: 680;
}

#savedCalculationsView .calculator-history-new {
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(17, 24, 39, .05);
}

#savedCalculationsView .calculator-history-head > div > span {
  color: #69768a;
  font-size: 12px;
}

#savedCalculationsView .calculator-history-toolbar {
  min-height: 78px;
  margin-top: 20px;
  border-color: #dbe2eb;
  padding: 13px 16px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f8fafc 100%);
}

#savedCalculationsView .calculator-history-metrics > div {
  min-width: 124px;
  padding-inline: 19px;
}

#savedCalculationsView .calculator-history-metrics span {
  font-size: 11px;
}

#savedCalculationsView .calculator-history-metrics strong {
  font-size: 18px;
  font-weight: 690;
}

#savedCalculationsView .calculator-history-entity-filter button,
#savedCalculationsView .calculator-history-filters select {
  min-height: 40px;
  border-color: #d5dee9;
  border-radius: 9px;
  font-size: 11.5px;
  box-shadow: 0 1px 1px rgba(17, 24, 39, .015);
}

#savedCalculationsView .calculator-history-entity-filter button.active {
  border-color: rgba(0, 87, 184, .42);
  background: #f3f7fd;
  box-shadow: 0 4px 12px rgba(0, 87, 184, .07);
}

#savedCalculationsView .calculator-history-table {
  border-color: #dbe2eb;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, .045);
}

#savedCalculationsView .calculator-history-columns,
#savedCalculationsView .saved-calculation-card {
  min-width: 1060px;
  grid-template-columns: 120px minmax(190px, 1fr) 62px 112px 120px 130px 236px;
  gap: 8px;
}

#savedCalculationsView .calculator-history-columns {
  min-height: 44px;
  padding-inline: 16px;
  color: #657287;
  background: #f8fafc;
  font-size: 10.5px;
  font-weight: 640;
}

#savedCalculationsView .calculator-history-columns > span {
  min-width: 0;
  overflow: hidden;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#savedCalculationsView .saved-calculation-card {
  position: relative;
  min-height: 92px;
  padding: 14px 16px;
  border-bottom-color: #e3e8ef;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

#savedCalculationsView .saved-calculation-card:hover {
  background: #fbfdff;
  box-shadow: inset 0 1px 0 rgba(0, 87, 184, .025), inset 0 -1px 0 rgba(0, 87, 184, .025);
}

#savedCalculationsView .saved-calculation-card.is-linked::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--cobalt-active);
}

#savedCalculationsView .saved-calculation-meta {
  gap: 6px;
}

#savedCalculationsView .saved-calculation-meta strong {
  color: #334155;
  font-size: 11.5px;
  line-height: 1.35;
  white-space: normal;
}

#savedCalculationsView .saved-calculation-meta small {
  color: #8792a3;
  font-size: 10px;
}

#savedCalculationsView .saved-calculation-copy h3 {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 680;
}

#savedCalculationsView .saved-calculation-copy p {
  margin-top: 5px;
  color: #647186;
  font-size: 11.5px;
}

#savedCalculationsView .saved-calculation-copy .saved-calculation-client {
  margin-top: 7px;
  overflow: hidden;
  color: var(--cobalt);
  font-size: 10.5px;
  font-weight: 590;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#savedCalculationsView .saved-calculation-parameters span {
  min-height: 28px;
  border-color: #dbe3ec;
  border-radius: 8px;
  color: #46556b;
  background: #f7f9fc;
  font-size: 10.5px;
}

#savedCalculationsView .saved-calculation-total strong,
#savedCalculationsView .saved-calculation-profit strong {
  font-size: 13.5px;
  font-weight: 690;
}

#savedCalculationsView .saved-calculation-profit > span {
  height: 3px;
}

#savedCalculationsView .saved-calculation-actions {
  justify-content: flex-start;
  gap: 5px;
}

#savedCalculationsView .calculator-history-pdf,
#savedCalculationsView .calculator-history-link,
#savedCalculationsView .saved-calculation-open,
#savedCalculationsView .saved-calculation-delete {
  height: 38px;
  min-height: 38px;
  border-radius: 9px;
}

#savedCalculationsView .calculator-history-pdf {
  min-width: 38px;
  padding-inline: 9px;
  border-color: rgba(239, 63, 63, .2);
  color: #c93636;
  background: #fffafa;
  font-size: 10px;
}

#savedCalculationsView .calculator-history-pdf:hover {
  border-color: rgba(239, 63, 63, .34);
  color: #b52f2f;
  background: #fff5f5;
}

.calculator-history-link {
  min-width: 82px;
  border: 1px solid #d5dee9;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #4c5b70;
  background: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.calculator-history-link img {
  width: 15px;
  height: 15px;
  filter: brightness(0) saturate(100%) invert(37%) sepia(12%) saturate(866%) hue-rotate(178deg) brightness(92%) contrast(90%);
}

.calculator-history-link:hover,
.calculator-history-link.linked {
  border-color: rgba(0, 87, 184, .25);
  color: var(--cobalt);
  background: #f4f8fd;
}

.calculator-history-link:hover img,
.calculator-history-link.linked img {
  filter: brightness(0) saturate(100%) invert(25%) sepia(88%) saturate(1986%) hue-rotate(195deg) brightness(88%) contrast(102%);
}

#savedCalculationsView .saved-calculation-open {
  min-width: 70px;
  padding-inline: 11px;
  border-color: rgba(0, 87, 184, .2);
  background: #f4f8fd;
  font-size: 10.5px;
}

#savedCalculationsView .saved-calculation-delete {
  width: 34px;
  flex-basis: 34px;
}

#savedCalculationsView .calculator-history-pagination {
  min-width: 1060px;
  min-height: 54px;
  padding-inline: 16px;
}

#transportCalculatorView .calculator-pdf-action {
  min-width: 168px;
  border: 1px solid rgba(0, 87, 184, .22);
  color: #34445b;
  background: #fff;
  box-shadow: 0 5px 16px rgba(17, 24, 39, .065);
}

#transportCalculatorView .calculator-pdf-action img {
  width: 19px;
  height: 19px;
  filter: none;
}

#transportCalculatorView .calculator-pdf-action:hover {
  border-color: rgba(0, 87, 184, .38);
  color: var(--cobalt);
  background: #f8fbff;
  box-shadow: 0 7px 19px rgba(0, 87, 184, .09);
  transform: translateY(-1px);
}

.edit-dialog.calculator-link-dialog {
  width: min(590px, calc(100vw - 28px));
}

.calculator-link-dialog form {
  padding: 24px;
}

.calculator-link-dialog .dialog-head {
  align-items: flex-start;
}

.calculator-link-dialog .dialog-head > div > span {
  margin-top: 7px;
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.calculator-link-dialog .dialog-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  color: #6a7688;
  background: #f3f5f8;
  font-size: 24px;
  cursor: pointer;
}

.calculator-link-dialog-body {
  padding-block: 20px 8px;
}

.calculator-link-dialog-body > strong {
  display: block;
  margin-bottom: 17px;
  color: var(--text);
  font-size: 15px;
  font-weight: 680;
}

.calculator-link-field span {
  margin-bottom: 8px;
  display: block;
  color: #4d5a6d;
  font-size: 12px;
  font-weight: 650;
}

.calculator-link-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d4dce7;
  border-radius: 10px;
  padding: 0 38px 0 13px;
  color: var(--text);
  background-color: #fff;
  outline: 0;
  font: inherit;
  font-size: 13px;
}

.calculator-link-field select:focus {
  border-color: var(--cobalt-active);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, .1);
}

.calculator-link-preview {
  min-height: 46px;
  margin-top: 12px;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  padding: 12px 13px;
  color: #617086;
  background: #f8fafc;
  font-size: 11.5px;
  line-height: 1.45;
}

.calculator-link-dialog .dialog-actions {
  grid-template-columns: auto 1fr auto auto;
}

.calculator-link-dialog .dialog-actions button {
  min-height: 42px;
  padding-inline: 16px;
}

.calculator-unlink-submit {
  color: #9b3131;
}

@media (max-width: 1400px) {
  #savedCalculationsView .calculator-history-columns,
  #savedCalculationsView .saved-calculation-card {
    min-width: 880px;
    grid-template-columns: 96px minmax(150px, 1fr) 52px 92px 100px 108px 180px;
    gap: 8px;
    padding-inline: 12px;
  }

  #savedCalculationsView .calculator-history-columns > span {
    overflow-wrap: normal;
    white-space: nowrap;
  }

  #savedCalculationsView .calculator-history-columns {
    min-height: 50px;
    font-size: 10px;
  }

  #savedCalculationsView .saved-calculation-meta strong {
    font-size: 10.5px;
  }

  #savedCalculationsView .saved-calculation-total strong,
  #savedCalculationsView .saved-calculation-profit strong {
    font-size: 12.5px;
  }

  #savedCalculationsView .calculator-history-link {
    width: 38px;
    min-width: 38px;
    padding: 0;
  }

  #savedCalculationsView .calculator-history-link span {
    display: none;
  }

  #savedCalculationsView .saved-calculation-open {
    min-width: 60px;
    padding-inline: 8px;
  }

  #savedCalculationsView .saved-calculation-delete {
    width: 32px;
    flex-basis: 32px;
  }

  #savedCalculationsView .calculator-history-pagination {
    min-width: 880px;
  }
}

@media (max-width: 700px) {
  #savedCalculationsView .calculator-history-panel { padding: 18px 14px; }
  #savedCalculationsView .calculator-history-columns,
  #savedCalculationsView .saved-calculation-card { min-width: 880px; }
  .calculator-link-dialog form { padding: 20px 16px; }
  .calculator-link-dialog .dialog-actions { grid-template-columns: 1fr 1fr; }
  .calculator-link-dialog .dialog-actions > span { display: none; }
}

/* Calculator v126 — premium journal proportions and action hierarchy */
#savedCalculationsView .calculator-history-new {
  min-height: 44px;
  border-color: transparent;
  padding-inline: 17px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--cobalt) 0%, var(--cobalt-active) 100%);
  box-shadow: 0 8px 20px rgba(0, 87, 184, .2);
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

#savedCalculationsView .calculator-history-new span {
  border-color: rgba(255, 255, 255, .66);
}

#savedCalculationsView .calculator-history-new:hover {
  color: #fff;
  background: linear-gradient(135deg, #004da5 0%, #075fc4 100%);
  box-shadow: 0 10px 24px rgba(0, 87, 184, .25);
  transform: translateY(-1px);
}

#savedCalculationsView .calculator-history-new:focus-visible {
  outline: 3px solid rgba(0, 87, 184, .2);
  outline-offset: 3px;
}

#savedCalculationsView .calculator-history-filters {
  gap: 10px;
}

#savedCalculationsView .calculator-history-entity-filter {
  gap: 8px;
}

#savedCalculationsView .calculator-history-entity-filter button,
#savedCalculationsView .calculator-history-filters select {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 42px;
}

#savedCalculationsView .calculator-history-entity-filter button {
  min-width: 58px;
  padding: 0 16px;
  line-height: 1;
}

#savedCalculationsView .calculator-history-filters select {
  min-width: 142px;
  padding: 0 38px 0 14px;
  display: block;
  line-height: normal;
}

#savedCalculationsView #calculatorHistorySort {
  min-width: 174px;
}

#savedCalculationsView .calculator-history-columns,
#savedCalculationsView .saved-calculation-card {
  min-width: 1180px;
  grid-template-columns:
    148px
    minmax(280px, 410px)
    74px
    minmax(118px, 1fr)
    minmax(130px, 1fr)
    minmax(148px, 1fr)
    326px;
  gap: 12px;
}

#savedCalculationsView .calculator-history-columns {
  min-height: 48px;
  padding-inline: 20px;
  font-size: 11px;
}

#savedCalculationsView .saved-calculation-card {
  min-height: 100px;
  padding: 16px 20px;
}

#savedCalculationsView .saved-calculation-meta {
  align-content: center;
  gap: 3px;
}

#savedCalculationsView .saved-calculation-date {
  overflow: hidden;
  color: #202b3c;
  font-size: 14.5px;
  line-height: 1.2;
  font-weight: 690;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#savedCalculationsView .saved-calculation-time {
  color: #536176;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 610;
  font-variant-numeric: tabular-nums;
}

#savedCalculationsView .saved-calculation-meta small {
  margin-top: 4px;
  font-size: 10.5px;
}

#savedCalculationsView .saved-calculation-copy h3 {
  font-size: 14.5px;
}

#savedCalculationsView .saved-calculation-actions {
  justify-content: flex-start;
  gap: 8px;
}

#savedCalculationsView .calculator-history-pdf,
#savedCalculationsView .calculator-history-link,
#savedCalculationsView .saved-calculation-open,
#savedCalculationsView .saved-calculation-delete {
  height: 42px;
  min-height: 42px;
  border-radius: 9px;
  transition: color 170ms ease, border-color 170ms ease, background-color 170ms ease, box-shadow 170ms ease;
}

#savedCalculationsView .calculator-history-pdf {
  min-width: 48px;
  padding-inline: 11px;
  border-color: rgba(220, 38, 38, .19);
  color: #c53333;
  background: #fff;
  font-size: 10.5px;
  letter-spacing: .015em;
}

#savedCalculationsView .calculator-history-pdf:hover {
  border-color: rgba(220, 38, 38, .34);
  color: #b42323;
  background: #fff6f6;
  box-shadow: 0 5px 14px rgba(180, 35, 35, .07);
}

#savedCalculationsView .calculator-history-link {
  min-width: 96px;
  border-color: rgba(0, 87, 184, .2);
  padding-inline: 12px;
  color: #315b8f;
  background: #fff;
  font-size: 10.5px;
}

#savedCalculationsView .calculator-history-link:hover,
#savedCalculationsView .calculator-history-link.linked {
  border-color: rgba(0, 87, 184, .34);
  color: var(--cobalt);
  background: #f5f9fe;
}

#savedCalculationsView .saved-calculation-open {
  min-width: 96px;
  border-color: transparent;
  padding-inline: 15px;
  color: #fff;
  background: var(--cobalt-active);
  box-shadow: 0 6px 16px rgba(0, 87, 184, .17);
  font-size: 11px;
}

#savedCalculationsView .saved-calculation-open::after {
  font-size: 15px;
}

#savedCalculationsView .saved-calculation-open:hover {
  border-color: transparent;
  color: #fff;
  background: var(--cobalt);
  box-shadow: 0 8px 20px rgba(0, 87, 184, .22);
}

#savedCalculationsView .saved-calculation-delete {
  width: 44px;
  min-width: 44px;
  flex-basis: 44px;
  color: #8f6870;
}

#savedCalculationsView .calculator-history-pagination {
  min-width: 1180px;
  padding-inline: 20px;
}

@media (max-width: 1400px) {
  #savedCalculationsView .calculator-history-columns,
  #savedCalculationsView .saved-calculation-card {
    min-width: 900px;
    grid-template-columns: 110px minmax(170px, 1fr) 52px 86px 94px 102px 238px;
    gap: 8px;
    padding-inline: 14px;
  }

  #savedCalculationsView .calculator-history-link {
    width: 42px;
    min-width: 42px;
    padding-inline: 0;
  }

  #savedCalculationsView .calculator-history-link span {
    display: none;
  }

  #savedCalculationsView .saved-calculation-open {
    min-width: 82px;
    padding-inline: 10px;
  }

  #savedCalculationsView .saved-calculation-delete {
    width: 42px;
    min-width: 42px;
    flex-basis: 42px;
  }

  #savedCalculationsView .calculator-history-pagination {
    min-width: 900px;
    padding-inline: 14px;
  }
}

@media (max-width: 700px) {
  #savedCalculationsView .calculator-history-columns,
  #savedCalculationsView .saved-calculation-card,
  #savedCalculationsView .calculator-history-pagination {
    min-width: 900px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .settlement-operation-dialog[open] {
    animation: none;
  }

  #savedCalculationsView .calculator-history-new,
  #savedCalculationsView .calculator-history-pdf,
  #savedCalculationsView .calculator-history-link,
  #savedCalculationsView .saved-calculation-open,
  #savedCalculationsView .saved-calculation-delete {
    transition: none;
  }
}

/* Shipment register responsive overrides must follow legacy media rules. */
@media (max-width: 1480px) {
  .transport-hero { grid-template-columns: 1fr; }
  .transport-hero-copy {
    min-height: 0;
    padding-right: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
    column-gap: 40px;
  }
  .transport-hero-copy-head {
    min-height: 0;
    padding: 4px 0 2px;
    grid-column: 1;
    align-content: start;
  }
  .transport-hero-total {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    margin-top: 0;
    border-top: 0;
    border-left: 1px solid var(--border);
    padding-top: 0;
    padding-left: 24px;
    align-self: stretch;
    align-content: center;
  }
  .transport-hero-summary {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 18px;
    padding-left: 0;
  }
  .transport-hero-summary-row:first-child { border-left: 0; }
}

@media (max-width: 1220px) {
  .transport-register-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 258px 190px;
  }
  .transport-type-nav { overflow-x: hidden; }
  .transport-type-nav [data-transport-type] {
    min-width: 0;
    flex: 1 1 0;
  }
}

@media (max-width: 1080px) {
  .transport-hero-summary { grid-template-columns: 1fr; }
  .transport-hero-summary .transport-hero-summary-row {
    min-height: 0;
    padding: 0 8px;
    border-left: 0;
  }
  .transport-hero-summary-row + .transport-hero-summary-row {
    border-top: 1px solid var(--border);
  }
  .transport-hero-summary-main { min-height: 0; }
  .transport-hero-summary-head {
    min-height: 126px;
    padding: 24px 0 20px;
  }
  .transport-hero-metrics {
    padding: 18px 0 24px;
  }
}

@media (max-width: 760px) {
  .transport-hero { min-height: 0; padding: 18px; }
  .transport-hero-copy { min-height: 0; display: flex; }
  .transport-hero-copy-head {
    min-height: 0;
    padding: 0;
    align-content: start;
  }
  .transport-hero-copy-head h2 { font-size: 28px; }
  .transport-hero-total {
    max-width: none;
    margin-top: 24px;
    border-top: 1px solid var(--border);
    border-left: 0;
    padding-top: 16px;
    padding-left: 0;
  }
  .transport-hero-summary { padding-top: 16px; }
  .transport-hero-summary .transport-hero-summary-row { padding: 0; }
  .transport-hero-summary-head {
    min-height: 0;
    padding: 22px 0 18px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
  }
  .transport-hero-summary-head .transport-summary-icon {
    width: 38px;
    height: 38px;
  }
  .transport-hero-summary-name strong { font-size: 17px; }
  .transport-hero-summary-name small {
    margin-top: 6px;
    font-size: 11px;
  }
  .transport-hero-metrics {
    padding: 16px 0 22px;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(68px, 0.68fr);
  }
  .transport-hero-metric { padding: 0 8px; }
  .transport-hero-metric:first-child { padding-left: 0; }
  .transport-hero-metric small { font-size: 10px; }
  .transport-hero-metric strong {
    margin-top: 7px;
    font-size: clamp(13px, 3.55vw, 18px);
  }
  .transport-register-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .transport-lifecycle-switch,
  .transport-lifecycle-switch button {
    min-height: 44px;
  }
  .transport-type-nav { min-height: 54px; }
  .transport-type-nav [data-transport-type] {
    min-width: 0;
    padding: 0 10px;
    font-size: 12px;
  }
  .transport-create-button {
    min-width: 0;
    flex: 0 0 auto;
    padding-inline: 8px;
    overflow: hidden;
    font-size: 12px;
    white-space: nowrap;
  }
}

/* Team tasks */
.tasks-page {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.tasks-hero {
  min-height: 0;
  padding: 38px 44px 0;
  display: grid;
  grid-template-rows: auto auto;
  align-items: stretch;
  gap: 30px;
  overflow: hidden;
  border: 1px solid #d6dee8;
  border-radius: 12px;
  background: #ffffff;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 10px 30px rgba(17, 24, 39, 0.055);
}

.tasks-hero-top {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.tasks-hero-copy p,
.tasks-history-head p {
  margin: 0 0 6px;
  color: var(--cobalt);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.tasks-hero-copy p {
  margin-bottom: 12px;
  font-size: 14px;
}

.tasks-hero-copy h2,
.tasks-register-head h2,
.tasks-history-head h2 {
  margin: 0;
  color: var(--text);
  font-weight: 640;
  letter-spacing: 0;
}

.tasks-hero-copy h2 {
  font-size: clamp(42px, 3.4vw, 50px);
  line-height: 1;
  font-weight: 680;
  letter-spacing: -0.025em;
}
.tasks-hero-copy > span {
  display: block;
  max-width: 610px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}

.tasks-hero-stats {
  min-width: 0;
  margin-inline: -44px;
  padding-inline: 44px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 0;
  border-top: 1px solid #d9e1ea;
  border-radius: 0;
  background: #fbfcfe;
  box-shadow: none;
}

.tasks-stat {
  min-width: 0;
  min-height: 104px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  border-left: 1px solid rgba(188, 201, 216, 0.52);
}
.tasks-stat:first-child { border-left: 0; }
.tasks-stat-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(218, 227, 237, 0.88);
  border-radius: 14px;
  color: var(--cobalt);
  background: #ffffff;
  box-shadow: inset 0 1px 0 #ffffff;
}
.tasks-stat-icon .nav-icon { width: 25px; height: 25px; }
.tasks-stat-copy { min-width: 0; display: block; }
.tasks-stat strong { display: block; color: var(--text); font-size: 32px; line-height: 1; font-weight: 670; letter-spacing: -0.02em; }
.tasks-stat small { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.tasks-stat.red strong { color: var(--critical); }
.tasks-stat.red .tasks-stat-icon { color: var(--critical); }
.tasks-stat.green strong { color: var(--success); }
.tasks-stat.green .tasks-stat-icon { color: var(--success); }
.tasks-stat.blue strong { color: var(--cobalt); }

.tasks-hero-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.tasks-hero-actions button {
  min-width: 166px;
  min-height: 52px;
  padding-inline: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  font-size: 14px;
}
.tasks-hero-actions button .nav-icon { width: 21px; height: 21px; }
.tasks-hero-actions #newTaskBtn { min-width: 158px; box-shadow: 0 8px 18px rgba(0, 87, 184, 0.14); }
.tasks-day-button {
  color: var(--cobalt);
  border: 1px solid rgba(166, 187, 213, 0.72);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 #ffffff, 0 5px 12px rgba(38, 65, 96, 0.035);
}
.tasks-day-button:hover { border-color: rgba(0, 87, 184, 0.42); background: rgba(255, 255, 255, 0.76); }

.tasks-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.tasks-page.tasks-no-day-access .tasks-layout { grid-template-columns: minmax(0, 1fr); }
.tasks-register {
  min-width: 0;
  overflow: hidden;
  border-color: #d7dee7;
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.055);
}

.tasks-register-head {
  min-height: 88px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
}
.tasks-register-head h2 { font-size: 21px; }
.tasks-register-head > div > span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.tasks-search { width: min(372px, 44%); }
.tasks-search input { min-height: 44px; font-size: 13px; }

.tasks-filter-bar {
  min-height: 72px;
  padding: 10px 18px 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.84);
}
.tasks-scope-tabs { min-width: 0; display: flex; align-items: center; gap: 6px; overflow-x: auto; }
.tasks-scope-tabs button {
  min-height: 42px;
  padding: 0 16px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 590;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.tasks-scope-tabs button:hover { color: var(--text); background: rgba(221, 227, 234, 0.5); }
.tasks-scope-tabs button.active {
  color: var(--white);
  background: var(--cobalt-active);
  box-shadow: 0 7px 16px rgba(0, 87, 184, 0.16);
}

.tasks-inline-filter { display: grid; gap: 3px; color: var(--muted); font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; }
.tasks-inline-filter select {
  min-width: 180px;
  height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 540;
  text-transform: none;
  letter-spacing: 0;
}

.tasks-table-head,
.tasks-table-row {
  display: grid;
  grid-template-columns: 40px minmax(300px, 1.2fr) minmax(290px, 0.95fr) 145px 100px 28px;
  align-items: center;
  column-gap: 16px;
}
.tasks-table-head {
  min-height: 56px;
  padding: 0 24px;
  color: var(--muted);
  background: #fbfcfd;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 680;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}
.tasks-table-row {
  position: relative;
  min-height: 108px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(221, 227, 234, 0.86);
  transition: background 160ms ease, box-shadow 160ms ease;
}
.tasks-table-row:last-child { border-bottom: 0; }
.tasks-table-row:hover { background: #f7faff; box-shadow: inset 3px 0 0 var(--cobalt); }
.tasks-table-row.completed { background: #fbfcfd; }
.tasks-table-row.completed .task-main-cell strong { color: var(--muted); text-decoration: line-through; text-decoration-color: #aeb8c5; }

.task-complete-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.task-check-surface {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1.5px solid #b8c2ce;
  border-radius: 50%;
  background: var(--white);
  color: transparent;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}
.task-complete-toggle:hover .task-check-surface { border-color: var(--cobalt); }
.task-complete-toggle.checked .task-check-surface { border-color: var(--success); background: var(--success); color: var(--white); }
.task-complete-toggle.viewer-only .task-check-surface { border-style: dashed; background: #f8fafc; }
.task-complete-toggle.viewer-only:hover .task-check-surface { border-color: #8b98a9; background: #f1f5f9; }
.task-check-icon {
  width: 13px;
  height: 13px;
  display: block;
  background: currentColor;
  -webkit-mask: url("/assets/icons/phosphor-check-circle-regular.svg") center / contain no-repeat;
  mask: url("/assets/icons/phosphor-check-circle-regular.svg") center / contain no-repeat;
}

.task-main-cell,
.task-row-open {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.task-main-cell strong,
.task-main-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-main-cell strong { color: var(--text); font-size: 14px; font-weight: 650; }
.task-main-cell small { margin-top: 6px; color: var(--muted); font-size: 12px; }
.task-subtask-mark {
  margin-right: 8px;
  padding: 3px 7px;
  display: inline-flex;
  vertical-align: 1px;
  border-radius: 999px;
  color: var(--cobalt);
  background: #eaf2ff;
  font-size: 9px;
  font-style: normal;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.task-subtask-progress { max-width: 260px; margin-top: 9px; display: flex; align-items: center; gap: 8px; }
.task-subtask-progress > span { width: 76px; height: 4px; overflow: hidden; border-radius: 999px; background: #e8edf3; }
.task-subtask-progress i { width: var(--task-progress); height: 100%; display: block; border-radius: inherit; background: var(--cobalt-active); }
.task-subtask-progress b { color: var(--muted); font-size: 10px; font-weight: 620; }
.tasks-table-row.subtask-row { box-shadow: inset 3px 0 0 rgba(0, 87, 184, .28); }
.tasks-table-row.subtask-row:hover { box-shadow: inset 3px 0 0 var(--cobalt); }
.task-row-open { color: #8b98a9; font-size: 24px; line-height: 1; text-align: center; }

.task-assignee-cell { min-width: 0; display: flex; align-items: center; gap: 9px; }
.task-assignee-avatars { display: flex; flex: 0 0 auto; padding-left: 7px; }
.task-assignee-avatars > b {
  width: 34px;
  height: 34px;
  margin-left: -7px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 50%;
  color: var(--cobalt);
  background: #eaf2ff;
  font-size: 11px;
  font-weight: 720;
}
.task-assignee-cell > span:last-child { min-width: 0; }
.task-assignee-cell strong,
.task-assignee-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-assignee-cell strong { color: var(--text); font-size: 12px; font-weight: 620; }
.task-assignee-cell small { margin-top: 4px; color: var(--muted); font-size: 10px; }

.task-due-cell { position: relative; padding-left: 14px; }
.task-due-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 44px;
  border-radius: 2px;
  background: #cbd5e1;
  transform: translateY(-50%);
}
.task-due-cell strong,
.task-due-cell small { display: block; }
.task-due-cell strong { color: var(--text); font-size: 12px; font-weight: 660; }
.task-due-cell small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.task-due-cell.overdue strong { color: var(--critical); }
.task-due-cell.overdue::before { background: var(--critical); }
.task-due-cell.today strong { color: var(--cobalt); }
.task-due-cell.today::before { background: var(--cobalt); }
.task-due-cell.upcoming::before { background: #d97706; }
.task-due-cell.done strong { color: var(--success); }
.task-due-cell.done::before { background: var(--success); }

.task-status {
  min-height: 28px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #475467;
  background: #f0f2f5;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.task-status.in_progress { color: var(--cobalt); background: #eaf2ff; }
.task-status.done { color: #15803d; background: #eaf7ee; }

.tasks-history { min-width: 0; overflow: hidden; }
.tasks-history-head {
  min-height: 78px;
  padding: 17px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.tasks-history-head h2 { font-size: 16px; }
.tasks-history-controls { display: flex; align-items: center; gap: 8px; }
.tasks-history-controls > span {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--cobalt);
  background: #eaf2ff;
  font-size: 11px;
  font-weight: 700;
}
.tasks-history-controls > button {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #d4dce6;
  border-radius: 10px;
  color: var(--cobalt);
  background: var(--white);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.tasks-history-controls > button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tasks-history-controls > button:hover:not(:disabled) {
  border-color: rgba(0, 87, 184, 0.44);
  background: #f3f8ff;
  box-shadow: 0 5px 12px rgba(0, 87, 184, 0.08);
}
.tasks-history-controls > button:active:not(:disabled) { background: #eaf2ff; }
.tasks-history-controls > button:disabled { color: #aeb8c5; background: #f7f9fb; cursor: default; opacity: 0.58; }
.tasks-history-list {
  --history-cards-per-view: 5;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc(100% / var(--history-cards-per-view));
  grid-template-columns: none;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}
.tasks-history-list::-webkit-scrollbar { display: none; }
.tasks-history-list.empty { display: block; }
.tasks-history-list > * { min-width: 0; border-right: 1px solid var(--border); scroll-snap-align: start; }
.tasks-history-list > *:last-child { border-right: 0; }
.task-history-card { min-height: 188px; border-bottom: 0; }
.task-history-card > button {
  width: 100%;
  min-height: 188px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  background: var(--white);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.task-history-card > button:hover,
.task-history-card.expanded > button { background: #f7faff; }
.task-history-card > button > span:last-child { text-align: right; }
.task-history-card strong,
.task-history-card small,
.task-history-card b { display: block; }
.task-history-card strong { color: var(--text); font-size: 12px; font-weight: 640; }
.task-history-card b { color: var(--cobalt); font-size: 13px; }
.task-history-card small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.task-history-items { padding: 0 16px 12px; background: #f7faff; }
.task-history-items > div { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 7px; padding: 5px 0; color: var(--text); font-size: 10px; line-height: 1.35; }
.task-history-items i { width: 14px; height: 14px; display: grid; place-items: center; border: 1px solid #b8c2ce; border-radius: 50%; color: transparent; font-size: 8px; font-style: normal; }
.task-history-items i::before {
  content: "";
  width: 10px;
  height: 10px;
  display: block;
  background: currentColor;
  -webkit-mask: url("/assets/icons/phosphor-check-circle-regular.svg") center / contain no-repeat;
  mask: url("/assets/icons/phosphor-check-circle-regular.svg") center / contain no-repeat;
}
.task-history-items .done { color: var(--muted); text-decoration: line-through; }
.task-history-items .done i { color: var(--white); border-color: var(--success); background: var(--success); text-decoration: none; }
.task-history-empty { min-height: 180px; padding: 28px 20px; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.task-history-empty strong { color: var(--text); font-size: 13px; }
.task-history-empty span { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.5; }

.task-dialog,
.task-day-dialog,
.task-day-report-dialog {
  width: min(900px, calc(100vw - 28px));
  max-height: min(860px, calc(100dvh - 28px));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(221, 227, 234, 0.96);
  border-radius: 16px;
  background: var(--white);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(17, 24, 39, 0.22);
}
.task-dialog { width: min(900px, calc(100vw - 28px)); }
.task-day-dialog { width: min(760px, calc(100vw - 28px)); }
.task-day-report-dialog { width: min(960px, calc(100vw - 28px)); }
.task-dialog::backdrop,
.task-day-dialog::backdrop,
.task-day-report-dialog::backdrop { background: rgba(17, 24, 39, 0.44); }
.task-dialog form,
.task-day-dialog form { max-height: inherit; display: flex; flex-direction: column; }
.task-day-report-shell { max-height: inherit; display: flex; flex-direction: column; }
.task-dialog-head {
  min-height: 96px;
  margin: 0;
  padding: 21px 26px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--border);
}
.task-dialog-head > div > span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.task-dialog-head h2 { font-size: 23px; }
.dialog-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  color: var(--muted);
  font: inherit;
  font-size: 20px;
  cursor: pointer;
}
.task-dialog-body,
.task-day-body { overflow: auto; }
.task-day-body { padding: 20px 22px 4px; }
.task-dialog-body { padding: 0; display: block; }
.task-dialog input,
.task-dialog select,
.task-dialog textarea,
.task-day-dialog select,
.task-day-dialog textarea { font-family: inherit; }
.task-dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.78fr);
  align-items: stretch;
}
.task-dialog-main,
.task-dialog-side { min-width: 0; padding: 24px 26px 26px; }
.task-dialog-main { display: grid; align-content: start; gap: 18px; }
.task-dialog-side {
  display: grid;
  align-content: start;
  gap: 18px;
  border-left: 1px solid var(--border);
  background: #fbfcfd;
}
.task-form-section-head {
  min-height: 44px;
  padding-bottom: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}
.task-form-section-head strong,
.task-form-section-head span { display: block; }
.task-form-section-head strong { color: var(--text); font-size: 14px; font-weight: 670; }
.task-form-section-head span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.task-form-section-head > b {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--cobalt);
  background: #eaf2ff;
  font-size: 10px;
  font-weight: 720;
}
.task-dialog-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.task-dialog .field { gap: 8px; font-size: 12px; }
.task-dialog .field input,
.task-dialog .field select,
.task-dialog .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  background: var(--white);
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.task-dialog .field input,
.task-dialog .field select { min-height: 46px; padding: 0 13px; }
.task-dialog .field textarea { min-height: 108px; padding: 12px 13px; line-height: 1.5; }
.task-dialog .task-title-field input { min-height: 52px; font-size: 15px; font-weight: 600; }
.task-dialog .task-description-field textarea { min-height: 138px; }
.task-dialog .task-result-field textarea { min-height: 116px; }
.task-subtasks-section { display: grid; gap: 12px; }
.task-subtasks-head { margin-top: 2px; }
.task-subtasks-list { display: grid; gap: 9px; }
.task-subtasks-empty {
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: var(--muted);
  background: #fbfcfd;
  font-size: 11px;
  line-height: 1.5;
}
.task-subtask-row {
  padding: 11px;
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1.2fr) 40px;
  align-items: end;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fbfcfd;
}
.task-subtask-row label { min-width: 0; display: grid; gap: 6px; }
.task-subtask-row label > span { color: var(--muted); font-size: 9px; font-weight: 650; }
.task-subtask-row label:first-child { grid-column: 1 / -1; }
.task-dialog .task-subtask-row input,
.task-dialog .task-subtask-row select { min-height: 40px; height: 40px; padding: 0 10px; font-size: 11px; }
.task-dialog .task-subtask-row label:first-child input { min-height: 44px; height: 44px; font-size: 12px; font-weight: 600; }
.task-subtask-row > button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--white);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}
.task-subtask-row > button:hover { color: var(--critical); border-color: #fecaca; background: #fff7f7; }
.task-subtask-add { min-height: 44px; justify-self: start; color: var(--cobalt); font-weight: 650; }
.task-dialog .field input:hover,
.task-dialog .field select:hover,
.task-dialog .field textarea:hover { border-color: #b8c4d1; }
.task-dialog .field input:focus,
.task-dialog .field select:focus,
.task-dialog .field textarea:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(0, 87, 184, 0.1);
}
.task-assignees-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.task-assignees-field legend {
  margin: 0 0 8px;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.task-assignees-field > small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.task-assignee-options { display: grid; grid-template-columns: 1fr; gap: 8px; }
.task-assignee-option {
  min-width: 0;
  min-height: 58px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 20px 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.task-assignee-option:hover { border-color: #aebdce; background: #fbfdff; }
.task-assignee-option:has(input:checked) { border-color: rgba(0, 87, 184, 0.55); background: #f3f8ff; }
.task-dialog .task-assignee-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.task-assignee-option-mark { width: 20px; height: 20px; display: grid; place-items: center; border: 1.5px solid #aeb8c5; border-radius: 6px; color: transparent; background: var(--white); }
.task-assignee-option input:checked + .task-assignee-option-mark { color: var(--white); border-color: var(--cobalt); background: var(--cobalt); }
.task-assignee-option input:focus-visible + .task-assignee-option-mark { outline: 3px solid rgba(0, 87, 184, 0.2); outline-offset: 2px; }
.task-assignee-option > b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--cobalt); background: #eaf2ff; font-size: 9px; }
.task-assignee-option > span:last-child { min-width: 0; }
.task-assignee-option strong,
.task-assignee-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-assignee-option strong { color: var(--text); font-size: 11px; font-weight: 630; }
.task-assignee-option small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.task-dialog textarea,
.task-day-dialog textarea { resize: vertical; }
.task-form-message { min-height: 0; color: var(--critical); font-size: 11px; line-height: 1.4; }
.task-dialog .task-form-message:not(:empty) { min-height: 36px; padding: 9px 26px; border-top: 1px solid #fecaca; background: #fff7f7; }
.task-dialog .dialog-actions,
.task-day-dialog .dialog-actions {
  min-height: 76px;
  margin: 0;
  padding: 15px 26px;
  flex: 0 0 auto;
  border-top: 1px solid var(--border);
  background: #fbfcfd;
}
.task-dialog .dialog-actions { grid-template-columns: auto minmax(0, 1fr) auto auto auto; }
.task-dialog .dialog-actions button { min-height: 44px; padding-inline: 18px; }

.task-day-setting {
  min-height: 68px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel);
}
.task-day-setting > div strong,
.task-day-setting > div span,
.task-day-manual-head strong,
.task-day-manual-head span { display: block; }
.task-day-setting > div strong,
.task-day-manual-head strong { color: var(--text); font-size: 12px; font-weight: 650; }
.task-day-setting > div span,
.task-day-manual-head span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.task-day-setting .tasks-inline-filter select { min-width: 104px; }
.task-day-suggestions { display: grid; gap: 12px; margin-top: 14px; }
.task-day-group { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.task-day-group-head { min-height: 54px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); background: #fbfcfd; }
.task-day-group-head strong,
.task-day-group-head span { display: block; }
.task-day-group-head strong { color: var(--text); font-size: 12px; font-weight: 660; }
.task-day-group.overdue .task-day-group-head strong { color: var(--critical); }
.task-day-group-head span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.task-day-group-head b { min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px; color: var(--cobalt); background: #eaf2ff; font-size: 10px; }
.task-day-choice { min-height: 48px; padding: 8px 13px; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 10px; border-bottom: 1px solid rgba(221, 227, 234, 0.78); cursor: pointer; }
.task-day-choice:last-child { border-bottom: 0; }
.task-day-choice:hover { background: #f8fbff; }
.task-day-choice input { position: absolute; opacity: 0; pointer-events: none; }
.task-day-check { width: 22px; height: 22px; display: grid; place-items: center; border: 1.5px solid #b8c2ce; border-radius: 6px; color: transparent; }
.task-day-choice input:checked + .task-day-check { color: var(--white); border-color: var(--cobalt); background: var(--cobalt); }
.task-day-choice input:focus-visible + .task-day-check { outline: 3px solid rgba(0, 87, 184, 0.2); outline-offset: 2px; }
.task-day-choice > span:last-child strong,
.task-day-choice > span:last-child small { display: block; }
.task-day-choice > span:last-child strong { color: var(--text); font-size: 11px; font-weight: 590; }
.task-day-choice > span:last-child small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.task-day-manual { margin-top: 14px; padding: 14px; border: 1px dashed #c9d2dd; border-radius: 11px; }
.task-day-manual-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.task-day-add-row { min-height: 36px; padding: 0 12px; border: 1px solid #b9cbe0; border-radius: 8px; color: var(--cobalt); background: var(--white); font: inherit; font-size: 10px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.task-day-add-row:hover { border-color: var(--cobalt); background: #f3f8ff; }
.task-day-manual-rows { margin-top: 12px; display: grid; gap: 8px; }
.task-day-manual-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 0.38fr) 36px; align-items: end; gap: 8px; }
.task-day-manual-row label { min-width: 0; display: grid; gap: 4px; }
.task-day-manual-row label > span { color: var(--muted); font-size: 9px; font-weight: 620; }
.task-day-manual-row input,
.task-day-manual-row select { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--white); font: inherit; font-size: 11px; }
.task-day-manual-row select { padding-right: 28px; }
.task-day-manual-row > button { width: 36px; height: 38px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: var(--white); font: inherit; font-size: 18px; cursor: pointer; }
.task-day-manual-row > button:hover { color: var(--critical); border-color: rgba(198, 40, 40, 0.35); background: #fff8f8; }
.task-day-empty { min-height: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 11px; background: #fbfcfd; text-align: center; }
.task-day-empty strong { color: var(--text); font-size: 12px; }
.task-day-empty span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.task-day-actions { grid-template-columns: minmax(0, 1fr) auto auto !important; }
.task-day-actions > span { color: var(--muted); font-size: 11px; font-weight: 600; }

.task-history-card > button { min-height: 82px; }
.task-history-card > button:hover { background: #f7faff; }
.task-history-card > button > span:last-child { display: grid; justify-items: end; }
.task-history-state {
  width: fit-content;
  min-height: 21px;
  margin: 0 0 5px;
  padding: 0 7px;
  display: inline-flex !important;
  align-items: center;
  border-radius: 999px;
  color: var(--cobalt);
  background: #eaf2ff;
  font-size: 8px !important;
  font-style: normal;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}
.task-history-state.closed { color: #15803d; background: #eaf7ee; }
.task-history-card.closed b { color: var(--success); }
.task-history-results { display: grid !important; gap: 2px; }
.task-history-results span { display: block; font-weight: 650; line-height: 1.3; white-space: nowrap; }
.task-history-results .completed { color: #15803d; }
.task-history-results .in-progress { color: var(--cobalt); }
.task-history-results .rescheduled,
.task-history-results .overdue { color: var(--critical); }
.task-history-results .empty { color: var(--muted); font-weight: 500; }

.task-day-report-head { min-height: 104px; }
.task-day-report-head > div > p { color: var(--cobalt); }
.task-day-report-body { min-height: 0; padding: 20px 24px 24px; overflow: auto; background: #f7f9fc; }
.task-day-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
}
.task-day-report-summary > div { min-height: 76px; padding: 15px 18px; border-left: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; }
.task-day-report-summary > div:first-child { border-left: 0; }
.task-day-report-summary strong { color: var(--text); font-size: 25px; line-height: 1; font-weight: 660; }
.task-day-report-summary span { margin-top: 7px; color: var(--muted); font-size: 10px; }
.task-day-report-summary .completed strong { color: var(--success); }
.task-day-report-summary .pending strong { color: var(--cobalt); }
.task-day-report-summary .overdue strong { color: var(--critical); }
.task-day-report-note {
  min-height: 60px;
  margin-top: 14px;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(0, 87, 184, 0.18);
  border-radius: 11px;
  background: #f0f6ff;
}
.task-day-report-note strong { color: var(--graphite); font-size: 12px; font-weight: 670; }
.task-day-report-note span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.task-day-report-items { display: grid; gap: 10px; margin-top: 14px; }
.task-day-report-item {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.035);
}
.task-day-report-item::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #cbd5e1; }
.task-day-report-item.completed::before { background: var(--success); }
.task-day-report-item.overdue::before { background: var(--critical); }
.task-day-report-item.pending::before { background: var(--cobalt); }
.task-day-report-index {
  min-height: 128px;
  padding: 18px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-right: 1px solid var(--border);
  background: #fbfcfd;
}
.task-day-report-index > span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 0.04em; }
.task-day-report-index > i { width: 26px; height: 26px; display: grid; place-items: center; border: 1.5px solid #bdc7d3; border-radius: 50%; color: transparent; background: var(--white); }
.task-day-report-item.completed .task-day-report-index > i { color: var(--white); border-color: var(--success); background: var(--success); }
.task-day-report-item.overdue .task-day-report-index > i { border-color: rgba(220, 38, 38, 0.42); background: #fff7f7; }
.task-day-report-content { min-width: 0; padding: 16px 18px 17px; }
.task-day-report-row-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.task-day-report-row-head > div { min-width: 0; }
.task-day-report-row-head > div > strong { display: block; color: var(--text); font-size: 14px; line-height: 1.35; font-weight: 650; }
.task-day-report-row-head > div > span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.task-day-report-status { min-width: 116px; min-height: 42px; padding: 7px 10px; flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; border-radius: 9px; color: var(--cobalt); background: #edf4ff; font-size: 10px; line-height: 1.2; font-weight: 700; }
.task-day-report-status small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 540; }
.task-day-report-status.completed { color: #15803d; background: #eaf7ee; }
.task-day-report-status.overdue { color: var(--critical); background: #fff0f0; }
.task-day-report-details { margin-top: 13px; padding-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; border-top: 1px solid rgba(221, 227, 234, 0.78); }
.task-day-report-result span,
.task-day-report-result strong,
.task-day-report-fact span,
.task-day-report-fact strong { display: block; }
.task-day-report-result span,
.task-day-report-fact span { color: var(--muted); font-size: 8px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.035em; }
.task-day-report-result strong,
.task-day-report-fact strong { margin-top: 5px; color: var(--graphite); font-size: 10px; line-height: 1.45; font-weight: 560; }
.task-day-report-fact { min-width: 176px; padding-left: 16px; border-left: 1px solid var(--border); }
.task-day-report-assignee-list { margin-top: 12px; display: grid; gap: 7px; }
.task-day-report-assignee {
  min-height: 46px;
  padding: 7px 10px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fbfcfd;
}
.task-day-report-assignee > b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--cobalt); background: #eaf2ff; font-size: 9px; }
.task-day-report-assignee > span { min-width: 0; }
.task-day-report-assignee strong,
.task-day-report-assignee small { display: block; }
.task-day-report-assignee strong { color: var(--text); font-size: 10px; font-weight: 640; }
.task-day-report-assignee small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.task-day-report-assignee.completed { border-color: #cfe9d7; background: #f4fbf6; }
.task-day-report-assignee.completed > b { color: #15803d; background: #e3f5e8; }
.task-day-report-assignee.completed small { color: #15803d; }
.task-day-report-assignee.overdue { border-color: #f2d0d0; background: #fffafa; }
.task-day-report-assignee.overdue > b { color: var(--critical); background: #fff0f0; }
.task-day-report-assignee.overdue small { color: var(--critical); }
.task-day-overdue-reason { margin-top: 13px; display: grid; gap: 6px; }
.task-day-overdue-reason > span { color: var(--critical); font-size: 9px; font-weight: 670; }
.task-day-overdue-reason textarea {
  width: 100%;
  min-height: 62px;
  padding: 10px 11px;
  resize: vertical;
  border: 1px solid #efc1c1;
  border-radius: 8px;
  outline: 0;
  color: var(--text);
  background: #fffafa;
  font: inherit;
  font-size: 11px;
  line-height: 1.45;
}
.task-day-overdue-reason textarea:focus { border-color: var(--critical); box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08); }
.task-day-overdue-reason.readonly { padding: 10px 12px; border-radius: 8px; background: #fff7f7; }
.task-day-overdue-reason.readonly strong { color: var(--graphite); font-size: 10px; line-height: 1.45; font-weight: 560; }
.task-day-report-open { margin-top: 12px; padding: 0; border: 0; color: var(--cobalt); background: transparent; font: inherit; font-size: 10px; font-weight: 650; cursor: pointer; }
.task-day-report-open:hover { color: var(--cobalt-active); }
.task-day-report-open span { margin-left: 5px; font-size: 16px; vertical-align: -1px; }
.task-day-report-empty { min-height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 12px; background: var(--white); }
.task-day-report-empty strong { color: var(--text); font-size: 13px; }
.task-day-report-empty span { margin-top: 6px; color: var(--muted); font-size: 10px; }
.task-day-report-message:not(:empty) { margin-top: 12px; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 8px; background: #fff7f7; }
.task-day-report-actions { grid-template-columns: auto minmax(0, 1fr) auto auto !important; min-height: 78px; margin: 0 !important; padding: 15px 24px !important; border-top: 1px solid var(--border); background: #fbfcfd; }
.task-day-report-actions > span { color: var(--muted); font-size: 10px; font-weight: 590; }
.task-day-report-actions button { min-height: 44px; padding-inline: 18px; }

.tasks-page button:focus-visible,
.tasks-history-list:focus-visible,
.task-dialog button:focus-visible,
.task-day-dialog button:focus-visible,
.task-day-report-dialog button:focus-visible,
.tasks-page select:focus-visible,
.task-dialog input:focus-visible,
.task-dialog select:focus-visible,
.task-dialog textarea:focus-visible,
.task-day-dialog select:focus-visible,
.task-day-dialog input:focus-visible,
.task-day-dialog textarea:focus-visible,
.task-day-report-dialog textarea:focus-visible {
  outline: 3px solid rgba(0, 87, 184, 0.18);
  outline-offset: 2px;
}

@media (max-width: 1280px) {
  .tasks-hero { padding: 34px 32px 0; }
  .tasks-hero-top { gap: 24px; }
  .tasks-hero-stats { margin-inline: -32px; padding-inline: 32px; }
  .tasks-stat { padding-inline: 18px; gap: 13px; }
  .tasks-stat-icon { width: 44px; height: 44px; }
  .tasks-table-head,
  .tasks-table-row { grid-template-columns: 34px minmax(220px, 1fr) minmax(130px, 0.5fr) 112px 96px 24px; column-gap: 9px; }
}

@media (max-width: 1050px) {
  .tasks-layout { grid-template-columns: 1fr; }
  .tasks-history-list { --history-cards-per-view: 3; }
  .tasks-hero { min-height: 0; }
  .tasks-hero-top { align-items: flex-start; flex-direction: column; }
  .tasks-hero-actions { width: 100%; justify-content: flex-start; }
  .tasks-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tasks-stat:nth-child(odd) { border-left: 0; }
  .tasks-stat:nth-child(n + 3) { border-top: 1px solid rgba(188, 201, 216, 0.52); }
}

@media (max-width: 760px) {
  .tasks-history-head { padding-inline: 14px; }
  .tasks-history-controls { gap: 6px; }
  .tasks-history-controls > button { width: 44px; height: 44px; }
  .tasks-history-list { --history-cards-per-view: 1; }
  .task-history-card,
  .task-history-card > button { min-height: 156px; }
  .tasks-hero { padding: 22px 16px 0; gap: 22px; border-radius: 12px; }
  .tasks-hero-copy p { margin-bottom: 8px; font-size: 12px; }
  .tasks-hero-copy h2 { font-size: 39px; }
  .tasks-hero-copy > span { margin-top: 12px; font-size: 13px; }
  .tasks-hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .tasks-hero-actions button { min-width: 0; min-height: 48px; padding-inline: 10px; gap: 7px; font-size: 12px; }
  .tasks-hero-actions #newTaskBtn { min-width: 0; }
  .tasks-hero-actions button .nav-icon { width: 18px; height: 18px; }
  .tasks-hero-stats { margin-inline: -16px; padding-inline: 16px; border-radius: 0; }
  .tasks-stat { min-height: 84px; padding: 12px; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
  .tasks-stat-icon { width: 38px; height: 38px; border-radius: 11px; }
  .tasks-stat-icon .nav-icon { width: 21px; height: 21px; }
  .tasks-stat strong { font-size: 25px; }
  .tasks-stat small { margin-top: 5px; font-size: 10px; }
  .tasks-register-head { align-items: stretch; flex-direction: column; }
  .tasks-search { width: 100%; }
  .tasks-filter-bar { align-items: stretch; flex-direction: column; padding: 9px 12px 12px; }
  .tasks-inline-filter select { width: 100%; }
  .tasks-table-head { display: none; }
  .tasks-table-row {
    min-height: 124px;
    padding: 14px;
    grid-template-columns: 30px minmax(0, 1fr) 24px;
    grid-template-rows: auto auto auto;
    gap: 8px 10px;
  }
  .task-main-cell { grid-column: 2; grid-row: 1; }
  .task-row-open { grid-column: 3; grid-row: 1; }
  .task-assignee-cell { grid-column: 2; grid-row: 2; }
  .task-due-cell { grid-column: 2; grid-row: 3; }
  .tasks-table-row > span:has(.task-status) { grid-column: 3; grid-row: 3; justify-self: end; }
  .task-complete-toggle { grid-column: 1; grid-row: 1; }
  .task-complete-toggle { width: 44px; height: 44px; margin: -10px 0 0 -10px; }
  .dialog-close { width: 44px; height: 44px; }
  .task-dialog input,
  .task-dialog select,
  .task-dialog textarea,
  .task-day-dialog select,
  .task-day-dialog textarea,
  .task-day-report-dialog textarea { font-size: 16px; }
  .task-dialog-grid { grid-template-columns: 1fr; }
  .task-dialog-layout { grid-template-columns: 1fr; }
  .task-dialog-main,
  .task-dialog-side { padding: 20px 16px; }
  .task-subtask-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .task-dialog .task-subtask-row input,
  .task-dialog .task-subtask-row select { min-height: 44px; height: 44px; }
  .task-subtask-row label:first-child { grid-column: 1 / -1; grid-row: 1; }
  .task-subtask-row label:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .task-subtask-row label:nth-child(3) { grid-column: 1; grid-row: 3; }
  .task-subtask-row > button { width: 44px; height: 44px; grid-column: 2; grid-row: 3; align-self: end; }
  .task-dialog-side { border-top: 1px solid var(--border); border-left: 0; }
  .task-assignees-field { grid-column: auto; }
  .task-assignee-options { grid-template-columns: 1fr; }
  .task-dialog-head,
  .task-day-body,
  .task-dialog .dialog-actions,
  .task-day-dialog .dialog-actions { padding-left: 16px; padding-right: 16px; }
  .task-dialog-body { padding: 0; }
  .task-dialog .dialog-actions { grid-template-columns: 1fr 1fr; }
  .task-dialog .dialog-actions > span { display: none; }
  .task-dialog .dialog-actions .danger:not(.hidden) { grid-column: 1 / -1; justify-self: start; }
  .task-dialog .dialog-actions #toggleMyTaskCompletionBtn:not(.hidden) { grid-column: 1 / -1; justify-self: start; }
  .task-dialog .dialog-actions .primary-button { width: 100%; }
  .task-day-setting { align-items: stretch; flex-direction: column; }
  .task-day-manual-head { align-items: stretch; flex-direction: column; }
  .task-day-add-row { min-height: 44px; }
  .task-day-manual-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .task-day-manual-row label:first-child { grid-column: 1 / -1; }
  .task-day-manual-row input,
  .task-day-manual-row select { height: 44px; font-size: 16px; }
  .task-day-manual-row > button { width: 44px; height: 44px; }
  .task-day-report-body { padding: 14px 12px 18px; }
  .task-day-report-summary { grid-template-columns: repeat(2, 1fr); }
  .task-day-report-summary > div { min-height: 66px; padding: 12px 14px; border-top: 1px solid var(--border); }
  .task-day-report-summary > div:nth-child(-n + 2) { border-top: 0; }
  .task-day-report-summary > div:nth-child(odd) { border-left: 0; }
  .task-day-report-item { grid-template-columns: 42px minmax(0, 1fr); }
  .task-day-report-index { min-height: 110px; }
  .task-day-report-content { padding: 14px 12px 15px; }
  .task-day-report-row-head { display: grid; gap: 10px; }
  .task-day-report-status { min-width: 0; width: fit-content; }
  .task-day-report-details { grid-template-columns: 1fr; gap: 10px; }
  .task-day-report-fact { min-width: 0; padding: 10px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .task-day-report-actions { grid-template-columns: 1fr 1fr !important; padding: 12px !important; }
  .task-day-report-actions #deleteTaskDayPlanBtn:not(.hidden) { grid-column: 1 / -1; justify-self: start; }
  .task-day-report-actions > span { grid-column: 1 / -1; }
  .task-day-report-actions .primary-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tasks-page *,
  .task-dialog *,
  .task-day-dialog *,
  .task-day-report-dialog * { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

/* Calculator VED v1 — CBR rates, supplier comparison and immutable journal */
#vedCalculatorView { display: block; }
#vedCalculatorView[hidden],
#vedCalculationsView[hidden] { display: none; }
.ved-calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(350px, .98fr);
  align-items: start;
  gap: 18px;
}
.ved-form { padding: 0; overflow: hidden; border-color: #d9e0e9; box-shadow: 0 14px 38px rgba(17, 24, 39, .055); }
.ved-form-head { border-bottom: 1px solid var(--border); }
.ved-form .calculator-field { min-width: 0; display: flex; flex-direction: column; }
.ved-form .calculator-field > span { min-height: 30px; display: flex; align-items: flex-end; }
.ved-form .calculator-field input,
.ved-form .calculator-field select { min-height: 44px; height: 44px; flex: 0 0 44px; }
.ved-identity {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(150px, .72fr) minmax(180px, .95fr);
  gap: 12px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--border);
}
.ved-section { min-width: 0; margin: 0; border: 0; border-bottom: 1px solid var(--border); padding: 24px 22px 26px; }
.ved-form .calculator-field textarea {
  width: 100%;
  min-height: 68px;
  border: 1px solid #cfd8e4;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.ved-form .calculator-field textarea:focus-visible { border-color: var(--cobalt); outline: 0; box-shadow: 0 0 0 3px rgba(0, 87, 184, .12); }
.ved-form .calculator-field input:disabled,
.ved-form .calculator-field select:disabled { color: #7d8898; background: #f2f5f8; cursor: not-allowed; }
.ved-section .calculator-section-head { min-height: 42px; margin-bottom: 20px; display: flex; align-items: center; gap: 13px; }
.ved-section .calculator-section-head > span:nth-child(2) { min-width: 0; }
.ved-section .calculator-section-head strong,
.ved-section .calculator-section-head small { display: block; }
.ved-section .calculator-section-head strong { color: var(--text); font-size: 14px; font-weight: 670; }
.ved-section .calculator-section-head small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.ved-section .calculator-section-icon { width: 42px; height: 42px; min-width: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #0870e8, #0052bc); box-shadow: 0 8px 18px rgba(0, 87, 184, .2); }
.ved-section .calculator-section-icon .nav-icon { width: 22px; height: 22px; }
.ved-rate-retry { min-height: 36px; margin-left: auto; border: 1px solid #d3dce7; border-radius: 8px; padding: 0 13px; color: var(--cobalt); background: #fff; font-weight: 630; cursor: pointer; }
.ved-rate-retry:disabled { opacity: .55; cursor: wait; }
.ved-rates-grid,
.ved-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ved-rate-status-row { margin-top: 12px; display: flex; align-items: center; gap: 10px; }
.ved-rate-context { min-height: 38px; flex: 1 1 auto; border-radius: 8px; padding: 10px 12px; color: #526075; background: #f4f7fb; font-size: 11px; line-height: 1.45; }
.ved-rate-context.success { color: #116c38; background: rgba(22, 163, 74, .07); }
.ved-rate-context.error { color: #a52424; background: rgba(220, 38, 38, .07); }
.ved-rate-context.loading { color: var(--cobalt); }
.ved-manual-badge { flex: 0 0 auto; border-radius: 999px; padding: 7px 10px; color: #8a5b00; background: rgba(245, 158, 11, .11); font-size: 9.5px; font-weight: 680; }
.ved-commercial-rates { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #dfe6ee; border-radius: 10px; overflow: hidden; }
.ved-commercial-rates > div { min-height: 86px; padding: 14px 15px; border-left: 1px solid #e4e9ef; display: flex; flex-direction: column; background: #fbfcfe; }
.ved-commercial-rates > div:first-child { border-left: 0; }
.ved-commercial-rates span,
.ved-commercial-rates small { display: block; color: var(--muted); font-size: 10px; line-height: 1.35; }
.ved-commercial-rates strong { display: block; margin: 7px 0 5px; color: var(--text); font-size: 16px; font-weight: 680; }
.ved-commercial-rates small { margin-top: auto; }
.ved-settings { margin-top: 14px; border: 1px solid #dfe5ed; border-radius: 10px; background: #fff; overflow: hidden; }
.ved-settings summary { min-height: 46px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #46546a; font-size: 11.5px; font-weight: 640; cursor: pointer; }
.ved-settings summary small { color: var(--muted); font-size: 10px; font-weight: 520; }
.ved-settings-body { border-top: 1px solid #e6eaf0; padding: 16px 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; background: #fbfcfe; }
.ved-settings-body .ved-manual-toggle { align-self: end; }
.ved-settings-body .ved-manual-reason { grid-column: span 2; }
.ved-fields-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ved-supplier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.ved-inverse-rate { min-height: 81px; border: 1px solid #dfe5ed; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; background: #f8fafc; }
.ved-inverse-rate span,
.ved-inverse-rate small { display: block; color: var(--muted); font-size: 10px; line-height: 1.35; }
.ved-inverse-rate strong { display: block; margin: 6px 0 4px; color: var(--cobalt); font-size: 12px; font-weight: 680; }
.ved-inverse-rate small { margin-top: auto; }
.ved-fee-row { margin-top: 12px; grid-template-columns: .7fr .62fr 1.7fr; }
.ved-margin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ved-inline-warning { margin-top: 12px; border-left: 3px solid var(--warning); border-radius: 7px; padding: 9px 11px; color: #8a5b00; background: rgba(245, 158, 11, .08); font-size: 11px; line-height: 1.45; }
.ved-correction { border-bottom: 1px solid var(--border); background: #fbfcfe; }
.ved-correction > summary { min-height: 72px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; list-style: none; }
.ved-correction > summary::-webkit-details-marker { display: none; }
.ved-correction > summary strong,
.ved-correction > summary small { display: block; }
.ved-correction > summary strong { color: var(--text); font-size: 13px; font-weight: 660; }
.ved-correction > summary small { margin-top: 5px; color: var(--muted); font-size: 10.5px; }
.ved-switch { position: relative; width: 46px; height: 26px; flex: 0 0 46px; }
.ved-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ved-switch i { position: absolute; inset: 0; border-radius: 20px; background: #cfd6df; transition: background-color 180ms ease; }
.ved-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(17, 24, 39, .2); transition: transform 180ms ease; }
.ved-switch input:checked + i { background: var(--cobalt-active); }
.ved-switch input:checked + i::after { transform: translateX(20px); }
.ved-switch input:focus-visible + i { outline: 3px solid rgba(0, 87, 184, .2); outline-offset: 2px; }
.ved-correction-body { border-top: 1px solid #e2e7ee; padding: 20px 22px 24px; }
.ved-correction-body.is-disabled { display: none; }
.ved-wide { grid-column: 1 / -1; }
.ved-actions { border-top: 0; }
.ved-actions .calculator-form-actions { flex-wrap: wrap; justify-content: flex-end; }
.ved-actions .calculator-form-actions button { min-height: 46px; }
.ved-actions .calculator-status.has-errors > i { background: var(--warning); box-shadow: 0 0 0 9px rgba(245, 158, 11, .11); }
.ved-result { position: sticky; top: 72px; padding: 0; overflow: hidden; border-color: #d9e0e9; box-shadow: 0 14px 38px rgba(17, 24, 39, .055); }
.ved-result-errors { display: grid; gap: 4px; border-bottom: 1px solid #f1d7d7; padding: 11px 18px; color: #a52424; background: #fff7f7; font-size: 10.5px; line-height: 1.4; }
.ved-result .calculator-live-badge.invalid { color: #8a5b00; background: rgba(245, 158, 11, .09); }
.ved-result .calculator-live-badge.invalid i { background: var(--warning); }
.ved-result-equivalents { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.ved-result-equivalents > div { min-height: 68px; padding: 13px 18px; border-left: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; }
.ved-result-equivalents > div:first-child { border-left: 0; }
.ved-result-equivalents span { display: block; color: var(--muted); font-size: 10px; }
.ved-result-equivalents strong { display: block; margin-top: 7px; color: var(--text); font-size: 13px; }
.ved-comparison { border-bottom: 1px solid var(--border); padding: 18px 20px; }
.ved-comparison-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ved-comparison-head h3 { margin: 0; color: var(--text); font-size: 13px; }
.ved-comparison-head span { border-radius: 999px; padding: 5px 8px; color: var(--muted); background: #f1f4f8; font-size: 9px; font-weight: 650; }
.ved-comparison-head span.ok { color: #11743b; background: rgba(22, 163, 74, .09); }
.ved-comparison-head span.warning { color: #8a5b00; background: rgba(245, 158, 11, .1); }
.ved-comparison-head span.critical { color: #a52424; background: rgba(220, 38, 38, .08); }
.ved-comparison-grid { margin-top: 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ved-comparison-grid > div { min-height: 58px; border: 1px solid #dfe5ed; border-radius: 8px; padding: 11px 12px; display: flex; flex-direction: column; justify-content: center; background: #fbfcfe; }
.ved-comparison-grid span { display: block; color: var(--muted); font-size: 9.5px; }
.ved-comparison-grid strong { display: block; margin-top: 6px; color: var(--text); font-size: 12px; }
.ved-difference { margin-top: 10px; color: #526075; font-size: 10.5px; line-height: 1.45; }
.ved-kpis { grid-template-columns: repeat(3, 1fr); }
.ved-kpis > div { display: flex; flex-direction: column; }
.ved-kpis span { min-height: 25px; }
.ved-kpis output { margin-top: auto; }
.ved-correction-result { margin: 14px 18px 0; border: 1px solid rgba(0, 87, 184, .16); border-radius: 10px; padding: 13px 15px; background: rgba(0, 87, 184, .055); }
.ved-correction-result span,
.ved-correction-result small { display: block; color: var(--muted); font-size: 10px; line-height: 1.4; }
.ved-correction-result strong { display: block; margin: 7px 0 5px; color: var(--cobalt); font-size: 16px; }
.ved-history-table .calculator-history-columns,
.ved-history-row { grid-template-columns: 116px minmax(210px, 1.35fr) 72px 82px 130px 150px 120px; }
.ved-history-row .saved-calculation-meta strong { color: var(--text); font-size: 11px; }

@media (max-width: 1180px) {
  .calculator-tool-switch { max-width: 100%; overflow-x: auto; }
  .calculator-tool-group { flex: 0 0 auto; }
  .ved-calculator-layout { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .9fr); }
  .ved-identity { grid-template-columns: 1fr 1fr; }
  .ved-name-field { grid-column: 1 / -1; }
  .ved-settings-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ved-calculator-layout { grid-template-columns: 1fr; }
  .ved-result { position: static; }
  .ved-history-table { overflow-x: auto; }
  .ved-history-table .calculator-history-columns,
  .ved-history-row { min-width: 920px; }
}
@media (max-width: 600px) {
  .calculator-tool-switch { scroll-snap-type: x proximity; }
  .calculator-tool-group { min-width: 238px; scroll-snap-align: start; }
  .calculator-tool-divider { margin-inline: 2px; }
  .ved-form-head,
  .ved-identity,
  .ved-section,
  .ved-correction-body { padding-inline: 16px; }
  .ved-identity,
  .ved-rates-grid,
  .ved-fields,
  .ved-supplier-grid,
  .ved-fee-row,
  .ved-settings-body { grid-template-columns: 1fr; }
  .ved-form .calculator-field > span { min-height: 0; }
  .ved-name-field,
  .ved-settings-body .ved-manual-reason,
  .ved-wide { grid-column: auto; }
  .ved-commercial-rates { grid-template-columns: 1fr; }
  .ved-rate-status-row { align-items: stretch; flex-direction: column; }
  .ved-manual-badge { width: fit-content; }
  .ved-commercial-rates > div { min-height: 70px; border-top: 1px solid #e4e9ef; border-left: 0; }
  .ved-commercial-rates > div:first-child { border-top: 0; }
  .ved-correction > summary { padding-inline: 16px; }
  .ved-actions { align-items: stretch; }
  .ved-actions .calculator-form-actions { display: grid; grid-template-columns: 1fr; }
  .ved-actions .calculator-form-actions button { width: 100%; }
  .ved-result-equivalents,
  .ved-comparison-grid { grid-template-columns: 1fr; }
  .ved-result-equivalents > div { border-top: 1px solid var(--border); border-left: 0; }
  .ved-result-equivalents > div:first-child { border-top: 0; }
  .ved-form input,
  .ved-form select,
  .ved-form textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ved-switch i,
  .ved-switch i::after,
  .ved-rate-retry { transition: none; }
}

/* Shipment card v148 — object-first structure aligned with DDS */
.transport-detail-view {
  position: relative;
  z-index: 1;
}

.transport-detail-toolbar {
  margin-bottom: 10px;
}

.transport-detail {
  min-height: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.shipment-card-hero {
  position: relative;
  min-height: 318px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(300px, .76fr) minmax(0, 2fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #d8e0ea;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(17, 24, 39, .07);
}

.shipment-card-hero::after {
  position: absolute;
  right: -42px;
  bottom: -5px;
  width: calc(100% + 84px);
  height: 116px;
  background: url("/assets/pantera-header-wave.svg") center bottom / 100% 104px no-repeat;
  content: "";
  opacity: .18;
  pointer-events: none;
}

.shipment-card-title,
.shipment-card-summary {
  position: relative;
  z-index: 1;
}

.shipment-card-title {
  min-width: 0;
  border-right: 1px solid #dbe3ed;
  border-radius: 0 50% 46% 0;
  padding: 42px 38px 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: rgba(255, 255, 255, .94);
  box-shadow: 18px 0 48px rgba(30, 64, 175, .025);
}

.shipment-card-title > span {
  color: var(--cobalt);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 740;
  letter-spacing: .115em;
  text-transform: uppercase;
  white-space: nowrap;
}

.shipment-card-title h2 {
  margin: 22px 0 17px;
  color: var(--text);
  font-size: 74px;
  line-height: .86;
  font-weight: 660;
  letter-spacing: -.052em;
}

.shipment-card-title .transport-status {
  width: fit-content;
  min-height: 34px;
  padding-inline: 13px;
  gap: 7px;
  color: #a76a00;
  background: #fff1cb;
  font-size: 13px;
}

.shipment-card-title .transport-status > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 7px;
  background: #d89607;
}

.shipment-card-kind {
  margin-top: 31px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #667085;
}

.shipment-card-kind > i,
.shipment-card-fact-icon > i {
  display: block;
  background: currentColor;
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.shipment-card-kind > i {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
}

.shipment-card-kind > span {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 560;
}

.shipment-card-summary {
  min-width: 0;
  padding: 77px 34px 45px 50px;
  display: grid;
  grid-template-rows: minmax(78px, .8fr) minmax(90px, 1fr);
  gap: 24px;
}

.shipment-card-summary-primary,
.shipment-card-summary-secondary,
.shipment-card-summary-lower {
  min-width: 0;
  display: grid;
  align-items: center;
}

.shipment-card-summary-primary {
  grid-template-columns: minmax(0, .82fr) minmax(0, .72fr) minmax(0, 1.22fr);
  gap: 18px;
}

.shipment-card-summary-lower {
  grid-template-columns: minmax(0, 2.5fr) minmax(200px, 1fr);
  gap: 18px;
}

.shipment-card-summary-secondary {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  min-height: 90px;
  padding: 0 20px;
  grid-template-columns: minmax(0, 1.05fr) minmax(195px, .95fr);
  background: rgba(248, 250, 252, .92);
  box-shadow: 0 12px 30px rgba(17, 24, 39, .04);
}

.shipment-card-fact {
  min-width: 0;
  min-height: 72px;
  padding: 0 8px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}

.shipment-card-summary-primary .shipment-card-fact:first-child,
.shipment-card-summary-secondary .shipment-card-fact:first-child {
  padding-left: 0;
}

.shipment-card-summary-primary .shipment-card-fact + .shipment-card-fact,
.shipment-card-summary-secondary .shipment-card-fact + .shipment-card-fact {
  border-left: 0;
}

.shipment-card-summary-primary .shipment-card-fact:last-child {
  padding-right: 0;
  padding-left: 0;
}

.shipment-card-summary-secondary .shipment-card-fact + .shipment-card-fact {
  border-left: 1px solid #e2e8f0;
}

.shipment-card-fact-icon {
  width: 46px;
  height: 46px;
  border: 1px solid #e1e6ed;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #586477;
  background: #f8fafc;
  box-shadow: 0 7px 20px rgba(17, 24, 39, .035);
}

.shipment-card-fact-icon > i {
  width: 25px;
  height: 25px;
}

.shipment-card-fact.composition .shipment-card-fact-icon,
.shipment-card-fact.terms .shipment-card-fact-icon {
  color: #075fc7;
}

.shipment-card-fact.warning .shipment-card-fact-icon {
  color: #d88b00;
}

.shipment-card-fact-copy,
.shipment-card-fact-copy small,
.shipment-card-fact-copy strong {
  min-width: 0;
  display: block;
}

.shipment-card-fact-copy small {
  color: #65728a;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 560;
}

.shipment-card-fact-copy strong {
  margin-top: 6px;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.22;
  font-weight: 650;
  letter-spacing: -.012em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-card-fact.client .shipment-card-fact-copy strong {
  font-size: 13px;
}

.shipment-card-fact.client .shipment-card-fact-copy strong {
  overflow: hidden;
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-card-fact.client {
  padding-inline: 0;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
}

.shipment-card-fact.client .shipment-card-fact-icon {
  width: 42px;
  height: 42px;
}

.shipment-card-fact.client .shipment-card-fact-icon > i {
  width: 23px;
  height: 23px;
}

.shipment-card-fact.cargo .shipment-card-fact-copy strong {
  font-size: 15px;
}

.shipment-card-fact.cargo-name .shipment-card-fact-copy strong,
.shipment-card-fact.manager .shipment-card-fact-copy strong {
  font-size: 16px;
}

.shipment-card-tabs i,
.shipment-document-group > header > i,
.shipment-reconciliation-icon i {
  display: block;
  background: currentColor;
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.shipment-card-tabs {
  min-height: 58px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  background: rgba(255, 255, 255, .94);
}

.shipment-card-workspace {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8e0ea;
  border-radius: 16px;
  background: #f5f8fc;
  box-shadow: 0 18px 50px rgba(17, 24, 39, .055);
}

.shipment-card-workspace .transport-detail-body {
  background: #f5f8fc;
}

.shipment-card-tabs button {
  position: relative;
  min-height: 58px;
  border: 0;
  border-right: 1px solid rgba(221, 227, 234, .85);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #46546c;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 640;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.shipment-card-tabs button:last-child {
  border-right: 0;
}

.shipment-card-tabs button::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.shipment-card-tabs button:hover {
  color: var(--text);
  background: rgba(0, 87, 184, .035);
}

.shipment-card-tabs button.active {
  color: var(--cobalt);
  background: rgba(0, 87, 184, .05);
}

.shipment-card-tabs button.active::after {
  background: var(--cobalt);
}

.shipment-card-tabs button:focus-visible {
  z-index: 1;
  outline: 3px solid rgba(0, 87, 184, .18);
  outline-offset: -3px;
}

.shipment-card-tabs button:disabled {
  color: #a4adba;
  background: #fafbfd;
  cursor: not-allowed;
}

.shipment-card-tabs i {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.shipment-card-tabs button > span {
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.shipment-card-tabs button > b {
  min-width: 23px;
  height: 23px;
  border-radius: 999px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #667085;
  background: #edf1f5;
  font-size: 10px;
  font-weight: 700;
}

.shipment-card-tabs button.active > b {
  color: var(--cobalt);
  background: #e5f0ff;
}

.shipment-tab-page {
  padding: 20px;
  display: grid;
  gap: 15px;
}

.shipment-comments-card { min-height: 430px; }

.shipment-comments-total {
  min-height: 30px;
  border: 1px solid #d8e3ef;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  color: #516079;
  background: #f7f9fc;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.shipment-comments-stream {
  padding: 22px 24px 8px;
  display: grid;
  gap: 16px;
}

.shipment-comment-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.shipment-comment-avatar {
  width: 40px;
  height: 40px;
  border: 1px solid #d3dfec;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #38506d;
  background: #edf3f9;
  font-size: 11px;
  font-weight: 760;
}

.shipment-comment-row.own .shipment-comment-avatar {
  border-color: #c4daf4;
  color: var(--cobalt);
  background: #eaf3ff;
}

.shipment-comment-content {
  width: min(760px, 100%);
  border: 1px solid #dbe3ec;
  border-radius: 4px 12px 12px 12px;
  padding: 12px 14px 13px;
  background: #f8fafc;
}

.shipment-comment-row.own .shipment-comment-content {
  border-color: #cfdeef;
  background: #f4f8fd;
}

.shipment-comment-content header {
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.shipment-comment-content header strong {
  color: #223149;
  font-size: 13px;
  font-weight: 680;
}

.shipment-comment-content time {
  flex: 0 0 auto;
  color: #7a879a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.shipment-comment-content p {
  margin: 0;
  color: #344054;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.shipment-comments-empty {
  min-height: 210px;
  padding: 32px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  color: #7a879a;
  text-align: center;
}

.shipment-comments-empty > i {
  width: 34px;
  height: 34px;
  margin-bottom: 5px;
  display: block;
  background: #8795a8;
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.shipment-comments-empty strong { color: #344054; font-size: 14px; }
.shipment-comments-empty span { font-size: 12px; }
.shipment-comments-empty.error strong,
.shipment-comment-form-status.error { color: var(--critical); }
.shipment-comments-empty .secondary-button { margin-top: 8px; }

.shipment-comments-loading {
  min-height: 210px;
  padding: 28px 24px;
  display: grid;
  align-content: center;
  gap: 12px;
}

.shipment-comments-loading i {
  width: min(680px, 78%);
  height: 54px;
  border-radius: 10px;
  display: block;
  background: linear-gradient(90deg, #edf1f5 20%, #f7f9fb 50%, #edf1f5 80%);
  background-size: 220% 100%;
  animation: shipment-comment-loading 1.25s ease-in-out infinite;
}

.shipment-comments-loading i:nth-child(2) { width: min(560px, 66%); }
.shipment-comments-loading i:nth-child(3) { width: min(620px, 72%); }

@keyframes shipment-comment-loading { to { background-position: -120% 0; } }

.shipment-comment-composer {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding: 18px 24px 20px;
  display: grid;
  gap: 8px;
  background: #fbfcfe;
}

.shipment-comment-composer > label {
  color: #344054;
  font-size: 12px;
  font-weight: 650;
}

.shipment-comment-composer textarea {
  width: 100%;
  min-height: 84px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  padding: 12px 14px;
  resize: vertical;
  color: var(--text);
  background: var(--white);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.shipment-comment-composer textarea:focus {
  border-color: rgba(0, 87, 184, .65);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 87, 184, .12);
}

.shipment-comment-composer textarea:disabled {
  color: #7a879a;
  background: #f1f4f8;
}

.shipment-comment-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.shipment-comment-composer-actions > span { color: #7a879a; font-size: 11px; }
.shipment-comment-composer-actions > span b {
  color: #526078;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.shipment-comment-send {
  min-width: 132px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.shipment-comment-send i {
  width: 16px;
  height: 16px;
  display: block;
  background: currentColor;
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.shipment-comment-form-status {
  min-height: 16px;
  margin: 0;
  color: #667085;
  font-size: 11px;
}

.shipment-section-card {
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(17, 24, 39, .035);
}

.shipment-section-head {
  min-height: 87px;
  border-bottom: 1px solid var(--border);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: #fbfcfe;
}

.shipment-section-head > div:first-child {
  min-width: 0;
}

.shipment-section-head > div:first-child > span,
.shipment-reconciliation-card > div:nth-child(2) > span {
  display: block;
  margin-bottom: 5px;
  color: var(--cobalt);
  font-size: 9px;
  line-height: 1.2;
  font-weight: 730;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.shipment-section-head h3,
.shipment-reconciliation-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 650;
}

.shipment-section-head p,
.shipment-reconciliation-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.shipment-section-head .secondary-button,
.shipment-section-head .primary-button {
  min-height: 39px;
  flex: 0 0 auto;
  font-size: 11px;
}

.shipment-section-head .secondary-button {
  border: 1px solid #d8e1eb;
  border-radius: 9px;
  padding: 0 13px;
  color: #344054;
  background: transparent;
  font-family: inherit;
  font-weight: 630;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.shipment-section-head .secondary-button:hover {
  border-color: #aac7e8;
  color: var(--cobalt);
  background: #f5f9ff;
}

.shipment-section-head .secondary-button:focus-visible {
  outline: 3px solid rgba(8, 103, 216, .18);
  outline-offset: 2px;
}

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

.shipment-container-manifest {
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.shipment-container-manifest > header,
.shipment-container-manifest-row {
  display: grid;
  grid-template-columns: minmax(94px, .25fr) minmax(190px, .55fr) minmax(130px, .38fr) minmax(0, 2fr);
  align-items: center;
}

.shipment-container-manifest > header {
  min-height: 38px;
  color: #778397;
  background: #f7f9fc;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 550;
}

.shipment-container-manifest > header span,
.shipment-container-manifest-row > div,
.shipment-container-manifest-row > strong,
.shipment-container-manifest-row > b,
.shipment-container-manifest-row > span {
  min-width: 0;
  padding-inline: 18px;
}

.shipment-container-manifest-row {
  min-height: 60px;
  border-top: 1px solid var(--border);
}

.shipment-container-manifest-row > strong,
.shipment-container-manifest-row > b {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
}

.shipment-container-manifest-row > strong {
  font-variant-numeric: tabular-nums;
}

.shipment-container-sequence {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #637087;
}

.shipment-container-sequence > span {
  width: 29px;
  height: 29px;
  border: 1px solid #d6e2f2;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: #f2f6fc;
  font-size: 10px;
  line-height: 1;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}

.shipment-container-sequence > i {
  width: 25px;
  height: 25px;
  display: block;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.shipment-container-manifest-row > b.is-empty,
.shipment-container-manifest-row em.is-empty {
  color: #98a2b3;
  font-weight: 520;
}

.shipment-container-manifest-row > span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #344054;
}

.shipment-container-manifest-row em {
  min-width: 0;
  overflow: hidden;
  font-size: 12.5px;
  font-style: normal;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-container-manifest-row i {
  color: #8fa0b3;
  font-size: 12px;
  font-style: normal;
}

.shipment-container-manifest-empty {
  min-height: 60px;
  border-top: 1px solid var(--border);
  padding: 18px;
  color: #8a95a5;
  font-size: 12px;
}

.shipment-field-grid.shipment-parties-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shipment-parties-grid > .shipment-field.shipper {
  grid-column: 1 / -1;
  border-right: 0;
}

.shipment-parties-grid > .shipment-recipient-summary,
.shipment-parties-grid > .shipment-field.contact {
  grid-column: span 2;
}

.shipment-parties-grid > .shipment-field.contact {
  border-right: 0;
}

.shipment-recipient-summary {
  border-right: 1px solid var(--border);
  padding: 0;
}

.shipment-recipient-summary > div {
  min-width: 0;
  padding: 14px 18px;
}

.shipment-recipient-summary > div + div {
  border-top: 1px solid var(--border);
}

.shipment-cargo-summary-grid {
  display: grid;
  grid-template-columns: minmax(320px, 2.4fr) minmax(190px, .75fr) minmax(290px, 1.03fr);
}

.shipment-cargo-summary-grid > .shipment-field,
.shipment-cargo-summary-grid > .shipment-cargo-condition-stack {
  min-height: 104px;
}

.shipment-weight-stack {
  padding: 0;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.shipment-weight-stack > div {
  min-width: 0;
  padding: 10px 18px;
}

.shipment-weight-stack > div + div {
  border-top: 1px solid var(--border);
}

.shipment-weight-stack dt,
.shipment-weight-stack dd {
  margin-inline: 0;
}

.shipment-weight-stack dd {
  margin-top: 5px;
}

.shipment-weight-stack .actual dt,
.shipment-weight-stack .actual dd {
  color: var(--cobalt);
}

.shipment-cargo-condition-stack {
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.shipment-condition-cell {
  min-width: 0;
  padding: 10px 18px;
}

.shipment-condition-cell:first-child {
  border-right: 1px solid var(--border);
}

.shipment-condition-cell:nth-child(-n + 2) {
  border-bottom: 1px solid var(--border);
}

.shipment-condition-cell.ready-date {
  grid-column: 1 / -1;
}

.shipment-condition-cell dt {
  color: #778397;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 550;
}

.shipment-condition-cell dd {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 610;
  overflow-wrap: anywhere;
}

.shipment-condition-cell dd.is-empty {
  color: #9ba5b3;
  font-weight: 500;
}

.shipment-condition-cell.warning dd {
  color: #9a6700;
}

.shipment-condition-cell.success dd {
  color: #168043;
}

.shipment-tnved-list {
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
}

.shipment-tnved-row {
  display: grid;
  grid-template-columns: minmax(170px, .3fr) minmax(0, 1.7fr);
}

.shipment-tnved-row + .shipment-tnved-row {
  border-top: 1px solid var(--border);
}

.shipment-tnved-row > div {
  min-width: 0;
  padding: 14px 18px;
}

.shipment-tnved-row > div:first-child {
  border-right: 1px solid var(--border);
}

.shipment-tnved-row dt {
  color: #778397;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 550;
}

.shipment-tnved-row dd {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 610;
  overflow-wrap: anywhere;
}

.shipment-tnved-row > div:first-child dd {
  color: var(--cobalt);
  font-variant-numeric: tabular-nums;
}

.shipment-tnved-row.is-empty dd,
.shipment-tnved-row dd.is-empty {
  color: #9ba5b3;
  font-weight: 500;
}

.shipment-field {
  min-width: 0;
  min-height: 84px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 18px;
}

.shipment-field:nth-child(4n) {
  border-right: 0;
}

.shipment-field.wide {
  grid-column: span 2;
}

.shipment-field dt {
  color: #778397;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 550;
}

.shipment-field dd {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 610;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.shipment-field dd.is-empty {
  color: #9ba5b3;
  font-weight: 500;
}

.shipment-field.warning dd {
  color: #9a6700;
}

.shipment-field.success dd {
  color: #168043;
}

.shipment-bill-card.is-ready {
  border-color: rgba(22, 163, 74, .22);
}

.shipment-check-state {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.shipment-check-state i,
.shipment-document-state i {
  border-radius: 50%;
  background: currentColor;
}

.shipment-check-state i {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 5px currentColor;
}

.shipment-check-state.complete {
  color: #16a34a;
  background: rgba(22, 163, 74, .08);
}

.shipment-check-state.complete i {
  box-shadow: 0 0 0 5px rgba(22, 163, 74, .12);
}

.shipment-check-state.pending {
  color: #8b96a7;
  background: #eef2f6;
}

.shipment-check-state.pending i {
  box-shadow: 0 0 0 5px rgba(102, 112, 133, .1);
}

.shipment-check-state b {
  font-weight: 670;
}

.shipment-audit {
  padding: 0 4px;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  color: #929cab;
  font-size: 9.5px;
}

.shipment-workflow {
  padding: 4px 20px 8px;
}

.shipment-workflow-row {
  position: relative;
  min-height: 73px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 42px minmax(210px, 1fr) minmax(0, 1.25fr) 88px;
  align-items: center;
  gap: 14px;
}

.shipment-workflow-row:last-child {
  border-bottom: 0;
}

.shipment-workflow-row::before {
  position: absolute;
  z-index: 0;
  top: -22px;
  bottom: 50%;
  left: 20px;
  width: 1px;
  background: #d6dee8;
  content: "";
}

.shipment-workflow-row:first-child::before {
  display: none;
}

.shipment-workflow-index {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 1px solid #cfd8e4;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #788598;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.shipment-workflow-row.done .shipment-workflow-index {
  border-color: var(--cobalt);
  color: #fff;
  background: var(--cobalt);
}

.shipment-workflow-row.current .shipment-workflow-index {
  border-color: var(--cobalt);
  color: var(--cobalt);
  box-shadow: 0 0 0 5px rgba(0, 87, 184, .09);
}

.shipment-workflow-copy strong,
.shipment-workflow-copy small {
  display: block;
}

.shipment-workflow-copy strong {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 640;
}

.shipment-workflow-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.shipment-workflow-details {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
}

.shipment-workflow-details > span {
  min-width: 0;
}

.shipment-workflow-details small,
.shipment-workflow-details b {
  display: block;
}

.shipment-workflow-details small {
  color: var(--muted);
  font-size: 9px;
}

.shipment-workflow-details b {
  margin-top: 4px;
  color: #445168;
  font-size: 10px;
  font-weight: 620;
}

.shipment-workflow-status {
  justify-self: end;
  border-radius: 999px;
  padding: 6px 9px;
  color: #7c8797;
  background: #eef2f6;
  font-size: 9.5px;
  font-weight: 680;
}

.shipment-workflow-row.done .shipment-workflow-status {
  color: #158143;
  background: rgba(22, 163, 74, .08);
}

.shipment-workflow-row.current .shipment-workflow-status {
  color: var(--cobalt);
  background: rgba(0, 87, 184, .08);
}

.shipment-workflow-card {
  min-width: 0;
}

.shipment-workflow-shared {
  position: relative;
  min-height: 142px;
  border-bottom: 1px solid var(--border);
  padding: 21px 20px 0;
  background: #fbfcfe;
}

.shipment-workflow-shared-rail {
  width: min(47%, 520px);
  display: grid;
  grid-template-columns: repeat(3, minmax(118px, 1fr));
}

.shipment-workflow-branch {
  position: relative;
  height: 42px;
  margin-top: 2px;
}

.shipment-workflow-branch::before {
  position: absolute;
  top: 18px;
  right: 0;
  left: min(41%, 455px);
  border-top: 1px dashed #cbd5e1;
  content: "";
}

.shipment-workflow-branch::after {
  position: absolute;
  top: 18px;
  bottom: -1px;
  left: min(41%, 455px);
  border-left: 1px solid #cbd5e1;
  content: "";
}

.shipment-workflow-branch > span {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: min(44%, 488px);
  border: 1px solid #dce4ed;
  border-radius: 999px;
  padding: 5px 10px;
  color: #718096;
  background: #fff;
  font-size: 8.5px;
  line-height: 1;
  font-weight: 680;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.shipment-workflow-node {
  position: relative;
  min-width: 0;
  min-height: 76px;
  border: 0;
  padding: 0 5px;
  display: grid;
  grid-template-rows: 43px auto auto;
  justify-items: center;
  align-content: start;
  color: #7d8999;
  background: transparent;
  font-family: inherit;
  text-align: center;
}

button.shipment-workflow-node {
  cursor: pointer;
}

.shipment-workflow-node::before {
  position: absolute;
  z-index: 0;
  top: 20px;
  right: 50%;
  width: 100%;
  height: 1px;
  background: #d6dee8;
  content: "";
}

.shipment-workflow-node:first-child::before {
  display: none;
}

.shipment-workflow-node.done::before,
.shipment-workflow-node.current::before {
  background: var(--cobalt);
}

.shipment-workflow-node-icon {
  position: relative;
  z-index: 1;
  width: 41px;
  height: 41px;
  border: 1px solid #d2dae5;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #7d8999;
  background: #fff;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.shipment-workflow-node-icon > i {
  width: 20px;
  height: 20px;
  display: block;
  background: currentColor;
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.shipment-workflow-node-icon > img {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 15px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #fff;
  filter: invert(28%) sepia(92%) saturate(1542%) hue-rotate(187deg) brightness(88%) contrast(104%);
}

.shipment-workflow-node.done {
  color: var(--cobalt);
}

.shipment-workflow-node.done .shipment-workflow-node-icon {
  border-color: var(--cobalt);
  color: #fff;
  background: var(--cobalt);
}

.shipment-workflow-node.current {
  color: var(--cobalt);
}

.shipment-workflow-node.current .shipment-workflow-node-icon {
  border-color: var(--cobalt);
  color: var(--cobalt);
  box-shadow: 0 0 0 5px rgba(0, 87, 184, .09);
}

button.shipment-workflow-node:hover .shipment-workflow-node-icon {
  border-color: #75a8df;
  color: var(--cobalt);
  background: #f5f9ff;
}

button.shipment-workflow-node.done:hover .shipment-workflow-node-icon {
  color: #fff;
  background: #0050aa;
}

button.shipment-workflow-node:focus-visible {
  z-index: 2;
  outline: 3px solid rgba(8, 103, 216, .18);
  outline-offset: 2px;
  border-radius: 9px;
}

.shipment-workflow-node > strong,
.shipment-workflow-node > small {
  position: relative;
  z-index: 1;
  display: block;
}

.shipment-workflow-node > strong {
  max-width: 112px;
  margin-top: 7px;
  color: #344054;
  font-size: 9.5px;
  line-height: 1.28;
  font-weight: 630;
}

.shipment-workflow-node.current > strong {
  color: var(--cobalt);
}

.shipment-workflow-node > small {
  margin-top: 4px;
  color: #8792a2;
  font-size: 8.5px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.shipment-container-workflows {
  background: #fff;
}

.shipment-container-workflow {
  min-width: 0;
  min-height: 145px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.shipment-container-workflow + .shipment-container-workflow {
  border-top: 1px solid var(--border);
}

.shipment-container-workflow-meta {
  min-width: 0;
  border-right: 1px solid var(--border);
  padding: 18px 16px 16px 0;
}

.shipment-container-workflow-title {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.shipment-container-workflow-title > i {
  width: 20px;
  height: 20px;
  color: #64748b;
  background: currentColor;
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.shipment-container-workflow-title strong,
.shipment-container-workflow-title small {
  display: block;
}

.shipment-container-workflow-title strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.25;
  font-weight: 670;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-container-workflow-title small {
  margin-top: 3px;
  color: #7d8999;
  font-size: 8.5px;
}

.shipment-container-workflow-summary {
  margin-top: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shipment-container-workflow-summary > b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 7px;
  color: var(--cobalt);
  background: rgba(0, 87, 184, .08);
  font-size: 8.5px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}

.shipment-container-workflow-summary > span {
  min-width: 0;
  overflow: hidden;
  color: #7d8999;
  font-size: 8.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-container-workflow-updated {
  margin-top: 7px;
  display: block;
  color: #8b96a7;
  font-size: 8.5px;
  line-height: 1.3;
}

.shipment-container-workflow-action {
  min-height: 28px;
  margin-top: 7px;
  border: 0;
  padding: 0;
  color: var(--cobalt);
  background: transparent;
  font-family: inherit;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

.shipment-container-workflow-action:hover {
  color: #004a9e;
}

.shipment-container-workflow-action:focus-visible {
  outline: 3px solid rgba(8, 103, 216, .18);
  outline-offset: 2px;
  border-radius: 5px;
}

.shipment-container-workflow-rail {
  min-width: 0;
  padding: 22px 2px 12px 14px;
  display: grid;
  grid-template-columns: repeat(7, minmax(74px, 1fr));
  align-items: start;
}

.shipment-workflow-empty {
  min-height: 220px;
  padding: 30px;
  display: grid;
  place-content: center;
  gap: 6px;
  color: #7b8797;
  text-align: center;
}

.shipment-workflow-empty strong {
  color: #344054;
  font-size: 13px;
}

.shipment-workflow-empty span {
  font-size: 10px;
}

@media (max-width: 1180px) {
  .shipment-container-workflow {
    grid-template-columns: 1fr;
    padding-block: 0 12px;
  }

  .shipment-container-workflow-meta {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto auto;
    align-items: center;
    gap: 10px 16px;
  }

  .shipment-container-workflow-summary,
  .shipment-container-workflow-updated,
  .shipment-container-workflow-action {
    margin-top: 0;
  }

  .shipment-container-workflow-action {
    justify-self: end;
  }

  .shipment-container-workflow-rail {
    padding-left: 2px;
  }
}

@media (max-width: 760px) {
  .shipment-workflow-shared {
    padding-inline: 14px;
    overflow-x: auto;
  }

  .shipment-workflow-shared-rail {
    width: 520px;
  }

  .shipment-workflow-branch {
    width: 620px;
  }

  .shipment-container-workflow {
    padding-inline: 14px;
  }

  .shipment-container-workflow-meta {
    grid-template-columns: 1fr auto;
  }

  .shipment-container-workflow-summary {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .shipment-container-workflow-updated {
    grid-column: 1;
    grid-row: 3;
  }

  .shipment-container-workflow-action {
    grid-column: 2;
    grid-row: 3;
  }

  .shipment-container-workflow-rail {
    min-width: 690px;
    overflow: visible;
  }

  .shipment-container-workflow {
    overflow-x: auto;
  }

  .shipment-workflow-node > strong {
    font-size: 9px;
  }
}

.shipment-document-groups {
  display: block;
}

.shipment-document-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}

.shipment-document-tabs button {
  min-width: 0;
  min-height: 84px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.shipment-document-tabs button:hover {
  color: var(--cobalt);
  background: #f8fbff;
}

.shipment-document-tabs button.active {
  border-bottom-color: var(--cobalt);
  color: var(--cobalt);
  background: #f7faff;
}

.shipment-document-tabs i {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  display: block;
  color: #657184;
  background: #f7f9fc;
}

.shipment-document-tabs i::after {
  position: absolute;
  inset: 9px;
  content: "";
  background: currentColor;
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.shipment-document-tabs button.active i {
  border-color: rgba(0, 87, 184, .22);
  color: var(--cobalt);
  background: #edf5ff;
}

.shipment-document-tabs span,
.shipment-document-tabs strong,
.shipment-document-tabs small {
  display: block;
}

.shipment-document-tabs strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.shipment-document-tabs small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-document-group {
  display: none;
  min-width: 0;
  padding: 18px;
}

.shipment-document-group.active {
  display: block;
}

.shipment-document-group > header {
  min-height: 49px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.shipment-document-group > header > i {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--cobalt);
  background-color: var(--cobalt);
}

.shipment-document-group h4,
.shipment-document-group p {
  margin: 0;
}

.shipment-document-group h4 {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.shipment-document-group p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.35;
}

.shipment-document-slots {
  margin-top: 15px;
  border-top: 1px solid var(--border);
}

.shipment-document-slot {
  min-height: 61px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.shipment-document-state {
  width: 20px;
  height: 20px;
  border: 1px solid #cdd5e0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #adb5c0;
}

.shipment-document-state i {
  width: 6px;
  height: 6px;
}

.shipment-document-slot.complete .shipment-document-state {
  border-color: rgba(22, 163, 74, .34);
  color: #16a34a;
  background: rgba(22, 163, 74, .06);
}

.shipment-document-slot.editable {
  border-radius: 8px;
  cursor: pointer;
}

.shipment-document-slot.editable:hover {
  background: #f7faff;
}

.transport-document-editor-row.is-targeted {
  border-radius: 10px;
  outline: 2px solid rgba(0, 87, 184, .24);
  outline-offset: 4px;
  background: #f7faff;
}

.shipment-document-slot strong,
.shipment-document-slot small {
  display: block;
}

.shipment-document-slot strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
}

.shipment-document-slot small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.shipment-document-slot .text-button {
  min-height: 28px;
  padding-inline: 5px;
  font-size: 9px;
}

.shipment-document-group:has(.shipment-invoice-register) {
  padding: 0;
}

.shipment-invoice-register {
  min-width: 0;
}

.shipment-invoice-toolbar {
  min-height: 62px;
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fbfcfe;
}

.shipment-invoice-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.shipment-invoice-filters button {
  min-height: 36px;
  border: 1px solid #d9e1eb;
  border-radius: 8px;
  padding: 0 10px;
  color: #4f5f73;
  background: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.shipment-invoice-filters button:hover,
.shipment-invoice-filters button.active {
  border-color: rgba(0, 87, 184, .5);
  color: var(--cobalt);
  background: #f5f9ff;
}

.shipment-invoice-filters button b {
  margin-left: 5px;
  font-weight: 720;
}

.shipment-invoice-search {
  width: min(280px, 30vw);
  min-width: 210px;
}

.shipment-invoice-search input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d9e1eb;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  outline: none;
}

.shipment-invoice-search input:focus {
  border-color: rgba(0, 87, 184, .62);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, .08);
}

.shipment-invoice-unlinked {
  margin: 12px 14px 0;
  overflow: hidden;
  border: 1px solid #ead7a9;
  border-radius: 11px;
  background: #fffdf7;
}

.shipment-invoice-unlinked > summary {
  min-height: 64px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 32px minmax(240px, 1fr) auto auto 18px;
  align-items: center;
  gap: 12px;
  color: inherit;
  cursor: pointer;
  list-style: none;
}

.shipment-invoice-unlinked > summary::-webkit-details-marker {
  display: none;
}

.shipment-invoice-unlinked > summary > i {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: block;
  color: #b77900;
  background: #fff3d5;
  position: relative;
}

.shipment-invoice-unlinked > summary > i::after {
  content: "";
  position: absolute;
  inset: 7px;
  background: currentColor;
  -webkit-mask: url("/assets/icons/phosphor-warning-diamond-regular.svg?v=162") center / contain no-repeat;
  mask: url("/assets/icons/phosphor-warning-diamond-regular.svg?v=162") center / contain no-repeat;
}

.shipment-invoice-unlinked > summary > span strong,
.shipment-invoice-unlinked > summary > span small {
  display: block;
}

.shipment-invoice-unlinked > summary > span strong {
  color: #5d430d;
  font-size: 12px;
  font-weight: 680;
}

.shipment-invoice-unlinked > summary > span small {
  margin-top: 4px;
  color: #8a6b2f;
  font-size: 9.5px;
}

.shipment-invoice-unlinked > summary > b {
  border-radius: 999px;
  padding: 6px 9px;
  color: #8a5b00;
  background: #fff0c7;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.shipment-invoice-unlinked > summary > em {
  color: #715b2e;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 620;
  white-space: nowrap;
}

.shipment-invoice-unlinked > summary > u,
.shipment-dds-finance-group > details > summary > i {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  display: block;
  transform: rotate(45deg);
  transition: transform .18s ease;
}

.shipment-invoice-unlinked[open] > summary > u,
.shipment-dds-finance-group > details[open] > summary > i {
  transform: rotate(225deg);
}

.shipment-invoice-unlinked-list {
  border-top: 1px solid #eddfbc;
  background: #fff;
}

.shipment-invoice-unlinked-row {
  min-height: 62px;
  border-bottom: 1px solid #e9edf2;
  padding: 9px 14px;
  display: grid;
  grid-template-columns: 28px 78px minmax(150px, 1fr) minmax(180px, 1.25fr) minmax(112px, .65fr) 28px;
  align-items: center;
  gap: 10px;
}

.shipment-invoice-unlinked-row:last-child {
  border-bottom: 0;
}

.shipment-invoice-unlinked-row > span,
.shipment-invoice-unlinked-row > time {
  min-width: 0;
}

.shipment-invoice-unlinked-row strong,
.shipment-invoice-unlinked-row small {
  display: block;
}

.shipment-invoice-unlinked-row strong,
.shipment-invoice-unlinked-row time {
  color: #344054;
  font-size: 10.5px;
  font-weight: 640;
}

.shipment-invoice-unlinked-row small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-invoice-unlinked-row .amount {
  text-align: right;
}

.shipment-invoice-unlinked-row .amount strong {
  font-variant-numeric: tabular-nums;
}

.shipment-invoice-unlinked-row .direction,
.shipment-dds-finance-row .direction {
  display: grid;
  place-items: center;
}

.shipment-invoice-unlinked-row .direction i,
.shipment-dds-finance-row .direction i {
  width: 20px;
  height: 20px;
  color: #168043;
  background: currentColor;
  -webkit-mask: url("/assets/icons/tabler-arrow-up-dashed.svg?v=185") center / contain no-repeat;
  mask: url("/assets/icons/tabler-arrow-up-dashed.svg?v=185") center / contain no-repeat;
}

.shipment-invoice-unlinked-row .direction.expense i,
.shipment-dds-finance-row .direction.expense i {
  color: #d0443b;
  -webkit-mask-image: url("/assets/icons/tabler-arrow-down-dashed.svg?v=185");
  mask-image: url("/assets/icons/tabler-arrow-down-dashed.svg?v=185");
}

.shipment-invoice-ledger {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f5f7fa;
}

.shipment-invoice-category {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce3ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(18, 34, 56, .025);
}

.shipment-invoice-category-head {
  min-height: 72px;
  border-bottom: 1px solid #dfe5ed;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, .56fr));
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}

.shipment-invoice-category-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.shipment-invoice-category-title > i {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  color: var(--cobalt);
  background: #edf5ff;
  position: relative;
}

.shipment-invoice-category-title > i::after {
  content: "";
  position: absolute;
  inset: 8px;
  background: currentColor;
  -webkit-mask: var(--invoice-category-icon) center / contain no-repeat;
  mask: var(--invoice-category-icon) center / contain no-repeat;
}

.shipment-invoice-category-title strong,
.shipment-invoice-category-title small,
.shipment-invoice-category-total span,
.shipment-invoice-category-total strong,
.shipment-invoice-category-total small {
  display: block;
}

.shipment-invoice-category-title strong {
  color: #162235;
  font-size: 16px;
  font-weight: 680;
  line-height: 1.2;
}

.shipment-invoice-category-title small {
  margin-top: 4px;
  color: #7a8798;
  font-size: 10.5px;
}

.shipment-invoice-category-total {
  min-width: 0;
  border-left: 1px solid #edf0f4;
  padding-left: 14px;
}

.shipment-invoice-category-total span {
  color: #7b8797;
  font-size: 10px;
  font-weight: 600;
}

.shipment-invoice-category-total strong {
  margin-top: 4px;
  color: #263244;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.shipment-invoice-category-total.income strong,
.shipment-invoice-category-total.result strong {
  color: #168043;
}

.shipment-invoice-category-total.expense strong,
.shipment-invoice-category-total.result.negative strong {
  color: #d0443b;
}

.shipment-invoice-category.empty .shipment-invoice-category-total strong {
  color: #667085;
}

.shipment-invoice-category-total small {
  margin-top: 3px;
  color: #d0443b;
  font-size: 9px;
  line-height: 1.2;
}

.shipment-invoice-table-scroll {
  min-width: 0;
}

.shipment-invoice-category-empty {
  min-height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  color: #8792a2;
  font-size: 10.5px;
}

.shipment-invoice-table-head,
.shipment-invoice-row {
  display: grid;
  grid-template-columns: 34px 80px minmax(108px, .85fr) minmax(120px, .95fr) minmax(140px, 1.18fr) minmax(112px, .82fr) 92px minmax(110px, .84fr) 86px;
  align-items: center;
}

.shipment-invoice-table-head {
  min-height: 36px;
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
  color: #7a8798;
  background: #f8fafc;
  font-size: 9.5px;
  font-weight: 610;
}

.shipment-invoice-row {
  position: relative;
  min-height: 76px;
  border-bottom: 1px solid #e6ebf1;
  padding: 10px 14px;
  cursor: pointer;
}

.shipment-invoice-row:last-child {
  border-bottom: 0;
}

.shipment-invoice-row:hover {
  background: #f8fbff;
}

.shipment-invoice-row:focus-visible {
  z-index: 1;
  outline: 2px solid rgba(0, 87, 184, .62);
  outline-offset: -2px;
  background: #f4f8ff;
}

.shipment-invoice-row > span {
  min-width: 0;
  padding-right: 10px;
}

.shipment-invoice-row strong,
.shipment-invoice-row small,
.shipment-invoice-row em,
.shipment-invoice-row a {
  display: block;
}

.shipment-invoice-row strong {
  overflow: hidden;
  color: #263244;
  font-size: 11.5px;
  font-weight: 640;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.shipment-invoice-row small,
.shipment-invoice-row em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  font-style: normal;
  line-height: 1.35;
}

.shipment-invoice-row a {
  margin-top: 5px;
  overflow: hidden;
  color: var(--cobalt);
  font-size: 9.5px;
  font-weight: 620;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-invoice-direction {
  display: grid;
  place-items: center;
  padding-right: 10px !important;
}

.shipment-invoice-direction i {
  width: 22px;
  height: 22px;
  display: block;
  color: #168043;
  background: currentColor;
  -webkit-mask: url("/assets/icons/tabler-arrow-up-dashed.svg?v=185") center / contain no-repeat;
  mask: url("/assets/icons/tabler-arrow-up-dashed.svg?v=185") center / contain no-repeat;
}

.shipment-invoice-direction.expense i {
  color: #d0443b;
  -webkit-mask-image: url("/assets/icons/tabler-arrow-down-dashed.svg?v=185");
  mask-image: url("/assets/icons/tabler-arrow-down-dashed.svg?v=185");
}

.shipment-invoice-status {
  position: relative;
}

.shipment-invoice-status::before {
  content: none;
}

.shipment-invoice-status i {
  width: 24px;
  height: 24px;
  display: block;
  background: url("/assets/icons/invoice-status-waiting-duotone.png?v=186") center / contain no-repeat;
}

.shipment-invoice-status.paid {
  color: #168043;
}

.shipment-invoice-status.paid i {
  background-image: url("/assets/icons/invoice-status-paid-duotone.png?v=186");
}

.shipment-invoice-status.partial,
.shipment-invoice-status.waiting {
  color: #d88f00;
}

.shipment-invoice-status.overdue,
.shipment-invoice-status.missing {
  color: #d92d20;
}

.shipment-invoice-status.overdue i {
  background-image: url("/assets/icons/invoice-status-overdue-duotone.png?v=186");
}

.shipment-invoice-status.missing i {
  background-color: currentColor;
  background-image: none;
  -webkit-mask: url("/assets/icons/phosphor-warning-diamond-regular.svg?v=162") center / contain no-repeat;
  mask: url("/assets/icons/phosphor-warning-diamond-regular.svg?v=162") center / contain no-repeat;
}

.shipment-invoice-status small {
  color: currentColor;
}

.shipment-invoice-counterparty strong,
.shipment-invoice-purpose strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
}

.shipment-invoice-amount.missing strong,
.shipment-invoice-amount.missing small,
.shipment-invoice-amount small.missing,
.shipment-invoice-due.overdue strong,
.shipment-invoice-due.overdue small {
  color: #d92d20;
}

.shipment-invoice-payment strong {
  color: var(--cobalt);
}

.shipment-invoice-row.paid .shipment-invoice-payment strong {
  color: #168043;
}

.shipment-invoice-payment {
  padding-right: 10px !important;
}

.shipment-invoice-payment > span:first-child {
  min-width: 0;
}

.shipment-invoice-file {
  padding-right: 0 !important;
  display: grid;
  place-items: center;
}

.shipment-invoice-file-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.shipment-invoice-file-primary {
  min-width: 34px;
  display: grid;
  justify-items: center;
}

.shipment-invoice-file-button,
.shipment-invoice-row a.shipment-invoice-file-button {
  width: 28px;
  height: 32px;
  margin: 0;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #fff;
  text-decoration: none;
}

.shipment-invoice-file-button img {
  width: 24px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.shipment-invoice-file-button.missing {
  opacity: .28;
  filter: grayscale(1);
}

.shipment-invoice-row a.shipment-invoice-download {
  margin: 2px 0 0;
  overflow: visible;
  color: var(--cobalt);
  font-size: 8.5px;
  font-weight: 620;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.shipment-invoice-row a.shipment-invoice-download:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.shipment-invoice-delete {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #98a2b3;
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.shipment-invoice-delete svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shipment-invoice-delete:hover {
  border-color: rgba(217, 45, 32, .18);
  color: #d92d20;
  background: #fff5f4;
}

.shipment-invoice-delete:focus-visible {
  outline: 2px solid rgba(217, 45, 32, .3);
  outline-offset: 2px;
}

.shipment-invoice-delete:disabled {
  opacity: .45;
  cursor: wait;
}

.shipment-invoice-inspector {
  border-top: 1px solid var(--border);
  background: #fff;
}

.shipment-invoice-inspector > header {
  min-height: 62px;
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.shipment-invoice-inspector > header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shipment-invoice-inspector h4 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 670;
}

.shipment-invoice-status-label {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--cobalt);
  background: #edf5ff;
  font-size: 9.5px;
  font-weight: 680;
}

.shipment-invoice-status-label.paid {
  color: #168043;
  background: #edf9f1;
}

.shipment-invoice-status-label.overdue,
.shipment-invoice-status-label.missing {
  color: #c9221a;
  background: #fff0ef;
}

.shipment-invoice-status-label.partial {
  color: #9a5b00;
  background: #fff8e8;
}

.shipment-invoice-inspector-grid {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(220px, .8fr) minmax(300px, 1.35fr);
}

.shipment-invoice-inspector-grid > * {
  min-width: 0;
  border-right: 1px solid var(--border);
  padding: 16px 18px;
}

.shipment-invoice-inspector-grid > *:last-child {
  border-right: 0;
}

.shipment-invoice-facts {
  margin: 0;
}

.shipment-invoice-facts > div {
  min-height: 29px;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.shipment-invoice-facts dt,
.shipment-invoice-facts dd {
  font-size: 10.5px;
  line-height: 1.4;
}

.shipment-invoice-facts dt {
  color: var(--muted);
}

.shipment-invoice-facts dd {
  margin: 0;
  color: #344054;
  font-weight: 620;
}

.shipment-invoice-facts dd.missing {
  color: #d92d20;
}

.shipment-invoice-facts dd small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
}

.shipment-invoice-facts a {
  color: var(--cobalt);
}

.shipment-invoice-payment-summary > span,
.shipment-invoice-allocations h5 {
  color: #344054;
  font-size: 11px;
  font-weight: 670;
}

.shipment-invoice-payment-summary > div:first-of-type {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shipment-invoice-payment-summary p {
  margin: 0;
}

.shipment-invoice-payment-summary p small,
.shipment-invoice-payment-summary p strong {
  display: block;
}

.shipment-invoice-payment-summary p small,
.shipment-invoice-payment-summary > small {
  color: var(--muted);
  font-size: 9.5px;
}

.shipment-invoice-payment-summary p strong {
  margin-top: 5px;
  color: var(--text);
  font-size: 18px;
  font-weight: 680;
}

.shipment-invoice-payment-summary p:first-child strong {
  color: var(--cobalt);
}

.shipment-invoice-progress {
  height: 6px;
  margin: 16px 0 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7edf4;
}

.shipment-invoice-progress i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--cobalt);
}

.shipment-invoice-allocations > header {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shipment-invoice-allocations h5 {
  margin: 0;
}

.shipment-invoice-allocations > header span {
  color: var(--muted);
  font-size: 10px;
}

.shipment-invoice-allocations button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid #e6ebf1;
  padding: 7px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.shipment-invoice-allocations button strong,
.shipment-invoice-allocations button small {
  display: block;
}

.shipment-invoice-allocations button strong,
.shipment-invoice-allocations button b {
  color: #344054;
  font-size: 10.5px;
}

.shipment-invoice-allocations button small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.shipment-invoice-allocations-empty,
.shipment-invoice-empty {
  color: var(--muted);
  font-size: 10.5px;
}

.shipment-invoice-allocations-empty {
  min-height: 92px;
  display: grid;
  place-items: center;
  text-align: center;
}

.shipment-invoice-empty {
  min-height: 165px;
  border-top: 1px solid var(--border);
  padding: 28px;
  display: grid;
  place-content: center;
  gap: 5px;
  text-align: center;
}

.shipment-invoice-empty strong {
  color: #344054;
  font-size: 13px;
}

.shipment-invoice-empty span {
  max-width: 470px;
}

@media (max-width: 1180px) {
  .shipment-invoice-category-head {
    grid-template-columns: minmax(200px, 1fr) repeat(3, minmax(105px, .56fr));
  }

  .shipment-invoice-inspector-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shipment-invoice-allocations {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .shipment-invoice-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .shipment-invoice-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .shipment-invoice-filters button {
    flex: 0 0 auto;
  }

  .shipment-invoice-search {
    width: 100%;
    min-width: 0;
  }

  .shipment-invoice-ledger {
    padding: 10px;
  }

  .shipment-invoice-category-head {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 6px;
  }

  .shipment-invoice-category-title {
    grid-column: 1 / -1;
  }

  .shipment-invoice-category-total {
    padding-left: 8px;
  }

  .shipment-invoice-table-scroll {
    overflow-x: auto;
  }

  .shipment-invoice-table-head,
  .shipment-invoice-row {
    width: 1030px;
  }

  .shipment-invoice-inspector > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .shipment-invoice-inspector > header .secondary-button {
    width: 100%;
  }

  .shipment-invoice-inspector-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .shipment-invoice-inspector-grid > * {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .shipment-invoice-inspector-grid > *:last-child {
    border-bottom: 0;
  }

  .shipment-invoice-allocations {
    grid-column: auto;
  }
}

.shipment-reconciliation-card {
  min-height: 150px;
  border: 1px solid #d9e1eb;
  border-radius: 12px;
  padding: 18px 20px;
  display: block;
  background: #fff;
}

.shipment-reconciliation-card > header span {
  color: var(--cobalt);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.shipment-reconciliation-card > header h3,
.shipment-reconciliation-card > header p {
  margin: 0;
}

.shipment-reconciliation-card > header h3 {
  margin-top: 5px;
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
}

.shipment-reconciliation-card > header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.shipment-closing-documents {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shipment-closing-document {
  min-height: 66px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.shipment-closing-document.complete {
  border-color: rgba(22, 163, 74, .25);
  background: #fbfefc;
}

.shipment-closing-document strong,
.shipment-closing-document small {
  display: block;
}

.shipment-closing-document strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.shipment-closing-document small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
}

.shipment-closing-document-content {
  min-width: 0;
}

.shipment-closing-document-items {
  margin-top: 7px;
  display: grid;
  gap: 5px;
}

.shipment-closing-document-item {
  width: 100%;
  min-height: 30px;
  border: 1px solid #dce7df;
  border-radius: 7px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-size: 11px;
  text-align: left;
}

button.shipment-closing-document-item {
  cursor: pointer;
}

button.shipment-closing-document-item:hover {
  border-color: rgba(0, 87, 184, .35);
  background: #f8fbff;
}

button.shipment-closing-document-item:focus-visible {
  outline: 3px solid rgba(0, 87, 184, .16);
  outline-offset: 2px;
}

.shipment-closing-document-item > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-closing-document-item > i {
  color: var(--cobalt);
  font-style: normal;
  font-size: 17px;
  line-height: 1;
}

.shipment-closing-document.multiple {
  align-items: start;
}

.shipment-closing-document.multiple > .shipment-document-state,
.shipment-closing-document.multiple > .secondary-button {
  margin-top: 6px;
}

.shipment-document-editor-dialog {
  width: min(680px, calc(100vw - 32px));
}

.shipment-document-editor-dialog.invoice-mode {
  width: min(720px, calc(100vw - 32px));
}

.shipment-document-editor-fields .field > span,
.shipment-document-editor-fields input,
.shipment-document-editor-fields select {
  font-size: 13px;
}

.shipment-document-editor-fields .field > small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
}

.shipment-document-editor-dialog.invoice-mode .shipment-document-editor-fields .field > span,
.shipment-document-editor-dialog.invoice-mode .shipment-document-editor-fields input,
.shipment-document-editor-dialog.invoice-mode .shipment-document-editor-fields select {
  font-size: 14px;
}

.shipment-document-editor-dialog.invoice-mode .shipment-document-editor-fields .field > small {
  font-size: 11.5px;
}

.shipment-invoice-payment-editor {
  border: 1px solid #dce4ee;
  border-radius: 14px;
  padding: 18px;
  background: #fff;
}

.shipment-invoice-payment-editor > header span,
.shipment-invoice-payment-editor > header h3,
.shipment-invoice-payment-editor > header p {
  margin: 0;
}

.shipment-invoice-payment-editor > header span {
  color: var(--cobalt);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.shipment-invoice-payment-editor > header h3 {
  margin-top: 5px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 660;
}

.shipment-invoice-payment-editor > header p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.shipment-invoice-manual-payment {
  margin-top: 16px;
  border: 1px solid #dce4ee;
  border-radius: 11px;
  overflow: hidden;
  background: #f8fafc;
}

.shipment-invoice-manual-payment:has(input:checked) {
  border-color: rgba(22, 163, 74, .34);
  background: #f6fbf8;
  box-shadow: inset 3px 0 0 #16a34a;
}

.shipment-invoice-manual-toggle {
  min-height: 68px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  cursor: pointer;
}

.shipment-invoice-manual-toggle > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shipment-invoice-manual-toggle > i {
  width: 21px;
  height: 21px;
  border: 1.5px solid #a9b4c3;
  border-radius: 6px;
  background: #fff;
}

.shipment-invoice-manual-toggle > input:focus-visible + i {
  outline: 3px solid rgba(0, 87, 184, .14);
  outline-offset: 2px;
}

.shipment-invoice-manual-toggle > input:checked + i {
  border-color: #16a34a;
  background: #16a34a url("/assets/icons/phosphor-check-circle-regular.svg?v=162") center / 15px 15px no-repeat;
}

.shipment-invoice-manual-toggle strong,
.shipment-invoice-manual-toggle small {
  display: block;
}

.shipment-invoice-manual-toggle strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.shipment-invoice-manual-toggle small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.shipment-invoice-manual-fields {
  border-top: 1px solid rgba(22, 163, 74, .16);
  padding: 13px 14px 14px 47px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 12px;
}

.shipment-invoice-manual-fields > label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.shipment-invoice-manual-fields > label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
}

.shipment-invoice-manual-fields input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid #cfd8e4;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-size: 13px;
  outline: 0;
}

.shipment-invoice-manual-fields input:focus {
  border-color: rgba(0, 87, 184, .5);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, .1);
}

.shipment-invoice-manual-amount {
  border: 1px solid #cfd8e4;
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fff;
}

.shipment-invoice-manual-amount input {
  border: 0;
  border-radius: 0;
}

.shipment-invoice-manual-amount b {
  padding: 0 10px;
  display: grid;
  place-items: center;
  color: #526174;
  background: #eef3f7;
  font-size: 11px;
}

.shipment-invoice-manual-fields > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.shipment-invoice-payment-editor-summary {
  margin-top: 16px;
  border: 1px solid #e0e6ee;
  border-radius: 11px;
  padding: 14px 15px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  background: #f8fafc;
}

.shipment-invoice-payment-editor-summary > div:not(.shipment-invoice-payment-progress) span,
.shipment-invoice-payment-editor-summary > div:not(.shipment-invoice-payment-progress) strong {
  display: block;
}

.shipment-invoice-payment-editor-summary > div:not(.shipment-invoice-payment-progress) span {
  color: var(--muted);
  font-size: 11px;
}

.shipment-invoice-payment-editor-summary > div:not(.shipment-invoice-payment-progress) strong {
  margin-top: 5px;
  color: var(--text);
  font-size: 18px;
  font-weight: 680;
}

.shipment-invoice-payment-editor-summary > div:first-child strong {
  color: var(--cobalt);
}

.shipment-invoice-payment-progress {
  height: 6px;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 99px;
  background: #e3e9f1;
}

.shipment-invoice-payment-progress i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--cobalt);
}

.shipment-invoice-payment-editor-summary > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.shipment-invoice-payment-options {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.shipment-invoice-payment-options-head {
  margin-top: 17px;
  display: grid;
  gap: 3px;
}

.shipment-invoice-payment-options-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.shipment-invoice-payment-options-head span {
  color: var(--muted);
  font-size: 10.5px;
}

.shipment-invoice-payment-option {
  min-width: 0;
  border: 1px solid #dde4ed;
  border-radius: 11px;
  padding: 12px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) minmax(118px, auto);
  align-items: center;
  gap: 10px;
  background: #fff;
  cursor: pointer;
}

.shipment-invoice-payment-option:hover {
  border-color: rgba(0, 87, 184, .3);
  background: #fbfdff;
}

.shipment-invoice-payment-option.selected {
  border-color: rgba(0, 87, 184, .46);
  background: #f5f9ff;
  box-shadow: inset 3px 0 0 var(--cobalt);
}

.shipment-invoice-payment-option.unavailable {
  opacity: .58;
  cursor: not-allowed;
}

.shipment-invoice-payment-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shipment-invoice-payment-check i {
  width: 20px;
  height: 20px;
  border: 1.5px solid #a9b4c3;
  border-radius: 50%;
  display: block;
  background: #fff;
}

.shipment-invoice-payment-check input:checked + i {
  border-color: var(--cobalt);
  background: var(--cobalt) url("/assets/icons/phosphor-check-circle-regular.svg?v=162") center / 14px 14px no-repeat;
}

.shipment-invoice-payment-operation,
.shipment-invoice-payment-source-amount {
  min-width: 0;
}

.shipment-invoice-payment-operation b,
.shipment-invoice-payment-operation strong,
.shipment-invoice-payment-operation small,
.shipment-invoice-payment-source-amount b,
.shipment-invoice-payment-source-amount small {
  display: block;
}

.shipment-invoice-payment-operation b {
  color: var(--cobalt);
  font-size: 10px;
  font-weight: 680;
}

.shipment-invoice-payment-operation strong {
  margin-top: 4px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 630;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-invoice-payment-operation small,
.shipment-invoice-payment-source-amount small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.shipment-invoice-payment-source-amount {
  text-align: right;
}

.shipment-invoice-payment-source-amount b {
  color: var(--text);
  font-size: 13px;
  font-weight: 670;
}

.shipment-invoice-payment-credit {
  grid-column: 2 / -1;
  border-top: 1px solid rgba(0, 87, 184, .12);
  padding-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  justify-content: end;
  gap: 12px;
}

.shipment-invoice-payment-credit > label {
  min-width: 0;
}

.shipment-invoice-payment-credit > label > small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.shipment-invoice-payment-credit > label > span {
  width: 100%;
  border: 1px solid #cfd8e4;
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fff;
}

.shipment-invoice-payment-credit input {
  min-width: 0;
  height: 38px;
  border: 0;
  padding: 0 10px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 13px;
  outline: 0;
}

.shipment-invoice-payment-credit input[readonly] {
  color: #17633a;
  background: #f4fbf6;
  font-weight: 650;
}

.shipment-invoice-payment-credit b {
  padding: 0 10px;
  display: grid;
  place-items: center;
  color: #526174;
  background: #f3f6fa;
  font-size: 11px;
}

.shipment-invoice-payment-fx-note {
  margin-top: 6px;
  display: block;
  color: #287a48;
  font-size: 9.5px;
  font-style: normal;
  line-height: 1.4;
}

@media (max-width: 620px) {
  .shipment-invoice-manual-fields {
    padding-left: 14px;
    grid-template-columns: minmax(0, 1fr);
  }

  .shipment-invoice-payment-credit {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
  }
}

.shipment-invoice-payment-empty {
  min-height: 150px;
  padding: 24px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.shipment-invoice-payment-empty img {
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
}

.shipment-invoice-payment-empty strong {
  color: var(--text);
  font-size: 13px;
}

.shipment-invoice-payment-empty span {
  max-width: 380px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.shipment-invoice-payment-loading {
  grid-column: 1 / -1;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.shipment-invoice-payment-loading i {
  width: 18px;
  height: 18px;
  border: 2px solid #dbe4ef;
  border-top-color: var(--cobalt);
  border-radius: 50%;
  animation: shipment-upload-spin .8s linear infinite;
}

.shipment-invoice-payment-editor-hint {
  min-height: 18px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.shipment-invoice-payment-editor-hint.error {
  color: var(--critical);
}

.shipment-reconciliation-card.complete .shipment-reconciliation-icon {
  color: #16a34a;
  background: rgba(22, 163, 74, .08);
}

.shipment-reconciliation-icon i {
  width: 25px;
  height: 25px;
}

.shipment-reconciliation-card .secondary-button {
  min-height: 39px;
  font-size: 11px;
}

.shipment-finance-actions {
  display: flex;
  gap: 8px;
}

.shipment-dds-finance-summary,
.shipment-dds-finance-groups {
  overflow: hidden;
}

.shipment-dds-finance-headline {
  border-bottom: 1px solid var(--border);
}

.shipment-dds-finance-kpis {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.shipment-dds-finance-kpis > article {
  min-width: 0;
  min-height: 116px;
  border: 1px solid #dce3ec;
  border-radius: 11px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}

.shipment-dds-finance-kpis span,
.shipment-dds-finance-kpis strong,
.shipment-dds-finance-kpis small {
  display: block;
}

.shipment-dds-finance-kpis span {
  color: #768397;
  font-size: 10px;
  font-weight: 620;
}

.shipment-dds-finance-kpis strong {
  margin-top: 9px;
  color: #1d2939;
  font-size: 20px;
  font-weight: 710;
  font-variant-numeric: tabular-nums;
  line-height: 1.12;
}

.shipment-dds-finance-kpis small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.shipment-dds-finance-kpis .income strong,
.shipment-dds-finance-kpis .result.positive strong {
  color: #168043;
}

.shipment-dds-finance-kpis .expense strong,
.shipment-dds-finance-kpis .result.negative strong,
.shipment-dds-finance-kpis .after-tax.negative strong {
  color: #d0443b;
}

.shipment-dds-finance-kpis .result {
  border-color: #c7ddf7;
  background: #f5f9ff;
}

.shipment-dds-finance-completeness {
  min-height: 47px;
  border-top: 1px solid var(--border);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: #fbfcfe;
}

.shipment-dds-finance-completeness > span {
  border: 1px solid #dfe5ed;
  border-radius: 999px;
  padding: 6px 9px;
  color: #667085;
  background: #fff;
  font-size: 9px;
  font-weight: 610;
}

.shipment-dds-finance-completeness > span b {
  color: #344054;
}

.shipment-dds-finance-completeness > span.attention {
  border-color: #ead7a9;
  color: #8a5b00;
  background: #fffaf0;
}

.shipment-dds-finance-completeness > span.critical {
  border-color: #f2c7c3;
  color: #c83228;
  background: #fff5f4;
}

.shipment-dds-finance-completeness > span.ready {
  border-color: #bfdfca;
  color: #168043;
  background: #f4fbf6;
}

.shipment-dds-finance-group-list {
  padding: 14px;
  display: grid;
  gap: 11px;
  background: #f5f7fa;
}

.shipment-dds-finance-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce3ec;
  border-radius: 12px;
  background: #fff;
}

.shipment-dds-finance-group > header {
  min-height: 76px;
  padding: 11px 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(125px, .58fr));
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}

.shipment-dds-finance-group > header > div:not(.shipment-dds-finance-group-title) {
  min-width: 0;
  border-left: 1px solid #edf0f4;
  padding-left: 14px;
}

.shipment-dds-finance-group > header span,
.shipment-dds-finance-group > header strong,
.shipment-dds-finance-group > header small {
  display: block;
}

.shipment-dds-finance-group > header > div:not(.shipment-dds-finance-group-title) span {
  color: #7b8797;
  font-size: 9.5px;
  font-weight: 600;
}

.shipment-dds-finance-group > header > div:not(.shipment-dds-finance-group-title) strong {
  margin-top: 5px;
  color: #263244;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.shipment-dds-finance-group > header strong.income {
  color: #168043 !important;
}

.shipment-dds-finance-group > header strong.expense {
  color: #d0443b !important;
}

.shipment-dds-finance-group > header small.critical {
  margin-top: 3px;
  color: #d0443b;
  font-size: 8.5px;
}

.shipment-dds-finance-group-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.shipment-dds-finance-group-title > i {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  color: var(--cobalt);
  background: #edf5ff;
  position: relative;
}

.shipment-dds-finance-group-title > i::after {
  content: "";
  position: absolute;
  inset: 9px;
  background: currentColor;
  -webkit-mask: var(--shipment-finance-category-icon) center / contain no-repeat;
  mask: var(--shipment-finance-category-icon) center / contain no-repeat;
}

.shipment-dds-finance-group-title strong {
  overflow: hidden;
  color: #162235;
  font-size: 15px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-dds-finance-group-title small {
  margin-top: 4px;
  color: #7a8798;
  font-size: 9.5px;
}

.shipment-dds-finance-group > details {
  border-top: 1px solid var(--border);
}

.shipment-dds-finance-group > details > summary {
  min-height: 42px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4f5f73;
  background: #fbfcfe;
  cursor: pointer;
  list-style: none;
}

.shipment-dds-finance-group > details > summary::-webkit-details-marker {
  display: none;
}

.shipment-dds-finance-group > details > summary span {
  color: var(--cobalt);
  font-size: 10px;
  font-weight: 660;
}

.shipment-dds-finance-group > details > summary b {
  margin-left: auto;
  color: #7b8797;
  font-size: 9px;
  font-weight: 610;
}

.shipment-dds-finance-table-scroll {
  min-width: 0;
}

.shipment-dds-finance-table-head,
.shipment-dds-finance-row {
  display: grid;
  grid-template-columns: 30px 82px minmax(180px, 1.15fr) minmax(190px, 1.2fr) minmax(125px, .72fr) minmax(165px, .95fr) 30px;
  align-items: center;
  gap: 10px;
}

.shipment-dds-finance-table-head {
  min-height: 34px;
  border-top: 1px solid #edf0f4;
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
  color: #7a8798;
  background: #f8fafc;
  font-size: 9px;
  font-weight: 610;
}

.shipment-dds-finance-row {
  min-height: 68px;
  border-bottom: 1px solid #e8edf3;
  padding: 9px 14px;
}

.shipment-dds-finance-row:last-child {
  border-bottom: 0;
}

.shipment-dds-finance-row > span,
.shipment-dds-finance-row > time {
  min-width: 0;
}

.shipment-dds-finance-row strong,
.shipment-dds-finance-row small {
  display: block;
}

.shipment-dds-finance-row strong,
.shipment-dds-finance-row time {
  overflow: hidden;
  color: #344054;
  font-size: 10.5px;
  font-weight: 640;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.shipment-dds-finance-row small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-dds-finance-row .amount {
  text-align: right;
}

.shipment-dds-finance-row .amount strong {
  font-variant-numeric: tabular-nums;
}

.shipment-dds-finance-row .amount small.critical,
.shipment-invoice-unlinked-row small.critical {
  color: #d0443b;
}

.shipment-dds-finance-row .basis strong {
  color: #168043;
}

.shipment-dds-finance-row .basis.unlinked strong {
  color: #9a6500;
}

.shipment-dds-operation-open {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.shipment-accrual-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.shipment-accrual-grid > article {
  overflow: hidden;
  border: 1px solid #dce3ec;
  border-radius: 10px;
  background: #fbfcfe;
}

.shipment-accrual-grid article > header {
  min-height: 45px;
  border-bottom: 1px solid var(--border);
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shipment-accrual-grid article > header strong {
  color: var(--cobalt);
  font-size: 11px;
  font-weight: 730;
}

.shipment-accrual-grid article > header span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 620;
}

.shipment-accrual-grid dl {
  margin: 0;
}

.shipment-accrual-grid dl > div {
  min-height: 39px;
  border-bottom: 1px solid #e8edf3;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shipment-accrual-grid dl > div:last-child {
  border-bottom: 0;
}

.shipment-accrual-grid dt,
.shipment-accrual-grid dd {
  font-size: 9.5px;
}

.shipment-accrual-grid dt {
  color: var(--muted);
}

.shipment-accrual-grid dd {
  margin: 0;
  color: var(--text);
  font-weight: 630;
  text-align: right;
}

.shipment-accrual-grid .balance {
  background: #f1f6fd;
}

.shipment-accrual-grid .balance dt,
.shipment-accrual-grid .balance dd {
  color: var(--cobalt);
  font-weight: 680;
}

.shipment-finance-control {
  min-height: 76px;
  border-top: 1px solid var(--border);
  padding: 13px 18px;
  display: grid;
  grid-template-columns: minmax(190px, .8fr) auto minmax(300px, 1.3fr);
  align-items: center;
  gap: 18px;
  background: #fbfcfe;
}

.shipment-finance-control > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shipment-finance-control > div > i {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  background: url("/assets/icons/doc-sheet-colored.svg?v=73") center / contain no-repeat;
}

.shipment-finance-control small,
.shipment-finance-control strong {
  display: block;
}

.shipment-finance-control small {
  color: var(--muted);
  font-size: 9px;
}

.shipment-finance-control strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 11px;
}

.shipment-finance-control > b {
  border-radius: 999px;
  padding: 7px 10px;
  color: #8a5b00;
  background: rgba(245, 158, 11, .1);
  font-size: 9.5px;
  font-weight: 680;
}

.shipment-finance-control.complete > b {
  color: #168043;
  background: rgba(22, 163, 74, .09);
}

.shipment-finance-control > p {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.shipment-finance-register .transport-finance-head,
.shipment-finance-register .transport-finance-row {
  margin-inline: 18px;
}

.shipment-finance-register .transport-finance-head {
  margin-top: 0;
}

.shipment-empty-state {
  min-height: 128px;
  padding: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 1320px) {
  .shipment-card-hero {
    grid-template-columns: minmax(270px, .7fr) minmax(0, 2fr);
  }

  .shipment-card-title {
    padding-inline: 23px;
  }

  .shipment-card-summary {
    padding-inline: 32px;
  }

  .shipment-card-summary-primary {
    grid-template-columns: minmax(0, .78fr) minmax(0, .68fr) minmax(0, 1.18fr);
  }

  .shipment-card-fact {
    padding-inline: 8px;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 9px;
  }

  .shipment-card-fact-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
  }

  .shipment-card-fact-icon > i {
    width: 24px;
    height: 24px;
  }

  .shipment-card-fact-copy strong {
    font-size: 15px;
  }

  .shipment-card-fact.cargo-name .shipment-card-fact-copy strong,
  .shipment-card-fact.manager .shipment-card-fact-copy strong {
    font-size: 14px;
  }

  .shipment-card-fact.client .shipment-card-fact-copy strong {
    font-size: 13px;
  }

  .shipment-field-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shipment-field:nth-child(4n) {
    border-right: 1px solid var(--border);
  }

  .shipment-field:nth-child(3n) {
    border-right: 0;
  }

  .shipment-finance-register .transport-finance-head,
  .shipment-finance-register .transport-finance-row {
    min-width: 900px;
  }

  .shipment-finance-register {
    overflow-x: auto;
  }
}

@media (max-width: 980px) {
  .shipment-card-hero {
    grid-template-columns: 1fr;
  }

  .shipment-card-title {
    min-height: 154px;
    border-right: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-content: center;
    column-gap: 24px;
  }

  .shipment-card-title > span,
  .shipment-card-title h2,
  .shipment-card-title .transport-status {
    grid-column: 1;
  }

  .shipment-card-title h2 {
    margin-block: 13px 15px;
    font-size: 45px;
  }

  .shipment-card-kind {
    grid-column: 2;
    grid-row: 1 / -1;
    margin-top: 0;
    align-self: center;
  }

  .shipment-card-summary {
    min-height: 238px;
    padding: 28px 28px 30px;
  }

  .shipment-card-summary-primary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shipment-card-summary-lower {
    grid-template-columns: minmax(0, 2.2fr) minmax(210px, 1fr);
  }

  .shipment-card-tabs {
    overflow-x: auto;
    grid-template-columns: repeat(6, minmax(170px, 1fr));
  }

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

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

  .shipment-cargo-summary-grid > .shipment-field.cargo {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .shipment-cargo-summary-grid > .shipment-cargo-condition-stack {
    grid-column: span 2;
  }

  .shipment-field-grid.shipment-parties-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shipment-parties-grid > .shipment-field.shipper {
    grid-column: 1 / -1;
  }

  .shipment-parties-grid > .shipment-recipient-summary,
  .shipment-parties-grid > .shipment-field.contact {
    grid-column: 1 / -1;
  }

  .shipment-parties-grid > .shipment-recipient-summary,
  .shipment-parties-grid > .shipment-field.contact {
    border-right: 0;
  }

  .shipment-field:nth-child(3n) {
    border-right: 1px solid var(--border);
  }

  .shipment-field:nth-child(2n) {
    border-right: 0;
  }

  .shipment-document-groups,
  .shipment-accrual-grid {
    grid-template-columns: 1fr;
  }

  .shipment-dds-finance-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shipment-dds-finance-group > header {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shipment-dds-finance-group-title {
    grid-column: 1 / -1;
  }

  .shipment-invoice-unlinked > summary {
    grid-template-columns: 32px minmax(180px, 1fr) auto 18px;
  }

  .shipment-invoice-unlinked > summary > em {
    grid-column: 2 / -1;
  }

  .shipment-document-group {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .shipment-document-group:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .shipment-closing-documents {
    grid-template-columns: 1fr;
  }

  .shipment-document-tabs {
    display: flex;
    overflow-x: auto;
    padding-inline: 10px;
  }

  .shipment-document-tabs button {
    min-width: 210px;
  }

  .shipment-invoice-unlinked > summary {
    grid-template-columns: 32px minmax(0, 1fr) 18px;
  }

  .shipment-invoice-unlinked > summary > b {
    grid-column: 2;
    justify-self: start;
  }

  .shipment-invoice-unlinked > summary > em {
    grid-column: 2 / -1;
    white-space: normal;
  }

  .shipment-invoice-unlinked-list {
    overflow-x: auto;
  }

  .shipment-invoice-unlinked-row {
    width: 820px;
  }

  .shipment-dds-finance-kpis {
    grid-template-columns: 1fr;
  }

  .shipment-dds-finance-kpis > article {
    min-height: 100px;
  }

  .shipment-dds-finance-group > header {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px 5px;
  }

  .shipment-dds-finance-group > header > div:not(.shipment-dds-finance-group-title) {
    padding-left: 8px;
  }

  .shipment-dds-finance-table-scroll {
    overflow-x: auto;
  }

  .shipment-dds-finance-table-head,
  .shipment-dds-finance-row {
    width: 940px;
  }

  .transport-detail-toolbar {
    margin-bottom: 8px;
  }

  .shipment-card-hero {
    min-height: 0;
  }

  .shipment-card-title h2 {
    margin-block: 12px 15px;
    font-size: 34px;
  }

  .shipment-card-title {
    min-height: 132px;
    padding: 22px 18px;
    box-shadow: none;
  }

  .shipment-card-title > span {
    font-size: 10px;
  }

  .shipment-card-title .transport-status {
    min-height: 30px;
    font-size: 11px;
  }

  .shipment-card-kind {
    gap: 9px;
  }

  .shipment-card-kind > i {
    width: 23px;
    height: 23px;
    flex-basis: 23px;
  }

  .shipment-card-kind > span {
    font-size: 11px;
  }

  .shipment-card-summary {
    min-height: 0;
    padding: 12px 16px 16px;
    grid-template-rows: auto auto;
  }

  .shipment-card-summary-primary,
  .shipment-card-summary-secondary,
  .shipment-card-summary-lower {
    grid-template-columns: 1fr;
  }

  .shipment-card-summary-lower {
    gap: 0;
  }

  .shipment-card-summary-secondary {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .shipment-card-fact,
  .shipment-card-summary-primary .shipment-card-fact:first-child,
  .shipment-card-summary-secondary .shipment-card-fact:first-child,
  .shipment-card-summary-lower > .shipment-card-fact:first-child {
    min-height: 68px;
    border-top: 1px solid #dce3eb;
    padding-inline: 0;
  }

  .shipment-card-summary-primary .shipment-card-fact + .shipment-card-fact,
  .shipment-card-summary-secondary .shipment-card-fact + .shipment-card-fact {
    border-left: 0;
  }

  .shipment-card-tabs {
    grid-template-columns: repeat(6, minmax(142px, 1fr));
  }

  .shipment-card-tabs button {
    padding-inline: 14px;
  }

  .shipment-tab-page {
    padding: 12px;
  }

  .shipment-comments-card .shipment-section-head { gap: 12px; }
  .shipment-comments-stream { padding: 18px 14px 4px; }

  .shipment-comment-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }

  .shipment-comment-avatar {
    width: 34px;
    height: 34px;
    font-size: 10px;
  }

  .shipment-comment-content { padding: 11px 12px 12px; }

  .shipment-comment-content header {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .shipment-comment-content p,
  .shipment-comment-composer textarea { font-size: 16px; }

  .shipment-comment-composer { padding: 16px 14px 18px; }

  .shipment-comment-composer-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .shipment-comment-send {
    width: 100%;
    min-height: 46px;
  }

  .shipment-section-head,
  .shipment-finance-headline {
    align-items: flex-start;
    flex-direction: column;
  }

  .shipment-section-head .secondary-button,
  .shipment-section-head .primary-button,
  .shipment-finance-actions {
    width: 100%;
  }

  .shipment-finance-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .shipment-field-grid {
    grid-template-columns: 1fr;
  }

  .shipment-field-grid.shipment-parties-grid {
    grid-template-columns: 1fr;
  }

  .shipment-container-manifest > header {
    display: none;
  }

  .shipment-container-manifest-row {
    padding-block: 13px;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .shipment-container-manifest-row > .shipment-container-sequence {
    grid-row: 1 / span 2;
    padding-inline: 16px 0;
    align-self: center;
    gap: 6px;
  }

  .shipment-container-sequence > span {
    width: 25px;
    height: 25px;
  }

  .shipment-container-sequence > i {
    width: 21px;
    height: 21px;
  }

  .shipment-container-manifest-row > strong,
  .shipment-container-manifest-row > b,
  .shipment-container-manifest-row > span {
    padding-inline: 0 16px;
  }

  .shipment-container-manifest-row > b {
    text-align: right;
  }

  .shipment-container-manifest-row > span {
    grid-column: 2 / -1;
    flex-wrap: wrap;
  }

  .shipment-cargo-summary-grid {
    grid-template-columns: 1fr;
  }

  .shipment-cargo-summary-grid .shipment-field,
  .shipment-cargo-summary-grid .shipment-field.cargo,
  .shipment-cargo-summary-grid > .shipment-cargo-condition-stack {
    grid-column: auto;
    border-right: 0;
  }

  .shipment-tnved-row {
    grid-template-columns: 1fr;
  }

  .shipment-tnved-row > div:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .shipment-field,
  .shipment-field:nth-child(n),
  .shipment-field.wide {
    grid-column: auto;
    border-right: 0;
  }

  .shipment-check-state {
    min-height: 36px;
  }

  .shipment-audit {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .shipment-workflow {
    padding-inline: 14px;
  }

  .shipment-workflow-row {
    padding: 14px 0;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px 12px;
  }

  .shipment-workflow-details,
  .shipment-workflow-status {
    grid-column: 2;
    justify-self: start;
  }

  .shipment-workflow-details {
    flex-wrap: wrap;
  }

  .shipment-reconciliation-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .shipment-reconciliation-card .secondary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .shipment-finance-control {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shipment-card-tabs button {
    transition: none;
  }

  .shipment-comments-loading i,
  .shipment-comment-composer textarea {
    animation: none;
    transition: none;
  }
}

/* Shipment information workspace v149 */
.shipment-information-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  align-items: start;
  gap: 14px;
}

.shipment-information-main {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.shipment-document-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.shipment-document-grid > .shipment-section-card {
  min-width: 0;
}

.shipment-document-grid .shipment-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shipment-document-grid .shipment-field:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.shipment-document-grid .shipment-field:nth-child(even) {
  border-right: 0;
}

.shipment-document-grid .shipment-field.wide {
  grid-column: span 2;
  border-right: 0;
}

.shipment-information-stages {
  position: sticky;
  top: 12px;
  border: 1px solid #d9e1eb;
  border-radius: 12px;
  padding: 18px 17px 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 34px rgba(34, 54, 84, .055);
}

.shipment-information-stages > header {
  min-height: 38px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shipment-information-stages > header span {
  color: var(--text);
  font-size: 12px;
  font-weight: 680;
}

.shipment-information-stages > header strong {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--cobalt);
  background: rgba(8, 103, 216, .08);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.shipment-stage-rail {
  position: relative;
  padding-top: 15px;
}

.shipment-stage-rail::before {
  position: absolute;
  top: 29px;
  bottom: 16px;
  left: 14px;
  width: 1px;
  background: #d7dee8;
  content: "";
}

.shipment-stage-rail-item {
  position: relative;
  min-height: 49px;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.shipment-stage-rail-item > i {
  z-index: 1;
  width: 29px;
  height: 29px;
  border: 1px solid #d4dce7;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #8c97a8;
  background: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.shipment-stage-rail-item > div {
  padding-top: 2px;
}

.shipment-stage-rail-item strong,
.shipment-stage-rail-item small {
  display: block;
}

.shipment-stage-rail-item strong {
  color: #344054;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 630;
}

.shipment-stage-rail-item small {
  margin-top: 3px;
  color: #8a95a5;
  font-size: 8.5px;
  line-height: 1.35;
}

.shipment-stage-rail-item.done > i {
  border-color: rgba(22, 163, 74, .3);
  color: #168043;
  background: #effaf3;
}

.shipment-stage-rail-item.current > i {
  border-color: #0867d8;
  color: #fff;
  background: #0867d8;
  box-shadow: 0 0 0 4px rgba(8, 103, 216, .1);
}

button.shipment-check-state {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

button.shipment-check-state:hover {
  filter: brightness(.98);
}

button.shipment-check-state:focus-visible {
  outline: 3px solid rgba(8, 103, 216, .2);
  outline-offset: 2px;
}

.shipment-bill-file {
  min-height: 58px;
  margin: 0 18px 18px;
  border: 1px solid rgba(8, 103, 216, .16);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  background: rgba(8, 103, 216, .035);
  text-decoration: none;
}

.shipment-bill-file > i {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  background: var(--transport-icon) center / contain no-repeat;
}

.shipment-bill-file span,
.shipment-bill-file b,
.shipment-bill-file small {
  display: block;
}

.shipment-bill-file b {
  color: var(--cobalt);
  font-size: 10.5px;
  font-weight: 650;
}

.shipment-bill-file small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.shipment-document-link {
  width: fit-content;
  margin-top: 5px;
  display: block;
  color: var(--cobalt);
  font-size: 9px;
  font-weight: 620;
  text-decoration: none;
}

.edit-dialog.shipment-focused-dialog {
  width: min(760px, calc(100vw - 42px));
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  border: 0;
  border-radius: 20px 0 0 20px;
  padding: 0;
  color: var(--text);
  background: #fff;
  box-shadow: -26px 0 70px rgba(17, 24, 39, .18);
  overflow: hidden;
}

.shipment-focused-dialog::backdrop {
  background: rgba(15, 23, 42, .32);
  backdrop-filter: blur(2px);
}

.shipment-focused-form {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.shipment-focused-scroll {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 22px 24px 30px;
  overflow-y: auto;
  background: #f8fafc;
}

.shipment-focused-form > .transport-dialog-actions {
  position: relative;
  z-index: 100;
  isolation: isolate;
  pointer-events: auto;
  box-shadow: 0 -10px 24px rgba(34, 54, 84, .055);
}

.shipment-focused-form > .transport-dialog-actions button {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.shipment-focused-scroll > .transport-form-grid,
.shipment-focused-section {
  border: 1px solid #dde4ed;
  border-radius: 12px;
  padding: 18px;
  background: #fff;
}

.shipment-focused-scroll > * + * {
  margin-top: 14px;
}

.transport-form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.transport-form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shipment-focused-section > header {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.shipment-focused-section > header span {
  display: block;
  color: var(--cobalt);
  font-size: 8.5px;
  font-weight: 720;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.shipment-focused-section > header h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 14px;
}

.shipment-bill-containers-section > header p {
  max-width: 580px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.shipment-bill-containers {
  display: grid;
  gap: 9px;
}

.shipment-bill-container-row {
  border: 1px solid #dce5ef;
  border-radius: 11px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr);
  align-items: end;
  gap: 14px;
  background: #f8fafc;
}

.shipment-bill-container-plan {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  row-gap: 5px;
}

.shipment-bill-container-plan > span {
  border: 1px solid #cfe0f3;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--cobalt);
  background: #eef5fd;
  font-size: 8px;
  font-weight: 720;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.shipment-bill-container-plan > strong {
  color: var(--text);
  font-size: 13px;
}

.shipment-bill-container-plan > small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #66768a;
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-bill-container-row [data-bill-container-number] {
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.shipment-bill-containers-empty {
  border: 1px dashed #cbd8e7;
  border-radius: 10px;
  padding: 16px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 10px;
  line-height: 1.5;
}

.shipment-focused-repeat {
  display: grid;
  gap: 9px;
}

.shipment-focused-repeat-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(120px, .65fr) 34px;
  align-items: end;
  gap: 9px;
}

.shipment-file-drop {
  min-height: 104px;
  border: 1px dashed #aac3df;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text);
  background: #f6faff;
  cursor: pointer;
}

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

.shipment-file-drop > i {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: var(--transport-icon) center / contain no-repeat;
}

.shipment-file-drop b,
.shipment-file-drop small {
  display: block;
}

.shipment-file-drop b {
  color: var(--cobalt);
  font-size: 12px;
}

.shipment-file-drop small,
.shipment-existing-file small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.shipment-existing-file {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  font-size: 10px;
}

.shipment-existing-file a {
  color: var(--cobalt);
  font-weight: 630;
  text-decoration: none;
}

.shipment-existing-file span {
  color: var(--text);
  font-weight: 620;
}

.transport-tnved-collection {
  min-width: 0;
  border: 1px solid #dce4ee;
  border-radius: 11px;
  padding: 13px;
  background: #fbfcfe;
}

.transport-tnved-collection > header {
  min-height: 38px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.transport-tnved-collection > header span,
.transport-tnved-collection > header small {
  display: block;
}

.transport-tnved-collection > header span {
  color: var(--text);
  font-size: 12px;
  font-weight: 660;
}

.transport-tnved-collection > header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  font-weight: 500;
}

.transport-tnved-collection > header .secondary-button {
  min-height: 36px;
  flex: 0 0 auto;
  font-size: 10.5px;
}

.transport-tnved-list {
  display: grid;
  gap: 8px;
}

.transport-tnved-row {
  position: relative;
  border: 1px solid #e0e6ed;
  border-radius: 10px;
  padding: 10px 46px 10px 10px;
  background: #fff;
}

.transport-tnved-field {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(210px, .42fr) minmax(0, 1.58fr);
  grid-template-rows: auto auto;
  align-items: stretch;
  gap: 6px 10px;
}

.transport-tnved-field > label {
  grid-column: 1;
  grid-row: 1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 560;
}

.transport-tnved-field > input[data-tnved-input] {
  grid-column: 1;
  grid-row: 2;
}

.transport-tnved-name {
  min-height: 41px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 8px 10px;
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-items: center;
  color: #667085;
  font-size: 10px;
  line-height: 1.45;
  background: #f8fafc;
}

.transport-tnved-name.selected {
  color: #17633a;
}

.transport-tnved-name.error {
  color: #b42318;
}

.transport-tnved-results {
  position: absolute;
  z-index: 60;
  top: 65px;
  left: 0;
  right: 0;
  max-height: 320px;
  border: 1px solid #cfd9e6;
  border-radius: 10px;
  padding: 5px;
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 18px 40px rgba(29, 52, 82, .16);
}

.transport-tnved-remove {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  transform: translateY(-50%);
}

.transport-tnved-results button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--text);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.transport-tnved-results button:hover,
.transport-tnved-results button:focus-visible {
  outline: 0;
  background: #eef5ff;
}

.transport-tnved-results button b {
  color: var(--cobalt);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.transport-tnved-results button span {
  color: #475467;
  font-size: 10px;
  line-height: 1.45;
}

.transport-tnved-empty {
  padding: 14px 12px;
  color: #667085;
  font-size: 10px;
}

.shipment-document-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shipment-customs-document-block {
  border: 1px solid #dce4ee;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}

.shipment-customs-document-block.secondary {
  background: #fbfcfe;
}

.shipment-customs-document-block > header {
  margin-bottom: 12px;
}

.shipment-customs-document-block > header span {
  color: var(--cobalt);
  font-size: 8.5px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.shipment-customs-document-block > header h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 15px;
}

.shipment-customs-document-block > * + * {
  margin-top: 10px;
}

.edit-dialog.shipment-bulk-documents-dialog {
  width: min(820px, calc(100vw - 42px));
}

.shipment-multi-file-drop {
  min-height: 118px;
}

.shipment-bulk-document-list {
  display: grid;
  gap: 10px;
}

.shipment-bulk-document-row {
  border: 1px solid #dbe3ed;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.shipment-bulk-document-row.ready,
.shipment-bulk-document-row.finalized {
  border-color: rgba(22, 163, 74, .25);
}

.shipment-bulk-document-row.error {
  border-color: rgba(198, 54, 54, .28);
}

.shipment-pickup-existing-list {
  display: grid;
  gap: 8px;
}

.shipment-pickup-existing-item,
.shipment-pickup-existing-empty,
.shipment-pickup-upload-empty {
  min-height: 54px;
  border: 1px solid #dbe3ed;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.shipment-pickup-existing-item {
  display: grid;
  gap: 12px;
}

.shipment-pickup-existing-item > header,
.shipment-pickup-upload-row > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.shipment-pickup-event-fields {
  border-top: 1px solid #e5eaf1;
  padding-top: 10px;
}

.shipment-pickup-event-fields .field {
  min-width: 0;
}

.shipment-pickup-existing-item b,
.shipment-pickup-existing-item small,
.shipment-pickup-existing-empty span,
.shipment-pickup-existing-empty small,
.shipment-pickup-upload-empty span,
.shipment-pickup-upload-empty small {
  display: block;
}

.shipment-pickup-existing-item b,
.shipment-pickup-existing-empty span,
.shipment-pickup-upload-empty span {
  color: var(--text);
  font-size: 10px;
  font-weight: 650;
}

.shipment-pickup-existing-item small,
.shipment-pickup-existing-empty small,
.shipment-pickup-upload-empty small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.shipment-pickup-existing-item a {
  flex: 0 0 auto;
  color: var(--cobalt);
  font-size: 9px;
  font-weight: 650;
  text-decoration: none;
}

.shipment-pickup-existing-item em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.shipment-pickup-existing-empty,
.shipment-pickup-upload-empty {
  display: grid;
  align-content: center;
}

.shipment-pickup-upload-empty {
  border-style: dashed;
  background: #fbfcfe;
}

.shipment-pickup-card-empty {
  min-height: 72px;
  margin: 0 18px 18px;
  border: 1px dashed #d5dfeb;
  border-radius: 10px;
  padding: 14px;
  display: grid;
  align-content: center;
  background: #fbfcfe;
}

.shipment-pickup-card-empty span,
.shipment-pickup-card-empty small {
  display: block;
}

.shipment-pickup-card-empty span {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 650;
}

.shipment-pickup-card-empty small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.shipment-pickup-event-list {
  display: grid;
}

.shipment-pickup-event {
  border-top: 1px solid var(--border);
  background: #fff;
}

.shipment-pickup-event:first-child {
  border-top: 0;
}

.shipment-pickup-event > header {
  min-height: 34px;
  padding: 9px 18px 7px;
  display: flex;
  align-items: center;
  color: var(--cobalt);
  background: #f8faff;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.shipment-pickup-event .shipment-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #edf0f4;
}

.shipment-pickup-event .shipment-field {
  min-height: 58px;
}

.shipment-pickup-event .shipment-bill-file {
  margin-top: 12px;
}

.shipment-bulk-invoice-fields {
  margin-top: 12px;
  border: 1px solid #d7e3f1;
  border-radius: 10px;
  padding: 12px;
  background: #f7faff;
}

.shipment-bulk-invoice-fields > header {
  margin-bottom: 10px;
}

.shipment-bulk-invoice-fields > header span,
.shipment-bulk-invoice-fields > header small {
  display: block;
}

.shipment-bulk-invoice-fields > header span {
  color: var(--cobalt);
  font-size: 10px;
  font-weight: 700;
}

.shipment-bulk-invoice-fields > header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.shipment-bulk-document-row > header {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shipment-bulk-document-row > header strong,
.shipment-bulk-document-row > header small {
  display: block;
}

.shipment-bulk-document-row > header strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 640;
  overflow-wrap: anywhere;
}

.shipment-bulk-document-row > header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.shipment-bulk-document-status {
  min-height: 32px;
  margin-top: 10px;
  border-radius: 8px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475467;
  background: #f5f7fa;
}

.shipment-bulk-document-status > i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cobalt);
}

.shipment-bulk-document-row.ready .shipment-bulk-document-status > i,
.shipment-bulk-document-row.finalized .shipment-bulk-document-status > i {
  background: #16a34a;
}

.shipment-bulk-document-row.error .shipment-bulk-document-status > i {
  background: #c63636;
}

.shipment-bulk-document-status b,
.shipment-bulk-document-status small {
  display: block;
  font-size: 9px;
}

.shipment-bulk-document-status small {
  margin-top: 2px;
  color: #b42318;
}

.shipment-bulk-empty {
  min-height: 110px;
  border: 1px dashed #cbd7e5;
  border-radius: 12px;
  display: grid;
  place-content: center;
  gap: 5px;
  color: #667085;
  background: rgba(255, 255, 255, .66);
  text-align: center;
}

.shipment-bulk-empty strong {
  color: #344054;
  font-size: 12px;
}

.shipment-bulk-empty span {
  font-size: 10px;
}

@media (max-width: 1160px) {
  .shipment-information-layout {
    grid-template-columns: 1fr;
  }

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

  .shipment-information-stages {
    position: static;
  }
}

@media (max-width: 760px) {
  .edit-dialog.shipment-focused-dialog {
    width: 100vw;
    border-radius: 0;
  }

  .shipment-focused-scroll {
    padding: 14px;
  }

  .transport-form-grid.two,
  .transport-form-grid.three,
  .shipment-bill-container-row,
  .shipment-focused-repeat-row {
    grid-template-columns: 1fr;
  }

  .shipment-focused-repeat-row .icon-button {
    min-width: 44px;
    min-height: 44px;
    justify-self: end;
  }

  .shipment-invoice-payment-editor {
    padding: 14px;
  }

  .shipment-invoice-payment-editor-summary {
    grid-template-columns: 1fr;
  }

  .shipment-invoice-payment-option {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .shipment-invoice-payment-source-amount {
    grid-column: 2;
    text-align: left;
  }

  .shipment-invoice-payment-credit {
    grid-column: 2;
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .shipment-invoice-payment-credit > span {
    width: 100%;
  }

  .shipment-document-head-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .shipment-document-head-actions button {
    min-height: 44px;
  }

  .shipment-pickup-existing-item > header,
  .shipment-pickup-upload-row > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .shipment-pickup-existing-item > header a,
  .shipment-pickup-upload-row > header .doc-action {
    align-self: flex-start;
  }

  .transport-tnved-collection > header {
    align-items: stretch;
    flex-direction: column;
  }

  .transport-tnved-collection > header .secondary-button {
    width: 100%;
    min-height: 44px;
  }

  .transport-tnved-row {
    padding: 10px 42px 10px 10px;
  }

  .transport-tnved-field {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .transport-tnved-field > label,
  .transport-tnved-field > input[data-tnved-input],
  .transport-tnved-name {
    grid-column: 1;
    grid-row: auto;
  }

  .transport-tnved-name {
    min-height: 0;
  }

  .transport-tnved-remove {
    top: 50px;
    transform: none;
  }

  .transport-tnved-results {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 84px;
    left: 12px;
    max-height: min(48dvh, 360px);
  }
}

@media (max-width: 760px) {
  .shipment-stage-rail-item {
    min-height: 54px;
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .shipment-stage-rail::before {
    left: 21px;
  }

  .shipment-stage-rail-item > button,
  .shipment-stage-rail-item > i {
    width: 44px;
    height: 44px;
    font-size: 11px;
  }
}

/* Keep the information tab focused on its document cards. */
.shipment-information-layout {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 981px) and (max-width: 1240px) {
  .shipment-card-hero {
    grid-template-columns: 1fr;
  }

  .shipment-card-title {
    min-height: 154px;
    border-right: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-content: center;
    column-gap: 24px;
  }

  .shipment-card-title > span,
  .shipment-card-title h2,
  .shipment-card-title .transport-status {
    grid-column: 1;
  }

  .shipment-card-title h2 {
    margin-block: 13px 15px;
    font-size: 45px;
  }

  .shipment-card-kind {
    grid-column: 2;
    grid-row: 1 / -1;
    margin-top: 0;
    align-self: center;
  }

  .shipment-card-summary {
    min-height: 238px;
    padding: 28px 28px 30px;
  }

  .shipment-card-summary-primary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shipment-card-summary-lower {
    grid-template-columns: minmax(0, 1.7fr) minmax(210px, .8fr);
  }
}

/* Preserve the spatial header rhythm on compact screens without a six-row stack. */
@media (max-width: 760px) {
  .shipment-card-summary-primary,
  .shipment-card-summary-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shipment-card-summary-lower {
    grid-template-columns: 1fr;
  }

  .shipment-card-summary-primary .shipment-card-fact:last-child {
    grid-column: 1 / -1;
  }

  .shipment-card-summary-secondary .shipment-card-fact + .shipment-card-fact {
    border-left: 1px solid #dce3eb;
    padding-left: 14px;
  }
}

@media (max-width: 560px) {
  .shipment-card-summary-primary,
  .shipment-card-summary-secondary {
    grid-template-columns: 1fr;
  }

  .shipment-card-summary-secondary .shipment-card-fact + .shipment-card-fact {
    border-left: 0;
    padding-left: 0;
  }
}

/* Shipment card v188 — selected compact modular Product Design header */
.shipment-card-hero {
  min-height: 252px;
  grid-template-columns: clamp(220px, 21.5%, 272px) minmax(0, 1fr);
  border-color: #dbe2eb;
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(17, 24, 39, .065);
}

.shipment-card-hero::after {
  z-index: 2;
  right: -40px;
  bottom: -70px;
  width: 430px;
  height: 114px;
  background-position: right bottom;
  background-size: 430px 92px;
  opacity: .28;
}

.shipment-card-title {
  min-width: 0;
  border-right: 1px solid #e1e6ed;
  border-radius: 0;
  padding: 30px 30px 27px;
  justify-content: center;
  background: #fff;
  box-shadow: none;
}

.shipment-card-title > span {
  font-size: 11px;
  font-weight: 730;
  letter-spacing: .12em;
}

.shipment-card-title h2 {
  margin: 18px 0 14px;
  font-size: clamp(48px, 4.25vw, 62px);
  line-height: .9;
  font-weight: 670;
  letter-spacing: -.045em;
}

.shipment-card-title .transport-status {
  min-height: 32px;
  padding-inline: 12px;
  font-size: 12px;
}

.shipment-card-title .transport-status.success {
  color: #147a38;
  background: #eaf7ee;
}

.shipment-card-title .transport-status.success > i {
  background: #16a34a;
}

.shipment-card-title .transport-status.danger {
  color: #b42318;
  background: #feeceb;
}

.shipment-card-title .transport-status.danger > i {
  background: #dc2626;
}

.shipment-card-kind {
  margin-top: 23px;
  gap: 12px;
}

.shipment-card-kind > i {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  color: #075fc7;
}

.shipment-card-kind > span {
  font-size: 13px;
  font-weight: 550;
}

.shipment-card-summary {
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr);
  grid-template-rows: 1fr;
  gap: 0;
  background: #fff;
}

.shipment-card-summary-main {
  min-width: 0;
  padding: 32px 30px 23px 36px;
  display: grid;
  grid-template-rows: minmax(78px, 1fr) 70px;
  background: rgba(251, 252, 254, .28);
}

.shipment-card-summary-headline {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .92fr);
  align-items: stretch;
  gap: 22px;
}

.shipment-card-cargo-name {
  min-width: 0;
  align-self: center;
}

.shipment-card-current-stage {
  min-width: 0;
  border-left: 1px solid #e1e6ed;
  padding-left: 22px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 11px;
}

.shipment-card-current-stage-icon {
  width: 36px;
  height: 36px;
  border: 1px solid #d9e4f0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #075fc7;
  background: #f5f9fe;
}

.shipment-card-current-stage-icon > i {
  width: 19px;
  height: 19px;
  display: block;
  background: currentColor;
  -webkit-mask: var(--transport-icon) center / contain no-repeat;
  mask: var(--transport-icon) center / contain no-repeat;
}

.shipment-card-current-stage > span:last-child {
  min-width: 0;
}

.shipment-card-current-stage small,
.shipment-card-current-stage strong,
.shipment-card-current-stage em {
  display: block;
}

.shipment-card-current-stage small {
  color: #667085;
  font-size: 10.5px;
  line-height: 1.25;
  font-weight: 560;
}

.shipment-card-current-stage strong {
  margin-top: 6px;
  color: #075fc7;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 670;
  overflow-wrap: anywhere;
}

.shipment-card-current-stage em {
  margin-top: 3px;
  color: #7a8699;
  font-size: 9px;
  line-height: 1.35;
  font-style: normal;
  overflow-wrap: anywhere;
}

.shipment-card-cargo-name small,
.shipment-card-cargo-name strong {
  min-width: 0;
  display: block;
}

.shipment-card-cargo-name small {
  color: #667085;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 550;
}

.shipment-card-cargo-name strong {
  margin-top: 10px;
  max-width: 100%;
  color: var(--text);
  font-size: clamp(19px, 1.75vw, 25px);
  line-height: 1.18;
  font-weight: 650;
  letter-spacing: -.018em;
  overflow-wrap: anywhere;
}

.shipment-card-summary-primary {
  min-width: 0;
  border-top: 1px solid #e1e6ed;
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, .72fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 0;
}

.shipment-card-summary-primary .shipment-card-fact,
.shipment-card-summary-primary .shipment-card-fact:first-child,
.shipment-card-summary-primary .shipment-card-fact:last-child {
  min-height: 62px;
  border: 0;
  padding: 0 18px;
}

.shipment-card-summary-primary .shipment-card-fact:first-child {
  padding-left: 0;
}

.shipment-card-summary-primary .shipment-card-fact + .shipment-card-fact {
  border-left: 1px solid #e1e6ed;
}

.shipment-card-summary-parties {
  min-width: 0;
  border-left: 1px solid #e1e6ed;
  padding: 28px 22px 24px;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  background: rgba(255, 255, 255, .18);
}

.shipment-card-summary-parties .shipment-card-fact {
  min-height: 0;
  border: 0;
  padding: 0;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
}

.shipment-card-summary-parties .shipment-card-fact:first-child {
  border-bottom: 1px solid #e1e6ed;
}

.shipment-card-summary-parties .shipment-card-fact:last-child {
  padding-top: 8px;
}

.shipment-card-fact-icon {
  width: 42px;
  height: 42px;
  border-color: #e0e6ee;
  color: #075fc7;
  background: #fbfcfe;
  box-shadow: 0 5px 14px rgba(17, 24, 39, .025);
}

.shipment-card-fact-icon > i {
  width: 22px;
  height: 22px;
}

.shipment-card-fact-copy small {
  color: #667085;
  font-size: 11px;
  font-weight: 540;
}

.shipment-card-fact-copy strong,
.shipment-card-fact.cargo .shipment-card-fact-copy strong,
.shipment-card-fact.manager .shipment-card-fact-copy strong,
.shipment-card-fact.client .shipment-card-fact-copy strong {
  margin-top: 5px;
  overflow: visible;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 630;
  letter-spacing: -.008em;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.shipment-card-summary-primary .shipment-card-fact.cargo .shipment-card-fact-copy strong {
  font-size: 13px;
}

.shipment-card-fact.warning .shipment-card-fact-icon {
  color: #d88b00;
}

@media (max-width: 1200px) {
  .shipment-card-hero {
    min-height: 232px;
    grid-template-columns: 208px minmax(0, 1fr);
  }

  .shipment-card-title {
    padding-inline: 24px;
  }

  .shipment-card-title h2 {
    font-size: 49px;
  }

  .shipment-card-summary {
    grid-template-columns: minmax(0, 1fr) 198px;
  }

  .shipment-card-summary-main {
    padding: 25px 22px 18px 28px;
    grid-template-rows: minmax(72px, 1fr) 66px;
  }

  .shipment-card-cargo-name strong {
    font-size: 20px;
  }

  .shipment-card-summary-headline {
    grid-template-columns: minmax(0, 1fr) minmax(190px, .8fr);
    gap: 16px;
  }

  .shipment-card-current-stage {
    padding-left: 16px;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
  }

  .shipment-card-current-stage-icon {
    width: 32px;
    height: 32px;
  }

  .shipment-card-summary-primary .shipment-card-fact,
  .shipment-card-summary-primary .shipment-card-fact:first-child,
  .shipment-card-summary-primary .shipment-card-fact:last-child {
    padding-inline: 10px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
  }

  .shipment-card-summary-primary .shipment-card-fact:first-child {
    padding-left: 0;
  }

  .shipment-card-summary-primary .shipment-card-fact-icon {
    width: 36px;
    height: 36px;
  }

  .shipment-card-summary-primary .shipment-card-fact-icon > i {
    width: 19px;
    height: 19px;
  }

  .shipment-card-summary-parties {
    padding-inline: 17px;
  }

  .shipment-card-summary-parties .shipment-card-fact {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
  }

  .shipment-card-summary-parties .shipment-card-fact-icon {
    width: 36px;
    height: 36px;
  }

  .shipment-card-fact-copy strong,
  .shipment-card-fact.cargo .shipment-card-fact-copy strong,
  .shipment-card-fact.manager .shipment-card-fact-copy strong,
  .shipment-card-fact.client .shipment-card-fact-copy strong {
    font-size: 12.5px;
  }
}

@media (max-width: 900px) {
  .shipment-card-hero {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .shipment-card-title {
    min-height: 116px;
    border-right: 0;
    border-bottom: 1px solid #e1e6ed;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: minmax(140px, .72fr) auto minmax(140px, 1fr);
    grid-template-rows: auto 1fr;
    align-items: center;
    column-gap: 20px;
  }

  .shipment-card-title > span {
    grid-column: 1;
    grid-row: 1;
  }

  .shipment-card-title h2 {
    grid-column: 1;
    grid-row: 2;
    margin: 8px 0 0;
    font-size: 40px;
  }

  .shipment-card-title .transport-status {
    grid-column: 2;
    grid-row: 1 / -1;
  }

  .shipment-card-kind {
    grid-column: 3;
    grid-row: 1 / -1;
    margin: 0;
    justify-self: end;
  }

  .shipment-card-summary {
    grid-template-columns: minmax(0, 1fr) minmax(190px, .62fr);
  }

  .shipment-card-summary-main {
    min-height: 205px;
  }

  .shipment-card-summary-primary {
    grid-template-columns: minmax(0, .82fr) minmax(0, .72fr) minmax(0, 1.25fr);
  }

  .shipment-card-summary-primary .shipment-card-fact:last-child {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .shipment-card-hero::after {
    right: -96px;
    bottom: -48px;
    opacity: .15;
  }

  .shipment-card-title {
    min-height: 108px;
    padding: 18px;
    grid-template-columns: minmax(110px, 1fr) auto;
    column-gap: 12px;
  }

  .shipment-card-title > span,
  .shipment-card-title h2 {
    grid-column: 1;
  }

  .shipment-card-title > span {
    font-size: 9px;
  }

  .shipment-card-title h2 {
    font-size: 36px;
  }

  .shipment-card-title .transport-status {
    grid-column: 2;
    grid-row: 1;
    min-height: 28px;
    padding-inline: 10px;
    font-size: 10px;
  }

  .shipment-card-kind {
    grid-column: 2;
    grid-row: 2;
    gap: 7px;
  }

  .shipment-card-kind > i {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .shipment-card-kind > span {
    font-size: 10px;
  }

  .shipment-card-summary {
    grid-template-columns: 1fr;
  }

  .shipment-card-summary-main {
    min-height: 0;
    padding: 20px 18px 14px;
    grid-template-rows: auto auto;
  }

  .shipment-card-summary-headline {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .shipment-card-cargo-name {
    padding-bottom: 17px;
  }

  .shipment-card-current-stage {
    border-top: 1px solid #e1e6ed;
    border-left: 0;
    padding: 14px 0 15px;
  }

  .shipment-card-cargo-name strong {
    margin-top: 7px;
    font-size: 17px;
  }

  .shipment-card-summary-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 4px;
  }

  .shipment-card-summary-primary .shipment-card-fact,
  .shipment-card-summary-primary .shipment-card-fact:first-child,
  .shipment-card-summary-primary .shipment-card-fact:last-child {
    min-height: 58px;
    padding-inline: 8px;
  }

  .shipment-card-summary-primary .shipment-card-fact:first-child {
    padding-left: 0;
  }

  .shipment-card-summary-primary .shipment-card-fact:nth-child(2) {
    border-left: 1px solid #e1e6ed;
  }

  .shipment-card-summary-primary .shipment-card-fact:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid #e1e6ed;
    border-left: 0;
    padding-left: 0;
  }

  .shipment-card-summary-parties {
    min-height: 76px;
    border-top: 1px solid #e1e6ed;
    border-left: 0;
    padding: 10px 18px 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
    gap: 14px;
  }

  .shipment-card-summary-parties .shipment-card-fact,
  .shipment-card-summary-parties .shipment-card-fact:last-child {
    min-height: 56px;
    border-bottom: 0;
    padding: 0;
  }

  .shipment-card-summary-parties .shipment-card-fact:last-child {
    border-left: 1px solid #e1e6ed;
    padding-left: 14px;
  }
}

@media (max-width: 440px) {
  .shipment-card-summary-parties {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .shipment-card-summary-parties .shipment-card-fact:last-child {
    border-top: 1px solid #e1e6ed;
    border-left: 0;
    padding-left: 0;
  }
}

/* PANTERA controls v1 — unified select, date and time surfaces */
.pantera-control {
  position: relative;
  min-width: 0;
  width: 100%;
  display: inline-flex;
  vertical-align: middle;
  color: var(--text);
  font-size: var(--pantera-control-font-size, 13px);
  font-weight: 540;
}

.pantera-native-control {
  position: absolute !important;
  top: 50% !important;
  left: 12px !important;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  margin: 0 !important;
  border: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  appearance: none !important;
  transform: translateY(-50%);
}

.pantera-control-button {
  position: relative;
  min-width: 0;
  width: 100%;
  height: var(--pantera-control-height, 42px);
  min-height: var(--pantera-control-height, 42px);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 38px 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  color: var(--text);
  background: var(--white);
  box-shadow: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}

.pantera-control-button:hover:not(:disabled) {
  border-color: #b8c4d1;
  background: #fdfefe;
}

.pantera-control-button:focus-visible,
.pantera-control.is-open .pantera-control-button {
  border-color: rgba(0, 87, 184, .66);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(0, 87, 184, .1);
}

.pantera-control.is-open .pantera-control-button {
  color: var(--cobalt);
}

.pantera-control-button:disabled {
  color: #8993a2;
  background: #f2f5f8;
  cursor: not-allowed;
}

.pantera-control-value {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pantera-control-button.is-placeholder .pantera-control-value {
  color: #8b96a6;
  font-weight: 500;
}

.pantera-control-chevron {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 8px;
  height: 8px;
  border-right: 1.6px solid #667085;
  border-bottom: 1.6px solid #667085;
  transform: translateY(-66%) rotate(45deg);
  transition: transform 160ms ease, border-color 160ms ease;
}

.pantera-control.is-open .pantera-control-chevron {
  border-color: var(--cobalt);
  transform: translateY(-35%) rotate(225deg);
}

.pantera-control-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #667085;
  background: currentColor;
}

.pantera-control-icon-calendar {
  -webkit-mask: url("/assets/icons/calendar.svg") center / contain no-repeat;
  mask: url("/assets/icons/calendar.svg") center / contain no-repeat;
}

.pantera-date-control .pantera-control-button,
.pantera-time-control .pantera-control-button {
  padding-left: 11px;
}

.pantera-date-control.is-open .pantera-control-icon,
.pantera-time-control.is-open .pantera-control-icon {
  color: var(--cobalt);
}

.pantera-control--compact .pantera-control-button {
  border-radius: 8px;
  padding-left: 10px;
  padding-right: 31px;
  font-size: inherit;
}

.pantera-control--compact .pantera-control-chevron {
  right: 11px;
}

.pantera-control--frameless .pantera-control-button,
.calculator-currency-control .pantera-control-button {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.calculator-currency-control .pantera-control {
  grid-column: 2;
  width: 100%;
}

.calculator-currency-control .pantera-control-button {
  padding-left: 0;
}

.field.invalid .pantera-control-button,
.field.pending .pantera-control-button,
.pantera-control.is-invalid .pantera-control-button {
  border-color: rgba(220, 38, 38, .55);
}

.field.pending:not(.invalid) .pantera-control-button {
  border-color: rgba(0, 87, 184, .28);
}

.invoice-dashboard-page-size .pantera-control {
  width: 68px;
  min-width: 68px;
  flex: 0 0 68px;
}

.invoice-dashboard-toolbar .pantera-control,
.shipment-filter .pantera-control,
.transport-filters .pantera-control,
.transport-form-grid .pantera-control,
.transport-editor-row .pantera-control,
.transport-stage-editor-row .pantera-control,
.calculator-field .pantera-control,
.task-dialog .pantera-control,
.task-day-dialog .pantera-control {
  width: 100%;
}

.calculator-history-filters .pantera-control {
  min-width: 128px;
  flex: 1 1 150px;
}

.tasks-inline-filter .pantera-control {
  min-width: 104px;
}

.pantera-popover {
  position: fixed;
  inset: auto;
  z-index: 100000;
  margin: 0;
  border: 1px solid rgba(200, 209, 220, .96);
  border-radius: 13px;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: rgba(255, 255, 255, .985);
  box-shadow: 0 22px 64px rgba(17, 24, 39, .19), 0 3px 10px rgba(17, 24, 39, .08);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
  animation: pantera-popover-in 140ms ease-out;
}

.pantera-popover::backdrop {
  background: transparent;
}

.pantera-popover-fallback {
  display: block;
}

.pantera-date-popover {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbd4df transparent;
}

@keyframes pantera-popover-in {
  from { opacity: 0; transform: translateY(-4px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pantera-popover-head {
  min-height: 57px;
  border-bottom: 1px solid #e7ebf0;
  padding: 11px 14px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}

.pantera-popover-head > span,
.pantera-popover-head > strong {
  display: block;
}

.pantera-popover-head > span {
  margin-bottom: 3px;
  color: var(--cobalt);
  font-size: 9px;
  line-height: 1.2;
  font-weight: 690;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.pantera-popover-head > strong {
  overflow: hidden;
  color: #283142;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pantera-select-search {
  min-height: 41px;
  margin: 10px 10px 4px;
  border: 1px solid #dbe2ea;
  border-radius: 9px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
}

.pantera-select-search:focus-within {
  border-color: rgba(0, 87, 184, .52);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 87, 184, .08);
}

.pantera-search-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 1.5px solid #7b8796;
  border-radius: 50%;
  position: relative;
}

.pantera-search-icon::after {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 6px;
  height: 1.5px;
  border-radius: 2px;
  background: #7b8796;
  content: "";
  transform: rotate(45deg);
}

.pantera-select-search input {
  min-width: 0;
  width: 100%;
  height: 37px;
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  outline: 0;
  font: inherit;
  font-size: 12px;
}

.pantera-select-search input::placeholder {
  color: #8d98a8;
}

.pantera-select-options {
  max-height: min(360px, calc(100vh - 170px));
  padding: 7px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbd4df transparent;
}

.pantera-select-group {
  display: grid;
  gap: 2px;
}

.pantera-select-group + .pantera-select-group {
  margin-top: 5px;
  border-top: 1px solid #edf0f4;
  padding-top: 6px;
}

.pantera-select-group > span {
  padding: 6px 10px 4px;
  color: #667085;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 680;
  text-transform: uppercase;
  letter-spacing: .055em;
}

.pantera-select-option {
  position: relative;
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 42px 8px 11px;
  display: flex;
  align-items: center;
  color: #344054;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.3;
  font-weight: 560;
  text-align: left;
  cursor: pointer;
  transition: color 130ms ease, background-color 130ms ease, border-color 130ms ease;
}

.pantera-select-option:hover:not(:disabled),
.pantera-select-option:focus-visible {
  border-color: rgba(0, 87, 184, .11);
  color: var(--cobalt);
  background: rgba(0, 87, 184, .045);
  outline: 0;
}

.pantera-select-option.is-selected {
  border-color: rgba(0, 87, 184, .28);
  color: var(--cobalt);
  background: #f4f8fd;
  box-shadow: inset 0 0 0 1px rgba(0, 87, 184, .04);
}

.pantera-select-option:disabled {
  color: #a1a9b5;
  cursor: not-allowed;
}

.pantera-select-option-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pantera-select-radio {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 17px;
  height: 17px;
  border: 1px solid #cbd4df;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
}

.pantera-select-option.is-selected .pantera-select-radio {
  border-color: var(--cobalt);
  background: var(--cobalt);
  box-shadow: inset 0 0 0 4px #fff;
}

.pantera-select-empty {
  min-height: 76px;
  padding: 20px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.pantera-calendar-nav {
  min-height: 52px;
  padding: 6px 10px 2px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
}

.pantera-calendar-nav > strong {
  color: #283142;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.pantera-calendar-nav button {
  width: 34px;
  height: 34px;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #536074;
  background: #fff;
  font: inherit;
  font-size: 21px;
  line-height: 1;
}

.pantera-calendar-nav button:hover,
.pantera-calendar-nav button:focus-visible {
  border-color: rgba(0, 87, 184, .35);
  color: var(--cobalt);
  background: #f5f9fe;
  outline: 0;
}

.pantera-calendar-weekdays,
.pantera-calendar-grid {
  margin: 0 10px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.pantera-calendar-weekdays {
  padding: 3px 0 5px;
}

.pantera-calendar-weekdays span {
  color: #8a95a5;
  font-size: 9px;
  font-weight: 660;
  text-align: center;
  text-transform: uppercase;
}

.pantera-calendar-day {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #344054;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.pantera-calendar-day:hover:not(:disabled),
.pantera-calendar-day:focus-visible {
  border-color: rgba(0, 87, 184, .18);
  color: var(--cobalt);
  background: rgba(0, 87, 184, .05);
  outline: 0;
}

.pantera-calendar-day.is-outside {
  color: #b0b8c3;
}

.pantera-calendar-day.is-today {
  border-color: rgba(0, 87, 184, .3);
  color: var(--cobalt);
  font-weight: 680;
}

.pantera-calendar-day.is-selected {
  border-color: var(--cobalt);
  color: #fff;
  background: var(--cobalt);
  box-shadow: 0 4px 10px rgba(0, 87, 184, .2);
  font-weight: 680;
}

.pantera-calendar-day:disabled {
  color: #d2d7de;
  cursor: not-allowed;
}

.pantera-calendar-actions {
  min-height: 51px;
  margin-top: 8px;
  border-top: 1px solid #e7ebf0;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pantera-calendar-actions button,
.pantera-time-actions > button:not(.primary-button) {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--cobalt);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 620;
}

.pantera-calendar-actions button:hover,
.pantera-calendar-actions button:focus-visible,
.pantera-time-actions > button:not(.primary-button):hover,
.pantera-time-actions > button:not(.primary-button):focus-visible {
  background: rgba(0, 87, 184, .06);
  outline: 0;
}

.pantera-time-entry {
  margin: 14px 14px 0;
  display: grid;
  gap: 7px;
  color: #667085;
  font-size: 10px;
  font-weight: 620;
}

.pantera-time-entry input {
  width: 100%;
  height: 46px;
  border: 1px solid #dbe2ea;
  border-radius: 9px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  outline: 0;
  font: inherit;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.pantera-time-entry input:focus,
.pantera-time-entry input[aria-invalid="true"] {
  border-color: rgba(0, 87, 184, .55);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, .08);
}

.pantera-time-entry input[aria-invalid="true"] {
  border-color: rgba(220, 38, 38, .55);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .07);
}

.pantera-time-error {
  min-height: 24px;
  padding: 5px 14px 0;
  color: #b42318;
  font-size: 10px;
  line-height: 1.35;
}

.pantera-time-actions {
  min-height: 57px;
  border-top: 1px solid #e7ebf0;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pantera-time-actions .primary-button {
  min-height: 36px;
  padding: 0 14px;
}

@media (max-width: 560px) {
  .pantera-popover {
    top: auto !important;
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    left: 10px !important;
    width: auto !important;
    max-height: min(72vh, 560px) !important;
    border-radius: 15px;
    animation-name: pantera-popover-mobile-in;
  }

  .pantera-select-options {
    max-height: min(48vh, 390px);
  }

  .pantera-select-option {
    min-height: 48px;
    font-size: 14px;
  }

  .pantera-calendar-day {
    min-height: 38px;
    font-size: 13px;
  }

  @keyframes pantera-popover-mobile-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .pantera-popover { animation: none; }
  .pantera-control-button,
  .pantera-control-chevron,
  .pantera-select-option { transition: none; }
}

.edit-dialog.request-dialog {
  width: min(1020px, calc(100vw - 36px));
  max-width: 1020px;
}

.form-dialog.request-reject-dialog {
  width: min(500px, calc(100vw - 32px));
}

.panel.requests-hero { padding: 22px 24px 18px; }
.panel.requests-register { padding: 0; }
.panel.request-detail-header { padding: 22px 24px 18px; }
.panel.request-info-panel,
.panel.request-sales-panel { padding: 20px; }

@media (max-width: 820px) {
  .panel.requests-hero { padding: 18px; }
}

@media (max-width: 760px) {
  body:not(.is-invoice-dashboard) .dashboard-page { margin-top: 0; }
}
