:root {
  color-scheme: light;
  --navy: #1a2332;
  --navy-light: #2c3e50;
  --red: #b91c1c;
  --border: #d9dee7;
  --muted: #64748b;
  --background: #f4f6f9;
  --success: #166534;
  --danger: #b91c1c;
  --warning: #92400e;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #172033; background: var(--background); line-height: 1.55; }
a { color: #1d4ed8; }
.site-header { background: var(--navy); color: #fff; }
.site-header-inner { max-width: 1180px; margin: auto; min-height: 64px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { color: #fff; text-decoration: none; font-size: 1.25rem; font-weight: 800; }
.site-nav { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.site-nav a, .link-button { color: #e8edf5; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.site-nav a:hover, .link-button:hover { color: #fff; text-decoration: underline; }
.main { max-width: 1180px; margin: auto; padding: 32px 20px 64px; }
.narrow { max-width: 680px; margin-inline: auto; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; box-shadow: 0 4px 18px rgb(15 23 42 / 7%); }
.card + .card { margin-top: 20px; }
.page-title { margin: 0 0 22px; font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--navy); }
.muted { color: var(--muted); }
.alert { border-radius: 8px; padding: 12px 14px; margin: 0 0 18px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.form-grid { display: grid; gap: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 11px 12px; border: 1px solid #b9c2d0; border-radius: 7px; background: #fff; font: inherit; }
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid rgb(37 99 235 / 18%); border-color: #2563eb; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; border: 0; border-radius: 7px; padding: 11px 18px; background: var(--navy); color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.button:hover { background: var(--navy-light); }
.button:disabled { opacity: .55; cursor: wait; }
.button-danger { background: var(--danger); }
.button-secondary { background: #64748b; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.stat strong { display: block; font-size: 1.8rem; color: var(--navy); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 11px 10px; text-align: left; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
th { background: #f8fafc; color: #334155; white-space: nowrap; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #e2e8f0; font-size: .82rem; white-space: nowrap; }
.badge-success { color: #166534; background: #dcfce7; }
.badge-pending { color: #92400e; background: #fef3c7; }
.badge-error { color: #991b1b; background: #fee2e2; }
.detail-list { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 0; border-top: 1px solid var(--border); }
.detail-list dt, .detail-list dd { margin: 0; padding: 11px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.detail-list dt { font-weight: 700; background: #f8fafc; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 8px; font: .85rem/1.55 ui-monospace, monospace; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.pagination a, .pagination span { padding: 7px 11px; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; background: #fff; }
.payment-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.summary-row { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid #e5e7eb; }
.summary-row.total { font-size: 1.2rem; font-weight: 800; border-bottom: 0; }
#card-element { padding: 14px; border: 1px solid #b9c2d0; border-radius: 7px; background: #fff; }
.hidden { display: none !important; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
@media (max-width: 760px) { .site-header-inner { align-items: flex-start; padding-block: 15px; flex-direction: column; } .payment-grid { grid-template-columns: 1fr; } .detail-list { grid-template-columns: 1fr; } .detail-list dd { padding-top: 0; } }
