/* ============================================================
   بديل — Badeel design system
   Tokens first, then components. 8px spacing scale.
   ============================================================ */

:root {
  /* brand */
  --teal: #008F78;
  --teal-hover: #007965;
  --teal-soft: #E6F4F1;
  --teal-tint: #F1F8F6;

  /* surfaces */
  --bg: #FFFFFF;
  --surface: #F3F8F7;

  /* text */
  --text: #172B2A;
  --muted: #70817D;

  /* lines */
  --border: #E3ECE9;

  /* spacing (8px scale) */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 40px;

  /* shape */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* elevation — very subtle */
  --shadow-sm: 0 1px 2px rgba(23, 43, 42, .04);
  --shadow-md: 0 6px 20px rgba(23, 43, 42, .06);
  --shadow-teal: 0 8px 20px rgba(0, 143, 120, .18);

  /* motion */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --fast: 140ms;

  --tap: 44px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: "Cairo", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

button, input { font: inherit; color: inherit; }

button {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

/* ---------- app shell ---------- */

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.main {
  flex: 1;
  padding: 0 var(--s4);
  /* keep the last content clear of the fixed disclaimer */
  padding-bottom: calc(var(--s6) + 84px + var(--safe-bottom));
}

/* ---------- AppHeader ---------- */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: calc(var(--s4) + env(safe-area-inset-top, 0px)) var(--s4) var(--s3);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--teal);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(0, 143, 120, .22);
}

.brand-mark svg { width: 21px; height: 21px; stroke: #fff; fill: none; stroke-width: 2.4; stroke-linecap: round; }

.brand-text { min-width: 0; }

.brand-name {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.2px;
  line-height: 1.25;
}

.brand-tag {
  margin: 1px 0 0;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  flex: none;
  width: var(--tap);
  height: var(--tap);
  min-width: var(--tap);
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn:active { background: var(--teal-soft); }
.icon-btn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- hero + SearchInput ---------- */

.hero { padding-top: var(--s3); }

.hero-title {
  margin: 0 0 6px;
  font-size: 25px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -.3px;
}

.hero-sub {
  margin: 0 0 var(--s5);
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  font-weight: 500;
  max-width: 34ch;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  height: 58px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: #fff;
  padding: 0 var(--s3);
  gap: 10px;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.search-field:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 143, 120, .10);
}

.search-field .search-icon {
  flex: none;
  width: 20px;
  height: 20px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--fast) var(--ease);
}

.search-field:focus-within .search-icon { stroke: var(--teal); }

.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding: 0;
}

.search-field input::placeholder {
  color: #9BAAA6;
  font-weight: 500;
}

.clear-btn {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--muted);
  display: none;
  place-items: center;
  padding: 0;
}

.clear-btn.show { display: grid; }
.clear-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; }
.clear-btn:hover { background: var(--teal-soft); color: var(--teal-hover); }

/* ---------- PrimaryButton ---------- */

.btn-primary {
  width: 100%;
  min-height: 56px;
  margin-top: var(--s3);
  border: 0;
  border-radius: var(--r-md);
  background: var(--teal);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .1px;
  box-shadow: var(--shadow-teal);
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.btn-primary:hover { background: var(--teal-hover); }
.btn-primary:active { transform: scale(.988); box-shadow: 0 4px 12px rgba(0, 143, 120, .18); }
.btn-primary:focus-visible { outline: 3px solid rgba(0, 143, 120, .35); outline-offset: 2px; }

.form-note {
  margin: var(--s3) 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  background: var(--teal-tint);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px var(--s3);
  display: none;
}

.form-note.show { display: block; }

/* ---------- sections ---------- */

.section { margin-top: var(--s6); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2);
  margin-bottom: var(--s3);
}

.section-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.1px;
}

.section-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.demo-badge {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  color: #7A8C87;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 3px 9px;
  line-height: 1.4;
  white-space: nowrap;
}

.section-note {
  margin: 8px 2px 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: #93A29E;
  font-weight: 500;
}

/* ---------- MedicineSuggestionItem ---------- */

.suggest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: #fff;
  overflow: hidden;
}

.suggest-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: 60px;
  padding: 10px var(--s4);
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  text-align: start;
  transition: background var(--fast) var(--ease);
}

.suggest-list li:last-child .suggest-item { border-bottom: 0; }
.suggest-item:hover { background: var(--teal-tint); }
.suggest-item:active { background: var(--teal-soft); }

.suggest-icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--teal-soft);
  display: grid;
  place-items: center;
}

