/* ============================================================
   ZAKERLI — Shared Stylesheet
   Used by: index.html, login.html, subscribe.html, admin.html, points.html
   ============================================================ */
:root{
  --bg:#0A0A0A;
  --surface:#141414;
  --surface-2:#1D1D1D;
  --surface-3:#292929;
  --gold:#D4AF37;
  --gold-rgb:212,175,55;
  --gold-bright:#F2CB5C;
  --gold-ink:#241C05;
  --mint:#5B8C6E;
  --danger:#C0524A;
  --text:#F5F1E6;
  --text-muted:#9C978A;
  --border:rgba(245,241,230,0.09);
  --radius:16px;
  --shadow-sm:0 4px 16px -6px rgba(0,0,0,0.45);
  --shadow:0 14px 34px -14px rgba(0,0,0,0.6);
  --glow:rgba(212,175,55,0.4);
}
:root[data-theme="light"]{
  --bg:#FBF7EC;
  --surface:#FFFFFF;
  --surface-2:#F4EFDF;
  --surface-3:#EBE3C8;
  --gold:#A97A0E;
  --gold-rgb:169,122,14;
  --gold-bright:#C99A2C;
  --gold-ink:#FFFFFF;
  --mint:#3C7A54;
  --danger:#B23A32;
  --text:#241F14;
  --text-muted:#6B644F;
  --border:rgba(36,31,20,0.14);
  --shadow-sm:0 4px 16px -8px rgba(36,31,20,0.16);
  --shadow:0 14px 32px -14px rgba(36,31,20,0.22);
  --glow:rgba(169,122,14,0.28);
}
:root[data-theme="light"] body{
  background:
    radial-gradient(circle at 12% -10%, rgba(169,122,14,0.08), transparent 42%),
    radial-gradient(circle at 100% 5%, rgba(169,122,14,0.04), transparent 45%),
    var(--bg);
}
:root[data-theme="light"] .btn{color:#FFFFFF;}
*{box-sizing:border-box; margin:0; padding:0;}
/* Smooth cross-fade for light/dark switching. Universal-selector specificity
   is the lowest possible, so any element with its own more specific
   `transition` rule elsewhere (buttons, inputs, tab items...) keeps that
   rule untouched — this only fills in the gaps for everything else
   (cards, panels, badges, tables, chat bubbles...) so a theme toggle reads
   as a soft fade instead of an instant flash. */
*{transition:background-color .3s ease, border-color .3s ease, color .3s ease, box-shadow .3s ease;}
body{
  background:
    radial-gradient(circle at 12% -10%, rgba(212,175,55,0.12), transparent 42%),
    radial-gradient(circle at 100% 5%, rgba(212,175,55,0.05), transparent 45%),
    var(--bg);
  color:var(--text);
  font-family:'IBM Plex Sans Arabic', sans-serif;
  min-height:100vh;
  transition:background-color .4s ease;
}
h1,h2,h3{font-family:'Amiri', serif; font-weight:700;}
.num-font{font-family:'Space Grotesk', 'IBM Plex Sans Arabic', sans-serif;}
::selection{background:var(--gold); color:var(--gold-ink);}
::-webkit-scrollbar{height:6px; width:8px;} ::-webkit-scrollbar-thumb{background:var(--surface-3); border-radius:10px;}
a{color:inherit;}

.lang-toggle{display:flex; background:var(--surface-2); border:1px solid var(--border); border-radius:30px; padding:3px; width:fit-content; cursor:pointer;}
.lang-toggle span{padding:5px 13px; border-radius:24px; font-size:12px; font-weight:700; color:var(--text-muted);}
.lang-toggle span.active{background:var(--gold); color:var(--gold-ink);}

.theme-toggle{display:flex; background:var(--surface-2); border:1px solid var(--border); border-radius:30px; padding:3px; width:fit-content; cursor:pointer;}
.theme-toggle span{padding:5px 10px; border-radius:24px; font-size:13px; line-height:1; opacity:.35; transition:.15s; display:flex; align-items:center;}
.theme-toggle span.active{opacity:1; background:var(--surface-3);}
.theme-toggle svg{width:14px; height:14px;}

/* ============ TOPBAR + TABS ============ */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 28px; background:var(--surface); border-bottom:1px solid var(--border);
  position:sticky; top:0; z-index:20; gap:12px; flex-wrap:wrap;
}
.brand{font-family:'Amiri', serif; font-size:24px; font-weight:700; color:var(--gold); display:flex; align-items:center; gap:8px; text-decoration:none;}
.brand .dotmark{width:9px; height:9px; border-radius:2px; background:var(--gold); display:inline-block; transform:rotate(45deg);}
.topbar-right{display:flex; align-items:center; gap:12px;}

.tabbar{display:flex; gap:6px; padding:12px 28px; overflow-x:auto; background:var(--surface); border-bottom:1px solid var(--border); position:sticky; top:65px; z-index:19;}
.tab-item{
  display:flex; align-items:center; gap:8px; padding:9px 16px; border-radius:30px; white-space:nowrap;
  color:var(--text-muted); cursor:pointer; font-size:13.5px; font-weight:700; transition:.15s; border:1px solid transparent; flex-shrink:0;
  text-decoration:none;
}
.tab-item svg{width:16px; height:16px;}
.tab-item:hover{background:rgba(245,241,230,0.04); color:var(--text);}
.tab-item.active{background:var(--gold); color:var(--gold-ink);}

/* Hamburger toggle — hidden on desktop, shown under 760px (see media query below) */
.nav-toggle{
  display:none; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  width:36px; height:36px; padding:0; flex-shrink:0; cursor:pointer;
  background:var(--surface-2); border:1px solid var(--border); border-radius:10px;
}
.nav-toggle span{width:17px; height:2px; border-radius:2px; background:var(--text); transition:transform .25s ease, opacity .2s ease;}
.nav-toggle.open span:nth-child(1){transform:translateY(6px) rotate(45deg);}
.nav-toggle.open span:nth-child(2){opacity:0;}
.nav-toggle.open span:nth-child(3){transform:translateY(-6px) rotate(-45deg);}

.nav-backdrop{display:none; position:fixed; inset:0; background:rgba(0,0,0,0.35); z-index:18; opacity:0; transition:opacity .25s ease; pointer-events:none;}
.nav-backdrop.show{opacity:1; pointer-events:auto;}

main{flex:1; padding:30px 28px 60px; max-width:1000px; margin:0 auto; width:100%;}
.page{display:none;} .page.active{display:block; animation:fade .25s ease;}
@keyframes fade{from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:translateY(0)}}

