/* iyrosolar Partner — "Switch on the Sun"
   Paper + ink + sun. One font (Poppins), weight does the hierarchy. */
:root {
  --paper: #f7f5f0;
  --paper-2: #efece4;
  --white: #ffffff;
  --ink: #18264a;          /* text */
  --ink-2: #5d6681;        /* secondary text (4.9:1 on paper) */
  --ink-3: #8a90a3;        /* tertiary, non-essential */
  --hair: rgba(24, 38, 74, 0.1);
  --navy: #2f5590;         /* logo blue */
  --navy-deep: #182c52;
  --sun: #fbb829;          /* logo gold */
  --sun-deep: #a86f00;     /* gold text on light (4.6:1) */
  --sun-glow: rgba(251, 184, 41, 0.28);
  --ok: #15803d;
  --bad: #c62828;
  --hold: #8a5a00;
  --font: "Poppins", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pad: clamp(20px, 6vw, 28px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--paper); }
body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.link { color: var(--navy); font-weight: 500; font-size: 14px; padding: 10px 0; min-height: 44px; }

.app { max-width: 480px; margin: 0 auto; position: relative; min-height: 100dvh; }
.screen { display: none; min-height: 100dvh; padding: calc(var(--safe-t) + 16px) var(--pad) calc(var(--safe-b) + 120px); }
.screen.active { display: block; animation: enter .45s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }

