:root {
  --brand: #1F5F99; --good: #1B7F3B; --warn: #9A6400; --bad: #B42318;
  --bg: #F5F6F8; --card: #fff; --text: #1d2125; --muted: #6b7280; --line: #e5e7eb;
  --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("logo-watermark.webp") center / min(85vw, 420px) no-repeat; opacity: .07; }
button { font: inherit; }
.center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(24px + var(--top)) 24px calc(24px + var(--bottom)); text-align: center; gap: 14px; }
.screen { max-width: 520px; margin: 0 auto; padding: calc(20px + var(--top)) 18px calc(20px + var(--bottom)); }
h1 { font-size: 24px; margin: 6px 0; } h2 { font-size: 19px; margin: 0 0 8px; } h3 { font-size: 17px; margin: 0 0 6px; }
p { margin: 6px 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .good { color: var(--good); } .bad { color: var(--bad); }
.warn { color: var(--warn); } .bold { font-weight: 700; }
.logo { width: 96px; height: 96px; }
.btn { display: block; width: 100%; min-height: 50px; border: 0; border-radius: 12px; padding: 12px 16px;
  background: var(--brand); color: #fff; font-size: 17px; font-weight: 600; cursor: pointer; }
.btn:disabled { opacity: .45; }
.btn.outline { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.green { background: var(--good); } .btn.text { background: none; color: var(--brand); min-height: 40px; }
.btn.small { display: inline-block; width: auto; min-height: 38px; font-size: 15px; padding: 8px 14px; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; }
input, textarea, select { width: 100%; font: inherit; font-size: 17px; padding: 12px; border: 1.5px solid #cfd4da;
  border-radius: 10px; background: #fff; color: var(--text); }
textarea { min-height: 160px; resize: vertical; }
label.lbl { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.card { background: var(--card); border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 12px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.kv > :first-child { color: #444; } .kv > :last-child { text-align: right; }
hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 13px; font-weight: 700; }
.pill.present { background: #E3F4E8; color: var(--good); } .pill.short { background: #FFF3D6; color: var(--warn); }
.pill.absent { background: #FDE8E7; color: var(--bad); }
.note { border-radius: 10px; padding: 12px; margin: 8px 0; font-weight: 600; }
.note.good { background: #E3F4E8; } .note.bad { background: #FDE8E7; } .note.warn { background: #FFF3D6; }
.top { position: sticky; top: 0; z-index: 5; background: var(--brand); color: #fff;
  padding: calc(10px + var(--top)) 14px 10px; display: flex; align-items: center; justify-content: space-between; }
.top .title { font-weight: 700; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top button { background: none; border: 0; color: #fff; font-size: 15px; padding: 6px; }
.content { max-width: 560px; margin: 0 auto; padding: 14px 14px calc(90px + var(--bottom)); }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; background: #fff;
  border-top: 1px solid var(--line); padding-bottom: var(--bottom); }
.tabs button { flex: 1; background: none; border: 0; padding: 8px 2px 6px; color: var(--muted); font-size: 11px; }
.tabs button .ic { display: block; font-size: 22px; line-height: 26px; filter: grayscale(1); opacity: .7; }
.tabs button.on { color: var(--brand); font-weight: 700; } .tabs button.on .ic { filter: none; opacity: 1; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff;
  font-size: 11px; line-height: 18px; margin-left: 2px; }
.att-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.att-row:last-of-type { border-bottom: 0; }
.modal-bg { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.45); display: flex; align-items: flex-end;
  justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; border-radius: 16px 16px 0 0;
  padding: 18px 18px calc(18px + var(--bottom)); }
.modal .actions { display: flex; gap: 10px; margin-top: 14px; } .modal .actions > * { flex: 1; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--bottom)); z-index: 30;
  background: #222; color: #fff; padding: 10px 16px; border-radius: 10px; max-width: 90vw; font-size: 15px; }
.steps { text-align: left; padding-left: 22px; } .steps li { margin: 10px 0; }
.pin { letter-spacing: 12px; text-align: center; font-size: 28px; max-width: 220px; }
.spinner { width: 34px; height: 34px; border: 4px solid #cfd4da; border-top-color: var(--brand); border-radius: 50%;
  animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.lang-opt { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 14px 6px; font-size: 18px;
  border-bottom: 1px solid var(--line); }
.msg { cursor: pointer; } .msg.unread h3::before { content: "● "; color: var(--brand); }
.pre { white-space: pre-wrap; }
.smsbox { background: #F1F3F5; border-radius: 8px; padding: 8px; font-size: 13px; color: #333; white-space: pre-wrap; }
