:root {
  --bg: #f4f6f9; --panel: #ffffff; --ink: #172033; --muted: #5d6b82; --line: #e1e6ee; --line2: #eef1f6;
  --brand: #0f766e; --brand-ink: #ffffff; --brand-soft: #e6f4f2; --nav: #0f1b2d; --nav-ink: #c9d3e3; --nav-active: #1d2d46;
  --ok: #15803d; --ok-bg: #e8f6ed; --warn: #b45309; --warn-bg: #fdf3e2; --bad: #b91c1c; --bad-bg: #fdecec;
  --info: #1d4ed8; --info-bg: #e9effd; --neutral-bg: #eef1f5; --violet: #6d28d9; --violet-bg: #f1ebfd;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }
code, .mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grow { flex: 1; }

/* layout */
.shell { display: grid; grid-template-columns: 232px 1fr; height: 100vh; }
.nav { background: var(--nav); color: var(--nav-ink); display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .2px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: #8fa1bd; letter-spacing: .3px; }
.nav-group { padding: 10px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: #7186a6; }
.nav a { display: flex; align-items: center; justify-content: space-between; color: var(--nav-ink); padding: 8px 12px; margin: 1px 8px; border-radius: 7px; font-size: 13.5px; }
.nav a:hover { background: var(--nav-active); text-decoration: none; color: #fff; }
.nav a.active { background: var(--nav-active); color: #fff; box-shadow: inset 3px 0 0 #2dd4bf; }
.nav .badge { background: #2dd4bf22; color: #5eead4; border-radius: 999px; padding: 0 7px; font-size: 11px; }
.nav-foot { margin-top: auto; padding: 14px 18px; font-size: 11px; color: #6b7f9e; }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 10px 22px; background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar .org { font-weight: 600; }
.content { padding: 20px 22px 40px; overflow-y: auto; flex: 1; }
.content.flush { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* env switch */
.env { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.env button { border: 0; background: transparent; padding: 5px 10px; font-size: 12px; cursor: pointer; color: var(--muted); }
.env button.on { background: var(--brand); color: #fff; }
.env button.on.sandbox { background: var(--warn); }
.sandbox-banner { background: var(--warn-bg); color: var(--warn); text-align: center; font-size: 12px; padding: 4px; border-bottom: 1px solid #f5d9a8; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 14px; }
.grid.k { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: 2fr 1fr; }
@media (max-width: 1100px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }
.kpi { padding: 14px 16px; cursor: pointer; transition: border-color .15s; }
.kpi:hover { border-color: var(--brand); }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 12.5px; }
.kpi.accent-warn .v { color: var(--warn); } .kpi.accent-bad .v { color: var(--bad); } .kpi.accent-ok .v { color: var(--ok); } .kpi.accent-info .v { color: var(--info); }

/* tables */
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fafbfd; white-space: nowrap; }
.t td { padding: 9px 12px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: #f7faff; }
.t td.num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--muted); }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.info { background: var(--info-bg); color: var(--info); }
.pill.violet { background: var(--violet-bg); color: var(--violet); } .pill.brand { background: var(--brand-soft); color: var(--brand); }
/* Voucher type shown bold ahead of its number: CK 00500100 */
.vtype { display: inline-block; font-weight: 800; letter-spacing: .4px; color: var(--ink); background: var(--brand-soft); border: 1px solid #b9e3dd; border-radius: 5px; padding: 0 5px; font-size: .92em; }
h1 .vtype { font-size: .85em; padding: 1px 7px; }
.chip { display: inline-block; background: var(--neutral-bg); border-radius: 6px; padding: 1px 7px; font-size: 11.5px; margin: 1px 2px 1px 0; color: var(--muted); }

/* forms */
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { font: inherit; width: 100%; padding: 7px 10px; border: 1px solid #cfd6e1; border-radius: 7px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid #99e0d6; border-color: var(--brand); }
textarea { min-height: 70px; resize: vertical; }
textarea.code { font-family: var(--mono); font-size: 12px; min-height: 220px; }
input[type=checkbox] { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.field { min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cfd6e1; background: #fff; color: var(--ink); padding: 7px 13px; border-radius: 7px; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #9aa7bb; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #0d655e; }
.btn.danger { color: var(--bad); border-color: #f0c2c2; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.warn { background: #fff; color: var(--warn); border-color: #f1cf9a; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.link { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 500; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { background: linear-gradient(150deg, #0f1b2d 0%, #12324a 55%, #0f766e 100%); color: #e6eef8; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-hero h1 { font-size: 34px; line-height: 1.15; margin: 18px 0 14px; color: #fff; }
.login-hero p { color: #b8c7dc; max-width: 460px; }
.login-hero ul { padding-left: 18px; color: #c8d5e8; }
.login-form { display: grid; place-items: center; padding: 40px; }
.login-form .card { width: 100%; max-width: 400px; padding: 28px; }
.demo-users { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.demo-users button { text-align: left; border: 1px solid var(--line); background: #fafbfd; border-radius: 7px; padding: 6px 8px; cursor: pointer; font-size: 12px; }
.demo-users button:hover { border-color: var(--brand); }
.demo-users b { display: block; font-size: 12px; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login-hero { display: none; } .shell { grid-template-columns: 1fr; } .nav { display: none; } }

/* ETJ workspace */
.etj-head { background: var(--panel); border-bottom: 1px solid var(--line); padding: 12px 20px; }
.etj-head .title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.etj-head .title h1 { font-size: 18px; }
.etj-meta { display: flex; gap: 22px; margin-top: 8px; flex-wrap: wrap; font-size: 13px; }
.etj-meta div span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.etj-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stage-track { display: flex; align-items: center; gap: 0; margin-top: 10px; overflow-x: auto; }
.stage { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.stage .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c6cfdc; background: #fff; display: grid; place-items: center; font-size: 10px; color: #fff; }
.stage.done .dot { background: var(--ok); border-color: var(--ok); }
.stage.current .dot { border-color: var(--info); box-shadow: 0 0 0 3px #dbe6fd; }
.stage.current { color: var(--info); font-weight: 600; }
.stage.done { color: var(--ink); }
.stage-sep { width: 26px; height: 2px; background: #d7dee8; margin: 0 6px; flex-shrink: 0; }
.split { display: grid; grid-template-columns: minmax(380px, 44%) 1fr; flex: 1; min-height: 0; }
.split > section { min-height: 0; overflow-y: auto; }
.split .left { border-right: 1px solid var(--line); background: var(--bg); }
.split .right { display: flex; flex-direction: column; background: #e9edf3; overflow: hidden; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .split .right { min-height: 600px; } }
.tabs { display: flex; gap: 2px; padding: 0 14px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 11px 12px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.tabs .count { background: var(--neutral-bg); border-radius: 999px; padding: 0 6px; font-size: 11px; margin-left: 4px; }
.tabs .count.bad { background: var(--bad-bg); color: var(--bad); }
.pane { padding: 14px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.check-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line2); }
.check-item:last-child { border-bottom: 0; }
.check-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.check-icon.RECEIVED { background: var(--ok-bg); color: var(--ok); }
.check-icon.WAIVED { background: var(--violet-bg); color: var(--violet); }
.check-icon.MISSING { background: var(--bad-bg); color: var(--bad); }
.check-icon.OPTIONAL { background: var(--neutral-bg); color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.timeline li.bad::before { border-color: var(--bad); }
.timeline .when { font-size: 11.5px; color: var(--muted); }
.doc-rail { display: flex; gap: 6px; padding: 10px 12px; background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; flex-shrink: 0; align-items: center; }
.doc-tab { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 12px; white-space: nowrap; text-align: left; }
.doc-tab small { display: block; color: var(--muted); font-size: 10.5px; }
.doc-tab.on { border-color: var(--brand); background: var(--brand-soft); }
.doc-tab.missing { border-style: dashed; color: var(--bad); background: #fff8f8; }
.viewer { flex: 1; position: relative; min-height: 0; display: flex; }
.viewer iframe, .viewer img { flex: 1; width: 100%; height: 100%; border: 0; background: #fff; object-fit: contain; }
.viewer .drop-hint { margin: auto; text-align: center; color: var(--muted); padding: 40px; }
.viewer.dragover::after { content: 'Drop to upload'; position: absolute; inset: 12px; border: 3px dashed var(--brand); border-radius: 12px; background: rgba(15,118,110,.08); display: grid; place-items: center; font-size: 18px; color: var(--brand); font-weight: 700; }
.doc-info { background: var(--panel); border-top: 1px solid var(--line); padding: 10px 14px; font-size: 12.5px; flex-shrink: 0; max-height: 40%; overflow-y: auto; }
.doc-info .row { gap: 16px; }
.hash { font-family: var(--mono); font-size: 11px; color: var(--muted); word-break: break-all; }
.integrity-ok { color: var(--ok); font-weight: 600; } .integrity-bad { color: var(--bad); font-weight: 600; }

/* dropzone */
.dropzone { border: 2px dashed #c4cdda; border-radius: 12px; padding: 30px; text-align: center; background: #fbfcfe; cursor: pointer; transition: all .15s; color: var(--muted); }
.dropzone.dragover, .dropzone:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.dropzone b { color: var(--ink); }

/* lines editor */
.lines td { padding: 4px 6px; }
.lines input { padding: 5px 7px; }
.balance { font-weight: 600; }
.balance.ok { color: var(--ok); } .balance.bad { color: var(--bad); }

/* modal & toast */
.modal-back { position: fixed; inset: 0; background: rgba(15,27,45,.45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { max-width: 860px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line2); display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line2); display: flex; justify-content: flex-end; gap: 8px; }
.x { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--nav); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); max-width: 420px; font-size: 13px; animation: slide .2s ease-out; }
.toast.bad { background: var(--bad); } .toast.ok { background: var(--ok); }
@keyframes slide { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.secret-box { background: #0f1b2d; color: #5eead4; font-family: var(--mono); padding: 12px; border-radius: 8px; word-break: break-all; font-size: 12.5px; }
.callout { border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.callout.warn { background: var(--warn-bg); color: #7c3d06; }
.callout.bad { background: var(--bad-bg); color: #7f1414; }
.callout.ok { background: var(--ok-bg); color: #0f5a2b; }
.callout.info { background: var(--info-bg); color: #1e3a8a; }
.bar { height: 8px; background: var(--line2); border-radius: 999px; overflow: hidden; display: flex; }
.bar span { display: block; height: 100%; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 10px 12px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #cfd6e1; border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 40px; text-align: center; color: var(--muted); }
pre.json { background: #f6f8fb; border: 1px solid var(--line); padding: 10px; border-radius: 8px; font-size: 11.5px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-all; }

/* ---- session lifecycle screens (adapted from PayGloball's session-expired / profile-switcher design) ---- */
.who-screen { position: fixed; inset: 0; background: #07131a; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 24px; z-index: 70; }
.who-glow { position: absolute; inset: -20%; pointer-events: none; background: radial-gradient(circle at 50% 22%, #14b8a6 0%, #0f766e 12%, #0b4440 28%, #07131a 50%); animation: whoBreathe 9s ease-in-out infinite; }
@keyframes whoBreathe { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .who-glow { animation: none; } }
.who-screen > * { position: relative; z-index: 1; }
.who-screen .brand { color: #fff; padding: 0; }
.who-msg { color: #cbd5e1; font-size: 14px; margin: 0; text-align: center; max-width: 380px; }
.who-tiles { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.who-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; background: transparent; border: 0; cursor: pointer; padding: 8px; color: #f8fafc; }
.who-avatar { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; font-weight: 700; color: #fff; border: 3px solid #14b8a6; box-shadow: 0 0 0 3px rgba(20,184,166,.25); }
.who-avatar.other { background: transparent; border: 2px dashed #334155; box-shadow: none; color: #64748b; font-size: 40px; font-weight: 400; }
.who-tile:hover .who-avatar, .who-tile:focus-visible .who-avatar { transform: scale(1.04); transition: transform .15s; }
.who-name { font-size: 15px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.65); }
.who-sub { font-size: 12px; color: #ccfbf1; margin-top: 2px; }
.who-link { background: transparent; border: 0; color: #94a3b8; font-size: 13px; cursor: pointer; text-decoration: underline; }
/* profile menu */
.profile-btn { display: flex; align-items: center; gap: 8px; background: transparent; border: 1px solid transparent; border-radius: 999px; padding: 3px 10px 3px 3px; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.profile-btn:hover, .profile-btn[aria-expanded="true"] { border-color: var(--line); background: #fafbfd; }
.mini-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.profile-menu { position: absolute; right: 22px; top: 54px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(15,27,45,.16); min-width: 230px; padding: 6px; z-index: 40; }
.profile-menu .pm-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line2); margin-bottom: 4px; }
.profile-menu button, .profile-menu a { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.profile-menu button:hover, .profile-menu a:hover { background: var(--bg); text-decoration: none; }

/* Jackets: browse year › month › jacket */
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.crumbs b { color: var(--ink, inherit); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tile { display: block; padding: 14px 16px; color: inherit; transition: border-color .15s; }
.tile:hover { border-color: var(--brand); }
.tile-title { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.tile-bar { height: 6px; border-radius: 3px; background: var(--neutral-bg); margin: 10px 0 4px; overflow: hidden; }
.tile-bar span { display: block; height: 100%; background: var(--ok); }
.tick { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 12px; font-weight: 700; vertical-align: middle; }
.kpi .v.small-v { font-size: 18px; }
.span2 { grid-column: 1 / -1; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.seg { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.seg label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.goto { display: flex; align-items: center; }
.goto input { width: 210px; max-width: 40vw; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; background: var(--panel); color: inherit; }
@media (max-width: 720px) { .goto input { width: 130px; } }

/* Certified copy — adapted from PayGloball's receipt */
.receipt-doc { max-width: 760px; margin: 0 auto; }
.receipt { padding: 0; overflow: hidden; position: relative; }
.receipt-band { display: flex; align-items: center; gap: 12px; background: var(--brand); color: #fff; padding: 18px 22px; }
.brand-mark.big { width: 42px; height: 42px; border-radius: 9px; background: rgba(255,255,255,.16); flex-shrink: 0; }
.receipt-brand { font-size: 20px; font-weight: 800; letter-spacing: .2px; }
.receipt-subtitle { font-size: 13px; opacity: .9; }
.receipt-no { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.receipt-tenant { font-size: 16px; font-weight: 700; padding: 14px 22px 10px; border-bottom: 1px solid var(--line); }
.receipt-summary { padding: 16px 22px 6px; }
.receipt-voucher { font-size: 26px; }
.receipt-voucher .vtype { color: var(--brand); }
.receipt-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; padding: 12px 22px 16px; }
.receipt-facts div { display: flex; flex-direction: column; min-width: 0; }
.receipt-facts .wide { grid-column: 1 / -1; }
.receipt-facts span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.receipt-facts strong { font-size: 14px; overflow-wrap: anywhere; }
.receipt-facts small { color: var(--muted); font-size: 12px; }
.receipt-body { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--neutral-bg); padding: 14px; }
.receipt-body iframe { width: 100%; height: 640px; border: 0; background: #fff; }
.receipt-body img { display: block; max-width: 100%; margin: 0 auto; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.receipt-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 14px 22px; font-size: 12px; color: var(--muted); }
.receipt-qr { text-align: center; flex-shrink: 0; }
.receipt-qr img { display: block; image-rendering: pixelated; background: #fff; padding: 4px; border-radius: 4px; }
.receipt-qr small { font-size: 10px; }
.receipt-share { position: relative; padding: 0 22px 20px; }
.btn.block { width: 100%; justify-content: center; }
.share-menu { position: absolute; left: 22px; right: 22px; bottom: calc(100% - 8px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.15); overflow: hidden; z-index: 40; }
.share-menu button, .share-menu a { display: block; width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line2, var(--line)); background: transparent; text-align: left; font: inherit; font-size: 13px; color: inherit; cursor: pointer; }
.share-menu > :last-child { border-bottom: 0; }
.share-menu button:hover, .share-menu a:hover { background: var(--brand-soft); }
.verify-page { min-height: 100vh; padding: 32px 16px; background: var(--bg, #f4f6f9); }
.verify-page .receipt { max-width: 640px; margin: 0 auto; padding-bottom: 18px; }
.verify-page .receipt > p { padding: 0 22px; }
.verify-result { margin: 14px 22px 0; padding: 12px 14px; border-radius: 10px; }
.verify-result p { margin: 4px 0 0; font-size: 13px; }
.verify-result.ok { background: var(--ok-bg); color: var(--ok); }
.verify-result.bad { background: var(--bad-bg); color: var(--bad); }
@media (max-width: 560px) { .receipt-facts { grid-template-columns: 1fr; } .receipt-voucher { font-size: 22px; } .receipt-body iframe { height: 460px; } }
@media print {
  .nav, .topbar, #banner, .no-print, #toasts { display: none !important; }
  .shell, .main, .content { display: block !important; padding: 0 !important; margin: 0 !important; }
  .receipt { box-shadow: none; border: 0; }
  .receipt-band { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.receipt-voucher .vtype { font-size: 1em; background: none; padding: 0; color: var(--brand); }
.receipt-voucher .mono { font-size: 1em; font-weight: 600; letter-spacing: .5px; }

/* Sign-up and setup card */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.code-block { margin: 6px 0 0; padding: 10px 12px; background: var(--neutral-bg); border: 1px solid var(--line); border-radius: 8px; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow: auto; }
.env button:disabled { opacity: .45; cursor: not-allowed; }
.sandbox-banner a { color: inherit; text-decoration: underline; }

/* Show/hide password */
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 40px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); padding: 6px; cursor: pointer; line-height: 0; border-radius: 6px; }
.pw-toggle:hover { color: var(--brand); background: var(--brand-soft); }
