:root {
  --navy: #0d2a5c;
  --navy-deep: #071d43;
  --bg: #eef4fb;
  --panel: #ffffff;
  --line: #d9e5f4;
  --text: #092858;
  --muted: #6681aa;
  --blue: #3867e8;
  --blue-soft: #edf4ff;
  --success: #15835b;
  --danger: #e33434;
  --warning: #d78a12;
  --shadow: 0 18px 42px rgba(10, 31, 69, 0.08);
}

.invoice-ai-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid #cddcf2;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(241,247,255,0.98)), #fff;
  box-shadow: var(--shadow);
}

.invoice-ai-hero h3 {
  margin: 7px 0 10px;
  font-size: 28px;
  line-height: 1.15;
}

.invoice-ai-upload {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.invoice-ai-upload label {
  display: grid;
  gap: 7px;
}

.invoice-ai-upload span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.invoice-ai-upload input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  background: #fff;
  color: #08265c;
  font-weight: 800;
}

.invoice-file-field input {
  padding-top: 8px;
}

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

.invoice-month-board {
  margin-bottom: 18px;
  border-radius: 8px;
}

.invoice-year-filter {
  display: flex;
  gap: 8px;
  align-items: center;
}

.invoice-year-filter input {
  width: 96px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  color: #08265c;
  font-weight: 900;
}

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

.invoice-month-slot {
  display: grid;
  gap: 10px;
  min-height: 170px;
  padding: 13px;
  border: 1px solid #d8e5f6;
  border-radius: 8px;
  background: #fbfdff;
}

.invoice-month-slot.has-file {
  border-color: #9db9ff;
  background: #f4f8ff;
  cursor: pointer;
}

.invoice-month-slot.has-file:hover {
  border-color: #3867e8;
  box-shadow: 0 10px 24px rgba(56, 103, 232, 0.12);
}

.invoice-month-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.invoice-month-top strong {
  color: #08265c;
  font-size: 17px;
}

.invoice-month-top span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e9f1fc;
  color: #37547f;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.invoice-month-slot.has-file .invoice-month-top span {
  background: #dfe9ff;
  color: #173763;
}

.invoice-month-latest,
.invoice-month-empty {
  min-height: 42px;
  display: grid;
  align-content: center;
}

.invoice-month-latest span,
.invoice-month-latest em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-month-latest span {
  color: #173763;
  font-size: 12px;
  font-weight: 900;
}

.invoice-month-latest em,
.invoice-month-empty {
  color: #6681aa;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.invoice-month-upload {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.invoice-month-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.invoice-month-upload .btn {
  min-height: 34px;
  padding: 7px 10px;
  justify-content: center;
  font-size: 12px;
}

.invoice-selected-file {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6681aa;
  font-size: 12px;
  font-weight: 800;
}

.invoice-ai-history {
  position: sticky;
  top: 24px;
}

.invoice-history-list,
.invoice-ai-main,
.invoice-anomaly-list {
  display: grid;
  gap: 10px;
}

.invoice-ai-main {
  gap: 18px;
}

.invoice-history-item {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid #d8e5f6;
  border-radius: 8px;
  background: #fff;
}

.invoice-history-item.active {
  border-color: #3867e8;
  background: #f3f7ff;
  box-shadow: inset 3px 0 0 #3867e8;
}

.invoice-history-item strong {
  color: #08265c;
  font-size: 15px;
}

.invoice-history-item span,
.invoice-history-item em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-history-item span {
  color: #334d76;
  font-weight: 800;
}

.invoice-history-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.invoice-history-delete {
  margin: -4px 0 8px;
  display: flex;
  justify-content: flex-end;
}

.invoice-history-delete button {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #f0c2c2;
  border-radius: 7px;
  background: #fff6f6;
  color: #b42318;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.invoice-history-delete button:hover {
  background: #ffecec;
}

.invoice-month-delete {
  display: flex;
  justify-content: flex-end;
}

.invoice-month-delete button {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #f0c2c2;
  border-radius: 7px;
  background: #fff6f6;
  color: #b42318;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.invoice-month-delete button:hover {
  background: #ffecec;
}

.invoice-month-locked {
  color: #6681aa;
  font-size: 12px;
  font-weight: 800;
}

