/* ═══════════ الألوان والأساسيات ═══════════ */
:root {
  --navy-950: #0b1630;
  --navy-900: #0f1d3d;
  --navy-800: #13244a;
  --navy-700: #1b3366;
  --navy-600: #24407c;
  --gold: #ecc04a;
  --gold-600: #d9a520;
  --gold-50: #fdf6e1;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #111827;
  --text-2: #374151;
  --muted: #5b6472;
  --border: #e4e7ee;
  --soft: #f1f3f8;
  --green: #16a34a;
  --green-600: #15803d;
  --green-50: #e9f8ef;
  --red: #e11d48;
  --red-50: #fff1f3;
  --amber: #f59e0b;
  --blue: #2563eb;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 10px rgba(15, 29, 61, 0.07);
  --shadow-lg: 0 12px 40px rgba(15, 29, 61, 0.18);
  --top-h: 64px;
  --nav-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.no-scroll { overflow: hidden; }
body.has-nav .view:not(.map-view) { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
.ic { flex-shrink: 0; vertical-align: middle; }
.ic.gold { color: var(--gold); }
.ic.green { color: var(--green); }
.ic.red { color: var(--red); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.grow { flex: 1 1 auto; }
.strong { font-weight: 700; }
.pre { white-space: pre-wrap; word-break: break-word; }
.ltr, .ltr-inline { direction: ltr; unicode-bidi: isolate; }
.ltr { text-align: right; }
.center-pad { padding: 40px 16px; text-align: center; display: grid; place-items: center; }
.hp { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); pointer-events: none; }

.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(19, 36, 74, 0.15); border-top-color: var(--navy-700);
  animation: spin 0.8s linear infinite;
}
.spinner.sm { width: 20px; height: 20px; border-width: 2.5px; border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot, .boot-error { min-height: 100vh; display: grid; place-items: center; gap: 14px; align-content: center; text-align: center; padding: 24px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 14px; }

/* ═══════════ الشريط العلوي ═══════════ */
.topbar {
  position: sticky; top: 0; z-index: 500;
  height: var(--top-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px;
  background: linear-gradient(90deg, var(--navy-900), var(--navy-700));
  color: #fff;
  box-shadow: 0 2px 14px rgba(11, 22, 48, 0.25);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(145deg, #f6d56b, var(--gold-600)); color: var(--navy-900);
  box-shadow: 0 2px 8px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.4);
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-weight: 700; font-size: 16.5px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.top-actions { display: flex; gap: 8px; }
.top-btn {
  height: 42px; min-width: 46px; padding: 0 10px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); color: #fff;
  position: relative; transition: background .15s;
}
.top-btn:hover { background: rgba(255,255,255,.13); }
.top-btn.call { background: rgba(22, 163, 74, .2); border-color: rgba(52, 211, 153, .45); color: #6ee7a8; }
.top-btn.wa { background: rgba(22, 163, 74, .2); border-color: rgba(52, 211, 153, .45); color: #6ee7a8; }
.top-btn.login { color: var(--gold); }
.top-btn .chev { opacity: .8; transition: transform .2s; }
.top-dot { position: absolute; top: 6px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--navy-800); }
.top-btn.open .chev { transform: rotate(180deg); }

/* ═══════════ صفحة القائمة ═══════════ */
.list-wrap { padding-top: 14px; }
.add-big {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 4px auto 14px; padding: 10px 26px 10px 12px; min-height: 64px;
  width: min(100%, 420px);
  border: 0; border-radius: 999px;
  background: linear-gradient(180deg, #f4cf5c, var(--gold-600));
  color: var(--navy-900); font-size: 18px; font-weight: 700;
  box-shadow: 0 8px 22px rgba(217, 165, 32, .35), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .12s;
}
.add-big:active { transform: scale(.98); }
a.add-big { color: var(--navy-900); }
.subs-banner {
  width: 100%; display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid #f3d98b;
  background: var(--gold-50); color: #7a5a06; font-weight: 500; text-align: right;
}
.subs-banner span { flex: 1; }
.add-plus { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-800); color: var(--gold); flex-shrink: 0; }
/* الشريط العلوي المضغوط: زر واحد + الأقسام مع زر الفلاتر */
.list-wrap > .add-big { width: 100%; margin: 2px 0 12px; min-height: 54px; padding: 6px 8px 6px 16px; justify-content: flex-start; gap: 10px; font-size: 16.5px; }
.list-wrap > .add-big .add-plus { width: 40px; height: 40px; }
.cat-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cat-bar .chips-row { flex: 1; min-width: 0; margin: 0; padding: 2px 2px 8px; }
.filters-btn {
  flex-shrink: 0; position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 42px; padding: 0 14px; margin-bottom: 6px; border-radius: 999px;
  border: 1.5px solid var(--navy-700); background: #fff; color: var(--navy-800); font-weight: 700; font-size: 14.5px;
}
.search.in-sheet { margin-bottom: 12px; }
.fav-row b { display: inline-flex; align-items: center; gap: 6px; }
.fav-row .ic { color: #ff4d6d; }
.office-loc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid #c9d8f3; background: #f4f8ff; margin-bottom: 14px; }
.office-loc > span:nth-child(2) { flex: 1; display: grid; }
.office-loc small { color: var(--muted); }
.ol-ic { width: 44px; height: 44px; border-radius: 13px; background: #fff; color: var(--red); display: grid; place-items: center; flex-shrink: 0; }
.offer-text { display: flex; flex-direction: column; text-align: right; line-height: 1.3; }
.offer-text b { font-size: 18px; }
.offer-text small { font-size: 13.5px; font-weight: 600; opacity: .75; }

.chips-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -14px; padding-inline: 14px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  height: 42px; padding: 0 13px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border); color: var(--text-2); font-weight: 600;
  box-shadow: var(--shadow);
}
.chip .ic { color: var(--c); }
.chip b { font-size: 12.5px; background: var(--soft); color: var(--muted); padding: 2px 9px; border-radius: 999px; }
.chip.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.chip.active .ic { color: var(--gold); }
.chip.active b { background: rgba(255,255,255,.18); color: #fff; }

.search-row { display: flex; gap: 8px; margin-bottom: 10px; }
.search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; color: var(--muted);
}
.search:focus-within { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(36,64,124,.1); }
.search input { flex: 1; width: 100%; border: 0; outline: 0; background: none; min-width: 0; color: var(--text); font-size: 15px; }
.square-btn, .pill-btn {
  height: 50px; min-width: 50px; border-radius: 16px; background: #fff; border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); font-weight: 600; position: relative;
}
.pill-btn { padding: 0 14px; }
.square-btn.on { color: var(--red); border-color: #fecdd3; background: var(--red-50); }
.square-btn.on .ic { fill: currentColor; }
.dot-badge { position: absolute; top: -5px; left: -5px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--gold-600); color: #fff; font-size: 12px; display: grid; place-items: center; padding: 0 5px; }

.select-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-bottom: 8px; }
.select {
  position: relative; display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; color: var(--muted);
}
.select select { appearance: none; -webkit-appearance: none; border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: var(--text); font-weight: 500; padding-left: 22px; }
.select .chev { position: absolute; left: 12px; pointer-events: none; }
.select.full { width: 100%; }

.results-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 2px 2px 10px; color: var(--muted); font-size: 13.5px; margin-bottom: 4px; }
.results-row b { color: var(--text); }
.link-btn { background: none; border: 0; padding: 4px 2px; color: var(--navy-600); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.link-btn.danger { color: var(--red); }
.outline-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text-2); font-weight: 600; font-size: 14px; }
.outline-pill.on { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

/* ═══════════ بطاقة العقار ═══════════ */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 680px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--card); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow); border: 1px solid #edf0f5; transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: 0 6px 24px rgba(15,29,61,.12); }
.card.selected { outline: 3px solid var(--red); }
.card.is-hidden .card-media img { filter: grayscale(.5) brightness(.9); }
.card-media { position: relative; aspect-ratio: 16 / 10.5; margin: 10px 10px 0; border-radius: 18px; overflow: hidden; background: #dde3ee; cursor: pointer; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.no-img { width: 100%; height: 100%; display: grid; place-items: center; color: var(--c); background: linear-gradient(135deg, #eef1f7, #dfe5f0); }
.media-badge {
  position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--navy-800);
  font-size: 13.5px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.media-badge.hidden-badge { top: 48px; background: rgba(17,24,39,.8); color: #fff; }
.media-fav {
  position: absolute; top: 10px; left: 10px; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(17,24,39,.38); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px);
}
.media-fav.on { color: #ff4d6d; background: #fff; }
.media-fav.on .ic, .fav-btn.on .ic { fill: currentColor; }
.status-badge { position: absolute; top: 58px; left: 10px; padding: 4px 12px; border-radius: 8px; color: #fff; font-weight: 700; font-size: 13px; }
.details .status-badge { position: static; }
.status-badge.s-reserved { background: var(--amber); }
.status-badge.s-sold { background: var(--red); }
.media-foot {
  position: absolute; inset: auto 0 0 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  padding: 30px 12px 10px; color: #fff; font-size: 14px; font-weight: 600;
  background: linear-gradient(transparent, rgba(0,0,0,.62));
}
.media-district { display: inline-flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-district .ic { color: var(--gold); }
.media-meta { display: flex; gap: 6px; flex-shrink: 0; }
.media-meta span { display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.45); padding: 3px 9px; border-radius: 999px; font-size: 12.5px; }
.select-check { position: absolute; bottom: 12px; left: 12px; width: 30px; height: 30px; border-radius: 9px; border: 2px solid #fff; background: rgba(0,0,0,.25); display: grid; place-items: center; color: #fff; }
.card.selected .select-check { background: var(--red); border-color: var(--red); }

.card-body { padding: 14px 16px 6px; cursor: pointer; flex: 1; }
.title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.title-row h3 { font-size: 18px; font-weight: 700; flex: 1; min-width: 0; line-height: 1.4; }
.num-badge { flex-shrink: 0; background: var(--gold-50); color: #a16207; border: 1px solid #f6e3a8; font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 8px; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.price { font-size: 24px; font-weight: 700; color: var(--navy-900); direction: ltr; unicode-bidi: isolate; letter-spacing: .3px; }
.price small { font-size: 16px; font-weight: 600; }
.price-row.big .price { font-size: 28px; }
.price-short { color: var(--muted); font-size: 13.5px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.stat { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: var(--soft); border: 1px solid #e8ebf2; font-weight: 600; font-size: 14px; color: var(--text-2); }
.stat .ic { color: var(--muted); }
.desc { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.card-actions { display: flex; align-items: center; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid #f0f2f6; margin-top: 6px; }
.card-actions .sep { width: 1px; height: 28px; background: var(--border); margin: 0 2px; }

/* ═══════════ الأزرار ═══════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 46px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; white-space: nowrap; transition: filter .15s, transform .1s, background .15s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { height: 42px; padding: 0 14px; font-size: 14.5px; border-radius: 13px; }
.btn.xs { height: 34px; padding: 0 10px; font-size: 13.5px; border-radius: 10px; }
.btn.lg { height: 54px; font-size: 16.5px; border-radius: 16px; }
.btn.block { width: 100%; }
.btn.primary, .btn.navy { background: linear-gradient(180deg, var(--navy-700), var(--navy-800)); color: #fff; }
.btn.primary:hover, .btn.navy:hover { filter: brightness(1.12); }
.btn.gold { background: linear-gradient(180deg, #f4cf5c, var(--gold-600)); color: var(--navy-900); }
.btn.light { background: #fff; border-color: var(--border); color: var(--text-2); }
.btn.light:hover { background: var(--soft); }
.btn.wa { background: var(--green-50); border-color: #bfe9cf; color: var(--green-600); }
.btn.wa:hover { background: #dbf4e5; }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger-text { color: var(--red); }
.btn.outline-green { background: #fff; border-color: #9fdcb7; color: var(--green-600); }
.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 13px; border: 1px solid transparent;
  display: inline-grid; place-items: center; background: transparent; color: var(--muted);
}
.icon-btn.sm { width: 36px; height: 36px; border-radius: 10px; }
.icon-btn.soft { background: var(--soft); color: var(--text-2); }
.icon-btn.soft.green { background: var(--green-50); color: var(--green-600); }
.icon-btn.light { background: #fff; border-color: var(--border); }
.icon-btn.ghost:hover { background: var(--soft); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.fav-btn.on { color: #ff4d6d; }

/* ═══════════ الحالات الفارغة والفوتر ═══════════ */
.empty { grid-column: 1 / -1; text-align: center; padding: 50px 16px; color: var(--muted); display: grid; justify-items: center; gap: 12px; }
.site-footer { margin: 34px 0 10px; padding: 20px 4px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: flex-end; color: var(--muted); font-size: 14px; }
.footer-office { display: grid; gap: 4px; }
.footer-office b { color: var(--text); font-size: 16px; }
.footer-office span, .footer-office a { display: inline-flex; align-items: center; gap: 6px; }
.staff-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }

.select-bar {
  position: fixed; inset-inline: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 600;
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 18px;
  background: #fff; box-shadow: var(--shadow-lg); max-width: 640px; margin: 0 auto;
}
.select-bar > span { flex: 1; }

/* ═══════════ الشريط السفلي (للمكتب) ═══════════ */
.bottom-nav {
  position: fixed; inset: auto 0 0 0; z-index: 550;
  height: calc(var(--nav-h) + var(--safe-b)); padding: 8px 14px calc(8px + var(--safe-b));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
  background: #fff; box-shadow: 0 -4px 20px rgba(15,29,61,.08);
}
.nav-item { height: 60px; border: 0; border-radius: 18px; background: transparent; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); font-weight: 600; font-size: 14px; }
.nav-item.active { background: #eaf0fb; color: var(--navy-700); }
.nav-ic { position: relative; display: grid; place-items: center; }
.nav-badge { position: absolute; top: -12px; left: -22px; background: var(--gold); color: var(--navy-900); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 2px solid #fff; }
.nav-badge:empty { display: none; }
.nav-fab {
  width: 74px; height: 74px; margin-top: -34px; border-radius: 24px; border: 5px solid #fff;
  background: linear-gradient(180deg, var(--navy-700), var(--navy-900)); color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 24px rgba(15,29,61,.35);
}

/* ═══════════ النوافذ ═══════════ */
.overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.backdrop { position: absolute; inset: 0; background: rgba(11,22,48,.5); opacity: 0; transition: opacity .2s; }
.overlay.open .backdrop { opacity: 1; }
.sheet {
  position: relative; width: 100%; min-width: 0; max-width: 720px; max-height: calc(100dvh - 24px);
  background: #fff; border-radius: 26px 26px 0 0; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); transform: translateY(40px); opacity: 0; transition: transform .22s ease, opacity .2s;
}
.overlay.open .sheet { transform: none; opacity: 1; }
.sheet.narrow { max-width: 520px; }
.overlay.center { align-items: center; padding: 16px; }
.overlay.center .sheet { border-radius: 22px; max-width: 440px; }
@media (min-width: 760px) {
  .overlay { align-items: center; padding: 20px; }
  .sheet { border-radius: 24px; max-height: calc(100dvh - 40px); }
}
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 14px; border-bottom: 1px solid #eef0f5; }
.sheet-head::before { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 44px; height: 5px; border-radius: 3px; background: #dfe3ea; }
@media (min-width: 760px) { .sheet-head::before { display: none; } }
.sheet-icon { width: 48px; height: 48px; border-radius: 15px; background: #eaf0fb; color: var(--navy-700); display: grid; place-items: center; flex-shrink: 0; }
.sheet-titles { flex: 1; min-width: 0; }
.sheet-titles h2 { font-size: 19px; font-weight: 700; }
.sheet-titles p { color: var(--muted); font-size: 13.5px; }
.sheet-body { overflow-y: auto; padding: 16px 18px 22px; overscroll-behavior: contain; flex: 1; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid #eef0f5; background: #fff; border-radius: 0 0 24px 24px; }
.dialog .sheet-body { padding-top: 8px; }
.dialog-msg { color: var(--text-2); margin-bottom: 12px; }

/* ═══════════ الحقول ═══════════ */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > span { font-weight: 600; font-size: 15px; color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.req { color: var(--red); font-style: normal; }
.input {
  width: 100%; min-width: 0; min-height: 52px; padding: 12px 15px; border-radius: 15px;
  border: 1px solid var(--border); background: #f8f9fc; outline: 0; font-size: 16px; color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder { color: #9aa3b2; }
.input:focus { border-color: var(--navy-600); background: #fff; box-shadow: 0 0 0 3px rgba(36,64,124,.1); }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.6; }
.input.color { padding: 4px; height: 52px; cursor: pointer; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { flex: 1; }
.input-wrap .suffix { position: absolute; left: 15px; color: var(--muted); pointer-events: none; }
.input-wrap:has(.suffix) .input { padding-left: 50px; }
.input-wrap .prefix { position: absolute; right: 14px; color: var(--muted); pointer-events: none; }
.input-wrap .prefix + .input { padding-right: 42px; }
.input-wrap .icon-btn { position: absolute; left: 6px; }
.helper { color: var(--green-600); font-weight: 600; min-height: 1em; }
.hint { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.hint .ic { margin-left: 4px; margin-top: -3px; color: var(--gold-600); }
.field-error { color: var(--red); font-weight: 600; }
.has-error .input, .has-error.type-grid .type-btn, .has-error .select { border-color: var(--red) !important; }
.form-error { color: var(--red); background: var(--red-50); padding: 10px 12px; border-radius: 12px; font-weight: 600; margin-bottom: 12px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.two > .field { margin-bottom: 16px; }
.stack { display: grid; gap: 4px; }
.form-section { margin-bottom: 20px; }
.form-section h4, .geo-box h4, .private-notes h4, .private-box h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.section-head h4 { margin-bottom: 10px; }

.segmented { display: flex; flex-wrap: wrap; gap: 6px; background: var(--soft); padding: 5px; border-radius: 14px; }
.segmented button { flex: 1; min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 10px; }
.segmented button.on { background: #fff; color: var(--navy-800); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.segmented.small button { min-height: 32px; font-size: 13.5px; }
.segmented.unit { flex-wrap: nowrap; flex-shrink: 0; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { display: inline-flex; align-items: center; gap: 5px; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text-2); font-weight: 600; }
.fchip.on { background: #eaf0fb; border-color: #b8c8ea; color: var(--navy-700); }
.fchip.static { min-height: 34px; padding: 0 12px; font-size: 14px; cursor: default; }

.switch { position: relative; display: inline-block; width: 58px; height: 34px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #cfd5df; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(-24px); }
.switch input:focus-visible + i { outline: 3px solid rgba(36,64,124,.3); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px; }
.toggle-row > span:first-child { display: grid; }
.toggle-row small { color: var(--muted); }

/* ═══════════ تسجيل الدخول ═══════════ */
.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, var(--navy-900), var(--navy-700) 55%, #2a4a8c); }
.login-card { width: min(100%, 420px); background: #fff; border-radius: 26px; padding: 28px 22px 22px; box-shadow: var(--shadow-lg); text-align: center; }
.login-card .field { text-align: right; }
.login-logo { width: 78px; height: 78px; margin: -64px auto 10px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #f6d56b, var(--gold-600)); color: var(--navy-900); border: 5px solid #fff; box-shadow: var(--shadow); }
.login-logo img { width: 100%; height: 100%; object-fit: cover; }
.login-card h1 { font-size: 21px; }
.login-card > .muted { margin-bottom: 20px; }
.back-link { display: inline-block; margin-top: 14px; }

/* ═══════════ الإشعارات ═══════════ */
.toasts { position: fixed; bottom: calc(20px + var(--safe-b)); inset-inline: 0; z-index: 3000; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { max-width: 480px; padding: 12px 18px; border-radius: 14px; background: var(--navy-900); color: #fff; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: none; }
body.has-nav .toasts { bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
.toast-err { background: #b91c1c; }

/* ═══════════ تفاصيل العقار ═══════════ */
.details-sheet .sheet-body { padding: 0 0 20px; }
.gallery { position: relative; background: #0b1630; aspect-ratio: 4 / 3; max-height: 56vh; width: 100%; }
.gallery.empty-g { background: #e6eaf2; }
.g-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.g-track::-webkit-scrollbar { display: none; }
.g-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; cursor: zoom-in; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: var(--navy-900); display: grid; place-items: center; }
.g-nav.prev { right: 10px; }
.g-nav.next { left: 10px; }
.g-count { position: absolute; bottom: 10px; right: 12px; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; padding: 3px 10px; border-radius: 999px; direction: ltr; }
.g-full { position: absolute; bottom: 10px; left: 12px; width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; }
.details { padding: 16px 18px 0; }
.d-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.d-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); font-weight: 600; font-size: 13.5px; }
.d-badge.plain { background: var(--soft); color: var(--text-2); }
.d-badge.warn { background: #fef3c7; color: #92400e; }
.d-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.d-features { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.d-section { margin: 6px 0 12px; }
.d-section h4 { font-size: 15px; margin-bottom: 4px; }
.d-section p { color: var(--text-2); }
.d-date { display: flex; align-items: center; gap: 5px; margin-bottom: 14px; }
.private-box { border: 1px solid #f3d98b; background: #fffbef; border-radius: 18px; padding: 14px; display: grid; gap: 10px; margin-top: 6px; }
.private-box h4 { color: #8a6106; margin: 0; }
.pv-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px dashed #f0dfa8; }
.pv-row > span:first-child { font-weight: 600; color: var(--text-2); }
.pv-actions { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pv-notes { background: #fff; border-radius: 12px; padding: 10px 12px; border: 1px solid #f3e3b0; }
.pv-notes p { color: var(--text-2); margin-top: 4px; }

.overlay.dark .backdrop { background: rgba(0,0,0,.94); }
.lightbox { background: transparent; box-shadow: none; max-width: none; height: 100dvh; max-height: none; border-radius: 0; }
.lightbox .sheet-body { padding: 0; overflow: hidden; position: relative; }
.lb-track { display: flex; height: 100dvh; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-slide { flex: 0 0 100%; display: grid; place-items: center; scroll-snap-align: center; }
.lb-slide img { max-height: 100dvh; max-width: 100%; object-fit: contain; }
.lb-close { position: absolute; top: 14px; left: 14px; z-index: 2; color: #fff; background: rgba(255,255,255,.12); border-radius: 50%; }
.lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; background: rgba(255,255,255,.15); padding: 4px 14px; border-radius: 999px; direction: ltr; }

/* ═══════════ نموذج العقار ═══════════ */
.form-sheet { max-width: 760px; }
.type-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.type-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 8px 10px; border-radius: 15px; border: 1.5px solid var(--border); background: #fff; font-weight: 600; color: var(--text-2); }
.type-btn .ic { color: var(--c); }
.type-btn.on { border-color: #8f8ff0; background: #f1f1fe; color: #3c3cb0; box-shadow: 0 0 0 3px rgba(91,91,214,.12); }
.area-row { display: flex; gap: 10px; }
.area-row .input { flex: 1; }
.geo-box { border: 1px solid #c9d8f3; background: #f4f8ff; border-radius: 20px; padding: 16px; margin-bottom: 20px; }
.geo-box .two { margin-top: 12px; }
.geo-box .field { margin-bottom: 10px; }
.geo-box .field > span { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.geo-box .input { background: #fff; }
.geo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.paste-row { display: flex; gap: 8px; margin-bottom: 8px; }
.geo-status { font-size: 14px; font-weight: 600; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; min-height: 22px; }
.geo-status span { display: inline-flex; align-items: center; gap: 5px; }
.geo-status .ok { color: var(--green-600); }
.geo-status .bad { color: var(--red); }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 10px; }
.img-grid:empty { display: none; }
.img-tile { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #e6eaf2; }
.img-tile img { width: 100%; height: 100%; object-fit: cover; }
.img-tile.uploading img { opacity: .5; }
.img-tile.error { outline: 2px solid var(--red); }
.cover-badge { position: absolute; bottom: 6px; right: 6px; background: var(--gold); color: var(--navy-900); font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.tile-btn { position: absolute; top: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0,0,0,.6); color: #fff; }
.tile-btn.del { left: 6px; }
.tile-btn.cover { right: 6px; }
.tile-spin, .tile-err { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; }
.tile-err { background: rgba(225,29,72,.55); gap: 2px; font-size: 12px; }
.upload-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border: 2px dashed #a9bde3; border-radius: 16px; color: var(--navy-700); font-weight: 600; cursor: pointer; background: #fafcff; }
.upload-btn.disabled { opacity: .4; pointer-events: none; }
.private-notes { border: 1.5px solid #f1d27a; background: #fffbea; border-radius: 20px; padding: 16px; margin-bottom: 20px; }
.private-notes h4 { color: #8a5a00; margin-bottom: 4px; }
.private-notes p { color: #a16207; font-size: 13.5px; margin-bottom: 10px; }
.private-notes .input { background: #fff; }
.status-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.status-seg button { min-height: 52px; border-radius: 15px; border: 1.5px solid var(--border); background: #fff; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.status-seg button i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.status-seg button.on { border-color: var(--navy-800); background: #f5f7fc; box-shadow: 0 0 0 2px rgba(19,36,74,.12); }
.publish-box { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; border: 1.5px solid #a8e3c0; background: #f0fbf5; cursor: pointer; }
.pb-icon { width: 48px; height: 48px; border-radius: 15px; background: #dcf5e7; color: var(--green-600); display: grid; place-items: center; }
.pb-text { flex: 1; display: grid; }
.pb-text b { font-size: 16px; }
.pb-text small { color: var(--muted); }


/* ═══════════ الخريطة ═══════════ */
.map-view { position: fixed; top: var(--top-h); inset-inline: 0; bottom: calc(var(--nav-h) + var(--safe-b)); }
.map-canvas { position: absolute; inset: 0; background: #e8e4da; z-index: 0; }
.map-loading { position: absolute; inset: 0; display: grid; place-items: center; }
.map-top { position: absolute; top: 12px; inset-inline: 12px; z-index: 450; display: flex; gap: 8px; }
.map-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 14px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); color: var(--muted); }
.map-search input { flex: 1; width: 100%; border: 0; outline: 0; min-width: 0; background: none; color: var(--text); }
.map-chip { height: 50px; padding: 0 14px; border-radius: 16px; border: 0; background: #fff; box-shadow: var(--shadow-lg); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--navy-800); white-space: nowrap; }
.map-chip .ic { color: var(--navy-600); }
.search-results { position: absolute; top: 56px; inset-inline: 0; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; max-height: 50vh; overflow-y: auto; }
.sr-item { display: flex; gap: 8px; align-items: flex-start; width: 100%; text-align: right; padding: 12px 14px; border: 0; border-bottom: 1px solid #f0f2f6; background: #fff; font-size: 14px; }
.map-chips { position: absolute; top: 72px; inset-inline: 12px; z-index: 440; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.mchip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 0; background: #fff; box-shadow: var(--shadow); font-weight: 600; font-size: 14px; color: var(--text-2); }
.mchip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.mchip small { color: var(--muted); }
.mchip.on { background: var(--navy-800); color: #fff; }
.mchip.on small { color: #c7d2ea; }
.map-tools { position: absolute; top: 124px; right: 12px; z-index: 440; display: grid; gap: 10px; }
.map-tool { width: 50px; height: 50px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow-lg); display: grid; place-items: center; color: var(--green-600); }
.map-tool:nth-child(2) { color: var(--gold-600); }
.map-tool.busy { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.map-legend { position: absolute; bottom: 14px; right: 12px; z-index: 440; display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.95); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-legend i { width: 12px; height: 12px; border-radius: 50%; }
.map-note { position: absolute; bottom: 62px; right: 12px; z-index: 440; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px; background: #fff7e0; border: 1px solid #f3d98b; font-size: 13px; color: #7a5a06; box-shadow: var(--shadow); }
.leaflet-container { font-family: inherit; direction: ltr; }
.leaflet-control-attribution { font-size: 10px; direction: ltr; }
.leaflet-bottom.leaflet-left { margin-bottom: 4px; }
.pin-wrap { background: none; border: 0; }
.pin {
  position: absolute; transform: translate(-50%, calc(-100% - 8px)); direction: rtl;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 6px 12px 6px 10px; border-radius: 999px; background: #fff; color: var(--navy-900);
  font-weight: 700; font-size: 14px; box-shadow: 0 3px 12px rgba(0,0,0,.25); border: 2px solid #fff;
  transition: transform .15s;
}
.pin::after { content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); border: 7px solid transparent; border-top-color: #fff; border-bottom: 0; }
.pin i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, #fff); }
.pin.s-sold { opacity: .6; text-decoration: line-through; }
.pin.s-reserved b::after { content: ' • محجوز'; color: var(--amber); font-size: 12px; }
.pin.active { background: var(--navy-800); color: #fff; border-color: var(--gold); transform: translate(-50%, calc(-100% - 8px)) scale(1.15); z-index: 1000; }
.pin.active::after { border-top-color: var(--navy-800); }
.cluster-wrap { background: none; }
.cluster { width: 46px; height: 46px; border-radius: 50%; background: var(--navy-800); border: 3px solid var(--gold); color: #fff; display: grid; place-items: center; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.rtl-popup .leaflet-popup-content-wrapper { border-radius: 16px; padding: 0; overflow: hidden; }
.rtl-popup .leaflet-popup-content { margin: 0; direction: rtl; font-family: inherit; width: auto !important; }
.map-popup img { width: 100%; height: 120px; object-fit: cover; }
.mp-body { padding: 10px 12px 6px; display: grid; gap: 2px; }
.mp-body b { font-size: 15px; }
.mp-price { color: var(--navy-700); font-weight: 700; }
.mp-actions { display: flex; gap: 6px; padding: 6px 12px 12px; }
.mp-actions .btn { flex: 1; }
body.on-map .site-footer { display: none; }

.pick-sheet { max-width: 900px; height: calc(100dvh - 24px); }
.pick-sheet .sheet-body { padding: 0; position: relative; }
.pick-map-wrap { position: absolute; inset: 0; }
.pick-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); z-index: 460; color: var(--red); pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.pick-pin .ic { fill: #fff; }
.pick-map-wrap .map-tools { top: 76px; }
.pick-coords { position: absolute; bottom: 12px; right: 12px; z-index: 450; background: rgba(255,255,255,.95); padding: 6px 12px; border-radius: 10px; font-size: 13px; direction: ltr; box-shadow: var(--shadow); }

/* ═══════════ قائمة الإدارة ═══════════ */
.account-menu {
  position: fixed; top: calc(var(--top-h) + 8px); left: 12px; z-index: 900; width: min(380px, calc(100vw - 24px));
  max-height: calc(100dvh - var(--top-h) - 24px); overflow-y: auto;
  background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); padding: 12px;
  opacity: 0; transform: translateY(-8px); transition: opacity .15s, transform .15s;
}
.account-menu.open { opacity: 1; transform: none; }
.menu-profile { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--soft); margin-bottom: 6px; }
.mp-avatar { width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(145deg, #f6d56b, var(--gold-600)); color: var(--navy-900); display: grid; place-items: center; flex-shrink: 0; }
.mp-info { flex: 1; display: grid; min-width: 0; }
.mp-info b { font-size: 17px; }
.mp-info small { color: var(--muted); font-size: 14px; text-align: right; }
.role-badge { background: var(--gold-50); color: #a16207; border: 1px solid #f6e3a8; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.menu-list { display: grid; }
.menu-list hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; width: 100%; }
.menu-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 12px; border: 0; background: none; border-radius: 12px; text-align: right; font-weight: 600; font-size: 16px; }
.menu-item span { flex: 1; }
.menu-item .ic { color: var(--navy-600); }
.menu-item:hover { background: var(--soft); }
.menu-item.static { cursor: default; }
.menu-item.static:hover { background: none; }
.menu-item.danger { color: var(--red); }
.menu-item.danger .ic { color: var(--red); }
.count-pill { background: var(--red); color: #fff; font-size: 12.5px; padding: 1px 9px; border-radius: 999px; }

.user-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; margin-bottom: 10px; }
.user-row.off { opacity: .6; }
.u-avatar { width: 46px; height: 46px; border-radius: 14px; background: var(--soft); color: var(--navy-600); display: grid; place-items: center; flex-shrink: 0; }
.u-avatar.gold { background: var(--gold-50); color: #a16207; }
.u-info { flex: 1; display: grid; gap: 2px; min-width: 0; }
.u-info small.ltr-inline { text-align: right; color: var(--muted); }
.u-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #eaf0fb; color: var(--navy-700); }
.tag.gold { background: var(--gold-50); color: #a16207; }
.tag.red { background: var(--red-50); color: var(--red); }
.tag.gray { background: #eceef2; color: #555; }
.tag.light { background: var(--soft); color: var(--muted); }
.tag.green { background: var(--green-50); color: var(--green-600); }
.tag.blue { background: #e0ecff; color: var(--blue); }
.tabs { display: flex; gap: 6px; background: var(--soft); padding: 5px; border-radius: 14px; margin-bottom: 14px; }
.tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 10px; background: none; font-weight: 600; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--navy-800); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.tax-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid #f0f2f6; }
.tax-color { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.tax-name { flex: 1; display: grid; min-width: 0; }
.add-inline { display: flex; gap: 8px; margin: 10px 0; }
.add-inline .input { min-height: 44px; }
.panel-note { margin: 10px 0; }
.logo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.logo-preview { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg, #f6d56b, var(--gold-600)); color: var(--navy-900); flex-shrink: 0; }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.logo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.logo-actions label { cursor: pointer; }
.drop-zone { display: grid; justify-items: center; gap: 6px; padding: 26px; border: 2px dashed #a9bde3; border-radius: 18px; background: #fafcff; cursor: pointer; color: var(--navy-700); margin-bottom: 14px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer; margin-bottom: 8px; }
.radio-card input { margin-top: 5px; accent-color: var(--navy-700); }
.radio-card > span { display: grid; font-weight: 400; }
.radio-card small { color: var(--muted); }
.radio-card:has(input:checked) { border-color: var(--navy-600); background: #f5f8ff; }
.radio-card.danger:has(input:checked) { border-color: var(--red); background: var(--red-50); }
.report { padding: 14px; border-radius: 14px; margin-top: 10px; }
.report.ok { background: var(--green-50); border: 1px solid #bfe9cf; }
.report.err { background: var(--red-50); border: 1px solid #fecdd3; color: var(--red); font-weight: 600; }
.report ul { margin: 6px 0 0; padding-right: 20px; }
.action-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 16px; background: #fff; text-align: right; }
.action-card:hover { background: var(--soft); }
.action-card > span { display: grid; }
.action-card small { color: var(--muted); }
.greet { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.contact-box { border: 1.5px solid #a8e3c0; background: #f0fbf5; border-radius: 20px; padding: 16px 16px 2px; margin-bottom: 8px; }
.contact-box h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; color: var(--green-600); }
.contact-box .input { background: #fff; }
.thanks { text-align: center; padding: 30px 10px; display: grid; justify-items: center; gap: 12px; }
.thanks-ic { width: 84px; height: 84px; border-radius: 50%; background: var(--green-50); color: var(--green); display: grid; place-items: center; }
.thanks h3 { font-size: 22px; }
.thanks p { color: var(--muted); max-width: 340px; }
.sub-card { border: 1px solid var(--border); border-radius: 18px; padding: 14px; margin-bottom: 12px; display: grid; gap: 10px; }
.sub-head { display: flex; align-items: center; gap: 8px; }
.sub-head b { flex: 1; }
.sub-contact { display: flex; align-items: center; gap: 8px; }
.sub-info { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.sub-info > div { background: var(--soft); border-radius: 10px; padding: 6px 10px; }
.sub-info dt { font-size: 12px; color: var(--muted); }
.sub-info dd { margin: 0; font-weight: 600; font-size: 14px; }
.sub-info a { color: var(--blue); display: inline-flex; align-items: center; gap: 4px; }
.sub-imgs { display: flex; gap: 6px; overflow-x: auto; }
.sub-imgs img { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; cursor: zoom-in; flex-shrink: 0; }
.sub-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.act-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f2f6; }
.act-dot { width: 9px; height: 9px; margin-top: 8px; border-radius: 50%; background: var(--navy-600); flex-shrink: 0; }


/* ═══════════ الطباعة ═══════════ */
.print-page { max-width: 900px; margin: 0 auto; padding: 20px; background: #fff; min-height: 100vh; }
.print-toolbar { display: flex; gap: 10px; margin-bottom: 20px; }
.print-head { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid var(--navy-800); padding-bottom: 12px; margin-bottom: 16px; }
.print-head img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.print-head > div:nth-child(2) { flex: 1; }
.print-head h1 { font-size: 22px; }
.print-meta { text-align: left; color: var(--muted); font-size: 13px; }
.print-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); break-inside: avoid; }
.print-item > img, .print-noimg { width: 180px; height: 130px; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: #eef1f6; display: grid; place-items: center; color: var(--muted); }
.pi-body { flex: 1; display: grid; gap: 3px; align-content: start; font-size: 13.5px; }
.pi-top { color: var(--muted); }
.pi-body h2 { font-size: 17px; }
.pi-price { font-weight: 700; font-size: 16px; color: var(--navy-800); }
.pi-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.pi-features { color: var(--text-2); }
.pi-private { margin-top: 4px; padding: 6px 10px; background: #fffbea; border: 1px solid #f3d98b; border-radius: 8px; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .print-page { padding: 0; }
  @page { margin: 12mm; }
}

/* ═══════════ الشاشات الصغيرة جداً ═══════════ */
@media (max-width: 380px) {
  .brand-name { font-size: 15px; }
  .add-big { font-size: 16px; }
  .offer-text b { font-size: 16px; }
  .filters-btn span { display: none; }
  .filters-btn { padding: 0 11px; }
  .price { font-size: 21px; }
  .type-btn { font-size: 14px; }
  .card-actions .btn.sm { padding: 0 10px; }
}

/* ═══════════ الاشتراك ═══════════ */
.sub-banner { display: flex; gap: 10px; align-items: flex-start; margin: 10px 14px 0; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.7; border: 1px solid; }
.sub-banner .ic { margin-top: 3px; }
.sub-banner a { text-decoration: underline; }
.sub-banner.warn { background: var(--gold-50); border-color: #f3dc94; color: #7a5a00; }
.sub-banner.danger { background: var(--red-50); border-color: #fecdd6; color: #9f1239; }
.sub-banner.stop { background: #1f2937; border-color: #111827; color: #fff; }
@media (min-width: 900px) { .sub-banner { max-width: 1240px; margin-inline: auto; } }
.paused-msg { display: flex; gap: 8px; align-items: center; justify-content: center; background: var(--gold-50); color: #7a5a00; border-radius: 14px; padding: 12px; margin: 14px 0; font-weight: 600; }
.paused-actions { display: flex; gap: 10px; justify-content: center; margin: 10px 0 18px; }
.paused-actions .btn { flex: 1; }
.plan-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.plan-row:last-child { border-bottom: 0; }
.plan-row small { color: var(--muted); display: block; }
.meter { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.meter > i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.meter > i.warn { background: var(--amber); }
.meter > i.full { background: var(--red); }

/* ═══════════ لوحة المنصة ═══════════ */
.brand-sub { display: block; font-size: 12px; font-weight: 500; opacity: .75; direction: ltr; text-align: right; }
.pf-view { padding: 14px; }
.pf-wrap { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.pf-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pf-tile { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 12px 6px; text-align: center; display: grid; gap: 2px; }
.pf-tile b { font-size: 24px; line-height: 1.1; color: var(--navy-800); }
.pf-tile span { font-size: 12.5px; color: var(--muted); }
.pf-tile.ok b { color: var(--green); }
.pf-tile.warn b { color: var(--amber); }
.pf-tile.stop b { color: var(--red); }
.pf-note { margin: -4px 4px 0; }
.pf-list { display: grid; gap: 12px; }
.pf-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 14px 14px 12px; display: grid; gap: 10px; }
.pf-card header { display: flex; gap: 10px; align-items: flex-start; }
.pf-card-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pf-card-title h3 { font-size: 17px; }
.pf-card-title a { color: var(--blue); }
.pf-badge { padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--soft); }
.pf-badge.ok { background: var(--green-50); color: var(--green-600); }
.pf-badge.warn { background: var(--gold-50); color: #92400e; }
.pf-badge.danger { background: var(--red-50); color: var(--red); }
.pf-badge.stop { background: #1f2937; color: #fff; }
.pf-sub { display: flex; gap: 6px; align-items: center; font-size: 13.5px; color: var(--text-2); }
.pf-sub.warn { color: #92400e; }
.pf-sub.danger, .pf-sub.stop { color: var(--red); font-weight: 600; }
.pf-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pf-stats span { background: var(--soft); border-radius: 12px; padding: 8px 4px; text-align: center; display: grid; }
.pf-stats b { font-size: 18px; color: var(--navy-800); }
.pf-stats small { font-size: 11.5px; color: var(--muted); }
.pf-meta { display: grid; gap: 4px; font-size: 13.5px; color: var(--text-2); }
.pf-meta .ic { color: var(--muted); margin-left: 4px; }
.pf-card footer { display: flex; gap: 8px; border-top: 1px solid #f0f2f6; padding-top: 10px; }
.pf-card footer .btn { flex: 1; }
.btn.green-soft { background: var(--green-50); border-color: #bfe9cf; color: var(--green-600); }
.pf-box { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; }
.pf-box .action-card:last-child { margin-bottom: 0; }
.pf-h { display: flex; align-items: center; gap: 8px; font-size: 15.5px; margin: 2px 0 6px; color: var(--navy-800); }
.pf-health { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 18px; border: 1px solid; }
.pf-health.ok { background: var(--green-50); border-color: #bfe9cf; color: var(--green-600); }
.pf-health.warn { background: var(--gold-50); border-color: #f3dc94; color: #7a5a00; }
.pf-health ul { margin: 6px 0 0; padding-inline-start: 18px; font-size: 14px; }
.pf-health small { display: block; opacity: .8; }
.pf-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.pf-grid3 .field > span { font-size: 13px; }
.pf-details { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }
.pf-details summary { cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.pf-danger { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border); }
.pf-msg { white-space: pre-wrap; background: var(--soft); border-radius: 14px; padding: 14px; font: inherit; font-size: 14px; direction: rtl; margin: 0 0 14px; }
.center { text-align: center; }
.pf-nav { grid-template-columns: repeat(4, 1fr); gap: 4px; }
body.has-nav .pf-view { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }

.pf-preview { margin: 0 0 14px; }

/* ═══════════ علامة الحقوق ═══════════ */
.credit-row { display: flex; justify-content: center; padding: 14px 0 4px; }
.credit { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; transition: background .15s; }
.credit:hover { background: var(--soft); }
.credit b { color: var(--text-2); font-weight: 700; }
.credit-logo { height: 26px; width: auto; display: block; }
.menu-credit { padding: 6px 0 2px; }
.login-card .credit-row { padding-top: 18px; }
.pf-credit-logo { display: grid; place-items: center; min-width: 120px; height: 64px; padding: 8px; border: 1px dashed var(--border); border-radius: 14px; background: #fff; }
.pf-credit-logo img { max-height: 46px; width: auto; }
.pf-credit-preview { display: flex; justify-content: center; padding: 10px; background: var(--bg); border-radius: 14px; margin-bottom: 14px; }
.site-footer .credit-row { flex-basis: 100%; width: 100%; order: 99; border-top: 1px solid var(--border); margin-top: 12px; padding-top: 14px; }

/* صورة الغلاف */
.tile-cover { position: absolute; bottom: 6px; right: 6px; border: 0; display: inline-flex; align-items: center; gap: 3px; background: rgba(0,0,0,.62); color: #fff; font: inherit; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 7px; }
.tile-cover .ic { color: var(--gold); }
.g-cover { position: absolute; bottom: 12px; left: 12px; z-index: 3; border: 0; display: inline-flex; align-items: center; gap: 6px; background: var(--gold); color: var(--navy-900); font: inherit; font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.g-cover-tag { position: absolute; bottom: 12px; left: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 5px; background: rgba(0,0,0,.55); color: #fff; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.g-cover-tag .ic { color: var(--gold); }

/* ═══════════ تنظيف الواجهة على الموبايل (ملاحظات المستخدم) ═══════════ */
/* 1) الحقول بالفلاتر: ما تتمدد فوق بعض لو اسم الحي طويل */
.field { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.select { min-width: 0; overflow: hidden; }
.select select { width: 100%; min-width: 0; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }

/* 2) شريط الأقسام وزر الفلاتر: أصغر، والأقسام تختفي بهدوء قبل الزر بدل ما تنقص فجأة */
.chip { height: 38px; padding: 0 11px; font-size: 14px; gap: 5px; }
.chip b { font-size: 12px; padding: 1px 7px; }
.chip .ic { width: 17px; height: 17px; }
.cat-bar .chips-row { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 26px); mask-image: linear-gradient(to left, transparent 0, #000 26px); padding-inline-end: 24px; }
.filters-btn { height: 38px; padding: 0 12px; font-size: 14px; gap: 5px; }
.filters-btn .ic { width: 17px; height: 17px; }
.results-row { min-width: 0; }
.results-row .link-btn, .outline-pill { white-space: nowrap; }
.outline-pill { height: 32px; padding: 0 11px; font-size: 13px; gap: 5px; }
.outline-pill .ic { width: 15px; height: 15px; }

/* 3) أزرار بطاقة العقار: أصغر حتى تنطي كلها بالبطاقة */
.card-actions { gap: 6px; padding: 10px 12px 12px; }
.card-actions .btn.sm { height: 38px; padding: 0 11px; font-size: 13.5px; border-radius: 12px; gap: 5px; min-width: 0; }
.card-actions .btn.sm .ic { width: 17px; height: 17px; }
.card-actions .btn.grow { flex: 1 1 auto; overflow: hidden; white-space: nowrap; }
.card-actions .icon-btn { width: 36px; height: 36px; border-radius: 11px; }
.card-actions .icon-btn .ic { width: 18px; height: 18px; }
.card-actions .sep { height: 22px; margin: 0; }

/* 4) الوصف بالبطاقة: بالنص تحت مباشرة */
.card-body .desc { text-align: center; margin-top: 2px; }

/* ═══════════ الإصدار 2 ═══════════ */
/* 📌 العقارات المميزة */
.pinned { margin: 4px 0 12px; }
.pinned-title { font-size: 16px; margin: 0 2px 8px; color: var(--navy-800); }
.pinned-row, .sim-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; scrollbar-width: none; }
.pinned-row::-webkit-scrollbar, .sim-row::-webkit-scrollbar { display: none; }
.pin-card { flex: 0 0 auto; width: 210px; scroll-snap-align: start; display: grid; text-align: right; background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; padding: 0; box-shadow: var(--shadow); font: inherit; color: inherit; }
.pin-img { display: block; aspect-ratio: 16 / 10; background: #dde3ee; position: relative; }
.pin-img img { width: 100%; height: 100%; object-fit: cover; }
.pin-img .no-img { position: absolute; inset: 0; display: grid; place-items: center; color: var(--c); }
.pin-info { display: grid; gap: 1px; padding: 8px 10px 10px; }
.pin-info b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin-price { color: var(--navy-700); font-weight: 700; font-size: 14px; }
.pin-info small { color: var(--muted); font-size: 12px; }
.media-badge.pin-badge { top: auto; bottom: 48px; right: 10px; left: auto; background: var(--gold); color: var(--navy-900); font-weight: 700; font-size: 12.5px; }
.pin-toggle { font-size: 17px; filter: grayscale(1); opacity: .55; }
.pin-toggle.on { filter: none; opacity: 1; background: var(--gold-50); }
.pin-row .segmented { flex-wrap: nowrap; }
.pin-row .segmented button { padding: 0 8px; font-size: 12.5px; }
.block { display: block; }
/* العدّاد */
.stats-line { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.stats-line span { opacity: .5; }
.stats-toggle { font-size: 12.5px; }
.pstats { font-size: 13px; color: var(--text-2); text-align: left; line-height: 1.8; }
/* أدوات التفاصيل */
.d-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.d-tools .btn { flex: 1 1 auto; }
.similar h4 { margin-bottom: 8px; }
.sim-row .pin-card { width: 180px; }
/* ستوري */
.story-preview { display: grid; place-items: center; margin: 14px 0 8px; min-height: 200px; }
.story-preview img { max-height: 56vh; width: auto; border-radius: 14px; box-shadow: var(--shadow-lg); }
.story-preview img.post { max-height: 42vh; }
/* QR */
.qr-box { width: min(260px, 70vw); margin: 6px auto 4px; }
.qr-box svg { width: 100%; height: auto; display: block; }
.qr-url { text-align: center; color: var(--muted); font-size: 12.5px; margin-bottom: 14px; word-break: break-all; }
/* الإشعارات */
.push-state { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--soft); font-weight: 600; margin-bottom: 8px; }
.push-state.on { background: var(--green-50); color: var(--green-600); }
.pf-views { font-size: 13px; color: var(--text-2); display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
/* لافتة للبيع */
.sign-toolbar { position: sticky; top: 0; z-index: 5; display: flex; gap: 12px; align-items: center; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--border); }
.sign { width: 210mm; min-height: 297mm; margin: 12px auto; background: #fff; padding: 14mm 12mm; display: flex; flex-direction: column; align-items: center; text-align: center; color: #0b1630; box-shadow: var(--shadow-lg); }
.sign.a5 { width: 148mm; min-height: 210mm; padding: 9mm 8mm; }
.sign-head { width: 100%; background: #c8102e; color: #fff; font-weight: 700; font-size: 96pt; line-height: 1.2; border-radius: 6mm; padding: 2mm 0 5mm; }
.sign.a5 .sign-head { font-size: 66pt; }
.sign-cat { margin-top: 6mm; font-size: 26pt; font-weight: 700; color: #24407c; }
.sign-price { font-size: 58pt; font-weight: 700; margin-top: 2mm; }
.sign.a5 .sign-cat { font-size: 18pt; }
.sign.a5 .sign-price { font-size: 40pt; }
.sign-facts { display: flex; gap: 6mm; justify-content: center; flex-wrap: wrap; font-size: 18pt; color: #374151; }
.sign.a5 .sign-facts { font-size: 13pt; }
.sign-qr { width: 88mm; margin-top: 8mm; }
.sign.a5 .sign-qr { width: 64mm; margin-top: 5mm; }
.sign-qr svg { width: 100%; height: auto; display: block; }
.sign-scan { font-size: 15pt; color: #374151; margin-top: 2mm; }
.sign.a5 .sign-scan { font-size: 11pt; }
.sign-office { margin-top: auto; display: flex; align-items: center; gap: 6mm; padding-top: 6mm; border-top: 1mm solid #ecc04a; width: 100%; justify-content: center; }
.sign-office img { width: 26mm; height: 26mm; border-radius: 50%; object-fit: cover; }
.sign-office div { display: grid; text-align: right; }
.sign-office b { font-size: 24pt; }
.sign-office span { font-size: 28pt; font-weight: 700; color: #24407c; }
.sign.a5 .sign-office b { font-size: 16pt; }
.sign.a5 .sign-office span { font-size: 19pt; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .sign { margin: 0; box-shadow: none; }
}
.pv-row.pin-row { display: grid; gap: 8px; }
.pin-row .segmented { flex-wrap: nowrap; width: 100%; }
.pin-row .segmented button { flex: 1; white-space: nowrap; padding: 0 6px; font-size: 13px; }

/* ═══ لوحة المراقبة ═══ */
.mon-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mon-grid.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 10px; }
@media (min-width: 640px) { .mon-grid { grid-template-columns: repeat(4, 1fr); } }
.mon-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px; display: grid; gap: 2px; align-content: start; min-width: 0; }
.mon-card > span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.mon-card > b { font-size: 22px; line-height: 1.2; color: var(--navy-800); overflow-wrap: anywhere; }
.mon-card.big > b { font-size: 26px; }
.mon-card small { font-size: 11.5px; color: var(--muted); }
.mon-card.ok > b { color: var(--green-600); }
.mon-card.warn > b { color: #b45309; }
.mon-card.stop > b { color: var(--red); }
.mon-card .meter { margin-top: 4px; }
.mon-grid.three .mon-card > b { font-size: 18px; }
.chg { font-style: normal; font-size: 12px; font-weight: 700; justify-self: start; }
.chg.up { color: var(--green-600); } .chg.down { color: var(--red); } .chg.flat { color: var(--muted); }
.mon-alerts { display: grid; gap: 6px; }
.mon-alert { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; font-weight: 600; font-size: 14px; }
.mon-alert.danger { background: var(--red-50); color: #9f1239; border: 1px solid #fecdd3; }
.mon-alert.warn { background: var(--gold-50); color: #7a5a06; border: 1px solid #f5e3a6; }
.mon-alert .ic { flex-shrink: 0; margin-top: 1px; }
.mon-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mon-head .pf-h { margin: 0; }
.mon-select { min-height: 38px; border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 0 10px; font: inherit; font-size: 14px; color: var(--text); max-width: 100%; }
.mon-tools { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.mon-search { flex: 1 1 180px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 12px; padding: 0 10px; background: #fff; color: var(--muted); min-height: 40px; }
.mon-search input { border: 0; outline: 0; flex: 1; min-width: 0; font: inherit; font-size: 14.5px; background: transparent; }
.mon-rows { display: grid; gap: 8px; }
.mon-row { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: #fff; text-align: right; }
.mon-row:active { background: var(--soft); }
.mon-r1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mon-r1 b { font-size: 15.5px; color: var(--navy-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-r2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12.5px; }
.mon-r2 .mono-s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-nums { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.mon-nums > span { display: grid; text-align: center; font-size: 11px; color: var(--muted); background: var(--soft); border-radius: 10px; padding: 5px 2px; }
.mon-nums b { font-size: 15px; color: var(--navy-800); }
.mon-r3 { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.spark { flex-shrink: 0; }
.chart svg { width: 100%; height: auto; max-height: 260px; display: block; overflow: visible; }
.ch-grid { stroke: #e9ecf3; stroke-width: 1; }
.ch-ax { font-size: 10px; fill: #7b8494; font-family: inherit; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.ch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.bars { display: grid; gap: 7px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 38%) 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bar-t { height: 10px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.bar-t i { display: block; height: 100%; border-radius: 6px; }
.bar-row b { font-size: 13px; color: var(--navy-800); min-width: 2ch; text-align: left; }
.pf-nav .nav-item span:last-child { font-size: 12px; }

/* صورة توضيحية للعقار بدون صور */
.ph-wrap { position: absolute; inset: 0; display: block; }
.ph-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-badge { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); background: rgba(15, 29, 61, .72); color: #fff; font-size: 12.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap; pointer-events: none; backdrop-filter: blur(2px); }
.ph-badge.sm { font-size: 10.5px; padding: 2px 8px; top: auto; bottom: 6px; transform: translateX(-50%); }
.gallery.empty-g { position: relative; aspect-ratio: 4 / 3; }
