:root{
  --ink:#0F1419;
  --paper:#FFFFFF;
  --mist:#D7DDE2;
  --mist-2:#C3CBD2;
  --line:#EFF3F4;
  --muted:#536471;
  --radius:999px;
  --pad:20px;
}

*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  font-family:"IBM Plex Sans Arabic","Tajawal","Segoe UI",system-ui,sans-serif;
  background:var(--paper);
  color:var(--ink);
  line-height:1.55;
  overflow-x:hidden;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px;border-radius:4px}

/* ---------- الهيدر ---------- */
.header{
  position:sticky;top:0;z-index:60;
  background:var(--paper);
  border-bottom:1px solid var(--line);
  display:flex;align-items:center;justify-content:space-between;
  padding:14px var(--pad);
}
.brand{display:flex;align-items:center;gap:10px}
.brand-name{font-size:19px;font-weight:700;letter-spacing:-.2px;white-space:nowrap}
.head-actions{display:flex;align-items:center;gap:6px}
.icon-btn{
  width:42px;height:42px;border-radius:50%;
  display:grid;place-items:center;
  transition:background .18s ease;
}
.icon-btn:hover{background:var(--line)}
.icon-btn svg{width:22px;height:22px;stroke:var(--ink);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ---------- الواجهة الرئيسية ---------- */
.hero{
  position:relative;
  background:linear-gradient(160deg,#E2E7EB 0%,var(--mist) 45%,var(--mist-2) 100%);
  padding:56px var(--pad) 68px;
  overflow:hidden;
}
.hero::before{
  content:"";position:absolute;inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  mix-blend-mode:overlay;
  pointer-events:none;
}
.hero-inner{
  position:relative;max-width:520px;margin-inline:auto;
  display:flex;flex-direction:column;align-items:flex-start;
}
.hero h1{
  font-size:clamp(28px,7.5vw,34px);
  font-weight:700;letter-spacing:-.8px;line-height:1.2;
  text-align:start;
  direction:rtl;
  unicode-bidi:isolate;
  margin-bottom:26px;
  padding-inline-end:4px;
}
.wants{display:flex;flex-direction:column;align-items:flex-start;gap:13px}
.pill{
  background:var(--ink);color:#fff;
  border-radius:var(--radius);
  padding:15px 30px;
  font-size:17px;font-weight:700;
  display:inline-block;
  transition:transform .18s ease,opacity .18s ease;
  will-change:transform;
}
.pill:hover{transform:translateY(-2px);opacity:.9}
.pill:active{transform:translateY(0)}
.pill{max-width:100%}

/* ---------- المدونة ---------- */
.blog{padding:56px var(--pad) 20px;max-width:1100px;margin-inline:auto}
.eyebrow{
  font-size:13px;font-weight:600;color:var(--muted);
  letter-spacing:.4px;margin-bottom:6px;
}
.blog h2{font-size:34px;font-weight:700;letter-spacing:-1px;margin-bottom:6px}
.blog-sub{color:var(--muted);font-size:15px;margin-bottom:22px}

.filters{display:flex;gap:8px;overflow-x:auto;padding-bottom:14px;margin-bottom:8px;scrollbar-width:none}
.filters::-webkit-scrollbar{display:none}
.chip{display:inline-flex;align-items:center;
  border:1px solid #CFD9DE;border-radius:var(--radius);
  padding:8px 17px;font-size:14px;font-weight:600;white-space:nowrap;
  transition:.18s ease;
}
.chip:hover{background:var(--line)}
.chip[aria-pressed="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}

.posts{display:grid;gap:28px}
@media(min-width:760px){.posts{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1040px){.posts{grid-template-columns:repeat(3,1fr)}}

.post{display:flex;flex-direction:column}
.post-body{padding:0}

.empty{
  color:var(--muted);font-size:15px;
  padding:34px 0;text-align:center;
}

.more-wrap{display:flex;justify-content:flex-end;margin-top:22px}
.more{
  display:inline-flex;align-items:center;gap:6px;
  border:1px solid #CFD9DE;border-radius:var(--radius);
  padding:8px 18px;font-size:14px;font-weight:600;
  color:var(--muted);
  transition:.18s ease;
}
.more svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.more:hover{border-color:var(--ink);color:var(--ink)}

/* البديل الظاهر قبل تحميل تضمين X */
/* يظهر فقط إذا تعذّر تحميل تضمين X — يحفظ الصفحة من الانهيار */
.twitter-tweet:not(.twitter-tweet-rendered){
  border:1px solid #E4E9EC!important;border-radius:14px;
  padding:16px!important;margin:0!important;
  font-size:15px;line-height:1.7;
}
.twitter-tweet:not(.twitter-tweet-rendered) a{
  color:var(--muted);font-size:13px;font-weight:600;display:inline-block;margin-top:10px;
}

/* ---------- التذييل ---------- */
.footer{
  margin-top:46px;border-top:1px solid var(--line);
  padding:34px var(--pad) 44px;
}
.socials{display:flex;justify-content:center;gap:12px}
.socials a{
  width:46px;height:46px;border:1px solid #CFD9DE;border-radius:50%;
  display:grid;place-items:center;transition:.18s ease;
}
.socials svg{width:19px;height:19px}
.socials a:hover{background:var(--ink);color:#fff;border-color:var(--ink)}

/* ---------- القائمة والبحث ---------- */
.panel{
  position:fixed;inset:0;z-index:80;
  background:var(--paper);
  padding:14px var(--pad);
  transform:translateY(-100%);
  transition:transform .32s cubic-bezier(.4,0,.2,1);
  overflow-y:auto;
}
.panel[data-open="true"]{transform:translateY(0)}
.panel-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px}
.nav-list{display:flex;flex-direction:column;gap:2px}
.nav-list a{
  font-size:26px;font-weight:700;letter-spacing:-.7px;
  padding:12px 0;border-bottom:1px solid var(--line);
}

@media(prefers-reduced-motion:reduce){
  *{transition-duration:.01ms!important;animation-duration:.01ms!important}
}

/* ---------- صفحة المدونة الكاملة ---------- */
.page-head{padding:44px var(--pad) 0;max-width:1100px;margin-inline:auto}
.page-head h1{font-size:clamp(30px,8vw,40px);font-weight:700;letter-spacing:-1.2px;margin-bottom:6px}
.back{
  display:inline-flex;align-items:center;gap:6px;
  color:var(--muted);font-size:14px;font-weight:600;margin-bottom:18px;
  transition:.18s ease;
}
.back:hover{color:var(--ink)}
.back svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.count{color:var(--muted);font-size:14px;margin-bottom:20px}

/* ---------- رسائل النظام ---------- */
.flash{
  margin:0;padding:13px var(--pad);font-size:14px;font-weight:600;text-align:center;
}
.flash-ok{background:#E8F5EC;color:#136B33}
.flash-err{background:#FDECEC;color:#8A1C1C}

/* ---------- رأس الصفحات الداخلية ---------- */
.page-head{padding:40px var(--pad) 0;max-width:1100px;margin-inline:auto}
.page-head h1{font-size:clamp(28px,7.5vw,38px);font-weight:700;letter-spacing:-1.1px;margin-bottom:6px}
.back{
  display:inline-flex;align-items:center;gap:6px;
  color:var(--muted);font-size:14px;font-weight:600;margin-bottom:16px;transition:.18s ease;
}
.back:hover{color:var(--ink)}
.back svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.count{color:var(--muted);font-size:14px;margin-bottom:18px}

/* ---------- بطاقات الإعلانات ---------- */
.cards{display:grid;gap:16px;padding:24px var(--pad) 0;max-width:1100px;margin-inline:auto}
@media(min-width:720px){.cards{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1040px){.cards{grid-template-columns:repeat(3,1fr)}}

.card{
  border:1px solid #E4E9EC;border-radius:18px;overflow:hidden;background:#fff;
  display:flex;flex-direction:column;transition:.2s ease;
}
.card:hover{border-color:#C9D2D8;transform:translateY(-2px)}
.card-img{width:100%;height:180px;object-fit:cover;background:var(--line)}
.card-img.placeholder{display:grid;place-items:center;color:var(--muted);font-size:13px}
.card-body{padding:14px 16px 18px;display:flex;flex-direction:column;gap:7px;flex:1}
.card h3{font-size:17px;font-weight:700;letter-spacing:-.3px;line-height:1.4}
.card-meta{color:var(--muted);font-size:13.5px;display:flex;flex-wrap:wrap;gap:4px 12px}
.card-price{font-size:17px;font-weight:700;margin-top:auto;padding-top:6px}

.badge{
  align-self:flex-start;border-radius:var(--radius);
  padding:4px 12px;font-size:12px;font-weight:700;
  background:var(--ink);color:#fff;
}
.badge-auction{background:#8A5A00}
.badge-business{background:#1B5E8A}
.badge-inquiry{background:#4A4A4A}

/* ---------- تفاصيل الإعلان ---------- */
.detail{max-width:820px;margin-inline:auto;padding:0 var(--pad) 20px}
.detail-img{width:100%;border-radius:18px;margin-bottom:22px;max-height:420px;object-fit:cover}
.facts{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:1px;background:#E4E9EC;border:1px solid #E4E9EC;border-radius:16px;overflow:hidden;margin:20px 0;
}
.fact{background:#fff;padding:15px 16px}
.fact dt{color:var(--muted);font-size:12.5px;margin-bottom:3px}
.fact dd{font-size:16px;font-weight:700}
.detail p.desc{font-size:16px;line-height:1.85;white-space:pre-line;margin-bottom:24px}

/* ---------- النماذج ---------- */
.form{max-width:640px;margin-inline:auto;padding:0 var(--pad) 40px}
.field{margin-bottom:16px}
.field label{display:block;font-size:14px;font-weight:600;margin-bottom:7px}
.field .req{color:#B42318}
.field input,.field select,.field textarea{
  width:100%;font:inherit;font-size:16px;
  border:1px solid #CFD9DE;border-radius:14px;
  padding:13px 16px;background:#fff;color:var(--ink);
}
.field textarea{min-height:130px;resize:vertical;line-height:1.7}
.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:var(--ink)}
.field .hint{color:var(--muted);font-size:12.5px;margin-top:6px}
.row{display:grid;gap:16px}
@media(min-width:600px){.row-2{grid-template-columns:1fr 1fr}}
.btn{
  background:var(--ink);color:#fff;border-radius:var(--radius);
  padding:15px 34px;font-size:16px;font-weight:700;
  display:inline-block;transition:.18s ease;
}
.btn:hover{opacity:.88}
.btn-ghost{background:none;color:var(--ink);border:1px solid #CFD9DE}
.btn-ghost:hover{border-color:var(--ink);opacity:1}
.btn-sm{padding:8px 18px;font-size:14px}
.btn-danger{background:#B42318;color:#fff}
.notice{
  background:var(--line);border-radius:14px;padding:14px 16px;
  font-size:14px;color:var(--muted);line-height:1.7;margin-bottom:22px;
}
.err-list{background:#FDECEC;color:#8A1C1C;border-radius:14px;padding:14px 18px;margin-bottom:20px;font-size:14px}
.err-list li{margin-inline-start:18px;margin-bottom:4px}

/* ---------- لوحة التحكم ---------- */
.admin-bar{
  background:var(--ink);color:#fff;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px var(--pad);position:sticky;top:0;z-index:60;
}
.admin-bar a{font-size:14px;font-weight:600;opacity:.85}
.admin-bar a:hover,.admin-bar a.on{opacity:1}
.admin-nav{display:flex;gap:16px;overflow-x:auto;scrollbar-width:none}
.admin-nav::-webkit-scrollbar{display:none}
.wrap{max-width:1100px;margin-inline:auto;padding:28px var(--pad) 60px}
.wrap h1{font-size:27px;font-weight:700;letter-spacing:-.8px;margin-bottom:20px}

.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-bottom:32px}
.stat{border:1px solid #E4E9EC;border-radius:16px;padding:18px}
.stat b{display:block;font-size:30px;font-weight:700;letter-spacing:-1px;line-height:1.2}
.stat span{color:var(--muted);font-size:13px}

.table-wrap{overflow-x:auto;border:1px solid #E4E9EC;border-radius:16px}
table{width:100%;border-collapse:collapse;font-size:14.5px;min-width:640px}
th,td{padding:13px 14px;text-align:right;border-bottom:1px solid var(--line);vertical-align:middle}
th{background:#FAFBFB;font-weight:700;font-size:13px;color:var(--muted);white-space:nowrap}
tr:last-child td{border-bottom:0}
.pill-status{border-radius:var(--radius);padding:3px 11px;font-size:12px;font-weight:700;white-space:nowrap}
.st-pending{background:#FFF4E0;color:#8A5A00}
.st-approved{background:#E8F5EC;color:#136B33}
.st-rejected{background:#FDECEC;color:#8A1C1C}
.actions{display:flex;gap:6px;flex-wrap:wrap}
.login-box{max-width:380px;margin:70px auto;padding:0 var(--pad)}
.login-box h1{font-size:26px;margin-bottom:6px}
.login-box p{color:var(--muted);font-size:14px;margin-bottom:24px}
.foot-line{text-align:center;color:var(--muted);font-size:13px;margin-top:22px}

/* ---------- شاشة تأكيد الإرسال ---------- */
.done{
  border:1px solid #E4E9EC;border-radius:20px;padding:32px 26px;text-align:center;
}
.done h2{font-size:23px;font-weight:700;letter-spacing:-.6px;margin-bottom:10px}
.done p{color:var(--muted);font-size:15px;line-height:1.8}
.done > div{justify-content:center}

/* ---------- اختيار مواضيع التدوينة ---------- */
.checks{display:flex;flex-wrap:wrap;gap:8px}
.check{
  display:inline-flex;align-items:center;gap:7px;
  border:1px solid #CFD9DE;border-radius:var(--radius);
  padding:8px 15px;font-size:14px;font-weight:600;cursor:pointer;
  transition:.15s ease;user-select:none;
}
.check:hover{border-color:var(--ink)}
.check input{width:16px;height:16px;accent-color:var(--ink);margin:0;cursor:pointer}
.check:has(input:checked){background:var(--ink);color:#fff;border-color:var(--ink)}

/* ---------- مفتاح التبديل بين عرض أرض وطلب أرض ---------- */
.switch{
  display:inline-flex;border:1px solid #CFD9DE;border-radius:var(--radius);
  padding:4px;gap:4px;margin-top:14px;
}
.switch a{
  border-radius:var(--radius);padding:9px 20px;
  font-size:14.5px;font-weight:700;color:var(--muted);
  transition:.16s ease;white-space:nowrap;
}
.switch a:hover{color:var(--ink)}
.switch a[aria-pressed="true"]{background:var(--ink);color:#fff}

/* ---------- شارة الطلبات ---------- */
.badge-req{background:#7A4B00}

/* ---------- صفحة «من أنا» للزوار ---------- */
.about-content{font-size:17px;line-height:1.95}
.about-content p{margin:0 0 18px}
.about-content h2{font-size:24px;font-weight:700;letter-spacing:-.7px;margin:30px 0 12px}
.about-content h3{font-size:19px;font-weight:700;letter-spacing:-.4px;margin:24px 0 10px}
.about-content ul,.about-content ol{margin:0 0 18px;padding-inline-start:22px}
.about-content li{margin-bottom:7px}
.about-content blockquote{
  margin:0 0 18px;padding-inline-start:16px;
  border-inline-start:3px solid var(--line);color:var(--muted);
}
.about-content a{text-decoration:underline;font-weight:600}
.about-content img{
  width:100%;height:auto;display:block;
  margin:26px 0;border:0;border-radius:0;
}
.about-content > *:last-child{margin-bottom:0}

/* ---------- محرّر صفحة «من أنا» ---------- */
.editor{border:1px solid #CFD9DE;border-radius:16px;overflow:hidden;background:#fff;max-width:820px}
.editor-bar{
  display:flex;flex-wrap:wrap;align-items:center;gap:5px;
  padding:8px 10px;border-bottom:1px solid var(--line);background:#FAFBFB;
}
.editor-bar button{
  border:1px solid transparent;border-radius:9px;
  padding:6px 11px;font-size:13.5px;font-weight:600;color:var(--ink);
  cursor:pointer;transition:.14s ease;line-height:1.4;
}
.editor-bar button:hover{background:#fff;border-color:#CFD9DE}
.editor-bar .sep{width:1px;height:20px;background:#DDE4E8;margin:0 3px}
.editor-area{
  min-height:340px;padding:20px 22px;
  font-size:16.5px;line-height:1.9;outline:none;
}
.editor-area:empty::before{content:attr(data-placeholder);color:#9AA6AE}
.editor-area p{margin:0 0 16px}
.editor-area h2{font-size:23px;font-weight:700;margin:22px 0 10px}
.editor-area h3{font-size:18px;font-weight:700;margin:18px 0 8px}
.editor-area ul,.editor-area ol{margin:0 0 16px;padding-inline-start:22px}
.editor-area img{width:100%;height:auto;display:block;margin:18px 0;border-radius:8px}
.editor-area:focus{outline:none}
.editor:focus-within{border-color:var(--ink)}

/* ---------- أقسام الإحصائيات ---------- */
h2.sec{
  font-size:15px;font-weight:700;color:var(--muted);
  letter-spacing:.2px;margin:34px 0 14px;
}
h2.sec:first-of-type{margin-top:6px}
.stat .trend{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.6}
.trend .up{color:#136B33;font-weight:700}
.trend .down{color:#B42318;font-weight:700}
.trend .flat{color:var(--muted);font-weight:700}

/* مخطط أعمدة الزيارات */
.chart{
  display:flex;align-items:flex-end;gap:6px;height:130px;
  border:1px solid #E4E9EC;border-radius:16px;padding:14px 14px 8px;background:#fff;
}
.chart .bar{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:100%}
.chart .bar span{
  width:100%;background:var(--ink);border-radius:5px 5px 0 0;
  min-height:4px;display:block;transition:.2s;
}
.chart .bar em{font-style:normal;font-size:11px;color:var(--muted);margin-top:6px}

/* أعمدة توزيع الأقسام */
.dual{display:flex;flex-direction:column;gap:4px}
.dual span{height:9px;border-radius:5px;display:block;min-width:2px}
.dual .o{background:var(--ink)}
.dual .r{background:#7A4B00}
.legend{color:var(--muted);font-size:13px;margin-top:12px;line-height:1.8}
.legend i{display:inline-block;width:11px;height:11px;border-radius:3px;vertical-align:-1px}
.legend i.o{background:var(--ink)}
.legend i.r{background:#7A4B00}

/* ---------- أزرار تثبيت التدوينات ---------- */
.pins{display:flex;flex-wrap:wrap;gap:5px}
.pins form{display:inline}
.pin{
  display:inline-flex;align-items:center;gap:5px;
  border:1px solid #CFD9DE;border-radius:999px;
  padding:5px 12px;font-size:12.5px;font-weight:600;
  color:var(--muted);cursor:pointer;transition:.15s ease;
}
.pin span{opacity:.3;font-size:11px;line-height:1}
.pin:hover{border-color:var(--ink);color:var(--ink)}
.pin:hover span{opacity:.7}
.pin.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.pin.on span{opacity:1}
.pinned-tag{
  display:inline-block;background:var(--line);border-radius:999px;
  padding:3px 11px;font-size:12.5px;font-weight:600;color:var(--ink);margin-inline-end:6px;
}

/* ---------- علامة التدوينة المثبّتة ---------- */
.post-pin{
  display:flex;align-items:center;gap:5px;
  padding:0 2px 8px;
  font-size:12px;font-weight:700;color:var(--muted);
  letter-spacing:.2px;
}
.post-pin svg{width:13px;height:13px;fill:currentColor}

/* ---------- حقل رقم ترخيص الإعلان في اللوحة ---------- */
.lic{display:flex;gap:5px;align-items:center;margin-bottom:5px}
.lic input{
  width:105px;font:inherit;font-size:13px;
  border:1px solid #CFD9DE;border-radius:9px;padding:6px 9px;
}
.lic input:focus{outline:none;border-color:var(--ink)}

/* ---------- معرض صور الإعلان ---------- */
.shots{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:10px;margin:-8px 0 22px;
}
.shots img{
  width:100%;height:130px;object-fit:cover;
  border-radius:14px;display:block;transition:.18s ease;
}
.shots a:hover img{opacity:.88}
