/* Mikrodius Billing public pages. Colours follow the app (ui/theme/Theme.kt). */
:root {
  --bg: #fafafa; --surface: #fff; --text: #0a0a0b; --muted: #52525b; --subtle: #71717a;
  --border: #e7e7ea; --primary: #2563eb; --on-primary: #fff; --primary-text: #2563eb;
  --danger: #dc2626; --danger-tint: #fee7e7; --success: #0d9488; --success-tint: #d9f5f1;
  --tint: #f4f4f5; --active-tint: #dbe7ff;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b; --surface: #131316; --text: #fafafa; --muted: #a1a1aa; --subtle: #8b8b94;
    --border: #27272a; --primary-text: #7aa2ff; --danger: #f87171; --danger-tint: #3a1414;
    --success: #2dd4bf; --success-tint: #0f2e2b; --tint: #1c1c20; --active-tint: #1b2a4d;
  }
}
* { 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(--primary-text); }
main { max-width: 34rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
main.wide { max-width: 56rem; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: .5rem 0 1rem; }
h2 { font-size: 1.05rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 .25rem; }
p, li { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; margin: .75rem 0; }
.biz { display: flex; align-items: center; gap: .75rem; margin: .5rem 0 1rem; }
.biz img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: var(--surface); border: 1px solid var(--border); }
.biz .name { font-weight: 600; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); font-size: .875rem; }
.amount { font-size: 2rem; font-weight: 700; letter-spacing: -.01em; margin: .25rem 0; }
.row { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; }
.badge { display: inline-block; padding: .125rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--tint); color: var(--muted); }
.badge.ok { background: var(--success-tint); color: var(--success); }
.badge.due { background: var(--danger-tint); color: var(--danger); }
.btn {
  display: block; width: 100%; padding: .8rem 1rem; margin: .5rem 0 0; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.inline { display: inline-block; width: auto; }
.qr { display: block; width: 100%; max-width: 280px; margin: .75rem auto; image-rendering: pixelated; background: #fff; padding: 12px; border-radius: 12px; }
.paid { text-align: center; }
.paid .tick { font-size: 2.5rem; color: var(--success); }
.slot { border-style: dashed; color: var(--subtle); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 72px; margin-top: .5rem; }
.bars span { flex: 1; background: var(--active-tint); border-radius: 2px 2px 0 0; min-height: 2px; }
.bars span.today { background: var(--primary); }
.hidden { display: none; }
header.site { display: flex; justify-content: space-between; align-items: center; max-width: 56rem; margin: 0 auto; padding: 1rem; }
header.site a { text-decoration: none; }
.brand { font-weight: 700; color: var(--text); }
.hero { padding: 1.5rem 0 1rem; }
.hero h1 { font-size: 2rem; }
.grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.shots { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.shot { aspect-ratio: 9 / 19; border-radius: 16px; border: 1px solid var(--border); background: var(--tint); display: flex; align-items: center; justify-content: center; color: var(--subtle); font-size: .8rem; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
details { border-top: 1px solid var(--border); padding: .75rem 0; }
summary { cursor: pointer; font-weight: 600; }
footer.site { max-width: 56rem; margin: 0 auto; padding: 2rem 1rem; color: var(--subtle); font-size: .875rem; }
footer.site a { margin-right: 1rem; }
.notice { border-color: var(--success); }
.form label { display: block; margin: 0 0 .75rem; color: var(--muted); font-size: .9rem; }
.form input:not([type=radio]), .form textarea { display: block; width: 100%; box-sizing: border-box; margin-top: .25rem; padding: .7rem .75rem; min-height: 48px; font: inherit; color: var(--text); background: var(--bg, transparent); border: 1px solid var(--border); border-radius: 10px; }
.form fieldset { border: 0; padding: 0; margin: 0 0 .75rem; }
.form legend { color: var(--muted); font-size: .9rem; margin-bottom: .25rem; }
.form .choice { display: flex; align-items: center; gap: .5rem; min-height: 44px; margin: 0; color: var(--text); font-size: 1rem; }
.form-error { color: var(--danger); }
.progress { height: 6px; border-radius: 3px; background: var(--tint); overflow: hidden; margin: 0 0 .75rem; }
.progress span { display: block; height: 100%; width: 0; background: var(--primary); }
