:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: #08080c; color: #fff;
  font-family: "Quicksand", -apple-system, Segoe UI, sans-serif; font-weight: 400; padding: 24px;
}
body.center { display: grid; place-items: center; }
main { width: 100%; }
.card { max-width: 460px; margin: 0 auto; background: #0e0e15; border: 1px solid #20202b; border-radius: 18px; padding: 30px 28px; box-shadow: 0 30px 80px -40px rgba(0,0,0,.8); }
.login { max-width: 380px; }
.brand { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; color: #e4002b; margin-bottom: 14px; }
h1 { font-weight: 500; font-size: 24px; letter-spacing: -.01em; margin: 0 0 18px; }
label { display: block; font-size: 13px; color: #b8b8c4; margin: 14px 0 0; }
input, select { width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 10px; border: 1px solid #2a2a37; background: #14141d; color: #fff; font: inherit; }
input:focus, select:focus { outline: none; border-color: #e4002b; }
.pay { width: 100%; margin-top: 22px; padding: 14px; border: 0; border-radius: 10px; cursor: pointer; background: #e4002b; color: #fff; font: inherit; font-weight: 600; font-size: 16px; transition: background .15s; }
.pay:hover { background: #b80022; }
.amount { font-size: 40px; font-weight: 600; letter-spacing: -.02em; margin: 6px 0 4px; }
.desc { color: #d4d4dd; margin-bottom: 6px; }
.ref { color: #8a8a99; font-size: 13px; margin-bottom: 8px; }
.secure { margin-top: 16px; font-size: 12.5px; color: #9a9aa8; text-align: center; }
.linkbox { font-size: 13px; color: #9ec2ff; }
.copy { padding: 9px 14px; border: 1px solid #2a2a37; background: #14141d; color: #fff; border-radius: 8px; cursor: pointer; font: inherit; }
.err { margin-top: 14px; color: #ff6b81; font-size: 14px; }
.ok { color: #21c074; }
.ok2 { font-size: 50px; color: #21c074; text-align: center; margin-bottom: 6px; }

/* dashboard */
body.dash { display: block; padding: 0; }
body.dash main { max-width: 1100px; margin: 0 auto; padding: 22px 22px 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 18px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.bcard { background: #0e0e15; border: 1px solid #20202b; border-radius: 14px; padding: 16px 18px; }
.bt { font-size: 12px; color: #9a9aa8; letter-spacing: .04em; }
.bv { font-size: 24px; font-weight: 600; margin-top: 6px; }
.bv.ok { color: #21c074; }
.panel { background: #0e0e15; border: 1px solid #20202b; border-radius: 16px; padding: 20px 22px; margin-bottom: 18px; max-width: none; }
.panel h2 { font-weight: 500; font-size: 18px; margin: 0 0 16px; }
.panel h2 .count { font-size: 13px; color: #8a8a99; margin-left: 6px; }
.newform { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.newform input, .newform select { width: auto; margin: 0; }
.newform input[name=amount] { width: 130px; }
.newform .grow { flex: 1 1 220px; }
.newform .pay { width: auto; margin: 0; padding: 12px 20px; font-size: 14px; }
.flash { margin-top: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #11261a; border: 1px solid #1f5b3a; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.flash .linkbox { flex: 1 1 320px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: #8a8a99; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid #20202b; white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid #18181f; vertical-align: middle; }
td.amt { font-weight: 600; white-space: nowrap; }
td.desc { color: #c2c2cd; max-width: 240px; }
.empty { text-align: center; color: #8a8a99; padding: 24px; }
.pill { font-size: 11.5px; padding: 3px 9px; border-radius: 20px; text-transform: capitalize; white-space: nowrap; }
.pill.unpaid { background: #3a2a10; color: #f0b24a; }
.pill.paid { background: #11331f; color: #3fd07f; }
.pill.cancelled { background: #2a2a33; color: #9a9aa8; }
.mini { padding: 6px 11px; font: inherit; font-size: 12.5px; border-radius: 8px; border: 1px solid #2a2a37; background: #14141d; color: #fff; cursor: pointer; }
.mini:hover { border-color: #3a3a48; }
.mini.ok-btn { border-color: #1f5b3a; color: #3fd07f; }
.mini.cx { border-color: #5b1f28; color: #ff6b81; }
.copy.mini { color: #9ec2ff; }
.actions { white-space: nowrap; display: flex; gap: 6px; }
tr.st-cancelled td { opacity: .55; }
td .sub { font-size: 11px; color: #8a8a99; margin-top: 3px; white-space: nowrap; }
.muted { color: #8a8a99; }
.due { color: #f0b24a; font-weight: 600; white-space: nowrap; }
.linkcell { display: flex; align-items: center; gap: 8px; }
.paylink { color: #9ec2ff; text-decoration: none; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paylink:hover { text-decoration: underline; }
@media (max-width: 760px) { .cards { grid-template-columns: repeat(2, 1fr); } }

/* ---- Payment receipt ---- */
.receipt { background:#fff; color:#1a1a22; max-width:460px; text-align:left; }
.receipt .brand { color:#c01818; font-weight:800; text-align:center; font-size:20px; }
.rstatus { text-align:center; color:#1a8f4a; font-weight:700; margin:8px 0 2px; }
.receipt .amount { text-align:center; color:#1a8f4a; font-size:32px; font-weight:800; margin:4px 0 16px; }
.rsec { border:1px solid #e6e6ee; border-radius:10px; padding:12px 14px; margin:10px 0; }
.rsec-h { font-weight:700; color:#444; margin-bottom:8px; font-size:13px; text-transform:uppercase; letter-spacing:.3px; }
.rrow { display:flex; justify-content:space-between; gap:12px; padding:6px 0; border-bottom:1px dashed #ececf2; font-size:14px; }
.rrow:last-child { border-bottom:0; }
.rrow span { color:#8a8a99; }
.rrow b { color:#1a1a22; text-align:right; word-break:break-word; }
.rnext { text-align:center; margin-top:14px; }
.rnext h3 { margin:10px 0 6px; }
.rnext p { color:#555; font-size:14px; }
.rfoot { display:flex; flex-wrap:wrap; justify-content:center; gap:14px; margin-top:16px; padding-top:12px; border-top:1px solid #eee; color:#6b6b76; font-size:12px; }
@media print { .noprint, .topbar, nav { display:none !important; } body { background:#fff; } .receipt { box-shadow:none; border:0; max-width:none; } }
