/* SHABAB LEADS 1.0 — gold + navy (same look as SHABAB NEXUS 1.6 PRO). Phone first. No inline styles (strict CSP). */
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url(/fonts/montserrat-400-latin.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url(/fonts/montserrat-600-latin.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url(/fonts/montserrat-700-latin.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 700; font-display: swap; src: url(/fonts/cormorant-700-latin.woff2) format("woff2"); }
:root {
  --navy: #0B263A; --navy2: #081D2E; --navy3: #0D2C43; --gold: #D9AE4E; --gold2: #E2BA5E; --cream: #F4F1EA;
  --bg: #F1EFEA; --card: #FFFFFF; --ink: #0B263A; --muted: #5F6E7C; --line: #DCD6C9; --soft: #F7F5F0; --chip: #EFE7D3;
  --link: #123B5A; --red: #C0392B; --redbg: #FBEAE8; --green: #1E8449; --greenbg: #E6F4EA; --amber: #B7791F; --amberbg: #FDF3E1;
  --shadow: 0 1px 2px rgba(11,38,58,.06), 0 6px 18px rgba(11,38,58,.08);
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; --serif: "Cormorant Garamond", Georgia, serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #06121D; --card: #0D2C43; --ink: #F4F1EA; --muted: #B9C5D0; --line: #1E3E57; --soft: #0F3049; --chip: #184460; --link: #E2BA5E;
    --redbg: #3B1A1A; --greenbg: #12301F; --amberbg: #3A2C10; --red: #FF8A7A; --green: #6BD49A; --amber: #F2C46B; --shadow: 0 1px 2px rgba(0,0,0,.45), 0 6px 18px rgba(0,0,0,.35); }
}
:root[data-theme="dark"] { --bg: #06121D; --card: #0D2C43; --ink: #F4F1EA; --muted: #B9C5D0; --line: #1E3E57; --soft: #0F3049; --chip: #184460; --link: #E2BA5E;
  --redbg: #3B1A1A; --greenbg: #12301F; --amberbg: #3A2C10; --red: #FF8A7A; --green: #6BD49A; --amber: #F2C46B; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14.5px/1.45 var(--font); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
[dir="rtl"] body, body[dir="rtl"] { font-family: "Segoe UI", Tahoma, "Noto Kufi Arabic", system-ui, sans-serif; }
a { color: var(--link); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .red { color: var(--red); } .green { color: var(--green); } .num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; } .nowrap { white-space: nowrap; }

/* ---- login */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: radial-gradient(900px 520px at 85% -10%, rgba(217,174,78,.28) 0%, transparent 60%), linear-gradient(160deg, #0D2C43 0%, #0B263A 45%, #06121D 100%); }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 18px; padding: 26px 22px 22px; border-top: 3px solid var(--gold); box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(217,174,78,.25); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.auth-brand img { width: 52px; height: 52px; border-radius: 14px; }
.auth-brand b { display: block; letter-spacing: .2em; font-size: 15px; }
.auth-brand small { color: var(--gold); letter-spacing: .24em; font-weight: 700; font-size: 10.5px; }
.auth h1 { font-family: var(--serif); font-size: 22px; margin: 0 0 6px; }
.auth label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 13px; }
.auth .err { margin-top: 12px; }
.sso { padding: 40px 20px; text-align: center; }

/* ---- shell */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 14px 10px;
  background: linear-gradient(90deg, #081D2E 0%, #0D2C43 55%, #0B263A 100%); border-bottom: 1px solid var(--gold); color: var(--cream); }
.top .brand { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; color: var(--cream); }
.top .brand img { width: 32px; height: 32px; border-radius: 9px; }
.top .brand b { display: block; font-size: 12.5px; letter-spacing: .18em; white-space: nowrap; }
.top .brand small { display: block; color: var(--gold); font-size: 10px; letter-spacing: .2em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 11px; border: 1px solid rgba(217,174,78,.45); background: rgba(217,174,78,.08); color: var(--cream); cursor: pointer; font-weight: 600; font-size: 12.5px; }
.tbtn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #E74C3C; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--navy2); }
[dir="rtl"] .dot { right: auto; left: -4px; }
main { max-width: 980px; margin: 0 auto; padding: 14px 14px calc(96px + var(--safe-b)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; background: rgba(8,29,46,.97); border-top: 1px solid rgba(217,174,78,.6); padding: 6px 4px calc(6px + var(--safe-b)); backdrop-filter: blur(8px); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #B9C5D0; font-size: 10.5px; font-weight: 600; padding: 4px 2px; border-radius: 10px; position: relative; min-height: 48px; justify-content: center; }
.tabbar a svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--gold2); }
.tabbar a .dot { top: 0; right: calc(50% - 22px); border-color: #081D2E; }
@media (min-width: 900px) { main { padding-bottom: 100px; } }

/* ---- page parts */
h2 { font-family: var(--serif); font-size: 24px; margin: 4px 0 12px; letter-spacing: .01em; }
h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; font-weight: 700; }
[dir="rtl"] h3 { letter-spacing: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.card.gold { border-top: 3px solid var(--gold); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.between { justify-content: space-between; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); display: block; color: inherit; }
.kpi b { display: block; font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; font-weight: 600; }
.kpi.red { border-color: rgba(192,57,43,.45); background: var(--redbg); } .kpi.red b { color: var(--red); }
.kpi.gold { border-top: 3px solid var(--gold); } .kpi.green b { color: var(--green); } .kpi.amber { background: var(--amberbg); } .kpi.amber b { color: var(--amber); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--navy); background: var(--navy); color: var(--cream); font-weight: 700; cursor: pointer; font-size: 14px; text-align: center; }
.btn.gold { background: linear-gradient(180deg, var(--gold2), #C8962A); border-color: #C8962A; color: #2A1C00; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.sm { min-height: 36px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bigbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.bigbtns .btn { min-height: 54px; flex-direction: column; gap: 2px; font-size: 12.5px; }
.bigbtns .btn svg { width: 22px; height: 22px; }
.field { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); font-size: 16px; }
textarea.field { min-height: 84px; resize: vertical; }
select.field { appearance: auto; }
.field:focus { outline: 2px solid var(--gold); outline-offset: 1px; background: var(--card); }
label.l { display: block; font-size: 12.5px; font-weight: 700; margin: 10px 0 4px; color: var(--muted); }
.form2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 640px) { .form2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-weight: 600; min-height: 32px; }
.check input { width: 20px; height: 20px; accent-color: var(--gold); }
.err { background: var(--redbg); color: var(--red); border-radius: 10px; padding: 9px 12px; font-weight: 600; font-size: 13.5px; }
.ok { background: var(--greenbg); color: var(--green); border-radius: 10px; padding: 9px 12px; font-weight: 600; font-size: 13.5px; }
.warn { background: var(--amberbg); color: var(--amber); border-radius: 10px; padding: 9px 12px; font-weight: 600; font-size: 13.5px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 999px; background: var(--chip); color: var(--ink); font-size: 12.5px; font-weight: 700; border: 1px solid transparent; cursor: pointer; min-height: 34px; }
.chip.on { background: var(--navy); color: var(--gold2); border-color: var(--gold); }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--chip); white-space: nowrap; }
.badge.red { background: var(--red); color: #fff; } .badge.green { background: var(--greenbg); color: var(--green); } .badge.amber { background: var(--amberbg); color: var(--amber); } .badge.navy { background: var(--navy); color: var(--gold2); }
.st-new { background: #E8F0FB; color: #1A4E8A; } .st-contacted { background: #EAF4F4; color: #19676A; } .st-demo { background: #F3ECFB; color: #6A3FA0; } .st-trial { background: var(--amberbg); color: var(--amber); }
.st-quote { background: #FFF1E6; color: #A65A12; } .st-won { background: var(--greenbg); color: var(--green); } .st-lost { background: #EEE; color: #666; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list > li.click { cursor: pointer; }
.list > li.late { background: linear-gradient(90deg, var(--redbg), transparent 70%); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
[dir="rtl"] .list > li.late { background: linear-gradient(270deg, var(--redbg), transparent 70%); }
.list .t { font-weight: 700; } .list .s { font-size: 12.5px; color: var(--muted); }
.ibtn { display: inline-flex; width: 42px; height: 42px; border-radius: 12px; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--soft); color: var(--ink); flex: none; }
.ibtn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ibtn.wa { background: #E7F7EE; color: #128C4A; border-color: #BFE6CF; } .ibtn.call { background: #E8F0FB; color: #1A4E8A; border-color: #C9DAF2; }
.empty { text-align: center; color: var(--muted); padding: 22px 8px; font-weight: 600; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv > span:nth-child(odd) { color: var(--muted); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; }
[dir="rtl"] .timeline li { padding: 0 22px 14px 0; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.timeline li::after { content: ""; position: absolute; left: 10px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
[dir="rtl"] .timeline li::before { left: auto; right: 6px; } [dir="rtl"] .timeline li::after { left: auto; right: 10px; }
.timeline .when { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.timeline .txt { white-space: pre-wrap; word-break: break-word; }
.bar { height: 8px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #C8962A); }
.w0{width:0}.w5{width:5%}.w10{width:10%}.w20{width:20%}.w30{width:30%}.w40{width:40%}.w50{width:50%}.w60{width:60%}.w70{width:70%}.w80{width:80%}.w90{width:90%}.w100{width:100%}
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { text-align: start; padding: 9px 6px; border-bottom: 1px solid var(--line); }
.table th { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.scroll-x { overflow-x: auto; }
.fab { position: fixed; right: 18px; bottom: calc(84px + var(--safe-b)); z-index: 19; width: 58px; height: 58px; border-radius: 50%; border: 0; background: linear-gradient(180deg, var(--gold2), #C8962A); color: #2A1C00; box-shadow: 0 8px 22px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; cursor: pointer; }
[dir="rtl"] .fab { right: auto; left: 18px; }
.fab svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.note { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; box-shadow: var(--shadow); min-height: 90px; }
.note.gold { border-top: 4px solid var(--gold); } .note.blue { border-top: 4px solid #2E6FB7; } .note.green { border-top: 4px solid var(--green); } .note.red { border-top: 4px solid var(--red); }
.note .b { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; max-height: 120px; overflow: hidden; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 12px; }
.cal-days button { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 6px 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; min-height: 52px; }
.cal-days button small { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.cal-days button b { font-size: 16px; }
.cal-days button.on { background: var(--navy); color: var(--gold2); border-color: var(--gold); }
.cal-days button.today b { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.cal-days button i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-top: 3px; }
.cal-days button i.none { background: transparent; }
.ev { border-left: 4px solid var(--gold); }
[dir="rtl"] .ev { border-left: 0; border-right: 4px solid var(--gold); }
.ev.followup { border-color: #2E6FB7; } .ev.job { border-color: var(--gold); } .ev.meeting { border-color: #6A3FA0; } .ev.reminder { border-color: var(--green); }
.toast { position: fixed; left: 50%; top: calc(70px + var(--safe-t)); transform: translateX(-50%); z-index: 60; width: min(92vw, 440px); background: var(--navy); color: var(--cream); border: 1px solid var(--gold); border-radius: 14px; padding: 12px 14px; box-shadow: 0 16px 40px rgba(0,0,0,.4); display: flex; gap: 10px; align-items: center; cursor: pointer; }
.toast b { color: var(--gold2); display: block; }
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(3,14,24,.55); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 700px) { .modal-bg { align-items: center; } }
.modal { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--card); border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); border-top: 3px solid var(--gold); }
@media (min-width: 700px) { .modal { border-radius: 18px; } }
.modal h2 { margin-top: 0; }
.modal .acts { display: flex; gap: 8px; margin-top: 16px; }
.modal .acts .btn { flex: 1; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1 1 auto; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); font-weight: 700; font-size: 12.5px; cursor: pointer; padding: 0 10px; }
.seg button.on { background: var(--navy); color: var(--gold2); border-color: var(--gold); }
.morelist a { display: flex; align-items: center; gap: 12px; padding: 14px 6px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.morelist a svg { width: 22px; height: 22px; stroke: var(--gold); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.morelist a .badge { margin-inline-start: auto; }
.alertbanner { background: linear-gradient(90deg, #081D2E, #0D2C43); color: var(--cream); border: 1px solid var(--gold); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.alertbanner b { color: var(--gold2); }
.alertbanner .btn { margin-top: 8px; }
.steps { margin: 6px 0 0; padding-inline-start: 20px; } .steps li { margin: 4px 0; }
.code { font-family: ui-monospace, Consolas, monospace; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px; font-size: 12.5px; word-break: break-all; }
.toast svg { width: 24px; height: 24px; flex: none; stroke: var(--gold2); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alertbanner .btn svg, .kpi svg { width: 18px; height: 18px; }
h3 svg { width: 16px; height: 16px; vertical-align: -2px; stroke: var(--gold); fill: none; stroke-width: 1.8; }
