/* Tanfidh — Hay Al Falah  (clean editable build) */

/* ---- Fonts ---- */
@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url("../fonts/thmanyahserifdisplay-Light.8e157807ac8a.otf") format('opentype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url("../fonts/thmanyahserifdisplay-Regular.bef6ac1d39ff.otf") format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url("../fonts/thmanyahserifdisplay-Medium.60f97c5d2112.otf") format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url("../fonts/thmanyahserifdisplay-Bold.884fb4a6eec0.otf") format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url("../fonts/thmanyahserifdisplay-Black.be33d8e3ca6f.otf") format('opentype');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* ---- Tokens ---- */
:root {
  --bg:        #f7f4ee;     /* warm bone */
  --bg-2:      #efe8db;     /* sand */
  --bg-3:      #e7decd;     /* deeper sand for inputs / disabled */
  --ink:       #1c1a17;     /* near black */
  --ink-2:     #4a4640;     /* muted ink */
  --ink-3:     #7a746a;     /* tertiary text / labels */
  --line:      #d9cfbd;     /* hairline */
  --line-2:    #ece4d2;     /* softer hairline */
  --gold:      #b48a3c;     /* signature accent */
  --gold-deep: #8a6826;
  --gold-soft: #f1e6cf;     /* gold-tinted soft fill */
  --green:     #2f4a3a;     /* deep palm */
  --green-deep:#1f3327;     /* darker palm */
  --green-soft:#dde6dd;     /* palm-tinted soft fill */
  --rose:      #b6655a;     /* warm muted red, derived */
  --rose-soft: #f1d9d3;     /* rose-tinted soft fill */
  --paper:     #fffdf8;
  --shadow-sm: 0 1px 2px rgba(28,26,23,.06), 0 1px 1px rgba(28,26,23,.04);
  --shadow-md: 0 12px 30px -12px rgba(28,26,23,.18), 0 4px 8px -4px rgba(28,26,23,.08);
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 32px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Thmanyah Serif Display', ui-serif, Georgia, serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01","liga","kern";
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

html[dir="rtl"] body { text-align: right; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.eyebrow {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 600;
}
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
.divider {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--gold);
}
.divider::before, .divider::after {
  content: ""; width: 28px; height: 1px; background: currentColor; opacity: .55;
}

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,244,238,.85);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(217,207,189,.6);
}
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { height: 44px; width: auto; }
.brand-name { font-weight: 700; letter-spacing: .02em; font-size: 18px; }
.nav { display: flex; gap: 28px; }
.nav a {
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: color .18s ease;
}
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px; font-weight: 600;
}
.lang-toggle:hover { background: #fff; border-color: var(--gold); color: var(--gold-deep); }
.lang-toggle .dot {
  width: 7px; height: 7px; border-radius: 9999px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--green) 100%);
}

@media (max-width: 820px) {
  .nav { display: none; }
}

/* ---- Hero ---- */
.hero {
  position: relative; padding: 96px 0 72px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 80% -20%, rgba(180,138,60,.12), transparent 55%),
    radial-gradient(ellipse at -10% 110%, rgba(47,74,58,.10), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.hero h1 {
  font-size: clamp(44px, 6.4vw, 86px);
  line-height: 1.02; letter-spacing: -0.02em; font-weight: 700;
  margin: 16px 0 18px;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--gold-deep); font-style: italic; font-weight: 500; }
.hero p.lede {
  font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 56ch;
  margin: 0 0 32px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 24px;
  border-radius: 9999px;
  font-size: 15px; font-weight: 600; letter-spacing: -.005em;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--gold-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn .arrow { display: inline-block; transition: transform .2s ease; }
html[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
.btn:hover .arrow { transform: translateX(3px); }
html[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(3px); }

.hero-card {
  position: relative; aspect-ratio: 4/5;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(160deg, #1e2f27 0%, #0f0d0b 100%);
  box-shadow: var(--shadow-md);
}
.hero-card .placeholder-art {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 2px, transparent 2px 16px),
    radial-gradient(circle at 30% 30%, rgba(180,138,60,.22), transparent 55%),
    radial-gradient(circle at 70% 75%, rgba(47,74,58,.45), transparent 60%);
  display: flex; align-items: center; justify-content: center;
}
.hero-card .placeholder-art img {
  width: 72%; height: 72%; object-fit: contain;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,.35));
}
.hero-card .meta {
  position: absolute; left: 24px; right: 24px; bottom: 24px;
  color: #f3ead4; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  display: flex; justify-content: space-between; opacity: .85;
}
html[dir="rtl"] .hero-card .meta { letter-spacing: 0; text-transform: none; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 56px; padding-top: 32px;
  border-top: 1px solid var(--line);
}
.stat .num { font-size: 38px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.stat .label { margin-top: 8px; color: var(--ink-2); font-size: 14px; }

@media (max-width: 900px) {
  .hero { padding: 56px 0 40px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { aspect-ratio: 5/4; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .stat .num { font-size: 28px; }
}

/* ---- Sections ---- */
section { padding: 96px 0; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08; letter-spacing: -.018em; font-weight: 700;
  margin: 14px 0 10px; text-wrap: balance;
}
.section-head p { color: var(--ink-2); font-size: 17px; line-height: 1.6; }

/* ---- Vision band ---- */
.vision { background: var(--bg-2); }
.vision-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: center; }
.vision .quote-mark { font-size: 96px; line-height: 1; color: var(--gold); font-family: ui-serif, Georgia, serif; }
.vision h3 {
  font-size: clamp(28px, 3vw, 40px); line-height: 1.15; letter-spacing: -.015em;
  font-weight: 600; margin: 8px 0 20px; text-wrap: balance;
}
.vision p { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.vision .ministry-tag {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 28px;
  padding: 12px 18px; border: 1px dashed var(--gold); border-radius: var(--r-md);
  font-size: 13px; color: var(--gold-deep); font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase;
}
html[dir="rtl"] .vision .ministry-tag { letter-spacing: 0; text-transform: none; }
.vision-image {
  aspect-ratio: 4/5; border-radius: var(--r-xl);
  background:
    linear-gradient(180deg, transparent 55%, rgba(0,0,0,.35) 100%),
    url("/static/frontend/assets/entire_photo.14bee0b1fc61.png") center / cover no-repeat,
    #1c2a22;
  box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
  section { padding: 64px 0; }
  .vision-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---- Features ---- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.feature .ico {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg-2);
  color: var(--gold-deep);
  margin-bottom: 22px;
}
.feature h4 { font-size: 20px; font-weight: 600; margin: 0 0 8px; letter-spacing: -.01em; }
.feature p { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin: 0; }

@media (max-width: 900px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features-grid { grid-template-columns: 1fr; } }

/* ---- Villas ---- */
.villas { background: var(--ink); color: var(--paper); }
.villas .section-head h2 { color: var(--paper); }
.villas .section-head p { color: rgba(255,253,248,.7); }
.villas .eyebrow { color: var(--gold); }
.villa-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.villa {
  background: #232120;
  border: 1px solid #322f2c;
  border-radius: var(--r-xl);
  overflow: hidden;
  display: grid; grid-template-rows: 240px auto;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  cursor: pointer;
  outline: none;
}
.villa:hover, .villa:focus-visible {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 24px 48px -24px rgba(0,0,0,.55);
}
.villa:focus-visible { box-shadow: 0 0 0 2px var(--gold), 0 24px 48px -24px rgba(0,0,0,.55); }
.villa-art { position: relative; overflow: hidden; }
.villa:hover .villa-cover { transform: scale(1.04); }
.villa-art .label {
  position: absolute; top: 18px; left: 18px;
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,253,248,.94); color: var(--ink);
  display: grid; place-items: center; font-weight: 700;
  z-index: 3;
}
html[dir="rtl"] .villa-art .label { left: auto; right: 18px; }
.villa-body { padding: 24px 26px 28px; }
.villa-body h4 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
.villa-body .sub { color: rgba(255,253,248,.6); font-size: 13px; margin: 0 0 18px; }
.villa-specs {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
}
.spec {
  font-size: 12px; padding: 6px 11px; border-radius: 9999px;
  background: rgba(180,138,60,.14); color: #e6c98a;
  border: 1px solid rgba(180,138,60,.35);
  letter-spacing: .02em;
}
.villa-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--gold);
  transition: color .18s ease, gap .18s ease;
}
.villa-cta svg { transition: transform .18s ease; }
html[dir="rtl"] .villa-cta svg { transform: scaleX(-1); }
.villa:hover .villa-cta { color: #e6c98a; gap: 12px; }
.villa:hover .villa-cta svg { transform: translateX(3px); }
html[dir="rtl"] .villa:hover .villa-cta svg { transform: scaleX(-1) translateX(3px); }

/* ---- Villa Cover ---- */
.villa-cover {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  background-color: #1c1a17;
  transition: transform .5s ease;
}
.villa-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.45) 100%);
  pointer-events: none;
}

@media (max-width: 720px) { .villa-grid { grid-template-columns: 1fr; } }

