/* emerge CRM demo — only what the static demo adds or adjusts on top of the
   app's own CSS (vendor.css + screens.css): the sample-data ribbon, toasts,
   tap-to-move menu, and the current (2026-09) layouts of the pipeline, leads
   inbox, quote editor and dashboard as they appear in the live app. */

:root {
  --d-ink: #0a2540;
  --d-ink-2: #425466;
  --d-ink-3: #697386;
  --d-rim: rgba(0, 0, 0, 0.07);
  --d-green: #84cc16;
  --d-green-deep: #4d7c0f;
  --d-green-dark: #1f5132;
  --d-green-soft: #ecfccb;
  --d-card: 0 0 0 0.5px rgba(50, 50, 93, 0.1), 0 2px 5px -1px rgba(50, 50, 93, 0.08), 0 1px 3px -1px rgba(0, 0, 0, 0.05);
}
html[lang="ar"] body { font-family: "IBM Plex Sans Arabic", "Cairo", "Geist", system-ui, sans-serif; }
html[lang="en"] body { font-family: "Geist", "Inter", system-ui, sans-serif; }

/* ---------------------------------------------------------------- ribbon */
.demo-ribbon {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 6px 14px;
  background: var(--d-green-dark);
  color: #f0fdf4;
  font-size: 13px;
  font-weight: 600;
}
.demo-ribbon-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--d-green); box-shadow: 0 0 0 4px rgba(132, 204, 22, 0.25); flex: none; }
.demo-ribbon-txt { flex: 1; min-width: 0; }
.demo-ribbon-cta {
  flex: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--d-green);
  color: #0a0a0b;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.demo-ribbon-cta:hover { filter: brightness(1.06); }
.demo-role {
  float: inline-end;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: #06b6d4;
}

