:root { color-scheme: dark; }  /* one dark theme in every browser */
:root {
  --bg: #f6f7f5; --card: #ffffff; --text: #1c2321; --muted: #5d6763; --line: #dfe3e0;
  --brand: #0f5132; --brand-2: #157347; --brand-soft: #e3f1ea;
  --red: #b42318; --red-soft: #fdecea; --amber: #8a5a00; --amber-soft: #fff4d6;
  --blue: #1d4ed8; --blue-soft: #e6edff; --green: #146c43; --green-soft: #e3f4ea;
  --radius: 12px;
}
@media all {
  :root {
    --bg: #111614; --card: #1a201e; --text: #e8ece9; --muted: #a2aca7; --line: #2c3431;
    --brand: #5fc596; --brand-2: #79d3a9; --brand-soft: #1b3027;
    --red: #ff8a80; --red-soft: #3a1d1b; --amber: #f4c25b; --amber-soft: #3a2f14;
    --blue: #8fb0ff; --blue-soft: #1c2640; --green: #6fd39f; --green-soft: #18301f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: .2em 0 .5em; }
h2 { font-size: 1.2rem; margin: 1.4em 0 .5em; }
h3 { font-size: 1.05rem; margin: 1.2em 0 .4em; }
.wrap { max-width: 860px; margin: 0 auto; padding: 16px; }
.top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; color: var(--brand); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
nav a { text-decoration: none; }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; color: var(--brand); padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.foot { max-width: 860px; margin: 24px auto; padding: 0 16px 32px; color: var(--muted); font-size: .85rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

label { display: block; font-weight: 600; margin: 12px 0 4px; }
label .hint { font-weight: 400; color: var(--muted); font-size: .875rem; display: block; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 12px; font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; min-height: 46px;
}
input[type=file] { width: 100%; padding: 10px; border: 1px dashed var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
textarea { min-height: 140px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; width: 20px; height: 20px; }

.btn, button.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 12px 20px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 46px; }
@media all { .btn, button.btn { color: #0b1210; } }
.btn.secondary { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn.danger { background: var(--red); }
.btn.small { padding: 6px 12px; min-height: 0; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.flash { padding: 12px 14px; border-radius: 8px; margin-bottom: 12px; background: var(--blue-soft); color: var(--blue); }
.flash.error { background: var(--red-soft); color: var(--red); }
.flash.success { background: var(--green-soft); color: var(--green); }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.green { background: var(--green-soft); color: var(--green); }

.payee { border: 2px solid var(--brand-soft); border-radius: var(--radius); padding: 14px; }
.payee .num { font-size: 1.5rem; font-weight: 700; letter-spacing: .5px; }
.hero { padding: 8px 0 4px; }
.steps { padding-left: 1.2em; }
.steps li { margin: 6px 0; }
.stat { font-size: 1.8rem; font-weight: 700; }
.warn { background: var(--amber-soft); color: var(--amber); padding: 12px; border-radius: 8px; }

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-scroll { overflow-x: auto; }
dl.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
pre.translation { white-space: pre-wrap; font: inherit; background: var(--bg); padding: 12px; border-radius: 8px; }
img.shot { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.hidden { display: none; }
.mb { margin-bottom: 16px; }
.mt { margin-top: 16px; }
.cardlink { display: block; text-decoration: none; color: inherit; }
.cardlink:hover { border-color: var(--brand-2); }
.row-between { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- smart upload ---- */
.mt0 { margin-top: 0; }
.num-badge { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--card); font-size: .9rem; margin-right: 6px; vertical-align: 2px; }
.ico { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.btn.big { width: 100%; font-size: 1.05rem; padding: 14px; }
.btn.ready { box-shadow: 0 0 0 4px var(--brand-soft); }
.btn:disabled { opacity: .6; cursor: progress; }

.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.choice { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; }
.choice > span { display: flex; flex-direction: column; }
.choice .pill { margin-left: 6px; vertical-align: 1px; }
.choice input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

.dropzone { border: 1.5px dashed var(--line); border-radius: 12px; padding: 12px; margin: 12px 0; transition: border-color .2s, background .2s; }
.dropzone.has-files { border-style: solid; border-color: var(--brand-2); background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.dz-head { display: flex; flex-direction: column; margin-bottom: 8px; }
.dz-head .hint { color: var(--muted); font-size: .875rem; }
.dz-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.filepick { position: relative; overflow: hidden; margin: 0; font-weight: 600; }
.filepick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; padding: 0; border: 0; }
.thumbs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.thumbs:empty { display: none; }
.thumb { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px; animation: pop .25s ease-out; }
.thumb-pic { width: 56px; height: 56px; flex: none; border-radius: 6px; overflow: hidden; background: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: var(--muted); }
.thumb-pic img { width: 100%; height: 100%; object-fit: cover; }
.thumb-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; min-width: 0; flex: 1; }
.thumb-name { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.thumb-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg); color: var(--text); font-size: 1.3rem; cursor: pointer; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

.checklist { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.checklist li { padding-left: 30px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); box-sizing: border-box; }
.checklist li.ok::before { background: var(--green); border-color: var(--green); }
.checklist li.ok::after { content: ""; position: absolute; left: 7px; top: 6px; width: 5px; height: 9px; border: solid var(--card); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checklist li.todo { color: var(--muted); }
.shake { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.sticky-submit { border: 2px solid var(--brand-soft); }
.card > h2:first-child, .card > h1:first-child { margin-top: 0; }
.progress .track { height: 10px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.progress .fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .2s; }
.progress .label { margin-top: 4px; }
details summary { cursor: pointer; font-weight: 600; }

/* ---- camera scanner ---- */
.scanner { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; }
.scanner[open] { display: flex; flex-direction: column; }
.scanner::backdrop { background: #000; }
.scan-top, .scan-bottom { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; gap: 8px; }
.scan-btn { background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 999px; padding: 10px 16px; font: inherit; min-height: 44px; cursor: pointer; }
.scan-btn.strong { background: #fff; color: #000; font-weight: 700; }
.scan-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.scan-stage video { width: 100%; height: 100%; object-fit: contain; }
.scan-frame { position: absolute; width: min(82%, calc((100dvh - 260px) * .72)); aspect-ratio: 1 / 1.414; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); border-radius: 8px; }
.scan-frame i { position: absolute; width: 28px; height: 28px; border: 4px solid #5fe3a1; }
.scan-frame i:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.scan-frame i:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.scan-frame i:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.scan-frame i:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.scan-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.scan-flash.go { animation: flash .35s ease-out; }
@keyframes flash { from { opacity: .8; } to { opacity: 0; } }
.scan-hint { margin: 6px 14px 0; text-align: center; font-size: .95rem; min-height: 1.5em; }
.scan-shots { display: flex; gap: 8px; overflow-x: auto; padding: 8px 14px 0; min-height: 0; }
.scan-shots:empty { display: none; }
.shot-mini { position: relative; flex: none; width: 54px; height: 72px; border-radius: 6px; overflow: hidden; border: 2px solid #5fe3a1; }
.shot-mini.bad { border-color: #f4c25b; }
.shot-mini img { width: 100%; height: 100%; object-fit: cover; }
.shot-mini button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; line-height: 1; cursor: pointer; }
.shutter { width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: #fff; box-shadow: inset 0 0 0 4px #000; cursor: pointer; }
.shutter:active { transform: scale(.94); }

/* ---- application progress tracker ---- */
.tracker { list-style: none; margin: 16px 0 4px; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; counter-reset: step; }
.tracker li { position: relative; text-align: center; font-size: .78rem; color: var(--muted); padding-top: 34px; }
.tracker li::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 2px solid var(--line); font-weight: 700; z-index: 1; }
.tracker li::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 3px; background: var(--line); }
.tracker li:first-child::after { display: none; }
.tracker li.done { color: var(--text); }
.tracker li.done::before { content: "✓"; background: var(--green); border-color: var(--green); color: var(--card); }
.tracker li.done::after, .tracker li.current::after { background: var(--green); }
.tracker li.current { color: var(--text); font-weight: 700; }
.tracker li.current::before { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand); animation: pulse 1.6s infinite; }
.tracker li.current.stuck::before { border-color: var(--red); background: var(--red-soft); color: var(--red); animation: none; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-2) 45%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
@media (max-width: 520px) { .tracker li { font-size: .68rem; } }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.minibar { height: 6px; border-radius: 99px; background: var(--bg); overflow: hidden; margin-top: 8px; }
.minibar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.minibar .w20 { width: 20%; } .minibar .w40 { width: 40%; } .minibar .w60 { width: 60%; } .minibar .w80 { width: 80%; } .minibar .w100 { width: 100%; }
.field-warn { border-color: var(--amber) !important; background: var(--amber-soft) !important; }
.copy { margin-left: 8px; }

/* ---- landing ---- */
.hero-band { background: linear-gradient(135deg, var(--brand) 0%, #1c7c54 60%, #2b9a6a 100%); color: #fff; border-radius: 18px; padding: 28px 20px; margin-bottom: 16px; }
.hero-band h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); margin-top: 0; }
.hero-band p { opacity: .92; font-size: 1.05rem; }
.hero-band .btn { background: #fff; color: #0f5132; }
.hero-band .btn.secondary { background: transparent; color: #fff; border-color: #fff; }
.feature-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 8px; }
.feature-ico svg { width: 22px; height: 22px; }
.stepnum { list-style: none; padding: 0; counter-reset: s; display: grid; gap: 10px; }
.stepnum li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.stepnum li::before { content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--card); font-weight: 700; }

/* ---- staff dashboard ---- */
:root { --violet: #6d28d9; --violet-soft: #efe9ff; --shadow: 0 1px 2px rgba(16,24,20,.04), 0 4px 16px rgba(16,24,20,.05); }
@media all { :root { --violet: #b9a2ff; --violet-soft: #2a2140; --shadow: 0 1px 2px rgba(0,0,0,.3); } }
.wrap.wide { max-width: 1180px; }
.wide .card { box-shadow: var(--shadow); border-color: transparent; }
@media all { .wide .card { border-color: var(--line); } }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--brand); margin: 0 0 4px; }
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 8px 0 20px; }
.dash-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 4px; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.count-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px; border-radius: 99px; background: var(--card); color: var(--brand); font-size: .8rem; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--amber-soft); color: var(--amber); border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; }
.notice code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }
.notice-link { text-decoration: none; transition: filter .15s; }
.notice-link:hover { filter: brightness(.97); }
.notice-cta { font-weight: 700; margin-left: 6px; white-space: nowrap; text-decoration: underline; }
.golive { margin: 6px 0 0; padding-left: 1.2em; }
.golive li { margin: 4px 0; }
.notice-ico svg { width: 22px; height: 22px; display: block; }

.kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 20px; }
.kpi { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ico label" "value value" "sub sub"; align-items: center; column-gap: 10px;
  background: var(--card); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); color: inherit; text-decoration: none; border: 1px solid transparent; transition: transform .15s, border-color .15s; }
@media all { .kpi { border-color: var(--line); } }
a.kpi:hover { transform: translateY(-2px); border-color: var(--brand-2); }
.kpi.kpi-alert { border-color: var(--amber); }
.kpi-ico { grid-area: ico; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.kpi-ico svg { width: 20px; height: 20px; }
.kpi-ico.amber { background: var(--amber-soft); color: var(--amber); }
.kpi-ico.blue { background: var(--blue-soft); color: var(--blue); }
.kpi-ico.green { background: var(--green-soft); color: var(--green); }
.kpi-ico.violet { background: var(--violet-soft); color: var(--violet); }
.kpi-label { grid-area: label; font-size: .9rem; color: var(--muted); font-weight: 600; }
.kpi-value { grid-area: value; font-size: 2rem; font-weight: 800; letter-spacing: -.02em; margin-top: 12px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.kpi-sub { grid-area: sub; font-size: .85rem; color: var(--muted); margin-top: 2px; }

.dash-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-main .card, .dash-side .card { margin-bottom: 20px; }

.pipeline { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pipeline li { position: relative; }
.pipeline li + li::before { content: ""; position: absolute; left: -8px; top: 50%; width: 8px; height: 2px; background: var(--line); }
.stage { display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; border-radius: 12px; text-decoration: none; color: var(--text); text-align: center; background: var(--bg); border-top: 4px solid var(--line); transition: transform .15s; height: 100%; }
.stage:hover { transform: translateY(-2px); }
.stage-count { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stage-label { font-size: .78rem; color: var(--muted); font-weight: 600; line-height: 1.3; }
.stage-blue { border-top-color: var(--blue); } .stage-amber { border-top-color: var(--amber); } .stage-green { border-top-color: var(--green); }
@media (max-width: 560px) { .pipeline { grid-template-columns: repeat(2, 1fr); } .pipeline li::before { display: none; } }
.pipe-problems { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.problem { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: .85rem; text-decoration: none; color: var(--muted); background: var(--bg); }
.problem svg { width: 15px; height: 15px; }
.problem.on { background: var(--red-soft); color: var(--red); }

.chart { margin: 8px 0 0; position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .baseline { stroke: var(--muted); stroke-width: 1; opacity: .5; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .bar { fill: var(--brand-2); transition: opacity .15s; }
.chart .hit { fill: transparent; }
.chart .bar-hit:hover .hit, .chart .bar-hit:focus .hit { fill: var(--brand-soft); opacity: .6; }
.chart .bar-hit:focus { outline: none; }
.chart-empty { position: absolute; inset: 0 0 26px 28px; display: grid; place-items: center; color: var(--muted); font-size: .9rem; text-align: center; padding: 0 12px; }

.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 10px; }
.feed li:hover { background: var(--bg); }
.feed-body { display: flex; flex-direction: column; min-width: 0; flex: 1; text-decoration: none; color: inherit; }
.feed-body strong, .feed-body span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.feed-dot.amber { background: var(--amber); } .feed-dot.red { background: var(--red); }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.all-clear { display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.sys { list-style: none; margin: 0; padding: 0; }
.sys li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.sys li:last-child { border-bottom: 0; }
.sys-val { margin-left: auto; color: var(--muted); font-size: .85rem; text-align: right; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-ok { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.dot-warn { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.dot-bad { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

/* ---- staff lists ---- */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 8px 0 18px; }
.page-head h1 { margin: 0; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 18px; }
.tabs a { padding: 8px 14px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.tabs a.active { background: var(--brand); color: var(--card); }
.tabs a .n { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 99px; background: var(--bg); color: var(--muted); font-size: .78rem; }
.tabs a.active .n { background: rgba(255,255,255,.25); color: inherit; }
.pay-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pay-card { display: flex; flex-direction: column; gap: 12px; }
.pay-top { display: flex; align-items: center; gap: 12px; }
.pay-amount { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.txn { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .95rem; background: var(--bg); padding: 6px 10px; border-radius: 8px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pay-card .actions { margin-top: 0; }
.pay-card .actions form { flex: 1; }
.pay-card .actions .btn { width: 100%; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .kpi-ico { margin: 0 auto 12px; width: 52px; height: 52px; }
.empty .kpi-ico svg { width: 26px; height: 26px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters > div { flex: 1 1 200px; }
.filters label { margin-top: 0; }
.filters .btn { min-height: 46px; }
.app-table td, .app-table th { padding: 12px 10px; }
.app-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.app-table tbody tr { transition: background .12s; }
.app-table tbody tr:hover { background: var(--bg); }
.who { display: flex; align-items: center; gap: 10px; }
.who a { font-weight: 600; text-decoration: none; }
.detail-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-grid .card { margin-bottom: 20px; }
.btn-grid { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.btn-grid form { margin: 0; }
.btn-grid .btn { width: 100%; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.doc-list a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--bg); text-decoration: none; color: inherit; }
.doc-list a:hover { outline: 2px solid var(--brand-soft); }
.doc-list svg { width: 20px; height: 20px; color: var(--brand); flex: none; }

/* ---- student editing ---- */
.doc-edit { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.doc-edit li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.doc-edit li.busy { opacity: .5; pointer-events: none; }
.doc-thumb { width: 64px; height: 64px; flex: none; border-radius: 8px; overflow: hidden; background: var(--bg); display: grid; place-items: center; font-weight: 700; color: var(--muted); text-decoration: none; }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-edit .feed-body { flex: 1 1 160px; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-actions form { display: flex; gap: 6px; }
.edit-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }

/* ---- setup page ---- */
.setup-steps { display: grid; gap: 4px; max-width: 860px; }
.setup-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 8px; }
.setup-head > div { flex: 1; }
.setup-num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--amber-soft); color: var(--amber); }
.setup-card.done .setup-num { background: var(--green); color: var(--card); }
.setup-card.done { border-left: 4px solid var(--green) !important; }
.how { padding-left: 1.2em; } .how li { margin: 4px 0; }
.mode-list { display: grid; gap: 10px; }
.choice.disabled { opacity: .55; cursor: not-allowed; }
.shots { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.shots a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--muted); }
.shots img { width: 100%; height: 130px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 8px; }
.text-red { color: var(--red); }
.copy-list { display: grid; gap: 6px; }
.copy-row { display: grid; grid-template-columns: minmax(110px, 34%) 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; background: var(--bg); font-size: .92rem; }
.copy-row span:first-child { color: var(--muted); }
.copy-row strong { overflow-wrap: anywhere; font-weight: 600; }
.queue-card { border-left: 4px solid var(--blue) !important; }

/* ---- free test slots ---- */
.free-card { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: linear-gradient(135deg, var(--brand-soft), var(--card)); border: 2px solid var(--brand-2); border-radius: 16px; padding: 18px; margin-bottom: 8px; }
.free-card > div { flex: 1 1 280px; }
.center { text-align: center; }
.mb0 { margin-bottom: 0; }
.slot-bar { height: 8px; border-radius: 99px; background: var(--card); overflow: hidden; border: 1px solid var(--line); }
.slot-bar span { display: block; height: 100%; background: var(--brand-2); width: 0; }
.slot-bar .w5{width:5%}.slot-bar .w10{width:10%}.slot-bar .w15{width:15%}.slot-bar .w20{width:20%}.slot-bar .w25{width:25%}.slot-bar .w30{width:30%}.slot-bar .w35{width:35%}.slot-bar .w40{width:40%}.slot-bar .w45{width:45%}.slot-bar .w50{width:50%}.slot-bar .w55{width:55%}.slot-bar .w60{width:60%}.slot-bar .w65{width:65%}.slot-bar .w70{width:70%}.slot-bar .w75{width:75%}.slot-bar .w80{width:80%}.slot-bar .w85{width:85%}.slot-bar .w90{width:90%}.slot-bar .w95{width:95%}.slot-bar .w100{width:100%}
.pill.violet { background: var(--violet-soft); color: var(--violet); }

@media print {
  .top, .foot, .no-print, .flash { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 0; padding: 0; }
}
.ledger li { font-variant-numeric: tabular-nums; }
.ledger .ledger-total { font-weight: 800; border-top: 2px solid var(--text); border-bottom: 0; }
.field-auto { border-color: var(--green) !important; background: var(--green-soft) !important; }
.auto-tag { display: inline-block; padding: 0 .4em; border-radius: 4px; background: var(--green-soft); color: var(--green); border: 1px solid var(--green); font-size: .85em; }
.actions-inline { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 16px; justify-content: flex-end; }
#details { scroll-margin-top: 16px; }
.req { color: var(--amber, #b45309); font-weight: 700; }
.opt { color: var(--muted, #6b7280); font-weight: 400; font-size: .85em; }
.location-box { margin: 10px 0 4px; padding: 10px 12px; border-radius: 8px; background: var(--blue-soft); color: var(--text); border-left: 4px solid var(--blue); display: grid; gap: 2px; }
.location-box strong { color: var(--blue); }
.choice .price { display: block; font-weight: 700; color: var(--green); margin: 2px 0; }
.price-list { list-style: none; padding: 0; margin: 8px 0; }
.price-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.price-list li span { font-weight: 700; }
.qr { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 8px; }
.setup-key { font-size: 1.05em; letter-spacing: .05em; word-break: break-all; }
.card.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.form-list { display: grid; gap: 0; }
.form-item { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form-item .feed-body { flex: 1 1 240px; }
.form-item h2 { font-size: 1.1rem; }
.form-ico { width: 48px; height: 56px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; }
.signer { margin: 4px 0; }
.forms-promo { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; border: 2px solid var(--brand-soft); }
.forms-promo > div { flex: 1 1 260px; }
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: inline-flex; align-items: center; gap: 8px; background: #25d366; color: #fff; padding: 12px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.wa-float:hover { background: #1da851; color: #fff; }
.wa-float span { font-size: .95rem; }
@media (max-width: 520px) { .wa-float span { display: none; } .wa-float { padding: 14px; } }
.share-card { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.share-card .feed-body { flex: 1 1 280px; }
.share-qr { flex: 0 0 auto; text-align: center; }
.share-card textarea { width: 100%; }

/* Responsive menu: a tap-to-open button on small screens, full inline menu on wide ones */
.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.nav-burger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 40px; padding: 8px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); }
.nav-burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
.nav-toggle:focus-visible + .nav-burger { outline: 2px solid var(--brand-2); outline-offset: 2px; }
@media (max-width: 640px) {
  .nav-burger { display: flex; }
  nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 2px; margin-top: 8px; }
  .nav-toggle:checked ~ nav { display: flex; }
  nav a, nav .inline { padding: 12px 8px; border-radius: 8px; border-bottom: 1px solid var(--line); }
  nav a.btn.small { text-align: center; border-bottom: 0; margin-top: 4px; }
  nav .inline { border-bottom: 0; }
}

/* Country flags */
.flag-strip-title { font-weight: 600; margin: 0 0 10px; }
.flags { display: flex; flex-wrap: wrap; gap: 10px; }
.flag-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 6px; font-size: .9rem; }
.flag-chip img { width: 26px; height: 19px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.08); display: block; }
.with-flag { display: flex; align-items: center; gap: 8px; }
.with-flag input { flex: 1; }
.field-flag { width: 34px; height: 25px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.1); flex: none; }
.inline-flag { width: 24px; height: 18px; border-radius: 3px; object-fit: cover; vertical-align: -3px; margin-right: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.1); }

/* ---- Subtle page background accent (all pages) ---- */
body { background-image: radial-gradient(1100px 400px at 100% -5%, var(--brand-soft) 0%, transparent 60%), radial-gradient(900px 360px at -10% 8%, var(--blue-soft) 0%, transparent 55%); background-attachment: fixed; }

/* ---- Auth pages: form + welcome panel ---- */
.auth-wrap { max-width: 980px; }
.auth-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; align-items: stretch; margin-top: 10px; }
.auth-side { background: linear-gradient(150deg, var(--brand) 0%, #1c7c54 55%, #2b9a6a 100%); color: #fff; border-radius: 18px; padding: 30px 26px; display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow); }
.auth-side h2 { color: #fff; margin: 0 0 8px; font-size: 1.5rem; }
.auth-side > p { opacity: .93; margin: 0 0 18px; }
.auth-points { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.ap-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.16); display: grid; place-items: center; }
.ap-ico svg { width: 20px; height: 20px; color: #fff; }
.auth-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.auth-flags img { width: 26px; height: 19px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.3); }
.auth-flags .small { opacity: .9; margin-left: 2px; }
.auth-main { align-self: start; }
.auth-main .btn.big { width: 100%; }
@media (max-width: 760px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-side { order: 2; padding: 22px; }
}

/* Fill the screen on short pages: footer sits at the bottom, content grows */
body { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { flex: 1 0 auto; }
.foot { flex-shrink: 0; }

/* "Please rescan" banner on the review page */
.rescan-banner { display: flex; gap: 14px; align-items: flex-start; background: var(--amber-soft); border: 2px solid var(--amber); border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; }
.rescan-banner strong { color: var(--amber); display: block; margin-bottom: 4px; }
.rescan-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--amber); color: #fff; display: grid; place-items: center; }
.rescan-ico svg { width: 22px; height: 22px; }
.rescan-banner .btn { background: var(--amber); }

/* Phone number with country-code dropdown */
.phone-field { display: flex; gap: 8px; }
.phone-cc { flex: 0 0 auto; width: auto; max-width: 48%; }
.phone-field input { flex: 1 1 auto; min-width: 0; }

/* Menu: highlight the page you are on */
nav a:not(.btn) { padding: 6px 12px; border-radius: 999px; transition: background .15s, color .15s; }
nav a:not(.btn):hover { background: var(--brand-soft); }
nav a.active:not(.btn) { background: var(--brand); color: #0b1210; font-weight: 700; box-shadow: 0 0 0 1px var(--brand-2); }
nav a.btn.active { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--brand-2); }
@media (max-width: 640px) {
  nav a.active:not(.btn) { border-radius: 8px; border-bottom-color: transparent; border-left: 4px solid var(--brand-2); }
}