/* ---- Why us pillars ---- */
.pillars-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.pillar {
  padding: 28px 24px;
  border-left: 3px solid var(--gold);
  background: var(--paper);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
html[dir="rtl"] .pillar {
  border-left: 0; border-right: 3px solid var(--gold);
  border-radius: var(--r-md) 0 0 var(--r-md);
}
.pillar .num {
  font-size: 12px; font-weight: 700; color: var(--gold-deep);
  letter-spacing: .14em; margin-bottom: 14px;
}
.pillar h5 { font-size: 22px; margin: 0 0 8px; letter-spacing: -.01em; }
.pillar p { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 0; }

@media (max-width: 900px) { .pillars-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pillars-grid { grid-template-columns: 1fr; } }

/* ---- Leadership ---- */
.leadership { background: var(--bg-2); }
.leader-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: center; }
.leader-portrait {
  aspect-ratio: 4/5; border-radius: var(--r-xl);
  background:
    linear-gradient(180deg, transparent 55%, #efe8db 100%),
    url("/static/frontend/assets/IMG_8622.f0c2141d5691.png") center 18% / contain no-repeat,
    radial-gradient(ellipse 120% 90% at 50% 40%,
      #ffffff 0%,
      #ffffff 62%,
      rgba(255,255,255,.6) 85%,
      rgba(255,255,255,0) 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 22px),
    linear-gradient(160deg, #6e8a72 0%, #2f4a3a 70%, #1c2a22 100%);
  box-shadow:
    var(--shadow-md),
    0 0 0 1px rgba(255,255,255,.4) inset;
  position: relative;
  overflow: hidden;
}
.leader-portrait .name-tag {
  position: absolute; bottom: 22px; left: 22px; right: 22px;
  color: var(--ink);
  z-index: 2;
}
.leader-portrait .name-tag .role { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; opacity: .8; }
html[dir="rtl"] .leader-portrait .name-tag .role { letter-spacing: 0; text-transform: none; }
.leader-portrait .name-tag .nm { font-size: 22px; font-weight: 600; margin-top: 6px; }

.leader-body h3 {
  font-size: clamp(28px, 3vw, 40px); line-height: 1.15; letter-spacing: -.015em;
  font-weight: 600; margin: 12px 0 18px; text-wrap: balance;
}
.leader-body p { font-size: 17px; line-height: 1.7; color: var(--ink-2); margin: 0 0 14px; }
.leader-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.leader-tag {
  font-size: 13px; padding: 6px 14px; border: 1px solid var(--line);
  border-radius: 9999px; color: var(--ink); background: var(--paper);
}

@media (max-width: 900px) { .leader-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---- Trust ---- */
.trust { padding: 88px 0; }
.trust-card {
  background: var(--green);
  color: var(--paper);
  border-radius: var(--r-xl);
  padding: 56px 56px;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center;
  position: relative; overflow: hidden;
}
.trust-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 0%, rgba(180,138,60,.25), transparent 50%);
  pointer-events: none;
}
.trust-card h3 {
  font-size: clamp(28px, 3vw, 38px); line-height: 1.15; letter-spacing: -.015em;
  font-weight: 600; margin: 10px 0 18px; text-wrap: balance;
}
.trust-card p { font-size: 17px; line-height: 1.6; opacity: .88; margin: 0; }
.trust-card .eyebrow { color: var(--gold); }
.trust-seal {
  position: relative;
  max-width: 320px; margin: 0 auto;
  border-radius: var(--r-lg);
  background: var(--paper);
  padding: 28px 32px;
  display: grid; place-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.trust-seal img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
}

@media (max-width: 900px) {
  .trust-card { grid-template-columns: 1fr; padding: 40px 28px; gap: 28px; }
}

/* ---- CTA ---- */
.cta { background: var(--bg-2); padding: 96px 0; text-align: center; }
.cta h2 {
  font-size: clamp(34px, 4.5vw, 60px);
  line-height: 1.05; letter-spacing: -.02em; font-weight: 700;
  margin: 16px 0 14px; text-wrap: balance;
}
.cta p { color: var(--ink-2); font-size: 18px; max-width: 60ch; margin: 0 auto 32px; }
.cta-row { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---- Footer ---- */
.site-footer {
  background: var(--ink); color: rgba(255,253,248,.75);
  padding: 56px 0 28px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid #322f2c; }
.footer-grid h6 { color: var(--paper); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px; }
html[dir="rtl"] .footer-grid h6 { letter-spacing: 0; text-transform: none; }
.footer-grid p, .footer-grid a { font-size: 14px; line-height: 1.7; }
.footer-grid a:hover { color: var(--gold); }
.footer-list { display: flex; flex-direction: column; gap: 8px; }
.contact-list { gap: 12px; }
.contact-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; line-height: 1.4;
  color: inherit; text-decoration: none;
  transition: color 160ms ease;
}
.contact-link svg { flex: 0 0 auto; width: 18px; height: 18px; opacity: .85; }
.contact-link:hover { color: var(--gold); }
.contact-link:hover svg { opacity: 1; }
.contact-link--static { cursor: default; }
.contact-link--static:hover { color: inherit; }
.contact-link--static:hover svg { opacity: .85; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 13px;
}
.brand-footer { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.brand-footer img { height: 40px; filter: brightness(1.05) contrast(1.05); }

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 10px; align-items: flex-start; }
}

/* ---- Modal / Lightbox ---- */
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(12,11,10,.78);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: modalFadeIn .22s ease;
}
.modal-inner {
  position: relative;
  width: 100%; max-width: 1100px;
  max-height: calc(100vh - 48px);
  background: #1a1816;
  border: 1px solid #2c2926;
  border-radius: var(--r-xl);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.7);
  color: var(--paper);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modalRise .28s cubic-bezier(.2,.7,.2,1);
}

.modal-header {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #2c2926;
  background: linear-gradient(180deg, #211e1c 0%, #1a1816 100%);
}
.modal-id {
  flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--paper); color: var(--ink);
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px; letter-spacing: -.01em;
}
.modal-title-block { flex: 1; min-width: 0; }
.modal-title {
  font-size: 22px; font-weight: 600; letter-spacing: -.01em;
  margin: 0; color: var(--paper);
}
.modal-sub {
  margin: 2px 0 0; font-size: 13px;
  color: rgba(255,253,248,.6);
}
.modal-close {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,253,248,.06); color: var(--paper);
  border: 1px solid rgba(255,253,248,.16);
  display: grid; place-items: center; cursor: pointer;
  transition: background .15s, transform .15s, border-color .15s;
}
.modal-close:hover { background: rgba(255,253,248,.16); border-color: rgba(255,253,248,.32); transform: rotate(90deg); }

.modal-body {
  display: grid; grid-template-columns: 1.6fr 1fr;
  gap: 0;
  flex: 1; min-height: 0;
}

.modal-stage {
  position: relative;
  background: #0e0d0c;
  display: flex; align-items: center; justify-content: center;
  min-height: 420px;
  overflow: hidden;
}
.modal-img {
  max-width: 100%; max-height: 100%; width: 100%; height: 100%;
  object-fit: contain; display: block;
  transition: opacity .2s ease;
}
.modal-img.light { background: #f5f0e8; }

.modal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,253,248,.1); color: var(--paper);
  border: 1px solid rgba(255,253,248,.22);
  display: grid; place-items: center; cursor: pointer;
  transition: background .15s, transform .15s; z-index: 2;
}
.modal-nav:hover { background: rgba(255,253,248,.22); transform: translateY(-50%) scale(1.06); }
.modal-nav.prev { left: 14px; }
.modal-nav.next { right: 14px; }
html[dir="rtl"] .modal-nav.prev { left: auto; right: 14px; }
html[dir="rtl"] .modal-nav.next { right: auto; left: 14px; }

.modal-counter {
  position: absolute; bottom: 14px; right: 18px;
  background: rgba(0,0,0,.6); color: rgba(255,253,248,.9);
  font-size: 12px; padding: 4px 12px; border-radius: 9999px;
  letter-spacing: .06em; z-index: 2;
  border: 1px solid rgba(255,253,248,.12);
}
html[dir="rtl"] .modal-counter { right: auto; left: 18px; }