.hero{background:linear-gradient(135deg, var(--surface-3), var(--surface)); border:1px solid var(--border); border-radius:22px; padding:26px 28px; margin-bottom:20px; position:relative; overflow:hidden; box-shadow:var(--shadow-sm);}
.hero::before{content:''; position:absolute; inset-inline-start:-40px; top:-60px; width:220px; height:220px; border-radius:50%; background:radial-gradient(circle, rgba(var(--gold-rgb),0.18), transparent 70%);}

/* 3D brand gem — floats in the hero's far corner, above the ::before glow */
.hero-gem{position:absolute; inset-inline-end:6px; top:10px; width:92px; height:92px; z-index:1; pointer-events:auto;}
@media (max-width:600px){.hero-gem{width:64px; height:64px; top:8px;}}
.hero-title{font-size:24px; position:relative; color:var(--gold);}
.hero-sub{color:var(--text-muted); font-size:13px; margin-top:6px; position:relative;}
.progress-wrap{margin-top:16px; position:relative;}
.progress-label{display:flex; justify-content:space-between; font-size:12px; color:var(--text-muted); margin-bottom:6px;}
.progress-bar{height:8px; background:var(--surface-2); border-radius:20px; overflow:hidden;}
.progress-fill{height:100%; background:linear-gradient(90deg, var(--gold), var(--gold-bright)); border-radius:20px; transition:width .4s;}

.page-title{font-size:23px; margin-bottom:4px; color:var(--gold);}
.page-sub{color:var(--text-muted); font-size:13.5px; margin-bottom:22px;}

.card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow-sm); transition:transform .2s ease, box-shadow .2s ease, background-color .3s ease, border-color .3s ease;}
.card:hover{transform:translateY(-2px); box-shadow:var(--shadow);}
.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
.grid-3{display:grid; grid-template-columns:repeat(3,1fr); gap:14px;}
.grid-4{display:grid; grid-template-columns:repeat(4,1fr); gap:14px;}
@media (max-width:700px){.grid-3{grid-template-columns:1fr;} .grid-2{grid-template-columns:1fr;} .grid-4{grid-template-columns:repeat(2,1fr);}}
.stat{padding:18px 20px;}
.stat .num{font-size:30px; color:var(--gold); line-height:1; font-weight:700;}
.stat .label{color:var(--text-muted); font-size:12.5px; margin-top:6px;}

input, select, textarea, button{font-family:'IBM Plex Sans Arabic', sans-serif; font-size:14px;}
input, select, textarea{background:var(--surface-2); border:1px solid var(--border); color:var(--text); border-radius:10px; padding:10px 12px; width:100%; transition:border-color .15s;}
input:focus, select:focus, textarea:focus{outline:none; border-color:var(--gold);}
textarea{resize:vertical; min-height:70px;}
label{font-size:12.5px; color:var(--text-muted); display:block; margin-bottom:5px;}
.field{margin-bottom:12px;}
.row{display:flex; gap:10px;} .row > *{flex:1;}
@media (max-width:600px){.row{flex-direction:column;}}

.btn{background:linear-gradient(135deg, var(--gold), var(--gold-bright)); color:var(--gold-ink); border:none; padding:11px 20px; border-radius:10px; font-weight:700; cursor:pointer; transition:transform .1s, filter .15s, box-shadow .2s ease; width:100%; box-shadow:0 6px 18px -8px var(--glow);}
.btn:hover{filter:brightness(1.06); box-shadow:0 8px 22px -6px var(--glow);} .btn:active{transform:scale(.98);}
.btn:disabled{opacity:.5; cursor:not-allowed; filter:none; box-shadow:none;}
.btn.auto{width:auto;}
.btn-ghost{background:transparent; border:1px solid var(--border); color:var(--text);}
.contact-row{display:flex; gap:8px; align-items:stretch;}
.contact-row input{flex:1; min-width:0;}
.otp-btn{flex-shrink:0; width:auto; white-space:nowrap; display:flex; align-items:center; justify-content:center; text-align:center; background:transparent; color:var(--gold); border:1px solid var(--border); border-radius:10px; padding:0 16px; font-weight:700; font-size:12.5px; cursor:pointer; transition:border-color .15s, background-color .15s;}
.otp-btn:hover:not(:disabled){border-color:var(--gold); background:rgba(var(--gold-rgb),0.08);}
.otp-btn:disabled{color:var(--text-muted); border-color:var(--border); cursor:not-allowed; opacity:.7;}
.btn-danger{background:transparent; color:var(--danger); border:1px solid rgba(192,82,74,0.35); padding:6px 11px; font-size:12px; width:auto; border-radius:8px;}
.btn-mint{background:transparent; color:var(--mint); border:1px solid rgba(91,140,110,0.35); padding:6px 11px; font-size:12px; width:auto; border-radius:8px;}