.suggest-icon svg { width: 18px; height: 18px; stroke: var(--teal); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.suggest-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggest-arrow {
  flex: none;
  width: 18px;
  height: 18px;
  stroke: #B4C2BE;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- RecentMedicineCard ---------- */

.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s2);
}

.recent-card {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: 68px;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: #fff;
  text-align: start;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.recent-card:hover { border-color: #D3E3DF; background: #FCFEFD; }

.recent-clock {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  background: var(--surface);
  display: grid;
  place-items: center;
}

.recent-clock svg { width: 17px; height: 17px; stroke: var(--muted); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.recent-body { flex: 1; min-width: 0; }

.recent-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-ing {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-card .suggest-arrow { width: 16px; height: 16px; }

/* ---------- EmptyHistoryState ---------- */

.empty-history {
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--s5) var(--s4);
  text-align: center;
}

.empty-history .empty-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto var(--s3);
  border-radius: var(--r-pill);
  background: #fff;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}

.empty-history .empty-icon svg { width: 21px; height: 21px; stroke: var(--teal); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.empty-title {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 700;
}

.empty-sub {
  margin: 0 auto;
  max-width: 30ch;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- trust ---------- */

.trust {
  margin-top: var(--s5);
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--teal-tint);
}

.trust-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  background: #fff;
  border: 1px solid #D8EBE6;
  display: grid;
  place-items: center;
}

.trust-icon svg { width: 18px; height: 18px; stroke: var(--teal); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.trust-title {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 700;
}

.trust-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- footer credit ---------- */

.credit {
  margin: var(--s6) 0 0;
  text-align: center;
  font-size: 11.5px;
  color: #93A29E;
  font-weight: 500;
}

.credit a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.credit a:hover { color: var(--teal-hover); border-bottom-color: currentColor; }

/* ---------- MedicalDisclaimer (fixed) ---------- */

.disclaimer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: rgba(243, 248, 247, .96);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--border);
  padding: 10px var(--s4) calc(10px + var(--safe-bottom));
}

.disclaimer-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.disclaimer svg {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.disclaimer p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: #5F706C;
  font-weight: 600;
}

/* ---------- bottom sheet (info) ---------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(23, 43, 42, .38);
  opacity: 0;
  transition: opacity 180ms var(--ease);
}

.sheet-backdrop.open { opacity: 1; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: var(--s5) var(--s4) calc(var(--s5) + var(--safe-bottom));
  transform: translateY(102%);
  transition: transform 240ms var(--ease);
  box-shadow: 0 -8px 30px rgba(23, 43, 42, .12);
}

.sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--border);
  margin: 0 auto var(--s4);
}

.sheet h2 {
  margin: 0 0 var(--s2);
  font-size: 17px;
  font-weight: 800;
}

.sheet p {
  margin: 0 0 var(--s3);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 500;
}

.sheet .sheet-close {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: #fff;
  font-weight: 700;
  font-size: 15px;
  margin-top: var(--s2);
}

.sheet .sheet-close:active { background: var(--surface); }

/* ---------- responsive ---------- */

@media (min-width: 430px) {
  .hero-title { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Phase 2 — search results screen
   نفس التوكنز بتاعة المرحلة الأولى، مفيش تغيير في الهوية.
   ============================================================ */

/* ---------- results header ---------- */

.rhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: calc(var(--s4) + env(safe-area-inset-top, 0px)) var(--s4) var(--s2);
}

.rhead-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.2px;
}

.rhead-spacer { width: var(--tap); }

/* ---------- compact search ---------- */

.search-field.compact {
  height: 52px;
  margin: 0 var(--s4) var(--s3);
}

.search-field.compact input { font-size: 14.5px; font-weight: 600; }

.search-go {
  flex: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--teal);
  display: grid;
  place-items: center;
  padding: 0;
  transition: background var(--fast) var(--ease);
}

.search-go svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.search-go:active { background: var(--teal-hover); }

/* ---------- demo banner ---------- */

.demo-banner {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0 var(--s4) var(--s4);
  padding: 9px var(--s3);
  border: 1px solid #F0E2C8;
  background: #FDF7EC;
  border-radius: var(--r-sm);
}

.demo-banner svg { flex: none; width: 15px; height: 15px; margin-top: 2px; stroke: #A97B23; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.demo-banner p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.65;
  color: #8A6620;
  font-weight: 600;
}

/* ---------- original medicine card ---------- */

.orig-wrap { padding: 0 var(--s4); }

.orig-card {
  border: 1px solid #CFE6E1;
  background: linear-gradient(180deg, #F7FCFB, #FFFFFF);
  border-radius: var(--r-lg);
  padding: var(--s4);
  box-shadow: 0 2px 10px rgba(0, 143, 120, .06);
}

.orig-top {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s3);
}

.orig-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--teal);
  display: grid;
  place-items: center;
}