.invoice-ai-summary {
  display: grid;
  grid-template-columns: 1.1fr repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.invoice-highlight-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.invoice-highlight-card {
  display: grid;
  gap: 7px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid #dbe7fb;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.invoice-highlight-card span {
  color: #6681aa;
  font-size: 12px;
  font-weight: 950;
}

.invoice-highlight-card strong,
.invoice-highlight-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-highlight-card strong {
  color: #08265c;
  font-size: 19px;
  line-height: 1.1;
  font-weight: 950;
}

.invoice-highlight-card em {
  color: #37547f;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.invoice-highlight-card.tone-primary {
  border-color: #9db9ff;
  background: linear-gradient(135deg, #eef4ff, #ffffff);
}

.invoice-highlight-card.tone-down {
  border-color: #bfe7ce;
  background: linear-gradient(135deg, #f4fcf8, #ffffff);
}

.invoice-highlight-card.tone-up {
  border-color: #f0c2c2;
  background: linear-gradient(135deg, #fff6f6, #ffffff);
}

.invoice-highlight-card.tone-charge {
  border-color: #f3d9a7;
  background: linear-gradient(135deg, #fffaf0, #ffffff);
}

.invoice-highlight-card.tone-service {
  border-color: #b9d8f8;
  background: linear-gradient(135deg, #f0f7ff, #ffffff);
}

.invoice-highlight-card.tone-awb {
  border-color: #c7d1ff;
  background: linear-gradient(135deg, #f4f6ff, #ffffff);
}

.invoice-highlight-card.tone-flat {
  border-color: #dbe7fb;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.invoice-ai-verdict,
.invoice-ai-metric {
  min-height: 136px;
  padding: 18px;
  border: 1px solid #d6e4f7;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.invoice-ai-verdict {
  color: #fff;
  background: linear-gradient(135deg, #0d2a5c, #3867e8);
}

.invoice-ai-verdict.status-failed {
  background: linear-gradient(135deg, #9f1d1d, #e5484d);
}

.invoice-ai-verdict.status-uploaded,
.invoice-ai-verdict.status-analyzing {
  color: #08265c;
  background: linear-gradient(135deg, #fff8e8, #ffe2a8);
}

.invoice-ai-verdict span,
.invoice-ai-metric span {
  display: block;
  color: inherit;
  opacity: 0.78;
  font-size: 12px;
  font-weight: 900;
}

.invoice-ai-verdict strong,
.invoice-ai-metric strong {
  display: block;
  margin-top: 12px;
  color: inherit;
  font-size: 28px;
  line-height: 1.05;
}

.invoice-ai-verdict em,
.invoice-ai-metric em {
  display: block;
  margin-top: 10px;
  color: inherit;
  opacity: 0.76;
  font-style: normal;
  font-weight: 800;
}

.invoice-ai-alert {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  border-color: #f0c2c2;
  background: #fff6f6;
}

.invoice-ai-alert strong {
  color: #b42318;
  font-size: 16px;
}

.invoice-ai-alert p {
  flex: 1;
  margin: 0;
  color: #773434;
  font-weight: 800;
}

.invoice-ai-report {
  border-radius: 8px;
}

.invoice-ai-brief {
  margin: 0;
  color: #173763;
  font-size: 18px;
  line-height: 1.65;
  font-weight: 850;
}

.invoice-hl {
  display: inline;
  padding: 0 4px;
  border-radius: 5px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-weight: 950;
}

.invoice-hl-number {
  background: linear-gradient(180deg, transparent 44%, #fff0a8 44%);
  color: #071d43;
}

.invoice-hl-term {
  background: linear-gradient(180deg, transparent 45%, #dff0ff 45%);
  color: #0d2a5c;
}

.invoice-hl-awb {
  background: linear-gradient(180deg, transparent 44%, #ffe2d6 44%);
  color: #7a2e14;
}

.invoice-driver-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.invoice-driver-list span {
  padding: 8px 11px;
  border: 1px solid #dbe7fb;
  border-radius: 999px;
  background: #f4f8ff;
  color: #173763;
  font-size: 12px;
  font-weight: 900;
}

.invoice-formula-panel {
  display: grid;
  gap: 14px;
}

.invoice-formula-badge {
  padding: 7px 10px;
  border: 1px solid #f3d9a7;
  border-radius: 999px;
  background: #fffaf0;
  color: #8a5b08;
  font-size: 12px;
  font-weight: 950;
}

.invoice-formula-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.invoice-formula-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
  min-height: 112px;
  padding: 13px;
  border: 1px solid #dbe7fb;
  border-radius: 8px;
  background: #fbfdff;
}

.invoice-formula-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #0d2a5c;
  color: #fff;
  font-weight: 950;
}

.invoice-formula-card strong,
.invoice-formula-card em,
.invoice-formula-card b {
  display: block;
  min-width: 0;
}

.invoice-formula-card strong {
  color: #08265c;
  font-size: 13px;
  line-height: 1.25;
}

.invoice-formula-card em {
  margin-top: 4px;
  color: #6681aa;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.35;
}

.invoice-formula-card b {
  grid-column: 1 / -1;
  color: #071d43;
  font-size: 18px;
  line-height: 1.1;
}

.invoice-formula-card.key-A,
.invoice-formula-card.key-D {
  border-color: #9db9ff;
  background: linear-gradient(135deg, #eef4ff, #ffffff);
}

.invoice-formula-notes {
  padding: 12px 16px 12px 34px;
  border: 1px solid #dbe7fb;
  border-radius: 8px;
  background: #f8fbff;
}

.invoice-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.invoice-report-actions form {
  margin: 0;
}

.invoice-ai-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.invoice-ai-list,
.invoice-ai-steps {
  margin: 0;
  padding-left: 20px;
  color: #173763;
  font-weight: 800;
  line-height: 1.65;
}

.invoice-ai-list li + li,
.invoice-ai-steps li + li {
  margin-top: 8px;
}

.invoice-anomaly {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid #d8e5f6;
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff;
}

.invoice-anomaly.severity-high {
  border-left-color: #d92d20;
}

.invoice-anomaly.severity-medium {
  border-left-color: #d78a12;
}

.invoice-anomaly.severity-low {
  border-left-color: #15835b;
}

.invoice-anomaly strong,
.invoice-anomaly span,
.invoice-anomaly em {
  display: block;
}

.invoice-anomaly strong {
  color: #08265c;
  font-size: 15px;
}

.invoice-anomaly span {
  margin-top: 5px;
  color: #37547f;
  font-weight: 800;
  line-height: 1.5;
}

.invoice-anomaly em {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f4f8ff;
  color: #173763;
  font-style: normal;
  font-weight: 850;
  line-height: 1.45;
}

.invoice-ai-empty {
  min-height: 300px;
  display: grid;
  align-content: center;
}

.invoice-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.invoice-visual-grid-single {
  grid-template-columns: 1fr;
}

.invoice-visual-card {
  border-radius: 8px;
}

.invoice-charge-bars,
.invoice-risk-bars,
.invoice-watchlist {
  display: grid;
  gap: 12px;
}

.invoice-charge-mix-panel {
  overflow: hidden;
}

.invoice-charge-summary {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(260px, 1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #dbe7fb;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef4ff, #ffffff);
}

.invoice-charge-summary strong {
  color: #071d43;
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
}

.invoice-charge-summary span {
  color: #37547f;
  font-weight: 850;
  line-height: 1.45;
}

.invoice-charge-bars-premium {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.invoice-charge-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  min-height: 92px;
  padding: 14px;
  border: 1px solid #dbe7fb;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.invoice-charge-row strong,
.invoice-charge-row span,
.invoice-charge-row em {
  display: block;
}

.invoice-charge-row strong {
  color: #08265c;
  font-size: 15px;
}

.invoice-charge-row span {
  margin-top: 3px;
  color: #6681aa;
  font-weight: 800;
}

.invoice-charge-row em {
  color: #173763;
  font-size: 15px;
  font-style: normal;
  font-weight: 950;
}

.invoice-meter {
  grid-column: 1 / -1;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9f1fc;
}

.invoice-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d2a5c, #3867e8);
}

.invoice-risk-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 34px;
  border-radius: 999px;
  background: #0d2a5c;
  color: #fff;
  font-weight: 950;
}

.invoice-risk-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
}

.invoice-risk-row strong,
.invoice-risk-row em {
  color: #173763;
  font-style: normal;
  font-weight: 900;
}

.invoice-risk-row.tone-high .invoice-meter span {
  background: #d92d20;
}

.invoice-risk-row.tone-medium .invoice-meter span {
  background: #d78a12;
}

.invoice-risk-row.tone-low .invoice-meter span {
  background: #15835b;
}

.invoice-risk-copy {
  margin: 14px 0 0;
  color: #37547f;
  font-weight: 800;
  line-height: 1.55;
}

.invoice-trend-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  align-items: end;
}

.invoice-trend-item {
  display: grid;
  grid-template-rows: auto 124px auto auto;
  gap: 8px;
  min-height: 190px;
  padding: 12px;
  border: 1px solid #d8e5f6;
  border-radius: 8px;
  background: #fff;
}

.invoice-trend-item.active {
  border-color: #3867e8;
  background: #f3f7ff;
}

.invoice-trend-item span,
.invoice-trend-item strong,
.invoice-trend-item em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-trend-item span {
  color: #6681aa;
  font-weight: 900;
}

.invoice-trend-item strong {
  color: #08265c;
  font-size: 13px;
  font-weight: 950;
}

.invoice-trend-item em {
  color: #d78a12;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.invoice-trend-bar {
  display: flex;
  align-items: end;
  justify-content: center;
  height: 124px;
  border-radius: 8px;
  background: #edf4ff;
}

.invoice-trend-bar i {
  display: block;
  width: 44%;
  min-height: 8px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #3867e8, #0d2a5c);
}

.invoice-trend-panel {
  border-radius: 8px;
}

.invoice-trend-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 4px 0 16px;
}

.invoice-trend-summary span,
.invoice-trend-summary em {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #dbe7fb;
  border-radius: 999px;
  background: #f4f8ff;
  color: #37547f;
  font-style: normal;
  font-weight: 900;
}

.invoice-trend-summary strong {
  margin-left: 6px;
  color: #08265c;
}

.trend-delta.up,
.invoice-line-labels em.up {
  color: #b42318;
  background: #fff6f6;
  border-color: #f0c2c2;
}

.trend-delta.down,
.invoice-line-labels em.down {
  color: #15835b;
  background: #f4fcf8;
  border-color: #bfe7ce;
}

.invoice-line-chart {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d8e5f6;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.invoice-chart-scale {
  display: flex;
  justify-content: space-between;
  color: #6681aa;
  font-size: 12px;
  font-weight: 900;
}

.invoice-line-chart svg {
  width: 100%;
  height: 310px;
  overflow: visible;
}

.invoice-line-chart line {
  stroke: #e1ebf8;
  stroke-width: 0.45;
  vector-effect: non-scaling-stroke;
}

.invoice-line-chart polyline {
  fill: none;
  stroke: #0d2a5c;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.invoice-line-chart rect {
  fill: rgba(56, 103, 232, 0.16);
  stroke: rgba(56, 103, 232, 0.42);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.invoice-line-chart rect.active {
  fill: rgba(56, 103, 232, 0.28);
  stroke: #3867e8;
}

.invoice-line-chart circle {
  fill: #ffffff;
  stroke: #0d2a5c;
  stroke-width: 1.6;
  cursor: pointer;
  vector-effect: non-scaling-stroke;
}

.invoice-line-chart circle.active {
  fill: #0d2a5c;
  stroke: #0d2a5c;
}

.invoice-line-labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.invoice-line-labels a {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid #d8e5f6;
  border-radius: 8px;
  background: #fff;
}

.invoice-line-labels a.active {
  border-color: #3867e8;
  background: #f3f7ff;
  box-shadow: inset 3px 0 0 #3867e8;
}

.invoice-line-labels strong,
.invoice-line-labels span,
.invoice-line-labels em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-line-labels strong {
  color: #08265c;
  font-size: 14px;
  font-weight: 950;
}

.invoice-line-labels span {
  color: #173763;
  font-size: 13px;
  font-weight: 950;
}

.invoice-line-labels em {
  color: #6681aa;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.invoice-trend-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.invoice-trend-bar-card {
  display: grid;
  grid-template-rows: auto 220px auto;
  gap: 12px;
  min-height: 330px;
  padding: 16px;
  border: 1px solid #d8e5f6;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.invoice-trend-bar-card.active {
  border-color: #3867e8;
  background: linear-gradient(180deg, #f3f7ff, #ffffff);
  box-shadow: inset 3px 0 0 #3867e8;
}

.invoice-trend-bar-head,
.invoice-trend-bar-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.invoice-trend-bar-head strong,
.invoice-trend-bar-foot strong {
  color: #08265c;
  font-weight: 950;
}

.invoice-trend-bar-head em,
.invoice-trend-bar-foot em {
  padding: 4px 7px;
  border-radius: 999px;
  background: #f4f8ff;
  color: #6681aa;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.invoice-trend-bar-head em.up,
.invoice-trend-bar-foot em.up {
  background: #fff6f6;
  color: #b42318;
}

.invoice-trend-bar-head em.down,
.invoice-trend-bar-foot em.down {
  background: #f4fcf8;
  color: #15835b;
}

.invoice-trend-bar-stage {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid #e1ebf8;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(225, 235, 248, 0.7) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(180deg, #fbfdff, #f3f7ff);
}

.invoice-trend-bar-stage span {
  display: block;
  width: min(88px, 42%);
  min-height: 18px;
  border: 1px solid rgba(56, 103, 232, 0.65);
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, rgba(56, 103, 232, 0.48), rgba(13, 42, 92, 0.92));
  box-shadow: 0 18px 34px rgba(13, 42, 92, 0.15);
}

.invoice-watchlist {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.invoice-watchlist article {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid #d8e5f6;
  border-radius: 8px;
  background: #fbfdff;
}

.invoice-watchlist strong {
  color: #08265c;
  font-size: 16px;
}

.invoice-watchlist em {
  color: #d78a12;
  font-style: normal;
  font-weight: 950;
}

.invoice-watchlist span,
.invoice-watchlist p {
  margin: 0;
  color: #37547f;
  font-weight: 800;
  line-height: 1.5;
}

.invoice-fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.invoice-fact-grid div {
  display: grid;
  gap: 8px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid #dbe7fb;
  border-radius: 8px;
  background: #f8fbff;
}

.invoice-fact-grid span {
  color: #6681aa;
  font-size: 12px;
  font-weight: 900;
}

.invoice-fact-grid strong {
  color: #08265c;
  font-size: 22px;
  line-height: 1;
}

.invoice-mini-bars {
  display: grid;
  gap: 8px;
}

.invoice-mini-bars div:not(.empty-box) {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #dbe7fb;
  border-radius: 8px;
  background: #fbfdff;
}

.invoice-mini-bars strong,
.invoice-mini-bars span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.invoice-mini-bars strong {
  color: #08265c;
}

.invoice-mini-bars span {
  color: #3867e8;
}

@media (max-width: 1180px) {
  .invoice-ai-hero,
  .invoice-ai-layout,
  .invoice-ai-summary,
  .invoice-highlight-grid,
  .invoice-ai-grid,
  .invoice-formula-grid,
  .invoice-visual-grid {
    grid-template-columns: 1fr;
  }

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

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

  .invoice-charge-summary,
  .invoice-charge-bars-premium {
    grid-template-columns: 1fr;
  }

  .invoice-ai-upload,
  .invoice-anomaly {
    grid-template-columns: 1fr;
  }

  .invoice-ai-history {
    position: static;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Malgun Gothic", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 4%, rgba(56, 103, 232, 0.10), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

body.pdf-export {
  background: #eef4fb;
}

body.pdf-export {
  width: 1920px;
}

a {
  color: inherit;
  text-decoration: none;
}

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

body.pdf-export .app-shell {
  display: block;
  min-height: auto;
}

body.pdf-export .sidebar,
body.pdf-export .topbar,
body.pdf-export .flash-stack,
body.pdf-export .report-pdf-btn,
body.pdf-export .download-target-frame,
body.pdf-export .progress-overlay {
  display: none !important;
}

body.pdf-export .main-area {
  width: 100%;
  min-height: auto;
  padding: 24px;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 16px 22px;
  overflow: auto;
  color: #fff;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
}

.brand-mark {
  margin: 0 0 8px;
  color: #9fbaff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.brand h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
}

.brand span {
  display: block;
  margin-top: 14px;
  color: #bdd1ff;
  font-size: 14px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  display: block;
  padding: 13px 14px;
  border-radius: 14px;
  color: #e5eeff;
  font-weight: 800;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.11);
}

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  background: rgba(255, 255, 255, 0.11);
}

.nav-group-toggle::-webkit-details-marker {
  display: none;
}

.nav-group-arrow {
  flex: 0 0 auto;
  color: #bdd1ff;
  font-size: 13px;
  transition: transform 0.18s ease;
}

.nav-group[open] > .nav-group-toggle .nav-group-arrow {
  transform: rotate(180deg);
}

.nav-group-panel {
  display: grid;
  gap: 8px;
}

.nav-link-sub {
  margin-left: 12px;
  padding-block: 11px;
  border-left: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: #d7e5ff;
  font-size: 13px;
}

.sidebar-foot {
  margin-top: auto;
}

.side-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.side-card strong,
.side-card span {
  display: block;
}

.side-card span {
  margin-top: 6px;
  color: #bfd2ff;
  font-size: 13px;
}

.main-area {
  min-width: 0;
  padding: 26px;
}

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

.eyebrow,
.section-label {
  margin: 0 0 6px;
  color: #4169a6;
  font-size: 13px;
  font-weight: 900;
}

.topbar h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.04;
}

.topbar-copy,
.panel-copy,
.muted,
.empty {
  color: var(--muted);
}

.top-actions,
.inline-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.workbook-command-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  max-width: 760px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.workbook-command-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.workbook-command-group form {
  display: flex;
}

.workbook-command-group-main {
  margin-left: auto;
}

.workbook-command-label {
  color: #6681aa;
  font-size: 12px;
  font-weight: 900;
}

.workbook-command-divider {
  width: 1px;
  height: 30px;
  background: var(--line);
}

.btn-template {
  border-color: #bcd5f4;
  background: #f7fbff;
  color: #0f3268;
}

.status-pill,
.doc-number-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: #0f3268;
  font-weight: 900;
}

.status-pill-button {
  cursor: pointer;
  font: inherit;
}

.top-actions form {
  margin: 0;
}

.status-pill.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.panel,
.metric-card,
.mini-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
  margin-bottom: 18px;
}

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

.panel-header h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.panel-header.compact h3 {
  font-size: 22px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  padding: 18px;
}

.metric-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
}

.metric-card strong {
  font-size: 30px;
  line-height: 1.1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--blue);
}

.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.btn-secondary {
  background: var(--blue-soft);
}

.btn-danger {
  color: #b42323;
  background: #fff2f2;
}

.btn-small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

input[type="text"],
input[type="date"],
input[type="month"],
select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.filter-field label,
.table-filter-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash,
.notice,
.empty-box {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.flash-success,
.notice.success {
  background: #eefaf4;
  border-color: #bfe7ce;
}

.flash-warning {
  background: #fff7e8;
  border-color: #f0d69f;
}

.flash-error {
  background: #fff0f0;
  border-color: #f0c2c2;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #e2eaf6;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #315481;
  background: #f6f9ff;
  font-size: 13px;
  font-weight: 900;
}

tbody tr:hover {
  background: #f7fbff;
}

.workbook-row-live-active td {
  background: #f6faff;
}

#select-all-workbooks,
.workbook-select-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--blue);
  cursor: pointer;
}

.subrow td {
  background: #fbfdff;
}

.subrow p {
  margin: 0 0 8px;
  color: #0d2a5c;
  font-weight: 800;
  line-height: 1.55;
}

.subrow p:last-child {
  margin-bottom: 0;
}

.subrow .error-message {
  padding: 12px 14px;
  border: 1px solid #f2c2c2;
  border-radius: 12px;
  background: #fff7f7;
  color: #9f1f1f;
}

.ai-error-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.ai-error-button {
  border-color: #b9cef8;
  background: #eef4ff;
  color: #0d2a5c;
}

.ai-error-hint,
.ai-error-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ai-error-result {
  margin-top: 12px;
}

.ai-error-loading,
.ai-error-card {
  padding: 14px;
  border: 1px solid #d8e5f7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(10, 31, 69, 0.06);
}

.ai-error-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.ai-error-card-head strong {
  color: #08265c;
  font-size: 15px;
}

.ai-error-card-head span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf4ff;
  color: #315481;
  font-size: 11px;
  font-weight: 900;
}

.ai-error-card p {
  margin: 0 0 10px;
}

.ai-error-card p strong {
  display: block;
  margin-bottom: 4px;
  color: #315481;
  font-size: 12px;
}

.ai-error-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.ai-error-columns > div {
  padding: 12px;
  border: 1px solid #e2eaf6;
  border-radius: 12px;
  background: #fbfdff;
}

.ai-error-columns strong {
  display: block;
  margin-bottom: 8px;
  color: #0d2a5c;
}

.ai-error-columns ul {
  margin: 0;
  padding-left: 18px;
  color: #0d2a5c;
  font-weight: 800;
  line-height: 1.6;
}

.ai-error-caution {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7e8;
  color: #7a4a00;
}

.ai-error-card-failed {
  border-color: #f2c2c2;
  background: #fff7f7;
  color: #9f1f1f;
  font-weight: 900;
}

.row-action-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  gap: 8px;
  align-items: center;
  min-width: 196px;
}

.row-action-stack form {
  margin: 0;
}

.row-action-stack .btn {
  width: 100%;
}

.btn-edit-soft {
  border-color: #bfd4f7;
  background: #f4f8ff;
  color: #1c55c7;
}

.btn-edit-soft:hover {
  border-color: #7fa7ef;
  background: #edf4ff;
}

.btn-danger-soft {
  border-color: #f2c2c2;
  background: #fff7f7;
  color: #c92a2a;
}

.btn-danger-soft:hover {
  border-color: #e5484d;
  background: #fff0f0;
}

.align-right {
  text-align: right;
}

.align-center {
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: #edf4ff;
  color: #214a88;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.status-badge {
  min-width: 76px;
  justify-content: center;
  border: 1px solid #d8e5f7;
  box-shadow: 0 8px 18px rgba(10, 31, 69, 0.04);
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.status-badge-running,
.status-badge-loading {
  border-color: #b9cef8;
  background: #eef4ff;
  color: #2854d6;
}

.status-badge-running .status-dot,
.status-badge-loading .status-dot {
  animation: statusPulse 1.2s ease-in-out infinite;
}

.status-badge-success,
.status-badge-completed,
.status-badge-loaded {
  border-color: #bee8d2;
  background: #ecfaf3;
  color: #15835b;
}

.status-badge-failed,
.status-badge-error {
  border-color: #f2c2c2;
  background: #fff0f0;
  color: #c92a2a;
}

.status-badge-ready,
.status-badge-queued,
.status-badge-uploaded {
  border-color: #d8e5f7;
  background: #f6f9ff;
  color: #315481;
}

.status-badge-stopped {
  border-color: #f0d69f;
  background: #fff7e8;
  color: #9a5d00;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 0.42;
    transform: scale(0.88);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #dce7f8;
  border-radius: 14px;
  background: #fbfdff;
}

.pagination-summary {
  color: #315481;
  font-weight: 900;
  white-space: nowrap;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.page-link,
.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #cbdcf2;
  background: #fff;
  color: #0d2a5c;
  font-size: 13px;
  font-weight: 900;
}

.page-link:hover,
.page-link.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.page-ellipsis {
  border-color: transparent;
  background: transparent;
  color: #6681aa;
}

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

.mini-card {
  padding: 16px;
}

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

.upload-inline-bar,
.filter-bar,
.table-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.filter-bar {
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
}

.workbook-filter-bar {
  grid-template-columns: repeat(5, minmax(150px, 1fr)) minmax(150px, 0.8fr);
}

.workbook-filter-bar .filter-field:nth-of-type(1) { grid-column: 1; grid-row: 1; }
.workbook-filter-bar .filter-field:nth-of-type(2) { grid-column: 2; grid-row: 1; }
.workbook-filter-bar .filter-field:nth-of-type(3) { grid-column: 3; grid-row: 1; }
.workbook-filter-bar .filter-field:nth-of-type(4) { grid-column: 4; grid-row: 1; }
.workbook-filter-bar .filter-field:nth-of-type(5) { grid-column: 5; grid-row: 1; }
.workbook-filter-bar .filter-field:nth-of-type(6) { grid-column: 1; grid-row: 2; }
.workbook-filter-bar .filter-field:nth-of-type(7) { grid-column: 2; grid-row: 2; }
.workbook-filter-bar .filter-field:nth-of-type(8) { grid-column: 3; grid-row: 2; }

.workbook-filter-bar .filter-actions {
  grid-column: 6;
  grid-row: 1 / span 2;
  align-self: stretch;
  display: grid;
  grid-template-columns: 1fr;
}

.workbook-filter-bar .filter-actions .btn {
  width: 100%;
  justify-content: center;
}

.upload-inline-actions,
.filter-actions,
.table-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.workbook-table,
.kpi-table {
  border-collapse: separate;
  border-spacing: 0;
}

.tracking-chip-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pickup-status-line {
  margin-top: 7px;
  color: #315481;
  font-size: 11px;
  font-weight: 900;
}

.pickup-status-requested {
  color: #15835b;
}

.pickup-status-error {
  color: #c92a2a;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(6, 24, 55, 0.42);
  backdrop-filter: blur(6px);
}

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

.modal-card {
  width: min(860px, 100%);
  max-height: min(820px, calc(100vh - 56px));
  overflow: auto;
  border: 1px solid #cfe0f7;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(8, 27, 64, 0.24);
}

.inventory-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.inventory-summary-grid .mini-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.inventory-summary-grid .mini-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.inventory-filter-panel,
.inventory-lookup-panel,
.inventory-result-block {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.inventory-lookup-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.inventory-lookup-grid .span-2 {
  grid-column: span 2;
}

.inventory-lookup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.inventory-filter-section {
  margin-bottom: 16px;
}

.inventory-filter-head,
.inventory-result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.inventory-filter-head strong,
.inventory-result-head h4 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
}

.inventory-filter-head span,
.inventory-result-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.check-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cfe0f7;
  border-radius: 10px;
  background: #f9fcff;
  color: #0f3268;
  font-size: 13px;
  font-weight: 900;
}

.check-card input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.inventory-null-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.inventory-results-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.inventory-table th,
.inventory-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e2ebf6;
  text-align: left;
  vertical-align: top;
}

.inventory-table th {
  color: #315481;
  background: #f3f7fc;
  font-size: 12px;
  font-weight: 900;
}

.inventory-lookup-table {
  min-width: 1280px;
}

.processing-history {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
}

.processing-management-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.processing-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}

.processing-summary-tile {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 92px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid #d6e3f5;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #f2f7ff);
  color: #092858;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(9, 40, 88, 0.07);
}

.processing-summary-tile::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: rgba(56, 103, 232, 0.12);
}

.processing-summary-tile span {
  color: #42659b;
  font-size: 12px;
  font-weight: 900;
}

.processing-summary-tile strong {
  position: relative;
  z-index: 1;
  justify-self: end;
  font-size: 30px;
  line-height: 1;
}

.processing-summary-tile:hover,
.processing-summary-tile.active {
  border-color: #3867e8;
  background: linear-gradient(135deg, #edf4ff, #ffffff);
  box-shadow: inset 0 0 0 1px #3867e8, 0 18px 36px rgba(56, 103, 232, 0.14);
}

.processing-summary-tile.status-ready::after {
  background: rgba(56, 103, 232, 0.13);
}

.processing-summary-tile.status-working::after {
  background: rgba(27, 99, 201, 0.14);
}

.processing-summary-tile.status-done::after {
  background: rgba(24, 132, 92, 0.14);
}

.processing-summary-tile.status-hold::after {
  background: rgba(173, 106, 0, 0.15);
}

.processing-summary-tile.status-working strong {
  color: #1b63c9;
}

.processing-summary-tile.status-done strong {
  color: #18845c;
}

.processing-summary-tile.status-hold strong {
  color: #ad6a00;
}

.table-filter-bar.processing-filter-bar {
  margin: 0;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 12px 14px;
}

.processing-filter-search {
  grid-column: span 4;
}

.processing-filter-customer {
  grid-column: span 3;
}

.processing-filter-date-range {
  grid-column: span 3;
}

.processing-filter-status {
  grid-column: span 2;
}

.table-filter-bar.processing-filter-bar .table-filter-actions {
  grid-column: 1 / -1;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.table-filter-bar.processing-filter-bar .btn {
  min-width: 64px;
  padding-inline: 14px;
}

.filter-field-label {
  color: #4169a6;
  font-size: 12px;
  font-weight: 900;
}

.processing-date-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.processing-date-range span {
  color: #6682ad;
  font-size: 13px;
  font-weight: 900;
}

.processing-date-range input {
  min-width: 0;
}

@media (max-width: 1200px) {
  .table-filter-bar.processing-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .processing-filter-search,
  .processing-filter-customer,
  .processing-filter-status {
    grid-column: span 1;
  }

  .processing-filter-date-range,
  .table-filter-bar.processing-filter-bar .table-filter-actions {
    grid-column: span 2;
  }

  .table-filter-bar.processing-filter-bar .table-filter-actions {
    justify-content: flex-start;
  }
}

.processing-history-table {
  min-width: 1710px;
  font-size: 13px;
}

.processing-history-table input,
.processing-history-table select {
  width: 100%;
  min-width: 92px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #d5e1f0;
  border-radius: 8px;
  background: #fff;
  color: #092858;
  font-size: 12px;
  font-weight: 800;
}

.processing-history-table .processing-history-check {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.processing-history-table .processing-history-check input {
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
}

.processing-history-table th:nth-child(10),
.processing-history-table td:nth-child(10) {
  width: 120px;
}

.processing-history-table th:nth-child(11),
.processing-history-table td:nth-child(11) {
  width: 140px;
}

.processing-history-table td:nth-child(11) input {
  min-width: 120px;
}

.processing-history-table th:nth-child(12),
.processing-history-table td:nth-child(12) {
  min-width: 300px;
}

.processing-history-table td:nth-child(7) input,
.processing-history-table td:nth-child(12) input {
  min-width: 240px;
}

.processing-history-table tr.selected td {
  background: #eef4ff;
}

.processing-work-row {
  cursor: pointer;
}

.processing-work-row:hover td {
  background: #eef4ff;
}

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

.processing-row-autosave-status {
  min-width: 74px;
  padding: 4px 7px;
  border: 1px solid #d5e1f0;
  border-radius: 999px;
  background: #f4f8ff;
  color: #42659b;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.processing-row-autosave-status[data-state="pending"],
.processing-row-autosave-status[data-state="saving"] {
  border-color: #b9cdf8;
  background: #edf4ff;
  color: #214b9a;
}

.processing-row-autosave-status[data-state="saved"] {
  border-color: #bfe7ce;
  background: #f2fbf6;
  color: #12734c;
}

.processing-row-autosave-status[data-state="error"] {
  border-color: #f0c2c2;
  background: #fff6f6;
  color: #b42318;
}

.processing-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  padding-top: 14px;
}

.processing-pagination a,
.processing-pagination span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  background: #fff;
  color: #173763;
  font-size: 12px;
  font-weight: 900;
}

.processing-pagination a.active {
  border-color: #3867e8;
  background: #3867e8;
  color: #fff;
}

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

.processing-jump-actions .btn.active {
  background: #3867e8;
  border-color: #3867e8;
  color: #fff;
}

.processing-work-form {
  display: grid;
  gap: 12px;
}

.processing-detail-command {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(330px, 1fr) minmax(0, 1.4fr);
  gap: 14px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid #cfe0f6;
  border-radius: 14px;
  background: linear-gradient(135deg, #fbfdff, #f4f8ff);
  box-shadow: 0 18px 38px rgba(9, 40, 88, 0.08);
}

.processing-detail-main {
  display: grid;
  align-content: center;
  gap: 6px;
}

.processing-detail-label,
.processing-detail-main span,
.processing-detail-facts span,
.processing-detail-controls span,
.processing-note-field span {
  color: #42659b;
  font-size: 12px;
  font-weight: 900;
}

.processing-detail-main strong {
  color: #061f4d;
  font-size: 24px;
  line-height: 1.05;
}

.processing-detail-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.processing-detail-sub span {
  max-width: 220px;
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.processing-detail-facts {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr;
  gap: 10px;
}

.processing-detail-facts div {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d9e6f6;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.processing-detail-facts strong {
  overflow: hidden;
  color: #092858;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.processing-detail-controls {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(240px, 1.3fr) minmax(130px, 0.8fr) minmax(120px, 0.75fr) minmax(74px, auto);
  gap: 10px;
  align-items: end;
}

.processing-detail-controls label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.processing-detail-controls input,
.processing-detail-controls select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #c9d7eb;
  border-radius: 10px;
  background: #fff;
  color: #092858;
  font-weight: 900;
}

.processing-detail-controls .btn {
  min-width: 72px;
  min-height: 40px;
  padding-inline: 14px;
  white-space: nowrap;
}

.processing-table-command {
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(420px, 1.28fr);
  gap: 16px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid #cfe0f6;
  border-radius: 14px;
  background:
    linear-gradient(135deg, #ffffff, #f6f9ff);
  box-shadow: 0 12px 26px rgba(9, 40, 88, 0.06);
}

.processing-command-main {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d9e6f6;
  border-radius: 12px;
  background: #f8fbff;
}

.processing-note-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.processing-note-field textarea {
  width: 100%;
  min-height: 70px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid #c9d7eb;
  border-radius: 10px;
  background: #fff;
  color: #092858;
  font-weight: 800;
}

.processing-table-wrap {
  max-height: calc(100vh - 300px);
  border: 1px solid #c9d7eb;
  border-radius: 8px;
  background: #fff;
}

.processing-table-expanded-head {
  display: none;
}

body.processing-table-expanded-active {
  overflow: hidden;
}

.processing-editor-layout .processing-table-wrap.processing-table-expanded,
.processing-table-wrap.processing-table-expanded {
  position: fixed;
  inset: 8px 10px 10px;
  z-index: 130;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: none;
  height: calc(100dvh - 18px);
  overflow: auto;
  border-color: #8fb3ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(5, 20, 45, 0.35);
}

.processing-table-wrap.processing-table-expanded::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(5, 20, 45, 0.42);
}

.processing-table-expanded .processing-table-expanded-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #cfe0f6;
  background: #f7fbff;
  box-shadow: 0 8px 18px rgba(9, 40, 88, 0.08);
}

.processing-table-expanded-head div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.processing-table-expanded-head span {
  color: #42659b;
  font-size: 12px;
  font-weight: 900;
}

.processing-table-expanded-head strong {
  overflow: hidden;
  color: #061f4d;
  font-size: 16px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.processing-table-expanded .processing-inline-full-table {
  align-self: start;
}

.processing-table-expanded .processing-board-full-table th {
  top: 53px;
}

.processing-table {
  --processing-no-width: 48px;
  --processing-upload-width: 156px;
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.processing-table col {
  width: 110px;
}

.processing-col-no {
  width: 48px;
}

.processing-col-upload {
  width: 156px;
}

.processing-col-manager,
.processing-col-text {
  width: 112px;
}

.processing-col-date {
  width: 150px;
}

.processing-col-date-wide {
  width: 170px;
}

.processing-col-short,
.processing-col-qty {
  width: 72px;
}

.processing-col-code {
  width: 110px;
}

.processing-col-barcode {
  width: 116px;
}

.processing-col-product {
  width: 420px;
}

.processing-col-country {
  width: 150px;
}

.processing-col-money {
  width: 112px;
}

.processing-col-note {
  width: 120px;
}

.processing-col-manage {
  width: 96px;
}

.processing-col-status {
  width: 116px;
}

.processing-table th,
.processing-table td {
  padding: 9px 10px;
  border-right: 1px solid #d8e2ef;
  border-bottom: 1px solid #d8e2ef;
  vertical-align: top;
}

.processing-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #26313f;
  color: #fff;
  white-space: nowrap;
}

.processing-table .header-green {
  background: #158f4a;
}

.processing-table .header-blue {
  background: #2c67c7;
}

.processing-table td:nth-child(2),
.processing-table td:nth-child(3),
.processing-table td:nth-child(4),
.processing-table td:nth-child(5),
.processing-table td:nth-child(6),
.processing-table td:nth-child(8),
.processing-table td:nth-child(11) {
  background: #fff8bf;
}

.processing-table th:nth-child(9),
.processing-table td:nth-child(9) {
  min-width: 0;
}

.processing-table th:nth-child(1),
.processing-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 4;
  min-width: 48px;
  background: #fff;
}

.processing-table th:nth-child(2),
.processing-table td:nth-child(2) {
  position: sticky;
  left: var(--processing-no-width);
  z-index: 4;
  min-width: 0;
  background: #fff8bf;
}

.processing-table th:nth-child(3),
.processing-table td:nth-child(3) {
  min-width: 0;
}

.processing-table th:nth-child(4),
.processing-table td:nth-child(4) {
  min-width: 0;
}

.processing-table th:nth-child(5),
.processing-table td:nth-child(5),
.processing-table th:nth-child(6),
.processing-table td:nth-child(6) {
  min-width: 0;
}

.processing-table th:nth-child(19),
.processing-table td:nth-child(19) {
  min-width: 0;
}

.processing-table th:nth-child(20),
.processing-table td:nth-child(20),
.processing-table th:nth-child(21),
.processing-table td:nth-child(21),
.processing-table th:nth-child(24),
.processing-table td:nth-child(24) {
  min-width: 0;
}

.processing-table th:nth-child(9),
.processing-table td:nth-child(9) {
  position: sticky;
  left: calc(var(--processing-no-width) + var(--processing-upload-width));
  z-index: 8;
  overflow: hidden;
  box-shadow: 8px 0 14px rgba(9, 40, 88, 0.08);
}

.processing-table td:nth-child(9) {
  background: #fff;
}

.processing-table th:nth-child(1),
.processing-table th:nth-child(2),
.processing-table th:nth-child(9) {
  z-index: 10;
  background: #26313f;
}

.processing-table input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.82);
  color: #092858;
  font-size: 13px;
  font-weight: 800;
}

.processing-table input[type="date"] {
  min-width: 0;
  font-size: 12px;
}

.processing-table input:focus {
  border-color: #3867e8;
  background: #fff;
  outline: none;
}

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

.processing-editor-layout .processing-table-wrap {
  max-height: calc(100vh - 310px);
}

.processing-list-table {
  table-layout: auto;
  width: 100%;
  min-width: 0;
}

.processing-list-table th,
.processing-list-table td {
  position: static !important;
  left: auto !important;
  min-width: 0 !important;
  box-shadow: none !important;
}

.processing-list-table th {
  position: sticky !important;
  top: 0;
  z-index: 3;
}

.processing-list-table th:first-child,
.processing-list-table td:first-child {
  width: 52px;
}

.processing-list-table th[data-view*="board"]:nth-child(2),
.processing-list-table td[data-view*="board"]:nth-child(2) {
  width: 30%;
  background: #fff;
}

.processing-list-table th[data-summary-field],
.processing-list-table th[data-view*="inbound"],
.processing-list-table th[data-view*="board"]:nth-child(n+13) {
  background: #2f69c9;
}

.processing-list-table td[data-summary-field] {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.processing-list-table[data-processing-view-current="board"] td[data-summary-field="check_detail"],
.processing-list-table[data-processing-view-current="board"] td[data-summary-field="sales_feedback"] {
  max-width: 220px;
}

.processing-item-row {
  cursor: pointer;
}

.processing-item-row:hover td,
.processing-item-row.selected td {
  background: #eef4ff !important;
}

.processing-product-cell {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.processing-hidden-fields {
  display: none;
}

.processing-row-panel {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 310px);
  overflow: auto;
  padding: 14px;
  border: 1px solid #cfe0f6;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: 0 16px 34px rgba(9, 40, 88, 0.08);
  outline: none;
}

.processing-row-panel.attention {
  border-color: #3867e8;
  box-shadow: 0 0 0 4px rgba(56, 103, 232, 0.14), 0 16px 34px rgba(9, 40, 88, 0.1);
}

.processing-row-panel-head {
  display: grid;
  gap: 5px;
}

.processing-row-panel-head span,
.processing-panel-meta span,
.processing-panel-grid span {
  color: #42659b;
  font-size: 12px;
  font-weight: 900;
}

.processing-row-panel-head strong {
  color: #061f4d;
  font-size: 18px;
  line-height: 1.25;
}

.processing-panel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.processing-panel-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef4ff;
}

.processing-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.processing-panel-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.processing-panel-grid .span-2 {
  grid-column: span 2;
}

.processing-panel-grid input,
.processing-panel-grid textarea {
  width: 100%;
  min-height: 36px;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid #c9d7eb;
  border-radius: 8px;
  background: #fff;
  color: #092858;
  font-weight: 800;
}

.processing-panel-grid textarea {
  resize: vertical;
}

.processing-panel-actions {
  position: sticky;
  bottom: -14px;
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0), #f8fbff 40%);
}

.processing-autosave-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #cfe0f7;
  border-radius: 999px;
  background: #f4f8ff;
  color: #42659b;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.processing-autosave-status[data-state="saving"],
.processing-autosave-status[data-state="pending"] {
  border-color: #b9cdf8;
  background: #edf4ff;
  color: #214b9a;
}

.processing-autosave-status[data-state="saved"] {
  border-color: #bfe7ce;
  background: #f2fbf6;
  color: #12734c;
}

.processing-autosave-status[data-state="error"] {
  border-color: #f0c2c2;
  background: #fff6f6;
  color: #b42318;
}

.processing-board-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  padding: 28px;
  background: rgba(5, 20, 45, 0.52);
}

.processing-board-modal.is-visible {
  display: grid;
  place-items: center;
}

.processing-board-modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1840px, calc(100vw - 36px));
  height: min(900px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid #cfe0f6;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(5, 20, 45, 0.26);
}

.processing-board-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid #d8e4f4;
  background: linear-gradient(135deg, #fbfdff, #f3f7ff);
}

.processing-board-modal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.processing-board-modal-head div {
  display: grid;
  gap: 4px;
}

.processing-board-modal-head span {
  color: #42659b;
  font-size: 12px;
  font-weight: 900;
}

.processing-board-modal-head strong {
  color: #061f4d;
  font-size: 22px;
  line-height: 1.2;
}

.processing-board-modal-body {
  overflow: auto;
}

.processing-board-full-table {
  min-width: 2940px;
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.processing-board-full-table th,
.processing-board-full-table td {
  padding: 5px 7px;
  border: 1px solid #1f2935;
  vertical-align: top;
}

.processing-board-full-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #26313f;
  color: #fff;
  white-space: nowrap;
  font-size: 11px;
  text-align: center;
}

.processing-board-full-table th:nth-child(15),
.processing-board-full-table th:nth-child(16),
.processing-board-full-table th:nth-child(17),
.processing-board-full-table th:nth-child(21),
.processing-board-full-table th:nth-child(22),
.processing-board-full-table th:nth-child(23),
.processing-board-full-table th:nth-child(24) {
  background: #158f4a;
}

.processing-board-full-table th:nth-child(19),
.processing-board-full-table th:nth-child(20) {
  background: #2f69c9;
}

.processing-board-full-table td:nth-child(2),
.processing-board-full-table td:nth-child(3),
.processing-board-full-table td:nth-child(4),
.processing-board-full-table td:nth-child(5),
.processing-board-full-table td:nth-child(6),
.processing-board-full-table td:nth-child(8),
.processing-board-full-table td:nth-child(11) {
  background: #fff8bf;
}

.processing-board-full-table th:nth-child(1),
.processing-board-full-table td:nth-child(1) {
  min-width: 56px;
}

.processing-board-full-table th:nth-child(2),
.processing-board-full-table td:nth-child(2) {
  min-width: 160px;
}

.processing-board-full-table th:nth-child(3),
.processing-board-full-table td:nth-child(3),
.processing-board-full-table th:nth-child(4),
.processing-board-full-table td:nth-child(4) {
  min-width: 140px;
}

.processing-board-full-table th:nth-child(5),
.processing-board-full-table td:nth-child(5),
.processing-board-full-table th:nth-child(6),
.processing-board-full-table td:nth-child(6) {
  min-width: 160px;
}

.processing-board-full-table th:nth-child(7),
.processing-board-full-table td:nth-child(7) {
  min-width: 130px;
}

.processing-board-full-table th:nth-child(8),
.processing-board-full-table td:nth-child(8) {
  min-width: 150px;
}

.processing-board-full-table th:nth-child(9),
.processing-board-full-table td:nth-child(9) {
  min-width: 460px;
}

.processing-inline-full-table th:nth-child(8),
.processing-inline-full-table td:nth-child(8),
.processing-inline-full-table th:nth-child(9),
.processing-inline-full-table td:nth-child(9) {
  position: sticky;
  box-shadow: 1px 0 0 #1f2935;
}

.processing-inline-full-table th:nth-child(8),
.processing-inline-full-table td:nth-child(8) {
  left: 0;
  z-index: 5;
}

.processing-inline-full-table th:nth-child(9),
.processing-inline-full-table td:nth-child(9) {
  left: 150px;
  z-index: 5;
}

.processing-inline-full-table th:nth-child(8),
.processing-inline-full-table th:nth-child(9) {
  z-index: 7;
}

.processing-inline-full-table td:nth-child(8) {
  background: #fff8bf;
}

.processing-inline-full-table td:nth-child(9) {
  background: #fff;
}

.processing-board-full-table th:nth-child(10),
.processing-board-full-table td:nth-child(10) {
  min-width: 170px;
}

.processing-board-full-table th:nth-child(11),
.processing-board-full-table td:nth-child(11),
.processing-board-full-table th:nth-child(12),
.processing-board-full-table td:nth-child(12),
.processing-board-full-table th:nth-child(13),
.processing-board-full-table td:nth-child(13) {
  min-width: 110px;
}

.processing-board-full-table th:nth-child(14),
.processing-board-full-table td:nth-child(14),
.processing-board-full-table th:nth-child(17),
.processing-board-full-table td:nth-child(17),
.processing-board-full-table th:nth-child(18),
.processing-board-full-table td:nth-child(18) {
  min-width: 240px;
}

.processing-board-full-table th:nth-child(15),
.processing-board-full-table td:nth-child(15),
.processing-board-full-table th:nth-child(16),
.processing-board-full-table td:nth-child(16),
.processing-board-full-table th:nth-child(19),
.processing-board-full-table td:nth-child(19),
.processing-board-full-table th:nth-child(20),
.processing-board-full-table td:nth-child(20),
.processing-board-full-table th:nth-child(21),
.processing-board-full-table td:nth-child(21),
.processing-board-full-table th:nth-child(24),
.processing-board-full-table td:nth-child(24) {
  min-width: 180px;
}

.processing-board-full-table th:nth-child(22),
.processing-board-full-table td:nth-child(22),
.processing-board-full-table th:nth-child(23),
.processing-board-full-table td:nth-child(23) {
  min-width: 140px;
}

.processing-board-full-table td:nth-child(9),
.processing-board-full-table td:nth-child(14),
.processing-board-full-table td:nth-child(17),
.processing-board-full-table td:nth-child(18) {
  white-space: normal;
}

.processing-board-full-table tr {
  cursor: pointer;
}

.processing-board-full-table tbody tr:hover td,
.processing-board-full-table tbody tr.selected td {
  background: #eef4ff;
}

.processing-board-full-table input,
.processing-board-full-table textarea {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #092858;
  font: inherit;
  font-weight: 800;
  outline: none;
}

.processing-board-full-table input {
  min-height: 34px;
}

.processing-board-full-table textarea {
  min-height: 58px;
  overflow: hidden;
  resize: vertical;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.processing-inline-full-table td:has([data-editable-cell]) {
  padding: 0;
}

.processing-inline-full-table td [data-editable-cell] {
  min-height: 44px;
  padding: 8px 7px;
  cursor: text;
}

.processing-inline-full-table td textarea[data-editable-cell] {
  min-height: 62px;
}

.processing-board-full-table input:focus,
.processing-board-full-table textarea:focus {
  background: #fff;
  box-shadow: inset 0 0 0 2px #3867e8;
}

.processing-board-full-table input[type="date"] {
  min-width: 152px;
  min-height: 30px;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.processing-edit-toolbar {
  display: grid;
  grid-template-columns: minmax(300px, auto) minmax(420px, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid #cfe0f6;
  border-radius: 14px;
  background:
    linear-gradient(135deg, #fbfdff, #f4f8ff);
}

.processing-toolbar-section {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #d9e6f6;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.processing-toolbar-section-wide {
  grid-template-columns: auto minmax(0, 1fr);
}

.processing-toolbar-label {
  color: #42659b;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.processing-view-tabs,
.processing-bulk-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.processing-view-tabs button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  background: #eef4ff;
  color: #173763;
  font-weight: 900;
  cursor: pointer;
}

.processing-view-tabs button.active {
  border-color: #3867e8;
  background: #3867e8;
  color: #fff;
}

.processing-bulk-tools select,
.processing-bulk-tools input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  background: #fff;
  color: #092858;
  font-weight: 850;
}

.processing-bulk-tools input {
  flex: 1 1 220px;
  min-width: 180px;
}

.processing-quick-filter {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(130px, 0.45fr) minmax(150px, 0.55fr) minmax(150px, 0.55fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #d6e3f5;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbfdff, #f5f9ff);
}

.processing-quick-filter label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.processing-quick-filter span,
.processing-quick-filter label span {
  color: #42659b;
  font-size: 12px;
  font-weight: 900;
}

.processing-quick-filter input,
.processing-quick-filter select {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  background: #fff;
  color: #092858;
  font-weight: 850;
}

.processing-quick-filter > span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4ff;
  white-space: nowrap;
}

.processing-inline-full-table {
  min-width: 3180px;
}

.processing-inline-full-table th:nth-child(1),
.processing-inline-full-table td:nth-child(1) {
  min-width: 44px;
  text-align: center;
}

.processing-inline-full-table th:nth-child(2),
.processing-inline-full-table td:nth-child(2) {
  min-width: 56px;
}

.processing-inline-full-table th:nth-child(3),
.processing-inline-full-table td:nth-child(3) {
  min-width: 160px;
}

.processing-inline-full-table th:nth-child(4),
.processing-inline-full-table td:nth-child(4),
.processing-inline-full-table th:nth-child(5),
.processing-inline-full-table td:nth-child(5) {
  min-width: 140px;
}

.processing-inline-full-table th:nth-child(6),
.processing-inline-full-table td:nth-child(6),
.processing-inline-full-table th:nth-child(7),
.processing-inline-full-table td:nth-child(7) {
  min-width: 160px;
}

.processing-inline-full-table th:nth-child(8),
.processing-inline-full-table td:nth-child(8) {
  min-width: 130px;
}

.processing-inline-full-table th:nth-child(9),
.processing-inline-full-table td:nth-child(9) {
  min-width: 150px;
}

.processing-inline-full-table th:nth-child(10),
.processing-inline-full-table td:nth-child(10) {
  min-width: 460px;
}

.processing-inline-full-table th:nth-child(15),
.processing-inline-full-table td:nth-child(15),
.processing-inline-full-table th:nth-child(18),
.processing-inline-full-table td:nth-child(18),
.processing-inline-full-table th:nth-child(19),
.processing-inline-full-table td:nth-child(19) {
  min-width: 240px;
}

.processing-inline-full-table th:nth-child(20),
.processing-inline-full-table td:nth-child(20),
.processing-inline-full-table th:nth-child(21),
.processing-inline-full-table td:nth-child(21),
.processing-inline-full-table th:nth-child(22),
.processing-inline-full-table td:nth-child(22),
.processing-inline-full-table th:nth-child(25),
.processing-inline-full-table td:nth-child(25) {
  min-width: 180px;
}

.processing-inline-full-table th:nth-child(23),
.processing-inline-full-table td:nth-child(23),
.processing-inline-full-table th:nth-child(24),
.processing-inline-full-table td:nth-child(24) {
  min-width: 140px;
}

.processing-inline-full-table td:nth-child(3),
.processing-inline-full-table td:nth-child(4),
.processing-inline-full-table td:nth-child(5),
.processing-inline-full-table td:nth-child(6),
.processing-inline-full-table td:nth-child(7),
.processing-inline-full-table td:nth-child(9),
.processing-inline-full-table td:nth-child(12) {
  background: #fff8bf;
}

.processing-inline-full-table th:nth-child(16),
.processing-inline-full-table th:nth-child(17),
.processing-inline-full-table th:nth-child(18),
.processing-inline-full-table th:nth-child(22),
.processing-inline-full-table th:nth-child(23),
.processing-inline-full-table th:nth-child(24),
.processing-inline-full-table th:nth-child(25) {
  background: #158f4a;
}

.processing-inline-full-table th:nth-child(20),
.processing-inline-full-table th:nth-child(21) {
  background: #2f69c9;
}

.processing-inline-full-table th:nth-child(9),
.processing-inline-full-table td:nth-child(9),
.processing-inline-full-table th:nth-child(10),
.processing-inline-full-table td:nth-child(10) {
  position: sticky;
  box-shadow: 1px 0 0 #1f2935;
}

.processing-inline-full-table th:nth-child(9),
.processing-inline-full-table td:nth-child(9) {
  left: 0;
  z-index: 8;
}

.processing-inline-full-table th:nth-child(10),
.processing-inline-full-table td:nth-child(10) {
  left: 150px;
  z-index: 8;
}

.processing-inline-full-table th:nth-child(9),
.processing-inline-full-table th:nth-child(10) {
  z-index: 10;
}

.processing-inline-full-table td:nth-child(9) {
  background: #fff8bf;
}

.processing-inline-full-table td:nth-child(10) {
  background: #fff;
}

.processing-inline-full-table tr.row-selected td {
  background-color: #eef4ff;
}

.processing-inline-full-table td.cell-dirty {
  background: #fff2b8 !important;
  box-shadow: inset 0 0 0 2px #d78a12;
}

.processing-inline-full-table td.cell-saved {
  background: #eefbf4 !important;
  box-shadow: inset 0 0 0 2px #19a463;
}

.qten-month-board {
  margin-bottom: 14px;
}

.qten-month-slot.has-file {
  border-color: #8eb2ff;
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
}

.qten-dashboard {
  display: grid;
  gap: 14px;
}

.qten-dashboard-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding: 18px;
  border: 1px solid #cfe0f7;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #f4f8ff);
  box-shadow: 0 16px 36px rgba(9, 40, 88, 0.08);
}

.qten-dashboard-head h3 {
  margin: 2px 0 6px;
  color: #062a61;
  font-size: 24px;
}

.qten-dashboard-head span,
.qten-dashboard-meta em {
  color: #5c73a0;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.qten-dashboard-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.qten-dashboard-meta strong {
  color: #092858;
  font-size: 13px;
}

.qten-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 10px;
}

.qten-kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 16px;
  border: 1px solid #d5e1f0;
  border-radius: 10px;
  background: #fff;
}

.qten-kpi-card::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(56, 103, 232, 0.12);
}

