.ozon-controls {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 18px 0 8px;
}

.ozon-period-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.ozon-period-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.ozon-period-form input {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.ozon-api-metrics {
  margin-top: 20px;
}

.ozon-sync-window {
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.ozon-sync-summary {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.ozon-sync-note {
  font-size: 13px;
  line-height: 1.5;
}

.ozon-auth-required {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #e6c6a5;
  border-radius: 10px;
  background: #fff8ed;
  color: #60431e;
  font-size: 14px;
  line-height: 1.5;
}

.ozon-auth-required[hidden] {
  display: none;
}

.ozon-auth-required .button {
  min-height: 40px;
}

.ozon-status-legend,
.ozon-status-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ozon-status-legend {
  margin: 12px 0;
}

.ozon-sync-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ozon-data-table.ozon-sync-table {
  min-width: 760px;
  font-size: 13px;
}

.ozon-sync-table th,
.ozon-sync-table td {
  padding: 12px 14px;
  line-height: 1.45;
}

.ozon-sync-table td:first-child {
  white-space: nowrap;
}

.ozon-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.ozon-status-badge.is-loaded {
  background: #e7f4eb;
  color: #22623c;
}

.ozon-status-badge.is-unverified {
  background: #fff3d7;
  color: #745300;
}

.ozon-status-badge.is-verified {
  background: #e7f4eb;
  color: #22623c;
}

.ozon-status-badge.is-error {
  background: #fde9e7;
  color: #8a2921;
}

.ozon-status-badge.is-pending,
.ozon-status-badge.is-muted {
  background: #edf0f3;
  color: #46505a;
}

.ozon-status-error-code {
  width: 100%;
  color: #8a2921;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.ozon-controls #ozonRefreshButton.is-running {
  cursor: progress;
  opacity: 0.8;
}

.ozon-api-chart {
  display: grid;
  gap: 10px;
}

.ozon-chart-row {
  display: grid;
  grid-template-columns: minmax(78px, 110px) minmax(60px, 1fr) minmax(90px, 130px);
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.ozon-chart-date,
.ozon-chart-value {
  color: var(--muted);
}

.ozon-chart-value {
  text-align: right;
  white-space: nowrap;
}

.ozon-chart-track {
  height: 12px;
  overflow: hidden;
  border-radius: 8px;
  background: #eef2ed;
}

.ozon-chart-bar {
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: #438565;
}

.ozon-chart-bar.negative {
  background: #bd7061;
}

.table-scroll {
  overflow-x: auto;
  width: 100%;
}

.ozon-data-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.ozon-data-table th,
.ozon-data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ozon-data-table th:nth-child(n+2):not(:nth-child(4)),
.ozon-data-table td:nth-child(3) {
  text-align: right;
}

.ozon-operations-table {
  min-width: 900px;
}

.ozon-operation-detail {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.ozon-credibility {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 6px;
  background: #f2f4ed;
  color: #64725d;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .ozon-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .ozon-period-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ozon-period-form .button {
    grid-column: 1 / -1;
  }

  .ozon-controls > .button {
    width: 100%;
  }

  .ozon-chart-row {
    grid-template-columns: 76px minmax(45px, 1fr) 92px;
    gap: 8px;
    font-size: 11px;
  }

  .ozon-data-table.ozon-sync-table {
    font-size: 12px;
  }

  .ozon-sync-table th,
  .ozon-sync-table td {
    padding: 10px;
  }
}
