/* WirelessPay Control — admin design system (no build step required) */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0a3d62;
  --brand-ink: #ffffff;
  --brand-soft: #e8efff;
  --accent: #00a86b;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --bad: #b91c1c;
  --bad-soft: #fee2e2;
  --side: #07263d;
  --side-ink: #cbd5e1;
  --side-active: #0e3a5a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220; --surface: #111a2e; --surface-2: #0f172a; --ink: #e2e8f0; --ink-2: #cbd5e1;
    --muted: #94a3b8; --line: #1f2a44; --brand: #3b82f6; --brand-soft: #172554; --side: #070d19;
    --side-active: #15203a; --ok-soft: #052e16; --warn-soft: #3b2405; --bad-soft: #3f0d0d;
    --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* shell */
.wp-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--side) 248px, transparent 248px); }
.wp-side { background: var(--side); color: var(--side-ink); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.wp-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; font-weight: 700; letter-spacing: .2px; }
.wp-brand-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #00a86b, #0a6fb0); display: grid; place-items: center; font-size: 15px; }
.wp-brand small { display: block; font-weight: 500; color: #94a3b8; font-size: 11px; }
.wp-nav-label { text-transform: uppercase; font-size: 10.5px; letter-spacing: .08em; color: #64748b; padding: 14px 10px 6px; }
.wp-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--side-ink); padding: 8px 10px; border-radius: 8px; font-weight: 500; }
.wp-nav a:hover { background: var(--side-active); color: #fff; text-decoration: none; }
.wp-nav a.active { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 #00a86b; }
.wp-nav .count { background: #b91c1c; color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; }
.wp-main { min-width: 0; }
.wp-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.wp-top h1 { font-size: 18px; margin: 0; }
.wp-top .crumb { color: var(--muted); font-size: 12px; }
.wp-user { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.wp-content { padding: 24px 28px 48px; max-width: 1400px; }

/* building blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-h h2 { font-size: 15px; margin: 0; }
.card-b { padding: 18px; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g-4 { grid-template-columns: repeat(2, 1fr); } .g-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .wp-shell { grid-template-columns: 1fr; } .wp-side { position: static; height: auto; } .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

.stat { padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .hint { color: var(--muted); font-size: 12px; margin-top: 2px; }
.stat.bad .value { color: var(--bad); }
.stat.ok .value { color: var(--ok); }

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:hover td { background: var(--surface-2); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t tfoot td { font-weight: 700; background: var(--surface-2); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-bad { background: var(--bad-soft); color: var(--bad); }
.b-info { background: var(--brand-soft); color: var(--brand); }
.b-mute { background: var(--surface-2); color: var(--muted); border-color: var(--line); }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 13px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); background: var(--brand); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); background: var(--bad); }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

label.f { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 5px; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.input:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.field + .field { margin-top: 12px; }
.help { color: var(--muted); font-size: 12px; margin-top: 4px; }
.err { color: var(--bad); font-size: 12px; margin-top: 4px; }

.alert { padding: 12px 14px; border-radius: 8px; border: 1px solid; font-size: 13.5px; }
.alert-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); color: var(--ok); }
.alert-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--bad); }
.alert-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: .15s; cursor: pointer; }
.switch span:before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span:before { transform: translateX(16px); }

.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: min(640px, 100%); max-height: 90vh; overflow-y: auto; }
.pager { padding: 12px 18px; }
.pager nav { display: flex; justify-content: flex-end; }
pre.json { margin: 0; white-space: pre-wrap; word-break: break-all; font-family: var(--mono); font-size: 12px; background: var(--surface-2); padding: 10px; border-radius: 8px; max-height: 320px; overflow: auto; }
.bar { height: 8px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); }

/* auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 10% -10%, #1d4ed8 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #0ea5a4 0%, transparent 55%), #0b1220; }
.auth .card { width: min(420px, 100%); padding: 28px; }
.auth h1 { font-size: 20px; margin: 0 0 4px; }
.otp-input { letter-spacing: .5em; font-size: 22px; text-align: center; font-family: var(--mono); }
table.t td { overflow-wrap: anywhere; }
table.t td.nowrap, table.t td.mono { overflow-wrap: normal; }
/* Livewire bootstrap-theme pagination */
.pagination { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.pagination .page-link { display: block; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); font-size: 12.5px; cursor: pointer; }
.pagination .page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .page-item.disabled .page-link { opacity: .45; cursor: default; }
.pager p.small, .pager .small { color: var(--muted); font-size: 12px; margin: 0 0 6px; }

/* ---------- banking dashboard components ---------- */
.hero { position: relative; overflow: hidden; border-radius: 16px; padding: 22px 24px; color: #fff;
  background: radial-gradient(500px 220px at 100% 0%, rgba(0,168,107,.45), transparent 70%), linear-gradient(135deg, #07263d 0%, #0a3d62 55%, #0b5a7a 100%);
  box-shadow: 0 10px 30px rgba(7,38,61,.25); }
.hero .h-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #a7c4d8; }
.hero .h-balance { font-size: 34px; font-weight: 800; letter-spacing: -.5px; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.hero .h-sub { color: #cfe0ec; font-size: 13px; }
.hero .h-acct { display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); padding: 4px 10px; border-radius: 999px; font-family: var(--mono); font-size: 12.5px; margin-top: 10px; }
.hero .h-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: end; }
.hero .h-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero .h-mini div { background: rgba(255,255,255,.08); border-radius: 10px; padding: 10px 12px; }
.hero .h-mini b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.hero .h-mini span { font-size: 11.5px; color: #a7c4d8; }
@media (max-width: 900px) { .hero .h-grid { grid-template-columns: 1fr; } }
.qa { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.qa a, .qa button { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 13px; text-decoration: none; cursor: pointer; box-shadow: var(--shadow); }
.qa a:hover, .qa button:hover { border-color: var(--accent); text-decoration: none; }
.qa .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: 17px; }
.qa .ic.blue { background: var(--brand-soft); color: var(--brand); }
.qa .ic.amber { background: var(--warn-soft); color: var(--warn); }
.qa small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.txl { list-style: none; margin: 0; padding: 0; }
.txl li { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.txl li:last-child { border-bottom: 0; }
.txl .dir { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; }
.txl .dir.in { background: var(--ok-soft); color: var(--ok); }
.txl .dir.out { background: var(--bad-soft); color: var(--bad); }
.txl .t1 { font-weight: 600; }
.txl .t2 { color: var(--muted); font-size: 12px; }
.txl .amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.txl .amt.in { color: var(--ok); }
.kpi { padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.kpi .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--brand-soft); color: var(--brand); flex: none; }
.kpi .ic.green { background: var(--ok-soft); color: var(--ok); }
.kpi .ic.amber { background: var(--warn-soft); color: var(--warn); }
.kpi .ic.red { background: var(--bad-soft); color: var(--bad); }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi .value { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi .hint { color: var(--muted); font-size: 11.5px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 0; padding: 0 12px; }
.tabs button { background: none; border: 0; padding: 12px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--accent); }
.receipt { border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); }
.receipt dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
.receipt dt { color: var(--muted); font-size: 12.5px; }
.receipt dd { margin: 0; font-weight: 600; }
/* Select2 inside the design system */
.select2-container { width: 100% !important; font: inherit; }
.select2-container--default .select2-selection--single { height: 37px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 35px; color: var(--ink); padding-left: 10px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 35px; }
.select2-dropdown { border-color: var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); overflow: hidden; }
.select2-container--default .select2-search--dropdown .select2-search__field { border-color: var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--brand); }
.row .select2-container { width: auto !important; min-width: 220px; }

.wp-nav-logout { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; background: none; border: 0; color: #fca5a5; padding: 8px 10px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.wp-nav-logout:hover { background: var(--side-active); color: #fff; }
