:root {
  --sand: #f4efec;
  --page: #ffffff;
  --ink: #251f21;
  --ink2: #585254;
  --hairline: #eae9ea;
  --teal: #73a89a;
  --teal-dark: #5c8f81;
  --red: #ed313e;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--sand);
  color: var(--ink);
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
a { color: var(--teal-dark); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 60px; }

.site-header {
  background: var(--page);
  border-bottom: 1px solid var(--hairline);
  padding: 20px 0 14px;
  margin-bottom: 24px;
}
.site-header .wrap { padding-bottom: 0; }
.site-title { font-size: 26px; font-weight: 800; margin: 0; }
.site-sub { color: var(--ink2); margin: 4px 0 0; font-size: 14px; }
.header-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border-radius: 6px; border: 1px solid var(--teal);
  background: var(--teal); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn.secondary:hover { border-color: var(--ink2); background: transparent; }

.card {
  background: var(--page);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.search-box { width: 100%; margin-bottom: 16px; }
.search-box input {
  width: 100%; min-height: 46px; padding: 0 14px;
  border: 1px solid var(--hairline); border-radius: 8px;
  font-family: inherit; font-size: 15px;
}

.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.cat-chip {
  border: 1px solid var(--hairline); background: var(--page);
  border-radius: 999px; padding: 6px 14px;
  font-family: inherit; font-size: 13px; cursor: pointer; color: var(--ink);
}
.cat-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.listing .cat { color: var(--ink2); font-size: 12px; }
.listing .name { font-weight: 800; font-size: 17px; margin: 2px 0 4px; }
.listing .desc { color: var(--ink2); margin-bottom: 8px; }
.listing .meta { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; margin-bottom: 4px; }
.listing .meta .area { color: var(--ink2); font-weight: 400; }
.listing .hours { color: var(--ink2); font-size: 13px; margin-bottom: 10px; }

.empty { color: var(--ink2); text-align: center; padding: 40px 0; }

form .field { margin-bottom: 16px; }
form label { display: block; font-weight: 700; margin-bottom: 4px; }
form .hint { color: var(--ink2); font-size: 12px; font-weight: 400; }
form input, form select, form textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--hairline); border-radius: 8px;
  font-family: inherit; font-size: 15px; background: #fff;
}
form textarea { min-height: 90px; resize: vertical; }

.note {
  background: var(--sand);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}
.note strong { display: block; margin-bottom: 4px; }

.success {
  background: var(--page); border: 1px solid var(--teal);
  border-radius: 12px; padding: 24px; text-align: center;
}
.success h2 { color: var(--teal-dark); margin: 0 0 8px; }
.error-text { color: var(--red); font-size: 14px; margin-top: 8px; }

footer { color: var(--ink2); font-size: 12px; text-align: center; padding: 30px 0 0; }

/* صور الإعلانات */
.photo-preview {
  display: block;
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  margin-top: 8px;
}
.listing-photo {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}
input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px dashed #b7b7b7;
  border-radius: 8px;
  background: #fff;
}