/* ---------- shared top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-bottom: 8px; }
.top-logo { height: 30px; width: auto; }
.top-title { font-size: 15px; font-weight: 500; }
.page-title { font-size: 30px; font-weight: 300; letter-spacing: -.02em; }
.plain-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); }
.plain-btn:active { background: var(--hair); }
.initials {
  width: 44px; height: 44px; border-radius: 50%; font-weight: 500; font-size: 15px;
  background: var(--navy-deep); color: var(--sun); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--hair);
}

/* ================= LOGIN ================= */
#screen-login { padding: 0; background: var(--paper); }
#screen-login.active { display: flex; flex-direction: column; }
.lg-hero {
  position: relative; overflow: hidden; color: #fff;
  padding: calc(var(--safe-t) + 22px) var(--pad) 84px;
  min-height: 40vh; display: flex; flex-direction: column;
  background: linear-gradient(160deg, #24447a 0%, var(--navy-deep) 75%);
  border-radius: 0 0 36px 36px;
}
.lg-sun { position: absolute; width: 230px; height: 230px; right: -90px; bottom: -40px; border-radius: 50%;
  background: radial-gradient(circle at 40% 60%, #ffd76a, #fbb829 45%, rgba(251, 184, 41, 0) 70%); opacity: .55; animation: rise 1.4s var(--ease) both; }
.lg-rays { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .18; }
.lg-logo { position: relative; align-self: flex-start; }
.lg-head { position: relative; margin-top: auto; padding-top: 30px; font-size: clamp(36px, 11vw, 46px); font-weight: 300; line-height: 1.08; letter-spacing: -.03em; }
.lg-head em { font-style: normal; font-weight: 600; color: var(--sun); }
.lg-sub { position: relative; margin-top: 10px; font-size: 14px; color: rgba(255, 255, 255, .7); }

.lg-sheet {
  position: relative; z-index: 2; margin: -52px 16px 24px; padding: 26px 22px 24px;
  background: #fff; border-radius: 26px; box-shadow: 0 24px 50px -24px rgba(24, 38, 74, .4);
}
.lg-title { font-size: 22px; font-weight: 600; }
.lg-text { font-size: 14px; color: var(--ink-2); margin: 4px 0 20px; }
.lg-text b { color: var(--ink); font-weight: 500; }
.lg-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.lg-field { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-radius: 16px; background: var(--paper); border: 1.5px solid transparent; transition: border-color .2s, background .2s; }
.lg-field:focus-within { border-color: var(--navy); background: #fff; }
.lg-prefix { font-weight: 500; color: var(--navy); padding-right: 12px; border-right: 1px solid var(--hair); }
.lg-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 18px; font-weight: 500; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.lg-btn { margin-top: 8px; width: 100%; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--navy-deep); color: #fff; font-weight: 500; font-size: 15px; box-shadow: 0 14px 28px -14px rgba(24, 44, 82, .7); transition: transform .15s var(--ease); }
.lg-btn .ic { width: 20px; height: 20px; color: var(--sun); }
.lg-btn:active { transform: scale(.98); }
.lg-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -10px 0 4px -6px; font-size: 14px; color: var(--navy); font-weight: 500; }
.lg-back .ic { width: 20px; height: 20px; }
.lg-otp { max-width: none; gap: 12px; margin-top: 0; }
.lg-otp input { height: 60px; border: 1.5px solid transparent; border-radius: 16px; background: var(--paper); font-size: 24px; font-weight: 500; }
.lg-otp input:focus { border-color: var(--navy); background: #fff; }
.lg-otp input.filled { border-color: var(--sun); background: #fff; }
.otp-foot { display: flex; align-items: center; gap: 12px; margin: 10px 0 6px; font-size: 13px; color: var(--ink-2); min-height: 44px; }
.lg-demo { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 14px; }
.u-error { min-height: 20px; color: var(--bad); font-size: 13px; margin-top: 6px; }
@keyframes rise { from { transform: translateY(60px); opacity: 0; } }
.rays line { stroke: var(--sun); stroke-width: 1.5; stroke-linecap: round; }
.otp { display: grid; grid-template-columns: repeat(4, 1fr); }
.otp input { width: 100%; min-width: 0; text-align: center; outline: 0; caret-color: var(--navy); }

/* ================= HOME ================= */
#screen-home { padding-top: 0; }

/* Zone 1 · hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  margin: 0 calc(var(--pad) * -1); padding: calc(var(--safe-t) + 14px) var(--pad) 64px;
  background: linear-gradient(160deg, #24447a 0%, var(--navy-deep) 70%);
  border-radius: 0 0 32px 32px;
}
.hero-glow { position: absolute; width: 320px; height: 320px; right: -120px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 184, 41, .45), transparent 65%); pointer-events: none; }
.hero-top { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.logo-chip { display: inline-flex; }
.logo-chip img { height: 30px; width: auto; display: block; } /* logo-white.png: white letters, gold SOLAR */
.hero .initials { background: var(--sun); color: var(--navy-deep); box-shadow: 0 0 0 3px rgba(255, 255, 255, .15); }
.hero-greet { position: relative; margin-top: 20px; font-size: 15px; color: rgba(255, 255, 255, .75); }
.hero-greet b { color: #fff; font-weight: 500; }
.hero-balance { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.hero-label { font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.hero-points { font-size: clamp(40px, 12vw, 50px); font-weight: 300; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tier-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 12px 4px 8px; border-radius: 99px; background: rgba(251, 184, 41, .16); color: var(--sun); font-size: 12px; font-weight: 500; }
.tier-chip .ic { width: 15px; height: 15px; }
.mini-dial { position: relative; width: 104px; height: 104px; flex-shrink: 0; }
.mini-dial svg { width: 100%; height: 100%; }
.mini-dial #dial-ticks { display: none; }
.mini-dial .dial-track { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 18; }
.mini-dial .dial-arc { fill: none; stroke: url(#g-gold); stroke-width: 18; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 150px 150px; transition: stroke-dashoffset 1.4s var(--ease); }
.mini-dial-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.mini-dial-val b { font-size: 20px; font-weight: 600; }
.mini-dial-val small { font-size: 10px; color: rgba(255, 255, 255, .6); }
.hero-next { position: relative; margin-top: 16px; font-size: 13px; color: rgba(255, 255, 255, .7); }
.hero-next b { color: var(--sun); font-weight: 600; }

/* Zone 2 · scan panel overlapping the hero */
.scan-panel {
  position: relative; z-index: 2; width: 100%; margin-top: -40px; display: flex; align-items: center; gap: 14px; text-align: left;
  background: #fff; border-radius: 22px; padding: 14px 14px 14px 14px;
  box-shadow: 0 20px 40px -18px rgba(24, 38, 74, .35); transition: transform .15s var(--ease);
}
.scan-panel:active { transform: scale(.98); }
.scan-panel-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--sun); color: var(--navy-deep); flex-shrink: 0; }
.scan-panel-ic .ic { width: 26px; height: 26px; stroke-width: 2; }
.scan-panel-txt { flex: 1; min-width: 0; }
.scan-panel-txt b { display: block; font-size: 16px; font-weight: 600; }
.scan-panel-txt small { font-size: 13px; color: var(--ink-2); }
.scan-panel-go { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-deep); color: #fff; flex-shrink: 0; }
.scan-panel-go .ic { width: 20px; height: 20px; }

/* Zones 3 & 4 */
.zone { margin-top: 28px; }
.zone-head { display: flex; align-items: center; justify-content: space-between; }
.zone-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.zone-head .zone-title { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-radius: 20px; box-shadow: 0 10px 30px -22px rgba(24, 38, 74, .4); }
.stat { padding: 16px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat + .stat { border-left: 1px solid var(--hair); }
.stat-val { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-lbl { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot.navy { background: var(--navy); } .dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }
.ledger-card { margin-top: 8px; background: #fff; border-radius: 20px; padding: 2px 16px; box-shadow: 0 10px 30px -22px rgba(24, 38, 74, .4); }
.ledger-card .entry:last-child { border-bottom: 0; }

/* ledger rows — timeline, not cards */
.ledger { list-style: none; }
.entry { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--hair); animation: enter .4s var(--ease) both; }
.entry-date { text-align: center; line-height: 1.1; }
.entry-date b { display: block; font-size: 20px; font-weight: 300; }
.entry-date span { font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.entry-main { min-width: 0; position: relative; padding-left: 14px; }
.entry-main::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--sun); }
.entry.invalid .entry-main::before { background: var(--bad); opacity: .6; }
.entry-main b { display: block; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-main span { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.entry-amt { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.entry-amt small { display: block; font-size: 11px; font-weight: 400; color: var(--ink-2); }
.entry.invalid .entry-amt { color: var(--bad); font-weight: 500; font-size: 12px; }
.empty { padding: 40px 0; text-align: center; color: var(--ink-2); font-size: 14px; }

.tabs-text { display: flex; gap: 22px; margin: 6px 0 4px; border-bottom: 1.5px solid var(--ink); }
.tabs-text button { position: relative; padding: 12px 0; min-height: 44px; font-size: 14px; color: var(--ink-2); }
.tabs-text button.active { color: var(--ink); font-weight: 500; }
.tabs-text button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1.5px; height: 3px; background: var(--sun); border-radius: 3px 3px 0 0; }

/* ================= NAV ================= */
.pillnav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 18px); z-index: 30;
  display: flex; align-items: center; gap: 6px; padding: 6px;
  background: rgba(24, 44, 82, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 99px; box-shadow: 0 18px 40px -14px rgba(24, 44, 82, .55);
}
.pillnav[hidden] { display: none; }
.pn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: rgba(255, 255, 255, .55); transition: color .2s, background .2s; }
.pn.active { color: #fff; background: rgba(255, 255, 255, .1); }
.pn-scan { width: auto; display: flex; gap: 8px; padding: 0 22px; border-radius: 99px; background: var(--sun); color: var(--navy-deep); font-weight: 600; font-size: 14px; }
.pn-scan .ic { stroke-width: 2; }
.pn:active { transform: scale(.95); }

/* ================= SCANNER ================= */
.screen-scan {
  position: relative; overflow: hidden; color: #fff;
  padding: calc(var(--safe-t) + 14px) 0 0;
  background: linear-gradient(170deg, #24447a 0%, var(--navy-deep) 55%, #0f1f3d 100%);
}
.screen-scan.active { display: flex; flex-direction: column; }
.sc-glow { position: absolute; width: 300px; height: 300px; right: -140px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 184, 41, .35), transparent 65%); pointer-events: none; }
.sc-top { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad); min-height: 48px; }
.sc-logo { height: 24px; width: auto; }
.sc-spacer { width: 48px; }
#btn-torch:not([hidden]) + .sc-spacer { display: none; }
.glass-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.glass-btn[aria-pressed="true"] { background: var(--sun); color: var(--navy-deep); border-color: var(--sun); }
.sc-head { position: relative; text-align: center; padding: 18px var(--pad) 0; }
.sc-head h1 { font-size: 24px; font-weight: 600; }
.sc-head p { font-size: 14px; color: rgba(255, 255, 255, .7); margin-top: 2px; }

.sc-window {
  position: relative; overflow: hidden; margin: 20px auto 0; width: min(calc(100% - 2 * var(--pad)), 340px); aspect-ratio: 1;
  border-radius: 30px; background: #0a1630; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
#reader { position: absolute; inset: 0; }
#reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
#reader img, #reader__dashboard, #reader__header_message, #qr-shaded-region { display: none !important; }
.viewfinder { position: absolute; inset: 15%; border-radius: 22px; box-shadow: 0 0 0 200px rgba(8, 18, 40, .5); pointer-events: none; }
.viewfinder .c { position: absolute; width: 38px; height: 38px; border: 4px solid var(--sun); }
.c.tl { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 22px 0 0 0; }
.c.tr { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-radius: 0 22px 0 0; }
.c.bl { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 22px; }
.c.br { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 22px 0; }
.sweep { position: absolute; left: 10%; right: 10%; top: 8%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--sun), transparent); box-shadow: 0 0 16px 2px var(--sun-glow); animation: sweep 2.4s ease-in-out infinite alternate; }
@keyframes sweep { to { top: 92%; } }
.viewfinder.hit .c { border-color: #4ade80; }
.viewfinder.hit .sweep { display: none; }

.scan-hint { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px var(--pad) 24px; font-size: 14px; color: rgba(255, 255, 255, .85); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .2); animation: pulse 1.6s ease-in-out infinite; flex-shrink: 0; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } }
.scan-hint.err { color: #ffd27a; }
.scan-hint.err .live-dot { background: var(--sun); box-shadow: none; animation: none; }

.sc-sheet {
  position: relative; margin-top: auto; padding: 10px var(--pad) calc(var(--safe-b) + 22px);
  background: var(--paper); color: var(--ink); border-radius: 30px 30px 0 0;
}
.grabber { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--hair); margin: 0 auto 14px; }
.sc-sheet-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.sc-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sc-opt { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 18px; background: #fff; text-align: left; cursor: pointer; box-shadow: 0 10px 24px -18px rgba(24, 38, 74, .5); border: 1.5px solid transparent; transition: border-color .2s, transform .15s var(--ease); }
.sc-opt:active { transform: scale(.98); }
.sc-opt[aria-expanded="true"] { border-color: var(--navy); }
.sc-opt-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(251, 184, 41, .18); color: var(--sun-deep); flex-shrink: 0; }
.sc-opt-ic .ic { width: 20px; height: 20px; }
.sc-opt-txt { min-width: 0; }
.sc-opt-txt b { display: block; font-size: 14px; font-weight: 500; }
.sc-opt-txt small { font-size: 11px; color: var(--ink-2); }
.manual { margin-top: 16px; animation: enter .3s var(--ease) both; }
.manual-row { display: flex; gap: 10px; }
.manual-row input { flex: 1; min-width: 0; height: 54px; padding: 0 16px; border-radius: 16px; border: 1.5px solid var(--navy); background: #fff; outline: 0; font-size: 17px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.manual-go { height: 54px; padding: 0 22px; border-radius: 16px; background: var(--navy-deep); color: #fff; font-weight: 500; }
.sc-tip { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 12px; color: var(--ink-2); }
.sc-tip .ic { width: 16px; height: 16px; color: var(--sun-deep); }

/* ================= RESULT ================= */
.verifying { text-align: center; padding-top: 16vh; }
.spin-seal { width: 110px; height: 110px; animation: spin 3s linear infinite; }
.spin-seal path { fill: none; stroke: var(--sun); stroke-width: 1.5; }
@keyframes spin { to { transform: rotate(360deg); } }
.verifying-t { font-size: 20px; font-weight: 300; margin-top: 22px; }
.verifying-c { color: var(--ink-2); font-size: 13px; letter-spacing: .08em; margin-top: 4px; word-break: break-all; }

.result { text-align: center; }
.seal { position: relative; width: 132px; height: 132px; margin: 18px auto 18px; animation: stamp .6s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes stamp { from { transform: scale(1.8) rotate(-25deg); opacity: 0; } }
.seal svg:first-child { width: 100%; height: 100%; }
.seal-edge { fill: url(#g-gold); }
.seal-inner { fill: none; stroke: rgba(24, 44, 82, .35); stroke-width: 1; stroke-dasharray: 2 3; }
.seal-ic { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); color: var(--navy-deep); stroke-width: 2.4; }
.seal.hold .seal-edge { fill: #e7e2d6; }
.seal.hold .seal-ic { color: var(--hold); }
.seal.bad .seal-edge { fill: none; stroke: var(--bad); stroke-width: 1.5; stroke-dasharray: 4 3; }
.seal.bad .seal-inner { stroke: rgba(198, 40, 40, .35); }
.seal.bad .seal-ic { color: var(--bad); }
.seal.bad, .seal.hold { animation: stamp .5s cubic-bezier(.2, 1.5, .4, 1) both, shake .45s .5s both; }
@keyframes shake { 25%, 75% { translate: -6px 0; } 50% { translate: 6px 0; } }

.result-kicker { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--sun-deep); }
.result-kicker.bad { color: var(--bad); } .result-kicker.hold { color: var(--hold); }
.result-title { font-size: 34px; font-weight: 300; letter-spacing: -.03em; line-height: 1.15; margin-top: 4px; }
.result-sub { color: var(--ink-2); font-size: 14px; max-width: 30ch; margin: 8px auto 0; }

.receipt {
  --notch: radial-gradient(circle at 8px 0, transparent 6px, #fff 6.5px);
  position: relative; margin: 26px 0 22px; padding: 18px 20px 10px; text-align: left; background: #fff;
  border-radius: 4px; box-shadow: 0 24px 40px -28px rgba(24, 38, 74, .45);
}
.receipt::before, .receipt::after { content: ""; position: absolute; left: 0; right: 0; height: 8px; background: radial-gradient(circle at 8px 8px, var(--paper) 5px, transparent 5.5px) 0 0 / 16px 16px repeat-x; }
.receipt::before { top: -4px; }
.receipt::after { bottom: -4px; background-position: 0 -8px; }
.r-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--hair); font-size: 14px; }
.r-row span { color: var(--ink-2); }
.r-row b { font-weight: 500; text-align: right; word-break: break-word; }
.r-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 8px; }
.r-total span { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.r-total b { font-size: 30px; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.btn-solid, .btn-line { display: flex; align-items: center; justify-content: center; width: 100%; height: 56px; border-radius: 99px; font-weight: 500; font-size: 15px; transition: transform .15s var(--ease); }
.btn-solid { background: var(--navy-deep); color: #fff; box-shadow: 0 14px 30px -14px rgba(24, 44, 82, .7); }
.btn-solid::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); margin-right: 12px; box-shadow: 0 0 10px var(--sun); }
.btn-line { margin-top: 10px; border: 1.5px solid var(--ink); }
.btn-solid:active, .btn-line:active { transform: scale(.98); }
.btn-solid:disabled { opacity: .5; }
.btn-solid[hidden] { display: none; }

/* ================= PROFILE ================= */
#screen-profile { padding-top: 0; }
.pf-hero { padding-bottom: 72px; }
.pf-id { position: relative; display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.pf-avatar { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 26px; font-weight: 500; color: var(--navy-deep);
  background: linear-gradient(135deg, #ffd76a, #fbb829 60%, #d9930a); box-shadow: 0 0 0 4px rgba(255, 255, 255, .14); }
.pf-who h1 { font-size: 22px; font-weight: 600; line-height: 1.2; }
.pf-who .tier-chip { margin-top: 6px; }
.pf-stats { position: relative; z-index: 2; margin-top: -42px; box-shadow: 0 20px 40px -18px rgba(24, 38, 74, .35); }
.dot.sun { background: var(--sun); }

.pf-card { background: #fff; border-radius: 20px; box-shadow: 0 10px 30px -22px rgba(24, 38, 74, .4); list-style: none; }
.pf-idcard { display: flex; align-items: center; gap: 16px; padding: 16px; }
.pf-idcard .badge-qr { width: 104px; height: 104px; margin: 0; padding: 6px; flex-shrink: 0; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair); }
.badge-qr img, .badge-qr canvas { width: 100% !important; height: 100% !important; }
.pf-idcard-txt { min-width: 0; }
.pf-idnum { display: block; font-size: 20px; font-weight: 600; letter-spacing: .06em; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.pf-idcard-txt p { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.pf-k { font-size: 12px; color: var(--ink-2); }

.pf-list { padding: 4px 16px; }
.pf-list li { display: flex; align-items: center; gap: 12px; min-height: 58px; border-bottom: 1px solid var(--hair); }
.pf-list li:last-child { border-bottom: 0; }
.pf-list li .pf-k { flex: 1; font-size: 14px; color: var(--ink); }
.pf-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; text-align: left; }
.pf-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: rgba(47, 85, 144, .08); color: var(--navy); }
.pf-ic .ic { width: 18px; height: 18px; }
.pf-v { font-size: 14px; font-weight: 500; text-align: right; }
.pf-chev { width: 18px; height: 18px; color: var(--ink-3); }
.pf-logout { margin-top: 14px; width: 100%; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: var(--bad); font-weight: 500; border: 1.5px solid rgba(198, 40, 40, .25); }
.pf-logout .ic { width: 20px; height: 20px; }
.version { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 22px; }

/* ================= TOAST ================= */
.toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 16px); transform: translate(-50%, -16px); opacity: 0; z-index: 60; pointer-events: none;
  background: var(--navy-deep); color: #fff; padding: 12px 20px; border-radius: 99px; font-size: 13px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 14px 30px -12px rgba(24, 44, 82, .6); transition: .3s var(--ease); }
.toast::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); margin-right: 10px; vertical-align: 1px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* camera status panel (inside the camera window) */
.cam-issue {
  position: absolute; inset: 12px; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff; color: var(--ink); border-radius: 22px; padding: 18px; text-align: center; animation: enter .35s var(--ease) both;
}
.cam-issue-ic { width: 48px; height: 48px; margin-bottom: 10px; border-radius: 50%; display: grid; place-items: center; background: rgba(251, 184, 41, .18); color: var(--sun-deep); }
.cam-issue-title { font-size: 16px; font-weight: 600; }
.cam-issue-msg { font-size: 13px; color: var(--ink-2); margin-top: 4px; word-break: break-word; }
.cam-retry { margin-top: 14px; height: 46px; padding: 0 24px; border-radius: 14px; background: var(--navy-deep); color: #fff; font-weight: 500; }

/* login footer */
.lg-foot { margin-top: auto; padding: 4px 16px calc(var(--safe-b) + 20px); }
.lg-trust { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-radius: 20px; padding: 14px 4px; box-shadow: 0 10px 30px -22px rgba(24, 38, 74, .4); }
.lg-trust li { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.3; padding: 0 6px; }
.lg-trust li + li { border-left: 1px solid var(--hair); }
.lg-trust-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(251, 184, 41, .18); color: var(--sun-deep); margin-bottom: 8px; }
.lg-trust-ic .ic { width: 17px; height: 17px; stroke-width: 2; }
.lg-trust b { font-size: 13px; font-weight: 600; color: var(--ink); }
.lg-trust small { font-size: 11px; color: var(--ink-2); }
.lg-help { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin-top: 14px; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.lg-help .ic { width: 16px; height: 16px; color: var(--navy); }
.lg-help b { color: var(--navy); font-weight: 500; }
.lg-legal { text-align: center; font-size: 11px; color: var(--ink-3); }
.lg-legal a { color: var(--ink-2); }
