/* SHABAB PMMS 1.0 — base: SHABAB look (navy / blue / gold hairline), phone first, dark mode. Extra PMMS styles at the end. */
:root {
  --blue: #1A5BE6; --navy: #06276F; --gold: #D4A63A; --silver: #C9D1DC;
  --bg: #EEF2F8; --card: #FFFFFF; --ink: #0B1B44; --muted: #5B6B8C; --line: #DCE3EE; --soft: #F5F7FB;
  --red: #C62828; --red-bg: #FDECEC; --amber: #B26A00; --amber-bg: #FFF4E0; --green: #1B7F3B; --green-bg: #E6F5EA;
  --chip: #E8EEFC; --shadow: 0 1px 2px rgba(6,39,111,.06), 0 4px 14px rgba(6,39,111,.07);
  --radius: 14px; --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070F24; --card: #0F1A36; --ink: #E7ECF7; --muted: #9AA8C7; --line: #22305A; --soft: #13204A;
    --red: #FF6B6B; --red-bg: #3A1418; --amber: #FFB547; --amber-bg: #3A2A10; --green: #5ED38A; --green-bg: #0F2E1C;
    --chip: #1B2A57; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070F24; --card: #0F1A36; --ink: #E7ECF7; --muted: #9AA8C7; --line: #22305A; --soft: #13204A;
  --red: #FF6B6B; --red-bg: #3A1418; --amber: #FFB547; --amber-bg: #3A2A10; --green: #5ED38A; --green-bg: #0F2E1C;
  --chip: #1B2A57; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.35); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-text-size-adjust: 100%; overflow-x: hidden; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; min-height: 80vh; color: var(--muted); letter-spacing: .2em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }

/* ---------- login / setup */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 10% -10%, #1A5BE6 0%, transparent 60%), linear-gradient(160deg, #06276F, #031542 70%); }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.35); overflow: hidden; border-top: 3px solid var(--gold); }
.auth-card .logo { display: block; width: 100%; height: auto; background: #fff; }
.auth-body { padding: 18px 20px 22px; }
.auth h1 { margin: 0 0 2px; font-size: 18px; letter-spacing: .08em; color: var(--navy); }
:root[data-theme="dark"] .auth h1 { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth h1 { color: var(--ink); } }
.auth .sub { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.field { display: block; margin: 10px 0; }
.field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); outline: none; min-width: 0; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,91,230,.18); }
.msg { margin: 10px 0 0; padding: 9px 11px; border-radius: 10px; font-size: 13.5px; }
.msg.err { background: var(--red-bg); color: var(--red); }
.msg.ok { background: var(--green-bg); color: var(--green); }
.msg.warn { background: var(--amber-bg); color: var(--amber); }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; background: var(--blue); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; min-height: 42px; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.full { width: 100%; }
.btn.ghost { background: transparent; color: var(--blue); border-color: var(--line); }
.btn.gold { background: linear-gradient(180deg, #E2B955, #C8962A); color: #2A1C00; }
.btn.red { background: var(--red); }
.btn.sm { padding: 6px 10px; min-height: 34px; font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }

/* ---------- shell */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); color: #fff; background: linear-gradient(90deg, #06276F, #0B3A9C 60%, #1A5BE6); border-bottom: 1px solid var(--gold); }
.top .brand { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.top .brand img { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.top .brand b { letter-spacing: .12em; font-size: 15px; white-space: nowrap; }
.top .brand small { display: block; font-size: 10.5px; letter-spacing: .14em; color: #C9D6F5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .brand > div { min-width: 0; }
.top .tbtn { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff; border-radius: 9px; min-width: 38px; height: 36px; padding: 0 10px; cursor: pointer; font-size: 14px; }
.layout { display: flex; min-height: calc(100vh - 57px); }
.side { width: 240px; flex: none; background: var(--card); border-right: 1px solid var(--line); padding: 12px 10px 90px; position: sticky; top: 57px; height: calc(100vh - 57px); overflow-y: auto; }
.side h4 { margin: 14px 10px 6px; font-size: 11px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.side a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.side a:hover { background: var(--soft); }
.side a.on { background: var(--chip); color: var(--blue); font-weight: 700; box-shadow: inset 3px 0 0 var(--gold); }
.side .badge { background: var(--red); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 11.5px; font-weight: 700; }
.side .tag { font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; }
main { flex: 1; min-width: 0; padding: 16px; padding-bottom: 96px; }
.bottom { display: none; }
.scrim { display: none; }
@media (max-width: 899px) {
  .side { position: fixed; z-index: 40; top: 0; left: 0; height: 100vh; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); padding-top: max(16px, env(safe-area-inset-top)); }
  .side.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(3,12,35,.45); z-index: 39; }
  .bottom { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding: 6px 8px; padding-bottom: max(6px, env(safe-area-inset-bottom)); gap: 6px; }
  .bottom button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; background: none; border: 0; padding: 6px 2px; border-radius: 10px; color: var(--muted); font-size: 11.5px; cursor: pointer; }
  .bottom button b { font-size: 18px; line-height: 1; color: var(--blue); }
  .bottom button:active { background: var(--soft); }
  .top .hide-phone { display: none; }
}
@media (min-width: 900px) { .top .menu-btn { display: none; } }

/* ---------- content */
h2.page { margin: 2px 0 12px; font-size: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h3 { margin: 18px 0 8px; font-size: 15px; letter-spacing: .02em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; min-width: 0; }
.card + .card { margin-top: 12px; }
.grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; box-shadow: var(--shadow); position: relative; overflow: hidden; min-width: 0; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue); }
.kpi.red::before { background: var(--red); } .kpi.green::before { background: var(--green); } .kpi.gold::before { background: var(--gold); }
.kpi .l { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v { font-size: 18px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v.red { color: var(--red); } .kpi .v.green { color: var(--green); }
.kpi .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; background: var(--chip); color: var(--blue); white-space: nowrap; }
.chip.cc { background: var(--navy); color: #fff; border: 1px solid var(--gold); letter-spacing: .1em; }
.chip.on { background: var(--green-bg); color: var(--green); }
.chip.off { background: var(--red-bg); color: var(--red); }
.chip.ns { background: var(--soft); color: var(--muted); border: 1px dashed var(--line); }
.chip.soon { background: var(--amber-bg); color: var(--amber); }
.country { display: flex; flex-direction: column; gap: 8px; }
.country .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.country .head b { font-size: 16px; }
.country .kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; font-size: 13.5px; }
.country .kv span:nth-child(odd) { color: var(--muted); }
.country .kv span:nth-child(even) { text-align: right; font-weight: 600; }
.bar { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #4F86FF); border-radius: 99px; }
.bar.done i { background: linear-gradient(90deg, #1B7F3B, #36B368); }
.alertbox { background: var(--red-bg); border: 1px solid var(--red); border-left-width: 5px; color: var(--ink); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.alertbox b { color: var(--red); }
.alertbox ul { margin: 6px 0 4px; padding-left: 18px; }
.alertbox li { margin: 2px 0; word-break: break-word; }
.okbox { background: var(--green-bg); border: 1px solid var(--green); color: var(--green); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-weight: 600; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 9px 2px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; min-width: 0; }
.list li > div { min-width: 0; word-break: break-word; }
.list li:last-child { border-bottom: 0; }
.lvl { width: 9px; height: 9px; border-radius: 99px; flex: none; margin-top: 6px; background: var(--amber); }
.lvl.red { background: var(--red); }
.tbl-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th, table.t td { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.t th { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; white-space: nowrap; }
table.t td.r, table.t th.r { text-align: right; }
table.t tr.bad td { color: var(--red); }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .lbl { fill: var(--ink); font-weight: 600; }
.soon-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.soon-tile { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; background: var(--card); text-align: center; }
.soon-tile b { display: block; margin: 6px 0 2px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.tabs button { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.tabs button.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.form2 { display: grid; gap: 0 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .form2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.help { font-size: 13px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.help ol { margin: 6px 0 0; padding-left: 18px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 86px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; box-shadow: var(--shadow); max-width: calc(100vw - 32px); border-bottom: 2px solid var(--gold); }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }

.modal { position: fixed; inset: 0; background: rgba(3,12,35,.55); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal .box { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--card); border-radius: 16px; padding: 16px; border-top: 3px solid var(--gold); }
.red { color: var(--red); } .green { color: var(--green); }
.hidden-x { position: fixed; left: -9999px; top: 0; opacity: 0; }
.row > input.field, .row > select.field { flex: 1 1 160px; min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.row > select.field { flex: 0 1 160px; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.side p.muted { padding: 0 10px; }
.grid > .card + .card, .grid .card + .card { margin-top: 0; }
.kpi .s { white-space: normal; overflow: visible; }
.list li b.num, .list li .num { white-space: nowrap; flex: none; }
/* ---------- 1.2 PHONE POLISH (looks only — nothing moves, nothing is hidden). Also used inside the NEXUS Android app 1.1. */
:root { --glass: rgba(255,255,255,.94); --glass-line: rgba(212,166,58,.55); }
:root[data-theme="dark"] { --glass: rgba(15,26,54,.94); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glass: rgba(15,26,54,.94); } }
.top { box-shadow: 0 2px 14px rgba(3,21,66,.28); }
.btn { border-radius: 12px; transition: transform .08s ease, filter .15s ease; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.gold { box-shadow: 0 3px 12px rgba(200,150,42,.28); }
.auth-card { border-radius: 20px; }
.toast { border-radius: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); text-align: center; }
@media (max-width: 899px) {
  main { padding: 14px 14px calc(100px + env(safe-area-inset-bottom)); }
  h2.page { font-size: 21px; margin-bottom: 14px; }
  h2.page::after { content: ""; flex-basis: 100%; height: 2px; max-width: 46px; margin-top: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--gold), transparent); }
  h3 { margin: 22px 2px 10px; }
  .card { border-radius: 16px; padding: 15px; }
  .card + .card { margin-top: 14px; }
  .grid { gap: 12px; }
  .kpi { border-radius: 14px; padding: 12px 13px; }
  .kpi .l { white-space: normal; overflow: visible; line-height: 1.3; }
  .kpi .v { font-size: clamp(16px, 4.7vw, 19px); }
  .alertbox, .okbox, .banner { border-radius: 14px; }
  .field input, .field select, .field textarea { min-height: 46px; border-radius: 12px; font-size: 16px; }
  .field textarea { min-height: 0; }
  .tabs button { min-height: 38px; padding: 7px 14px; }
  main > .row > .btn, .card > .row:last-child > .btn:not(.sm) { flex: 1 1 150px; }
  .btn.full { min-height: 50px; font-size: 16px; }
  .side { width: min(84vw, 300px); border-right: 1px solid var(--glass-line); }
  .side a { min-height: 44px; }
  .bottom { background: var(--glass); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--glass-line); box-shadow: 0 -6px 20px rgba(6,39,111,.10); padding: 4px 10px; padding-bottom: max(4px, env(safe-area-inset-bottom)); }
  .bottom button { min-height: 52px; justify-content: center; gap: 3px; font-weight: 600; letter-spacing: .02em; }
  .bottom button b { font-size: 20px; }
  .modal .box { border-radius: 20px; }
}
@media (max-width: 380px) {
  main { padding-left: 12px; padding-right: 12px; }
  .grid { gap: 10px; }
  .kpi { padding: 11px; }
  .top .brand small { letter-spacing: .08em; }
}
/* inside the Android app: the app already gives a navy status bar and the phone Back button */


/* ---------- SHABAB WHATSAPP additions */
:root { --wa: #1FA855; --wa-dark: #0E7A3E; --wa-bg: #E7F7EC; --bubble-in: #FFFFFF; --bubble-out: #DCF8C6; --chat-bg: #EAE6DF; }
:root[data-theme="dark"] { --wa: #3DDC84; --wa-dark: #25B865; --wa-bg: #0F2E1C; --bubble-in: #1B2A57; --bubble-out: #0E4A2E; --chat-bg: #0B1530; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --wa: #3DDC84; --wa-dark: #25B865; --wa-bg: #0F2E1C; --bubble-in: #1B2A57; --bubble-out: #0E4A2E; --chat-bg: #0B1530; } }
.btn.green { background: linear-gradient(180deg, #25C463, #13924A); }
.kpi.wa::before { background: var(--wa); }
.chip.wa { background: var(--wa-bg); color: var(--wa-dark); }
.chip.bad { background: var(--red-bg); color: var(--red); }
.chip.amb { background: var(--amber-bg); color: var(--amber); }
.top .brand .wa-dot { color: #7CF2A8; }
.secret { font: 600 14px/1.5 ui-monospace, Consolas, monospace; background: var(--soft); border: 1px dashed var(--gold); border-radius: 10px; padding: 10px; word-break: break-all; user-select: all; }
.co { display: flex; flex-direction: column; gap: 6px; }
.co .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.co .head b { font-size: 16px; overflow-wrap: anywhere; }
.co .kv { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 2px 10px; font-size: 13px; }
.co .kv span:nth-child(odd) { color: var(--muted); white-space: nowrap; }
.co .kv span:nth-child(even) { overflow-wrap: anywhere; min-width: 0; }
.mono { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.inbox { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .inbox { grid-template-columns: 300px minmax(0, 1fr); } }
.clist { list-style: none; margin: 0; padding: 0; }
.clist li { display: flex; gap: 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; min-width: 0; }
.clist li:hover, .clist li.on { background: var(--soft); }
.clist .av { width: 38px; height: 38px; border-radius: 99px; background: var(--wa-bg); color: var(--wa-dark); display: grid; place-items: center; font-weight: 700; flex: none; }
.clist .ci { min-width: 0; flex: 1; }
.clist .ci b, .clist .ci span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clist .ci span { font-size: 12.5px; color: var(--muted); }
.clist .un { background: var(--wa); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 1px 7px; flex: none; }
.chat { background: var(--chat-bg); border-radius: 14px; padding: 10px; min-height: 280px; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); }
.bub { max-width: 85%; padding: 7px 10px 5px; border-radius: 12px; box-shadow: 0 1px 1px rgba(0,0,0,.12); background: var(--bubble-in); align-self: flex-start; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 14px; }
.bub.out { background: var(--bubble-out); align-self: flex-end; }
.bub .meta { display: block; text-align: right; font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.bub.failed { border: 1px solid var(--red); }
.reply { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.reply textarea { flex: 1; min-width: 0; resize: vertical; min-height: 46px; max-height: 160px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.winbar { font-size: 12.5px; margin: 6px 0 0; }
.tpl { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--soft); min-width: 0; }
.tpl + .tpl { margin-top: 10px; }
.tpl .txt { font-size: 13.5px; overflow-wrap: anywhere; margin: 6px 0; }
.tpl .txt[dir=rtl] { text-align: right; }
.landing { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 500px at 90% -10%, #1FA855 0%, transparent 55%), linear-gradient(160deg, #06276F, #031542 70%); color: #fff; }
.landing .box { max-width: 560px; width: 100%; background: var(--card); color: var(--ink); border-radius: 20px; padding: 22px; border-top: 3px solid var(--gold); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.landing h1 { margin: 8px 0 4px; font-size: 22px; letter-spacing: .06em; color: var(--navy); }
:root[data-theme="dark"] .landing h1 { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .landing h1 { color: var(--ink); } }
.landing img.mark { width: 64px; height: 64px; border-radius: 16px; }
.docs { max-width: 860px; margin: 0 auto; padding: 16px; }
.docs h1 { font-size: 22px; } .docs h2 { font-size: 17px; margin-top: 26px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.docs code { font-family: ui-monospace, Consolas, monospace; background: var(--soft); border-radius: 6px; padding: 1px 5px; overflow-wrap: anywhere; }
.docs pre { overflow-x: auto; white-space: pre; font-size: 12.5px; }
.docs table.t { margin: 8px 0; }
[data-mt] { margin-top: 10px; }
.banner { background: var(--amber-bg); color: var(--amber); border: 1px solid currentColor; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.btn.green, .btn.red { color: #fff; }
.btn.green { background: linear-gradient(180deg, #179E4C, #0D7A3B); font-weight: 700; }
#coSel { flex: 1 1 220px; }

/* ---------- 1.1: portal + admin additions */
.secret { white-space: pre-wrap; word-break: break-all; }
label.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 8px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); cursor: pointer; }
label.check input { margin-top: 3px; flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--green); }
label.check span { font-size: 14px; }
.bar { height: 10px; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; display: flex; margin: 8px 0; }
.bar i { display: block; height: 100%; }
.bar i.s { background: var(--blue); } .bar i.d { background: var(--green); } .bar i.f { background: var(--red); } .bar i.k { background: var(--silver); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dot.s { background: var(--blue); } .dot.d { background: var(--green); } .dot.f { background: var(--red); } .dot.k { background: var(--silver); } .dot.r { background: var(--gold); }
.camp { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 10px 0; box-shadow: var(--shadow); }
.camp .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.camp .head b { font-size: 15.5px; }
.preview { background: #E7FFDB; color: #111; border-radius: 12px 12px 12px 4px; padding: 10px 12px; max-width: 420px; white-space: pre-wrap; box-shadow: 0 1px 1px rgba(0,0,0,.12); font-size: 14px; }
:root[data-theme="dark"] .preview { background: #005C4B; color: #E9EDEF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .preview { background: #005C4B; color: #E9EDEF; } }
.preview img { display: block; max-width: 100%; border-radius: 8px; margin-bottom: 6px; }
.stepper { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.stepper span { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.stepper span.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 18px; text-align: center; background: var(--soft); }
.drop.over { border-color: var(--green); background: var(--green-bg); }
.portal-tag { display: inline-block; font-size: 10.5px; letter-spacing: .12em; padding: 2px 8px; border-radius: 99px; background: var(--gold); color: #2A1C00; font-weight: 700; margin-left: 6px; vertical-align: middle; }
a.link, .camp.link { display: block; text-decoration: none; color: inherit; }
a.link:hover, .camp.link:hover { border-color: var(--blue); }
.bignum { font-size: 22px; font-weight: 700; }
.drop input[type=file] { max-width: 100%; }
.nw { white-space: nowrap; }
.show-phone { display: none; }
@media (max-width: 640px) { .show-phone { display: inline; } }
@media (max-width: 640px) { th.hide-phone, td.hide-phone { display: none; } }

/* =================== SHABAB PMMS 1.0 =================== */
.chip.st-new { background: #E8EEFC; color: #1A5BE6; } .chip.st-assigned { background: #EFE7FF; color: #6B3FD6; } .chip.st-on_way { background: #E2F4FF; color: #0A79B8; }
.chip.st-in_progress { background: var(--amber-bg); color: var(--amber); } .chip.st-on_hold { background: #F1F1F1; color: #666; } .chip.st-done { background: var(--green-bg); color: var(--green); }
.chip.st-closed { background: var(--soft); color: var(--muted); } .chip.st-cancelled { background: var(--red-bg); color: var(--red); }
.chip.pr-urgent { background: var(--red); color: #fff; } .chip.pr-high { background: var(--amber-bg); color: var(--amber); } .chip.pr-low { background: var(--soft); color: var(--muted); }
.chip.late { background: var(--red-bg); color: var(--red); border: 1px solid var(--red); }
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .kpis { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.kpi.click { cursor: pointer; } .kpi.click:hover { border-color: var(--blue); }
.kpi.red .v { color: var(--red); } .kpi.big .v { font-size: 26px; }
.dash { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
@media (min-width: 1100px) { .dash { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.dash > div { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.dash .card + .card { margin-top: 0; }
.card h3, .card .h { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.card h3 small { font-weight: 500; color: var(--muted); font-size: 12px; }
.jl { list-style: none; margin: 0; padding: 0; }
.jl li { display: flex; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; }
.jl li:last-child { border-bottom: 0; } .jl li:hover { background: var(--soft); }
.jl .ji { min-width: 0; flex: 1; } .jl .ji b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.jl .ji span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jl .jno { font: 600 11.5px ui-monospace, Consolas, monospace; color: var(--muted); }
.jl .act { flex: none; display: flex; gap: 6px; align-items: center; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.free { background: var(--green); } .dot.working { background: var(--amber); } .dot.on_way { background: #0A79B8; } .dot.off { background: var(--silver); }
.tb { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.tcard { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; gap: 10px; align-items: flex-start; background: var(--soft); min-width: 0; }
.tcard .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; flex: none; border: 2px solid var(--gold); }
.tcard .ti { min-width: 0; flex: 1; } .tcard .ti b { display: block; font-size: 14px; } .tcard .ti span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map { height: 360px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); z-index: 0; }
.map.tall { height: calc(100vh - 220px); min-height: 380px; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); display: grid; place-items: center; }
.pin i { transform: rotate(45deg); font-style: normal; color: #fff; font-weight: 700; font-size: 12px; }
.pin.t-free { background: #1B7F3B; } .pin.t-working { background: #B26A00; } .pin.t-on_way { background: #0A79B8; } .pin.t-off { background: #8A97AD; }
.pin.j-late { background: #C62828; } .pin.j-urgent { background: #E53935; } .pin.j-open { background: #1A5BE6; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.chart .b1 { fill: #1A5BE6; } .chart .b2 { fill: #1FA855; } .chart .grid { stroke: var(--line); stroke-width: 1; }
.hbar { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr) 40px; gap: 8px; align-items: center; font-size: 12.5px; margin: 5px 0; }
.hbar .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .trk { height: 10px; border-radius: 6px; background: var(--soft); overflow: hidden; border: 1px solid var(--line); } .hbar .trk i { display: block; height: 100%; background: linear-gradient(90deg, #1A5BE6, #4F8BFF); }
.hbar .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ring { display: flex; align-items: center; gap: 12px; } .ring svg { flex: none; }
.ring circle.bg { stroke: var(--soft); } .ring circle.fg { stroke: var(--green); } .ring text { fill: var(--ink); font-weight: 700; font-size: 16px; }
.stars { color: var(--gold); letter-spacing: 1px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 12px 10px; font-size: 13.5px; } .timeline li::before { content: ""; position: absolute; left: -21px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); border: 2px solid var(--card); }
.timeline li.k-done::before, .timeline li.k-closed::before { background: var(--green); } .timeline li.k-cancelled::before { background: var(--red); } .timeline li.k-photo::before, .timeline li.k-note::before { background: var(--silver); }
.timeline .tm { color: var(--muted); font-size: 11.5px; display: block; }
.photos { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.photos a { display: block; position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1; background: var(--soft); }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; } .photos span { position: absolute; left: 4px; bottom: 4px; font-size: 10px; background: rgba(0,0,0,.6); color: #fff; padding: 1px 6px; border-radius: 99px; }
.bigact { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px 0; }
.bigact .btn { min-height: 56px; font-size: 16px; border-radius: 14px; }
.bigact .btn.wide { grid-column: 1 / -1; }
.duty { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, #06276F, #1A5BE6); color: #fff; border-bottom: 2px solid var(--gold); }
.duty b { font-size: 17px; } .duty small { display: block; color: #C9D6F5; font-size: 12px; }
.duty .btn { background: #fff; color: var(--navy); } .duty .btn.out { background: var(--gold); color: #2A1C00; }
.sig { width: 100%; height: 180px; border: 2px dashed var(--line); border-radius: 12px; background: #fff; touch-action: none; display: block; }
.btn.amber { background: var(--amber); } .btn.navy { background: var(--navy); } .btn.wa { background: #1FA855; }
.bell { position: relative; } .bell .n { position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff; border-radius: 99px; font-size: 10.5px; font-weight: 700; padding: 0 5px; min-width: 18px; line-height: 18px; text-align: center; border: 1px solid #fff; }
.alertflash { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 70; background: var(--red); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.3); max-width: calc(100vw - 32px); cursor: pointer; border-bottom: 3px solid var(--gold); font-weight: 600; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0 10px; }
.filters select, .filters input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); min-width: 0; flex: 1 1 140px; }
.searchres { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 4px; background: var(--card); }
.searchres div { padding: 9px 10px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; } .searchres div:hover, .searchres div.on { background: var(--chip); }
.qrgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.qrcard { border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; background: #fff; color: #000; break-inside: avoid; }
.qrcard img { width: 120px; height: 120px; image-rendering: pixelated; } .qrcard b { display: block; font-size: 14px; } .qrcard small { display: block; font-size: 11px; color: #444; }
.att td.P { color: var(--green); font-weight: 700; } .att td.L { color: var(--amber); font-weight: 700; } .att td.A { color: var(--muted); }
.landing2 { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; background: radial-gradient(1200px 600px at 10% -10%, #1A5BE6 0%, transparent 60%), linear-gradient(160deg, #06276F, #031542 70%); }
.landing2 .box { width: 100%; max-width: 460px; background: var(--card); border-radius: 18px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); border-top: 3px solid var(--gold); }
.countries { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.countries button { border: 1px solid var(--line); border-radius: 12px; background: var(--soft); padding: 12px; cursor: pointer; text-align: left; font-weight: 600; }
.countries button.on { border-color: var(--blue); background: var(--chip); box-shadow: inset 0 0 0 1px var(--blue); } .countries small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.print-only { display: none; }
@media print {
  .top, .side, .bottom, .no-print, .toast, .alertflash { display: none !important; }
  .layout { display: block; } main { padding: 0 !important; } body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; } .print-only { display: block; }
  .tbl-wrap { overflow: visible; } table.t { font-size: 11px; }
}
.m0 { margin: 0; } .red { color: var(--red); } .sigimg { max-width: 100%; max-height: 160px; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.dot[data-c="b1"] { background: #1A5BE6; } .bigact .btn.green.wide { grid-column: 1 / -1; }
.chat audio { max-width: 220px; height: 36px; vertical-align: middle; }
.side select.field { margin: 4px 10px; width: calc(100% - 20px); padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
@media (max-width: 640px) { .jl li { flex-wrap: wrap; } .jl .act { width: 100%; padding-left: 20px; flex-wrap: wrap; } .jl .ji b { white-space: normal; } }

/* brand logo (SB art 13 Oct) */
.logo-wide { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto 6px; }
.sub.center, .center { text-align: center; }

/* QA 13 Oct: attendance month sheet fits A4 when printed (31 day columns) */
@media print { table.att th, table.att td { font-size: 8px; padding: 1px 2px; } table.att th { letter-spacing: 0; text-transform: none; } }
/* QA 13 Oct: Arabic (RTL) mirrors correctly */
[dir="rtl"] .timeline { border-left: 0; border-right: 2px solid var(--line); padding: 0 14px 0 0; }
[dir="rtl"] .timeline li { padding: 0 10px 12px 0; }
[dir="rtl"] .timeline li::before { left: auto; right: -21px; }
[dir="rtl"] .side a.on { box-shadow: inset -3px 0 0 var(--gold); }
[dir="rtl"] table.t th, [dir="rtl"] table.t td { text-align: right; }
[dir="rtl"] table.t td.r, [dir="rtl"] table.t th.r { text-align: left; }
[dir="rtl"] .countries button { text-align: right; }
[dir="rtl"] .bub .meta { text-align: left; }
[dir="rtl"] .photos span { left: auto; right: 4px; }
@media (max-width: 899px) { [dir="rtl"] .side { left: auto; right: 0; transform: translateX(105%); } [dir="rtl"] .side.open { transform: none; } }
@media (max-width: 640px) { [dir="rtl"] .jl .act { padding-left: 0; padding-right: 20px; } }
[dir="rtl"] .kv span, [dir="rtl"] .bub .meta, [dir="rtl"] .timeline .tm, [dir="rtl"] .alertflash, [dir="rtl"] .jl .ji span { unicode-bidi: plaintext; }
/* 30-day trial banner: blue, orange at 7 days or less, red on the last day */
.banner.trial { background: var(--chip); color: var(--blue); } .banner.trial.warn { background: var(--amber-bg); color: var(--amber); } .banner.trial.red { background: var(--red-bg); color: var(--red); }
.trialbox { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; } .trialbox input { padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); min-width: 0; } .amber-t { color: var(--amber); }