.modal-side {
  padding: 28px 28px;
  border-left: 1px solid #2c2926;
  background: #1a1816;
  display: flex; flex-direction: column; gap: 16px;
  overflow-y: auto;
}
html[dir="rtl"] .modal-side { border-left: 0; border-right: 1px solid #2c2926; }
.modal-eyebrow {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
html[dir="rtl"] .modal-eyebrow { letter-spacing: 0; text-transform: none; }
.modal-desc {
  font-size: 15px; line-height: 1.7;
  color: rgba(255,253,248,.82);
  margin: 0;
}
.modal-specs { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-spec {
  font-size: 12px; padding: 6px 12px; border-radius: 9999px;
  background: rgba(180,138,60,.14); color: #e6c98a;
  border: 1px solid rgba(180,138,60,.35);
  letter-spacing: .02em;
}
.modal-contact { align-self: flex-start; margin-top: auto; }

.modal-thumbs {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 14px 22px;
  border-top: 1px solid #2c2926;
  background: #161413;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,253,248,.2) transparent;
}
.modal-thumbs::-webkit-scrollbar { height: 6px; }
.modal-thumbs::-webkit-scrollbar-thumb { background: rgba(255,253,248,.2); border-radius: 3px; }

.modal-thumb {
  flex-shrink: 0; width: 88px; height: 60px; border-radius: 8px;
  cursor: pointer; border: 2px solid transparent;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: .55; transition: opacity .15s, border-color .15s, transform .15s;
}
.modal-thumb.light { background-size: contain; background-color: #f5f0e8; }
.modal-thumb.active { border-color: var(--gold); opacity: 1; }
.modal-thumb:hover { opacity: .9; transform: translateY(-2px); }

@media (max-width: 900px) {
  .modal-body { grid-template-columns: 1fr; }
  .modal-stage { min-height: 320px; aspect-ratio: 4/3; }
  .modal-side {
    border-left: 0; border-top: 1px solid #2c2926;
    padding: 22px;
  }
  html[dir="rtl"] .modal-side { border-right: 0; border-top: 1px solid #2c2926; }
}
@media (max-width: 600px) {
  .modal-overlay { padding: 0; }
  .modal-inner { max-height: 100vh; border-radius: 0; border: none; }
  .modal-stage { min-height: 240px; }
  .modal-thumb { width: 64px; height: 46px; }
  .modal-nav { width: 36px; height: 36px; }
  .modal-header { padding: 14px 16px; }
  .modal-title { font-size: 18px; }
}

/* ---- Sales system ---- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-header {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.btn-small {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

.staff-menu {
  position: relative;
}

.staff-menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--paper);
  cursor: pointer;
}

.staff-menu summary::-webkit-details-marker { display: none; }
.staff-menu summary span { font-size: 14px; font-weight: 600; }
.staff-menu summary small { color: var(--gold-deep); font-size: 12px; text-transform: capitalize; }

.staff-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: grid;
  gap: 4px;
  z-index: 80;
}

html[dir="rtl"] .staff-menu-panel {
  right: auto;
  left: 0;
}

.staff-menu-panel a,
.staff-menu-panel button {
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: inherit;
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font: inherit;
}

.staff-menu-panel a:hover,
.staff-menu-panel button:hover {
  background: var(--bg-2);
}

.sales-page {
  min-height: 60vh;
}

/* Dashboard: keep content within the viewport width (no horizontal page scroll). */
.sales-page--dashboard {
  overflow-x: clip;
  max-width: 100%;
  min-width: 0;
}

.sales-hero {
  padding: 72px 0 96px;
  position: relative;
}

.sales-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% -20%, rgba(180,138,60,.10), transparent 55%),
    radial-gradient(ellipse at -10% 110%, rgba(47,74,58,.08), transparent 60%);
  pointer-events: none;
}

.sales-hero > .container {
  position: relative;
}

.sales-section-head h1 {
  font-size: clamp(34px, 4.5vw, 60px);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 14px 0 10px;
}

.sales-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  padding: 32px;
}

.sales-form {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.auth-card {
  max-width: 520px;
}

.compact-form {
  margin-bottom: 24px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label,
.field-label,
.signature-label-row label {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 12px 16px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(180,138,60,.16);
  outline: none;
}

/* OMR amount fields: keyboard decimal entry only (no number spinners). */
.input-omr-amount {
  font-variant-numeric: tabular-nums;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea,
.consent-row.has-error {
  border-color: var(--gold-deep);
}

.field-error,
.form-error {
  margin: 0;
  color: var(--gold-deep);
  font-size: 13px;
  line-height: 1.4;
}

.form-success {
  margin: 0;
  color: var(--green);
  font-size: 14px;
}

.field-help {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.choice-row label,
.consent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
}

.choice-row input,
.consent-row input {
  accent-color: var(--gold-deep);
}

.signature-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.signature-pad {
  width: 100%;
  height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  touch-action: none;
}

.confirmation-card {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
  text-align: center;
}

.confirmation-card strong {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -.02em;
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--gold-deep);
  font: inherit;
  font-weight: 600;
  justify-self: start;
  padding: 0;
}

html[dir="rtl"] .text-action {
  justify-self: end;
}

.range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.range-tabs button {
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  min-height: 40px;
  padding: 0 16px;
}

.range-tabs button.active,
.range-tabs button:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.chart-card {
  display: grid;
  gap: 22px;
}

.chart-card h3,
.table-card h3,
.compact-form h3,
.detail-card h3 {
  font-size: 24px;
  margin: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg);
}

.metric span {
  display: block;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1;
}

.mini-chart {
  width: 100%;
  height: 180px;
  color: var(--ink);
}

.mini-chart polyline {
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-chart rect {
  fill: currentColor;
  opacity: .9;
}

.breakdown {
  display: grid;
  gap: 10px;
}

.breakdown h4 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

.breakdown-row strong {
  color: var(--ink);
}

.empty-state {
  min-height: 180px;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: var(--bg);
}

.table-card {
  overflow-x: auto;
  margin-top: 24px;
}

.table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.table-heading a,
.table-card a {
  color: var(--gold-deep);
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: inherit;
  vertical-align: top;
}

th {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions button {
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: transparent;
  color: var(--ink);
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
}

.detail-card {
  display: grid;
  gap: 24px;
}

.detail-card dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 0;
}

.detail-card dt {
  color: var(--ink-2);
  font-size: 13px;
}

.detail-card dd {
  margin: 4px 0 0;
  font-weight: 600;
}

.signature-image {
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
}

.muted {
  color: var(--ink-2);
}

.skeleton-card {
  display: grid;
  gap: 16px;
}

.skeleton-card span {
  height: 48px;
  border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--bg-2), var(--paper), var(--bg-2));
  background-size: 200% 100%;
  animation: skeletonPulse 1.4s ease infinite;
}

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

/* ---- Dashboard integration (demo fidelity pass) ---- */
/* All dashboard surfaces live under .dash-* to avoid clashing with public site classes. */

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.dash-topbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-demo-banner {
  margin: -4px 0 18px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.14), rgba(37, 99, 235, 0.08));
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}

.dash-demo-drawer-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}

.dash-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink-2);
}

.dash-search svg { width: 16px; height: 16px; color: var(--ink-3); flex: 0 0 auto; }

.dash-search input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  width: 100%;
}

.dash-rangetabs {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-2);
  border-radius: 9px;
  gap: 2px;
}

.dash-rangetabs button {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .02em;
}

.dash-rangetabs button:hover:not(.is-active) { color: var(--ink); }
.dash-rangetabs button.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.dash-bell {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  display: grid;
  place-items: center;
}

.dash-bell:hover { border-color: var(--gold); color: var(--gold-deep); }

.dash-bell__dot {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 2px var(--paper);
}

.dash-bell-popover {
  position: absolute;
  top: 48px;
  inset-inline-end: 0;
  width: min(320px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 14px;
  z-index: 30;
}

.dash-bell-popover h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.dash-bell-popover ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.dash-bell-popover li {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-2);
  font-size: 13px;
  color: var(--ink-2);
}

.dash-bell-popover li b { color: var(--ink); font-weight: 600; }
.dash-bell-popover li small { color: var(--ink-3); font-size: 11px; }
.dash-bell-popover .empty {
  padding: 12px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}

/* KPI grid */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dash-kpi {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 10px;
  transition: border-color .2s ease, transform .2s ease;
}

.dash-kpi:hover { border-color: var(--gold); transform: translateY(-1px); }

.dash-kpi__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dash-kpi__label {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

html[dir="rtl"] .dash-kpi__label { letter-spacing: 0; text-transform: none; }

.dash-kpi__icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--bg-2);
  color: var(--gold-deep);
  display: grid;
  place-items: center;
}

.dash-kpi__icon svg { width: 14px; height: 14px; }
.dash-kpi__icon--green { background: var(--green-soft); color: var(--green-deep); }

.dash-kpi__value {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--ink);
}

.dash-kpi__value small {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-2);
  margin-inline-start: 4px;
}

.dash-kpi__delta {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
}

.dash-kpi__delta--up   { color: var(--green); }
.dash-kpi__delta--down { color: var(--rose); }
.dash-kpi__delta span { color: var(--ink-3); font-weight: 500; }

.dash-kpi__spark { width: 100%; height: 28px; }
.dash-kpi__spark path.area { fill: rgba(180,138,60,.18); }
.dash-kpi__spark path.line { fill: none; stroke: var(--gold-deep); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }

/* Trend + dark metric tile row */
.dash-row-trend {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

/* Generic dashboard card */
.dash-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.dash-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.dash-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.005em;
}

.dash-card__sub {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}

.dash-card--accent { position: relative; overflow: hidden; }
.dash-card--accent::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  height: 3px;
  width: 40px;
  background: var(--gold);
  border-radius: 0 0 3px 3px;
}

/* Trend (rich line) chart */
.dash-line {
  width: 100%;
  height: 220px;
}

.dash-line .grid {
  stroke: var(--line);
  stroke-dasharray: 3 5;
  opacity: .8;
}

.dash-line .axis {
  fill: var(--ink-3);
  font-size: 11px;
  letter-spacing: .04em;
}