.qten-kpi-card span,
.qten-kpi-card em {
  display: block;
  color: #48689b;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.qten-kpi-card strong {
  display: block;
  margin: 12px 0 6px;
  color: #092858;
  font-size: 28px;
  line-height: 1;
}

.qten-kpi-card.tone-green strong { color: #18845c; }
.qten-kpi-card.tone-blue strong { color: #1b63c9; }
.qten-kpi-card.tone-amber strong { color: #ad6a00; }
.qten-kpi-card.tone-red strong { color: #b42318; }
.qten-kpi-card.tone-violet strong { color: #5642b8; }

.qten-chart-card {
  border-radius: 12px;
}

.qten-bar-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(38px, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 250px;
  padding: 16px 8px 2px;
  border-bottom: 1px solid #dbe5f3;
  background: repeating-linear-gradient(180deg, transparent 0, transparent 47px, #edf2f8 48px);
}

.qten-bar-item {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 6px;
  min-width: 0;
  height: 230px;
  align-items: end;
  justify-items: center;
}

.qten-bar-item span {
  width: 100%;
  min-height: 3px;
  border: 1px solid #76a9e9;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #c9e2fb, #9ec7f0);
}

.qten-bar-item em,
.qten-bar-item strong {
  overflow: hidden;
  max-width: 100%;
  color: #607086;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qten-bar-item strong {
  color: #193a66;
}

.qten-visual-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 14px;
}

.qten-status-donut {
  width: 190px;
  aspect-ratio: 1;
  margin: 10px auto 18px;
  border-radius: 50%;
  background: conic-gradient(#5b9f1b 0 calc(var(--done) * 1%), #2f69c9 0 100%);
  position: relative;
}

.qten-status-donut::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e1e8f2;
}

.qten-status-bars,
.qten-week-chart {
  display: grid;
  gap: 10px;
}

.qten-status-row,
.qten-week-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  color: #092858;
  font-size: 12px;
  font-weight: 900;
}

.qten-status-row div,
.qten-week-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #edf3fb;
}

.qten-status-row div span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #5b9f1b;
}

.qten-status-row.status-shipping div span { background: #2f69c9; }
.qten-status-row.status-in_progress div span { background: #c78213; }
.qten-status-row.status-warehouse div span { background: #23a26d; }
.qten-status-row.status-issue div span { background: #e5484d; }

.qten-status-row em,
.qten-week-row em {
  color: #516b96;
  font-style: normal;
  text-align: right;
}

.qten-week-track {
  display: flex;
  height: 28px;
  border-radius: 8px;
}

.qten-week-track span {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 100%;
  color: #082858;
  font-size: 11px;
  font-weight: 900;
}

.qten-week-track .air {
  background: #b5d3f2;
}

.qten-week-track .ocean {
  background: #9addca;
}

.qten-leadtime-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.qten-leadtime-table th,
.qten-leadtime-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #e1e8f2;
  color: #092858;
  font-size: 13px;
  text-align: center;
}

.qten-leadtime-table th {
  background: #f3f7ff;
  font-size: 12px;
  font-weight: 900;
}

.qten-leadtime-table td:first-child {
  text-align: left;
}

.qten-leadtime-table td strong,
.qten-leadtime-table td span {
  display: block;
}

.qten-leadtime-table td span {
  margin-top: 3px;
  color: #6079a3;
  font-size: 11px;
}

.pill-blue,
.pill-green {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f1ff;
  color: #1b63c9;
  font-style: normal;
  font-weight: 900;
}

.pill-green {
  background: #e8f8f0;
  color: #18845c;
}

@media (max-width: 1300px) {
  .qten-kpi-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .qten-visual-grid {
    grid-template-columns: 1fr;
  }
}

.qten-dashboard {
  gap: 18px;
}

.qten-dashboard-head {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
  border-color: #bfd3ef;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(239,246,255,0.94)),
    radial-gradient(circle at 92% 12%, rgba(56,103,232,0.18), transparent 30%);
  box-shadow: 0 20px 44px rgba(9, 40, 88, 0.11);
}

.qten-dashboard-head::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 3px solid #3867e8;
  pointer-events: none;
}

.qten-dashboard-head h3 {
  font-size: 27px;
  letter-spacing: 0;
}

.qten-kpi-grid {
  grid-template-columns: repeat(6, minmax(170px, 1fr));
  gap: 12px;
}

.qten-kpi-card {
  min-height: 126px;
  padding: 17px 18px;
  border-color: #c9d9ee;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  box-shadow: 0 12px 28px rgba(9, 40, 88, 0.08);
}

.qten-kpi-card::after {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(56,103,232,0.10);
  transform: rotate(8deg);
}

.qten-kpi-card i {
  display: block;
  width: 28px;
  height: 4px;
  margin-bottom: 13px;
  border-radius: 999px;
  background: #3867e8;
}

.qten-kpi-card.tone-green i { background: #18845c; }
.qten-kpi-card.tone-blue i { background: #1b63c9; }
.qten-kpi-card.tone-amber i { background: #ad6a00; }
.qten-kpi-card.tone-red i { background: #b42318; }
.qten-kpi-card.tone-violet i { background: #5642b8; }

.qten-kpi-card span {
  color: #516b96;
  font-size: 12px;
}

.qten-kpi-card strong {
  margin: 10px 0 7px;
  font-size: 30px;
  letter-spacing: 0;
}

.qten-chart-card {
  border-color: #c9d9ee;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 18px 38px rgba(9, 40, 88, 0.09);
}

.qten-chart-legend {
  display: flex;
  gap: 12px;
  color: #48689b;
  font-size: 12px;
  font-weight: 900;
}

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

.qten-chart-legend span::before {
  content: "";
  display: block;
  width: 18px;
  height: 8px;
  border-radius: 999px;
  background: #9ec7f0;
}

.qten-chart-legend .line::before {
  height: 3px;
  background: #1b63c9;
}

.qten-combo-chart {
  position: relative;
  overflow: hidden;
  min-height: 318px;
  padding: 18px 14px 8px;
  border: 1px solid #e2eaf5;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,251,255,0.96)),
    repeating-linear-gradient(180deg, transparent 0, transparent 47px, #edf2f8 48px);
}

.qten-line-chart {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 18px;
  width: calc(100% - 48px);
  height: 242px;
  pointer-events: none;
  z-index: 3;
}

.qten-line-chart polygon {
  fill: rgba(56,103,232,0.12);
}

.qten-line-chart polyline {
  fill: none;
  stroke: #1b63c9;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 8px rgba(27,99,201,0.25));
}

.qten-line-chart circle {
  fill: #ffffff;
  stroke: #1b63c9;
  stroke-width: 4;
}

.qten-bar-chart {
  position: relative;
  z-index: 2;
  min-height: 294px;
  padding: 8px 4px 0;
  border-bottom: 0;
  background: transparent;
}

.qten-bar-item {
  height: 272px;
}

.qten-bar-item span {
  width: 78%;
  border-color: rgba(56,103,232,0.40);
  background: linear-gradient(180deg, rgba(189,217,248,0.86), rgba(118,169,233,0.78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 9px 18px rgba(56,103,232,0.12);
}

.qten-bar-item em {
  color: #6c7d96;
}

.qten-bar-item strong {
  color: #092858;
  font-size: 11px;
}

.qten-visual-grid {
  grid-template-columns: minmax(420px, 0.9fr) minmax(560px, 1.1fr);
}

.qten-status-donut {
  width: 210px;
  background:
    conic-gradient(#5b9f1b 0 calc(var(--done) * 1%), #2f69c9 0 100%);
  box-shadow: 0 16px 28px rgba(91,159,27,0.13);
}

.qten-week-track {
  height: 34px;
  background: #eaf1fa;
}

.qten-week-track span {
  border-right: 1px solid rgba(255,255,255,0.65);
}

.qten-week-track .air {
  background: linear-gradient(90deg, #9fc7ef, #bfd9f5);
}

.qten-week-track .ocean {
  background: linear-gradient(90deg, #83d2bd, #ace5d3);
}

.qten-leadtime-table th {
  background: #eef4ff;
}

.qten-leadtime-table tr:hover td {
  background: #f7fbff;
}

.qten-status-focus {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 8px 0 18px;
}

.qten-status-donut {
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.qten-status-donut strong,
.qten-status-donut span {
  position: relative;
  z-index: 1;
  display: block;
  color: #092858;
  text-align: center;
}

.qten-status-donut strong {
  font-size: 28px;
  line-height: 1;
}

.qten-status-donut span {
  margin-top: 5px;
  color: #6079a3;
  font-size: 12px;
  font-weight: 900;
}

.qten-status-copy {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid #dbe6f5;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.qten-status-copy strong {
  color: #18845c;
  font-size: 34px;
  line-height: 1;
}

.qten-status-copy span {
  color: #092858;
  font-size: 16px;
  font-weight: 900;
}

.qten-status-copy em {
  color: #6079a3;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.qten-week-row {
  grid-template-columns: 66px minmax(260px, 1fr) minmax(92px, 116px);
  border: 1px solid #dbe6f5;
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px 12px;
  overflow: hidden;
}

.qten-week-row > strong {
  display: grid;
  place-items: center;
  height: 38px;
  border-radius: 10px;
  background: #eef4ff;
  color: #123e82;
}

.qten-week-row em {
  display: grid;
  gap: 3px;
  min-width: 0;
  justify-items: end;
}

.qten-week-row em strong {
  overflow: hidden;
  color: #092858;
  font-size: 13px;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qten-week-row em span {
  overflow: hidden;
  color: #18845c;
  font-size: 12px;
  font-weight: 900;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qten-week-row.is-down em span {
  color: #b42318;
}

.qten-week-row.is-up {
  border-color: #c8d9f4;
}

.qten-leadtime-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
}

.qten-leadtime-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dbe6f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 28px rgba(7, 29, 67, 0.07);
}

.qten-leadtime-card > div:first-child span {
  display: block;
  color: #6079a3;
  font-size: 11px;
  font-weight: 900;
}

.qten-leadtime-card > div:first-child strong {
  display: block;
  margin-top: 5px;
  color: #092858;
  font-size: 16px;
}

.qten-leadtime-main {
  padding: 14px;
  border-radius: 12px;
  background: #eef4ff;
}

.qten-leadtime-main strong {
  display: block;
  color: #1b63c9;
  font-size: 28px;
  line-height: 1;
}

.qten-leadtime-main span {
  display: block;
  margin-top: 5px;
  color: #48689b;
  font-size: 12px;
  font-weight: 900;
}

.qten-leadtime-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.qten-leadtime-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid #e6edf7;
}

.qten-leadtime-card dt,
.qten-leadtime-card dd {
  margin: 0;
  color: #6079a3;
  font-size: 12px;
  font-weight: 900;
}

.qten-leadtime-card dd {
  color: #092858;
}

@media (max-width: 1500px) {
  .qten-leadtime-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 900px) {
  .qten-status-focus,
  .qten-leadtime-grid {
    grid-template-columns: 1fr;
  }
}

body.pdf-export.endpoint-qten_volume_dashboard_page {
  background: #f4f7fb;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .sidebar,
body.pdf-export.endpoint-qten_volume_dashboard_page .topbar,
body.pdf-export.endpoint-qten_volume_dashboard_page .qten-month-board,
body.pdf-export.endpoint-qten_volume_dashboard_page .flash-stack {
  display: none !important;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .app-shell,
body.pdf-export.endpoint-qten_volume_dashboard_page .main-area {
  display: block;
  width: 100%;
  min-height: auto;
  padding: 0;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .main-area {
  padding: 18px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-dashboard {
  gap: 10px;
  padding: 0;
  background: transparent;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-dashboard-head {
  min-height: 86px;
  padding: 14px 18px;
  border-radius: 12px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-dashboard-head h3 {
  font-size: 24px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-kpi-grid {
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-kpi-card {
  min-height: 82px;
  padding: 10px 12px;
  border-radius: 10px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-kpi-card i {
  margin-bottom: 7px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-kpi-card strong {
  margin: 5px 0 3px;
  font-size: 24px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-kpi-card span,
body.pdf-export.endpoint-qten_volume_dashboard_page .qten-kpi-card em {
  font-size: 10px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-chart-card {
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(190, 209, 235, 0.88);
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-daily-panel {
  padding: 14px 16px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .panel-header.compact {
  margin-bottom: 8px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .panel-header h3 {
  font-size: 18px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-combo-chart {
  min-height: 250px;
  padding: 10px 12px 4px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-line-chart {
  top: 12px;
  height: 178px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-bar-chart {
  min-height: 228px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-bar-item {
  height: 208px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-visual-grid {
  grid-template-columns: 0.82fr 1.18fr;
  gap: 10px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-status-focus {
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px;
  margin: 4px 0 10px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-status-donut {
  width: 150px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-status-donut::after {
  inset: 30px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-status-copy {
  padding: 12px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-status-copy strong {
  font-size: 24px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-status-row,
body.pdf-export.endpoint-qten_volume_dashboard_page .qten-week-row {
  font-size: 10px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-week-row {
  padding: 7px 9px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-week-row > strong {
  min-height: 44px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-week-track {
  height: 28px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-leadtime-grid {
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-leadtime-card {
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-leadtime-card > div:first-child strong {
  font-size: 13px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-leadtime-main {
  padding: 10px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-leadtime-main strong {
  font-size: 22px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-leadtime-card dl {
  gap: 5px;
}

body.pdf-export.endpoint-qten_volume_dashboard_page .qten-leadtime-card dt,
body.pdf-export.endpoint-qten_volume_dashboard_page .qten-leadtime-card dd {
  font-size: 10px;
}

.qten-dashboard {
  padding: 2px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(56,103,232,0.12), rgba(34,160,107,0.08)),
    #f5f8fc;
}

.qten-dashboard-head {
  min-height: 128px;
  align-items: center;
  border: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(103,143,255,0.34), transparent 28%),
    linear-gradient(135deg, #08265c 0%, #123e82 58%, #1b63c9 100%);
  color: #fff;
}

.qten-dashboard-head::before {
  border-top: 0;
  background: linear-gradient(90deg, #8fd6ff, #9addca, transparent);
  height: 4px;
  inset: 0 0 auto 0;
}

.qten-dashboard-head .section-label,
.qten-dashboard-head h3,
.qten-dashboard-head span,
.qten-dashboard-head strong,
.qten-dashboard-head em {
  color: #fff;
}

.qten-dashboard-head h3 {
  margin-top: 6px;
  font-size: 30px;
}

.qten-dashboard-head span,
.qten-dashboard-meta em {
  color: rgba(255,255,255,0.74);
}

.qten-dashboard-meta {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(6px);
}

.qten-kpi-grid {
  gap: 14px;
}

.qten-kpi-card {
  border: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,250,255,0.96));
  box-shadow:
    0 18px 34px rgba(7, 29, 67, 0.10),
    inset 0 0 0 1px rgba(190, 209, 235, 0.85);
}

.qten-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(56,103,232,0.09), transparent 42%);
  pointer-events: none;
}

.qten-kpi-card::after {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(56,103,232,0.16), rgba(56,103,232,0.04));
}

.qten-kpi-card > * {
  position: relative;
  z-index: 1;
}

.qten-kpi-card strong {
  font-size: 33px;
}

.qten-chart-card {
  border: 0;
  background: rgba(255,255,255,0.98);
  box-shadow:
    0 22px 44px rgba(7, 29, 67, 0.10),
    inset 0 0 0 1px rgba(190, 209, 235, 0.88);
}

.qten-daily-panel .panel-header {
  padding-bottom: 12px;
}

.qten-combo-chart {
  min-height: 380px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,250,255,0.98)),
    repeating-linear-gradient(180deg, transparent 0, transparent 54px, rgba(156,176,204,0.20) 55px);
  box-shadow: inset 0 0 0 1px #dbe6f5;
}

.qten-line-chart {
  top: 24px;
  height: 272px;
}

.qten-line-chart polygon {
  fill: rgba(27, 99, 201, 0.18);
}

.qten-line-chart polyline {
  stroke: #0f4fbb;
  stroke-width: 7;
  filter: drop-shadow(0 8px 12px rgba(15,79,187,0.28));
}

.qten-line-chart circle {
  r: 7;
  fill: #ffffff;
  stroke: #0f4fbb;
  stroke-width: 5;
}

.qten-bar-chart {
  min-height: 344px;
}

.qten-bar-item {
  height: 318px;
  gap: 7px;
}

.qten-bar-item span {
  width: 70%;
  border: 1px solid rgba(36,101,201,0.55);
  border-radius: 7px 7px 2px 2px;
  background:
    linear-gradient(180deg, rgba(218,236,255,0.95), rgba(116,169,231,0.86));
}

.qten-visual-grid {
  gap: 16px;
}

.qten-status-donut {
  width: 230px;
}

.qten-status-donut::after {
  inset: 44px;
}

.qten-week-row {
  grid-template-columns: 70px minmax(0, 1fr) 140px;
  padding: 8px 0;
}

.qten-week-track {
  height: 38px;
  border-radius: 10px;
  min-width: 0;
}

.qten-week-row {
  grid-template-columns: 70px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 6px 12px;
  padding: 12px;
}

.qten-week-row > strong {
  grid-row: 1 / 3;
  height: 100%;
  min-height: 56px;
}

.qten-week-track {
  grid-column: 2;
}

.qten-week-row em {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 2px;
  text-align: left;
}

.qten-week-row em strong,
.qten-week-row em span {
  max-width: none;
}

.qten-leadtime-table th,
.qten-leadtime-table td {
  padding: 16px 14px;
}

.processing-large-editor {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 20, 45, 0.48);
}

.processing-large-editor[hidden] {
  display: none;
}

.processing-large-editor-card {
  display: grid;
  gap: 12px;
  width: min(760px, calc(100vw - 42px));
  padding: 18px;
  border: 1px solid #cfe0f6;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(5, 20, 45, 0.24);
}

.processing-large-editor-head,
.processing-large-editor-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.processing-large-editor-card textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  padding: 12px;
  border: 1px solid #c9d7eb;
  border-radius: 8px;
  color: #092858;
  font-weight: 850;
  line-height: 1.5;
}

.align-right {
  text-align: right !important;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 24px 26px 18px;
  border-bottom: 1px solid #e1eaf7;
  background: linear-gradient(135deg, #fbfdff, #f3f7ff);
}

.modal-head h3 {
  margin: 3px 0 8px;
  color: #061f4d;
  font-size: 26px;
}

.modal-close {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #cfe0f7;
  border-radius: 50%;
  background: #fff;
  color: #16396f;
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
}

.pickup-modal-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 26px 0;
}

.pickup-modal-summary div {
  min-height: 70px;
  padding: 14px 16px;
  border: 1px solid #dce8fa;
  border-radius: 16px;
  background: #f8fbff;
}

.pickup-modal-summary span,
.pickup-modal-grid span {
  display: block;
  color: #315481;
  font-size: 12px;
  font-weight: 900;
}

.pickup-modal-summary strong {
  display: block;
  margin-top: 7px;
  color: #08265c;
  font-size: 14px;
  line-height: 1.35;
}

.pickup-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 26px 10px;
}

.pickup-modal-grid label {
  display: grid;
  gap: 7px;
}

.pickup-modal-grid input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #cfe0f7;
  border-radius: 12px;
  background: #fff;
  color: #05275a;
  font-weight: 800;
}

.pickup-modal-grid input:focus {
  border-color: #3767e8;
  box-shadow: 0 0 0 3px rgba(55, 103, 232, 0.14);
  outline: none;
}

.order-edit-form {
  display: grid;
  gap: 18px;
}

.order-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.order-edit-grid label {
  display: grid;
  gap: 7px;
}

.order-edit-grid span,
.order-edit-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.order-edit-grid input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #cfe0f7;
  border-radius: 12px;
  background: #fff;
  color: #05275a;
  font-weight: 800;
}

.order-edit-grid input:focus {
  border-color: #3767e8;
  box-shadow: 0 0 0 3px rgba(55, 103, 232, 0.14);
  outline: none;
}

.order-edit-note {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #dce8fa;
  border-radius: 14px;
  background: #f8fbff;
}

.order-edit-note strong {
  color: #08265c;
}

.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 14%, rgba(56, 103, 232, 0.16), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eaf2fc 100%);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(460px, 100%);
  display: grid;
  gap: 22px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-card-wide {
  width: min(620px, 100%);
}

.auth-card h1 {
  margin: 0;
  color: var(--text);
  font-size: 30px;
  line-height: 1.08;
}

.auth-copy,
.auth-warning {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.auth-warning {
  padding: 12px 14px;
  border: 1px solid #f4d39b;
  border-radius: 12px;
  background: #fff8e8;
  color: #8a5600;
}

.auth-form,
.user-form {
  display: grid;
  gap: 14px;
}

.auth-form label,
.user-form label,
.user-create-grid label {
  display: grid;
  gap: 7px;
}

.auth-form span,
.user-form span,
.user-create-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.auth-form input,
.user-form input,
.user-create-grid input,
.user-create-grid select,
.inline-form select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #cfe0f7;
  border-radius: 12px;
  background: #fff;
  color: #05275a;
  font-weight: 800;
}

.auth-form input:focus,
.user-form input:focus,
.user-create-grid input:focus,
.user-create-grid select:focus,
.inline-form select:focus {
  border-color: #3767e8;
  box-shadow: 0 0 0 3px rgba(55, 103, 232, 0.14);
  outline: none;
}

.auth-submit {
  min-height: 44px;
}

.auth-actions {
  margin-top: 4px;
}

.auth-flash {
  margin: 0;
}

.user-create-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.user-action-stack {
  grid-template-columns: repeat(2, minmax(64px, 1fr));
  min-width: 144px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.pickup-modal-wide {
  grid-column: span 3;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 26px 24px;
}

@media (max-width: 760px) {
  .modal-backdrop {
    padding: 14px;
    align-items: start;
  }

  .modal-head,
  .pickup-modal-summary,
  .pickup-modal-grid,
  .modal-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .pickup-modal-summary,
  .pickup-modal-grid,
  .order-edit-grid,
  .user-create-grid {
    grid-template-columns: 1fr;
  }

  .inline-form {
    display: grid;
  }

  .pickup-modal-wide {
    grid-column: auto;
  }

  .modal-actions,
  .form-actions {
    flex-direction: column-reverse;
  }
}

@page {
  size: 1920px 12000px;
  margin: 0;
}

@page team-cost-report {
  size: 1920px 12000px;
  margin: 0;
}

@page monthly-seeding-report {
  size: 1920px 12000px;
  margin: 0;
}

@media print {
  html,
  body {
    width: 100%;
    min-width: 0;
    background: #eef4fb !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .sidebar,
  .topbar,
  .flash-stack,
  .report-pdf-btn,
  .download-target-frame,
  .progress-overlay {
    display: none !important;
  }

  .app-shell {
    display: block;
    min-height: auto;
  }

  .main-area {
    width: 100%;
    min-height: auto;
    padding: 24px;
  }

  .panel,
  .cost-report-hero,
  .cost-report-summary,
  .kpi-command,
  .kpi-scoreboard,
  .kpi-panel,
  .team-detail-card {
    break-inside: avoid;
    box-shadow: none !important;
  }

  .cost-report-panel,
  .cost-report-list,
  .team-detail-stack {
    break-inside: auto;
  }

  .cost-country-row,
  .team-country-item {
    break-inside: avoid;
  }

  body.pdf-export.endpoint-team_shipping_cost_report_page {
    page: team-cost-report;
  }

  body.pdf-export.endpoint-monthly_seeding_items_page {
    page: monthly-seeding-report;
  }
}

.tracking-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #eef4ff;
  font-size: 12px;
  font-weight: 800;
}

.tracking-chip-success {
  background: #eaf8f1;
  color: var(--success);
}

.tracking-chip-danger {
  background: #fff0f0;
  color: var(--danger);
}

.tracking-chip-warning {
  background: #fff7e8;
  color: var(--warning);
}

.tracking-number-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 7px 5px 12px;
  border: 1px solid #bcd2f5;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #edf4ff);
  color: #0d2a5c;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(13, 42, 92, 0.06);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.tracking-number-link:hover {
  border-color: var(--blue);
  box-shadow: 0 12px 24px rgba(56, 103, 232, 0.16);
  transform: translateY(-1px);
}

.tracking-number-link:focus-visible {
  outline: 3px solid rgba(56, 103, 232, 0.20);
  outline-offset: 2px;
}

.tracking-number-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.tracking-number-action {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.order-detail-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #002d6b;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.order-detail-toggle strong {
  text-decoration: underline;
  text-decoration-color: rgba(56, 103, 232, 0.28);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.order-detail-toggle span {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid #cbdcf2;
  border-radius: 999px;
  background: #f3f7ff;
  color: #315481;
  font-size: 11px;
  font-weight: 900;
}

.order-detail-toggle:hover strong,
.order-detail-toggle.is-open strong {
  color: var(--blue);
  text-decoration-color: var(--blue);
}

.order-detail-toggle:focus-visible {
  outline: 3px solid rgba(56, 103, 232, 0.20);
  outline-offset: 3px;
  border-radius: 8px;
}

.order-products-row[hidden] {
  display: none;
}

.order-products-row td {
  padding: 0 12px 14px;
  background: #f8fbff;
}

.order-products-panel {
  margin-top: -1px;
  padding: 14px;
  border: 1px solid #d8e5f7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(13, 42, 92, 0.06);
}

.order-products-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #0d2a5c;
}

.order-products-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.order-products-grid {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(260px, 2fr) minmax(70px, 0.3fr);
  overflow: hidden;
  border: 1px solid #e2eaf6;
  border-radius: 12px;
}

.order-products-grid > div {
  padding: 10px 12px;
  border-bottom: 1px solid #e8eff9;
}

.order-products-grid > div:nth-last-child(-n+3) {
  border-bottom: 0;
}

.order-products-header {
  background: #f1f6ff;
  color: #315481;
  font-size: 12px;
  font-weight: 950;
}

.order-product-code {
  color: #0d2a5c;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.order-product-name {
  color: #002d6b;
  font-weight: 800;
}

.order-product-qty {
  color: #0d2a5c;
  font-weight: 950;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.workbook-actions {
  display: grid;
  gap: 8px;
  width: 188px;
}

.workbook-actions-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #d6e3f5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(13, 42, 92, 0.04);
}

.workbook-actions-row form {
  min-width: 0;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid #d6e3f5;
  background: #fff;
  color: #123965;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}

.workbook-actions-row > *:last-child .action-btn,
.workbook-actions-row > .action-btn:last-child {
  border-right: 0;
}

.action-btn:hover {
  background: #f5f8ff;
}

.action-btn-primary {
  background: linear-gradient(180deg, #456dec, #2854d6);
  color: #fff;
}

.action-btn-danger {
  background: #fff7f7;
  color: #c73636;
}

.workbook-actions-row-wide {
  grid-template-columns: 1fr;
  border-radius: 14px;
}

.workbook-actions-row-wide .action-btn,
.btn-wide {
  width: 100%;
}

.action-btn-erp {
  min-height: 38px;
  border-right: 0;
  background: linear-gradient(180deg, #f7fbff, #eaf2ff);
  color: #143d73;
}

.workbook-table {
  min-width: 1540px;
}

.return-details-table {
  min-width: 1900px;
  table-layout: fixed;
}

.return-details-table th:nth-child(1),
.return-details-table td:nth-child(1) {
  width: 112px;
}

.return-details-table th:nth-child(2),
.return-details-table td:nth-child(2) {
  width: 250px;
}

.return-details-table .order-detail-toggle {
  display: inline-flex;
  flex-wrap: nowrap;
  width: auto;
}

.return-details-table .order-detail-toggle strong {
  white-space: nowrap;
}

.return-details-table th:nth-child(3),
.return-details-table td:nth-child(3) {
  width: 240px;
}

.return-details-table th:nth-child(4),
.return-details-table td:nth-child(4) {
  width: 70px;
}

.return-details-table th:nth-child(5),
.return-details-table td:nth-child(5) {
  width: 150px;
}

.return-details-table th:nth-child(6),
.return-details-table td:nth-child(6) {
  width: 120px;
}

.return-details-table th:nth-child(7),
.return-details-table td:nth-child(7) {
  width: 140px;
}

.return-details-table th:nth-child(8),
.return-details-table td:nth-child(8) {
  width: 120px;
}

.return-details-table th:nth-child(9),
.return-details-table td:nth-child(9) {
  width: 100px;
}

.return-details-table th:nth-child(10),
.return-details-table td:nth-child(10) {
  width: 100px;
}

.return-details-table th:nth-child(11),
.return-details-table td:nth-child(11) {
  width: 84px;
}

.return-details-table th:nth-child(12),
.return-details-table td:nth-child(12) {
  width: 420px;
}

.return-table-wrap {
  padding-left: 0;
  border: 1px solid #dce7f8;
  border-radius: 14px;
}

.return-table-wrap table {
  margin: 0;
}

.return-reason-cell {
  width: 404px;
  color: #24466f;
  font-weight: 800;
  line-height: 1.5;
  white-space: normal;
}

.return-tracking-number-cell {
  color: #b42323;
  font-weight: 900;
}

.return-filter-bar {
  grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
}

.workbook-table .col-actions {
  width: 208px;
}

.workbook-table .col-team {
  width: 178px;
}

.workbook-table .col-outbound {
  width: 322px;
}

.workbook-table .col-file {
  width: 320px;
}

.workbook-table .col-track {
  width: 260px;
}

.workbook-file-name {
  display: block;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-select-form,
.outbound-number-form {
  display: grid;
  gap: 6px;
  min-width: 154px;
}

.outbound-range-fields {
  display: grid;
  grid-template-columns: minmax(124px, 1fr) auto minmax(124px, 1fr);
  align-items: center;
  gap: 7px;
}

.outbound-range-fields span {
  color: #5d7397;
  font-weight: 950;
  text-align: center;
}

.team-select,
.outbound-number-input {
  width: 100%;
  min-height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid #cbdcf2;
  border-radius: 12px;
  background: #fff;
  color: #0d2a5c;
  font-weight: 900;
}

.outbound-number-input {
  min-width: 0;
  padding-right: 12px;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}

.team-select:focus,
.outbound-number-input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(56, 103, 232, 0.14);
}

.inline-save-state {
  min-height: 14px;
  color: #6681aa;
  font-size: 11px;
  font-weight: 900;
}

.inline-save-state.saved {
  color: var(--success);
}

.inline-save-state.error {
  color: var(--danger);
}

.action-btn:disabled {
  cursor: default;
  opacity: 0.72;
}

.map-dashboard-panel,
.service-availability-panel,
.tracking-history-panel {
  overflow: hidden;
}

.country-map-canvas {
  width: 100%;
  height: 560px;
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.map-country-strip,
.service-card-grid,
.service-summary-grid,
.mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.map-country-pill,
.service-result-card,
.mini-stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.service-availability-panel {
  padding: 24px;
}

.service-notice {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #d7e5fb;
  background: #f7fbff;
}

.service-notice strong {
  flex: 0 0 auto;
  color: #0d2a5c;
}

.service-notice span {
  color: #365b8c;
  font-weight: 700;
}

.service-availability-form {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.service-form-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.service-form-section {
  padding: 16px;
  border: 1px solid #d9e6f7;
  border-radius: 16px;
  background: #fbfdff;
}

.service-form-section-wide {
  grid-column: 1 / -1;
}

.service-form-title {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.service-form-title span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0d2a5c;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.service-form-title strong {
  color: #0d2a5c;
  font-size: 18px;
}

.service-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.service-form-grid-compact {
  grid-template-columns: 0.8fr 0.8fr minmax(260px, 1.4fr) 1fr;
}

.service-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.service-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.service-summary-card {
  padding: 16px;
  border: 1px solid #dce7f8;
  border-radius: 16px;
  background: #fff;
}

.service-summary-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 900;
}

.service-summary-card strong {
  color: #0d2a5c;
  font-size: 18px;
}

.service-summary-card-primary {
  background: linear-gradient(135deg, #f5f9ff, #eef5ff);
}

.service-yes {
  color: var(--success) !important;
}

.service-no {
  color: var(--danger) !important;
}

.service-result-section {
  margin-top: 18px;
}

.service-result-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.service-result-header h3 {
  margin: 0;
  font-size: 26px;
}

.service-result-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.service-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-chip-strip {
  margin-bottom: 14px;
}

.service-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #d5e4fb;
  color: #173763;
  font-size: 12px;
  font-weight: 900;
}

.service-chip-soft {
  background: #f5f8ff;
}

.service-chip-accent {
  background: #eefaf4;
  border-color: #bee8cf;
  color: #14774f;
}

.service-chip-muted {
  background: #f4f6fa;
  color: #6b7d98;
}

.service-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dce7f8;
  border-radius: 16px;
  background: #fff;
}

.service-card-highlight {
  border-color: #9fc0ff;
  box-shadow: 0 16px 34px rgba(56, 103, 232, 0.12);
}

.service-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.service-card h4 {
  margin: 0;
  color: #0d2a5c;
  font-size: 18px;
}

.service-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.service-card-meta {
  display: grid;
  gap: 6px;
  color: #365b8c;
  font-weight: 800;
}

.service-rate-panel {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dce7f8;
  border-radius: 12px;
  background: #f7fbff;
}

.service-rate-panel span {
  color: #365b8c;
  font-size: 12px;
  font-weight: 900;
}

.service-rate-panel strong {
  color: #08265c;
  font-size: 18px;
  font-weight: 950;
}

.service-rate-panel em {
  color: #6b7d98;
  font-style: normal;
  font-weight: 800;
}

.service-subsection {
  display: grid;
  gap: 8px;
}

.service-subsection strong {
  color: #0d2a5c;
}

.upload-inline-bar {
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(244,248,255,0.98));
}

.upload-inline-copy {
  display: grid;
  gap: 6px;
}

.upload-inline-copy strong {
  color: #0d2a5c;
  font-size: 18px;
}

.upload-inline-copy span {
  color: #4f6f9e;
  font-weight: 800;
  line-height: 1.45;
}

.upload-inline-actions {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.upload-inline-input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.upload-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #c9d9ef;
  background: #fff;
  color: #0d2a5c;
  font-weight: 900;
  cursor: pointer;
}

.upload-picker:hover {
  border-color: var(--blue);
  background: #f7fbff;
}

.upload-inline-filename {
  display: flex;
  align-items: center;
  min-height: 42px;
  min-width: 0;
  padding: 0 14px;
  overflow: hidden;
  border: 1px dashed #c7d8ef;
  border-radius: 12px;
  background: #fbfdff;
  color: #365b8c;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.processing-upload {
  grid-template-columns: minmax(300px, 0.5fr) minmax(540px, 1fr);
  padding: 20px 22px;
  border-radius: 14px;
}

.processing-upload .upload-inline-copy {
  max-width: 620px;
}

.processing-upload .upload-inline-copy strong {
  font-size: 16px;
}

.processing-upload .upload-inline-copy span {
  color: #315481;
  font-size: 13px;
}

.processing-upload .upload-inline-actions {
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 8px;
  justify-self: stretch;
}

.processing-upload-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.processing-upload-buttons .btn {
  min-height: 42px;
}

.map-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(151, 172, 207, 0.55);
  border-radius: 20px;
  background: linear-gradient(145deg, #e8eef5, #f8fbff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 22px 52px rgba(8, 29, 67, 0.12);
}

.map-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 401;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 20%, transparent 74%, rgba(6, 24, 57, 0.08)),
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.42), transparent 26%);
}

.map-dashboard-panel {
  border-color: rgba(173, 190, 220, 0.82);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
  box-shadow: 0 26px 70px rgba(8, 29, 67, 0.11);
}

.map-dashboard-panel > .panel-header {
  align-items: center;
  margin-bottom: 20px;
}

.map-dashboard-panel .section-label {
  color: #315f9c;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-dashboard-panel .panel-header h3 {
  color: #061f49;
  font-size: 30px;
  letter-spacing: 0;
}

.map-dashboard-panel .panel-copy {
  max-width: 760px;
  margin-bottom: 0;
  line-height: 1.65;
}

.map-dashboard-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.map-dashboard-meta .status-pill {
  min-height: 34px;
  border-color: rgba(151, 172, 207, 0.72);
  box-shadow: 0 8px 20px rgba(8, 29, 67, 0.06);
}

.map-dashboard-meta .status-pill.active {
  background: linear-gradient(135deg, #08265c, #3867e8);
  border-color: transparent;
}

.country-map-canvas .leaflet-control-zoom a {
  color: #092858;
  font-weight: 900;
}

.country-map-canvas {
  border: 0;
  border-radius: 20px;
  background: #dfe8f1;
}

.country-map-canvas .leaflet-tile {
  filter: saturate(0.86) contrast(0.98) brightness(1.02);
}

.country-map-canvas .leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(13, 42, 92, 0.16);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(8, 29, 67, 0.12);
}

.country-map-canvas .leaflet-control-zoom a {
  width: 32px;
  height: 32px;
  border: 0;
  color: #08265c;
  background: rgba(255, 255, 255, 0.94);
  line-height: 32px;
}

.country-map-canvas .leaflet-control-attribution {
  border-top-left-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #61718a;
  font-size: 10px;
}

.country-label-marker {
  background: transparent;
  border: 0;
}

.country-label-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  max-width: 158px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(239, 245, 255, 0.94));
  color: #08265c;
  box-shadow:
    0 14px 28px rgba(6, 24, 57, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  transform: scale(var(--marker-scale, 1));
  transform-origin: center;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.country-label-chip-hot {
  background: linear-gradient(135deg, #061f49, #0d2a5c 58%, #254f9a);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow:
    0 16px 34px rgba(6, 24, 57, 0.26),
    0 0 0 4px rgba(56, 103, 232, 0.10);
}

.country-label-name {
  overflow: hidden;
  max-width: 112px;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 900;
}

.country-label-count {
  color: #3867e8;
  font-size: 12px;
}

.country-label-chip-hot .country-label-count {
  color: #ffffff;
}

.map-country-strip {
  margin-top: 16px;
}

.map-country-pill {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 54px;
  padding: 0 16px 0 18px;
  overflow: hidden;
  border-color: rgba(179, 198, 229, 0.92);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  box-shadow: 0 12px 26px rgba(10, 31, 69, 0.06);
}

.map-country-pill::before {
  content: "";
  width: 7px;
  height: 28px;
  margin-right: 12px;
  border-radius: 999px;
  background: #d7e3f5;
}

.map-country-pill strong {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-country-pill span {
  flex: 0 0 auto;
  color: #163d78;
  font-weight: 900;
}

.map-country-pill-hot {
  border-color: rgba(115, 149, 216, 0.7);
  background:
    linear-gradient(180deg, #f9fbff, #edf4ff);
  box-shadow: 0 16px 34px rgba(56, 103, 232, 0.12);
}

.map-country-pill-hot::before {
  background: linear-gradient(180deg, #3867e8, #08265c);
}

.workbook-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 20px;
  align-items: stretch;
  padding: 24px;
}

.workbook-hero-main {
  display: grid;
  align-content: center;
  gap: 12px;
}

.file-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.file-title-row h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.hero-status {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #d7e4f7;
  background: linear-gradient(135deg, #f7fbff, #eef5ff);
}

.hero-status p {
  margin: 0;
  color: #365b8c;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.progress-panel {
  padding: 24px;
}

.progress-side-copy {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 120px;
  color: #0d2a5c;
}

.progress-side-copy strong {
  font-size: 22px;
}

.progress-side-copy span {
  color: var(--blue);
  font-weight: 900;
}

.progress-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eff8;
  box-shadow: inset 0 1px 2px rgba(8, 28, 62, 0.12);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3867e8, #22a06b);
  transition: width 0.25s ease;
}

.progress-fill-running {
  min-width: 42px;
  background: linear-gradient(90deg, #3867e8, #8aa8ff, #3867e8);
  background-size: 180% 100%;
  animation: progressPulse 1.2s linear infinite;
}

@keyframes progressPulse {
  from { background-position: 0 0; }
  to { background-position: 180% 0; }
}

.progress-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.progress-meta-card {
  min-height: 74px;
  padding: 14px;
  border: 1px solid #dce7f8;
  border-radius: 14px;
  background: #fff;
}

.progress-meta-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 900;
}

.progress-meta-card strong {
  color: #0d2a5c;
  font-size: 18px;
  line-height: 1.35;
}

#progress-message {
  display: block;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.compact-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.compact-summary .metric-card {
  min-height: 96px;
  box-shadow: 0 14px 32px rgba(10, 31, 69, 0.06);
}

.action-toolbar {
  padding: 22px;
  border-color: #cdddf3;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(245,249,255,0.98));
}

.toolbar-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.25fr) minmax(220px, 0.75fr) minmax(420px, 1.45fr) minmax(180px, 0.62fr);
  gap: 14px;
  align-items: stretch;
}

.toolbar-group {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #d7e4f7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(10, 31, 69, 0.05);
}

.toolbar-group-primary {
  border-color: rgba(56, 103, 232, 0.28);
  background: linear-gradient(180deg, #ffffff, #f5f8ff);
}

.toolbar-group-danger {
  border-color: #f1c7c7;
  background: linear-gradient(180deg, #ffffff, #fff7f7);
}

.toolbar-group-head {
  display: grid;
  gap: 3px;
}

.toolbar-group-head strong {
  color: #08265c;
  font-size: 15px;
  font-weight: 950;
}

.toolbar-group-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.toolbar-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
}

.toolbar-actions-main {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.toolbar-actions form {
  min-width: 0;
  margin: 0;
}

.btn-toolbar {
  width: 100%;
  min-height: 42px;
  border-color: #cbdcf2;
  box-shadow: 0 8px 18px rgba(10, 31, 69, 0.04);
  white-space: normal;
  line-height: 1.25;
}

.btn-toolbar-main {
  min-width: 0;
  min-height: 50px;
  font-size: 15px;
}

.download-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #d2eadb;
  border-radius: 12px;
  background: #f0fbf5;
  color: #115c3b;
}

.download-note strong {
  flex: 0 0 auto;
}

#erp-status-copy {
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0.72fr;
  gap: 18px;
  align-items: stretch;
}

.mini-stat-grid.wide {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mini-stat {
  min-height: 64px;
}

.mini-stat span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-weight: 900;
}

.mini-stat strong {
  color: #0d2a5c;
  font-size: 22px;
}

.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.plain-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.table-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(180px, 0.8fr) minmax(180px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #d9e6f7;
  border-radius: 16px;
  background: #fbfdff;
}

.order-filter-bar {
  grid-template-columns: minmax(210px, 1.1fr) minmax(190px, 1fr) repeat(3, minmax(150px, 0.8fr)) auto;
}

.table-filter-field {
  display: grid;
  gap: 7px;
}

.table-filter-field label {
  color: #4169a6;
  font-size: 12px;
  font-weight: 900;
}

.table-filter-actions {
  display: flex;
  gap: 8px;
}

.tracking-history-panel {
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tracking-history-panel > .panel-header {
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid #d8e5f6;
  border-radius: 22px;
  background:
    linear-gradient(135deg, #08265c 0%, #16448e 54%, #3867e8 100%);
  box-shadow: 0 22px 48px rgba(8, 38, 92, 0.18);
}

.tracking-history-panel > .panel-header .section-label,
.tracking-history-panel > .panel-header h3,
.tracking-history-panel > .panel-header .panel-copy {
  color: #fff;
}

.tracking-history-panel > .panel-header .panel-copy {
  opacity: 0.82;
}

.tracking-search-bar {
  grid-template-columns: minmax(280px, 1fr) auto;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.tracking-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.tracking-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 18px;
  border: 1px solid #dbe7f7;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 32px rgba(10, 31, 69, 0.06);
}

.tracking-overview-card::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -48px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(56, 103, 232, 0.07);
}

.tracking-overview-card span {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 900;
}

.tracking-overview-card strong {
  position: relative;
  z-index: 1;
  color: #0d2a5c;
  font-size: 20px;
  line-height: 1.35;
}

.tracking-overview-card-primary {
  background: linear-gradient(135deg, #0d2a5c, #244d9b);
}

.tracking-overview-card-primary span,
.tracking-overview-card-primary strong {
  color: #fff;
}

.tracking-status-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tracking-status-hero-shape {
  width: 10px;
  height: 10px;
  margin: 0;
  border-radius: 50%;
  background: var(--blue);
}

.tracking-status-hero-success .tracking-status-hero-shape,
.tracking-stage-step-success .tracking-stage-icon,
.tracking-event-dot-success {
  background: var(--success);
}

.tracking-status-hero-danger .tracking-status-hero-shape,
.tracking-stage-step-danger .tracking-stage-icon,
.tracking-event-dot-danger {
  background: var(--danger);
}

.tracking-status-hero-warning .tracking-status-hero-shape,
.tracking-stage-step-warning .tracking-stage-icon,
.tracking-event-dot-warning {
  background: var(--warning);
}

.tracking-stage-band {
  display: grid;
  grid-template-columns: 1fr 80px 1fr 80px 1fr;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #d9e6f7;
  box-shadow: var(--shadow);
}

.tracking-stage-step {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  color: #0d2a5c;
  font-weight: 900;
}

.tracking-stage-icon {
  display: inline-grid;
  place-items: center;
  min-width: 56px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #dce8f8;
  color: #0d2a5c;
  font-size: 12px;
}

.tracking-stage-step-done .tracking-stage-icon {
  background: #0d2a5c;
  color: #fff;
}

.tracking-stage-line {
  height: 2px;
  background: linear-gradient(90deg, #b9cbe4, #e0e9f6);
}

.tracking-timeline-panel {
  margin: 20px 0 0;
  padding: 24px;
  box-shadow: var(--shadow);
}

.tracking-timeline {
  display: grid;
  gap: 12px;
}

.tracking-event-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border: 1px solid #dce7f8;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #fff, #fbfdff);
  box-shadow: 0 12px 28px rgba(10, 31, 69, 0.05);
}

.tracking-event-rail {
  position: relative;
  display: grid;
  justify-items: center;
}

.tracking-event-rail::after {
  content: "";
  position: absolute;
  top: 24px;
  bottom: -26px;
  width: 2px;
  background: #dce7f8;
}

.tracking-event-card:last-child .tracking-event-rail::after {
  display: none;
}

.tracking-event-dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px #edf4ff;
}

.tracking-event-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.tracking-event-topline strong {
  color: #0d2a5c;
  font-size: 17px;
}

.tracking-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: #4e6f9d;
  font-size: 12px;
  font-weight: 900;
}

.tracking-event-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #173763;
}

.tracking-event-date {
  flex: 0 0 auto;
  color: #57769d;
  font-weight: 900;
}

.tracking-event-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7e8;
  color: #7a4b00;
  font-weight: 800;
}

.progress-overlay[hidden] {
  display: none;
}

.progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(8, 26, 58, 0.48);
}

.progress-overlay-card {
  width: min(420px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
}

.download-target-frame {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.kpi-command {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid rgba(178, 194, 224, 0.85);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(239,246,255,0.94));
  box-shadow: var(--shadow);
}

.kpi-command h3 {
  margin: 0;
  font-size: 30px;
}

.kpi-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  min-width: 340px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
  border: 1px solid #d8e4f7;
}

.kpi-scoreboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-score-card {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid #d8e4f7;
  background: #fff;
  box-shadow: var(--shadow);
}

.kpi-score-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -46px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: rgba(56,103,232,0.09);
}

.kpi-score-card span,
.kpi-score-card strong,
.kpi-score-card em {
  position: relative;
  z-index: 1;
  display: block;
}

.kpi-score-card span {
  color: var(--muted);
  font-weight: 900;
}

.kpi-score-card strong {
  margin-top: 12px;
  color: #08265c;
  font-size: 34px;
  line-height: 1;
}

.kpi-score-card em {
  margin-top: 12px;
  color: #506b9a;
  font-style: normal;
  font-weight: 900;
}

.kpi-score-card.success::after {
  background: rgba(21,131,91,0.12);
}

.kpi-score-card.danger::after {
  background: rgba(227,52,52,0.13);
}

.kpi-score-card.danger em,
.risk-chip {
  color: var(--danger);
}

.kpi-insight-grid {
  display: grid;
  grid-template-columns: 0.95fr 1fr 1.25fr;
  gap: 18px;
  margin-bottom: 18px;
}

.kpi-panel {
  border-radius: 20px;
}

.kpi-mini-ledger {
  display: grid;
  gap: 10px;
}

.kpi-mini-ledger div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7faff;
  border: 1px solid #dce7f8;
}

.kpi-mini-ledger span {
  color: var(--muted);
  font-weight: 900;
}

.kpi-mini-ledger strong,
.kpi-mini-ledger em {
  color: #08265c;
  font-style: normal;
  font-weight: 900;
}

.kpi-table {
  width: 100%;
  min-width: 760px;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  color: #10213f;
  background: #fff;
}

.kpi-table th,
.kpi-table td {
  height: 39px;
  padding: 11px 12px;
  border-bottom: 1px solid #e2eaf6;
  vertical-align: middle;
  font-size: 14px;
}

.kpi-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #0d2a5c;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.kpi-table th.align-right {
  text-align: right;
}

.kpi-table th.align-center {
  text-align: center;
}

.kpi-table th:first-child {
  border-top-left-radius: 10px;
}

.kpi-table th:last-child {
  border-top-right-radius: 10px;
}

.kpi-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.kpi-table tbody tr:hover {
  background: #f2f7ff;
}

.kpi-total-row td {
  background: #edf3ff;
  color: #08265c;
  font-weight: 900;
}

.rate-chip,
.risk-chip {
  display: inline-flex;
  justify-content: flex-end;
  min-width: 72px;
  font-weight: 900;
}

.rate-chip {
  color: var(--success);
}

.kpi-type-list,
.kpi-status-cloud {
  display: grid;
  gap: 10px;
}

.kpi-type-row,
.kpi-status-pill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dce7f8;
  border-radius: 14px;
  background: #fff;
}

.kpi-type-row span,
.kpi-status-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.kpi-type-row strong,
.kpi-status-pill strong,
.kpi-type-row em,
.kpi-status-pill em {
  font-style: normal;
  font-weight: 900;
}

.kpi-type-row em,
.kpi-status-pill em {
  color: var(--danger);
}

.kpi-status-pill.tone-success {
  border-color: #bfe7ce;
  background: #f4fcf8;
}

.kpi-status-pill.tone-info {
  border-color: #bdd4ff;
  background: #f4f8ff;
}

.kpi-status-pill.tone-warning {
  border-color: #f1d39a;
  background: #fffaf0;
}

.kpi-status-pill.tone-danger {
  border-color: #f0c2c2;
  background: #fff6f6;
}

.kpi-inline-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kpi-inline-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f4f8ff;
  border: 1px solid #dbe7fb;
  color: #173763;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.kpi-headline,
.kpi-basis-date {
  align-self: center;
  white-space: nowrap;
  font-weight: 900;
}

.kpi-headline {
  color: #08265c;
  font-size: 18px;
}

.kpi-basis-date {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f4f8ff;
  color: #37547f;
}

.kpi-region-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.kpi-region-grid > .kpi-panel {
  display: flex;
  flex-direction: column;
  min-height: 350px;
}

.kpi-region-grid > .kpi-panel > .table-wrap {
  flex: 1;
}

.kpi-region-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.kpi-region-table th:nth-child(1),
.kpi-region-table td:nth-child(1) {
  width: 36%;
}

.kpi-region-table th:nth-child(2),
.kpi-region-table td:nth-child(2),
.kpi-region-table th:nth-child(3),
.kpi-region-table td:nth-child(3),
.kpi-region-table th:nth-child(4),
.kpi-region-table td:nth-child(4) {
  width: 21.333%;
}

.kpi-risk-table {
  min-width: 900px;
  table-layout: fixed;
}

.kpi-risk-table th:nth-child(1),
.kpi-risk-table td:nth-child(1) {
  width: 16%;
}

.kpi-risk-table th:nth-child(2),
.kpi-risk-table td:nth-child(2),
.kpi-risk-table th:nth-child(3),
.kpi-risk-table td:nth-child(3),
.kpi-risk-table th:nth-child(4),
.kpi-risk-table td:nth-child(4) {
  width: 14%;
}

.kpi-risk-table th:nth-child(5),
.kpi-risk-table td:nth-child(5) {
  width: 42%;
}

.kpi-ai-report {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(244,248,255,0.98)),
    #fff;
  border-color: #cddcf2;
}

.kpi-ai-hero {
  display: grid;
  grid-template-columns: 1.05fr repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpi-ai-verdict,
.kpi-ai-metric-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #d6e4f7;
  background: #fff;
}

.kpi-ai-verdict::after,
.kpi-ai-metric-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -48px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: rgba(56, 103, 232, 0.09);
}

.kpi-ai-verdict-danger {
  color: #fff;
  border-color: #d92d20;
  background: linear-gradient(135deg, #b42318, #e5484d);
}

.kpi-ai-verdict-warning {
  border-color: #f1c26b;
  background: linear-gradient(135deg, #fff8e8, #ffebb8);
}

.kpi-ai-verdict-success {
  border-color: #9edbbd;
  background: linear-gradient(135deg, #eefbf4, #d8f5e6);
}

.kpi-ai-verdict span,
.kpi-ai-metric-card span,
.kpi-ai-verdict strong,
.kpi-ai-metric-card strong,
.kpi-ai-verdict em,
.kpi-ai-metric-card em {
  position: relative;
  z-index: 1;
  display: block;
}

.kpi-ai-verdict span,
.kpi-ai-metric-card span {
  color: inherit;
  opacity: 0.78;
  font-weight: 900;
}

.kpi-ai-verdict strong,
.kpi-ai-metric-card strong {
  margin-top: 12px;
  color: inherit;
  font-size: 34px;
  line-height: 1;
}

.kpi-ai-metric-card strong {
  color: #08265c;
}

.kpi-ai-verdict em,
.kpi-ai-metric-card em {
  margin-top: 12px;
  color: inherit;
  opacity: 0.82;
  font-style: normal;
  font-weight: 900;
  line-height: 1.35;
}

.kpi-ai-metric-card.danger strong,
.kpi-ai-metric-card.danger em {
  color: var(--danger);
}

.kpi-ai-metric-card.priority {
  border-color: #bfd4ff;
  background: #f7faff;
}

.kpi-ai-report-grid {
  display: grid;
  grid-template-columns: 1.18fr 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.kpi-ai-highlight-box,
.kpi-ai-column {
  min-height: 100%;
  padding: 18px;
  border: 1px solid #dce7f8;
  border-radius: 16px;
  background: #fff;
}

.kpi-ai-highlight-box {
  display: grid;
  align-content: start;
  gap: 12px;
  border-left: 6px solid #ffd84d;
  background: linear-gradient(180deg, #fffdf2, #fff);
}

.kpi-ai-highlight-box h4,
.kpi-ai-column h4 {
  margin: 0 0 8px;
  color: #08265c;
  font-size: 18px;
}

.kpi-ai-highlight-box p {
  margin: 0;
  color: #102a56;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.65;
}

.kpi-ai-highlight-box mark {
  padding: 2px 5px;
  border-radius: 5px;
  background:
    linear-gradient(180deg, transparent 38%, rgba(255, 226, 79, 0.85) 38%);
  color: inherit;
}

.kpi-ai-column {
  border-top: 4px solid #3867e8;
}

.kpi-ai-column:last-child {
  border-top-color: #23a26d;
}

.kpi-ai-column ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kpi-ai-column li {
  position: relative;
  padding: 11px 12px 11px 34px;
  border-radius: 12px;
  background: #f6f9ff;
  color: #24466f;
  font-weight: 800;
  line-height: 1.55;
}

.kpi-ai-column li::before {
  content: "!";
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3867e8;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.kpi-ai-column:last-child li::before {
  content: "✓";
  background: #23a26d;
}

.cost-report-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 26px;
  border: 1px solid rgba(182, 198, 226, 0.86);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(241,247,255,0.96));
  box-shadow: 0 22px 48px rgba(10, 31, 69, 0.09);
}

.cost-report-hero h3 {
  margin: 0;
  color: #071d43;
  font-size: 30px;
  line-height: 1.12;
}

.cost-report-filter {
  flex: 0 0 auto;
}

.cost-report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid #d8e4f7;
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 12px 28px rgba(10, 31, 69, 0.05);
}

.cost-report-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  color: #173763;
  font-size: 13px;
  font-weight: 900;
}

.cost-report-tabs a:hover {
  background: #edf4ff;
  color: #0d2a5c;
}

.cost-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.cost-summary-card {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  padding: 20px;
  border: 1px solid #d8e4f7;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow);
}

.cost-summary-card::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -48px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: rgba(21, 131, 91, 0.10);
}

.cost-summary-card.primary {
  background: linear-gradient(135deg, #08265c 0%, #16448e 58%, #3867e8 100%);
}

.cost-summary-card.primary::after {
  background: rgba(255,255,255,0.14);
}

.cost-summary-card span,
.cost-summary-card strong,
.cost-summary-card em {
  position: relative;
  z-index: 1;
  display: block;
}

.cost-summary-card span {
  color: var(--muted);
  font-weight: 900;
}

.cost-summary-card strong {
  margin-top: 12px;
  color: #08265c;
  font-size: 28px;
  line-height: 1.08;
}

.cost-summary-card em {
  margin-top: 10px;
  color: #55729d;
  font-style: normal;
  font-weight: 900;
}

.cost-summary-card.primary span,
.cost-summary-card.primary strong,
.cost-summary-card.primary em {
  color: #fff;
}

.cost-summary-card.muted-card::after {
  background: rgba(56, 103, 232, 0.09);
}

.cost-report-panel {
  padding: 0;
  overflow: hidden;
}

.cost-report-panel > .panel-header {
  margin: 0;
  padding: 22px;
  border-bottom: 1px solid #dce7f8;
  background: #fbfdff;
}

.cost-report-list {
  display: grid;
}

.team-cost-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 22px;
}

.team-cost-card {
  display: grid;
  gap: 16px;
  min-height: 190px;
  padding: 18px;
  border: 1px solid #dbe7f7;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 12px 28px rgba(10, 31, 69, 0.06);
}

.team-cost-topline,
.team-cost-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.team-cost-topline span,
.team-cost-meta,
.team-cost-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.team-cost-topline strong {
  display: block;
  margin-top: 5px;
  color: #071d43;
  font-size: 18px;
  line-height: 1.25;
}

.team-cost-topline em {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf4ff;
  color: #0d2a5c;
  font-style: normal;
  font-weight: 900;
}

.team-cost-total strong {
  display: block;
  color: #08265c;
  font-size: 26px;
  line-height: 1.05;
}

.team-cost-total span {
  display: block;
  margin-top: 8px;
  color: var(--success);
}

.team-cost-meta {
  align-items: center;
  flex-wrap: wrap;
}

.team-detail-stack {
  display: grid;
  gap: 18px;
}

.team-detail-card {
  overflow: hidden;
  border: 1px solid #d8e4f7;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.team-detail-header {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border-bottom: 1px solid #dce7f8;
  background:
    linear-gradient(135deg, #fbfdff, #f4f8ff);
}

.team-detail-header h3 {
  margin: 0;
  color: #071d43;
  font-size: 26px;
}

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

.team-detail-metrics div {
  min-height: 92px;
  padding: 14px;
  border: 1px solid #dce7f8;
  border-radius: 16px;
  background: #fff;
}

.team-detail-metrics span,
.team-country-money span,
.team-country-name span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.team-detail-metrics strong,
.team-detail-metrics em {
  display: block;
  font-style: normal;
  font-weight: 900;
}

.team-detail-metrics strong {
  margin-top: 8px;
  color: #08265c;
  font-size: 20px;
  line-height: 1.15;
}

.team-detail-metrics em {
  margin-top: 6px;
  color: var(--success);
}

.team-country-list {
  display: grid;
}

.team-country-item {
  display: grid;
  grid-template-columns: minmax(170px, 0.55fr) minmax(180px, 1fr) minmax(150px, 0.42fr) minmax(150px, 0.42fr);
  gap: 16px;
  align-items: center;
  min-height: 78px;
  padding: 14px 22px;
  border-bottom: 1px solid #e2eaf6;
}

.team-country-item:nth-child(even) {
  background: #fbfdff;
}

.team-country-item:hover {
  background: #f3f8ff;
}

body.pdf-export.endpoint-team_shipping_cost_report_page {
  width: 1920px;
  background: #eef4fb;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .main-area {
  padding: 18px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .cost-report-hero {
  min-height: 118px;
  padding: 18px 22px;
  margin-bottom: 12px;
  border-radius: 16px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .cost-report-hero h3 {
  font-size: 30px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .panel-copy,
body.pdf-export.endpoint-team_shipping_cost_report_page .section-label,
body.pdf-export.endpoint-team_shipping_cost_report_page .kpi-basis-date {
  font-size: 11px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .cost-report-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .cost-summary-card {
  min-height: 92px;
  padding: 14px 16px;
  border-radius: 14px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .cost-summary-card strong {
  font-size: 22px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .cost-summary-card em {
  margin-top: 5px;
  font-size: 11px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .cost-report-panel > .panel-header {
  padding: 12px 16px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .cost-report-panel > .panel-header h3,
body.pdf-export.endpoint-team_shipping_cost_report_page .team-detail-header h3 {
  font-size: 20px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-cost-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-cost-card {
  gap: 8px;
  min-height: 112px;
  padding: 12px;
  border-radius: 12px;
  box-shadow: none;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-cost-topline strong {
  margin-top: 3px;
  font-size: 14px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-cost-topline em {
  min-height: 22px;
  padding: 4px 8px;
  font-size: 11px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-cost-total strong {
  font-size: 18px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-cost-total span,
body.pdf-export.endpoint-team_shipping_cost_report_page .team-cost-meta,
body.pdf-export.endpoint-team_shipping_cost_report_page .team-cost-topline span {
  font-size: 10px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-detail-stack {
  gap: 10px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-detail-card {
  border-radius: 14px;
  box-shadow: none;
  break-inside: auto;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-detail-header {
  grid-template-columns: minmax(170px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-detail-metrics {
  gap: 8px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-detail-metrics div {
  min-height: 62px;
  padding: 8px 10px;
  border-radius: 10px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-detail-metrics span,
body.pdf-export.endpoint-team_shipping_cost_report_page .team-country-money span,
body.pdf-export.endpoint-team_shipping_cost_report_page .team-country-name span {
  font-size: 10px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-detail-metrics strong {
  margin-top: 4px;
  font-size: 14px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-detail-metrics em {
  margin-top: 3px;
  font-size: 10px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-country-item {
  grid-template-columns: minmax(140px, 0.55fr) minmax(160px, 1fr) minmax(120px, 0.36fr) minmax(120px, 0.36fr);
  gap: 10px;
  min-height: 42px;
  padding: 7px 14px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-country-name strong,
body.pdf-export.endpoint-team_shipping_cost_report_page .team-country-money strong {
  font-size: 12px;
}

body.pdf-export.endpoint-team_shipping_cost_report_page .team-country-money em {
  font-size: 10px;
}

body.pdf-export.endpoint-monthly_seeding_items_page {
  width: 1920px;
}

body.pdf-export.endpoint-monthly_seeding_items_page .main-area {
  padding: 18px;
}

body.pdf-export.endpoint-monthly_seeding_items_page .cost-report-hero {
  min-height: 110px;
  padding: 16px 22px;
  margin-bottom: 10px;
  border-radius: 16px;
}

body.pdf-export.endpoint-monthly_seeding_items_page .cost-report-hero h3 {
  font-size: 30px;
}

body.pdf-export.endpoint-monthly_seeding_items_page .cost-report-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

body.pdf-export.endpoint-monthly_seeding_items_page .cost-summary-card {
  min-height: 84px;
  padding: 12px 14px;
  border-radius: 14px;
}

body.pdf-export.endpoint-monthly_seeding_items_page .cost-summary-card strong {
  font-size: 22px;
}

body.pdf-export.endpoint-monthly_seeding_items_page .cost-report-panel {
  margin-bottom: 10px;
}

body.pdf-export.endpoint-monthly_seeding_items_page .cost-report-panel > .panel-header {
  padding: 10px 14px;
}

body.pdf-export.endpoint-monthly_seeding_items_page .cost-report-panel > .panel-header h3 {
  font-size: 20px;
}

body.pdf-export.endpoint-monthly_seeding_items_page .workbook-table th,
body.pdf-export.endpoint-monthly_seeding_items_page .workbook-table td {
  padding: 6px 12px;
  font-size: 11px;
  line-height: 1.2;
}

body.pdf-export.endpoint-monthly_seeding_items_page .workbook-table td {
  height: 22px;
}

body.pdf-export.endpoint-monthly_seeding_items_page .cost-bar-track {
  height: 4px;
}

.team-country-name {
  display: grid;
  gap: 5px;
}

.team-country-name strong {
  color: #071d43;
  font-size: 16px;
}

.team-country-money {
  display: grid;
  gap: 5px;
  justify-items: end;
  text-align: right;
}

.team-country-money strong,
.team-country-money em {
  font-style: normal;
  font-weight: 900;
}

.team-country-money strong {
  color: #08265c;
}

.team-country-money em {
  color: var(--success);
  font-size: 13px;
}

.cost-detail-table {
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
}

.cost-detail-table th {
  background: #0d2a5c;
  color: #fff;
}

.cost-detail-table td {
  background: #fff;
}

.cost-detail-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.cost-country-title.compact {
  gap: 8px;
}

.cost-country-title.compact strong {
  font-size: 15px;
}

.cost-country-row {
  display: grid;
  grid-template-columns: 54px minmax(260px, 1fr) minmax(150px, 0.42fr) minmax(150px, 0.42fr);
  gap: 16px;
  align-items: center;
  min-height: 82px;
  padding: 16px 22px;
  border-bottom: 1px solid #e2eaf6;
  background: #fff;
}

.cost-country-row:nth-child(even) {
  background: #fbfdff;
}

.cost-country-row:hover {
  background: #f3f8ff;
}

.cost-country-rank {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #edf4ff;
  color: #0d2a5c;
  font-weight: 900;
}

.cost-country-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.cost-country-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
}

.cost-country-title strong {
  color: #071d43;
  font-size: 17px;
}

.cost-country-title span,
.cost-value span,
.cost-value em {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.cost-value em {
  font-style: normal;
  line-height: 1.35;
}

.cost-bar-track {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #edf3fb;
}

.cost-bar-track.detail {
  height: 6px;
  margin-top: 8px;
}

.cost-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #23a26d, #3867e8);
}

.cost-value {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.cost-value strong {
  color: #08265c;
  font-size: 18px;
  line-height: 1.2;
}

.cost-value.krw strong {
  color: #15835b;
}

@media (max-width: 1200px) {
  .summary-grid,
  .kpi-scoreboard,
  .cost-report-summary,
  .processing-summary-grid,
  .team-cost-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-command,
  .cost-report-hero,
  .kpi-insight-grid,
  .kpi-region-grid,
  .kpi-ai-hero,
  .kpi-ai-report-grid,
  .toolbar-layout,
  .tracking-overview-grid,
  .tracking-stage-band,
  .ai-error-columns,
  .service-form-layout,
  .service-form-grid,
  .service-form-grid-compact,
  .inventory-summary-grid,
  .inventory-results-grid,
  .inventory-lookup-grid,
  .checkbox-grid,
  .upload-inline-bar,
  .upload-inline-actions,
  .workbook-command-bar,
  .filter-bar,
  .table-filter-bar {
    grid-template-columns: 1fr;
  }

  .inventory-lookup-grid .span-2 {
    grid-column: span 1;
  }

  .processing-detail-command {
    grid-template-columns: 1fr;
  }

  .processing-detail-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .processing-detail-controls .btn {
    grid-column: 1 / -1;
  }

  .processing-table-command,
  .processing-edit-toolbar {
    grid-template-columns: 1fr;
  }

  .processing-toolbar-section,
  .processing-toolbar-section-wide {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .processing-upload .upload-inline-actions {
    grid-template-columns: auto minmax(220px, 1fr);
  }

  .processing-upload-buttons {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .workbook-command-bar {
    justify-content: stretch;
  }

  .workbook-command-group,
  .workbook-command-group-main {
    width: 100%;
    margin-left: 0;
  }

  .workbook-command-group .btn,
  .workbook-command-group form,
  .workbook-command-group-main .btn {
    width: 100%;
  }

  .workbook-filter-bar .filter-actions {
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workbook-filter-bar .filter-field:nth-of-type(n) {
    grid-column: auto;
    grid-row: auto;
  }

  .workbook-command-divider,
  .workbook-command-label {
    display: none;
  }

  .kpi-command {
    align-items: stretch;
    flex-direction: column;
  }

  .cost-report-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .cost-country-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .team-detail-header,
  .team-detail-metrics,
  .team-country-item {
    grid-template-columns: 1fr;
  }

  .cost-value {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }

  .team-country-money {
    justify-items: start;
    text-align: left;
  }

  .card-grid,
  .map-country-strip,
  .service-card-grid,
  .service-summary-grid,
  .mini-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .main-area {
    padding: 16px;
  }

  .topbar,
  .panel-header {
    flex-direction: column;
  }

  .topbar h2 {
    font-size: 34px;
  }

  .summary-grid,
  .kpi-scoreboard,
  .cost-report-summary,
  .processing-summary-grid,
  .team-cost-grid,
  .card-grid,
  .map-country-strip,
  .service-card-grid,
  .service-summary-grid,
  .mini-stat-grid {
    grid-template-columns: 1fr;
  }

  .kpi-filter-bar {
    min-width: 0;
  }

  .country-map-canvas {
    height: 420px;
  }

  .processing-detail-facts,
  .processing-detail-controls,
  .processing-editor-layout,
  .processing-table-command,
  .processing-edit-toolbar,
  .processing-toolbar-section,
  .processing-toolbar-section-wide {
    grid-template-columns: 1fr;
  }

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

  .processing-panel-grid,
  .processing-panel-grid .span-2 {
    grid-template-columns: 1fr;
    grid-column: span 1;
  }
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page {
  width: 1920px;
  background: #eef4fb;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .main-area,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .main-area {
  padding: 18px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-month-board,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-month-board,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-report-actions,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-report-actions,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-alert form,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-alert form {
  display: none !important;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-main,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-main {
  gap: 10px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .panel,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .panel,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-verdict,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-verdict,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-metric,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-metric {
  box-shadow: none;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-summary,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-summary {
  grid-template-columns: 1.05fr repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-highlight-grid,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-highlight-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-visual-grid,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-visual-grid,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-grid,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-verdict,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-verdict,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-metric,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-metric {
  min-height: 92px;
  padding: 12px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-verdict strong,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-verdict strong,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-metric strong,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-metric strong {
  margin-top: 7px;
  font-size: 22px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-highlight-card,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-highlight-card {
  min-height: 76px;
  padding: 10px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-report,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-report,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-visual-card,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-visual-card,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-trend-panel,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-trend-panel {
  padding: 12px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .panel-header,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .panel-header {
  margin-bottom: 8px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .panel-header h3,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .panel-header h3 {
  font-size: 20px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-brief,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-brief,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-list,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-list,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-steps,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-steps {
  font-size: 13px;
  line-height: 1.42;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-list li + li,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-list li + li,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-ai-steps li + li,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-ai-steps li + li {
  margin-top: 3px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-charge-row,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-charge-row,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-anomaly,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-anomaly {
  padding: 8px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-line-chart,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-line-chart {
  padding: 10px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-line-chart svg,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-line-chart svg {
  height: 190px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-line-labels a,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-line-labels a {
  min-height: 54px;
  padding: 8px 10px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .workbook-table th,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .workbook-table th,
body.pdf-export.endpoint-shipping_cost_ai_analysis_page .workbook-table td,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .workbook-table td {
  padding: 6px 8px;
  font-size: 11px;
}

body.pdf-export.endpoint-shipping_cost_ai_analysis_page .invoice-watchlist,
body.pdf-export.endpoint_shipping_cost_ai_analysis_page .invoice-watchlist {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 760px) {
  .processing-upload .upload-inline-actions,
  .processing-upload-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .processing-upload .upload-picker,
  .processing-upload .upload-inline-filename,
  .processing-upload-buttons .btn {
    width: 100%;
  }
}
