.toa-page { padding: 20px; color: #1f2937; }
.toa-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.toa-tabs { display: flex; gap: 18px; border-bottom: 1px solid #e5e7eb; margin-bottom: 14px; }
.toa-tab { border: 0; border-bottom: 2px solid transparent; background: transparent; color: #64748b; cursor: pointer; padding: 10px 2px; font-weight: 600; }
.toa-tab.active { border-bottom-color: #2563eb; color: #2563eb; }
.toa-runtime { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #475569; }
.toa-runtime-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.toa-runtime-dot.active { background: #16a34a; box-shadow: 0 0 0 3px #dcfce7; }
.toa-warning { border-left: 4px solid #f59e0b; background: #fffbeb; color: #92400e; padding: 10px 12px; margin-bottom: 14px; font-size: 13px; }
.toa-billing { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #dbeafe; background: #eff6ff; border-radius: 6px; margin-bottom: 14px; padding: 10px 12px; }
.toa-billing-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.toa-status-card { border: 1px solid #e2e8f0; background: #fff; border-radius: 6px; margin-bottom: 14px; padding: 10px 12px; }
.toa-status-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toa-status-card-head strong { color: #0f172a; font-size: 13px; }
.toa-status-card-head span { margin-left: 8px; color: #64748b; font-size: 12px; }
.toa-status-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.toa-status-line { display: flex; align-items: center; gap: 8px; color: #475569; font-size: 12px; margin-top: 8px; }
.toa-config-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.toa-rule-list { display: grid; gap: 10px; }
.toa-rule { border: 1px solid #dbe3ee; border-radius: 6px; background: #fff; padding: 12px; }
.toa-rule.disabled { background: #f8fafc; opacity: .72; }
.toa-rule-head { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto auto; align-items: center; gap: 10px; margin-bottom: 12px; }
.toa-segmented { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 6px; overflow: hidden; }
.toa-segmented button { border: 0; border-right: 1px solid #cbd5e1; background: #fff; color: #64748b; cursor: pointer; padding: 6px 10px; font-size: 12px; }
.toa-segmented button:last-child { border-right: 0; }
.toa-segmented button.active { background: #2563eb; color: #fff; }
.toa-condition-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 10px; }
.toa-condition { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 7px; min-width: 0; }
.toa-condition .input { min-width: 0; }
.toa-time-condition { display: grid; grid-template-columns: repeat(2, minmax(180px, 240px)); gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef2f7; }
.toa-text-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef2f7; }
.toa-and-label { color: #b45309; font-size: 11px; font-weight: 700; margin-left: 5px; }
.toa-summary { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.toa-summary-item { border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; padding: 11px 12px; }
.toa-summary-item span { display: block; color: #64748b; font-size: 12px; }
.toa-summary-item strong { display: block; margin-top: 4px; color: #0f172a; font-size: 20px; }
.toa-filters { display: grid; grid-template-columns: minmax(260px, 1fr) 210px 160px auto; gap: 10px; align-items: end; }
.toa-table-wrap { overflow: auto; min-height: 360px; max-height: calc(100vh - 340px); }
.toa-table { min-width: 1600px; border-collapse: separate; border-spacing: 0; }
.toa-table thead th { position: sticky; top: 0; z-index: 2; }
.toa-table td { vertical-align: top; line-height: 1.45; }
.toa-order-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; white-space: nowrap; }
.toa-wrap { max-width: 280px; white-space: normal; overflow-wrap: anywhere; }
.toa-money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.toa-empty { padding: 56px 20px; color: #94a3b8; text-align: center; }
@media (max-width: 1000px) {
  .toa-toolbar { align-items: flex-start; flex-direction: column; }
  .toa-condition-grid, .toa-summary { grid-template-columns: 1fr 1fr; }
  .toa-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .toa-condition-grid, .toa-time-condition, .toa-text-filters, .toa-summary, .toa-filters { grid-template-columns: 1fr; }
  .toa-rule-head { grid-template-columns: auto 1fr; }
  .toa-billing, .toa-status-card-head, .toa-status-line { align-items: flex-start; flex-direction: column; }
  .toa-status-actions { justify-content: flex-start; }
}