.dash-line .area { fill: url(#dash-line-fill); }
.dash-line .line {
  fill: none;
  stroke: var(--gold-deep);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.dash-line .compare {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.8;
  stroke-dasharray: 6 6;
  opacity: .55;
}

/* Dark metric tile (closed-won) */
.dash-metric-tile {
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.dash-metric-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(180,138,60,.25), transparent 50%);
  pointer-events: none;
}

.dash-metric-tile__label {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 700;
}

html[dir="rtl"] .dash-metric-tile__label { letter-spacing: 0; text-transform: none; }

.dash-metric-tile__value {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
}

.dash-metric-tile__value small {
  font-size: 16px;
  font-weight: 500;
  opacity: .7;
  margin-inline-start: 4px;
}

.dash-metric-tile__sub { font-size: 12px; color: rgba(255,253,248,.65); }

.dash-metric-tile__delta {
  font-size: 12px;
  font-weight: 600;
  color: #b8d4be;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dash-metric-tile__delta--down { color: var(--rose-soft); }

/* Source ROI list + insights row */
.dash-row-source {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.dash-srcroi { display: grid; gap: 0; }

.dash-srcroi__row {
  display: grid;
  grid-template-columns: minmax(120px, 1.4fr) 60px 1fr 60px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
}

.dash-srcroi__row:last-child { border-bottom: none; }

.dash-srcroi__label {
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
}
.dash-srcroi__count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink);
}

.dash-srcroi__bar {
  height: 8px;
  background: var(--bg-2);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.dash-srcroi__fill {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-deep) 100%);
  border-radius: 9999px;
  transition: width .7s ease;
}

.dash-srcroi__pct {
  font-size: 11px;
  font-weight: 700;
  text-align: end;
  color: var(--green-deep);
  font-variant-numeric: tabular-nums;
  background: var(--green-soft);
  padding: 2px 8px;
  border-radius: 9999px;
  justify-self: end;
}

.dash-srcroi__pct--low {
  color: var(--rose);
  background: var(--rose-soft);
}

.dash-srcroi__pct--mid {
  color: var(--gold-deep);
  background: var(--gold-soft);
}

/* Insights */
.dash-insights { display: grid; gap: 10px; }

.dash-insight {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px;
  background: var(--bg-2);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}

.dash-insight__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--gold-soft);
  color: var(--gold-deep);
  display: grid;
  place-items: center;
}

.dash-insight__icon svg { width: 16px; height: 16px; }
.dash-insight__icon--green { background: var(--green-soft); color: var(--green-deep); }
.dash-insight__icon--rose { background: var(--rose-soft); color: var(--rose); }
.dash-insight b { color: var(--ink); font-weight: 600; }

/* Funnel */
.dash-funnel { display: grid; gap: 6px; }

.dash-funnel__row {
  display: grid;
  grid-template-columns: minmax(110px, 130px) 1fr 70px 60px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.dash-funnel__label {
  color: var(--ink);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dash-funnel__label .dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--gold);
}

.dash-funnel__bar {
  position: relative;
  height: 28px;
  background: var(--bg-2);
  border-radius: 6px;
  overflow: hidden;
}

.dash-funnel__fill {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-deep) 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-inline-end: 10px;
  color: var(--paper);
  font-weight: 700;
  font-size: 11px;
  transition: width .8s cubic-bezier(.2,.8,.2,1);
}

.dash-funnel__fill--green { background: linear-gradient(90deg, #6e8a72 0%, var(--green) 100%); }
.dash-funnel__fill--ink   { background: linear-gradient(90deg, #4a4640 0%, var(--ink) 100%); }

.dash-funnel__count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink);
  text-align: end;
}

.dash-funnel__pct {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
  text-align: end;
  font-variant-numeric: tabular-nums;
}

/* Status / source / salary triple grid */
.dash-row-mix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

/* Donut */
.dash-donut-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
}

.dash-donut {
  position: relative;
  width: 160px;
  height: 160px;
  flex: 0 0 auto;
}

.dash-donut svg { transform: rotate(-90deg); }

.dash-donut__track {
  fill: none;
  stroke: var(--bg-2);
  stroke-width: 16;
}

.dash-donut__arc {
  fill: none;
  stroke-width: 16;
  stroke-linecap: butt;
}

.dash-donut__arc--0 { stroke: var(--gold); }
.dash-donut__arc--1 { stroke: var(--gold-deep); }
.dash-donut__arc--2 { stroke: var(--green); }
.dash-donut__arc--3 { stroke: var(--ink); }
.dash-donut__arc--4 { stroke: var(--rose); }
.dash-donut__arc--5 { stroke: var(--ink-2); }
.dash-donut__arc--6 { stroke: var(--gold-soft); }

.dash-donut__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
}

.dash-donut__big {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
}

.dash-donut__sml {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 4px;
}

html[dir="rtl"] .dash-donut__sml { letter-spacing: 0; text-transform: none; }

.dash-donut-legend {
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.dash-donut-legend__row {
  display: grid;
  grid-template-columns: 12px 1fr auto auto;
  gap: 10px;
  align-items: center;
}

.dash-donut-legend__dot { width: 10px; height: 10px; border-radius: 3px; }
.dash-donut-legend__dot--0 { background: var(--gold); }
.dash-donut-legend__dot--1 { background: var(--gold-deep); }
.dash-donut-legend__dot--2 { background: var(--green); }
.dash-donut-legend__dot--3 { background: var(--ink); }
.dash-donut-legend__dot--4 { background: var(--rose); }
.dash-donut-legend__dot--5 { background: var(--ink-2); }
.dash-donut-legend__dot--6 { background: var(--gold-soft); }

.dash-donut-legend__label { color: var(--ink-2); font-weight: 500; }
.dash-donut-legend__count {
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.dash-donut-legend__pct {
  color: var(--ink-3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: end;
}

/* Histogram */
.dash-histogram {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
  padding: 0 4px;
}

.dash-histogram__bar {
  flex: 1;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: height .6s cubic-bezier(.2,.8,.2,1);
  min-height: 2px;
}

.dash-histogram__bar:hover { filter: brightness(1.1); }
.dash-histogram__bar--low  { background: linear-gradient(180deg, #c87468 0%, var(--rose) 100%); }
.dash-histogram__bar--mid  { background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%); }
.dash-histogram__bar--high { background: linear-gradient(180deg, #6e8a72 0%, var(--green) 100%); }

.dash-histogram__bar .v {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity .15s ease;
  white-space: nowrap;
}

.dash-histogram__bar:hover .v { opacity: 1; }

.dash-histogram-x {
  display: flex;
  gap: 6px;
  padding: 6px 4px 0;
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: .04em;
  border-top: 1px solid var(--line-2);
  margin-top: 4px;
}

.dash-histogram-x span { flex: 1; text-align: center; }

/* Scatter */
.dash-scatter { width: 100%; height: 220px; }
.dash-scatter .grid { stroke: var(--line); stroke-dasharray: 3 5; }
.dash-scatter .axis { fill: var(--ink-3); font-size: 11px; }
.dash-scatter circle { fill-opacity: .72; stroke: var(--paper); stroke-width: 1.5; }
.dash-scatter circle.tone-active   { fill: var(--gold-deep); }
.dash-scatter circle.tone-closed   { fill: var(--green); }
.dash-scatter circle.tone-new      { fill: var(--gold); }
.dash-scatter circle.tone-lost     { fill: var(--rose); }

.dash-scatter-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 8px;
  letter-spacing: .04em;
}

html[dir="rtl"] .dash-scatter-legend { letter-spacing: 0; }

.dash-scatter-legend .leg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dash-scatter-legend .d {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dash-scatter-legend .d.tone-active { background: var(--gold-deep); }
.dash-scatter-legend .d.tone-closed { background: var(--green); }
.dash-scatter-legend .d.tone-new    { background: var(--gold); }
.dash-scatter-legend .d.tone-lost   { background: var(--rose); }

/* Heatmap */
.dash-heatmap { display: grid; gap: 3px; }

.dash-heatmap__row {
  display: grid;
  grid-template-columns: 50px repeat(12, 1fr);
  gap: 3px;
  align-items: center;
}

.dash-heatmap__row-label {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
}

.dash-heatmap__cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--bg-2);
}

.dash-heatmap__cell--l1 { background: rgba(180,138,60,.18); }
.dash-heatmap__cell--l2 { background: rgba(180,138,60,.38); }
.dash-heatmap__cell--l3 { background: rgba(180,138,60,.62); }
.dash-heatmap__cell--l4 { background: rgba(138,104,38,.88); }

.dash-heatmap-x {
  display: grid;
  grid-template-columns: 50px repeat(12, 1fr);
  gap: 3px;
  margin-top: 6px;
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: .04em;
}

.dash-heatmap-x span { text-align: center; }

.dash-heatmap-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 10px;
}

.dash-heatmap-legend .swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

/* Leaderboard + scatter row */
.dash-row-leader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 14px;
  margin-bottom: 18px;
}

.dash-leader { display: grid; gap: 10px; }

.dash-leader__row {
  display: grid;
  grid-template-columns: 28px 28px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-2);
  font-size: 13px;
}

.dash-leader__rank {
  font-weight: 700;
  font-size: 18px;
  color: var(--ink-3);
  width: 28px;
  text-align: center;
}

.dash-leader__rank--1 { color: var(--gold-deep); }
.dash-leader__rank--2 { color: var(--gold); }
.dash-leader__rank--3 { color: var(--ink-2); }

.dash-leader__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--green);
  color: var(--paper);
  letter-spacing: .02em;
}

.dash-leader__avatar--gold { background: var(--gold); }
.dash-leader__avatar--ink { background: var(--ink); }

.dash-leader__name {
  font-weight: 600;
  color: var(--ink);
  display: grid;
  gap: 1px;
}

.dash-leader__sub {
  color: var(--ink-3);
  font-size: 11px;
}

.dash-leader__bar {
  width: 70px;
  height: 4px;
  background: var(--line);
  border-radius: 9999px;
  overflow: hidden;
}

.dash-leader__bar div {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--green) 100%);
  border-radius: 9999px;
  transition: width .8s ease;
}

