:root{--sub:#2c2621;--hdr:#14110fe6;--on:#2a2219;--page:var(--bg);--btx:#14110f;--ff:"Noto Kufi Arabic","Segoe UI",sans-serif;--fh:var(--ff);--sh:none;--bw:1px;--bg:#14110f;--card:#1e1a17;--line:#332d28;--tx:#f3ead9;--mut:#a39888;--amb:#e8a33d;--ok:#7bc47f;--bad:#ef6a5a;--r:18px}
*{box-sizing:border-box;margin:0}
body{background:var(--page);color:var(--tx);font:15px/1.6 var(--ff);padding-bottom:84px;min-height:100vh}
.top{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;position:sticky;top:0;background:var(--hdr);backdrop-filter:blur(8px);z-index:5;border-bottom:1px solid var(--line)}
.brand{display:flex;gap:10px;align-items:center}.brand b{font-size:18px;display:block;line-height:1.1}.brand small{color:var(--mut);font-size:12px}
.pill{font-size:11px;padding:3px 10px;border-radius:99px;border:1px solid var(--amb);color:var(--amb)}
button{font:inherit;cursor:pointer}
.ghost{background:none;border:1px solid var(--line);color:var(--tx);border-radius:10px;padding:4px 10px}
main{max-width:980px;margin:0 auto;padding:18px}
h2{font-size:22px;margin:4px 0 14px}h3{font-size:14px;color:var(--mut);font-weight:600;margin-bottom:8px}
.grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:14px 16px}
.kpi b{display:block;font-size:26px;font-weight:800;letter-spacing:-.5px}.kpi .d{font-size:12px}
.up{color:var(--ok)}.dn{color:var(--bad)}.mut{color:var(--mut)}
.sec{margin-top:18px}
table{width:100%;border-collapse:collapse;font-size:14px}th{color:var(--mut);font-weight:600;text-align:start;font-size:12px}td,th{padding:9px 6px;border-bottom:1px solid var(--line)}
.num{font-variant-numeric:tabular-nums;direction:ltr;text-align:end;unicode-bidi:isolate}
.bar{height:8px;border-radius:9px;background:var(--sub);overflow:hidden}.bar i{display:block;height:100%;background:var(--amb)}
.tag{font-size:11px;padding:2px 9px;border-radius:99px;background:var(--sub)}.tag.s{color:var(--ok)}.tag.p{color:var(--amb)}.tag.d{color:var(--bad)}.tag.o{color:var(--mut)}
.tabs{position:fixed;bottom:0;inset-inline:0;display:flex;justify-content:space-around;background:var(--hdr);border-top:1px solid var(--line);padding:8px 4px calc(8px + env(safe-area-inset-bottom));z-index:6}
.tabs button{background:none;border:0;color:var(--mut);font-size:11px;display:flex;flex-direction:column;align-items:center;gap:2px;padding:4px 8px;border-radius:12px}
.tabs button.on{color:var(--amb);background:var(--on)}.tabs span{font-size:19px}
.alert{border-inline-start:4px solid var(--bad);padding:10px 14px;margin-bottom:8px;background:var(--card);border-radius:12px}.alert.w{border-color:var(--amb)}.alert.g{border-color:var(--ok)}
.drop{border:2px dashed var(--line);border-radius:var(--r);padding:18px;text-align:center}
.drop input{margin-top:8px;color:var(--mut)}
.btn{background:var(--amb);color:var(--btx);border:0;border-radius:12px;padding:8px 16px;font-weight:700}
svg.chart{width:100%;height:auto;display:block}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
select{background:var(--card);color:var(--tx);border:1px solid var(--line);border-radius:10px;padding:6px 10px;font:inherit}
@media(min-width:700px){body{padding-bottom:0}.tabs{position:sticky;top:61px;bottom:auto;border:0;border-bottom:1px solid var(--line);justify-content:center;gap:10px;flex-direction:row}.tabs button{flex-direction:row;font-size:14px;gap:6px}}
.sc{overflow-x:auto}.sc td,.sc th{white-space:nowrap}.sc td:first-child{white-space:normal;min-width:120px}
.sc td,.sc th{padding:9px 4px}

