.cmp-main { max-width: 980px; margin: 24px auto; padding: 0 16px; display: grid; gap: 18px; }
.cmp-card { background: #fff; border: 1px solid #e3e3e3; border-radius: 8px; padding: 20px; }
.cmp-card h2 { margin: 0 0 12px; }
.cmp-wallet { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.cmp-balance { font-size: 28px; font-weight: 700; color: #1b7f3b; }
.cmp-label { display: block; font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: .03em; }
.cmp-muted { color: #666; font-size: 13px; }
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.cmp-wide { grid-column: 1 / -1; }
.cmp-field label { display: block; font-weight: 600; margin-bottom: 4px; }
.cmp-field input, .cmp-field select, .cmp-field textarea, .cmp-modal-box textarea, .cmp-modal-box input {
  width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; font: inherit; box-sizing: border-box;
}
.cmp-counter { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; font-size: 14px; }
.cmp-radio { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cmp-radio label { font-weight: 400; display: flex; gap: 6px; align-items: center; }
.cmp-radio input[type="datetime-local"] { width: auto; }
.cmp-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; background: #f6faf6; border-radius: 8px; padding: 12px; }
.cmp-summary strong { display: block; font-size: 20px; }
.cmp-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.cmp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cmp-stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 8px 0; font-size: 14px; }
.cmp-stats strong { font-size: 18px; display: block; }
.cmp-badge { background: #e8f5e9; color: #1b5e20; border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: 14px; }
.cmp-upload { cursor: pointer; }
.cmp-table-wrap { overflow: auto; max-height: 420px; -webkit-overflow-scrolling: touch; }
.cmp-table { min-width: 640px; }
.cmp-table thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
.cmp-main, .cmp-card { min-width: 0; }
.cmp-card h2 { overflow-wrap: anywhere; }
#webhookUrl { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #ccc; border-radius: 6px; font: 13px monospace; }
.cmp-page { overflow-x: hidden; }

@media (max-width: 900px) {
  .cmp-page header.top-bar {
    display: flex; flex-wrap: nowrap; align-items: center; gap: 6px;
    overflow-x: auto; overflow-y: hidden; white-space: nowrap; -webkit-overflow-scrolling: touch;
    padding: 8px 10px;
  }
  .cmp-page header.top-bar > * { flex: 0 0 auto; }
}

@media (max-width: 600px) {
  .cmp-main { margin: 12px auto; padding: 0 10px; gap: 12px; }
  .cmp-card { padding: 14px; }
  .cmp-balance { font-size: 22px; }
  .cmp-grid { grid-template-columns: 1fr; }
  .cmp-field input, .cmp-field select, .cmp-field textarea, .cmp-modal-box textarea, .cmp-modal-box input { font-size: 16px; }
  .cmp-radio { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cmp-radio input[type="datetime-local"] { width: 100%; }
  .cmp-summary { grid-template-columns: repeat(2, 1fr); }
  .cmp-actions .btn, .cmp-wide.cmp-actions .btn { flex: 1 1 100%; text-align: center; }
  .cmp-row > .btn { width: 100%; }
  .cmp-stats { gap: 12px; }
  .cmp-modal-box { padding: 16px; width: 94vw; }
}
.cmp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp-table th, .cmp-table td { text-align: left; padding: 8px; border-bottom: 1px solid #eee; vertical-align: top; }
.cmp-alert { padding: 12px 14px; border-radius: 6px; background: #e8f5e9; color: #1b5e20; }
.cmp-alert.error { background: #fdecea; color: #b71c1c; }
.cmp-modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.cmp-modal[hidden], .cmp-alert[hidden] { display: none; }
.cmp-modal-box { background: #fff; border-radius: 10px; padding: 22px; width: min(520px, 92vw); max-height: 90vh; overflow: auto; display: grid; gap: 8px; }
