@font-face { font-family: "Noto Sans Devanagari"; src: url("fonts/NotoSansDevanagari-Regular.53ef84da2e0f.ttf"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans Devanagari"; src: url("fonts/NotoSansDevanagari-Bold.105c07859171.ttf"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f4f6f9; --panel: #ffffff; --ink: #1b2430; --muted: #5d6b7a; --line: #dfe4ea;
  --brand: #1d4e89; --brand-soft: #e6eef8; --good: #1e7d4f; --good-soft: #e3f4ea; --warn: #9a6200;
  --warn-soft: #fdf1dc; --bad: #b3261e; --bad-soft: #fbe7e6; --wa: #075e54; --wa-bubble: #dcf8c6; --wa-bg: #ece5dd;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
       font-size: 14.5px; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; } h2 { font-size: 17px; margin: 0 0 10px; } h3 { font-size: 15px; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 18px; }

/* layout */
.top { background: var(--brand); color: #fff; display: flex; align-items: center; gap: 16px; padding: 10px 20px; }
.top .name { font-weight: 700; font-size: 16px; } .top .tag { background: #ffffff26; border-radius: 99px; padding: 2px 10px; font-size: 12px; }
.top .right { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: 13px; } .top a { color: #fff; }
.wrap { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 48px); }
nav.side { background: var(--panel); border-right: 1px solid var(--line); padding: 14px 10px; }
nav.side a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--ink); margin-bottom: 2px; }
nav.side a.on, nav.side a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
nav.side .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 12px 4px; }
main { padding: 22px 26px 60px; max-width: 1280px; }
@media (max-width: 860px) { .wrap { grid-template-columns: 1fr; } nav.side { display: flex; flex-wrap: wrap; gap: 2px; }
  nav.side .grp { display: none; } main { padding: 16px; } }

/* blocks */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 14px; } .g4 { grid-template-columns: repeat(4, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 1000px) { .g4, .g3 { grid-template-columns: 1fr 1fr; } .g2 { grid-template-columns: 1fr; } }
.kpi .v { font-size: 26px; font-weight: 700; } .kpi .l { color: var(--muted); font-size: 13px; } .kpi .n { font-size: 12px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #fafbfc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.b-good { background: var(--good-soft); color: var(--good); } .b-warn { background: var(--warn-soft); color: var(--warn); }
.b-bad { background: var(--bad-soft); color: var(--bad); } .b-mute { background: #eef0f3; color: var(--muted); }
.note { background: var(--warn-soft); border: 1px solid #f0d9a8; color: #5a3d00; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.info { background: var(--brand-soft); border: 1px solid #c9d9ee; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.msg { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; } .msg.success { background: var(--good-soft); }
.msg.error { background: var(--bad-soft); } .msg.warning { background: var(--warn-soft); }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .right { text-align: right; } .nowrap { white-space: nowrap; }

/* forms */
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 8px 16px; font: inherit; cursor: pointer; }
.btn:hover { text-decoration: none; filter: brightness(1.08); } .btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.good { background: var(--good); } .btn.bad { background: var(--bad); } .btn.sm { padding: 4px 10px; font-size: 13px; }
form .field { margin-bottom: 14px; } label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=date], input:not([type]), select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
textarea { resize: vertical; } .help { color: var(--muted); font-size: 12px; } .errorlist { color: var(--bad); margin: 4px 0; padding-left: 18px; font-size: 13px; }
.counter { float: right; font-weight: 400; color: var(--muted); font-size: 12px; } .counter.over { color: var(--bad); font-weight: 700; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; } .filters > * { width: auto; }

/* charts */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 96px; padding-top: 6px; border-bottom: 1px solid var(--line); }
.bars .day { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; height: 100%; }
.bars .in { background: #9dbbe0; border-radius: 3px 3px 0 0; } .bars .out { background: var(--brand); }
.bars-x { display: flex; gap: 6px; font-size: 10.5px; color: var(--muted); } .bars-x span { flex: 1; text-align: center; }
.hbar { display: flex; align-items: center; gap: 8px; margin: 5px 0; } .hbar .lab { width: 42%; font-size: 13px; }
.hbar .track { flex: 1; background: #eef1f5; height: 10px; border-radius: 6px; overflow: hidden; } .hbar .fill { background: var(--brand); height: 100%; }
.hbar .n { width: 44px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; }

/* menu tree */
ul.tree { list-style: none; padding-left: 18px; margin: 4px 0; } ul.tree li { margin: 3px 0; }
.node { display: inline-flex; gap: 8px; align-items: center; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.node .hi { color: var(--muted); }

/* WhatsApp phone preview and chats */
.phone { background: var(--wa-bg); border-radius: 18px; padding: 14px; max-width: 380px; border: 8px solid #1b2430; }
.phone .bar { background: var(--wa); color: #fff; margin: -14px -14px 12px; padding: 10px 14px; border-radius: 10px 10px 0 0; font-weight: 600; font-size: 14px; }
.bubble { background: #fff; border-radius: 10px; padding: 8px 11px; margin: 6px 0; max-width: 88%; box-shadow: 0 1px 1px #0001; font-size: 14px; word-wrap: break-word; }
.bubble.me { background: var(--wa-bubble); margin-left: auto; } .bubble .meta { font-size: 11px; color: var(--muted); text-align: right; margin-top: 3px; }
.bubble .opts { border-top: 1px solid #e5e5e5; margin-top: 8px; padding-top: 4px; }
.bubble .opts button, .bubble .opts .opt { display: block; width: 100%; background: none; border: 0; border-bottom: 1px solid #f0f0f0; color: #0b7bbf; padding: 6px 2px; text-align: center; font: inherit; cursor: pointer; }
.bubble .opts .row { text-align: left; color: var(--ink); } .bubble .opts .row small { display: block; color: var(--muted); }
.bubble .doc { background: #f5f5f5; border-radius: 6px; padding: 8px; display: flex; gap: 8px; align-items: center; }
.chat { background: var(--wa-bg); border-radius: 12px; padding: 14px; max-height: 70vh; overflow-y: auto; }
.chatbox { display: flex; gap: 8px; margin-top: 10px; } .chatbox input { flex: 1; }

/* login */
.login { max-width: 420px; margin: 8vh auto; } .login .card { padding: 26px; } .demo { font-size: 30px; letter-spacing: .2em; font-weight: 700; color: var(--brand); }
