.customs-declaration-statistics {
  display: grid;
  gap: 12px;
}

.customs-declaration-statistics-tools,
.customs-declaration-statistics-month {
  display: grid;
  gap: 0;
}

.customs-declaration-statistics-tools-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customs-declaration-statistics-sort-bar {
  margin: 0;
}

.customs-declaration-statistics-collapse-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 2px;
  padding-left: 8px;
  border-left: 1px solid #dbe4ef;
}

.customs-declaration-statistics-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-height: 48px;
  padding: 10px 0 12px;
  border-bottom: 1px solid #e2e8f0;
}

.customs-declaration-statistics-identity {
  display: flex;
  min-width: 165px;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.customs-declaration-statistics-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: start;
  gap: 0;
}

.customs-declaration-statistics-summary.is-redacted {
  min-height: 42px;
}

.customs-declaration-statistics-summary > div {
  display: grid;
  gap: 4px;
  padding: 0 14px;
  border-left: 1px solid #dbe4ef;
}

.customs-declaration-statistics-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.customs-declaration-statistics-summary strong {
  font-size: 16px;
  white-space: nowrap;
}

.customs-declaration-statistics-summary .is-total {
  color: #075985;
}

.customs-declaration-statistics-toggle {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  height: 36px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.customs-declaration-statistics-month-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.customs-declaration-statistics-responsible {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customs-declaration-statistics-price-missing {
  color: #b91c1c;
  font-size: 11px;
  font-weight: 800;
}

.customs-declaration-statistics-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 10px 0 12px;
}

.customs-declaration-statistics-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.customs-declaration-statistics-chip.is-info {
  border-color: #bae6fd;
  background: #e0f2fe;
  color: #075985;
}

.customs-declaration-statistics-chip.is-clear {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.customs-declaration-statistics-chip.is-problem {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.customs-declaration-statistics-chip.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.customs-declaration-statistics-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0 12px;
}

.customs-declaration-statistics-status-row
  > .customs-declaration-statistics-badges {
  padding: 0;
}

.customs-declaration-statistics-status-right {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}

.customs-declaration-statistics-blockers {
  position: relative;
  padding: 0;
}

.customs-declaration-statistics-blockers-trigger {
  position: relative;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #fdba74;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.customs-declaration-statistics-blockers-trigger:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.customs-declaration-statistics-blockers-tooltip {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  display: none;
  width: min(520px, calc(100vw - 48px));
  max-height: 320px;
  overflow: auto;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  color: #334155;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
}

.customs-declaration-statistics-blockers-tooltip strong {
  margin-top: 5px;
  color: #9a3412;
}

.customs-declaration-statistics-blockers-tooltip strong:first-child {
  margin-top: 0;
}

.customs-declaration-statistics-blockers-trigger:hover
  .customs-declaration-statistics-blockers-tooltip,
.customs-declaration-statistics-blockers-trigger:focus
  .customs-declaration-statistics-blockers-tooltip {
  display: grid;
}

.customs-declaration-statistics-status-right
  .customs-declaration-statistics-blockers-tooltip {
  right: 0;
  left: auto;
}

.customs-declaration-statistics-month.is-collapsed > .customs-declaration-statistics-badges {
  padding-bottom: 4px;
}

.customs-declaration-statistics-details {
  min-width: 0;
}

.customs-declaration-statistics-table-wrap {
  margin: 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
}

.customs-declaration-statistics-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.customs-declaration-statistics-table th {
  padding: 9px 7px;
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
}

.customs-declaration-statistics-table td {
  min-width: 0;
  padding: 7px 6px;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.25;
}

.customs-declaration-statistics-table th,
.customs-declaration-statistics-table td {
  overflow-wrap: anywhere;
  white-space: normal;
}

.customs-declaration-statistics-mobile-list {
  display: none;
}

.customs-declaration-statistics-period-summary {
  display: grid;
  gap: 12px;
}

.customs-declaration-statistics-period-summary .customs-declaration-statistics-summary {
  align-self: stretch;
}

.customs-declaration-statistics-period-summary .customs-declaration-statistics-summary > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.customs-declaration-statistics-period-summary .customs-declaration-statistics-badges {
  padding: 10px 0 0;
  border-top: 1px solid #e2e8f0;
}

.customs-declaration-statistics-more {
  justify-self: center;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .customs-declaration-statistics-tools-row {
    display: grid;
  }

  .customs-declaration-statistics-collapse-actions {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .customs-declaration-statistics-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .customs-declaration-statistics-identity {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .customs-declaration-statistics-head > .customs-declaration-statistics-summary {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .customs-declaration-statistics-head > .customs-declaration-statistics-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  .customs-declaration-statistics-table-wrap {
    display: none;
  }

  .customs-declaration-statistics-blockers-tooltip {
    display: none !important;
  }

  .customs-declaration-statistics-status-row {
    flex-wrap: wrap;
  }

  .customs-declaration-statistics-status-right {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-left: 0;
  }

  .customs-declaration-statistics-mobile-list {
    display: grid;
    gap: 10px;
    padding: 12px 0 0;
  }

  .customs-declaration-statistics-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .customs-declaration-statistics-summary > div,
  .customs-declaration-statistics-summary > div:first-child {
    padding: 0;
    border-left: 0;
  }
}
