/* SHABAB PMS 1.0 — base: SHABAB look (navy / blue / gold hairline), phone first, dark mode. Extra PMS 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 PMS 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); }
/* 1.0.1 QA: label / value lists everywhere (dashboard "This month", AMC cards), start-here steps, cleaner job card print */
.kv { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 2px 10px; }
.kv > span:nth-child(odd) { color: var(--muted); }
.kv > span:nth-child(even) { overflow-wrap: anywhere; min-width: 0; }
.row > .kv { flex: 1 1 180px; }
ol.steps { margin: 6px 0 0; padding-inline-start: 22px; }
ol.steps li { margin: 4px 0; }
ol.steps li.ok { color: var(--muted); text-decoration: line-through; }
@media print { [data-tr], .kv .btn, .kv a.btn { display: none !important; } }

/* 1.0.1+: TODAY screen (phone first) */
.tstrip .kpi.zero { opacity: .55; }
.tstrip .kpi .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
ul.tdl li .act { flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
@media (max-width: 520px) { ul.tdl li { flex-wrap: wrap; } ul.tdl li .act { width: 100%; } }
.gm-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.shared-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.shared-imgs img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #ccd); }
.mapmsg { margin: 6px 0; }
/* 1.0.1+: pop-ups — bigger on PC, bottom sheet on phone, sticky title + ✕ and sticky buttons, page behind does not scroll */
html.modal-open, html.modal-open body { overflow: hidden; }
.modal { overscroll-behavior: contain; }
.modal .box { position: relative; max-width: 640px; padding: 0 18px; font-size: 15.5px; overflow-x: hidden; overscroll-behavior: contain; }
@media (min-width: 900px) { .modal .box:has(.form2), .modal .box.wide { max-width: 720px; } }
.modal .box > .mx { position: sticky; top: 8px; float: right; margin: 8px -8px 0 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--soft); color: var(--text, inherit); font-size: 18px; line-height: 1; cursor: pointer; z-index: 4; }
[dir="rtl"] .modal .box > .mx { float: left; margin: 8px 8px 0 -8px; }
.modal .box h3:first-of-type { position: sticky; top: 0; z-index: 3; background: var(--card); margin: 0 -18px 10px; padding: 16px 58px 12px 18px; border-bottom: 1px solid var(--line); font-size: 18px; }
.modal .box > :last-child { margin-bottom: 14px; }
.modal .box .row.end { position: sticky; bottom: 0; z-index: 3; background: var(--card); margin: 12px -18px 0; padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.modal .box .row.end .btn { min-height: 44px; min-width: 96px; font-size: 15.5px; }
.modal .field input, .modal .field select, .modal .field textarea { min-height: 44px; font-size: 16px; }
.modal .field textarea { min-height: 88px; }
@media (max-width: 599px) {
  .modal { place-items: end stretch; padding: 0; }
  .modal .box { max-width: none; width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 18px 18px 0 0; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .modal .box .row.end { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .modal .box .row.end .btn { flex: 1 1 0; }
}
/* alert pop-up (new job / assigned): bigger, one big action button */
.alertflash { width: min(560px, calc(100vw - 24px)); padding: 16px 18px; font-size: 16.5px; line-height: 1.35; display: grid; gap: 12px; cursor: pointer; }
.alertflash .aft { padding-inline-end: 36px; font-weight: 600; }
.alertflash .afx { position: absolute; top: 8px; inset-inline-end: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 16px; cursor: pointer; }
.alertflash .afgo { width: 100%; min-height: 48px; font-size: 17px; background: #fff; color: var(--red); font-weight: 700; }
/* no jumping: scrollbar space always kept, page keeps its height while it refreshes */
html { scrollbar-gutter: stable; }
/* parts table: fixed columns, numbers right-aligned, one actions column, only the stock number is red when LOW */
table.t.parts { table-layout: fixed; width: 100%; min-width: 620px; }
table.t.parts col.c-name { width: auto; } table.t.parts col.c-n { width: 110px; } table.t.parts col.c-act { width: 250px; }
table.t.parts td, table.t.parts th { vertical-align: middle; }
table.t.parts td.acts { white-space: nowrap; } table.t.parts td.acts .btn { margin-inline-start: 4px; min-width: 40px; height: 34px; padding-top: 0; padding-bottom: 0; }
table.t.parts td.red b { color: var(--red); }
.t td.r.num, .t th.r { text-align: right; font-variant-numeric: tabular-nums; }
[dir="rtl"] .t td.r.num, [dir="rtl"] .t th.r { text-align: left; }
@media (max-width: 640px) { table.t.parts { min-width: 0; } table.t.parts col.c-act { width: 150px; } table.t.parts col.c-n { width: 84px; } table.t.parts td.acts [data-ed], table.t.parts td.acts [data-hi] { display: none; } }
@media (max-width: 640px) { table.t.parts { table-layout: auto; } table.t.parts td.pname { cursor: pointer; } table.t.parts col.c-act { width: 120px; } table.t.parts td.acts .btn { min-width: 0; padding-left: 8px; padding-right: 8px; } }
.show-phone { display: none; } @media (max-width: 640px) { .show-phone { display: inline; } }
table.t.parts td.pname { cursor: pointer; }
.side .langrow { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; margin: 4px 10px; }
.side .langrow select { flex: 1 1 auto; min-width: 0; width: auto; margin: 0; }
/* job page label | value list: labels never wrap, values wrap nicely */
.co .kv { grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; }
.co .kv > span:nth-child(odd) { white-space: nowrap; }
.co .kv .gm-row { margin-top: 4px; }

/* ---------------------------------------------------------------- 1.0.4: eye icon on every password box */
.pw-wrap, .field span.pw-wrap { position: relative; display: block; margin: 0; font-size: inherit; color: inherit; }
.pw-wrap > input { width: 100%; padding-inline-end: 46px !important; }
.pw-eye { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--blue); background: var(--chip); outline: none; }

/* ---------------------------------------------------------------- 1.0.4: top search (EN + AR) */
.tsearch { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tsearch-btn { font-size: 15px; }
.sr-box input { width: 100%; padding: 12px 14px; font-size: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); color: var(--ink); outline: none; }
.sr-box input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,91,230,.18); }
.sr-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: min(60vh, 520px); overflow: auto; }
.sr-list li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.sr-list li:hover, .sr-list li.on { background: var(--chip); border-color: var(--line); }
.sr-list li .ic { width: 26px; text-align: center; flex: 0 0 26px; }
.sr-list li .tx { display: flex; flex-direction: column; min-width: 0; }
.sr-list li .tx small { color: var(--muted); }
.sr-flash { animation: srflash 1.6s ease-out 1; border-radius: 8px; }
@keyframes srflash { 0% { background: rgba(212,166,58,.55); } 100% { background: transparent; } }

