/* EduLink Pay - school fees with telebirr. Bright, Material-style, mobile first (telebirr mini app). */
:root {
    --bg: #f6f8f7;
    --surface: #ffffff;
    --surface-2: #f1f5f3;
    --surface-3: #e7eeea;
    --line: #e3e9e6;
    --ink: #17201b;
    --ink-2: #3d4842;
    --muted: #6b7671;
    --primary: #0f9d58;
    --primary-dark: #0b7f47;
    --primary-container: #d7f5e3;
    --on-primary-container: #00391c;
    --blue: #1a73e8;
    --blue-container: #e2ecfd;
    --amber: #b06000;
    --amber-container: #fdf0d8;
    --red: #c5221f;
    --red-container: #fde4e3;
    --radius: 24px;
    --shadow-1: 0 1px 2px rgba(23, 32, 27, .06), 0 1px 3px 1px rgba(23, 32, 27, .04);
    --shadow-2: 0 2px 6px 2px rgba(23, 32, 27, .06), 0 1px 2px rgba(23, 32, 27, .08);
    color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
    font: 15px/1.5 "Plus Jakarta Sans", "Noto Sans Ethiopic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink); background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 120px; overflow-x: clip; }

/* Top bar + title -------------------------------------------------------- */
.hero { padding: 12px 18px 8px; background: var(--bg); position: sticky; top: 0; z-index: 10; }
.bar { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand img { width: 44px; height: 44px; background: transparent; padding: 0; box-shadow: none; border-radius: 0; }
.brand small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); letter-spacing: 0; }
.bar .grow { flex: 1; }
.icon-btn {
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 0;
    background: var(--surface); box-shadow: var(--shadow-1); color: var(--ink);
}
.icon-btn svg { width: 20px; height: 20px; }
.lang {
    border: 0; border-radius: 999px; padding: 9px 14px; background: var(--surface); box-shadow: var(--shadow-1);
    color: var(--ink-2); font-weight: 700; font-size: 13px;
    display: inline-flex; align-items: center; gap: 4px;
}
.hero h1 { margin: 18px 0 4px; font-size: 28px; line-height: 1.15; letter-spacing: -.035em; font-weight: 800; }
.hero p { margin: 0 0 6px; color: var(--muted); font-size: 15px; }
.hero h1:empty, .hero p:empty { display: none; }

/* Content ---------------------------------------------------------------- */
.content { padding: 12px 16px 0; }
.card { background: var(--surface); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow-1); }
.card h2 { font-size: 14px; margin: 0 0 8px; color: var(--ink-2); font-weight: 700; letter-spacing: -.01em; }
.view { animation: rise .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .view, .sheet, .sheet-bg { animation: none !important; } }

.search {
    display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 56px;
    background: var(--surface-2); border-radius: 999px; border: 2px solid transparent; transition: border-color .15s, background .15s;
}
.search:focus-within { border-color: var(--primary); background: var(--surface); }
.search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search input { border: 0; outline: 0; background: transparent; flex: 1; height: 100%; font-size: 15.5px; }
.search input::placeholder { color: var(--muted); }