/* ---------------------------------------------------------------- sidebar: which pages are interactive */
/* Live pages glow (lime ring + breathing halo); the rest are dimmed. */
.sidebar .nav-item.is-locked { opacity: 0.4; }
.sidebar .nav-item.is-locked:hover { opacity: 0.65; }
.sidebar .nav-item.is-live {
  position: relative;
  color: #eaffc9;
  background: linear-gradient(90deg, rgba(132, 204, 22, 0.16), rgba(132, 204, 22, 0.05));
  box-shadow: inset 0 0 0 1px rgba(159, 230, 58, 0.38), 0 0 18px -6px rgba(132, 204, 22, 0.55);
  animation: demoGlow 2.8s ease-in-out infinite;
}
.sidebar .nav-item.is-live + .nav-item.is-live { margin-top: 4px; }
.sidebar .nav-item.is-live .label { font-weight: 700; color: #f2ffe0; }
.sidebar .nav-item.is-live svg { color: #b8f057; filter: drop-shadow(0 0 6px rgba(159, 230, 58, 0.7)); }
.sidebar .nav-item.is-live:hover { background: linear-gradient(90deg, rgba(132, 204, 22, 0.26), rgba(132, 204, 22, 0.1)); }
.sidebar .nav-item.is-live.active {
  background: linear-gradient(90deg, rgba(159, 230, 58, 0.32), rgba(132, 204, 22, 0.14));
  box-shadow: inset 0 0 0 1.5px #9fe63a, 0 0 24px -4px rgba(132, 204, 22, 0.75);
  animation: none;
}
.demo-live-dot {
  margin-inline-start: auto;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9fe63a;
  box-shadow: 0 0 0 0 rgba(159, 230, 58, 0.6), 0 0 8px #9fe63a;
  animation: demoDot 1.8s ease-out infinite;
}
@keyframes demoGlow {
  50% { box-shadow: inset 0 0 0 1px rgba(159, 230, 58, 0.62), 0 0 26px -4px rgba(132, 204, 22, 0.8); }
}
@keyframes demoDot {
  70% { box-shadow: 0 0 0 7px rgba(159, 230, 58, 0), 0 0 8px #9fe63a; }
  100% { box-shadow: 0 0 0 0 rgba(159, 230, 58, 0), 0 0 8px #9fe63a; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar .nav-item.is-live, .demo-live-dot, .pl-tip i { animation: none; }
}

/* ---------------------------------------------------------------- toast + hints */
.demo-toast {
  position: fixed;
  z-index: 400;
  bottom: 18px;
  left: 50%;
  translate: -50% 16px;
  max-width: min(92vw, 560px);
  padding: 12px 18px;
  border-radius: 14px;
  background: #0f172a;
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, translate 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.demo-toast.is-on { opacity: 1; translate: -50% 0; }
.demo-toast.is-win { background: var(--d-green-dark); box-shadow: 0 18px 40px -12px rgba(31, 81, 50, 0.6), 0 0 0 3px rgba(132, 204, 22, 0.35); }
.demo-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(77, 124, 15, 0.45);
  background: var(--d-green-soft);
  color: #365314;
  font-size: 13.5px;
  font-weight: 500;
  transition: opacity 0.4s, max-height 0.4s, margin 0.4s, padding 0.4s;
  max-height: 120px;
}
.demo-hint .icon { width: 16px; height: 16px; flex: none; }
html[dir="rtl"] .demo-hint .icon { transform: scaleX(-1); }
.demo-hint.is-done { opacity: 0; max-height: 0; margin: 0; padding-block: 0; overflow: hidden; }

/* ---------------------------------------------------------------- pipeline (deals-v2) */
.demo-dv2 { background: transparent; }
.demo-dv2 .app { display: block; min-height: 0; }
.demo-dv2[dir="rtl"] { font-family: "IBM Plex Sans Arabic", "Cairo", system-ui, sans-serif; letter-spacing: 0; }
.demo-dv2 .main { padding: 0 4px 28px; }
#demoScreen:has(> .demo-dv2) { padding-top: 20px; }
/* Compact header: title line, stats strip and one toolbar, so the board
   sits above the fold. */
.pl-top { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 0 0 14px; }
.pl-top-t { min-width: 0; margin-inline-end: auto; }
.pl-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; margin: 0; font-size: 22px; font-weight: 800; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
.pl-title-m { font-size: 14px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.pl-title-m b { color: var(--brand-deep); font-weight: 800; }
.pl-tip { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 12.5px; font-weight: 600; color: var(--brand-deep); }
.pl-tip i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #84cc16; animation: demoDot 1.8s ease-out infinite; }
.pl-top-acts { display: flex; gap: 8px; }
.demo-dv2 .btn-ghost,
.demo-dv2 .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--rim-2);
  background: var(--pane);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.demo-dv2 .btn-ghost .icon { width: 16px; height: 16px; }
.demo-dv2 .btn-primary { background: var(--d-green-dark); border-color: var(--d-green-dark); color: #fff; box-shadow: 0 6px 14px -6px rgba(31, 81, 50, 0.6); }
.demo-dv2 .btn-primary:hover { filter: brightness(1.1); }

.pl-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 14px; border-radius: 14px; background: var(--pane); box-shadow: var(--shadow-card); overflow: hidden; }
.pl-stat { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 11px 16px 12px; }
.pl-stat + .pl-stat { border-inline-start: 1px solid var(--rim); }
.pl-stat-l { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-stat-l .icon { flex: none; width: 14px; height: 14px; color: var(--brand-deep); }
.pl-stat-v { font-size: 20px; font-weight: 800; line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.pl-stat-v .cur { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.pl-stat-s { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-stat-s b { color: var(--ink-2); }
.pl-stat-s a { display: inline-flex; align-items: center; gap: 3px; color: var(--brand-deep); font-weight: 700; }
.pl-stat-s a .icon { width: 12px; height: 12px; }
html[dir="rtl"] .pl-stat-s a .icon { transform: scaleX(-1); }
.pl-stat.is-warn .pl-stat-v, .pl-stat.is-warn .pl-stat-l .icon { color: #c2410c; }
.pl-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.dv2-f { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rim-2); background: var(--pane); font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.dv2-f .icon { width: 14px; height: 14px; }
.dv2-f.is-on { background: var(--brand-soft); border-color: rgba(132, 204, 22, 0.45); color: var(--brand-text); }
.dv2-seg { display: inline-flex; border: 1px solid var(--rim-2); border-radius: 999px; background: var(--pane); padding: 2px; }
.dv2-seg span { padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.dv2-seg span.is-on { background: var(--bg); color: var(--ink); }
.dv2-spacer { flex: 1; }

.demo-dv2 .main { container-type: inline-size; }
.pl-close { display: flex; align-items: center; gap: 8px; }
.pl-close-l { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.pl-drop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px dashed;
  background: var(--pane);
  font-size: 13px;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}
.pl-drop .icon { width: 15px; height: 15px; flex: none; }
.pl-drop b { font-weight: 800; }
.pl-drop.is-won { border-color: rgba(77, 124, 15, 0.5); color: var(--brand-deep); }
.pl-drop.is-lost { border-color: rgba(223, 27, 65, 0.4); color: var(--red); }
.pl-drop.is-won.is-over { background: var(--brand-soft); border-style: solid; transform: scale(1.06); box-shadow: 0 10px 24px -12px rgba(77, 124, 15, 0.6); }
.pl-drop.is-lost.is-over { background: var(--red-soft); border-style: solid; transform: scale(1.06); }

.pl-scroll { overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.pl-board { display: grid; grid-template-columns: repeat(5, minmax(158px, 1fr)); gap: 10px; align-items: start; }
.pl-col { display: flex; flex-direction: column; min-width: 0; border-radius: 16px; background: rgba(10, 37, 64, 0.035); scroll-snap-align: start; }
.pl-col-h { padding: 12px 12px 10px; border-top: 3px solid var(--c); border-radius: 16px 16px 0 0; }
.pl-col-t { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.pl-col-t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-count { font-style: normal; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--pane); box-shadow: var(--shadow-sm); font-size: 11px; color: var(--ink-2); }
.pl-col-v { margin-top: 6px; white-space: nowrap; }
.pl-col-v b { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.pl-col-v small { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.pl-col-bar { height: 4px; margin-top: 8px; border-radius: 999px; background: var(--rim); overflow: hidden; }
.pl-col-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--c); }
.pl-col-w { margin-top: 6px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-col-w b { color: var(--ink-2); }
.pl-col-body { display: flex; flex-direction: column; gap: 8px; min-height: 120px; padding: 2px 8px 10px; border-radius: 0 0 16px 16px; transition: background 0.15s, box-shadow 0.15s; }
.pl-col-body.is-over { background: rgba(132, 204, 22, 0.12); box-shadow: inset 0 0 0 2px rgba(132, 204, 22, 0.5); }
.pl-empty { padding: 16px 10px; border-radius: 12px; border: 1.5px dashed var(--ink-5); text-align: center; font-size: 12px; color: var(--ink-3); }

.pl-card {
  position: relative;
  padding: 11px 12px 10px;
  border-radius: 12px;
  background: var(--pane);
  box-shadow: var(--shadow-card);
  border-inline-start: 3px solid var(--c);
  cursor: grab;
  outline: none;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s, opacity 0.18s;
}
.pl-card:hover, .pl-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.pl-card:focus-visible { box-shadow: var(--shadow-card-hover), 0 0 0 2px var(--brand); }
.pl-card.is-dragging { opacity: 0.4; }
.pl-card.is-flash { animation: demoFlash 1.2s ease 2; }
.pl-card-co { font-size: 13.5px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-card-need { margin-top: 2px; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.pl-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; background: var(--bg); font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.pl-chip .icon { width: 11px; height: 11px; }
.pl-chip.is-late { background: #fff1ec; color: #c2410c; }
.pl-card-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--rim); }
.pl-ava { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 9.5px; font-weight: 800; color: #fff; }
.pl-val { margin-inline-start: auto; white-space: nowrap; }
.pl-val b { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.pl-val small { font-size: 10px; color: var(--ink-3); font-weight: 600; }
@container (max-width: 760px) {
  .pl-board { grid-template-columns: repeat(5, 210px); }
  .pl-stats { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; }
  .pl-bar .dv2-spacer { display: none; }
}

.demo-move {
  position: fixed;
  z-index: 350;
  width: 220px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 44px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.demo-move .dm-h { font-size: 12.5px; font-weight: 800; padding: 4px 8px 2px; color: var(--d-ink); }
.demo-move .dm-l { font-size: 11px; color: var(--d-ink-3); padding: 0 8px 4px; }
.demo-move button { display: flex; align-items: center; gap: 6px; width: 100%; text-align: start; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--d-ink-2); cursor: pointer; }
.demo-move button .icon { width: 14px; height: 14px; }
.demo-move button:hover:not([disabled]),
.demo-move button:focus-visible { background: #f1f5f9; color: var(--d-ink); outline: none; }
.demo-move button[disabled] { opacity: 0.4; cursor: default; }
.demo-move .is-won { color: var(--d-green-deep); }
.demo-move .is-lost { color: #b4232a; }

/* ---------------------------------------------------------------- leads inbox */
.demo-li { font-size: 14px; }
.demo-li .sales-inbox-nav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--d-rim); margin-bottom: 18px; }
.demo-li .sales-inbox-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; font-weight: 600; font-size: 13.5px; color: var(--d-ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.demo-li .sales-inbox-nav a .icon { width: 15px; height: 15px; }
.demo-li .sales-inbox-nav a.is-on { color: var(--d-ink); border-bottom-color: var(--d-ink); }
.demo-li .li-topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 20px; border-radius: 16px; background: #fff; box-shadow: var(--d-card); margin-bottom: 14px; }
.demo-li .li-topbar h1 { font-size: 22px; font-weight: 800; margin: 0; }
.demo-li .li-count { padding: 3px 10px; border-radius: 999px; background: #ecf6e5; color: #3f7a2a; font-weight: 700; font-size: 12.5px; }
.demo-li .li-grow { flex: 1; }
.li-tb-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px; border: 0; background: #eef4ea; color: #2f5e1f; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.li-tb-btn .icon { width: 15px; height: 15px; }
.li-tb-btn.is-icon { padding: 9px; }
.li-tb-btn.is-primary { background: var(--d-green-dark); color: #fff; box-shadow: 0 6px 14px -6px rgba(31, 81, 50, 0.6); }
.li-tb-btn.is-ai { background: var(--d-green-soft); color: #365314; box-shadow: inset 0 0 0 1px rgba(132, 204, 22, 0.5); }
.li-tb-btn.is-ai.is-busy { opacity: 0.75; }
.li-tb-btn.is-ai.is-done { background: #f1f5f9; color: var(--d-ink-3); box-shadow: none; cursor: default; }
.demo-li .li-fbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.demo-li .li-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 12px; background: #fff; box-shadow: var(--d-card); }
.demo-li .li-search .icon { width: 16px; height: 16px; color: var(--d-ink-3); }
.demo-li .li-search input { flex: 1; border: 0; outline: 0; height: 42px; font: inherit; background: transparent; }
.li-due { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--d-ink-2); }
.li-due.is-late { background: #fef2f2; color: #b91c1c; box-shadow: inset 0 0 0 1px #fecaca; }
.demo-li .li-tablewrap { overflow-x: auto; border-radius: 16px; background: #fff; box-shadow: var(--d-card); }
.demo-li .li-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.demo-li .li-table th { text-align: start; font-size: 12px; font-weight: 700; color: var(--d-ink-3); padding: 14px 12px; border-bottom: 1px solid var(--d-rim); white-space: nowrap; }
.demo-li .li-table td { padding: 14px 12px; border-bottom: 1px solid var(--d-rim); vertical-align: middle; font-size: 13.5px; }
.demo-li .li-row:hover { background: #fafcf8; }
.demo-li .li-name-link { font-weight: 700; color: var(--d-ink); text-decoration: none; }
.demo-li .li-sub { display: block; font-size: 11.5px; color: var(--d-ink-3); margin-top: 2px; }
.li-src { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.li-src .icon { width: 13px; height: 13px; }
.li-src.is-wa { background: #e7f8ee; color: #15803d; }
.li-src.is-ig { background: #fdf2f8; color: #be185d; }
.li-src.is-mail { background: #eff6ff; color: #1d4ed8; }
.li-summary-cell { color: var(--d-ink-2); max-width: 280px; }
.li-phone { white-space: nowrap; color: var(--d-ink-2); }
.li-score { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 12px; background: radial-gradient(closest-side, #fff 74%, transparent 76% 100%), conic-gradient(var(--d-green) calc(var(--p) * 1%), #e5e7eb 0); color: var(--d-green-deep); }
.li-score.is-pending { background: none; color: var(--d-ink-3); }
.li-row.is-scored .li-score { animation: demoPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes demoPop { from { transform: scale(0.4); opacity: 0; } }
.li-td-actions { white-space: nowrap; text-align: end; }
.li-quote-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 0; background: #2f6b2a; color: #fff; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.li-quote-btn .icon { width: 14px; height: 14px; }
.li-quote-btn:hover { filter: brightness(1.12); }
.li-del-btn { margin-inline-start: 6px; padding: 7px; border-radius: 10px; border: 1px solid #fecaca; background: #fff5f5; color: #dc2626; cursor: pointer; vertical-align: middle; }
.li-del-btn .icon { width: 15px; height: 15px; display: block; }

/* ---------------------------------------------------------------- quote editor */
.qd-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.qd-no { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 28px; font-weight: 800; }
.qd-no .icon { width: 22px; height: 22px; }
.qd-meta { font-size: 13px; color: var(--d-ink-3); margin-top: 6px; }
.qd-status { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #f1f5f9; color: var(--d-ink-2); font-weight: 700; font-size: 12px; }
.qd-status.is-sent { background: #eff6ff; color: #1d4ed8; }
.qd-status.is-ok { background: var(--d-green-soft); color: #3f6212; }
.qd-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.qd-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 10px; border: 1px solid var(--d-rim); background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--d-ink-2); cursor: pointer; box-shadow: var(--d-card); }
.qd-btn .icon { width: 15px; height: 15px; }
.qd-btn.is-wa { background: var(--d-green-dark); border-color: var(--d-green-dark); color: #fff; }
.qd-btn[disabled] { opacity: 0.55; cursor: default; }
.qd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; }
.qd-form { display: flex; flex-direction: column; gap: 12px; }
.qd-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 13px; font-weight: 800; color: #3f7a2a; }
.qd-sec-hint { font-size: 12px; font-weight: 600; color: var(--d-ink-3); }
.qd-f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--d-ink-2); }
.qd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qd-in { width: 100%; height: 42px; padding: 0 12px; border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; color: var(--d-ink); }
.qd-in:focus { outline: none; border-color: var(--d-green); box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.25); }
.qd-in[readonly] { background: #f8fafc; }
.qd-items-h, .qd-item { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(56px, 0.6fr) minmax(80px, 0.9fr) 34px; gap: 8px; align-items: center; }
.qd-items-h { font-size: 11.5px; font-weight: 700; color: var(--d-ink-3); }
.qd-item { margin-top: 6px; }
.qd-x { width: 34px; height: 34px; border-radius: 9px; border: 1px solid #fecaca; background: #fff5f5; color: #dc2626; cursor: pointer; display: grid; place-items: center; }
.qd-x .icon { width: 14px; height: 14px; }
.qd-add { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1.5px dashed rgba(77, 124, 15, 0.5); background: transparent; color: #3f6212; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.qd-add .icon { width: 14px; height: 14px; }
.qd-total { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: #fff; box-shadow: var(--d-card); font-weight: 700; color: var(--d-ink-2); }
.qd-total b { font-size: 24px; font-weight: 800; color: var(--d-ink); }
.qd-pv-label { font-size: 12px; font-weight: 600; color: var(--d-ink-3); margin-bottom: 8px; }
.qd-paper { background: #fff; border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 32px -12px rgba(15, 23, 42, 0.18); padding: 26px 28px 30px; border-top: 8px solid #84cc16; font-family: "Geist", "Inter", "IBM Plex Sans Arabic", sans-serif; font-size: 11.5px; color: #111827; direction: ltr; text-align: left; }
.qp-top { display: flex; justify-content: space-between; gap: 16px; }
.qp-logo { display: flex; align-items: center; gap: 10px; }
.qp-logo svg { width: 44px !important; height: 44px !important; }
.qp-logo b { display: block; font-size: 13px; }
.qp-logo small { color: #6b7280; }
.qp-title { text-align: right; }
.qp-title > b { display: block; font-size: 22px; font-weight: 800; letter-spacing: 0.02em; }
.qp-title > span { display: block; color: #4d7c0f; font-weight: 700; font-family: "IBM Plex Sans Arabic", sans-serif; }
.qp-title dl { display: grid; grid-template-columns: auto auto; gap: 2px 12px; margin: 8px 0 0; font-size: 10.5px; }
.qp-title dt { color: #6b7280; }
.qp-title dd { margin: 0; font-weight: 600; }
.qp-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0 16px; }
.qp-parties > div { padding: 12px 14px; border-radius: 8px; background: #f7fbef; border: 1px solid #e6f0d6; }
.qp-parties span, .qp-foot span { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em; color: #4d7c0f; margin-bottom: 6px; }
.qp-parties b { display: block; font-size: 12.5px; font-family: "IBM Plex Sans Arabic", "Geist", sans-serif; }
.qp-parties small { display: block; color: #6b7280; margin-top: 3px; font-family: "IBM Plex Sans Arabic", "Geist", sans-serif; }
.qp-t { width: 100%; border-collapse: collapse; }
.qp-t th { background: #1f2d1f; color: #fff; font-size: 10.5px; font-weight: 700; padding: 8px; text-align: left; }
.qp-t th:nth-child(n+3), .qp-t td:nth-child(n+3) { text-align: right; }
.qp-t td { padding: 8px; border-bottom: 1px solid #eef2e8; font-family: "IBM Plex Sans Arabic", "Geist", sans-serif; }
.qp-sum { width: 58%; margin: 12px 0 0 auto; display: grid; gap: 4px; }
.qp-sum > div { display: flex; justify-content: space-between; padding: 4px 8px; }
.qp-sum span { color: #6b7280; }
.qp-sum .qp-tot { background: #84cc16; color: #0a0a0b; border-radius: 6px; padding: 8px 10px; font-size: 13px; }
.qp-sum .qp-tot span { color: #0a0a0b; font-weight: 800; }
.qp-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.qp-term { display: block; text-align: start; font-size: inherit; font-weight: 400; letter-spacing: 0; color: inherit; margin: 0; }
.qp-foot small { display: block; color: #4b5563; line-height: 1.7; font-family: "IBM Plex Sans Arabic", "Geist", sans-serif; }
.qp-accept { min-height: 44px; border-top: 1px solid #d1d5db; padding-top: 8px; color: #9ca3af; font-family: "IBM Plex Sans Arabic", "Geist", sans-serif; display: flex; align-items: center; gap: 6px; }
.qp-accept.is-on { color: #3f6212; font-weight: 800; animation: demoPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.qp-accept .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- dashboard (home) */
/* Container queries: the screen lays itself out by the width it actually has
   (inside the landing page's frame the pinned sidebar takes 256px). */
.dh { container-type: inline-size; display: flex; flex-direction: column; gap: 16px; }
.dh-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #ecf6e5; color: #3f7a2a; }
.dh-ic .icon { width: 19px; height: 19px; }
.dh-muted { font-size: 12.5px; color: var(--d-ink-3); margin-top: 4px; line-height: 1.6; }

.dh-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 26px 28px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(132, 204, 22, 0.20), transparent 50%),
    linear-gradient(135deg, #ffffff 0%, #f3f9ea 100%);
  box-shadow: var(--d-card), inset 0 0 0 1px rgba(132, 204, 22, 0.18);
}
.dh-watermark { position: absolute; inset-block-start: -40px; inset-inline-end: -30px; width: 230px; height: 230px; opacity: 0.07; pointer-events: none; }
.dh-watermark svg { width: 100% !important; height: 100% !important; fill: #3f7a2a !important; }
.dh-hello { position: relative; min-width: 0; }
.dh-date { font-size: 13px; font-weight: 600; color: var(--d-ink-3); }
.dh-hello h1 { margin: 6px 0 0; font-size: clamp(28px, 3vw, 38px); font-weight: 800; line-height: 1.2; color: var(--d-ink); }
.dh-hello h1 em { font-style: normal; color: #3f7a2a; }
.dh-brief {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  max-width: 60ch;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
  font-size: 14px;
  line-height: 1.75;
  color: var(--d-ink-2);
}
.dh-brief .icon { width: 20px; height: 20px; flex: none; margin-top: 3px; color: #4d7c0f; }
.dh-brief b { color: var(--d-ink); }
.dh-qa { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-content: center; }
.dh-qa-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 8px;
  line-height: 1.35;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--d-ink);
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.dh-qa-btn .dh-ic { width: 32px; height: 32px; border-radius: 10px; }
.dh-qa-btn .dh-ic .icon { width: 16px; height: 16px; }
.dh-qa-btn:hover { transform: translateY(-2px); border-color: rgba(132, 204, 22, 0.55); box-shadow: 0 10px 22px -12px rgba(31, 81, 50, 0.45); }

.dh-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dh-kpi { position: relative; overflow: hidden; min-width: 0; padding: 16px 18px 0; border-radius: 18px; background: #fff; box-shadow: var(--d-card); display: flex; flex-direction: column; }
.dh-kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dh-kpi-lab { font-size: 13px; font-weight: 700; color: var(--d-ink-2); line-height: 1.45; padding-top: 2px; }
.dh-kpi-val { margin-top: 8px; font-size: clamp(22px, 2.1vw, 28px); font-weight: 800; letter-spacing: -0.02em; color: var(--d-ink); white-space: nowrap; }
.dh-kpi-val .cur { font-size: 13px; font-weight: 700; color: var(--d-ink-3); }
.dh-kpi-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--d-ink-3); }
.dh-delta { padding: 2px 8px; border-radius: 999px; background: #ecfccb; color: #3f6212; font-weight: 800; font-size: 11.5px; }
.dh-spark { display: block; width: calc(100% + 36px); height: 44px; margin: 10px -18px 0; }

.dh-main { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.dh-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.dh-card { background: #fff; border-radius: 18px; box-shadow: var(--d-card); padding: 16px 18px 18px; min-width: 0; }
.dh-card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dh-card-h .dh-ic { width: 34px; height: 34px; border-radius: 10px; }
.dh-card-h .dh-ic .icon { width: 17px; height: 17px; }
.dh-card-h b { font-size: 15px; font-weight: 800; color: var(--d-ink); }
.dh-link { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 700; color: #3f7a2a; cursor: pointer; }
.dh-link .icon { width: 14px; height: 14px; }
html[dir="rtl"] .dh-link .icon, html[dir="rtl"] .dh-chev .icon { transform: scaleX(-1); }

.dh-stages { display: flex; flex-direction: column; gap: 12px; }
.dh-stage { display: grid; grid-template-columns: minmax(96px, 150px) minmax(0, 1fr) 64px; align-items: center; gap: 12px; }
.dh-stage-n { font-size: 13px; font-weight: 700; color: var(--d-ink); line-height: 1.35; }
.dh-stage-n small { display: block; font-size: 11.5px; font-weight: 500; color: var(--d-ink-3); }
.dh-stage-bar { height: 12px; border-radius: 999px; background: #f1f5ec; overflow: hidden; }
.dh-stage-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, #a3d65c, #4d7c0f); }
html[dir="rtl"] .dh-stage-bar i { margin-inline-start: 0; background: linear-gradient(270deg, #a3d65c, #4d7c0f); }
.dh-stage b { font-size: 13.5px; font-weight: 800; text-align: end; color: var(--d-ink); }
.dh-stage-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-top: 12px; border-top: 1px dashed rgba(15, 23, 42, 0.1); font-size: 13px; color: var(--d-ink-3); font-weight: 600; }
.dh-stage-foot b { font-size: 18px; font-weight: 800; color: var(--d-ink); }
.dh-stage-foot .cur { font-size: 12px; color: var(--d-ink-3); }

.dh-needs { padding-bottom: 8px; }
.dh-pulse { width: 10px; height: 10px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.18); flex: none; }
.dh-count { margin-inline-start: auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #0a0a0b; color: #fff; font-size: 11.5px; font-weight: 700; }
.dh-need { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 8px; margin: 0 -8px; border: 0; border-top: 1px solid rgba(15, 23, 42, 0.06); border-radius: 12px; background: none; font: inherit; text-align: start; cursor: pointer; transition: background 0.15s; }
.dh-need:first-of-type { border-top: 0; }
.dh-need:hover { background: #f7fbf2; }
.dh-need-ic { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; }
.dh-need-ic .icon { width: 17px; height: 17px; }
.dh-need-ic.is-wa { background: #e7f8ee; color: #15803d; }
.dh-need-ic.is-blue { background: #eff6ff; color: #1d4ed8; }
.dh-need-ic.is-amber { background: #fff7ed; color: #c2410c; }
.dh-need-ic.is-red { background: #fef2f2; color: #b91c1c; }
.dh-need-t { flex: 1; min-width: 0; }
.dh-need-t > span { display: block; font-size: 13.5px; color: var(--d-ink); line-height: 1.5; }
.dh-need-t small { display: block; font-size: 12px; color: var(--d-ink-3); margin-top: 1px; }
.dh-chev { color: var(--d-ink-3); }
.dh-chev .icon { width: 15px; height: 15px; }

.dh-owner { display: grid; grid-template-columns: 30px 64px minmax(0, 1fr) 22px; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--d-ink); }
.dh-ava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 10.5px; font-weight: 800; }
.dh-owner-bar { height: 10px; border-radius: 999px; background: #f1f5ec; overflow: hidden; }
.dh-owner-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, #a3d65c, #3f7a2a); }
html[dir="rtl"] .dh-owner-bar i { background: linear-gradient(270deg, #a3d65c, #3f7a2a); }
.dh-owner b { text-align: end; }

.dh-collect-body { display: flex; align-items: center; gap: 18px; }
.dh-ring {
  width: 112px;
  height: 112px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background:
    radial-gradient(closest-side, #fff 76%, transparent 78% 100%),
    conic-gradient(#4d7c0f calc(var(--p) * 1%), #eef2e8 0);
}
.dh-ring b { font-size: 24px; font-weight: 800; color: #3f7a2a; line-height: 1; }
.dh-ring small { font-size: 11px; color: var(--d-ink-3); margin-top: 4px; }
.dh-collect-v { font-size: 24px; font-weight: 800; color: var(--d-ink); }
.dh-collect-v .cur { font-size: 12.5px; color: var(--d-ink-3); }
.dh-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dh-chips span { padding: 3px 10px; border-radius: 999px; background: #f1f5f9; color: var(--d-ink-2); font-size: 11.5px; font-weight: 700; }
.dh-chips span.is-late { background: #fef2f2; color: #b91c1c; }

.dh-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; position: relative; }
.dh-feed::before { content: ""; position: absolute; inset-block: 14px; inset-inline-start: 15px; width: 2px; background: #eef2e8; }
.dh-feed li { position: relative; display: flex; align-items: flex-start; gap: 12px; }
.dh-feed-ic { position: relative; width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 0 0 2px #e3eed6; color: #3f7a2a; }
.dh-feed-ic .icon { width: 15px; height: 15px; }
.dh-feed li > span:last-child > span { display: block; font-size: 13px; color: var(--d-ink); line-height: 1.5; }
.dh-feed small { display: block; font-size: 11.5px; color: var(--d-ink-3); margin-top: 1px; }

@container (min-width: 900px) {
  .dh-hero { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); align-items: center; }
}
@container (max-width: 980px) {
  .dh-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dh-row > .dh-card:last-child { grid-column: 1 / -1; }
}
@container (max-width: 860px) {
  .dh-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dh-main { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 560px) {
  .dh-hero { padding: 20px 18px; }
  .dh-qa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dh-kpis { grid-template-columns: minmax(0, 1fr); }
  .dh-row { grid-template-columns: minmax(0, 1fr); }
  .dh-stage { grid-template-columns: 100px minmax(0, 1fr) 54px; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .qd-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .pl-top-acts .btn-ghost { display: none; }
  .demo-dv2 .kanban { grid-template-columns: repeat(6, 230px); min-width: 0; }
  .qd-row { grid-template-columns: 1fr; }
  .qd-paper { padding: 18px 16px 22px; font-size: 10.5px; }
  .qp-sum { width: 100%; }
  .demo-ribbon { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Sidebar nav: no sideways scrollbar from sub-pixel overflow, slim vertical one. */
#demoNav { overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
