@font-face{font-family:NotoArabic;src:url("arabic-regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:NotoArabic;src:url("arabic-bold.ttf") format("truetype");font-weight:700;font-display:swap}
:root{font-family:NotoArabic,Tahoma,Arial,sans-serif;color:#241b19;background:#f8f2ed;color-scheme:light;--wine:#791f1b;--line:#e8d9d0;--muted:#776b64;--terracotta:#c87c58}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 15% 0,#f0e2d9,transparent 65%),#f8f2ed}
[hidden]{display:none!important}button,input,select{font:inherit}button,select{cursor:pointer}button{border:1px solid var(--line);border-radius:10px;padding:10px 17px;background:#fffdfb;color:var(--wine);font-size:13px}button:hover{background:#f2e4dc}button:disabled{cursor:wait;opacity:.55}
input,select{width:100%;min-height:43px;padding:8px 12px;border:1px solid #ddcfc6;border-radius:9px;background:#fffdfb;color:#241b19;font-size:13px}input:focus,select:focus{border-color:var(--wine);outline:2px solid #791f1b20;outline-offset:1px}
label{display:grid;gap:6px;font-size:12px;font-weight:700}h1,h2,h3,p{margin:0}h2{font-size:18px}a{color:var(--wine)}
:focus-visible{outline:2px solid var(--wine);outline-offset:3px}.primary{background:var(--wine);color:#fff;border-color:var(--wine)}.primary:hover{background:#5f1815}.quiet{background:transparent}.muted{color:var(--muted);font-size:12px;line-height:1.8;font-weight:400}.boot{text-align:center;padding:25vh 15px;color:var(--wine)}
main{max-width:1480px;margin:auto;padding:30px 30px 20px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.brand{display:flex;align-items:center;gap:25px}.brand>img{width:120px;height:auto}.heading{border-right:1px solid #ccb3a5;padding-right:24px}.heading h1{font-size:clamp(22px,2.2vw,31px);line-height:1.6}.heading p{font-size:14px;color:var(--muted)}.account-actions{display:flex;gap:8px}
.filters{display:flex;align-items:end;gap:13px;flex-wrap:wrap;margin-bottom:22px}.filters>label{width:185px}.date-label{margin-right:auto;font-size:12px;color:var(--muted);align-self:center;padding-top:22px}.custom-dates{display:flex;gap:10px;align-items:end}.custom-dates label{width:155px}.message{border:1px solid #d7b894;background:#fff5de;padding:13px 17px;border-radius:12px;font-size:13px;margin:0 0 20px;line-height:1.9}
.summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:20px}.stat,.card{background:#fffdfb;border:1px solid var(--line);box-shadow:0 3px 8px #48221808,0 1px 2px #48221805;border-radius:18px}.stat{padding:20px 22px}.stat h2{font-size:15px;font-weight:400}.stat strong{display:block;font:700 clamp(29px,3.4vw,48px)/1.5 NotoArabic,Tahoma,sans-serif;direction:ltr;text-align:right}.stat>span{font-size:11px;color:var(--muted);line-height:1.7}.stat-featured{background:linear-gradient(130deg,#671916,#872824);color:#fff;border-color:var(--wine)}.stat-featured>span{color:#f2d3c9}
.card{padding:22px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:16px}.section-heading p{margin-top:3px}.chart-card{margin-bottom:20px}.chart-controls{display:flex;gap:10px}.chart-controls label{width:125px}.chart-controls select{min-height:38px;padding:5px 10px}.legend{display:flex;justify-content:flex-end;gap:22px;margin:0 0 7px;font-size:12px}.legend span{display:flex;gap:7px;align-items:center}.dot{width:9px;height:9px;border-radius:50%;display:inline-block}.dot.ahmed{background:var(--wine)}.dot.waleed{background:var(--terracotta)}.chart-wrap{height:245px;position:relative;direction:ltr}.chart-wrap canvas{display:block;width:100%;height:100%}.empty{padding:40px 15px;text-align:center;font-size:13px;color:var(--muted);line-height:2}.chart-wrap>.empty{position:absolute;inset:0;margin:auto;height:fit-content}
.profiles-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:20px}.profile-head{display:flex;align-items:center;gap:18px;margin-bottom:18px}.profile-avatar{flex:none;overflow:hidden;width:96px;height:96px;border-radius:50%;border:4px solid #f3e2da;background:#740d14}.profile-avatar img{width:100%;height:100%;object-fit:cover}.profile-avatar.ahmed img{width:102%;height:106%;transform:translate(1%,-4%)}.profile-head h2{font-size:24px;line-height:1.6}.profile-head a{direction:ltr;display:block;font-size:12px;color:var(--muted);text-decoration:none}.profile-metrics{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:17px}.profile-metrics>div{padding:9px 15px;background:#f6ede6;border-radius:12px}.profile-metrics span{font-size:12px;display:block}.profile-metrics strong{font-size:31px;direction:ltr;display:block;text-align:right;line-height:1.7}.button-row{display:grid;grid-template-columns:minmax(0,1fr) 85px 95px;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line);font-size:13px}.button-row:last-child{border-bottom:0}.button-row>strong,.button-row>span:last-child{direction:ltr;text-align:left}.button-row.header-row{font-size:10px;color:var(--muted);font-weight:400}.button-row.header-row span{direction:rtl}.button-row.header-row span:not(:first-child){text-align:left}
.geography-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:20px}.geo-row{margin:0 0 13px}.geo-numbers{display:flex;justify-content:space-between;font-size:13px;margin-bottom:4px}.geo-numbers b{font-size:15px;direction:ltr}.geo-numbers small{color:var(--muted);margin-right:7px;font-size:10px}.bar-track{height:5px;background:#f3e8e0;border-radius:9px;overflow:hidden}.bar-fill{height:100%;background:var(--wine);border-radius:9px}.geography-grid article:nth-child(2) .bar-fill{background:var(--terracotta)}
.table-scroll{overflow:auto;border:1px solid var(--line);border-radius:10px}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px;text-align:right}th,td{padding:11px 13px;border-bottom:1px solid var(--line)}th{background:#f6ede6;font-size:11px;color:#65493c}tbody tr:last-child td{border-bottom:0}tbody tr:nth-child(even){background:#fdf9f5}.details-card{margin-bottom:15px}.details-card>.muted{margin-top:10px}.footer{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:11px;color:var(--muted);padding:7px 0}.footnote{font-size:10px;color:var(--muted);line-height:2;max-width:1100px}.loading .summary-grid strong{opacity:.4}.loading #chart{opacity:.35}.loading #refresh-button{cursor:wait}.loading{cursor:progress}
.auth-screen{min-height:100vh;display:grid;place-items:center;padding:30px 16px}.auth-card{width:min(100%,460px);padding:30px;background:#fffdfb;border:1px solid var(--line);border-radius:22px;box-shadow:0 15px 65px #791f1b12}.auth-logo{display:block;width:130px;height:auto;margin:0 auto 25px}.auth-card h1{font-size:24px;text-align:center;line-height:1.8}.auth-card>p{text-align:center;margin:5px 0 25px}.auth-card form{display:grid;gap:17px}.auth-card input{font-size:15px}.auth-card input[type=file]{font-size:11px}.form-message{font-size:12px;color:var(--wine);line-height:1.9}.form-message:empty{display:none}
@media(max-width:950px){main{padding:22px 18px}.topbar{align-items:start}.account-actions{flex-direction:column}.summary-grid{grid-template-columns:1fr 1fr}.stat strong{font-size:38px}.brand{gap:17px}.brand>img{width:95px}.heading{padding-right:17px}.heading h1{font-size:24px}.profile-head h2{font-size:20px}.profile-avatar{width:78px;height:78px}.button-row{grid-template-columns:1fr 60px 75px}.section-heading{align-items:start}.chart-controls label{width:110px}}
@media(max-width:650px){main{padding:18px 13px}.topbar{flex-wrap:wrap;gap:13px;margin-bottom:18px}.brand{width:100%;gap:14px}.brand>img{width:83px}.heading{padding-right:14px}.heading h1{font-size:22px}.heading p{font-size:12px}.account-actions{flex-direction:row;width:100%;justify-content:flex-end}.account-actions button{padding:7px 13px;font-size:11px}.filters{gap:10px}.filters>label{flex:1;min-width:135px;width:auto}.date-label{width:100%;padding-top:0;margin-right:0}.custom-dates{width:100%;flex-wrap:wrap}.custom-dates label{flex:1;min-width:135px}.custom-dates button{width:100%}.summary-grid{gap:10px;margin-bottom:14px}.stat{padding:15px 13px;border-radius:14px}.stat h2{font-size:13px}.stat strong{font-size:33px}.stat>span{font-size:9px}.card{padding:17px;border-radius:16px}.section-heading{flex-wrap:wrap;margin-bottom:13px}.section-heading h2{font-size:17px}.chart-controls{width:100%}.chart-controls label{flex:1}.legend{justify-content:start;margin:12px 0;font-size:11px}.chart-wrap{height:210px}.profiles-grid,.geography-grid{grid-template-columns:1fr;gap:14px;margin-bottom:14px}.profile-head h2{font-size:25px}.profile-avatar{width:88px;height:88px}.button-row{grid-template-columns:minmax(0,1fr) 75px 90px}.profile-metrics strong{font-size:34px}.footer{font-size:10px}.footnote{font-size:9px}.auth-card{padding:25px 20px}}
@media(prefers-reduced-motion:no-preference){button{transition:background-color .15s}.loading .stat strong{animation:breathe 1.5s ease-in-out infinite}@keyframes breathe{50%{opacity:.7}}}

.sync-panel{margin-bottom:22px;padding:15px 18px;border:1px solid var(--line);border-radius:14px;background:#fffaf5}.sync-heading{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.sync-heading strong{font-size:14px}.sync-status{font-size:11px;border-radius:20px;padding:3px 10px;background:#f1e5dc;color:var(--wine)}.sync-panel p{font-size:11px;color:var(--muted);margin:6px 0 0;line-height:1.9}@media(max-width:650px){.sync-panel{padding:12px;margin-bottom:16px}.sync-heading strong{font-size:12px}.sync-panel p{font-size:10px}}