.list { list-style: none; margin: 6px 0 0; padding: 0; }
.row {
    display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
    padding: 12px 10px; margin: 2px 0; border: 0; background: transparent; border-radius: 18px; transition: background .15s;
}
.row:hover, .row:active { background: var(--surface-2); }
.avatar {
    width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center;
    font-weight: 800; font-size: 16px; color: var(--c, var(--primary));
    background: color-mix(in srgb, var(--c, var(--primary)) 14%, #fff);
}
.row .t { flex: 1; min-width: 0; }
.row b { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row small { color: var(--muted); font-size: 13px; }
.chev { width: 18px; height: 18px; color: var(--muted); flex: none; }
.chip {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; background: var(--amber-container); color: var(--amber);
}
.chip.late { background: var(--red-container); color: var(--red); }
.chip.ok { background: var(--primary-container); color: var(--on-primary-container); }

.recent { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.recent::-webkit-scrollbar { display: none; }
.recent button {
    flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; padding: 6px 2px;
    border: 0; background: transparent; border-radius: 16px;
}
.recent button:active { background: var(--surface-2); }
.recent .avatar { width: 56px; height: 56px; font-size: 18px; }
.recent span { width: 100%; text-align: center; font-size: 11.5px; line-height: 1.25; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent span b { display: block; font-size: 13px; color: var(--ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }

/* Student ID ------------------------------------------------------------- */
.school-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.school-head b { display: block; font-size: 16.5px; font-weight: 800; letter-spacing: -.015em; }
.school-head small { color: var(--muted); font-size: 13px; }
label.big { display: block; font-weight: 700; font-size: 14px; color: var(--ink-2); margin: 0 0 8px 4px; }
.id-input {
    width: 100%; height: 64px; border-radius: 20px; border: 2px solid var(--line); background: var(--surface-2);
    padding: 0 20px; font-size: 22px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; outline: 0;
    transition: border-color .15s, background .15s;
}
.id-input:focus { border-color: var(--primary); background: var(--surface); }
.hint { color: var(--muted); font-size: 13px; margin: 12px 4px 0; display: flex; gap: 8px; align-items: flex-start; }
.hint svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--primary); }

.btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px;
    border: 0; border-radius: 999px; font-weight: 800; font-size: 16px; letter-spacing: -.01em;
    background: var(--primary); color: #fff; box-shadow: 0 4px 14px -4px rgba(15, 157, 88, .55);
    transition: transform .12s, background .12s, box-shadow .12s, opacity .12s;
}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; box-shadow: none; }
.btn.ghost { background: var(--surface-2); color: var(--ink); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.pay { background: var(--primary); }
.btn svg { width: 22px; height: 22px; }
.mt { margin-top: 12px; }

/* Bill: student card + numbers ----------------------------------------- */
.idcard {
    position: relative; overflow: hidden; border-radius: 28px; padding: 20px; margin-bottom: 14px;
    background: var(--primary-container); color: var(--on-primary-container);
}
.idcard::after {
    content: ""; position: absolute; right: -50px; bottom: -70px; width: 200px; height: 200px; border-radius: 50%;
    background: rgba(15, 157, 88, .12);
}
.idcard .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; position: relative; z-index: 1; }
.idcard .top span { font-size: 12.5px; font-weight: 700; opacity: .75; }
.idcard .top img { width: 28px; height: 28px; border-radius: 9px; background: #fff; padding: 2px; }
.idcard .who { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.idcard .photo {
    width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none;
    font-weight: 800; font-size: 22px; color: #fff; background: var(--primary); box-shadow: 0 4px 12px -4px rgba(15, 157, 88, .6);
}
.idcard .name { font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.idcard .meta { font-size: 13.5px; opacity: .8; margin-top: 2px; }
.idcard .no {
    display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em;
    padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .7);
}
.idcard .school { display: none; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface-2); border-radius: 18px; padding: 12px 14px; }
.stat small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat.left { background: var(--amber-container); }
.stat.left small, .stat.left b { color: var(--amber); }
.meter { margin-top: 14px; }
.meter .track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter .fill { height: 100%; border-radius: 99px; background: var(--primary); width: 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.meter .pct { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }

.fee { display: flex; align-items: center; gap: 14px; padding: 14px 8px; margin: 2px -8px; border-radius: 18px; cursor: pointer; user-select: none; transition: background .15s; }
.fee:hover { background: var(--surface-2); }
.fee input { position: absolute; opacity: 0; pointer-events: none; }
.tick {
    width: 24px; height: 24px; border-radius: 8px; border: 2px solid #b9c4be; flex: none; display: grid; place-items: center;
    transition: background .15s, border-color .15s;
}
.tick svg { width: 16px; height: 16px; color: #fff; opacity: 0; transform: scale(.5); transition: .15s; }
.fee input:checked + .tick { background: var(--primary); border-color: var(--primary); }
.fee input:checked + .tick svg { opacity: 1; transform: none; }
.fee input:focus-visible + .tick { box-shadow: 0 0 0 4px var(--primary-container); }
.fee .t { flex: 1; min-width: 0; }
.fee .t b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.fee .t small { color: var(--muted); font-size: 12.5px; }
.fee .amt { font-weight: 800; font-size: 15px; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.all { display: flex; justify-content: space-between; align-items: center; }
.all h2 { margin: 0; }
.link { border: 0; background: var(--primary-container); color: var(--on-primary-container); font-weight: 700; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; }

.empty { text-align: center; padding: 12px 8px 4px; }
.ring { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; color: var(--primary); background: var(--primary-container); }
.ring svg { width: 34px; height: 34px; }
.ring.bad { color: var(--red); background: var(--red-container); }
.empty b { font-size: 18px; display: block; font-weight: 800; }
.empty p { color: var(--muted); margin: 6px 0 0; }

/* Pay bar ----------------------------------------------------------------- */
.paybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); box-shadow: 0 -4px 20px rgba(23, 32, 27, .08);
    border-radius: 28px 28px 0 0;
}
.paybar .in { max-width: 448px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.paybar .sum small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.paybar .sum b { font-size: 21px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.paybar .btn { flex: 1; }

/* Test payment sheet ---------------------------------------------------- */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(23, 32, 27, .4); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
    width: 100%; max-width: 480px; background: var(--surface); border-radius: 32px 32px 0 0;
    padding: 12px 20px calc(22px + env(safe-area-inset-bottom)); animation: up .3s cubic-bezier(.2, .8, .2, 1);
}
@keyframes up { from { transform: translateY(100%); } }
.sheet .grab { width: 40px; height: 4px; border-radius: 9px; background: var(--surface-3); margin: 0 auto 18px; }
.sheet .test-tag { text-align: center; }
.sheet .amount { text-align: center; font-size: 36px; font-weight: 800; letter-spacing: -.04em; margin: 12px 0 2px; font-variant-numeric: tabular-nums; }
.sheet .to { text-align: center; color: var(--muted); margin-bottom: 18px; }

/* Waiting / done --------------------------------------------------------- */
.center { text-align: center; padding: 20px 6px 6px; }
.spinner { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%; border: 5px solid var(--primary-container); border-top-color: var(--primary); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center b.title { font-size: 20px; display: block; font-weight: 800; letter-spacing: -.02em; }
.center p { color: var(--muted); margin: 6px 0 0; }

.success-mark { width: 88px; height: 88px; margin: 4px auto 14px; display: block; }
.success-mark circle { fill: var(--primary); stroke: none; transform-origin: center; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.success-mark path { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.paid-amount { font-size: 36px; font-weight: 800; letter-spacing: -.045em; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.alert { border-radius: 18px; padding: 12px 14px; font-size: 13.5px; margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.alert svg { width: 20px; height: 20px; flex: none; }
.alert.err { background: var(--red-container); color: var(--red); }
.alert.test { background: var(--amber-container); color: var(--amber); }

.skeleton { height: 64px; border-radius: 18px; margin: 8px 0; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media print {
    @page { margin: 12mm; }
    body, body.is-home { background: #fff !important; }
    .hero, .paybar, .tabbar, .no-print { display: none !important; }
    .app { padding: 0 !important; }
    .content { padding: 0; }
    .card { box-shadow: none; break-inside: avoid; }
    .paper { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
.logo {
    position: relative; width: 84px; height: 84px; border-radius: 24px; flex: none; display: grid; place-items: center; overflow: hidden;
    background: #fff; box-shadow: var(--shadow-1);
}
.logo i { font-style: normal; font-weight: 800; font-size: 26px; color: var(--c, var(--primary)); }
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; background: #fff; }
.logo.sm { width: 52px; height: 52px; border-radius: 16px; }
.logo.sm i { font-size: 17px; }
.logo.sm img { padding: 5px; }
.logo.xs { width: 34px; height: 34px; border-radius: 11px; }
.logo.xs i { font-size: 12px; }
.logo.xs img { padding: 3px; }

/* Home (welcome, students, schools) and bottom tabs ------------------- */
body.has-tabs .app { padding-bottom: 110px; }
.brand em { font-style: normal; color: var(--primary); }
body.is-home .brand { font-size: 24px; gap: 12px; }
body.is-home .brand img { width: 56px; height: 56px; }
.lang svg { width: 16px; height: 16px; }

.welcome { position: relative; min-height: 150px; margin: 0 -16px 0; display: flex; align-items: center; padding: 6px 16px 0; }
body.is-home .hero { background: transparent; position: relative; z-index: 3; }
.w-text { position: relative; z-index: 2; max-width: 52%; }
body.is-home .welcome + .sec-head { margin-top: 16px; }
.welcome h1 { margin: 0; font-size: 34px; line-height: 1.12; letter-spacing: -.035em; font-weight: 800; }
.welcome h1 em { display: block; font-style: normal; color: var(--primary); }
.w-art { position: absolute; right: 0; top: -10px; width: 50%; height: 156px; z-index: 1; pointer-events: none; }
/* As in the design: a small dark-green curve in the top-right corner, pale green shapes, the photo in a soft blob. */
.w-swoosh {
    position: absolute; right: -62px; top: -34px; width: 118px; height: 210px; border-radius: 50%;
    background: linear-gradient(200deg, #0b7f47 0%, #0f9d58 60%, #36b874 100%);
}
.w-glow {
    position: absolute; left: -14%; top: 34%; width: 62%; height: 80%; border-radius: 50%;
    background: radial-gradient(closest-side, #d3f1df, rgba(211, 241, 223, 0));
}
.w-photo {
    position: absolute; left: 4%; right: 8px; top: 8px; bottom: 4px; overflow: hidden;
    border-radius: 54% 46% 40% 60% / 58% 48% 52% 42%;
    background: radial-gradient(ellipse at 50% 15%, #f3f9ec 0%, #d6efd9 40%, #a9dcb8 80%, #8fd2a6 100%);
    box-shadow: inset 0 0 0 1px rgba(15, 157, 88, .12);
}
.w-photo img { position: absolute; left: 52%; top: 5%; transform: translateX(-50%); height: 142%; width: auto; max-width: none; }
.w-spark { position: absolute; left: 18%; top: -16px; width: 30px; height: 30px; }
.w-tick { position: absolute; left: -2%; bottom: 0; width: 22px; height: 15px; }
body.is-home { background: linear-gradient(180deg, #e6f6ec 0, #f0f8f3 260px, var(--bg) 480px) no-repeat, var(--bg); }

.sec-head { display: flex; justify-content: space-between; align-items: center; margin: 18px 2px 10px; }
.sec-head h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }

.kids { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.kids::-webkit-scrollbar { display: none; }
.kid {
    flex: none; width: 92px; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: 6px 5px; background: var(--surface); border: 2px solid transparent; border-radius: 16px;
    box-shadow: var(--shadow-1); transition: transform .12s, border-color .15s;
}
.kid:active { transform: scale(.97); }
.kid.on { border-color: #9fe0bb; }
.kid .avatar { width: 35px; height: 35px; font-size: 12.5px; margin-bottom: 5px; }
.kid b { font-size: 12px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kid small { font-size: 10px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kid .chip { margin-top: 6px; }

.big-search { margin-top: 14px; background: var(--surface); box-shadow: var(--shadow-1); }

.schools { display: flex; flex-direction: column; gap: 10px; }
.school {
    display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 14px;
    background: var(--surface); border: 2px solid transparent; border-radius: 20px; box-shadow: var(--shadow-1); transition: border-color .15s, transform .12s;
}
.school:hover { border-color: #b9e8cc; }
.school:active { transform: scale(.985); }
.school .t { flex: 1; min-width: 0; }
.school b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.school small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; }
.school small svg { width: 13px; height: 13px; }
.school .logo.sm { border-radius: 50%; }
.verified { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 6px; border-radius: 999px; background: var(--primary-container); color: var(--on-primary-container); font-size: 12px; font-weight: 700; }
.verified svg { width: 16px; height: 16px; color: var(--primary); }

.ring.sm { width: 44px; height: 44px; margin: 0; flex: none; }
.ring.sm svg { width: 22px; height: 22px; }

.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; justify-content: center;
    padding: 6px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
    border-radius: 26px 26px 0 0; box-shadow: 0 -4px 22px rgba(23, 32, 27, .08);
}
.tabbar button {
    flex: 1; max-width: 150px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 4px;
    border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 700; position: relative;
}
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--primary); }
.tabbar button.on::before { content: ""; position: absolute; top: -6px; width: 44px; height: 4px; border-radius: 0 0 4px 4px; background: var(--primary); }
body.has-tabs .paybar { display: none; }

/* Success screen as a paper receipt ------------------------------------- */
.paper {
    position: relative; margin: 14px 4px 22px; padding: 22px 20px 20px; background: #fff;
    border-radius: 6px; box-shadow: 0 10px 30px -14px rgba(23, 32, 27, .35);
}
/* Faint logo watermark behind the details */
.p-wm { position: absolute; left: 50%; top: 58%; width: 220px; height: 220px; transform: translate(-50%, -50%); opacity: .05; pointer-events: none; filter: grayscale(1); }
.paper > .p-sec, .paper > .p-total, .paper > .p-seal { position: relative; z-index: 1; }
/* Torn-paper zig-zag edges */
.paper::before, .paper::after {
    content: ""; position: absolute; left: 0; right: 0; height: 12px;
    background: linear-gradient(135deg, #fff 6px, transparent 0) 0 0 / 14px 12px repeat-x,
                linear-gradient(-135deg, #fff 6px, transparent 0) 0 0 / 14px 12px repeat-x;
}
.paper::after { bottom: -11px; }
.paper::before { top: -11px; transform: rotate(180deg); }
.p-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 2px dashed var(--line); }
.p-head img { width: 42px; height: 42px; }
.p-head b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.p-head b em { font-style: normal; color: var(--primary); }
.p-head small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.p-no { margin-left: auto; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--muted); background: var(--surface-2); padding: 5px 10px; border-radius: 8px; }
.p-hero {
    text-align: center; padding: 20px 0 18px; margin: 0 -20px; position: relative;
    background: radial-gradient(ellipse at 50% 0%, rgba(15, 157, 88, .10), transparent 70%);
}
.p-hero .success-mark { width: 64px; height: 64px; margin: 0 auto 8px; }
.p-hero span { display: block; font-weight: 700; color: var(--ink-2); font-size: 14px; }
.p-hero .paid-amount { margin: 2px 0 2px; font-size: 38px; }
.p-hero small { color: var(--muted); font-weight: 600; }
.p-sec { padding: 6px 0 8px; border-top: 1px solid var(--surface-3); }
.p-sec h4 { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); font-weight: 800; }
.p-sec h4 svg { width: 16px; height: 16px; }
.p-sec .r { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 14px; }
.p-sec .r span { color: var(--muted); font-weight: 600; }
.p-sec .r b { text-align: right; font-weight: 800; word-break: break-word; }
.p-sec .r b.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 13px; }
.p-total {
    display: flex; justify-content: space-between; align-items: center; margin: 10px -6px 0; padding: 14px 16px; border-radius: 14px;
    background: linear-gradient(135deg, #0f9d58, #0b7f47); color: #fff;
}
.p-total span { font-weight: 700; font-size: 14px; opacity: .9; }
.p-total b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.p-seal { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 14px 104px 6px 0; border-top: 2px dashed var(--line); color: var(--muted); font-size: 12px; font-weight: 600; }
.p-seal svg { width: 34px; height: 34px; color: var(--primary); flex: none; }
.p-seal b { display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13.5px; font-weight: 800; }
/* Rubber stamp */
.p-stamp {
    position: absolute; right: 18px; bottom: 6px; z-index: 2; width: 92px; height: 92px; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-16deg);
    border: 4px double rgba(15, 157, 88, .75); color: rgba(15, 157, 88, .8); pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, .6) 60%, transparent 61%);
}
.p-stamp span { font-size: 22px; font-weight: 900; letter-spacing: .12em; line-height: 1; }
.p-stamp small { font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; margin-top: 4px; }
.p-stamp.test { border-color: rgba(176, 96, 0, .7); color: rgba(176, 96, 0, .8); }

/* QR code on the receipt, and the check result shown when it is scanned */
.p-qr { flex: none; width: 92px; height: 92px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.p-qr svg { width: 100%; height: 100%; display: block; }
.p-seal b svg { width: 18px; height: 18px; flex: none; }
.p-seal em { display: block; font-style: normal; color: var(--primary); font-weight: 700; margin-top: 4px; }
.verdict { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; margin: 4px 0 6px; font-size: 13.5px; font-weight: 600; }
.verdict svg { width: 26px; height: 26px; flex: none; }
.verdict b { display: block; font-size: 16px; font-weight: 800; }
.verdict.ok { background: var(--primary-container); color: var(--on-primary-container); }
.verdict.ok svg { color: var(--primary); }
.verdict.bad { background: var(--red-container); color: var(--red); }
.p-stamp.bad { border-color: rgba(197, 34, 31, .7); color: rgba(197, 34, 31, .8); }

/* Campus page: the school as a profile card */
.sprofile { position: relative; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-1); overflow: hidden; margin: 4px 0 6px; padding: 0 18px 18px; }
.sp-cover {
    height: 78px; margin: 0 -18px;
    background: radial-gradient(circle at 20% 120%, #bfeacf 0, transparent 55%), radial-gradient(circle at 90% -20%, #c9f0d8 0, transparent 50%), #e6f6ec;
}
.sprofile .logo { width: 76px; height: 76px; border-radius: 22px; margin-top: -38px; border: 4px solid #fff; box-shadow: 0 6px 16px -8px rgba(23, 32, 27, .35); }
.sp-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 10px; }
.sp-t { min-width: 0; }
.sp-t b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.sp-t small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.sp-t small svg { width: 13px; height: 13px; color: var(--primary); }
.sp-n { display: flex; align-items: center; gap: 6px; flex: none; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; }
.sp-n svg { width: 16px; height: 16px; color: var(--primary); }
.sp-n b { color: var(--ink); font-size: 15px; font-weight: 800; }
/* Campus cards */
.campuses { display: flex; flex-direction: column; gap: 12px; }
.campus {
    position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 14px 14px 16px;
    background: var(--surface); border: 2px solid transparent; border-radius: 22px; box-shadow: var(--shadow-1); overflow: hidden;
    animation: slide .4s cubic-bezier(.2, .8, .2, 1) both; transition: transform .12s, border-color .15s, box-shadow .15s;
}
@keyframes slide { from { opacity: 0; transform: translateX(24px); } }
.campus::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c); }
.campus:hover { border-color: color-mix(in srgb, var(--c) 30%, transparent); box-shadow: var(--shadow-2); }
.campus:active { transform: scale(.98); }
.campus.main { background: linear-gradient(135deg, #f0faf4, #ffffff 60%); border-color: #b9e8cc; }
.c-ic { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.c-ic svg { width: 26px; height: 26px; }
.campus .t { flex: 1; min-width: 0; }
.campus b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.campus small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.c-tag { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--primary); color: #fff; }
.c-go { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--c); color: #fff; box-shadow: 0 4px 10px -4px var(--c); }
.c-go .chev { color: #fff; width: 18px; height: 18px; }
.logo.c-pic { width: 50px; height: 50px; border-radius: 16px; box-shadow: none; border: 1px solid var(--line); }
.logo.c-pic img { padding: 4px; }
