/* NetPay portal (sign-in, dashboards, checkout): same light theme as the public site (css/site.css), green from the logo. */
@import url('/fonts/fonts.css');
:root {
  --bg1: #f4f7fe; --panel: #ffffff; --panel-solid: #ffffff; --panel-2: #f9fafb; --border: #e0e5f2; --border-2: #d3daea;
  --text: #030712; --navy: #2b3674; --muted: #6a7282; --sub: #4a5a8a; --dim: #8a93a6;
  --primary: #12893a; --primary-2: #0c6e2e; --soft: rgba(18, 137, 58, .10); --soft-2: rgba(18, 137, 58, .18);
  --success: #12893a; --warn: #d97706; --danger: #dc2626; --purple: #7c3aed; --cyan: #0891b2;
  --radius: 14px; --font: Poppins, ui-sans-serif, system-ui, sans-serif; --mono-font: 'Geist Mono', ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html { margin: 0; background: var(--bg1); }
body { margin: 0; min-height: 100vh; font-family: var(--font); color: var(--text); background: var(--bg1); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.mono { font-family: var(--mono-font); font-size: 12.5px; }
.muted { color: var(--muted); } .sub { color: var(--sub); } .dim { color: var(--dim); }
.ok { color: var(--success); } .warn { color: var(--warn); } .bad { color: var(--danger); }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }

/* ---- shell ---- */
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 40; }
.topbar .left, .topbar .right-side { display: flex; align-items: center; gap: 14px; }
.icon-btn { background: transparent; border: 0; color: var(--navy); padding: 8px; border-radius: 10px; cursor: pointer; display: inline-flex; }
.icon-btn:hover { background: var(--bg1); }
.brandmark { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brandmark:hover { text-decoration: none; }
/* the logo is made for light backgrounds: the pill is just a plain wrapper now */
.logo-pill { display: inline-flex; align-items: center; line-height: 0; }
.brandmark .logo-pill img { height: 28px; }
.usermenu { position: relative; }
.userbtn { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; color: var(--navy); font-weight: 500; }
.userbtn:hover { border-color: var(--soft-2); }
.avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.dropdown { position: absolute; right: 0; top: 52px; min-width: 220px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: 0 18px 40px -16px rgba(43, 54, 116, .35); }
.dropdown button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 10px; background: none; border: 0; border-radius: 8px; cursor: pointer; text-align: left; color: var(--navy); }
.dropdown button:hover { background: var(--soft); color: var(--primary-2); }
.modepill { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.modepill button { border: 0; background: transparent; padding: 6px 12px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 12px; }
.modepill button.on { background: var(--primary); color: #fff; }
.modepill button.on.test { background: #f59e0b; color: #1f2937; }
.sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 270px; background: #fff; border-right: 1px solid var(--border); z-index: 60; transform: translateX(-100%); transition: transform .2s ease; overflow-y: auto; padding: 18px 12px; box-shadow: 0 0 40px -10px rgba(43, 54, 116, .25); }
.sidebar.open { transform: none; }
.scrim { position: fixed; inset: 0; background: rgba(3, 7, 18, .35); z-index: 55; }
.nav-group { margin-top: 14px; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--navy); font-weight: 600; padding: 6px 12px; }
.nav a { display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--bg1); text-decoration: none; color: var(--text); }
.nav a.active { background: var(--soft); color: var(--primary); }
.main { max-width: 1440px; margin: 0 auto; padding: 32px 44px 60px; }
@media (max-width: 760px) { .main { padding: 20px 16px 40px; } .topbar { padding: 0 12px; } }
@media (max-width: 640px) {
  .topbar .left, .topbar .right-side { gap: 8px; }
  .topbar .left .badge { display: none; }
  .brandmark .logo-pill img { height: 22px; }
  .userbtn { padding: 5px; gap: 0; }
  .userbtn > span:not(.avatar), .userbtn > svg { display: none; }
  .modepill button { padding: 6px 9px; }
  .page-head h1 { font-size: 24px; }
}

/* ---- page header ---- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--navy); cursor: pointer; font-weight: 500; white-space: nowrap; transition: .15s; }
.btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px -8px rgba(18, 137, 58, .7); }
.btn.primary:hover { background: var(--primary-2); color: #fff; }
.btn.success { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.btn.danger:hover { border-color: #f87171; color: #991b1b; }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font-weight: 600; }

/* ---- cards ---- */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hero-row { grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 1100px) { .g4, .g5, .hero-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .g2, .g3, .g4, .g5, .hero-row { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.card h3 { margin: 0 0 14px; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.section-title { font-size: 18px; font-weight: 600; margin: 30px 0 14px; display: flex; align-items: center; gap: 10px; }
.stat { display: flex; gap: 16px; align-items: flex-start; }
.stat.top { flex-direction: column; gap: 6px; }
.stat .ic { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.stat .lbl { color: var(--muted); font-size: 13.5px; }
.stat .val { font-size: 24px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.stat .hint { color: var(--dim); font-size: 12px; margin-top: 4px; }
.stat .corner { margin-left: auto; }
.tone-primary .ic { background: var(--soft); color: var(--primary); }
.tone-success .ic { background: var(--soft); color: var(--success); } .tone-success .val.c { color: var(--success); }
.tone-warn .ic { background: #fef3c7; color: var(--warn); } .tone-warn .val.c { color: var(--warn); }
.tone-danger .ic { background: #fee2e2; color: var(--danger); }
.tone-purple .ic { background: #ede9fe; color: var(--purple); }
.tone-cyan .ic { background: #cffafe; color: var(--cyan); }
.card.hero { background: linear-gradient(135deg, #0f7a33, #12893a 45%, #2fb64a); border-color: transparent; color: #fff; display: flex; align-items: center; gap: 24px; padding: 32px; }
.card.hero .ic { width: 64px; height: 64px; border-radius: 16px; background: rgba(255, 255, 255, .2); display: inline-flex; align-items: center; justify-content: center; }
.card.hero .val { font-size: 38px; font-weight: 700; margin: 6px 0; }
.card.hero .muted, .card.hero .sub, .card.hero .dim, .card.hero .lbl, .card.hero .hint { color: rgba(255, 255, 255, .85); }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.kv .k { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; } .kv .v { font-weight: 600; word-break: break-all; }
@media (max-width: 900px) { .kv { grid-template-columns: 1fr 1fr; } }

/* ---- tables ---- */
.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table-scroll { 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: .06em; color: var(--navy); font-weight: 600; padding: 13px 16px; border-bottom: 1px solid var(--border); background: var(--panel-2); white-space: nowrap; }
table.t td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--bg1); }
table.t tr.total td { font-weight: 700; background: var(--soft); }
table.t td.num, table.t th.num { text-align: right; white-space: nowrap; }
.empty { padding: 64px 20px; text-align: center; color: var(--muted); }
.empty .ei { color: var(--dim); margin-bottom: 10px; }
.empty b { display: block; font-size: 17px; color: var(--navy); margin-bottom: 6px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; flex-wrap: wrap; gap: 10px; }
.pager .pg { display: flex; gap: 6px; }

/* ---- badges ---- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid transparent; white-space: nowrap; }
.b-green { background: var(--soft); color: var(--primary-2); border-color: var(--soft-2); }
.b-amber { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.b-red { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.b-blue { background: #e8ecfb; color: var(--navy); border-color: #d3daf3; }
.b-gray { background: #f3f4f6; color: #4a5565; border-color: #e5e7eb; }
.b-purple { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }

/* ---- forms / filters ---- */
.filters { margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.form-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .form-grid, .form-grid.c3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .form-grid, .form-grid.c2, .form-grid.c3 { grid-template-columns: 1fr; } }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--navy); font-weight: 500; }
.in { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text); outline: none; font-weight: 400; }
.in:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--soft); }
.in:disabled { background: var(--panel-2); color: var(--muted); }
textarea.in { min-height: 84px; resize: vertical; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; color: var(--text); }
.check input { accent-color: var(--primary); }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cbd2e1; border-radius: 22px; 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(--primary); }
.switch input:checked + span::before { transform: translateX(16px); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 11px 16px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.notice { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--soft-2); background: var(--soft); color: #14532d; margin-bottom: 18px; }
.notice.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.notice.bad { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.secret { display: flex; gap: 8px; align-items: center; background: var(--panel-2); border: 1px dashed var(--border-2); padding: 10px 12px; border-radius: 10px; word-break: break-all; }

/* ---- tier editor ---- */
.tiers { width: 100%; border-collapse: collapse; }
.tiers th { font-size: 11.5px; color: var(--navy); text-align: left; padding: 6px 8px; font-weight: 600; }
.tiers td { padding: 6px 8px; vertical-align: middle; }
.tiers .in { padding: 8px 10px; }
.tiers .cell { display: flex; gap: 8px; align-items: center; }
.tiers .cell .in { max-width: 130px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.loss td { background: #fef2f2; }

/* ---- modal / toast ---- */
.modal-back { position: fixed; inset: 0; background: rgba(3, 7, 18, .4); z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 50px 16px; overflow-y: auto; }
.modal { width: 100%; max-width: 760px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 30px 60px -24px rgba(43, 54, 116, .45); }
.modal.wide { max-width: 1100px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-h h3 { margin: 0; font-size: 17px; font-weight: 600; }
.modal-b { padding: 20px 22px; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: var(--panel-2); border-radius: 0 0 16px 16px; }
.dsec { margin-bottom: 18px; }
.dsec h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--navy); }
.dgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; }
.dgrid .k { color: var(--muted); font-size: 12px; } .dgrid .v { font-weight: 600; word-break: break-all; }
@media (max-width: 640px) { .dgrid { grid-template-columns: 1fr 1fr; } }
pre.json { background: #0b1220; color: #e5e9f2; border: 1px solid #1e2939; border-radius: 10px; padding: 12px; overflow: auto; max-height: 340px; font-size: 12px; margin: 0; font-family: var(--mono-font); }
details summary { cursor: pointer; color: var(--primary); font-weight: 500; margin: 6px 0; }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--primary); padding: 12px 16px; border-radius: 10px; min-width: 260px; max-width: 420px; box-shadow: 0 14px 30px -14px rgba(43, 54, 116, .4); }
.toast.ok { border-left-color: var(--success); } .toast.bad { border-left-color: var(--danger); }

/* ---- login / checkout ---- */
.center-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; overflow: hidden; isolation: isolate; }
.center-screen::before, .center-screen::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1; }
.center-screen::before { width: 380px; height: 380px; top: -120px; left: 30%; background: rgba(56, 208, 8, .16); }
.center-screen::after { width: 320px; height: 320px; bottom: -80px; right: 10%; background: rgba(18, 137, 58, .12); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 34px 30px; box-shadow: 0 30px 60px -30px rgba(43, 54, 116, .35); }
.auth-card .logo { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-card .logo img { height: 38px; }
.auth-card h2 { margin: 0 0 6px; text-align: center; font-weight: 700; letter-spacing: -.02em; } .auth-card p.sub { text-align: center; margin: 0 0 24px; color: var(--muted); }
.auth-card .in { margin-top: 6px; }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 18px; padding: 12px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.bars .bar { flex: 1; background: linear-gradient(180deg, #38d008, #12893a); border-radius: 6px 6px 2px 2px; min-height: 2px; position: relative; }
.bars .bar:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #0b1220; color: #fff; padding: 4px 8px; border-radius: 6px; font-size: 11px; white-space: nowrap; margin-bottom: 6px; }
.bar-labels { display: flex; gap: 6px; font-size: 10.5px; color: var(--dim); margin-top: 6px; }
.bar-labels span { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; }