h2,.kpi b,.brand b{font-family:var(--fh)}
.card{box-shadow:var(--sh);border-width:var(--bw)}
svg.chart polyline{stroke:var(--amb)}svg.chart polyline:first-child{fill:var(--fill,#e8a33d22);stroke:none}
/* A: Itqan - navy, teal, gold, glass */
body[data-th=a]{--bg:#0b192c;--page:radial-gradient(700px 380px at 90% -5%,#14b8a62e 0,transparent 60%),radial-gradient(600px 300px at 0 40%,#fbbf2412 0,transparent 60%),#0b192c;--card:#ffffff0d;--line:#ffffff1f;--tx:#f8fafc;--mut:#94a3b8;--amb:#fbbf24;--ok:#34d399;--bad:#fb7185;--sub:#ffffff14;--hdr:#0b192cd9;--on:#14b8a626;--btx:#0b192c;--r:22px;--fill:#14b8a633;--sh:0 8px 30px #00000040}
body[data-th=a] .card{backdrop-filter:blur(10px)}
body[data-th=a] .tabs button.on{color:#5eead4}
body[data-th=a] svg.chart polyline{stroke:#14b8a6}
body[data-th=a] .kpi b{background:linear-gradient(90deg,#fde68a,#fbbf24);-webkit-background-clip:text;background-clip:text;color:transparent}
body[data-th=a] .bar i{background:linear-gradient(90deg,#14b8a6,#fbbf24)}
body[data-th=a] .btn{background:linear-gradient(90deg,#fbbf24,#f59e0b)}
/* B: Warm paper / editorial - cream, ink, terracotta, hairlines, no cards */
body[data-th=b]{--bg:#f6f0e4;--page:#f6f0e4;--card:transparent;--line:#1c1a1766;--tx:#1c1a17;--mut:#6f675b;--amb:#b8452a;--ok:#2f6b3a;--bad:#b8452a;--sub:#e6dcc8;--hdr:#f6f0e4ee;--on:#e6dcc8;--btx:#f6f0e4;--r:2px;--fh:"Noto Kufi Arabic",serif;--fill:#b8452a22}
body[data-th=b] .card{border:0;border-top:2px solid #1c1a17;padding:12px 2px;border-radius:0}
body[data-th=b] .top{border-bottom:2px solid #1c1a17}
body[data-th=b] h2{font-size:30px;font-weight:300;letter-spacing:-.5px}
body[data-th=b] .kpi b{font-size:38px;font-weight:200}
body[data-th=b] .tag{background:none;border:1px solid currentColor;border-radius:2px}
body[data-th=b] .alert{background:#e6dcc8;border-radius:0}
body[data-th=b] .tabs{border-top:2px solid #1c1a17}
body[data-th=b] .tabs button{border-radius:0}
body[data-th=b] .bar{height:3px;border-radius:0}
body[data-th=b] .pill{border-radius:2px}
/* C: Bold blocks - white, thick outlines, vivid colour blocks, hard shadows */
body[data-th=c]{--bg:#fffdf5;--page:#fffdf5;--card:#fff;--line:#111;--tx:#111;--mut:#555;--amb:#ff4f81;--ok:#0a8f4d;--bad:#e11d48;--sub:#eee;--hdr:#fffdf5;--on:#c8f169;--btx:#111;--r:14px;--bw:2.5px;--sh:4px 4px 0 #111;--fill:#ff4f8133}
body[data-th=c] .top{border-bottom:3px solid #111}
body[data-th=c] .grid>.card:nth-child(1){background:#ffe14d}body[data-th=c] .grid>.card:nth-child(2){background:#9bd7ff}body[data-th=c] .grid>.card:nth-child(3){background:#c8f169}
body[data-th=c] .kpi b{font-size:30px;font-weight:900}
body[data-th=c] h2{font-weight:900}
body[data-th=c] .tag{border:2px solid #111;background:#fff;border-radius:99px;font-weight:700}
body[data-th=c] .bar{height:14px;border:2px solid #111;background:#fff;border-radius:99px}body[data-th=c] .bar i{background:#ff4f81}
body[data-th=c] .tabs{border-top:3px solid #111}
body[data-th=c] .tabs button.on{background:#c8f169;color:#111;border:2px solid #111;font-weight:800}
body[data-th=c] .alert{border:2.5px solid #111;border-inline-start-width:10px;box-shadow:3px 3px 0 #111}
body[data-th=c] .pill{border:2px solid #111;color:#111;background:#ffe14d}
body[data-th=c] .ghost{border:2px solid #111;color:#111}
body[data-th=c] svg.chart polyline{stroke:#111;stroke-width:3}
body[data-th=c] svg.chart polyline:first-child{fill:#ff4f8155}
@media(max-width:520px){.mt th:nth-child(3),.mt td:nth-child(3),.mt th:nth-child(6),.mt td:nth-child(6){display:none}}
/* D: Power BI dark - charcoal, neon teal glow */
body[data-th=d]{--bg:#0d0f12;--page:#0d0f12;--card:#161a1f;--line:#252b33;--tx:#e8eef2;--mut:#7f8b97;--amb:#22e5d0;--ok:#22e5d0;--bad:#ff6b8b;--sub:#222831;--hdr:#0d0f12ee;--on:#22e5d01f;--btx:#06201d;--r:10px;--sh:none}
body[data-th=d] main{max-width:1280px}
body[data-th=d] .card{border-radius:10px}
body[data-th=d] .kpi b,body[data-th=d] .brand b{color:#22e5d0;background:none;-webkit-text-fill-color:initial;text-shadow:0 0 14px #22e5d088}
body[data-th=d] .tabs button.on{color:#22e5d0}
body[data-th=d] .bar{height:10px;border-radius:3px;background:#222831}
body[data-th=d] .bar i{background:linear-gradient(90deg,#14b8a6,#22e5d0);box-shadow:0 0 10px #22e5d088;border-radius:3px}
body[data-th=d] .btn{background:#22e5d0}
body[data-th=d] .pill{border-color:#22e5d0;color:#22e5d0}
body[data-th=d] h3{text-transform:uppercase;letter-spacing:.5px;font-size:12px}
.pbi{display:grid;gap:12px;grid-template-columns:1fr;grid-template-areas:"kpi" "trend" "dish" "tab" "don" "sm"}
.pbi .ptrend{grid-area:trend}.pbi .pkpi{grid-area:kpi}.pbi .pdish{grid-area:dish}.pbi .ptab{grid-area:tab}.pbi .pdon{grid-area:don}.pbi .psm{grid-area:sm}
@media(min-width:900px){.pbi{grid-template-columns:1.1fr 1.3fr 1fr;grid-template-areas:"trend trend kpi" "dish tab don" "dish tab sm"}}
.pkpi{background:linear-gradient(160deg,#0f4a47,#0b2e30);border:1px solid #22e5d055!important;border-radius:22px!important;box-shadow:0 0 28px #22e5d02e;display:flex;flex-direction:column;justify-content:center;gap:6px}
.pkpi h3{color:#8ff3e8}.big{font-size:46px;line-height:1.1;color:#22e5d0;text-shadow:0 0 18px #22e5d0aa;font-weight:800}
.pk2{display:flex;gap:22px;margin-top:10px}.pk2 small{display:block;color:#8ff3e8;font-size:11px}.pk2 b{font-size:22px;color:#fff;text-shadow:0 0 10px #22e5d088}
svg.area{width:100%;height:auto;display:block}.area .gl{stroke:#252b33;stroke-width:1}.area .ax{fill:#7f8b97;font-size:9px}.area .glow{filter:drop-shadow(0 0 5px #22e5d0)}
.hb{display:grid;grid-template-columns:110px 1fr 56px;gap:8px;align-items:center;margin:9px 0;font-size:13px}
.pdon{text-align:center}.dn-svg{filter:drop-shadow(0 0 6px #22e5d044)}.dc-b{fill:#22e5d0;font-size:16px;font-weight:800;text-shadow:0 0 6px #22e5d0}.dc-s{fill:#7f8b97;font-size:7px}
.lg{display:flex;flex-wrap:wrap;gap:6px 12px;justify-content:center;font-size:12px;color:var(--mut);margin-top:6px}.lg i{display:inline-block;width:9px;height:9px;border-radius:2px;margin-inline-end:5px}
.row3{display:flex;justify-content:space-around;gap:6px}.mini{text-align:center}.mini small{display:block;color:var(--mut);font-size:11px;margin-top:-4px}
tr.tot td{font-weight:800;border-top:1px solid #22e5d055;color:#22e5d0}
input{background:var(--sub);color:var(--tx);border:1px solid var(--line);border-radius:10px;padding:10px;font:inherit}

/* v5: interactivity + animation */
#fbar{position:sticky;top:56px;z-index:4;background:var(--hdr);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);padding:8px 18px}
#fbar:empty{display:none}
.fbarw{max-width:1280px;margin:0 auto;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.modes{display:flex;gap:3px;background:var(--sub);border-radius:12px;padding:3px}
.modes button{border:0;background:none;color:var(--mut);padding:5px 13px;border-radius:9px;font-size:13px}
.modes button.on{background:var(--on);color:var(--amb);font-weight:700}
#fbar input{padding:6px 10px;font-size:13px;border-radius:10px}
#fbar select{font-size:13px}
@media(min-width:700px){#fbar{top:60px}}
tr[data-d],.hb[data-d],tr[data-ch],.lgc[data-ch]{cursor:pointer;transition:opacity .15s}
tr[data-d]:hover td,.hb[data-d]:hover span:first-child,tr[data-ch]:hover td,.lgc[data-ch]:hover{color:var(--amb)}
.hb[data-d]:hover .bar i{filter:brightness(1.25)}
@keyframes grow{from{width:0}}
.bar i{animation:grow .7s cubic-bezier(.2,.7,.3,1)}
@keyframes dashin{from{stroke-dasharray:0 264}}
.dn-svg circle.arc{animation:dashin .9s cubic-bezier(.2,.7,.3,1)}
@keyframes fadeup{from{opacity:0;transform:translateY(10px)}}
.card{animation:fadeup .45s ease both}
.pbi .card:nth-child(2){animation-delay:.05s}.pbi .card:nth-child(3){animation-delay:.1s}.pbi .card:nth-child(4){animation-delay:.15s}.pbi .card:nth-child(5){animation-delay:.2s}.pbi .card:nth-child(6){animation-delay:.25s}
.grid>.card:nth-child(2){animation-delay:.06s}.grid>.card:nth-child(3){animation-delay:.12s}.grid>.card:nth-child(4){animation-delay:.18s}.grid>.card:nth-child(5){animation-delay:.24s}.grid>.card:nth-child(6){animation-delay:.3s}
.area{animation:fadeup .6s ease both}
.alert{animation:fadeup .4s ease both}
body.still *,body.still *::before,body.still *::after{animation:none!important;transition:none!important}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
.brand img{width:42px;height:42px;border-radius:10px;background:#fff;object-fit:contain}
.branch{border:1px solid var(--line);background:var(--sub);color:var(--mut);border-radius:99px;padding:3px 10px;font-size:11px;cursor:pointer}
body.fast *,body.fast *::before,body.fast *::after{animation:none!important;transition:none!important}
