/* Mandala staff app - high contrast, big touch targets, Khmer-capable system fonts. Nothing under 18px. */
:root { --bg:#fff; --fg:#111; --muted:#555; --line:#ccc; --green:#0b3d2e; --green2:#146c4a; --red:#b00020; --amber:#b35c00; --blue:#0b4a8b; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg);
  font-family: 'Khmer OS', 'Khmer OS System', 'Noto Sans Khmer', 'Khmer Sangam MN', system-ui, sans-serif; font-size: 20px; line-height: 1.5; }
header { display:flex; justify-content:space-between; align-items:center; padding: 10px 16px; background: var(--green); color:#fff; font-size: 22px; font-weight: bold; min-height: 56px; }
header .badge { font-size: 18px; font-weight: normal; margin-left: 8px; padding: 2px 10px; border-radius: 12px; background: var(--amber); color:#fff; }
header .badge.off { background: #444; }
main { padding: 16px; max-width: 640px; margin: 0 auto; }
h1 { font-size: 26px; margin: 8px 0 12px; }
h2 { font-size: 22px; margin: 16px 0 8px; }
p, li, label { font-size: 20px; }
small, .small { font-size: 18px; color: var(--muted); }
button, .btn { display:block; width:100%; min-height:64px; padding: 12px 16px; margin: 10px 0; font: inherit; font-size: 22px; font-weight: bold;
  border: 3px solid var(--green); border-radius: 14px; background: #fff; color: var(--green); cursor:pointer; text-align:center; }
button.primary { background: var(--green); color:#fff; }
button.danger { border-color: var(--red); color: var(--red); }
button.danger.primary { background: var(--red); color:#fff; }
button.warn { border-color: var(--amber); color: var(--amber); }
button.blue { border-color: var(--blue); color: var(--blue); }
button.small { min-height: 56px; font-size: 18px; padding: 6px 12px; width:auto; display:inline-block; margin: 4px 6px 4px 0; }
button:disabled { opacity: .45; }
.row { display:flex; gap: 12px; } .row > * { flex:1; }
input, select, textarea { width:100%; font: inherit; font-size: 22px; padding: 12px; margin: 6px 0 12px; border: 2px solid var(--line); border-radius: 10px; min-height: 56px; }
input.code { font-size: 40px; letter-spacing: 8px; text-align:center; font-family: monospace; }
.card { border: 3px solid var(--green); border-radius: 16px; padding: 16px; margin: 12px 0; background: #f6faf8; }
.card.critical { border-color: var(--red); }
.card .title { font-size: 26px; font-weight: bold; margin-bottom: 8px; }
.chip { display:inline-block; font-size: 18px; padding: 2px 12px; border-radius: 12px; background: #e6e6e6; margin: 2px 6px 2px 0; }
.chip.critical { background: var(--red); color:#fff; }
.chip.done { background: var(--green2); color: #fff; } .chip.blocked, .chip.missed { background: var(--red); color:#fff; }
.chip.open { background: #ddd; } .chip.queued { background: var(--amber); color:#fff; }
.chip.pending { background: #ffe9a8; color:#553; }
.list .item { display:flex; justify-content:space-between; align-items:center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); min-height: 56px; }
.list .item .t { flex: 1; }
.photo-slot { border: 3px dashed var(--line); border-radius: 14px; min-height: 180px; display:flex; align-items:center; justify-content:center; margin: 8px 0; overflow:hidden; background: #fafafa; }
.photo-slot img { max-width: 100%; max-height: 260px; }
.photo-slot input { display:none; }
.placeholder { width:100%; height: 110px; border: 2px dashed var(--line); border-radius: 10px; display:flex; align-items:center; justify-content:center; color: var(--muted); font-size: 18px; margin: 8px 0; }
.bar { height: 22px; background: #e5e5e5; border-radius: 11px; overflow:hidden; margin: 4px 0 10px; }
.bar div { height: 100%; background: var(--green2); }
.strip { display:flex; gap: 8px; overflow-x:auto; padding: 4px 0; }
.strip img, .thumb { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; border: 2px solid var(--line); flex: none; }
nav.tabs { display:flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
nav.tabs button { flex: 1; min-width: 100px; min-height: 52px; font-size: 18px; margin: 0; padding: 6px; }
nav.tabs button.on { background: var(--green); color:#fff; }
.bignum { font-size: 64px; font-family: monospace; letter-spacing: 10px; text-align:center; font-weight:bold; margin: 12px 0; }
.qr { text-align:center; } .qr svg { width: 220px; height: 220px; }
pre { white-space: pre-wrap; font-size: 18px; background: #f4f4f4; padding: 12px; border-radius: 10px; }
#toast { position: fixed; left: 16px; right: 16px; bottom: 24px; background: #222; color: #fff; padding: 14px 18px; border-radius: 12px; font-size: 20px; z-index: 9; text-align:center; }
.err { color: var(--red); font-weight: bold; }
.ok { color: var(--green2); font-weight: bold; }
.notif { background: #fff3cd; border: 2px solid var(--amber); border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
