/* Taaleem guardian app (taaleem.vip/g/) — a phone app: one column, big touch targets, bottom tab bar */
:root {
  --green: #0B4619; --green-2: #1F6F3A; --green-soft: #E5F1E8; --gold: #D4AF37; --gold-soft: #FBF3D9;
  --bg: #F3F6F4; --surface: #FFFFFF; --ink: #17241C; --muted: #66756C; --line: #DFE7E2;
  --red: #B42318; --red-soft: #FDECEA; --amber: #8A6100; --amber-soft: #FFF4D6;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0E1612; --surface: #17221B; --ink: #E5EEE8; --muted: #9AAEA2; --line: #2A3A30; --green-soft: #1C3324; --gold-soft: #3A3218; --red-soft: #3D1F1C; --amber-soft: #3A2F14; --amber: #F0C060; --red: #FF8A7E; color-scheme: dark; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 "Hind Siliguri", "Segoe UI", "Noto Sans Bengali", "Noto Naskh Arabic", system-ui, sans-serif; }
button { font: inherit; color: inherit; }
.app { max-width: 560px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.splash { flex: 1; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--green); font-size: 20px; min-height: 100vh; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pos { color: #1E7B3A; } .neg { color: var(--red); } .warn { color: var(--amber); }

/* header */
.head { background: var(--green); color: #fff; padding: calc(12px + var(--safe-top)) 16px 14px; position: sticky; top: 0; z-index: 5; }
.head-row { display: flex; align-items: center; gap: 12px; }
.av { width: 44px; height: 44px; border-radius: 50%; background: #E9C95A; color: var(--green); display: grid; place-items: center; font-weight: 800; font-size: 19px; flex-shrink: 0; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.head b { font-size: 17px; display: block; line-height: 1.25; }
.head small { opacity: .85; font-size: 12.5px; }
.kids { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; scrollbar-width: none; }
.kids button { border: 0; border-radius: 99px; padding: 4px 13px; background: rgba(255, 255, 255, .16); color: #fff; white-space: nowrap; font-size: 13px; }
.kids button.on { background: #E9C95A; color: var(--green); font-weight: 700; }
.head-title { font-size: 18px; font-weight: 700; }

/* content */
.main { flex: 1; padding: 14px 14px calc(84px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.card h3 { margin: 0; font-size: 15px; }
.lbl { font-size: 12px; color: var(--muted); }
.today { border: 2px solid #2E8B4E; }
.today.absent { border-color: var(--red); }
.today.none { border-color: var(--line); }
.today .big { font-size: 22px; font-weight: 800; color: var(--green-2); }
.today.absent .big { color: var(--red); }
.today.none .big { color: var(--muted); font-size: 19px; }
.times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.times div { background: var(--bg); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.times b { font-size: 18px; font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv strong { font-size: 20px; display: block; line-height: 1.2; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.row:last-child { border-bottom: 0; }
.pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pill.ok { background: var(--green-soft); color: var(--green-2); } .pill.bad { background: var(--red-soft); color: var(--red); } .pill.warn { background: var(--amber-soft); color: var(--amber); } .pill.none { background: var(--bg); color: var(--muted); }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 14px; padding: 13px; font-weight: 700; font-size: 15px; background: var(--green); color: #fff; text-decoration: none; cursor: pointer; }
.btn.gold { background: var(--gold); color: #1b1b1b; }
.btn.ghost { background: none; color: var(--green-2); border: 1.5px solid var(--green-2); }
.btn.danger { background: none; color: var(--red); border: 1.5px solid var(--red-soft); }
.btn:disabled { opacity: .55; }
.err { background: var(--red-soft); color: var(--red); border-radius: 12px; padding: 10px 12px; font-size: 14px; }

/* connect */
.connect { padding: calc(24px + var(--safe-top)) 18px 30px; display: flex; flex-direction: column; gap: 14px; }
.connect .logo { width: 72px; height: 72px; align-self: center; }
.connect h1 { margin: 0; text-align: center; color: var(--green); font-size: 23px; }
.connect p { margin: 0; text-align: center; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.field input { border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 14px; font-size: 18px; background: var(--surface); color: var(--ink); letter-spacing: .5px; }
.field input:focus { outline: none; border-color: var(--green-2); }
.field small { font-weight: 400; color: var(--muted); }
.found { display: flex; gap: 12px; align-items: center; background: var(--green-soft); border-radius: 14px; padding: 12px; }
.found .av { width: 40px; height: 40px; font-size: 17px; }
.langs { display: flex; justify-content: center; gap: 6px; }
.langs button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 12px; font-size: 13px; }
.langs button.on { background: var(--green); color: #fff; border-color: var(--green); }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal span { border-radius: 9px; padding: 6px 0 4px; font-size: 13px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; line-height: 1.15; }
.cal span small { font-size: 9.5px; opacity: .8; }
.cal .h { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 11.5px; padding: 0; }
.cal .p { background: #DDF2E3; border-color: #BFE3C9; color: #1E5B30; }
.cal .l { background: #FFF1CC; border-color: #F0DC9C; color: #7A5A00; }
.cal .a { background: #FBE1DD; border-color: #F4C3BC; color: #8E2015; }
.cal .o { background: transparent; color: var(--muted); border-style: dashed; }
.cal .e { visibility: hidden; }
.monthbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.monthbar button { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; width: 40px; height: 36px; font-size: 18px; }
.monthbar b { font-size: 16px; }

/* tab bar */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 2px calc(8px + var(--safe-bottom)); z-index: 6; }
.tabs button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); padding: 4px 0; }
.tabs svg { width: 22px; height: 22px; }
.tabs button.on { color: var(--green-2); font-weight: 700; }
.notice.urgent { border-color: var(--red); }
.install { display: flex; gap: 10px; align-items: center; background: var(--gold-soft); border: 1px solid var(--gold); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.install .btn { width: auto; padding: 8px 14px; font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 9; max-width: 90%; }
[dir="rtl"] .tabs, [dir="rtl"] .row { direction: rtl; }
.grow { flex: 1; }
.center { text-align: center; }
.pre { white-space: pre-line; }
.huge { font-size: 26px; }