.dash-leader__val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* Filter chips + search above table */
.dash-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 18px 0 14px;
}

.dash-filters__label {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin-inline-end: 4px;
}

html[dir="rtl"] .dash-filters__label { letter-spacing: 0; text-transform: none; }

.dash-filters__divider {
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 4px;
}

.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 9999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}

.dash-chip:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}

.dash-chip.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.dash-chip--select {
  padding-inline-end: 8px;
}

.dash-chip--select select {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  outline: 0;
  height: 100%;
}

/* Lead table */
.dash-table-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.dash-table-card__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
  display: grid;
  gap: 12px;
}

.dash-table-card__head-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.dash-table-card__head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.005em;
}

.dash-table-card__head a {
  font-size: 13px;
  color: var(--gold-deep);
  font-weight: 600;
  white-space: nowrap;
}

.dash-table-search {
  width: 100%;
  min-width: 0;
  position: relative;
}

.dash-search-clear {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 4px;
  margin: auto 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  border-radius: 6px;
  cursor: pointer;
}

.dash-search-clear:hover { color: var(--ink); background: var(--bg-2); }
.dash-search-clear svg { width: 14px; height: 14px; }

.dash-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 13px;
  box-sizing: border-box;
}

.dash-table thead th {
  text-align: start;
  padding: 12px 14px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

html[dir="rtl"] .dash-table thead th { letter-spacing: 0; text-transform: none; }

.dash-table thead th button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.dash-table thead th button:hover { color: var(--ink); }
.dash-table thead th button.is-sorted { color: var(--ink); }
.dash-table thead th .sort-arrow { opacity: .6; }

.dash-table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}

.dash-table tbody tr { transition: background .12s ease; }
.dash-table tbody tr:hover { background: var(--bg-2); }
.dash-table tbody tr.is-fresh {
  background: linear-gradient(90deg, rgba(180,138,60,.10) 0%, transparent 70%);
}

.dash-table tbody tr.is-fresh td:first-child {
  box-shadow: inset 3px 0 0 var(--gold);
}

html[dir="rtl"] .dash-table tbody tr.is-fresh td:first-child {
  box-shadow: inset -3px 0 0 var(--gold);
}

.dash-name-cell {
  display: grid;
  gap: 2px;
}

.dash-name-cell b { font-weight: 600; color: var(--ink); }
.dash-name-cell small { color: var(--ink-3); font-size: 11px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }

.dash-id-mono {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: var(--ink-2);
}

.dash-salary-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
}

.dash-salary-cell small {
  display: block;
  font-weight: 500;
  color: var(--ink-3);
  font-size: 11px;
  margin-top: 2px;
}

.dash-assign {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.dash-assign__name {
  font-size: 12px;
  color: var(--ink-2);
  min-width: 0;
  flex: 1 1 10rem;
  overflow-wrap: anywhere;
}

.dash-assign--empty {
  color: var(--ink-3);
  font-size: 13px;
}

.dash-score-bubble {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 2px solid transparent;
}

.dash-score-bubble--high {
  background: var(--green-soft);
  color: var(--green-deep);
  border-color: var(--green);
}

.dash-score-bubble--mid {
  background: var(--gold-soft);
  color: var(--gold-deep);
  border-color: var(--gold);
}

.dash-score-bubble--low {
  background: var(--rose-soft);
  color: var(--rose);
  border-color: var(--rose);
}

/* ---- WhatsApp registration review ---- */
.wa-review {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 16px;
}

.wa-review__sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 110px);
}

.wa-review__tabs {
  display: flex;
  gap: 2px;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
}

.wa-review__tab {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.wa-review__tab svg { width: 14px; height: 14px; }
.wa-review__tab:hover { color: var(--ink); }
.wa-review__tab.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.wa-review__search {
  position: relative;
  display: flex;
  align-items: center;
}
.wa-review__search > svg {
  position: absolute;
  inset-inline-start: 12px;
  width: 16px;
  height: 16px;
  color: var(--ink-3);
  pointer-events: none;
}
.wa-review__search input {
  width: 100%;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  padding: 0 14px 0 36px;
  font: inherit;
  font-size: 13px;
  background: var(--bg);
  color: var(--ink);
}
[dir="rtl"] .wa-review__search input { padding: 0 36px 0 14px; }
.wa-review__search input:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--paper);
}

.wa-review__list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-3);
  font-weight: 700;
}
[dir="rtl"] .wa-review__list-head { letter-spacing: 0; }
.wa-review__list-count {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--ink);
}

.wa-review__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1 1 auto;
  scrollbar-width: thin;
}
.wa-review__list li { display: block; }

.wa-lead-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: start;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  font: inherit;
  color: var(--ink);
}
.wa-lead-card:hover { border-color: var(--ink); }
.wa-lead-card.is-active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47,74,58,.10);
  background: rgba(47,74,58,.03);
}

.wa-lead-card__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.wa-lead-card__main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.wa-lead-card__name {
  font-weight: 700;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.wa-lead-card__phone {
  color: var(--ink-3);
  font-size: 12px;
  direction: ltr;
  unicode-bidi: plaintext;
}
.wa-lead-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.wa-lead-card__chip {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.wa-lead-card__chip--gold {
  background: rgba(196, 158, 76, .14);
  border-color: rgba(196, 158, 76, .42);
  color: #8a6a2f;
}
.wa-lead-card__time {
  color: var(--ink-3);
  font-size: 11px;
  white-space: nowrap;
  align-self: flex-start;
}

.wa-review__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  color: var(--ink-3);
  padding: 28px 12px;
  font-size: 13px;
}
.wa-review__empty p { margin: 0; }
.wa-review__empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(37, 211, 102, .14);
  color: #25d366;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wa-review__empty-icon svg { width: 24px; height: 24px; }

.wa-review__workspace {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wa-review__placeholder {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 56px 32px;
  color: var(--ink-3);
}
.wa-review__placeholder-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(37, 211, 102, .14);
  color: #25d366;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wa-review__placeholder-icon svg { width: 32px; height: 32px; }
.wa-review__placeholder h3 { margin: 0; color: var(--ink); font-size: 18px; }
.wa-review__placeholder p { margin: 0; max-width: 380px; }

.wa-review__form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.wa-review__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg), transparent);
}
.wa-review__identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.wa-review__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.wa-review__identity-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wa-review__identity-text h2 {
  margin: 0;
  font-size: 18px;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.wa-review__identity-text p {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}
.wa-review__identity-phone {
  direction: ltr;
  unicode-bidi: plaintext;
}
.wa-review__meta { font-size: 12px !important; }

.wa-review__quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wa-review__waLink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #25d366;
  transition: background .15s ease, border-color .15s ease;
}
.wa-review__waLink:hover { background: #1ebd5a; border-color: #1ebd5a; }
.wa-review__waLink svg { width: 16px; height: 16px; }

.wa-review__status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
[dir="rtl"] .wa-review__status-badge { letter-spacing: 0; }
.wa-review__status-badge--registered {
  background: rgba(47, 74, 58, .14);
  color: var(--green);
}
.wa-review__status-badge--rejected {
  background: rgba(176, 0, 32, .12);
  color: #b00020;
}

.wa-review__read-banner {
  padding: 12px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
}

.wa-review__body {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  align-items: stretch;
  flex: 1 1 auto;
}

.wa-review__bot-panel {
  padding: 22px 24px;
  background: var(--bg);
  border-inline-end: 1px solid var(--line);
}
.wa-review__bot-panel h3 {
  margin: 0 0 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-3);
  font-weight: 700;
}
[dir="rtl"] .wa-review__bot-panel h3 { letter-spacing: 0; }
.wa-review__bot-panel dl {
  margin: 0;
  display: grid;
  gap: 14px;
}
.wa-review__bot-panel dt {
  margin: 0;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
[dir="rtl"] .wa-review__bot-panel dt { letter-spacing: 0; }
.wa-review__bot-panel dd {
  margin: 2px 0 0;
  color: var(--ink);
  overflow-wrap: anywhere;
  font-size: 14px;
}

.wa-review__fields {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.wa-review__fields fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wa-review__fields fieldset[disabled] { opacity: .78; }
.wa-review__fields legend {
  margin: 0 0 4px;
  padding: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-3);
  font-weight: 700;
}
[dir="rtl"] .wa-review__fields legend { letter-spacing: 0; }

.wa-review__form-error {
  margin: 0 24px 12px;
}

.wa-review__actions {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 14px rgba(0,0,0,.04);
  z-index: 1;
}

.wa-review__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.wa-review__btn svg { width: 16px; height: 16px; }
.wa-review__btn--primary {
  background: var(--green);
  color: var(--paper);
  border-color: var(--green);
}
.wa-review__btn--primary:hover { background: #234436; border-color: #234436; }
.wa-review__btn--primary:disabled { opacity: .55; cursor: not-allowed; }
.wa-review__btn--reject {
  background: var(--paper);
  color: #b00020;
  border-color: rgba(176, 0, 32, .35);
}
.wa-review__btn--reject:hover {
  background: rgba(176, 0, 32, .08);
  border-color: #b00020;
}
.wa-review__btn--reject:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 1024px) {
  .wa-review {
    grid-template-columns: 1fr;
  }
  .wa-review__sidebar {
    position: static;
    max-height: none;
  }
  .wa-review__list {
    max-height: 380px;
  }
  .wa-review__body {
    grid-template-columns: 1fr;
  }
  .wa-review__bot-panel {
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 600px) {
  .wa-review__header {
    flex-direction: column;
    align-items: flex-start;
  }
  .wa-review__quick-actions {
    width: 100%;
    justify-content: space-between;
  }
  .wa-review__fields {
    padding: 18px;
  }
  .wa-review__bot-panel {
    padding: 18px;
  }
  .wa-review__actions {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 14px 18px;
  }
  .wa-review__btn {
    justify-content: center;
    width: 100%;
  }
}

/* Status pills (replaces older .status-pill which we keep for tests/compat) */
.dash-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

html[dir="rtl"] .dash-pill { letter-spacing: 0; }

.dash-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.dash-pill--gold       { background: var(--gold-soft); color: var(--gold-deep); }
.dash-pill--ink        { background: #e7e3dc; color: var(--ink); }
.dash-pill--green      { background: var(--green-soft); color: var(--green-deep); }
.dash-pill--green-deep { background: var(--green); color: var(--paper); }
.dash-pill--mute       { background: #ece6d8; color: var(--ink-3); }
.dash-pill--rose       { background: var(--rose-soft); color: var(--rose); }

.dash-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.dash-view-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.dash-empty {
  min-height: 160px;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  background: var(--bg);
  font-size: 13px;
}

/* ---- Lead detail drawer ---- */
.dash-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28,26,23,.4);
  backdrop-filter: blur(2px);
  z-index: 170;
  animation: dashFade .2s ease;
}

@keyframes dashFade { from { opacity: 0; } to { opacity: 1; } }

.dash-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  /* Wide enough for inner cards; gutters keep backdrop visible (modal, not full-bleed). */
  width: max(320px, min(1480px, calc(100vw - 48px)));
  max-width: calc(100vw - 32px);
  min-width: 0;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  background: var(--bg);
  z-index: 180;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 16px;
  overflow: hidden;
  overflow-x: hidden;
  box-sizing: border-box;
  box-shadow: 0 24px 80px -28px rgba(28,26,23,.45);
  transform: translate(-50%, -50%);
  animation: dashModalIn .24s cubic-bezier(.2,.7,.2,1);
}

html[dir="rtl"] .dash-drawer {
  box-shadow: 0 24px 80px -28px rgba(28,26,23,.45);
  animation: dashModalIn .24s cubic-bezier(.2,.7,.2,1);
}

@keyframes dashModalIn {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.98); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.dash-drawer__head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  min-width: 0;
}

