.daily-shipment-shell {
  width: min(1320px, calc(100vw - 14px));
  margin-top: 0;
  padding: 8px 8px 18px;
  border: 1px dotted #4d4d4d;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.daily-shipment-topbar {
  grid-template-columns: minmax(0, 1fr);
  padding: 6px 10px 10px;
  border-bottom: 0;
}

.daily-shipment-topbar h1 {
  display: none;
}

.daily-shipment-topbar .eyebrow {
  color: #4d4d4d;
}

.daily-control-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 8px;
  padding: 10px;
  box-shadow: none;
}

.daily-control-grid {
  display: grid;
  grid-template-columns: minmax(180px, 220px) repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

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

.staff-filter-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: none;
}

.staff-filter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.staff-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-chip-grid button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--teal-dark);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.staff-chip-grid button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.daily-hero-grid {
  display: grid;
  grid-template-columns: minmax(370px, 1.35fr) minmax(220px, 0.75fr) minmax(220px, 0.75fr);
  gap: 10px;
  margin: 6px 0 8px;
}

.daily-date-card,
.estimate-card,
.label-card {
  min-height: 116px;
  margin-bottom: 0;
  display: grid;
  align-content: center;
  gap: 6px;
  box-shadow: none;
}

.daily-date-card strong {
  font-size: clamp(42px, 5.8vw, 72px);
  line-height: 1.04;
  letter-spacing: 0;
}

.daily-date-card span,
.estimate-card span,
.label-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.estimate-card strong {
  color: #df62b6;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.05;
}

.mini-pie-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mini-pie,
.type-pie {
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--teal) var(--value, 0%), var(--line) 0);
}

.mini-pie {
  width: 74px;
  height: 74px;
}

.label-card strong {
  font-size: 30px;
}

.daily-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0;
}

.daily-kpis .metric {
  min-height: 96px;
  box-shadow: none;
}

.daily-kpis .metric:nth-child(1) strong,
.daily-kpis .metric:nth-child(4) strong,
.daily-kpis .metric:nth-child(6) strong {
  color: #d94c5a;
}

.daily-kpis .metric:nth-child(2) strong,
.daily-kpis .metric:nth-child(5) strong {
  color: #21cc38;
}

.daily-kpis .metric:nth-child(3) strong {
  color: #1684ef;
}

.daily-main-grid {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) minmax(320px, 420px);
  gap: 10px;
}

.daily-table-wrap {
  overflow-x: visible;
}

.daily-table-wrap.compact {
  max-height: 360px;
  overflow: auto;
}

.daily-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.missing-table {
  min-width: 720px;
}

.daily-table th,
.daily-table td {
  border-bottom: 1px solid #e3e3e3;
  padding: 7px 6px;
  color: var(--ink);
  font-size: 12px;
  text-align: left;
  overflow-wrap: anywhere;
}

.daily-table th {
  background: #fff;
  color: #303030;
  font-weight: 900;
  white-space: nowrap;
  border-bottom: 1px solid #228be6;
}

.daily-table td {
  font-weight: 750;
}

.daily-table tbody tr:nth-child(even):not(.total-row) {
  background: #f0f0f0;
}

.daily-table tbody tr:hover {
  background: #f7faf8;
}

.daily-table .total-row td {
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.chart-panel {
  min-width: 0;
  box-shadow: none;
}

.pie-layout {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 188px;
  align-items: center;
  gap: 18px;
  min-height: 260px;
}

.type-pie {
  grid-column: 2;
  width: 188px;
  height: 188px;
  border: 1px solid var(--line);
}

.pie-legend {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 8px;
  align-content: center;
  width: 100%;
}

.legend-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
}

.legend-row span {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--color);
}

.legend-row strong {
  overflow-wrap: anywhere;
  line-height: 1.15;
}

.legend-row em {
  grid-column: 2;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
  line-height: 1.15;
}

.shelf-chart {
  overflow-x: auto;
  min-height: 292px;
  padding-bottom: 4px;
}

.shelf-matrix {
  display: grid;
  grid-template-columns: 44px repeat(var(--shelf-count), minmax(48px, 1fr)) 54px;
  min-width: 1080px;
  align-items: stretch;
  gap: 0;
}

.shelf-axis,
.shelf-cell {
  min-height: 26px;
  border-bottom: 1px solid #f1f1f1;
  border-right: 1px solid #f5f5f5;
}

.shelf-axis {
  display: grid;
  place-items: center;
  color: #555;
  font-size: 12px;
  font-weight: 800;
}

.shelf-corner,
.shelf-head {
  border-bottom: 1px solid #cfcfcf;
  background: #fff;
}

.shelf-row-head {
  justify-content: end;
  padding-right: 8px;
}

.shelf-cell {
  position: relative;
  display: grid;
  place-items: center;
}

.shelf-bubble {
  display: block;
  border-radius: 50%;
  border: 1px solid #437653;
  background: #5eaa74;
  opacity: 0.94;
}

.shelf-cell em {
  position: absolute;
  left: calc(50% + 10px);
  top: 50%;
  transform: translateY(-50%);
  color: #2690ff;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.shelf-total {
  color: #333;
  font-weight: 900;
}

.missing-panel {
  margin-top: 14px;
}

.type-sort-dialog {
  width: min(680px, calc(100vw - 24px));
}

.type-sort-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.type-sort-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.type-sort-row strong {
  overflow-wrap: anywhere;
}

.type-sort-row code {
  color: var(--muted);
  font-family: inherit;
  font-weight: 800;
}

.type-sort-actions {
  display: flex;
  gap: 6px;
}

.type-sort-actions button {
  width: 34px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .daily-control-grid,
  .staff-filter-grid,
  .daily-hero-grid,
  .daily-main-grid {
    grid-template-columns: 1fr;
  }

  .daily-table-wrap {
    overflow-x: auto;
  }

  .daily-table {
    min-width: 860px;
  }

  .daily-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pie-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .type-pie,
  .pie-legend {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .daily-shipment-shell {
    width: min(100vw - 16px, 1500px);
  }

  .daily-kpis {
    grid-template-columns: 1fr;
  }

  .staff-filter-head,
  .mini-pie-wrap {
    align-items: flex-start;
  }

  .staff-filter-head {
    display: grid;
  }

  .mini-pie-wrap {
    display: grid;
  }

  .daily-date-card strong {
    font-size: 34px;
  }
}
