/* SAJAG - black background, gray panels, whitish letters. Big letters, big buttons, made for easy reading. */
:root { color-scheme: dark; --bg: #000; --panel: #1a1a1a; --panel2: #232323; --ink: #f2f2f2; --dim: #a9a9a9; --line: #383838; --saffron: #ff9a1f; --saffron-ink: #111; --good: #5ddc8a; --bad: #ff7a70; --warn: #ffc15a; }
* { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; background: #000; }
html.big { font-size: 22px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif; line-height: 1.45; }
#app { min-height: 100vh; display: flex; flex-direction: column; }
.boot { text-align: center; margin-top: 40vh; color: var(--dim); }
header.top { position: sticky; top: 0; z-index: 5; background: #0b0b0b; border-bottom: 1px solid var(--line); color: var(--ink); display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
.brand b { font-size: 1.3rem; color: var(--saffron); margin-right: 8px; letter-spacing: 1px; }
.brand span { font-size: 0.85rem; color: var(--dim); }
.tools { display: flex; gap: 6px; }
.mini { background: transparent; color: var(--ink); border: 1px solid #666; border-radius: 8px; padding: 6px 12px; font-size: 0.9rem; cursor: pointer; font-family: inherit; }
.mini.on { background: var(--saffron); color: var(--saffron-ink); border-color: var(--saffron); font-weight: 800; }
main { flex: 1; padding: 12px 12px 96px; width: 100%; max-width: 760px; margin: 0 auto; }
.screen .topbar { display: flex; gap: 8px; margin-bottom: 8px; }
h1, h2 { color: #fff; }
h2 { margin: 6px 0 12px; font-size: 1.45rem; }
h3 { margin: 18px 0 8px; color: #fff; font-size: 1.15rem; }
h4 { margin: 12px 0 6px; color: #ddd; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; display: block; width: 100%; text-align: left; font: inherit; color: inherit; }
.link-card { cursor: pointer; }
.link-card:hover { border-color: #777; }
.muted { color: var(--dim); font-size: 0.9rem; margin: 4px 0; }
.center { text-align: center; }
.big { font-size: 2rem; font-weight: 700; color: #fff; margin: 4px 0 8px; }
.bigcode { font-size: 2.2rem; letter-spacing: 6px; font-weight: 800; color: var(--saffron); text-align: center; background: #2a1c08; border: 1px dashed var(--saffron); border-radius: 10px; padding: 10px; margin: 8px 0; user-select: all; }
.pre { white-space: pre-wrap; word-wrap: break-word; margin: 6px 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; margin: 4px 0; }
.clampline { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 4px 0; }
.hidden { display: none; }
.bad { color: var(--bad); }
.between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.inl { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.ask { font-size: 0.9rem; font-weight: 600; }
.btn { display: inline-block; min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 2px solid #8c8c8c; background: transparent; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; margin: 4px 6px 4px 0; }
.btn:hover { border-color: #fff; }
.btn.primary { background: var(--saffron); border-color: var(--saffron); color: var(--saffron-ink); }
.btn.bad { border-color: var(--bad); color: var(--bad); }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: 0.9rem; }
.btn.ghost { border-color: var(--line); color: #bbb; }
.btn:disabled { opacity: 0.45; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: #333; color: #ddd; margin-right: 4px; }
.pill.good { background: #12351f; color: var(--good); }
.pill.bad { background: #3d1612; color: var(--bad); }
.pill.warn { background: #3a2a08; color: var(--warn); }
.pill.hot { background: var(--saffron); color: var(--saffron-ink); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.tile { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 84px; }
.tile:hover { border-color: #777; }
.tile .ti { font-size: 1.5rem; }
.tile .tt { font-weight: 700; color: #fff; }
.tile .ts { font-size: 0.9rem; color: var(--dim); }
.tile.hot { border-color: var(--saffron); background: #2a1c08; }
.tile.good .ts { color: var(--good); font-weight: 700; }
.tile.bad .ts { color: var(--bad); font-weight: 700; }
.form { display: flex; flex-direction: column; gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.fld.chk { flex-direction: row; align-items: center; gap: 10px; }
input, select, textarea { font: inherit; padding: 12px 14px; border: 2px solid #4a4a4a; border-radius: 10px; background: #0c0c0c; color: #f5f5f5; width: 100%; }
input::placeholder, textarea::placeholder { color: #777; }
input[type=checkbox] { width: 26px; height: 26px; accent-color: var(--saffron); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--saffron); }
select option { background: #111; color: #f5f5f5; }
.search { margin: 6px 0 10px; }
.msg { min-height: 1.2em; font-weight: 600; }
.msg.bad { color: var(--bad); }
.flash { position: fixed; left: 50%; transform: translateX(-50%); top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 20; padding: 12px 18px; border-radius: 12px; font-weight: 700; color: #000; box-shadow: 0 4px 14px rgba(0,0,0,0.6); max-width: 92vw; }
.flash.ok { background: var(--good); }
.flash.bad { background: var(--bad); }
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; background: #0b0b0b; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbtn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; background: none; border: 0; font: inherit; font-size: 0.72rem; color: #b5b5b5; cursor: pointer; }
.tabbtn .ti { font-size: 1.35rem; }
.tabbtn.on { color: var(--saffron); font-weight: 800; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.chip { padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.chip.on { border-color: var(--saffron); background: #2a1c08; color: #fff; }
.notice.unread { border-left: 6px solid var(--saffron); }
.notice.off { opacity: 0.5; }
.nhead { margin-bottom: 2px; }
.tl { border-left: 3px solid #444; padding: 2px 0 8px 10px; margin-left: 4px; }
.photo { max-width: 100%; border-radius: 10px; margin-top: 8px; }
.scroll { overflow-x: auto; margin-bottom: 10px; }
.tbl { border-collapse: collapse; width: 100%; background: var(--panel); font-size: 0.88rem; color: var(--ink); }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; white-space: nowrap; }
.tbl th { background: var(--panel2); color: #fff; }
.tbl td.cell { text-align: center; }
.barrow { margin: 8px 0; }
.barlbl { display: flex; justify-content: space-between; gap: 8px; font-size: 0.9rem; }
.bartrack { background: #2c2c2c; border-radius: 6px; height: 12px; overflow: hidden; }
.barfill { background: var(--saffron); height: 12px; border-radius: 6px; }
.acc { width: 100%; text-align: left; background: none; border: 0; font: inherit; font-weight: 700; color: #fff; padding: 4px 0; cursor: pointer; }
.camgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cam { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.camscreen { background: #000; color: #777; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 1.6rem; border: 1px solid #222; }
.login { max-width: 440px; margin: 0 auto; padding: 24px 18px; width: 100%; }
.login h1 { text-align: center; margin: 6px 0 0; letter-spacing: 2px; }
.login .card { background: var(--panel); }
.logo { text-align: center; }
.logo img { width: 84px; height: 84px; }
.langpick { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.langpick .mini { min-width: 120px; min-height: 46px; font-size: 1rem; }
.link { color: var(--saffron); font-weight: 700; }
a.btn { text-align: center; }
.hint { border: 1px dashed var(--saffron); background: #1b1307; }
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  header.top, nav.tabs, .topbar, .noprint, .flash { display: none !important; }
  .card, .tbl, .tbl th, .tbl td { background: #fff !important; color: #000 !important; border-color: #888 !important; }
  .bigcode { color: #000 !important; background: #fff !important; border-color: #000 !important; }
  h2, h3, h4 { color: #000 !important; }
  main { max-width: none; padding: 0; }
}

/* ---- v3: modules, tabs, blinking red for unpaid ---- */
.modhead { display: flex; align-items: center; gap: 10px; margin: 2px 0 8px; font-size: 1.35rem; color: #fff; }
.modhead span { font-size: 1.6rem; }
.tabstrip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; -webkit-overflow-scrolling: touch; }
.tabstrip .stab { flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; border: 2px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tabstrip .stab.on { border-color: var(--saffron); background: #2a1c08; color: #fff; }
.tabstrip.sub .stab { padding: 6px 13px; font-size: 0.9rem; font-weight: 600; }
.modbody { margin-top: 2px; }
.trend { margin-bottom: 12px; }
.card.owe { border: 2px solid #ff3b30; background: #3a0d0a; color: #fff; width: 100%; text-align: left; cursor: pointer; }
.tile.owe { border: 2px solid #ff3b30; background: #3a0d0a; }
@keyframes blinkred { 0%, 100% { background-color: #3a0d0a; border-color: #ff3b30; box-shadow: 0 0 0 rgba(255,59,48,0); } 50% { background-color: #b3180d; border-color: #ff9d94; box-shadow: 0 0 16px rgba(255,59,48,0.8); } }
@keyframes blinkfade { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.card.blink, .tile.blink { animation: blinkred 1.1s ease-in-out infinite; }
.pill.blink { background: #ff3b30; color: #fff; animation: blinkfade 1.1s ease-in-out infinite; }
.tabbtn.blink { color: #ff6b61; font-weight: 800; }
.tabbtn.blink .ti { animation: blinkfade 1s ease-in-out infinite; filter: drop-shadow(0 0 5px #ff3b30); }
.tabstrip .stab.blink { border-color: #ff3b30; color: #ff8d85; animation: blinkfade 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .card.blink, .tile.blink, .pill.blink, .tabbtn.blink .ti, .tabstrip .stab.blink { animation-duration: 3s; } }
.brand { cursor: pointer; }