.install-box { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--hairline); border-radius:8px; padding:10px 12px; margin-bottom:14px; font-size:14px; }
.install-box[hidden], #install-btn[hidden] { display:none; }
.install-box span { flex:1; }
.install-close { background:none; border:0; font-size:22px; line-height:1; color:var(--ink2); cursor:pointer; min-width:32px; min-height:44px; }
.note.offer { background: #fff; border: 1px solid var(--teal); }
.note.offer span { display: block; color: var(--ink2); }

.site-title .logo { width: 44px; height: 44px; vertical-align: middle; margin-inline-end: 10px; margin-top: -6px; }

.search-box select { width: 100%; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 12px; font: inherit; background: #fff; margin-bottom: 10px; }
.listing.featured { border: 2px solid #f2c14e; }
.badge { display: inline-block; background: #f2c14e; color: #3b2f00; font-weight: 800; font-size: 13px; padding: 2px 10px; border-radius: 99px; margin-bottom: 6px; }
.stars { color: #e0a800; letter-spacing: 1px; }
.reviews { margin: 8px 0; font-size: 14px; }
.reviews summary { cursor: pointer; }
.review { padding: 6px 0; border-top: 1px solid #eee; margin-top: 6px; }
.link-rate { display: inline-block; margin: 6px 0 10px; font-size: 14px; color: #3d6b5e; }
.star-input { display: flex; gap: 6px; justify-content: flex-end; }
.star-input button { font-size: 36px; background: none; border: 0; color: #ccc; cursor: pointer; padding: 0 2px; }
.star-input button.on { color: #e0a800; }

.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; }
.check input { width: auto; margin-top: 6px; }
.link-rate { margin-inline-end: 12px; }

.site-links { text-align: center; margin: 14px 0 28px; font-size: 14px; color: var(--ink2); }
.site-links a { color: var(--ink2); }
.prose h2 { font-size: 18px; margin: 18px 0 6px; }
.prose li { margin-bottom: 10px; line-height: 1.8; }
.prose p { line-height: 1.8; }

/* ---- تحديث الشكل ---- */
:root { --yellow: #f2c14e; --deep: #3d6b5e; }
body { font-size: 16px; }
.wrap { padding-bottom: 70px; }
.site-header.hero { position: relative; overflow: hidden; background: linear-gradient(180deg,#2f5a4e 0%,#3d6b5e 55%,#5c8f81 100%); border: 0; padding: 22px 0 120px; margin-bottom: 20px; color: #fff; }
.hero-art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 120px; }
.hero-in { position: relative; z-index: 1; padding-bottom: 0; }
.hero-top { display: flex; justify-content: space-between; align-items: center; }
.hero .site-title { color: #fff; font-size: 24px; }
.tagline { font-size: 22px; font-weight: 800; margin: 10px 0 2px; color: var(--yellow); }
.hero .site-sub { color: #e6f1ee; font-size: 14px; }
.hero .btn.secondary { color: #fff; border-color: rgba(255,255,255,.6); }
.hero .btn.secondary:hover { border-color: #fff; }
.btn.accent { background: var(--yellow); border-color: var(--yellow); color: #3b2f00; }
.btn.accent:hover { background: #e5b13a; border-color: #e5b13a; }
.dark-btn { background: rgba(255,255,255,.15); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.stats { display: flex; gap: 10px; margin-bottom: 16px; }
.stats[hidden] { display: none; }
.stats div { flex: 1; background: var(--page); border: 1px solid var(--hairline); border-radius: 12px; text-align: center; padding: 8px; }
.stats b { display: block; font-size: 22px; color: var(--deep); }
.stats span { font-size: 13px; color: var(--ink2); }
.cats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat-chip { white-space: nowrap; padding: 8px 14px; font-size: 14px; min-height: 40px; }
.cat-chip.active { background: var(--deep); border-color: var(--deep); }
.card.listing { padding: 0; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.card.listing > :not(.listing-photo):not(.listing-ph) { margin-inline: 16px; }
.card.listing > .btn { display: flex; margin: 8px 16px 16px; }
.listing-photo { max-height: 200px; height: 200px; border-radius: 0; margin-bottom: 12px; }
.listing-ph { height: 110px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; font-size: 48px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -2px; }
.badge.ok { background: #d9efe8; color: #1f5a49; }
.listing .name { font-size: 18px; }
.listing .meta { color: var(--deep); }
.listing.featured { border: 2px solid var(--yellow); }
html[data-theme="dark"] { --sand:#14201d; --page:#1d2c28; --ink:#eef3f1; --ink2:#a9bab5; --hairline:#2f433d; }
html[data-theme="dark"] .search-box input, html[data-theme="dark"] .search-box select, html[data-theme="dark"] form input, html[data-theme="dark"] form select, html[data-theme="dark"] form textarea, html[data-theme="dark"] .install-box { background: var(--page); color: var(--ink); }
html[data-theme="dark"] a { color: #8fc7b8; }
html[data-theme="dark"] .btn { color: #fff; }
html[data-theme="dark"] .btn.accent { color: #3b2f00; }
html[data-theme="dark"] .note.offer, html[data-theme="dark"] .note { background: var(--page); }
html[data-theme="dark"] .badge.ok { background: #24493f; color: #bfe8dc; }
html[data-theme="dark"] .cat-chip.active { background: var(--teal-dark); border-color: var(--teal-dark); color:#fff; }
html[data-theme="dark"] .stats b { color: #8fc7b8; }
html[data-theme="dark"] .listing .meta { color: #8fc7b8; }

.photo-previews { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.photo-previews img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.gallery-wrap { position: relative; margin-bottom: 12px; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery .listing-photo { flex: 0 0 100%; width: 100%; height: 220px; max-height: 220px; object-fit: cover; scroll-snap-align: center; margin: 0; border-radius: 0; }
.gcount { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 2px 10px; border-radius: 99px; }
.card.listing > .gallery-wrap { margin-inline: 0; }

.maplink { display: inline-block; margin: 2px 0 8px; font-weight: 700; font-size: 14px; color: var(--deep); text-decoration: none; border: 1px solid var(--hairline); border-radius: 99px; padding: 6px 14px; }
html[data-theme="dark"] .maplink { color: #8fc7b8; }
.card.listing > .cat:first-child { margin-top: 14px; }

.card.listing > .btn.wa { background: #1f9d55; border-color: #1f9d55; margin-top: 0; }
.card.listing > .btn.wa:hover { background: #17803f; border-color: #17803f; }
.card.listing > .btn:has(+ .btn.wa) { margin-bottom: 8px; }

.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; overflow: visible; flex-wrap: unset; }
.cat-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 84px; padding: 10px 6px; background: var(--page); border: 1px solid var(--hairline); border-radius: 14px; font-family: inherit; color: var(--ink); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.cat-tile .ic { font-size: 28px; line-height: 1; }
.cat-tile .tx { font-size: 13px; font-weight: 700; line-height: 1.3; text-align: center; }
.cat-tile.active { background: var(--deep); border-color: var(--deep); color: #fff; }
@media (min-width: 560px) { .cats { grid-template-columns: repeat(5, 1fr); } }
html[data-theme="dark"] .cat-tile.active { background: var(--teal-dark); border-color: var(--teal-dark); }

a.cat-tile { text-decoration: none; }

.lang-btn { background: rgba(0,0,0,.06); border: 1px solid var(--hairline); color: var(--ink); min-width: 44px; height: 44px; border-radius: 22px; padding: 0 14px; font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.lang-btn.in-hero { background: rgba(255,255,255,.15); border: 0; color: #fff; margin-inline-start: auto; margin-inline-end: 8px; }
.site-header:not(.hero) .wrap { position: relative; }
.site-header:not(.hero) .lang-btn { position: absolute; top: -6px; inset-inline-end: 16px; height: 36px; min-width: 40px; }
html[dir="ltr"] .star-input { justify-content: flex-start; }
html[dir="ltr"] .gcount { left: auto; right: 8px; }

select.lang-btn { appearance: auto; -webkit-appearance: menulist; padding: 0 8px; }
.lang-btn option { color: #251f21; background: #fff; }
.copyright { text-align: center; color: var(--ink2); font-size: 12px; margin: 6px 0 24px; }
select.lang-btn { min-width: 104px; max-width: 130px; } .lang-btn.in-hero { min-width: 104px; }
.notice{background:#fff7e0;border:1px solid #f2c14e;border-radius:10px;padding:10px 12px;font-size:14px;line-height:1.6;margin:8px 0 14px}[data-theme=dark] .notice{background:#3a3220;color:#f3e6c0}

.cat-tile{position:relative}.cat-tile .cnt{position:absolute;top:6px;inset-inline-end:8px;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--deep);color:#fff;font-size:12px;font-weight:800;line-height:22px;text-align:center}.cat-tile.active .cnt{background:#f2c14e;color:#251f21}.cat-chip .cnt-inline{margin-inline-start:6px;opacity:.75;font-weight:800}
.cat-intro{margin:0 0 12px}.cat-intro a{font-weight:700}

.rt-badge{font-size:14px;font-weight:800;margin:2px 0 6px}
.site-rating{margin:18px 0;padding:14px;border-radius:14px;background:var(--card,#fff);border:1px solid #e6e6e6;text-align:center}
.site-rating .sr-top{font-size:18px;margin-bottom:8px}
.site-rating .review{text-align:start}
.site-rating .btn{margin-top:10px}

.photo-previews .pv{position:relative;width:64px;height:64px;border-radius:8px;overflow:hidden}
.photo-previews .pv img{transition:transform .15s}
.rot-btn{position:absolute;bottom:2px;inset-inline-end:2px;width:26px;height:26px;border:0;border-radius:50%;background:rgba(0,0,0,.65);color:#fff;font-size:17px;line-height:26px;padding:0;cursor:pointer}

.visit-counter{text-align:center;margin:18px 0 6px;font-size:15px;color:#555}.visit-counter b{font-size:18px;color:var(--deep,#3d6b5e)}

.packs{margin-top:8px;font-size:14px}.packs summary{cursor:pointer;font-weight:800}.packs .pk-h{margin:8px 0 2px;font-weight:700;opacity:.8}.packs ul{margin:0;padding-inline-start:18px}

/* عروض */
.offers{margin:14px 0 6px}
.offers-head{display:flex;align-items:baseline;gap:8px;margin-bottom:8px;flex-wrap:wrap}
.offers-head strong{font-size:17px;color:var(--deep,#3d6b5e)}
.offers-head span{font-size:12px;color:var(--ink2,#6b6b6b)}
.offers-row{display:flex;gap:10px;overflow-x:auto;padding-bottom:6px}
.offer-card{flex:0 0 auto;min-width:170px;max-width:230px;background:#fff;border:1px solid #f2c14e;border-radius:14px;padding:10px 12px;text-decoration:none;color:inherit;display:block;box-shadow:0 2px 8px rgba(0,0,0,.05)}
.offer-tag{display:inline-block;background:#ffe9b8;color:#6b4a00;font-weight:800;font-size:12px;padding:2px 8px;border-radius:99px;margin-bottom:6px}
.offer-name{display:block;font-weight:800;font-size:15px;margin-bottom:2px}
.offer-meta{display:block;font-size:12px;color:var(--ink2,#6b6b6b)}
.badge.warn{background:#fde2c8;color:#8a4b00}
.badge.week{background:#e4e7ff;color:#333a7a}
html[data-theme="dark"] .badge.week{background:#2b3160;color:#cfd4ff}
.badge.offer{background:#ffe9b8;color:#6b4a00}
a.name{color:inherit;text-decoration:none;display:block}
a.name:hover{text-decoration:underline}
.share-btn{margin-top:8px}
/* صفحة المعلن */
.adv-head{padding:16px}
.adv-name{font-size:22px;font-weight:800;margin:4px 0}
.adv-meta{color:var(--ink2,#6b6b6b);margin-bottom:8px}
.adv-rating{margin-bottom:10px}
.adv-h{font-size:17px;margin:18px 0 8px}
.card.review{padding:12px 14px;margin-bottom:8px}

/* لوجو المعلن */
.name-row{display:flex;align-items:center;gap:8px;margin:2px 0 4px}
.name-row .name{margin:0}
.ad-logo{width:34px;height:34px;border-radius:50%;object-fit:cover;border:1px solid #e7e2de;background:#fff;flex:0 0 auto}
.ad-logo.big{width:56px;height:56px;display:inline-block;vertical-align:middle;margin-inline-end:10px}
.logo-prev{width:64px;height:64px;border-radius:50%;object-fit:cover;border:1px solid #e7e2de}
.adv-own{margin-top:10px;font-size:13px}.adv-own a{color:var(--ink2,#6b6b6b)}

/* كارت المشاركة في صفحة بعت حاجتك */
.share-card{padding:16px;margin:14px 0}
.share-card h3{margin:0 0 10px;font-size:17px}
.share-card .btn{width:100%;margin-top:10px;text-align:center}
#card-canvas{box-shadow:0 4px 18px rgba(0,0,0,.12)}

/* صفحة إدارة إعلان المعلن */
.m-title{margin:6px 0 12px;font-size:22px;line-height:1.35}
.m-row{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #eef3f1;font-size:15px}
.m-row span{color:#6b7f78}
.m-status{margin:14px 0;padding:12px 14px;border-radius:12px;font-size:15px;line-height:1.6}
.m-status.is-open{background:#e8f5ee;color:#1f6b4a}
.m-status.is-closed{background:#fdecec;color:#a33}
.m-actions{display:flex;gap:10px;flex-wrap:wrap}
.m-actions .btn{flex:1 1 140px;text-align:center}

/* زرار الصورة بالعربي بدل النص الإنجليزي بتاع المتصفح */
.field input.file-hidden,.file-hidden{position:absolute;width:1px;height:1px;padding:0;border:0;margin:0;opacity:0;overflow:hidden;pointer-events:none;left:0;top:0}
.file-btn{display:inline-block;padding:12px 18px;border:1.5px dashed #9dbfb4;border-radius:12px;background:#f6faf8;color:#2f6b58;font-weight:700;cursor:pointer;text-align:center;width:100%;box-sizing:border-box}
.file-btn:hover{background:#eef6f2}

/* صفحات العيادات */
.clinic-card{margin-bottom:14px}
.clinic-name{margin:0 0 8px;font-size:20px}
.clinic-meta{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.chip{background:#eef6f2;color:#2f6b58;border-radius:999px;padding:4px 10px;font-size:13px;font-weight:700}
.clinic-addr{margin:0 0 12px;color:#5f7770;font-size:14px;line-height:1.6}
.clinic-actions{display:flex;gap:10px;flex-wrap:wrap}
.clinic-actions .btn{flex:1 1 140px;text-align:center}
.day-tabs{display:flex;gap:8px;overflow-x:auto;padding:4px 0 10px;-webkit-overflow-scrolling:touch}
.day-tab{flex:0 0 auto;border:1.5px solid #d8e3df;background:#fff;color:#2f6b58;border-radius:999px;padding:8px 14px;font-family:inherit;font-size:13px;font-weight:700;cursor:pointer}
.day-tab.active{background:#5c8f81;border-color:#5c8f81;color:#fff}
.slot-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px}
.slot{border:1.5px solid #cfe2da;background:#f7fbf9;color:#22604c;border-radius:12px;padding:10px 6px;font-family:inherit;font-size:14px;font-weight:700;cursor:pointer}
.slot.active{background:#5c8f81;border-color:#5c8f81;color:#fff}
.booking-form{margin-top:14px}
.queue-num{font-size:64px;font-weight:800;color:#2f6b58;line-height:1;margin:6px 0 4px}
.hour-grid{display:flex;flex-direction:column;gap:8px}
.hour-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.hour-row .check{margin:0;min-width:92px}
.hour-row select{width:auto;flex:1 1 96px;padding:8px;border:1px solid #d8e3df;border-radius:10px;font-family:inherit;font-size:14px}
.h-dash{color:#8aa39a}
.ca-h2{font-size:18px;margin:18px 0 10px}
.day-block{padding:12px 0;border-bottom:1px solid #eef3f1}
.day-block:last-child{border-bottom:0}
.day-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.day-head .day-toggle{margin-inline-start:auto;padding:6px 12px;font-size:13px}
.bk-list{margin-top:8px;display:flex;flex-direction:column;gap:6px}
.bk-row{font-size:14px;color:#33564c;background:#f6faf8;border-radius:10px;padding:8px 10px}
.bk-n{color:#8aa39a;font-size:12px}

/* شريط العيادات جوه قسم عيادات */
.clinic-bar{display:flex;flex-direction:column;gap:8px;align-items:flex-start;background:#eef6f2;border:1px solid #cfe2da;border-radius:14px;padding:14px 16px;margin-bottom:14px}
.clinic-bar strong{font-size:16px;color:#22604c}
.clinic-bar span{font-size:14px;color:#4d6b62;line-height:1.6}
.clinic-bar .btn{padding:10px 16px;font-size:14px}

/* ehgiz brand */
.brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:inherit;margin-bottom:10px;direction:ltr}
.brand-mark{width:38px;height:38px;border-radius:12px;background:#fff;color:#2f6f5e;font:800 24px/38px Cairo,sans-serif;text-align:center;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.brand-name{font:800 26px Cairo,sans-serif;letter-spacing:.5px}
.brand-ar{font:700 15px Cairo,sans-serif;opacity:.85;border-inline-start:1px solid currentColor;padding-inline-start:10px}
.pin{vertical-align:-2px;margin-inline-end:3px}
.q-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid #eee}
.q-row .q-notify{padding:6px 14px;margin-inline-start:auto;font-size:14px}
.q-before{background:#f4e9c8}