.dash-drawer__title h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -.01em;
}

.dash-drawer__title p {
  font-size: 12px;
  color: var(--ink-3);
  margin: 2px 0 0;
}

.dash-drawer__title {
  flex: 1 1 12rem;
  min-width: 0;
}

.dash-drawer__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

.dash-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.dash-action-btn:hover { border-color: var(--ink); }
.dash-action-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}
.dash-action-btn:disabled:hover {
  border-color: var(--line);
}
.dash-action-btn--gold {
  background: var(--gold);
  color: var(--paper);
  border-color: var(--gold);
}

.dash-action-btn--gold:hover {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
}

.dash-action-btn--ink {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.dash-action-btn--ink:hover { background: #2c2926; }

.dash-action-btn--danger {
  background: var(--paper);
  color: #b00020;
  border-color: rgba(176, 0, 32, .35);
}

.dash-action-btn--danger:hover {
  background: rgba(176, 0, 32, .08);
  border-color: #b00020;
}

.dash-whatsapp-callout {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  margin: 18px 0 4px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ecf9f1 0%, #d8efe2 100%);
  border: 1px solid rgba(37, 211, 102, 0.28);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.dash-whatsapp-callout:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.16);
  border-color: rgba(37, 211, 102, 0.55);
}
.dash-whatsapp-callout.has-pending {
  border-color: rgba(37, 211, 102, 0.6);
  background: linear-gradient(135deg, #e3f7ec 0%, #c8ecd7 100%);
}
.dash-whatsapp-callout__icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #25d366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dash-whatsapp-callout__icon svg { width: 26px; height: 26px; }
.dash-whatsapp-callout__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.dash-whatsapp-callout__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.dash-whatsapp-callout__hint {
  font-size: 13px;
  color: rgba(33, 33, 33, 0.72);
  line-height: 1.45;
}
.dash-whatsapp-callout__count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(37, 211, 102, 0.4);
}
.dash-whatsapp-callout__count-num {
  font-size: 20px;
  font-weight: 700;
  color: #128c4f;
  line-height: 1;
}
.dash-whatsapp-callout__count-label {
  font-size: 12px;
  color: rgba(33, 33, 33, 0.65);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dash-whatsapp-callout__action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #128c4f;
}
.dash-whatsapp-callout__action svg {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}
.dash-whatsapp-callout:hover .dash-whatsapp-callout__action svg {
  transform: translateX(3px);
}
[dir="rtl"] .dash-whatsapp-callout__action svg {
  transform: scaleX(-1);
}
[dir="rtl"] .dash-whatsapp-callout:hover .dash-whatsapp-callout__action svg {
  transform: scaleX(-1) translateX(3px);
}

@media (max-width: 720px) {
  .dash-whatsapp-callout {
    flex-wrap: wrap;
    padding: 14px 16px;
    gap: 12px;
  }
  .dash-whatsapp-callout__icon { width: 40px; height: 40px; }
  .dash-whatsapp-callout__icon svg { width: 22px; height: 22px; }
  .dash-whatsapp-callout__body {
    flex: 1 1 calc(100% - 60px);
    min-width: 0;
  }
  .dash-whatsapp-callout__count {
    order: 3;
    padding: 6px 12px;
  }
  .dash-whatsapp-callout__count-num { font-size: 17px; }
  .dash-whatsapp-callout__action {
    order: 4;
    margin-inline-start: auto;
  }
}

.dash-removed-modal__body {
  padding: 18px 28px 24px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.dash-removed-modal__empty {
  padding: 32px 0;
  text-align: center;
  color: var(--ink-3);
}

.dash-removed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dash-removed-table th,
.dash-removed-table td {
  padding: 10px 12px;
  text-align: start;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.dash-removed-table th {
  font-weight: 600;
  color: var(--ink-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--paper);
}

.dash-removed-table tr:last-child td { border-bottom: none; }

.dash-status-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.dash-drawer__close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.dash-drawer__close:hover { background: var(--ink); color: var(--paper); }

.dash-drawer__body {
  flex: 1;
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px 32px 60px;
  padding-bottom: max(60px, env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: 22px;
}

/* Score / priority card */
.dash-score-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
}

.dash-score-ring {
  position: relative;
  width: 120px;
  height: 120px;
}

.dash-score-ring svg { transform: rotate(-90deg); }
.dash-score-ring__track { fill: none; stroke: var(--bg-2); stroke-width: 12; }
.dash-score-ring__arc {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dasharray .8s ease;
}

.dash-score-ring__arc--high { stroke: var(--green); }
.dash-score-ring__arc--mid  { stroke: var(--gold); }
.dash-score-ring__arc--low  { stroke: var(--rose); }

.dash-score-ring__val {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.dash-score-ring__val small {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  margin-inline-start: 2px;
  letter-spacing: 0;
}

.dash-score-info__eyebrow {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
  margin-bottom: 6px;
}

html[dir="rtl"] .dash-score-info__eyebrow { letter-spacing: 0; text-transform: none; }

.dash-score-info__title {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -.01em;
}

.dash-score-info__why {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.dash-score-info__why b { color: var(--ink); font-weight: 600; }

.dash-score-factor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
}

.dash-score-factor::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  display: inline-block;
}

.dash-score-factor--on::before { background: var(--green); }
.dash-score-factor--off::before { background: var(--bg-3); }

/* Drawer details grid — same outer width / box model as .dash-score-card in the drawer */
.dash-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.dash-drawer__body > .dash-detail-grid {
  justify-self: stretch;
}

.dash-detail-grid > * {
  min-width: 0;
}

.dash-kv-list {
  display: grid;
  gap: 10px;
}

.dash-kv {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
}

.dash-kv:last-child { border-bottom: none; }

.dash-kv__k {
  color: var(--ink-3);
  font-weight: 600;
  letter-spacing: .02em;
  font-size: 12px;
}

.dash-kv__v {
  color: var(--ink);
  font-weight: 500;
  word-break: break-word;
}

.dash-phone {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  font-feature-settings: "tnum" 1;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}
.dash-phone:hover { color: var(--accent, #0a6); border-bottom-color: currentColor; }
html[dir="rtl"] .dash-phone { text-align: left; }

.dash-signature {
  margin-top: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.dash-signature__title {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin-bottom: 8px;
}

html[dir="rtl"] .dash-signature__title { letter-spacing: 0; text-transform: none; }

.dash-signature__pad {
  background:
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(180,138,60,.04) 12px 14px),
    var(--paper);
  border: 1px dashed var(--line);
  border-radius: 8px;
  min-height: 140px;
  display: grid;
  place-items: center;
  padding: 8px;
}

.dash-signature__pad img {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
}

.dash-signature--editable .signature-field {
  margin-top: 12px;
}

.dash-signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.dash-signature-actions .btn {
  cursor: pointer;
}

.dash-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 16px;
  margin-bottom: 14px;
}

.dash-edit-grid .form-field {
  margin: 0;
}

.dash-consent-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
}

.dash-submission-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
}

.dash-submission-meta .dash-kv {
  font-size: 12px;
  color: var(--ink-3);
}

/* Timeline */
.dash-timeline { display: grid; gap: 0; }

.dash-timeline__item {
  position: relative;
  padding-inline-start: 26px;
  padding-block: 8px;
  font-size: 13px;
}

.dash-timeline__item::before {
  content: "";
  position: absolute;
  inset-inline-start: 6px;
  top: 14px;
  bottom: -8px;
  width: 1px;
  background: var(--line);
}

.dash-timeline__item:last-child::before { display: none; }

.dash-timeline__item::after {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 12px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--gold);
}

.dash-timeline__item--done::after {
  background: var(--green);
  border-color: var(--green);
}

.dash-timeline__item b { color: var(--ink); font-weight: 600; }
.dash-timeline__item small {
  display: block;
  color: var(--ink-3);
  font-size: 11px;
  margin-top: 1px;
}

.dash-notes textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}

