:root {
  --bg:#f4f6f8; --card:#fff; --ink:#1c2733; --muted:#6b7785; --line:#e3e8ee;
  --accent:#0f6e8c; --danger:#b3261e;
  --okbg:#e7f4ec; --okink:#0f6e56; --warnbg:#fff6e0; --warnink:#7a5a00;
}
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html { height:100%; }
body { margin:0; min-height:100%; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; background:var(--bg); color:var(--ink); padding-bottom:env(safe-area-inset-bottom); }
.wrap { max-width:560px; margin:0 auto; padding:16px; }
header { position:sticky; top:0; z-index:5; background:var(--bg); padding:calc(14px + env(safe-area-inset-top)) 16px 8px; max-width:560px; margin:0 auto; }
h1 { font-size:18px; margin:0; display:flex; align-items:center; gap:8px; }
h1 .material-icons { color:var(--accent); }
.hlogo, .brandlogo { border-radius:22%; }
.hlogo { width:24px; height:24px; }
.brandlogo { width:72px; height:72px; margin-bottom:10px; }
.brand { text-align:center; margin-bottom:22px; }
.brand h1 { justify-content:center; font-size:26px; }
.sub { font-size:12px; color:var(--muted); margin:2px 0 0; }
.pagetitle { font-size:21px; }
.pillrow { margin:6px 0 4px; }

input[type=text],input[type=password],input[type=date],select,textarea {
  width:100%; font-size:16px; padding:12px 14px; border:1px solid var(--line);
  border-radius:10px; background:var(--card); color:var(--ink); font-family:inherit;
}
button { font-size:16px; font-weight:600; color:#fff; background:var(--accent); border:0; border-radius:10px; padding:13px 16px; width:100%; cursor:pointer; }
button:disabled { opacity:.6; }

.search { display:flex; align-items:center; gap:8px; background:var(--card); border:1px solid var(--line); border-radius:10px; padding:0 12px; margin:8px 0 4px; }
.search .material-icons { color:var(--muted); font-size:20px; }
.search input { border:0; padding:12px 0; outline:none; }

.tiles { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }
.tile { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px 14px; cursor:pointer; min-height:96px; display:flex; flex-direction:column; justify-content:space-between; }
.tile .material-icons { color:var(--accent); font-size:26px; }
.tile .name { font-size:15px; font-weight:600; line-height:1.3; }
.tile .cnt { font-size:12px; color:var(--muted); }

.seclabel { font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:18px 4px 6px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.row { display:flex; align-items:center; gap:12px; padding:14px; border-bottom:1px solid var(--line); cursor:pointer; }
.row:last-child { border-bottom:0; }
.row .material-icons { color:var(--accent); font-size:22px; }
.row .t { flex:1; font-size:15px; }
.row .chev { color:var(--muted); font-size:20px; }
.pill { font-size:11px; font-weight:600; padding:2px 8px; border-radius:20px; white-space:nowrap; }
.pill.ok { color:var(--okink); background:var(--okbg); }
.pill.draft { color:var(--warnink); background:var(--warnbg); }
.back { display:inline-flex; align-items:center; gap:4px; color:var(--accent); font-weight:600; font-size:15px; padding:6px 0; cursor:pointer; }

.body h3 { font-size:16px; margin:18px 0 6px; color:var(--accent); }
.body h4 { font-size:14px; margin:14px 0 4px; }
.body p { font-size:15px; line-height:1.6; margin:8px 0; }
.body ul,.body ol { margin:6px 0 10px; padding-left:22px; }
.body li { font-size:15px; line-height:1.55; margin:4px 0; }
.body hr { border:0; border-top:1px solid var(--line); margin:14px 0; }
.body blockquote { margin:12px 0; padding:10px 14px; background:var(--warnbg); border-left:4px solid #f0b400; border-radius:6px; font-size:15px; line-height:1.55; }
.body img { max-width:100%; height:auto; border-radius:8px; margin:10px 0; display:block; }
.body i { color:var(--muted); }
.body .empty { color:var(--muted); font-style:italic; }

.foot { font-size:11px; color:var(--muted); text-align:center; margin:22px auto 8px; line-height:1.5; max-width:560px; padding:0 16px; }
.foot a { color:var(--accent); }
.hidden { display:none !important; }
.err { color:var(--danger); font-size:13px; margin:8px 2px; min-height:16px; }
.req { color:var(--danger); }
.pinwrap { margin-top:12vh; }
.pinwrap input { text-align:center; letter-spacing:4px; font-size:22px; }
.pinwrap button { margin-top:4px; }
.loading { color:var(--muted); font-size:14px; text-align:center; padding:28px 0; }

/* forms */
.form { padding:14px; }
.form label { display:block; font-size:13px; font-weight:600; color:var(--muted); margin:12px 0 0; }
.form label input, .form label select, .form label textarea { margin-top:5px; font-weight:400; }
.form button { margin-top:16px; }
.form label.chk { display:flex; align-items:center; gap:9px; font-weight:400; color:var(--ink, inherit); margin:8px 0 0; }
.form label.chk input { margin-top:0; width:auto; }
.check { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.check:last-child { border-bottom:0; }
.check .ct { font-size:14px; flex:1; line-height:1.4; }
.seg { display:flex; gap:4px; }
.seg button { width:auto; padding:7px 11px; font-size:13px; background:var(--bg); color:var(--muted); border:1px solid var(--line); }
.seg button.on { background:var(--accent); color:#fff; border-color:var(--accent); }
.photos { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.photos img { width:64px; height:64px; object-fit:cover; border-radius:8px; border:1px solid var(--line); }

/* stats */
.statcard { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; margin-bottom:10px; }
.statcard .nm { font-weight:600; font-size:15px; display:flex; justify-content:space-between; align-items:center; }
.statcard .pct { font-size:14px; color:var(--muted); }
.weeks { display:flex; gap:8px; margin-top:10px; }
.wk { flex:1; text-align:center; border-radius:10px; padding:8px 0; font-size:13px; font-weight:600; }
.wk .d { font-size:10px; font-weight:400; display:block; margin-top:2px; opacity:.75; }
.wk.yes { background:var(--okbg); color:var(--okink); }
.wk.no { background:#fdecea; color:var(--danger); }
.wk.na { background:var(--bg); color:var(--muted); }
.streak { font-size:12px; color:var(--okink); margin-top:8px; }

.toast { position:fixed; left:50%; bottom:28px; transform:translateX(-50%); background:var(--ink); color:#fff; padding:12px 18px; border-radius:12px; font-size:14px; max-width:85vw; text-align:center; z-index:50; box-shadow:0 6px 24px rgba(0,0,0,.25); }
