.operations-timeline {
  border-top: 1px solid var(--line);
}

.operations-toolbar {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 14px;
}

.operations-filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

.operations-status-filter {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-strong);
  padding: 0 7px 0 13px;
}

.operations-status-filter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.operations-status-filter select {
  width: auto;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0 26px 0 0;
  font-size: 14px;
  font-weight: 800;
}

.operations-status-filter select:focus {
  outline: none;
}

.operations-status-filter:focus-within {
  border-color: var(--accent);
}

.period-filter {
  position: relative;
}

.period-filter summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-strong);
  padding: 0 13px;
  cursor: pointer;
  list-style: none;
}

.period-filter summary::-webkit-details-marker {
  display: none;
}

.period-filter summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 12px;
}

.period-filter[open] summary {
  border-color: var(--accent);
}

.period-filter summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.period-filter summary strong {
  color: var(--accent);
  font-size: 14px;
}

.period-filter-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  width: min(560px, calc(100vw - 64px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 22px 60px rgba(28, 24, 18, 0.18);
  padding: 16px;
}

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

.period-date-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.period-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 12px;
  margin-top: 14px;
  border-block: 1px solid var(--line);
  padding: 10px 0;
}

.period-presets button {
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  text-align: left;
  font-weight: 700;
}

.period-presets button:hover {
  transform: none;
  text-decoration: underline;
}

.period-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.operations-result-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.operations-toolbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.operations-delete-status {
  min-height: 18px;
  margin: -7px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.danger-action {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
  background: #fff8f6;
  color: var(--danger);
  font-weight: 800;
}

.danger-action:hover:not(:disabled) {
  border-color: var(--danger);
  background: #fce8e4;
}

.delete-operations-dialog {
  width: min(560px, calc(100vw - 32px));
}

.delete-operations-warning {
  border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line));
  border-left: 4px solid var(--danger);
  border-radius: 8px;
  background: #fff8f6;
  color: var(--danger);
  padding: 14px;
  line-height: 1.5;
}

.delete-operations-actions {
  display: flex;
  gap: 8px;
}

.operations-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  margin-top: 16px;
}

.operations-pagination button {
  min-width: 38px;
  padding: 0 9px;
}

.operations-pagination button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.pagination-ellipsis {
  min-width: 24px;
  color: var(--muted);
  text-align: center;
}

.postback-logs-pane {
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.92);
  box-shadow: var(--shadow);
  padding: 18px;
}

.postback-log-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
  border-block: 1px solid var(--line);
}

.postback-log-toolbar {
  position: relative;
  z-index: 12;
  margin-top: 20px;
}

.postback-log-metric {
  display: grid;
  align-content: center;
  min-height: 210px;
  padding: 30px clamp(18px, 4vw, 54px);
}

.postback-log-metric + .postback-log-metric {
  border-left: 1px solid var(--line);
}

.postback-log-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.postback-log-metric strong {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: clamp(48px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.postback-log-metric.is-sent strong {
  color: var(--accent);
}

.postback-log-metric.is-waiting strong {
  color: #a66512;
}

.postback-log-metric.is-not-found strong {
  color: var(--danger);
}

.postback-log-metric .danger-action {
  justify-self: start;
  margin-top: 18px;
}

.postback-log-metric small,
.postback-logs-status {
  color: var(--muted);
  line-height: 1.5;
}

.postback-buyer-table-wrap {
  margin-top: 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.postback-buyer-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.postback-buyer-table th,
.postback-buyer-table td {
  width: 50%;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.postback-buyer-table th {
  background: rgba(45, 93, 70, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.postback-buyer-table td {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.postback-buyer-table td.is-empty {
  color: var(--muted);
  font-weight: 500;
}

.postback-buyer-table th + th,
.postback-buyer-table td + td {
  border-left: 1px solid var(--line);
}

.postback-buyer-table tbody tr:last-child td {
  border-bottom: 0;
}

.postback-logs-status {
  min-height: 20px;
  margin: 14px 0 0;
  font-size: 13px;
}

@media (max-width: 680px) {
  .postback-logs-pane {
    padding: 14px;
  }

  .postback-log-summary {
    grid-template-columns: 1fr;
  }

  .postback-log-metric {
    min-height: 160px;
    padding: 24px 12px;
  }

  .postback-log-metric + .postback-log-metric {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}