.dash-notes textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(180,138,60,.14);
}

/* Toast */
.dash-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  animation: dashToastIn .25s ease;
}

@keyframes dashToastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.dash-toast .check { color: var(--green-soft); }

/* ---- Dashboard phone layout (scrollable cards) ---- */
@media (max-width: 640px) {
  .dash-insight {
    overflow-wrap: anywhere;
  }
  .dash-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Force minimum widths on inner charts so they trigger horizontal scroll instead of squeezing */
  .dash-line,
  .dash-scatter,
  .dash-srcroi,
  .dash-funnel,
  .dash-leader,
  .dash-heatmap,
  .dash-histogram {
    min-width: 480px;
  }
  .dash-donut-wrap {
    min-width: 320px;
  }
}

/* Lead drawer + recent registrations: tablet / iPad (stack before narrow-phone dashboard rules) */
@media (max-width: 1024px) {
  /* ----- Drawer / view popup ----- */
  .dash-drawer {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }
  .dash-drawer__head {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title close"
      "actions actions";
    align-items: start;
    column-gap: 14px;
    row-gap: 12px;
    padding: 14px 18px;
    flex-wrap: initial;
  }
  .dash-drawer__close {
    grid-area: close;
    align-self: start;
  }
  .dash-drawer__title {
    grid-area: title;
    min-width: 0;
    flex: initial;
  }
  .dash-drawer__title h2 {
    font-size: 20px;
    line-height: 1.25;
  }
  .dash-drawer__actions {
    grid-area: actions;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    flex: initial;
  }
  .dash-drawer__actions .dash-action-btn {
    flex: 0 1 auto;
    min-width: 0;
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
    justify-content: center;
  }
  .dash-drawer__actions .dash-action-btn--gold {
    flex: 1 1 auto;
    min-width: 140px;
  }
  .dash-drawer__body {
    padding: 22px 22px 56px;
    gap: 18px;
  }
  .dash-detail-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .dash-score-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .dash-score-card > div:last-child {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
    text-align: start;
  }
  .dash-score-ring {
    margin: 0 auto;
  }
  .dash-drawer .dash-kv {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }
  .dash-drawer .dash-kv__k {
    padding-bottom: 2px;
  }
  .dash-villa-pricing__table {
    white-space: normal;
    font-size: 12.5px;
  }
  .dash-villa-pricing__table th,
  .dash-villa-pricing__table td {
    padding: 8px 6px;
  }

  /* ----- Recent registrations card: stack rows as cards ----- */
  .dash-table-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 14px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .dash-table-card__head {
    padding: 16px 18px 14px;
    gap: 12px;
    background: linear-gradient(180deg, var(--bg-2) 0%, var(--paper) 72%);
    min-width: 0;
  }
  .dash-table-card__head-top {
    align-items: center;
  }
  .dash-table-card__head h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }
  .dash-table-card__head a {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-deep);
  }
  .dash-table {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    box-sizing: border-box;
  }
  .dash-table thead {
    display: none;
  }
  .dash-table tbody,
  .dash-table tr,
  .dash-table td {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .dash-table tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 16px;
    min-width: 0;
    box-sizing: border-box;
  }
  .dash-table tbody tr {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 14px 32px -28px rgba(31, 41, 51, .35);
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .dash-table tbody tr:hover {
    background: var(--paper);
  }
  .dash-table tbody tr.is-fresh {
    background: linear-gradient(180deg, rgba(180,138,60,.10), var(--paper) 52%);
  }
  .dash-table tbody tr.is-fresh td:first-child,
  html[dir="rtl"] .dash-table tbody tr.is-fresh td:first-child {
    box-shadow: none;
  }
  .dash-table tbody td {
    display: grid;
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
    gap: 8px 12px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-2);
    text-align: start;
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }
  .dash-table tbody td:last-child {
    grid-template-columns: 1fr;
    border-bottom: 0;
    padding-bottom: 0;
  }
  .dash-table tbody td::before {
    content: attr(data-label);
    color: var(--ink-3);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .04em;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .dash-table tbody td[data-label=""]::before {
    display: none;
  }
  .dash-table tbody td > * {
    min-width: 0;
    max-width: 100%;
  }
  .dash-table tbody .dash-score-bubble {
    max-width: none;
    justify-self: start;
  }
  .dash-table tbody .dash-pill {
    white-space: normal;
    text-align: start;
    justify-self: start;
  }
  .dash-name-cell b,
  .dash-name-cell small,
  .dash-id-mono {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .dash-view-btn {
    width: 100%;
    min-height: 40px;
    justify-content: center;
  }
}

/* Smaller iPad / portrait: stack lead cards in a single column */
@media (max-width: 880px) {
  .dash-table tbody {
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .dash-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-row-trend,
  .dash-row-source,
  .dash-row-mix,
  .dash-row-leader { grid-template-columns: 1fr; }
}

/* Tablet / iPad: pack rows into 2 columns instead of one full-width column */
@media (min-width: 761px) and (max-width: 1100px) {
  .dash-row-trend {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 14px;
  }
  .dash-row-source,
  .dash-row-mix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  /* Third card on a 3-card row spans both columns to avoid an empty cell */
  .dash-row-source > *:nth-child(3),
  .dash-row-mix > *:nth-child(3) {
    grid-column: 1 / -1;
  }
  .dash-row-leader {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  /* Tighter cards so charts breathe inside narrower tiles */
  .sales-page--dashboard .dash-card {
    padding: 16px;
    gap: 12px;
  }
  .sales-page--dashboard .dash-card__title { font-size: 15px; }
  .sales-page--dashboard .dash-card__sub { font-size: 11px; }

  /* Reduced chart heights to keep things compact */
  .sales-page--dashboard .dash-line { height: 200px; }
  .sales-page--dashboard .dash-scatter { height: 200px; }

  /* Donut: stack when narrow so the legend isn't squeezed */
  .dash-donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
  }
  .dash-donut-legend { width: 100%; }

  /* Source/pages list: keep label readable; widen the bar for visibility */
  .dash-srcroi__row {
    grid-template-columns: minmax(0, 1.6fr) 48px minmax(60px, 1fr) 50px;
    gap: 8px;
    font-size: 12px;
  }

  /* Funnel rows tighter */
  .dash-funnel__row {
    font-size: 12px;
  }

  /* Leader rows: compact spacing */
  .dash-leader__row {
    padding: 6px 8px;
    gap: 8px;
  }
}

@media (max-width: 900px) {
  .sales-page--dashboard .sales-hero {
    padding: 40px 0 52px;
  }
  .sales-hero { padding: 56px 0 64px; }
  .dashboard-grid,
  .form-grid-2,
  .detail-card dl { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .dash-search { min-width: 0; flex: 1; width: 100%; }
  .dash-drawer__head { padding: 16px 20px; }
  .dash-drawer__body { padding: 18px 20px 60px; padding-bottom: max(60px, env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .sales-page--dashboard .sales-hero {
    padding: 24px 0 32px;
  }
  .sales-page--dashboard .section-head.sales-section-head {
    margin-bottom: 20px;
  }
  .sales-page--dashboard .sales-section-head h1 {
    font-size: clamp(22px, 6.5vw, 32px);
  }
  .sales-page--dashboard .sales-section-head p {
    font-size: 14px;
    line-height: 1.5;
  }
  .sales-page--dashboard .dash-topbar {
    justify-content: flex-end;
    gap: 10px;
  }
  .sales-page--dashboard .dash-line {
    height: 180px;
  }
  .sales-page--dashboard .dash-scatter {
    height: 190px;
  }
  .sales-page--dashboard .dash-kpi {
    padding: 14px 14px 12px;
  }
  .sales-page--dashboard .dash-kpi__value {
    font-size: 28px;
  }
  .sales-page--dashboard .dash-metric-tile__value {
    font-size: 34px;
  }
  .sales-page--dashboard .dash-card {
    min-width: 0;
  }
  .site-header-inner { height: auto; min-height: 76px; flex-wrap: wrap; padding: 12px 20px; }
  .header-actions { margin-inline-start: auto; }
  .sales-card { padding: 22px; border-radius: var(--r-lg); }
  .choice-row { display: grid; }
  .signature-pad { height: 200px; }
  .staff-menu summary small { display: none; }
  .dash-kpi-grid { grid-template-columns: 1fr; }
  .dash-topbar,
  .dash-topbar__actions,
  .dash-rangetabs,
  .dash-filters,
  .dash-chip,
  .dash-chip--select select {
    width: 100%;
  }
  .dash-topbar__actions,
  .dash-filters {
    align-items: stretch;
  }
  .dash-rangetabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dash-chip {
    justify-content: space-between;
    min-height: 38px;
    height: auto;
  }
  .dash-table-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
  }
  .dash-table-card__head {
    padding: 14px 14px 12px;
    gap: 10px;
    background: linear-gradient(180deg, var(--bg-2) 0%, var(--paper) 72%);
    min-width: 0;
  }
  .dash-table-card__head-top {
    align-items: center;
  }
  .dash-table-card__head h3 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--ink);
  }
  .dash-table-card__head a {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-deep);
  }
  .dash-table {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    box-sizing: border-box;
  }
  .dash-table thead {
    display: none;
  }
  .dash-table tbody,
  .dash-table tr,
  .dash-table td {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .dash-table tbody {
    display: grid;
    gap: 12px;
    padding: 12px 12px 16px;
    min-width: 0;
    box-sizing: border-box;
  }
  .dash-table tbody tr {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 14px 32px -28px rgba(31, 41, 51, .35);
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .dash-table tbody tr:hover {
    background: var(--paper);
  }
  .dash-table tbody tr.is-fresh {
    background: linear-gradient(180deg, rgba(180,138,60,.10), var(--paper) 52%);
  }
  .dash-table tbody tr.is-fresh td:first-child,
  html[dir="rtl"] .dash-table tbody tr.is-fresh td:first-child {
    box-shadow: none;
  }
  .dash-table tbody td {
    display: grid;
    grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
    gap: 8px 10px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-2);
    text-align: start;
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }
  .dash-table tbody td:last-child {
    grid-template-columns: 1fr;
    border-bottom: 0;
    padding-bottom: 0;
  }
  .dash-table tbody td::before {
    content: attr(data-label);
    color: var(--ink-3);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .dash-table tbody td[data-label=""]::before {
    display: none;
  }
  .dash-table tbody td > * {
    min-width: 0;
    max-width: 100%;
  }
  .dash-table tbody .dash-score-bubble {
    max-width: none;
    justify-self: start;
  }
  .dash-table tbody .dash-pill {
    white-space: normal;
    text-align: start;
    justify-self: start;
  }
  .dash-name-cell b,
  .dash-name-cell small,
  .dash-id-mono {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .dash-view-btn {
    width: 100%;
    min-height: 40px;
    justify-content: center;
  }
  .dash-drawer__body {
    padding-inline: 16px;
    padding-bottom: max(48px, env(safe-area-inset-bottom, 0px));
  }
  .dash-drawer__head {
    padding-inline: 16px;
  }
  .dash-villa-pricing__table {
    white-space: normal;
    font-size: 12px;
  }
}

.omr-symbol {
  display: inline-block;
  height: 0.95em;
  width: auto;
  vertical-align: -0.12em;
  margin-inline: 0.15em;
}

.dash-villa-pricing__hint {
  font-size: 12px;
  color: var(--ink-3);
  margin: 0 0 10px;
  line-height: 1.55;
}
.dash-villa-pricing__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
  white-space: nowrap;
}
.dash-villa-pricing__table th,
.dash-villa-pricing__table td {
  text-align: start;
  padding: 8px 8px;
  border-bottom: 1px solid var(--line, #edf0f2);
  vertical-align: middle;
}
.dash-villa-pricing__table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.dash-villa-pricing__table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}
.dash-villa-pricing__table tbody tr:hover {
  background: rgba(37, 99, 184, 0.05);
}
.dash-villa-pricing__table tbody tr.is-selected {
  background: rgba(37, 99, 184, 0.10);
}
.dash-villa-pricing__table tbody tr.is-selected td {
  font-weight: 600;
}
.dash-progress__hint {
  font-size: 12px;
  color: var(--ink-3);
  margin: 0 0 12px;
  line-height: 1.55;
}
.dash-progress__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dash-progress__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line, #edf0f2);
  border-radius: 8px;
  background: var(--paper, #fff);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.dash-progress__item.is-done {
  background: rgba(46, 139, 87, 0.06);
  border-color: rgba(46, 139, 87, 0.35);
}
.dash-progress__item.is-auto {
  opacity: 0.85;
}
.dash-progress__item label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13.5px;
  flex: 1;
}
.dash-progress__item.is-auto label {
  cursor: default;
}
.dash-progress__item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green, #2e8b57);
  cursor: pointer;
  flex: 0 0 auto;
}
.dash-progress__item.is-auto input[type="checkbox"] {
  cursor: not-allowed;
}
.dash-progress__label {
  line-height: 1.4;
}
.dash-progress__item.is-done .dash-progress__label {
  font-weight: 600;
}
.dash-progress__meta {
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
  align-self: center;
}
.dash-progress__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-3, #f1f3f5);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
}
.dash-progress__item.is-done .dash-progress__step {
  background: var(--green, #2e8b57);
  color: #fff;
}
.dash-progress__item.is-final.is-done {
  background: rgba(216, 139, 36, 0.10);
  border-color: rgba(216, 139, 36, 0.5);
}
.dash-progress__item.is-final.is-done .dash-progress__step {
  background: var(--gold, #c89322);
}

.dash-down-payment {
  border: 1px solid var(--line, #edf0f2);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.dash-down-payment.is-active {
  background: rgba(46, 139, 87, 0.05);
  border-color: rgba(46, 139, 87, 0.35);
}
.dash-down-payment__hint {
  font-size: 12px;
  color: var(--ink-3);
  margin: 0 0 10px;
  line-height: 1.55;
}
.dash-down-payment__row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-down-payment__row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line, #d7dbe0);
  border-radius: 8px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  background: var(--paper, #fff);
}
.dash-down-payment__row input:focus {
  outline: 2px solid var(--green, #2e8b57);
  outline-offset: 1px;
}
.dash-down-payment__row .omr-symbol {
  height: 1.2em;
}

.dash-payment-receipt {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line, #edf0f2);
}
.dash-payment-receipt strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}
.dash-payment-receipt p {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
}
.dash-payment-receipt__upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px dashed var(--line, #d7dbe0);
  border-radius: 8px;
  background: var(--paper, #fff);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.dash-payment-receipt__upload input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.dash-payment-receipt__preview {
  display: grid;
  gap: 8px;
}
.dash-payment-receipt__preview img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border: 1px solid var(--line, #d7dbe0);
  border-radius: 8px;
  background: #fff;
}

.dash-villa-pricing__selected {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(37, 99, 184, 0.08);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink);
}

/* ---- Staff create/invite tabs ---- */
.staff-mode-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 14px;
  align-self: flex-start;
}
.staff-mode-tabs button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
}
.staff-mode-tabs button.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* ---- Password strength meter ---- */
.pwd-strength {
  display: grid;
  gap: 6px;
  margin: -4px 0 8px;
}
.pwd-strength__bar {
  position: relative;
  height: 6px;
  background: var(--bg-2);
  border-radius: 999px;
  overflow: hidden;
}
.pwd-strength__bar > span {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  border-radius: 999px;
  transition: width .2s ease, background .2s ease;
}
.pwd-strength__bar--low > span { background: var(--rose); }
.pwd-strength__bar--mid > span { background: var(--gold); }
.pwd-strength__bar--high > span { background: var(--green); }
.pwd-strength__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.pwd-strength__label--low  { color: var(--rose); font-weight: 700; }
.pwd-strength__label--mid  { color: var(--gold-deep); font-weight: 700; }
.pwd-strength__label--high { color: var(--green-deep); font-weight: 700; }
.pwd-strength__ok { color: var(--green-deep); font-weight: 600; }
.pwd-strength__errors {
  margin: 4px 0 0;
  padding-inline-start: 18px;
  font-size: 12px;
  color: var(--rose);
  display: grid;
  gap: 2px;
}

/* ── Edit-history card ─────────────────────────────── */
.dash-edit-history-card {
  padding: 16px;
  gap: 10px;
}

.dash-edit-history-card .dash-card__title {
  font-size: 15px;
}

.dash-edit-history {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}

.dash-edit-history__row {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-2);
}

.dash-edit-history__row:last-child { border-bottom: 0; }
.dash-edit-history__row:first-child { padding-top: 0; }

.dash-edit-history__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  background: var(--gold);
}

.dash-edit-history__dot--removed  { background: var(--rose); }
.dash-edit-history__dot--restored { background: var(--green); }

.dash-edit-history__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dash-edit-history__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

[dir="rtl"] .dash-edit-history__head { flex-direction: row-reverse; }

.dash-edit-history__actor {
  font-weight: 600;
  font-size: 12px;
  color: var(--ink);
}

.dash-edit-history__time {
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dash-edit-history__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dash-edit-history__chip {
  display: inline-block;
  font-size: 10.5px;
  line-height: 1.4;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-deep);
  border: 1px solid var(--line);
}

.dash-edit-history__row--removed .dash-edit-history__chip {
  background: var(--rose-soft);
  color: var(--rose);
  border-color: var(--rose-soft);
}

.dash-edit-history__row--restored .dash-edit-history__chip {
  background: var(--green-soft);
  color: var(--green);
  border-color: var(--green-soft);
}

.dash-edit-history__empty {
  color: var(--ink-3);
  font-size: 12px;
  margin: 0;
}
