.online-payments-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.online-payments-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.online-payments-title h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.online-payments-title p {
  margin: 0;
  opacity: 0.75;
  font-size: 0.92rem;
}

.op-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.op-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 14px;
  background: var(--surface, #fff);
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.op-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.op-card.is-selected {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.op-card-label {
  font-size: 0.82rem;
  opacity: 0.75;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.op-card-value {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
}

.op-card-hint {
  font-size: 0.75rem;
  opacity: 0.7;
}

.op-card-attention {
  border-color: rgba(245, 158, 11, 0.55);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.04));
}

.op-card-attention .op-card-label,
.op-card-attention .op-card-value {
  color: #b45309;
}

.op-card-pending .op-card-value { color: #2563eb; }
.op-card-paid .op-card-value { color: #15803d; }
.op-card-failed .op-card-value { color: #b91c1c; }

.op-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 14px;
  background: var(--surface, #fff);
}

.op-filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}

.op-search-field {
  grid-column: span 2;
}

.op-filter-actions {
  display: flex;
  gap: 8px;
  grid-column: span 2;
  justify-content: flex-end;
}

.op-table-wrap {
  border: 1px solid var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 14px;
  background: var(--surface, #fff);
  overflow-x: auto;
}

.op-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.op-table th,
.op-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  font-size: 0.9rem;
  vertical-align: middle;
}

.op-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  background: var(--surface-alt, rgba(15, 23, 42, 0.03));
}

.op-table tr:last-child td {
  border-bottom: none;
}

.op-empty {
  text-align: center;
  opacity: 0.7;
  padding: 28px 12px !important;
}

.op-sub {
  display: block;
  font-size: 0.78rem;
  opacity: 0.65;
}

.op-amount {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.op-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.op-badge-pending { background: rgba(37, 99, 235, 0.14); color: #1d4ed8; }
.op-badge-paid { background: rgba(21, 128, 61, 0.14); color: #15803d; }
.op-badge-attention { background: rgba(245, 158, 11, 0.18); color: #b45309; }
.op-badge-failed { background: rgba(185, 28, 28, 0.14); color: #b91c1c; }
.op-badge-cancelled { background: rgba(100, 116, 139, 0.16); color: #475569; }
.op-badge-manual { background: rgba(124, 58, 237, 0.14); color: #6d28d9; }

.op-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.72rem;
  color: #15803d;
}

.op-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.op-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
  opacity: 0.85;
}

.op-pager-buttons {
  display: flex;
  gap: 8px;
}

.op-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.5);
}

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

.op-modal-dialog {
  width: min(680px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface, #fff);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}

.op-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.1));
}

.op-modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.op-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border, rgba(15, 23, 42, 0.1));
}

.op-inline-hint {
  margin: 0;
  font-size: 0.86rem;
  opacity: 0.75;
}

.op-inline-message {
  min-height: 18px;
  font-size: 0.85rem;
  color: #b45309;
}

.op-recover-fields,
.op-reconcile-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.op-reconcile-fields {
  grid-template-columns: 1fr;
}

.op-recover-fields label,
.op-reconcile-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
}

.op-detail-list {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.op-detail-pair {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border, rgba(15, 23, 42, 0.08));
}

.op-detail-pair dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.65;
}

.op-detail-pair dd {
  margin: 0;
  font-size: 0.9rem;
  word-break: break-word;
}

.op-timeline-title {
  margin: 8px 0 0;
  font-size: 0.95rem;
}

.op-section-block + .op-section-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border, rgba(15, 23, 42, 0.1));
}

.op-section-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.op-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.op-timeline li {
  display: grid;
  grid-template-columns: 170px 220px 1fr;
  gap: 8px;
  padding: 8px 10px;
  border-left: 3px solid var(--primary, #2563eb);
  background: var(--surface-alt, rgba(15, 23, 42, 0.03));
  border-radius: 0 10px 10px 0;
  font-size: 0.85rem;
}

.op-tl-at {
  opacity: 0.7;
}

.op-tl-detail {
  word-break: break-word;
}

.payment-field-help {
  display: block;
  font-size: 0.76rem;
  opacity: 0.7;
  font-weight: 400;
}

@media (max-width: 760px) {
  .op-search-field,
  .op-filter-actions {
    grid-column: span 1;
  }

  .op-timeline li {
    grid-template-columns: 1fr;
  }

  .op-recover-fields {
    grid-template-columns: 1fr;
  }

  .op-detail-pair {
    grid-template-columns: 1fr;
  }
}