/* ---------------------------------------------------------------- 1.0.4: super - module chips + switches */
.mods { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mchip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--chip); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; }
.mchip.att { background: var(--green-bg); color: var(--green); border-color: transparent; }
.mchip.off { opacity: .45; text-decoration: line-through; }
.modgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 8px 0; }
.modsw { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); cursor: pointer; }
.modsw input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex: 0 0 20px; }
.modsw b { display: block; font-size: 14px; } .modsw small { color: var(--muted); display: block; line-height: 1.35; }
.modsw.lock { opacity: .75; cursor: default; }
.actbox { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.actbox .field { margin: 0; flex: 1 1 150px; }
.sfilter { flex: 1 1 220px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--ink); }

/* ---------------------------------------------------------------- 1.0.4: GLASS dashboard (frosted cards over a soft gradient) */
.gdash { --g-card: rgba(255,255,255,.62); --g-line: rgba(255,255,255,.75); --g-ink: #0B1B44; --g-mut: #55658A; --g-shadow: 0 10px 30px rgba(6,39,111,.12);
  --g-bg: radial-gradient(900px 420px at 0% 0%, rgba(26,91,230,.20), transparent 60%), radial-gradient(800px 420px at 100% 0%, rgba(212,166,58,.20), transparent 60%), radial-gradient(900px 500px at 50% 100%, rgba(37,196,99,.14), transparent 60%), linear-gradient(160deg, #EEF3FF, #F6F1E6);
  position: relative; margin: -4px -4px 0; padding: 14px; border-radius: 20px; background: var(--g-bg); color: var(--g-ink); }
:root[data-theme="dark"] .gdash { --g-card: rgba(18,30,64,.58); --g-line: rgba(255,255,255,.10); --g-ink: #E7ECF7; --g-mut: #9AA8C7; --g-shadow: 0 10px 30px rgba(0,0,0,.35);
  --g-bg: radial-gradient(900px 420px at 0% 0%, rgba(26,91,230,.35), transparent 60%), radial-gradient(800px 420px at 100% 0%, rgba(212,166,58,.18), transparent 60%), radial-gradient(900px 500px at 50% 100%, rgba(37,196,99,.14), transparent 60%), linear-gradient(160deg, #070F24, #0B1838); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gdash { --g-card: rgba(18,30,64,.58); --g-line: rgba(255,255,255,.10); --g-ink: #E7ECF7; --g-mut: #9AA8C7; --g-shadow: 0 10px 30px rgba(0,0,0,.35);
  --g-bg: radial-gradient(900px 420px at 0% 0%, rgba(26,91,230,.35), transparent 60%), radial-gradient(800px 420px at 100% 0%, rgba(212,166,58,.18), transparent 60%), radial-gradient(900px 500px at 50% 100%, rgba(37,196,99,.14), transparent 60%), linear-gradient(160deg, #070F24, #0B1838); } }
.gdash .gc { background: var(--g-card); border: 1px solid var(--g-line); border-radius: 18px; box-shadow: var(--g-shadow); -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px); padding: 14px; min-width: 0; }
.gdash h3 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.gdash h3 small { color: var(--g-mut); font-weight: 600; font-size: 12px; }
.gdash .muted, .gdash small { color: var(--g-mut); }
.ghead { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ghead h2 { margin: 0; font-size: 20px; } .ghead h2 small { display: block; font-size: 12.5px; color: var(--g-mut); font-weight: 600; }
.gseg { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--g-card); border: 1px solid var(--g-line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); gap: 2px; flex-wrap: wrap; }
.gseg button { border: 0; background: transparent; color: var(--g-ink); padding: 7px 12px; border-radius: 99px; font-weight: 700; font-size: 13px; cursor: pointer; }
.gseg button.on { background: linear-gradient(180deg, #1A5BE6, #0B3A9C); color: #fff; box-shadow: 0 4px 12px rgba(26,91,230,.35); }
.gtools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gk { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin-bottom: 12px; }
.gkpi { position: relative; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.gkpi .l { font-size: 12.5px; color: var(--g-mut); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.gkpi .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 15px; flex: 0 0 30px; }
.gkpi .v { font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gkpi .d { font-size: 12px; font-weight: 700; } .gkpi .d.up { color: #13924A; } .gkpi .d.down { color: #C62828; } .gkpi .d.flat { color: var(--g-mut); }
.gkpi .d.up.bad { color: #C62828; } .gkpi .d.down.good { color: #13924A; }
.gkpi svg.sp { width: 100%; height: 30px; display: block; margin-top: 2px; }
.i-blue { background: linear-gradient(135deg, #4F86FF, #1A5BE6); } .i-green { background: linear-gradient(135deg, #36D07A, #13924A); } .i-red { background: linear-gradient(135deg, #FF7A7A, #C62828); }
.i-gold { background: linear-gradient(135deg, #F0C766, #C8962A); } .i-violet { background: linear-gradient(135deg, #A78BFA, #6D28D9); } .i-teal { background: linear-gradient(135deg, #2DD4BF, #0F766E); } .i-navy { background: linear-gradient(135deg, #3B5BA9, #06276F); }
.gkpi.round, .gkpi.gauge { align-items: center; text-align: center; }
.gkpi.round .l, .gkpi.gauge .l { justify-content: center; }
.gring { position: relative; width: 112px; height: 112px; margin: 2px auto; }
.gring svg { width: 112px; height: 112px; transform: rotate(-90deg); }
[dir="rtl"] .gring svg { transform: rotate(-90deg) scaleY(-1); }
.gring .c { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ggauge { width: 140px; height: 110px; margin: 0 auto; position: relative; }
.ggauge svg { width: 140px; height: 82px; display: block; }
[dir="rtl"] .ggauge svg { transform: scaleX(-1); }
.ggauge .c { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gkpi.bars { gap: 6px; }
.gbar { height: 10px; border-radius: 99px; background: rgba(127,140,170,.18); overflow: hidden; }
.gbar i { display: block; height: 100%; border-radius: 99px; width: 0; transition: width .5s ease; }
.ggrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; }
.ggrid > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (max-width: 960px) { .ggrid { grid-template-columns: 1fr; } }
.gchart svg { width: 100%; height: 170px; display: block; }
.gchart .lg { display: flex; gap: 14px; font-size: 12px; color: var(--g-mut); margin-top: 6px; }
.gchart .lg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.gdonut { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.gdonut svg { width: 150px; height: 150px; flex: 0 0 150px; transform: rotate(-90deg); }
.gdonut ul { list-style: none; margin: 0; padding: 0; flex: 1 1 140px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.gdonut li { display: flex; gap: 8px; align-items: center; } .gdonut li i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; } .gdonut li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gdonut li b { font-variant-numeric: tabular-nums; }
.gtechs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gtech { display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(127,140,170,.10); min-width: 0; }
.gtech .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; flex: 0 0 34px; position: relative; }
.gtech .av::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--card); background: #9AA8C7; }
.gtech.free .av::after { background: #25C463; } .gtech.on_way .av::after { background: #F0A92E; } .gtech.working .av::after { background: #1A5BE6; }
.gtech .tn { min-width: 0; display: flex; flex-direction: column; } .gtech .tn b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gtech .tn small { font-size: 11.5px; }
.gstates { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.gstates span { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(127,140,170,.14); }
.gatt { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.gatt .kv { display: grid; grid-template-columns: auto auto; gap: 4px 14px; font-size: 13.5px; }
.glist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.glist li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(127,140,170,.10); cursor: pointer; min-width: 0; }
.glist li .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .glist li .tx b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; } .glist li .tx small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glist li .tag { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.tag.r { background: rgba(198,40,40,.14); color: #C62828; } .tag.a { background: rgba(240,169,46,.18); color: #A86A00; } .tag.b { background: rgba(26,91,230,.14); color: #1A5BE6; }
:root[data-theme="dark"] .tag.r { color: #FF8A8A; } :root[data-theme="dark"] .tag.a { color: #FFC266; } :root[data-theme="dark"] .tag.b { color: #8DB0FF; }
.gbld li .gbar { flex: 0 0 90px; }
.gquick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.gquick a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 14px; text-decoration: none; color: var(--g-ink); background: rgba(127,140,170,.10); font-weight: 700; font-size: 13px; text-align: center; }
.gquick a b { font-size: 22px; } .gquick a:hover { background: rgba(26,91,230,.14); }
.gempty { color: var(--g-mut); font-size: 13px; padding: 6px 2px; }
@media (max-width: 600px) { .gdash { margin: -6px -10px 0; padding: 12px 10px; border-radius: 16px; } .gk { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .gkpi .v { font-size: 24px; } .gring, .gring svg { width: 92px; height: 92px; } .ggauge { width: 120px; height: 96px; } .ggauge svg { width: 120px; height: 70px; } .gseg button { padding: 6px 10px; font-size: 12.5px; } }
@media print { .gdash { background: none; } .gdash .gc { box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-color: #ccc; } }

/* ---------------------------------------------------------------- 1.0.4: MOBILE (360-430 px): tables become cards, big tap targets, no sideways page scroll, full-screen dialogs */
.top .brand b { display: block; overflow: hidden; text-overflow: ellipsis; }
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 600px) {
  .top { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .top .tbtn { min-width: 40px; height: 40px; padding: 0 8px; }
  table.t.mcard, table.t.mcard tbody, table.t.mcard tr, table.t.mcard td { display: block; width: 100%; }
  table.t.mcard tr.mhead { display: none; }
  table.t.mcard tr { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin: 0 0 10px; padding: 8px 12px; box-shadow: var(--shadow); }
  table.t.mcard td { border: 0 !important; padding: 5px 0 !important; text-align: start !important; white-space: normal !important; display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; min-height: 0; }
  table.t.mcard td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; flex: 0 0 38%; max-width: 38%; }
  table.t.mcard td.nolab, table.t.mcard td:not([data-label]) { display: block; }
  table.t.mcard td > * { max-width: 100%; }
  table.t.mcard td .btn, table.t.mcard td button { min-height: 44px; margin: 3px 4px 3px 0; }
  .card.tbl-wrap { background: transparent; border: 0; box-shadow: none; padding: 0; overflow: visible; }
  .btn, button.btn, .row .btn { min-height: 44px; }
  .btn.sm { min-height: 40px; }
  .form2 { grid-template-columns: 1fr !important; }
  .modal .box { width: 100vw; max-width: 100vw; min-height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
  .modal { padding: 0 !important; align-items: stretch !important; }
  .gseg { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; max-width: 100%; }
  .gseg button { flex: 0 0 auto; min-height: 40px; }
  .gtools { width: 100%; }
  .modgrid { grid-template-columns: 1fr; }
  .modsw { min-height: 56px; }
  .actbox .field { flex: 1 1 100%; }
  .sr-list li { min-height: 48px; }
  .mods { max-width: 100%; }
}
@media (max-width: 380px) { .top #refreshBtn { display: none; } }

/* ---------------------------------------------------------------- 1.0.4: EMERGENCY button */
.btn.sosbtn { background: linear-gradient(180deg, #FF4D4D, #C62828); color: #fff; font-weight: 800; font-size: 17px; min-height: 52px; border: 0; letter-spacing: .04em; box-shadow: 0 6px 18px rgba(198,40,40,.35); }
.sosbox { border: 2px solid #E53935; border-radius: 14px; padding: 12px; margin: 10px 0; background: var(--red-bg); }
.sosgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.sosgrid .btn { min-height: 52px; font-weight: 700; }
.alertflash.emergency { background: #C62828 !important; color: #fff !important; }
/* ---------------------------------------------------------------- 1.0.4: NEXA */
.nxfab { position: fixed; inset-inline-end: 16px; bottom: 20px; z-index: 40; display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 99px; border: 1px solid rgba(212,166,58,.7); background: linear-gradient(135deg, #06276F, #1A5BE6); color: #fff; font-weight: 800; box-shadow: 0 10px 26px rgba(6,39,111,.35); cursor: pointer; min-height: 48px; }
.nxfab span { color: #F0C766; font-size: 18px; }
@media (max-width: 899px) { .nxfab { bottom: calc(76px + env(safe-area-inset-bottom)); padding: 10px 14px; } }
@media print { .nxfab { display: none; } }
.modal .box.nexa { max-width: 720px; display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }
.nxhead { display: flex; gap: 10px; align-items: center; padding-top: 12px; padding-inline-end: 40px; }
.nxhead > div { flex: 1; min-width: 0; }
.nxorb { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, #F7D98A, #C8962A); color: #06276F; font-weight: 900; }
.nxorb.big { width: 40px; height: 40px; flex-basis: 40px; font-size: 20px; }
.nxlog { min-height: 240px; max-height: min(58vh, 560px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 2px; }
.nxm { display: flex; gap: 8px; align-items: flex-start; }
.nxm.me { justify-content: flex-end; }
.nxb { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; max-width: 92%; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.nxm.me .nxb { background: linear-gradient(135deg, #1A5BE6, #0B3A9C); color: #fff; border: 0; }
.nxt { overflow-x: auto; margin-top: 6px; white-space: normal; }
.nxt table.t { font-size: 12.5px; }
.nxchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; white-space: normal; }
.nxchip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; padding: 7px 12px; font-size: 13px; cursor: pointer; text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.nxchip:hover { border-color: var(--blue); }
.nxplan { margin-top: 8px; border: 1px solid var(--gold); border-radius: 12px; padding: 8px 10px; background: var(--card); white-space: normal; }
.nxopt { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 0; border-top: 1px dashed var(--line); }
.nxopt .tx { display: flex; flex-direction: column; min-width: 0; }
.nxform { display: flex; gap: 8px; align-items: center; }
.nxin { position: relative; flex: 1; min-width: 0; }
.nxin input { width: 100%; padding: 12px 40px 12px 12px; padding-inline-end: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); color: var(--ink); font-size: 16px; }
.nxx { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.nxib { min-width: 44px; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 18px; }
.nxib.on { background: #C62828; color: #fff; border-color: transparent; animation: nxpulse 1.2s infinite; }
@keyframes nxpulse { 50% { box-shadow: 0 0 0 6px rgba(198,40,40,.25); } }
@media (max-width: 600px) { .nxlog { max-height: none; flex: 1; } .modal .box.nexa { min-height: 100dvh; } }
/* ---------------------------------------------------------------- 1.0.4: company logo (rounded) */
.co-logo-login { display: block; max-width: 220px; max-height: 140px; margin: 4px auto 6px; border-radius: 18px; object-fit: contain; background: #fff; padding: 6px; box-shadow: var(--shadow); }
.top .brand img.co-logo-top, img.co-logo-top { object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.co-logo-print { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; margin-inline-end: 10px; }
.logo-prev { width: 120px; height: 120px; border-radius: 22px; border: 1px dashed var(--line); display: grid; place-items: center; overflow: hidden; background: #fff; text-align: center; flex: 0 0 120px; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.col { display: flex; flex-direction: column; gap: 8px; flex: 1 1 200px; min-width: 0; }
/* ---------------------------------------------------------------- 1.0.4: WHO PAYS */
.chip.pay-company { background: #E6EEFF; color: #1A47B8; } .chip.pay-owner { background: #FFF2D9; color: #8A5A00; } .chip.pay-tenant { background: #F3E8FF; color: #6B21A8; }
:root[data-theme="dark"] .chip.pay-company { background: #1B2A57; color: #9DB8FF; } :root[data-theme="dark"] .chip.pay-owner { background: #3A2A10; color: #FFC266; } :root[data-theme="dark"] .chip.pay-tenant { background: #2E1A47; color: #D3B4FF; }
.chip.ap-waiting, .chip.ap-tenant_wait { background: var(--amber-bg); color: var(--amber); font-weight: 800; } .chip.ap-tenant_rejected { background: var(--red-bg); color: var(--red); font-weight: 800; }
.paybox.warn { border: 2px solid var(--gold); }
.paysel { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 8px 0; }
.paypick { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); cursor: pointer; min-height: 52px; }
.paypick input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 2px; accent-color: var(--blue); }
.paypick span { display: flex; flex-direction: column; font-weight: 700; } .paypick small { font-weight: 500; color: var(--muted); }
.payers { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 10px; }
@media (max-width: 600px) { .paysel { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  table.t.mcard td > .mc-v { flex: 1 1 auto; min-width: 0; text-align: end; overflow-wrap: anywhere; }
  table.t.mcard td > .mc-v .trialbox, table.t.mcard td > .mc-v .mods { justify-content: flex-end; flex-wrap: wrap; }
  .trialbox { flex-wrap: wrap; } .trialbox input[type=date] { max-width: 100%; min-width: 0; }
  .nxfab { padding: 0; width: 54px; height: 54px; justify-content: center; border-radius: 50%; } .nxfab b { display: none; } .nxfab span { font-size: 24px; }
}
.nxt th, .nxt td { white-space: nowrap; }
/* ---------------------------------------------------------------- 1.0.4: JOB CARD (screen) */
.tickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; margin: 6px 0 10px; }
.tickgrid.items { max-height: 420px; overflow-y: auto; padding: 2px; }
.tick { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); cursor: pointer; min-height: 44px; }
.tick input { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--blue); margin: 0; }
.tick span { display: flex; flex-direction: column; font-size: 13.5px; font-weight: 600; min-width: 0; } .tick small { font-weight: 500; color: var(--muted); } .tick em { font-style: normal; font-size: 12px; color: var(--green); }
.tick.on { border-color: var(--blue); background: var(--chip); }
.check.big input { width: 22px; height: 22px; }
.jc h4 { margin: 14px 0 4px; } details.jc-more { margin: 6px 0; } details.jc-more summary { cursor: pointer; font-weight: 700; padding: 8px 0; min-height: 40px; }
.jcmat input { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--ink); min-height: 40px; }
.jcmat td:first-child { width: 40px; } .jcmat td:nth-child(3) { width: 90px; } .jcmat td:last-child { width: 50px; }
.sigs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.sigcell { border: 1px dashed var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.sigimg { max-width: 100%; height: 70px; object-fit: contain; background: #fff; border-radius: 8px; }
@media (max-width: 600px) { .tickgrid { grid-template-columns: 1fr 1fr; } .tickgrid.items { grid-template-columns: 1fr; max-height: 60vh; } .tick { min-height: 48px; } }
/* A4 job card (print + screen preview) */
.jobcard { background: #fff; color: #111; max-width: 794px; margin: 8px auto; padding: 18px 20px; border: 1px solid #ccc; border-radius: 6px; font-size: 11.5px; line-height: 1.35; }
.jc-head { display: flex; gap: 12px; align-items: center; border-bottom: 2px solid #06276F; padding-bottom: 8px; }
.jc-head img { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; }
.jc-head > div { flex: 1; display: flex; flex-direction: column; } .jc-co { font-size: 18px; color: #06276F; } .jc-coar { font-size: 14px; } .jc-head small { color: #444; }
.jc-no { text-align: end; flex: 0 0 auto !important; } .jc-no b { font-size: 16px; }
.jc-t { text-align: center; font-size: 15px; margin: 8px 0; letter-spacing: .04em; } .jc-t span { display: block; font-size: 13px; }
.jc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; border: 1px solid #999; padding: 6px 8px; }
.jc-s { font-size: 12px; background: #06276F; color: #fff; padding: 3px 8px; margin: 8px 0 4px; border-radius: 3px; }
.jc-ticks { display: grid; gap: 2px 10px; } .jc-ticks.cols4 { grid-template-columns: repeat(4, 1fr); } .jc-ticks.cols2 { grid-template-columns: 1fr 1fr; } .jc-ticks.small { font-size: 10.5px; }
.jc-ticks small { color: #555; }
.cb { display: inline-grid; place-items: center; width: 12px; height: 12px; border: 1.2px solid #222; font-size: 10px; line-height: 1; vertical-align: -2px; margin-inline-end: 3px; } .cb.on { background: #E8F0FF; font-weight: 900; }
.jc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.jc-tbl { width: 100%; border-collapse: collapse; } .jc-tbl th, .jc-tbl td { border: 1px solid #999; padding: 3px 5px; height: 18px; text-align: start; } .jc-tbl td:first-child { width: 28px; text-align: center; } .jc-tbl td:last-child { width: 60px; }
.jc-p { margin: 4px 0; min-height: 16px; }
.jc-sigs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 12px; text-align: center; }
.jc-sigbox { height: 64px; border-bottom: 1.2px solid #222; display: grid; place-items: center; } .jc-sigbox img { max-height: 60px; max-width: 100%; }
.jc-sigs small { display: block; color: #444; } .jc-foot { text-align: center; color: #777; font-size: 9.5px; margin-top: 10px; }
@media (max-width: 700px) { .jobcard { padding: 10px; font-size: 10.5px; } .jc-ticks.cols4 { grid-template-columns: 1fr 1fr; } .jc-two, .jc-grid { grid-template-columns: 1fr; } }
@media print { @page { size: A4; margin: 8mm; } .jobcard { border: 0; margin: 0; padding: 0; max-width: none; } .jc-ticks.cols4 { grid-template-columns: repeat(4, 1fr) !important; } .jc-two { grid-template-columns: 1fr 1fr !important; } .jc-grid { grid-template-columns: 1fr 1fr !important; } .jc-s { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.tickgrid.ct { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; } @media (max-width: 600px) { .tickgrid.ct { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tickgrid.ct .tick { padding: 8px 6px; } }
.field > .tickgrid.ct span { display: flex; font-size: 13.5px; color: var(--ink); margin: 0; }

/* ================= 1.0.5: + New job on the top bar, supplier portal, purchase orders, accounts (A4 EN + AR documents), operation jobs, report center, dashboard extra */
.top .tbtn.tnew { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; background: var(--gold); color: #0B1B44; border-radius: 99px; padding: 6px 12px; font-weight: 700; white-space: nowrap; }
.tbtn.tnew b { font-size: 16px; line-height: 1; }
@media (max-width: 600px) { .tbtn.tnew span { display: none; } .tbtn.tnew { padding: 6px 10px; } }
.chip.op5 { background: #FFF1D6; color: #8A5A00; border: 1px solid #F0C36A; }
:root[data-theme="dark"] .chip.op5 { background: #3A2A10; color: #FFCF7A; border-color: #6B4A12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.op5 { background: #3A2A10; color: #FFCF7A; border-color: #6B4A12; } }
.sup5-badge { margin: 6px auto 0 !important; display: block; width: fit-content; background: var(--amber-bg); color: var(--amber); border-radius: 99px; padding: 4px 12px; font-weight: 700; }
.sup5-head .page { margin-bottom: 0; }
.jk5 button { font-weight: 700; } .mt5 { margin-top: 8px; }
/* A4 documents (PO, invoice, receipt, statement, report): English + Arabic labels together */
.doc5 { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; max-width: 900px; margin: 10px auto; }
.doc5-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 2px solid var(--gold); padding-bottom: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.doc5-co { display: flex; gap: 12px; align-items: flex-start; min-width: 0; } .doc5-co > div { display: flex; flex-direction: column; min-width: 0; } .doc5-co small { color: var(--muted); }
.doc5-co .co-logo-print { width: 64px; height: 64px; object-fit: contain; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.doc5-title { text-align: end; } .doc5-title h2 { margin: 0; font-size: 18px; letter-spacing: .06em; color: var(--navy); } .doc5-title h2.ar5 { font-size: 17px; letter-spacing: 0; }
:root[data-theme="dark"] .doc5-title h2 { color: var(--ink); } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .doc5-title h2 { color: var(--ink); } }
.doc5-no { margin: 6px 0 0; }
.ar5 { font-family: Tajawal, "Segoe UI", Tahoma, Arial, sans-serif; direction: rtl; unicode-bidi: isolate; }
span.ar5 { color: var(--muted); font-size: .92em; }
.doc5-meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0 12px; } .doc5-meta > span { color: var(--muted); font-size: 13px; }
.doc5-t td, .doc5-t th { vertical-align: top; }
.doc5-tot { margin: 10px 0 6px auto; max-width: 340px; display: grid; gap: 4px; } .doc5-tot > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.doc5-tot .grand { border-bottom: 2px solid var(--ink); font-size: 16px; } .doc5-tot .grand b { font-size: 17px; }
.doc5-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; } .doc5-sign > div { border-top: 1px solid var(--line); padding-top: 6px; min-height: 56px; font-size: 13px; }
.big5 { font-size: 20px; } .small5 { max-width: 700px; }
.tot5 td { border-top: 2px solid var(--ink); background: var(--soft); }
input.pr5, .rq5 { width: 110px; text-align: end; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.po5-row, .inv5-row { display: grid; gap: 6px; align-items: center; margin-bottom: 6px; }
.po5-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) 70px 80px auto; } .po5-row .hidden + .hidden + .pq5 { grid-column: 2 / 5; }
.po5-row select, .po5-row input, .inv5-row input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); min-width: 0; width: 100%; }
.po5-head, .inv5-head { display: none; }
.inv5-row { grid-template-columns: minmax(0, 3fr) 80px 110px 100px auto; } .ia5 { text-align: end; font-weight: 600; }
@media (max-width: 640px) {
  .po5-row { grid-template-columns: 1fr 80px auto; } .po5-row .pn5, .po5-row .pu5 { grid-column: 1 / -1; } .po5-row .hidden + .hidden + .pq5 { grid-column: auto; }
  .inv5-row { grid-template-columns: 1fr 1fr auto; border-bottom: 1px dashed var(--line); padding-bottom: 6px; } .inv5-row .in5 { grid-column: 1 / -1; } .inv5-row .ia5 { grid-column: 1 / 3; }
  .doc5 { padding: 12px; } .doc5-title { text-align: start; } .doc5-meta { grid-template-columns: 1fr; gap: 2px; } .doc5-meta > span { margin-top: 6px; } .doc5-tot { max-width: none; }
}
.chq5-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; } .chq5-steps span { border: 1px dashed var(--line); border-radius: 99px; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.chq5-steps span.on { border-style: solid; border-color: var(--green); color: var(--green); background: var(--green-bg); font-weight: 700; }
.card.soft5 { background: var(--soft); box-shadow: none; } .op5card { border-left: 4px solid var(--gold); } [dir="rtl"] .op5card { border-left: 1px solid var(--line); border-right: 4px solid var(--gold); }
.job5 { margin: 10px 0; }
/* report center */
.rc5grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.rc5item { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--soft); }
.rc5item:hover { border-color: var(--blue); } .rc5item small { color: var(--muted); }
.rc5bar .tabs { margin: 0; } .rc5f { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 6px; margin-bottom: 6px; }
.rc5f select, .rc5f input { padding: 8px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); min-width: 0; }
@media (max-width: 640px) { .rc5f { grid-template-columns: 1fr 1fr; } .rc5f .fv5 { grid-column: 1 / 2; } }
/* glass dashboard extra (period cards) */
.g105 { margin: 4px 0 14px; } .g105h { margin: 10px 2px 8px; font-size: 15px; } .g105h small { color: var(--muted); font-weight: 400; margin-inline-start: 6px; }
.g105l { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 12px; }
.gkpi .d.good { color: var(--green); } .gkpi .d.bad { color: var(--red); }
@media print {
  .doc5 { border: 0; box-shadow: none; max-width: none; margin: 0; padding: 0; } .doc5-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rc5bar, .rc5b { display: none !important; } .rc5doc .print-only { display: block; } .rc5t table.t { font-size: 10.5px; } span.ar5 { color: #444; }
  @page { size: A4; margin: 10mm; }
}
.sep5 { opacity: .5; }
th .bi5, th .bi5a { white-space: nowrap; }