.orig-icon svg { width: 21px; height: 21px; stroke: #fff; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.orig-names { min-width: 0; }

.orig-name {
  display: block;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.2px;
  line-height: 1.3;
}

.orig-name-en {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .2px;
}

.orig-meta {
  display: grid;
  gap: 6px;
  padding: var(--s3) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
}

.meta-label {
  flex: none;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.meta-value {
  font-size: 13px;
  font-weight: 700;
  text-align: end;
}

.orig-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding-top: var(--s3);
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-label { font-size: 12px; color: var(--muted); font-weight: 600; }

.price-value {
  font-size: 21px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -.2px;
  font-variant-numeric: tabular-nums;
}

.price-missing { font-size: 12.5px; font-weight: 700; color: #A9702B; }

.price-demo-chip {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  color: #8A6620;
  background: #FDF7EC;
  border: 1px solid #F0E2C8;
  border-radius: var(--r-pill);
  padding: 2px 8px;
}

/* ---------- alternatives ---------- */

.alt-section { padding: 0 var(--s4); }

.section-sub {
  margin: -4px 0 var(--s3);
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 500;
}

.count-chip {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: var(--r-pill);
  padding: 3px 9px;
}

/* sort control */

.sort-control {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  margin-bottom: var(--s3);
}

.sort-btn {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  padding: 0 6px;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.sort-btn.active {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* alternative card */

.alt-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: #fff;
  padding: var(--s4);
  margin-bottom: var(--s3);
  box-shadow: var(--shadow-sm);
}

.cheapest-tag {
  position: absolute;
  top: -9px;
  inset-inline-start: var(--s4);
  background: var(--teal);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: var(--r-pill);
  padding: 3px 10px;
  box-shadow: 0 4px 10px rgba(0, 143, 120, .25);
}

.alt-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s3);
}

.alt-names { min-width: 0; }

.alt-name {
  display: block;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -.2px;
  line-height: 1.35;
}

.alt-sub {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.6;
}

.alt-price { flex: none; text-align: end; }

.alt-price b {
  font-size: 18px;
  font-weight: 800;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.alt-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin-top: var(--s3);
}

.alt-maker {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.savings-badge {
  flex: none;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--teal-hover);
  background: var(--teal-soft);
  border: 1px solid #CFE6E1;
  border-radius: var(--r-pill);
  padding: 3px 10px;
  white-space: nowrap;
}

.alt-note {
  margin: var(--s2) 0 0;
  font-size: 11.5px;
  color: #8A6620;
  font-weight: 600;
}

.alt-actions { margin-top: var(--s3); }

.btn-details {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.btn-details:hover { border-color: var(--teal); color: var(--teal-hover); background: var(--teal-tint); }
.btn-details:active { background: var(--teal-soft); }

.safety-note {
  margin: var(--s3) 0 0;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  background: var(--teal-tint);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px var(--s3);
}

/* ---------- states ---------- */

.state-block {
  margin: var(--s5) var(--s4);
  padding: var(--s5) var(--s4);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.state-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto var(--s3);
  border-radius: var(--r-pill);
  background: #fff;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}

.state-icon svg { width: 21px; height: 21px; stroke: var(--teal); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.state-title {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.6;
}

.state-sub {
  margin: 0 auto;
  max-width: 32ch;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  font-weight: 500;
}

.state-btn { max-width: 220px; margin: var(--s4) auto 0; }

/* ---------- skeletons ---------- */

.skel-wrap { padding: var(--s3) var(--s4); }

.skel {
  border-radius: var(--r-md);
  background: linear-gradient(90deg, #F1F6F5 25%, #E8F1EF 37%, #F1F6F5 63%);
  background-size: 400% 100%;
  animation: skelShine 1.4s ease infinite;
}

.skel-label { height: 14px; width: 42%; margin: var(--s3) 0; border-radius: 6px; }
.skel-card { height: 168px; margin-bottom: var(--s4); border-radius: var(--r-lg); }
.skel-row { height: 108px; margin-bottom: var(--s3); border-radius: var(--r-lg); }

@keyframes skelShine {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skel { animation: none; }
}

/* أول كارت بديل بعيد شوية عن الكنترول عشان تاج «الأوفر سعرًا» */
.alt-section .alt-card:first-of-type { margin-top: 14px; }

.compare-na {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: #7A8C87;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  white-space: nowrap;
}