.task-list{list-style:none; margin-top:14px; display:flex; flex-direction:column; gap:9px;}
.task{display:flex; align-items:center; gap:12px; background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:12px 14px;}
.task.done{opacity:.5;} .task.done .task-title{text-decoration:line-through;}
.check{width:20px; height:20px; border-radius:50%; border:2px solid var(--text-muted); cursor:pointer; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:11px; transition:.15s;}
.check.checked{background:var(--gold); border-color:var(--gold); color:var(--gold-ink);}
.task-body{flex:1; min-width:0;}
.task-title{font-weight:600; font-size:14.5px;}
.task-meta{font-size:11.5px; color:var(--text-muted); margin-top:3px; display:flex; gap:8px; flex-wrap:wrap; align-items:center;}
.pill{padding:2px 10px; border-radius:20px; font-size:10.5px; font-weight:700;}
.pill.high{background:rgba(192,82,74,0.16); color:var(--danger);}
.pill.medium{background:rgba(var(--gold-rgb),0.16); color:var(--gold);}
.pill.low{background:rgba(91,140,110,0.18); color:var(--mint);}
.pill.admin{background:rgba(var(--gold-rgb),0.22); color:var(--gold-bright);}
.pill.user{background:rgba(245,241,230,0.08); color:var(--text-muted);}
.pill.banned{background:rgba(192,82,74,0.22); color:var(--danger);}
.pill.google{background:rgba(66,133,244,0.18); color:#5B93F5;}
.pill.local{background:rgba(245,241,230,0.08); color:var(--text-muted);}

/* -------- weekly schedule: colorful masonry-style chip layout -------- */
.week-grid{
  display:flex; gap:10px; margin-top:18px; padding:22px 18px 26px;
  background:var(--surface-2); border:1px solid var(--border); border-radius:18px;
  overflow-x:auto;
}
.day-col{flex:1 1 0; min-width:92px; display:flex; flex-direction:column; align-items:center;}
.day-col h3{
  font-size:12.5px; color:var(--text-muted); font-weight:600; margin:0 0 12px; font-family:'IBM Plex Sans Arabic';
  white-space:nowrap; width:100%; text-align:center; padding-bottom:12px; border-bottom:1px solid var(--border);
}
.day-col-items{display:flex; flex-direction:column; align-items:center; gap:16px; width:100%; padding-top:2px;}
.sched-chip-wrap{display:flex; flex-direction:column; align-items:center; gap:4px; width:100%;}
.sched-chip{
  position:relative; border-radius:14px; padding:10px 10px; font-size:12px; font-weight:700;
  text-align:center; width:100%; max-width:118px; box-shadow:0 3px 10px rgba(0,0,0,0.22);
}
.sched-chip-del{
  position:absolute; top:1px; inset-inline-end:6px; font-size:13px; line-height:1; opacity:0; cursor:pointer; transition:.15s;
}
.sched-chip:hover .sched-chip-del{opacity:0.7;}
.sched-chip-time{font-size:10px; color:var(--text-muted);}
@media (max-width:900px){.day-col{min-width:82px;}}

.note-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(220px,1fr)); gap:14px; margin-top:18px;}
.note-card{background:var(--surface-2); border:1px solid var(--border); border-radius:14px; padding:16px; position:relative;}
.note-card .subj{font-size:11.5px; font-weight:700; color:var(--gold); margin-bottom:8px;}
.note-card .content{font-size:13px; line-height:1.7; white-space:pre-wrap;}
.note-card .del{position:absolute; top:10px; inset-inline-end:10px;}

.exam-item{display:flex; align-items:center; gap:14px; background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:13px 15px; margin-bottom:9px;}
.exam-badge{font-family:'Space Grotesk'; font-weight:700; font-size:18px; padding:6px 14px; border-radius:10px; text-align:center; min-width:60px;}
.exam-badge.soon{background:rgba(192,82,74,0.16); color:var(--danger);}
.exam-badge.mid{background:rgba(var(--gold-rgb),0.16); color:var(--gold);}
.exam-badge.far{background:rgba(91,140,110,0.18); color:var(--mint);}
.exam-body{flex:1;} .exam-subj{font-weight:700; font-size:14.5px;} .exam-meta{font-size:12px; color:var(--text-muted); margin-top:2px;}

.timer-circle{width:220px; height:220px; border-radius:50%; margin:20px auto; display:flex; align-items:center; justify-content:center; flex-direction:column; background:conic-gradient(var(--gold) calc(var(--pct,0)*1%), var(--surface-2) 0); position:relative;}
.timer-circle::after{content:''; position:absolute; inset:11px; border-radius:50%; background:var(--surface);}
.timer-time{font-family:'Space Grotesk'; font-size:44px; z-index:1; font-weight:700;}
.timer-mode{z-index:1; color:var(--text-muted); font-size:12.5px; margin-top:4px;}
.timer-controls{display:flex; gap:10px; justify-content:center; margin-top:18px;}
.timer-controls .btn, .timer-controls .btn-ghost{width:auto; padding:10px 22px;}

.compass-wrap{display:flex; flex-direction:column; align-items:center; padding:10px;}
.compass{width:230px; height:230px; border-radius:50%; background:var(--surface-2); border:1px solid var(--border); position:relative; margin:16px auto;}
.compass .label-n, .compass .label-e, .compass .label-s, .compass .label-w{position:absolute; font-size:12px; font-weight:700; color:var(--text-muted);}
.compass .label-n{top:8px; left:50%; transform:translateX(-50%); color:var(--danger);}
.compass .label-s{bottom:8px; left:50%; transform:translateX(-50%);}
.compass .label-e{right:10px; top:50%; transform:translateY(-50%);}
.compass .label-w{left:10px; top:50%; transform:translateY(-50%);}
.compass-arrow{position:absolute; inset:0; transition:transform .3s ease; transform:rotate(var(--rot,0deg));}
.compass-arrow svg{width:100%; height:100%;}
.compass-center{position:absolute; top:50%; left:50%; width:10px; height:10px; border-radius:50%; background:var(--gold); transform:translate(-50%,-50%);}
.qibla-result{font-family:'Space Grotesk'; font-size:26px; font-weight:700; color:var(--gold); margin-top:6px;}

.empty{text-align:center; padding:36px 20px; color:var(--text-muted); font-size:13px;}
.empty svg{display:block; margin:0 auto 8px; width:26px; height:26px; opacity:.5;}
pre{background:#050505; border:1px solid var(--border); border-radius:12px; padding:14px; font-size:12px; overflow-x:auto; direction:ltr; text-align:left; color:#d8cfa8; line-height:1.65; margin-top:10px;}
.section-title{font-size:14.5px; font-weight:700; margin:22px 0 9px; font-family:'IBM Plex Sans Arabic'; color:var(--text);}
.toast{position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:var(--surface-3); border:1px solid var(--border); padding:10px 20px; border-radius:30px; font-size:13px; opacity:0; pointer-events:none; transition:.25s; z-index:50; display:flex; align-items:center; gap:8px;}
.toast svg{width:16px; height:16px; flex-shrink:0;}
.toast.show{opacity:1; transform:translateX(-50%) translateY(-6px);}

/* ============ AUTH (login/register) ============ */
.auth-shell{min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px;}
.auth-card{width:100%; max-width:400px; background:var(--surface); border:1px solid var(--border); border-radius:20px; padding:30px 26px; position:relative; overflow:hidden;}
.auth-card::before{content:''; position:absolute; inset-inline-start:-30px; top:-50px; width:180px; height:180px; border-radius:50%; background:radial-gradient(circle, rgba(var(--gold-rgb),0.16), transparent 70%);}
.auth-brand{text-align:center; margin-bottom:6px; position:relative;}
.auth-brand .brand{justify-content:center; font-size:28px;}
.auth-sub{text-align:center; color:var(--text-muted); font-size:13px; margin-bottom:22px; position:relative;}
.auth-switch{display:flex; background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:4px; margin-bottom:20px; position:relative;}
.auth-switch button{flex:1; background:transparent; border:none; color:var(--text-muted); padding:9px; border-radius:9px; font-weight:700; cursor:pointer;}
.auth-switch button.active{background:var(--gold); color:var(--gold-ink);}
.auth-error{background:rgba(192,82,74,0.14); border:1px solid rgba(192,82,74,0.3); color:var(--danger); font-size:12.5px; padding:9px 12px; border-radius:10px; margin-bottom:14px; display:none;}
.auth-error.show{display:block;}
.banned-notice{background:rgba(192,82,74,0.1); border:1px solid rgba(192,82,74,0.3); border-radius:14px; padding:16px; margin-bottom:16px; text-align:center;}
.banned-notice-title{color:var(--danger); font-weight:700; font-size:15px; margin-bottom:6px;}
.banned-notice-sub{color:var(--text-muted); font-size:12.5px; line-height:1.6; margin-bottom:14px;}
.auth-note{text-align:center; font-size:11.5px; color:var(--text-muted); margin-top:16px; line-height:1.6;}
.demo-flag{display:inline-flex; align-items:center; gap:5px; background:rgba(var(--gold-rgb),0.1); color:var(--gold); font-size:10.5px; padding:3px 9px; border-radius:20px; margin-top:10px;}

.auth-divider{display:flex; align-items:center; gap:10px; margin:16px 0; color:var(--text-muted); font-size:11.5px;}
.auth-divider::before, .auth-divider::after{content:''; flex:1; height:1px; background:var(--border);}
#google-btn-container{display:flex; justify-content:center; min-height:44px;}
.google-fallback-btn{display:flex; align-items:center; justify-content:center; gap:10px; width:100%; background:var(--surface-2); border:1px solid var(--border); color:var(--text); padding:11px 16px; border-radius:10px; font-weight:700; cursor:pointer;}
.google-fallback-btn svg{width:18px; height:18px; flex-shrink:0;}

.forgot-link{display:block; text-align:end; font-size:12px; color:var(--text-muted); margin:-4px 0 14px; text-decoration:none; font-weight:600; cursor:pointer;}
.forgot-link:hover{color:var(--gold);}
.back-link{display:inline-flex; align-items:center; gap:4px; color:var(--text-muted); font-size:12px; font-weight:700; margin-bottom:14px; text-decoration:none; cursor:pointer;}
.back-link:hover{color:var(--gold);}
.support-link{display:inline-flex; align-items:center; gap:6px; color:var(--mint); font-size:12px; font-weight:700; margin-top:16px; text-decoration:none; justify-content:center; width:100%;}
.support-link svg{width:15px; height:15px; flex-shrink:0;}
.support-fab{position:fixed; bottom:22px; inset-inline-end:20px; width:52px; height:52px; border-radius:50%; background:#25D366; display:flex; align-items:center; justify-content:center; box-shadow:0 6px 18px rgba(0,0,0,0.35); z-index:55; text-decoration:none; transition:transform .15s;}
.support-fab:hover{transform:scale(1.06);}
.support-fab svg{width:27px; height:27px; fill:#fff;}

/* ============ PRICING / SUBSCRIBE ============ */
.price-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:20px;}
@media (max-width:800px){.price-grid{grid-template-columns:1fr;}}
.price-card{background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:24px 22px; display:flex; flex-direction:column; position:relative; box-shadow:var(--shadow-sm); transition:transform .2s ease, box-shadow .2s ease, background-color .3s ease, border-color .3s ease;}
.price-card:hover{transform:translateY(-2px); box-shadow:var(--shadow);}
.price-card.featured{border-color:var(--gold); background:linear-gradient(160deg, var(--surface-3), var(--surface)); box-shadow:0 14px 32px -14px var(--glow);}
.price-tag{position:absolute; top:-11px; inset-inline-start:20px; background:var(--gold); color:var(--gold-ink); font-size:10.5px; font-weight:700; padding:3px 12px; border-radius:20px;}
.price-name{font-size:15px; font-weight:700; color:var(--gold);}
.price-num{font-family:'Space Grotesk'; font-size:34px; font-weight:700; margin:10px 0 2px;}
.price-period{color:var(--text-muted); font-size:12px; margin-bottom:16px;}
.feature-list{list-style:none; display:flex; flex-direction:column; gap:10px; margin-bottom:20px; flex:1;}
.feature-list li{font-size:13px; display:flex; align-items:flex-start; gap:8px; color:var(--text);}
.feature-list li .ico{color:var(--mint); flex-shrink:0; display:inline-flex;}
.feature-list li .ico svg{width:13px; height:13px;}
.feature-list li.off{color:var(--text-muted); text-decoration:line-through;}
.feature-list li.off .ico{color:var(--text-muted);}
.plan-current{text-align:center; font-size:12px; color:var(--mint); font-weight:700; padding:10px; border:1px solid rgba(91,140,110,0.3); border-radius:10px; background:rgba(91,140,110,0.1);}

/* ============ ADMIN ============ */
.admin-toolbar{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px; align-items:center;}
.admin-search{max-width:240px;}
.admin-filter{max-width:150px; width:auto;}
.contact-cell{font-size:11.5px; color:var(--text-muted); direction:ltr; text-align:start;}
.table-wrap{overflow-x:auto; border:1px solid var(--border); border-radius:14px;}
table.admin-table{width:100%; border-collapse:collapse; font-size:13px; min-width:760px;}
table.admin-table th{text-align:start; background:var(--surface-2); color:var(--text-muted); font-weight:700; font-size:11.5px; padding:11px 14px; white-space:nowrap;}
table.admin-table td{padding:11px 14px; border-top:1px solid var(--border); white-space:nowrap;}
table.admin-table tr:hover td{background:rgba(245,241,230,0.02);}
.uname{font-weight:700;}
.row-actions{display:flex; gap:6px; flex-wrap:wrap;}
.mini-input{width:70px; padding:6px 8px; text-align:center;}

/* ============ LEVELS / XP ============ */
.level-chip{display:inline-flex; align-items:center; gap:6px; background:rgba(var(--gold-rgb),0.14); color:var(--gold-bright); font-size:12px; font-weight:700; padding:5px 12px; border-radius:20px;}
.xp-track{height:7px; background:var(--surface-2); border-radius:20px; overflow:hidden; margin-top:8px;}
.xp-fill{height:100%; background:linear-gradient(90deg, var(--mint), #7BB795); border-radius:20px; transition:width .4s;}
.xp-row{display:flex; justify-content:space-between; font-size:11px; color:var(--text-muted); margin-top:6px;}

/* ============ POINTS EXCHANGE ============ */
.wallet-grid{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
@media (max-width:600px){.wallet-grid{grid-template-columns:1fr;}}
.points-hero{text-align:center; padding:34px 20px;}
.points-hero .big-num{font-family:'Space Grotesk'; font-size:44px; font-weight:700; color:var(--gold); line-height:1;}
.points-hero.wallet .big-num{color:var(--mint);}
.points-hero .big-label{color:var(--text-muted); font-size:13px; margin-top:8px;}
.rate-note{text-align:center; font-size:12px; color:var(--text-muted); margin-top:10px;}
.method-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:12px;}
@media (max-width:600px){.method-grid{grid-template-columns:1fr;}}
.method-opt{background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:10px; text-align:center; font-size:12.5px; font-weight:700; cursor:pointer; transition:.15s;}
.method-opt.active{background:var(--gold); color:var(--gold-ink); border-color:var(--gold);}
.section-note{font-size:11.5px; color:var(--text-muted); line-height:1.7; margin-top:10px;}
.exchange-result{text-align:center; background:var(--surface-2); border:1px solid var(--border); border-radius:14px; padding:16px; margin:16px 0;}
.exchange-result .egp{font-family:'Space Grotesk'; font-size:28px; color:var(--mint); font-weight:700;}
.history-item{display:flex; justify-content:space-between; align-items:center; background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:12px 14px; margin-bottom:8px; font-size:13px;}
.history-item .st{font-size:11px; padding:3px 10px; border-radius:20px; font-weight:700;}
.history-item .st.pending{background:rgba(var(--gold-rgb),0.16); color:var(--gold);}
.history-item .st.approved{background:rgba(91,140,110,0.18); color:var(--mint);}
.history-item .st.rejected{background:rgba(192,82,74,0.16); color:var(--danger);}

/* ============ PROFILE ============ */
.profile-hero{display:flex; align-items:center; gap:20px; flex-wrap:wrap; margin-bottom:22px;}
.avatar-wrap{position:relative; width:92px; height:92px; flex-shrink:0;}
.avatar-circle{
  width:92px; height:92px; border-radius:50%; overflow:hidden; background:linear-gradient(135deg, var(--gold), var(--gold-bright));
  display:flex; align-items:center; justify-content:center; border:2px solid var(--border); flex-shrink:0;
}
.avatar-circle img{width:100%; height:100%; object-fit:cover; display:block;}
.avatar-circle .initials{font-family:'Space Grotesk'; font-size:32px; font-weight:700; color:var(--gold-ink);}
.avatar-edit-btn{
  position:absolute; inset-inline-end:-2px; bottom:-2px; width:32px; height:32px; border-radius:50%;
  background:var(--gold); color:var(--gold-ink); border:3px solid var(--surface); display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:filter .15s;
}
.avatar-edit-btn:hover{filter:brightness(1.08);}
.avatar-edit-btn svg{width:14px; height:14px;}
.avatar-edit-btn input[type="file"]{display:none;}
.avatar-uploading{opacity:.45; pointer-events:none;}
.avatar-spinner{
  position:absolute; inset:0; border-radius:50%; border:3px solid rgba(245,241,230,0.25); border-top-color:var(--gold);
  animation:spin .7s linear infinite; display:none;
}
.avatar-wrap.busy .avatar-spinner{display:block;}
@keyframes spin{to{transform:rotate(360deg);}}
.profile-id{flex:1; min-width:180px;}
.profile-id .p-name{font-size:19px; font-weight:700; font-family:'IBM Plex Sans Arabic';}
.profile-id .p-username{color:var(--text-muted); font-size:12.5px; margin-top:2px;}
.profile-badges{display:flex; gap:6px; flex-wrap:wrap; margin-top:8px;}
.avatar-remove-link{display:inline-block; font-size:11px; color:var(--text-muted); margin-top:6px; cursor:pointer; text-decoration:underline; text-underline-offset:2px;}
.avatar-remove-link:hover{color:var(--danger);}
.avatar-error{font-size:11px; color:var(--danger); margin-top:6px;}

.field-label-row{display:flex; align-items:center; justify-content:space-between; margin-bottom:5px;}
.field-label-row label{margin-bottom:0;}
.save-status{font-size:11px; color:var(--text-muted); display:flex; align-items:center; gap:4px; opacity:0; transition:opacity .2s;}
.save-status.show{opacity:1;}
.save-status.saved{color:var(--mint);}
.save-status svg{width:11px; height:11px;}
.save-status .spin{animation:spin .7s linear infinite;}
.autosave-note{font-size:11px; color:var(--text-muted); margin-top:-8px; margin-bottom:14px;}
.card-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:14px;}
.card-head-title{font-weight:700; font-size:13.5px;}

/* ============ COMMUNITY CHAT ============ */
.chat-card{padding:0; display:flex; flex-direction:column; height:min(70vh, 620px); overflow:hidden;}
.chat-header{padding:14px 18px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;}
.chat-room-name{font-weight:700; font-size:14px; display:flex; align-items:center; gap:8px;}
.chat-room-name svg{width:15px; height:15px; color:var(--gold); flex-shrink:0;}
.room-picker{max-width:260px;}
.chat-messages{flex:1; overflow-y:auto; padding:16px 18px; display:flex; flex-direction:column; gap:12px;}
.msg-row{display:flex; gap:9px; align-items:flex-end; position:relative;}
.msg-row.mine{flex-direction:row-reverse;}
.msg-avatar{width:28px; height:28px; border-radius:50%; overflow:hidden; background:linear-gradient(135deg, var(--gold), var(--gold-bright)); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.msg-avatar img{width:100%; height:100%; object-fit:cover; display:block;}
.msg-avatar .initials{font-size:11px; font-weight:700; color:var(--gold-ink); font-family:'Space Grotesk';}
.msg-bubble{background:var(--surface-2); border:1px solid var(--border); border-radius:14px; padding:9px 13px; max-width:72%; position:relative;}
.msg-row.mine .msg-bubble{background:rgba(var(--gold-rgb),0.14); border-color:rgba(var(--gold-rgb),0.3);}
.msg-name{font-size:11px; font-weight:700; color:var(--gold); margin-bottom:3px;}
.msg-content{font-size:13.5px; line-height:1.6; white-space:pre-wrap; word-break:break-word;}
.msg-time{font-size:10px; color:var(--text-muted); margin-top:4px;}
.msg-del{opacity:0; transition:.15s; cursor:pointer; color:var(--text-muted); flex-shrink:0; align-self:center; width:15px; height:15px;}
.msg-del:hover{color:var(--danger);}
.msg-row:hover .msg-del{opacity:1;}
.chat-input-row{display:flex; gap:8px; padding:14px 18px; border-top:1px solid var(--border); flex-shrink:0;}
.chat-input-row input{flex:1;}
.chat-input-row button{width:auto; padding:10px 22px; flex-shrink:0;}
.monitor-banner{background:rgba(var(--gold-rgb),0.1); color:var(--gold); font-size:11.5px; padding:9px 14px; text-align:center; border-top:1px solid var(--border); flex-shrink:0;}
.room-locked-banner{background:rgba(192,82,74,0.14); color:var(--danger); font-size:12px; font-weight:700; padding:10px 14px; text-align:center; border-top:1px solid var(--border); flex-shrink:0;}

/* -------- celebratory admin effects (see effects.js) -------- */
.confetti-piece{
  position:fixed; width:8px; height:8px; border-radius:2px; z-index:200;
  pointer-events:none; transform:translate(-50%,-50%);
  animation-name:confettiBurst; animation-timing-function:cubic-bezier(.2,.8,.3,1); animation-fill-mode:forwards;
}
@keyframes confettiBurst{
  0%{ transform:translate(-50%,-50%) rotate(0deg); opacity:1; }
  100%{ transform:translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)); opacity:0; }
}
.fireworks-canvas{ position:fixed; inset:0; z-index:199; pointer-events:none; }
.chat-empty{text-align:center; color:var(--text-muted); font-size:13px; padding:40px 10px; margin:auto;}
.chat-empty svg{display:block; margin:0 auto 8px; width:26px; height:26px; opacity:.5;}

/* -------- message styling by sender: neutral gray by default,
   gold reserved for admin messages -------- */
.msg-row.mine .msg-bubble{background:var(--surface-3); border-color:var(--border);}
.msg-row.admin-msg .msg-bubble{background:linear-gradient(135deg, rgba(var(--gold-rgb),0.22), rgba(var(--gold-rgb),0.09)); border-color:rgba(var(--gold-rgb),0.45);}
.msg-row.admin-msg .msg-avatar{background:linear-gradient(135deg, var(--gold), var(--gold-bright));}
.msg-row.admin-msg .msg-avatar:not(.zframe){box-shadow:0 0 0 2px rgba(var(--gold-rgb),0.3);}
.msg-row.admin-msg .msg-name{color:var(--gold); display:flex; align-items:center; gap:4px;}
.msg-admin-crown{width:11px; height:11px; flex-shrink:0; color:var(--gold-bright);}

/* -------- pinned message -------- */
.msg-row.is-pinned .msg-bubble{outline:1px dashed var(--gold); outline-offset:2px;}
.pinned-banner{display:flex; align-items:center; gap:9px; background:rgba(var(--gold-rgb),0.1); border-bottom:1px solid var(--border); padding:9px 16px; font-size:12px; cursor:pointer; flex-shrink:0;}
.pinned-banner svg{width:14px; height:14px; color:var(--gold); flex-shrink:0;}
.pinned-banner .pinned-text{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.pinned-banner .pinned-label{color:var(--gold); font-weight:700; flex-shrink:0;}
.pinned-banner .unpin-x{flex-shrink:0; color:var(--text-muted); width:14px; height:14px; cursor:pointer;}
.pinned-banner .unpin-x:hover{color:var(--danger);}
.msg-pin{opacity:0; transition:.15s; cursor:pointer; color:var(--text-muted); flex-shrink:0; align-self:center; width:15px; height:15px;}
.msg-pin:hover{color:var(--gold);}
.msg-pin.active{opacity:1; color:var(--gold);}
.msg-row:hover .msg-pin{opacity:1;}

/* -------- reply (mention-style quoting) -------- */
.msg-reply{opacity:0; transition:.15s; cursor:pointer; color:var(--text-muted); flex-shrink:0; align-self:center; width:15px; height:15px;}
.msg-reply:hover{color:var(--gold);}
.msg-row:hover .msg-reply{opacity:1;}
.msg-report{opacity:0; transition:.15s; cursor:pointer; color:var(--text-muted); flex-shrink:0; align-self:center; width:15px; height:15px;}
.msg-report:hover{color:#e08b2b;}
.msg-row:hover .msg-report{opacity:1;}
.msg-ban{opacity:0; transition:.15s; cursor:pointer; color:var(--text-muted); flex-shrink:0; align-self:center; width:15px; height:15px;}
.msg-ban:hover{color:var(--danger);}
.msg-row:hover .msg-ban{opacity:1;}
.reply-quote{display:flex; gap:6px; align-items:flex-start; background:rgba(0,0,0,0.16); border-inline-start:3px solid var(--gold); border-radius:6px; padding:5px 9px; margin-bottom:6px; cursor:pointer; max-width:100%;}
.reply-quote .reply-quote-name{font-size:11px; font-weight:700; color:var(--gold); flex-shrink:0;}
.reply-quote .reply-quote-text{font-size:11.5px; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;}
.report-preview{display:none; gap:6px; align-items:flex-start; background:rgba(0,0,0,0.16); border-inline-start:3px solid #e08b2b; border-radius:6px; padding:8px 10px; margin-bottom:14px; max-width:100%;}
.report-preview-name{font-size:11.5px; font-weight:700; color:#e08b2b; flex-shrink:0;}
.report-preview-text{font-size:12px; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;}
.dialog-message{font-size:13.5px; color:var(--text-muted); margin-bottom:16px; line-height:1.7;}
.profile-modal-close{position:absolute; top:14px; inset-inline-end:16px; cursor:pointer; color:var(--text-muted); font-size:14px;}
.profile-modal-close:hover{color:var(--text);}
.reply-preview-bar{display:flex; align-items:center; gap:9px; background:var(--surface-2); border-top:1px solid var(--border); padding:8px 18px; flex-shrink:0;}
.reply-preview-bar .reply-preview-body{flex:1; min-width:0; display:flex; flex-direction:column; gap:1px;}
.reply-preview-bar .reply-preview-name{font-size:11px; font-weight:700; color:var(--gold);}
.reply-preview-bar .reply-preview-text{font-size:12px; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.reply-preview-bar .reply-preview-x{flex-shrink:0; width:16px; height:16px; color:var(--text-muted); cursor:pointer;}
.reply-preview-bar .reply-preview-x:hover{color:var(--danger);}

/* -------- image messages -------- */
.msg-image{max-width:220px; border-radius:10px; overflow:hidden; cursor:pointer; display:block; margin-bottom:4px;}
.msg-image img{width:100%; display:block; max-height:260px; object-fit:cover;}

/* -------- attach-image button + preview strip in the input row -------- */
.chat-attach-btn{flex-shrink:0; width:40px; height:40px; border-radius:10px; border:1px solid var(--border); background:transparent; color:var(--text-muted); cursor:pointer; display:flex; align-items:center; justify-content:center; transition:.15s;}
.chat-attach-btn:hover{color:var(--gold); border-color:var(--gold);}
.chat-attach-btn svg{width:17px; height:17px;}
.chat-attach-btn input[type="file"]{display:none;}
.image-preview-bar{display:flex; align-items:center; gap:10px; padding:10px 18px; border-top:1px solid var(--border); flex-shrink:0;}
.image-preview-bar .image-preview-thumb{width:44px; height:44px; border-radius:8px; overflow:hidden; flex-shrink:0;}
.image-preview-bar .image-preview-thumb img{width:100%; height:100%; object-fit:cover; display:block;}
.image-preview-bar .image-preview-x{flex-shrink:0; width:16px; height:16px; color:var(--text-muted); cursor:pointer;}
.image-preview-bar .image-preview-x:hover{color:var(--danger);}
.image-preview-bar .image-preview-note{font-size:11.5px; color:var(--text-muted); flex:1;}

/* -------- chat channel tabs -------- */
.channel-tabs{display:flex; gap:8px; padding:10px 18px; border-bottom:1px solid var(--border); flex-shrink:0;}
.channel-tab{background:transparent; border:1px solid var(--border); color:var(--text-muted); font-size:12.5px; font-weight:700; padding:7px 14px; border-radius:20px; cursor:pointer; transition:.15s; font-family:'IBM Plex Sans Arabic';}
.channel-tab.active{background:var(--gold); border-color:var(--gold); color:var(--gold-ink);}
.channel-tab:not(.active):hover{border-color:var(--gold); color:var(--gold);}

/* -------- voice recording bar -------- */
.recording-bar{display:flex; align-items:center; gap:10px; padding:10px 18px; border-top:1px solid var(--border); flex-shrink:0; font-size:12.5px; color:var(--text-muted);}
.recording-dot{width:9px; height:9px; border-radius:50%; background:var(--danger); flex-shrink:0; animation:recordPulse 1.1s ease-in-out infinite;}
@keyframes recordPulse{0%,100%{opacity:1;} 50%{opacity:0.25;}}
.recording-timer{font-family:'Space Grotesk'; font-weight:700; color:var(--text); flex:1;}
.recording-cancel-btn, .recording-send-btn{width:auto; padding:7px 14px; font-size:12px;}

/* -------- voice message bubble -------- */
.msg-voice{max-width:220px; height:38px; display:block; margin-bottom:4px;}

/* -------- admin chat toolbar (poll / fun entrance / clear / broadcast) -------- */
.chat-admin-toolbar{display:flex; gap:8px; padding:10px 18px; border-top:1px solid var(--border); flex-wrap:wrap; flex-shrink:0;}
.chat-admin-toolbar button{width:auto; padding:7px 14px; font-size:12px; display:flex; align-items:center; gap:6px;}
.chat-admin-toolbar button svg{width:14px; height:14px;}
.chat-admin-toolbar .btn-danger{display:flex; align-items:center; gap:6px;}

/* -------- poll card, embedded inside a message bubble -------- */
.poll-card{min-width:220px;}
.poll-question{font-weight:700; font-size:13.5px; margin-bottom:9px; display:flex; align-items:center; gap:6px;}
.poll-question svg{width:14px; height:14px; color:var(--gold); flex-shrink:0;}
.poll-option{position:relative; background:var(--surface); border:1px solid var(--border); border-radius:9px; padding:8px 11px; margin-bottom:6px; cursor:pointer; overflow:hidden; transition:border-color .15s;}
.poll-option:hover{border-color:var(--gold);}
.poll-option.voted{border-color:var(--gold);}
.poll-option-fill{position:absolute; inset-inline-start:0; top:0; bottom:0; background:rgba(var(--gold-rgb),0.16); transition:width .35s ease; z-index:0;}
.poll-option-row{position:relative; z-index:1; display:flex; justify-content:space-between; gap:8px; font-size:12.5px;}
.poll-option-pct{font-family:'Space Grotesk'; font-weight:700; color:var(--gold); flex-shrink:0;}
.poll-total{font-size:11px; color:var(--text-muted); margin-top:2px;}

/* -------- admin "funny entrance" banner -------- */
@keyframes entranceIn{
  0%{transform:translateY(-16px) scale(.85); opacity:0;}
  55%{transform:translateY(3px) scale(1.04); opacity:1;}
  100%{transform:translateY(0) scale(1);}
}
@keyframes entranceGlow{
  0%,100%{box-shadow:0 0 0 rgba(var(--gold-rgb),0);}
  50%{box-shadow:0 0 18px rgba(var(--gold-rgb),0.35);}
}
.entrance-row{display:flex; justify-content:center; padding:2px 0;}
.entrance-banner{
  display:flex; align-items:center; gap:8px; padding:9px 20px; border-radius:30px;
  background:linear-gradient(135deg, var(--gold), var(--gold-bright)); color:var(--gold-ink);
  font-weight:700; font-size:12.5px; animation:entranceIn .5s cubic-bezier(.34,1.56,.64,1), entranceGlow 2.2s ease-in-out 1;
}
.entrance-banner svg{width:15px; height:15px; flex-shrink:0;}

/* -------- lightweight modal, shared -------- */
.modal-overlay{position:fixed; inset:0; background:rgba(0,0,0,0.55); display:flex; align-items:center; justify-content:center; padding:20px; z-index:80;}
.modal-box{background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:22px; width:100%; max-width:420px; max-height:86vh; overflow-y:auto; box-shadow:var(--shadow);}
.modal-title{font-size:16.5px; font-weight:700; color:var(--gold); margin-bottom:14px; font-family:'Amiri', serif;}
.poll-opt-input-row{display:flex; gap:6px; margin-bottom:8px; align-items:center;}
.poll-opt-input-row input{flex:1;}
.poll-opt-remove{flex-shrink:0; width:30px; height:30px; border-radius:8px; border:1px solid var(--border); background:transparent; color:var(--text-muted); cursor:pointer; display:flex; align-items:center; justify-content:center;}
.poll-opt-remove:hover{color:var(--danger); border-color:rgba(192,82,74,0.35);}
.modal-actions{display:flex; gap:8px; margin-top:16px;}
.modal-actions .btn, .modal-actions .btn-ghost{width:auto; flex:1;}

/* -------- صلاتي: location toggle, prayer times, tracker -------- */
.location-toggle{display:flex; gap:8px;}
.location-opt{flex:1; text-align:center; padding:10px; border-radius:10px; background:var(--surface-2); border:1px solid var(--border); font-size:12.5px; font-weight:700; cursor:pointer; transition:.15s;}
.location-opt.active{background:var(--gold); color:var(--gold-ink); border-color:var(--gold);}

.next-prayer-banner{display:flex; align-items:center; gap:8px; background:linear-gradient(135deg, rgba(var(--gold-rgb),0.18), rgba(var(--gold-rgb),0.06)); border:1px solid rgba(var(--gold-rgb),0.35); border-radius:12px; padding:10px 14px; font-size:12.5px; font-weight:700; color:var(--gold); margin-bottom:14px;}

.prayer-times-grid{display:grid; grid-template-columns:repeat(5, 1fr); gap:8px;}
.prayer-time-cell{background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:12px 6px; text-align:center;}
.prayer-time-cell.next{background:var(--gold); border-color:var(--gold);}
.prayer-time-cell.next .prayer-time-name, .prayer-time-cell.next .prayer-time-clock{color:var(--gold-ink);}
.prayer-time-name{font-size:11.5px; color:var(--text-muted); font-weight:700; margin-bottom:4px;}
.prayer-time-clock{font-size:15px; font-weight:700;}

.prayer-tracker-grid{display:grid; grid-template-columns:repeat(5, 1fr); gap:8px;}
.prayer-check{display:flex; flex-direction:column; align-items:center; gap:8px; padding:14px 6px; border-radius:12px; background:var(--surface-2); border:1px solid var(--border); cursor:pointer; transition:.15s;}
.prayer-check.done{background:rgba(91,140,110,0.16); border-color:rgba(91,140,110,0.4);}
.prayer-check-box{width:26px; height:26px; border-radius:50%; border:2px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--mint); flex-shrink:0;}
.prayer-check.done .prayer-check-box{background:var(--mint); border-color:var(--mint); color:#fff;}
.prayer-check-box svg{width:14px; height:14px;}
.prayer-check-name{font-size:11.5px; font-weight:700; text-align:center;}

@media (max-width:600px){
  .prayer-times-grid, .prayer-tracker-grid{grid-template-columns:repeat(3, 1fr);}
}

/* -------- community.html: contests + quick point gifting -------- */
.contest-banner{
  display:flex; flex-direction:column; gap:8px; align-self:center; max-width:88%; margin:6px auto;
  background:linear-gradient(135deg, rgba(var(--gold-rgb),0.2), rgba(var(--gold-rgb),0.07)); border:1px solid rgba(var(--gold-rgb),0.4);
  border-radius:14px; padding:12px 16px; font-size:12.5px;
}
.contest-header{display:flex; align-items:center; gap:8px; font-weight:700; color:var(--gold);}
.contest-header svg{width:16px; height:16px; flex-shrink:0;}
.contest-points-badge{margin-inline-start:auto; background:var(--gold); color:var(--gold-ink); border-radius:20px; padding:2px 10px; font-size:11px; font-weight:700;}
.contest-winner{font-weight:700; color:var(--mint);}
.contest-award-row{display:flex; gap:6px; margin-top:2px;}
.contest-award-row input{flex:1; padding:7px 10px; font-size:12px;}
.contest-award-row button{width:auto; padding:7px 12px; font-size:12px;}

.msg-gift{opacity:0; transition:.15s; cursor:pointer; color:var(--text-muted); flex-shrink:0; align-self:center; width:15px; height:15px;}
.msg-gift:hover{color:var(--gold);}
.msg-row:hover .msg-gift{opacity:1;}

/* user-facing "send a coin gift" icon — available to everyone, not just admins,
   distinct hover color (mint) so it doesn't get confused with the admin-only
   free-points .msg-gift icon above */
.msg-send-gift{opacity:0; transition:.15s; cursor:pointer; color:var(--text-muted); flex-shrink:0; align-self:center; width:15px; height:15px;}
.msg-send-gift:hover{color:#4EBE96;}
.msg-row:hover .msg-send-gift{opacity:1;}

/* أزرار رسايل الشات (رد/حذف/هدية/بلاغ/تثبيت/باند) كلها كانت متصممة
   إنها تظهر بس عند :hover على صف الرسالة. ده شغال كويس على اللابتوب
   بس على الموبايل (أجهزة اللمس) مفيش hover حقيقي، فالأزرار دي كانت
   عمليًا مش ظاهرة/مش قابلة للاستخدام خالص. بنخليها ظاهرة دايمًا (بشفافية
   خفيفة) على أي جهاز مالوش hover، وتوضح بالكامل عند اللمس على الصف. */
@media (hover:none){
  .msg-del, .msg-pin, .msg-reply, .msg-report, .msg-ban, .msg-gift, .msg-send-gift{
    opacity:.55;
  }
  .msg-row:active .msg-del, .msg-row:active .msg-pin, .msg-row:active .msg-reply,
  .msg-row:active .msg-report, .msg-row:active .msg-ban, .msg-row:active .msg-gift,
  .msg-row:active .msg-send-gift{
    opacity:1;
  }
}

@media (max-width:760px){
  .topbar{padding:12px 16px;}
  .nav-toggle{display:flex;}
  .nav-backdrop{display:block;}
  .tabbar{
    position:fixed; top:57px; right:0; bottom:0; inset-inline-start:auto;
    flex-direction:column; align-items:stretch; gap:3px;
    width:78%; max-width:300px; margin:0; padding:16px;
    overflow-y:auto; max-height:none; opacity:1;
    background:var(--surface); border-bottom:none; border-inline-start:1px solid var(--border);
    box-shadow:-14px 0 24px -12px rgba(0,0,0,0.35);
    transform:translateX(100%);
    transition:transform .32s ease;
  }
  .tabbar.open{transform:translateX(0);}
  .tabbar .tab-item{width:100%;}
  main{padding:18px;}
}

/* ---------- task-add: collapsed "priority" disclosure (simplified add-task form) ---------- */
.task-more{ margin:2px 0 14px; }
.task-more summary{
  cursor:pointer; font-size:12.5px; font-weight:700; color:var(--text-muted);
  list-style:none; display:inline-flex; align-items:center; gap:5px; user-select:none;
}
.task-more summary::-webkit-details-marker{ display:none; }
.task-more summary::before{ content:'+'; font-size:14px; line-height:1; color:var(--gold); }
.task-more[open] summary::before{ content:'−'; }
.task-more[open] summary{ color:var(--text); margin-bottom:2px; }

/* إطارات المظهر: مسافة صغيرة عشان الحلقة ماتلمسش الفقاعة */
.msg-row .msg-avatar.zframe{margin-inline:4px;}
