/* ============================================================
   ANIT Marketing — Stylesheet
   Modern dark mode 2026, RTL-aware
   ============================================================ */

:root {
  --bg-0: #07080c;
  --bg-1: #0c0e15;
  --bg-2: #11141d;
  --bg-3: #161a25;
  --line: #1f2433;
  --line-2: #2a3043;
  --text: #e7eaf3;
  --muted: #8a92a8;
  --dim: #5b6478;
  --accent: #7c5cff;
  --accent-2: #00d4ff;
  --accent-3: #ff6ad5;
  --green: #21d07a;
  --yellow: #ffc857;
  --red: #ff5d6c;
  --orange: #ff8a3d;
  --blue: #4aa8ff;
  --grad: linear-gradient(135deg, #7c5cff 0%, #00d4ff 100%);
  --grad-2: linear-gradient(135deg, #ff6ad5 0%, #7c5cff 60%, #00d4ff 100%);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg-0);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}
body[dir="rtl"] {
  font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif;
}

/* Animated background blobs */
body::before, body::after {
  content: "";
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .35;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background: radial-gradient(circle, #7c5cff 0%, transparent 70%);
  top: -200px; left: -200px;
  animation: float1 18s ease-in-out infinite;
}
body::after {
  background: radial-gradient(circle, #00d4ff 0%, transparent 70%);
  bottom: -250px; right: -200px;
  animation: float2 22s ease-in-out infinite;
}
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(120px, 80px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-100px,-60px); } }

.app {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 32px 80px;
}

/* ========== Header ========== */
header.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--grad);
  display: grid; place-items: center;
  font-weight: 800; color: #08090f;
  font-size: 18px;
  box-shadow: 0 10px 30px rgba(124,92,255,.45);
  position: relative;
}
.logo::after {
  content: "";
  position: absolute; inset: 1px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.25), transparent 50%);
  pointer-events: none;
}
.brand h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.brand .sub { color: var(--muted); font-size: 12px; margin-top: 2px; letter-spacing: .12em; text-transform: uppercase; }

.tabs {
  display: inline-flex; padding: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
}
.tab-btn {
  appearance: none; border: none; cursor: pointer;
  padding: 9px 16px; border-radius: 10px;
  background: transparent; color: var(--muted);
  font-family: inherit; font-weight: 600; font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .25s ease;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  background: var(--grad); color: #0a0b10;
  box-shadow: 0 8px 22px rgba(124,92,255,.35);
}
.tab-btn .badge-count {
  margin-inline-start: 4px;
  padding: 2px 8px;
  font-size: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  color: inherit;
}

.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pill {
  font-size: 11.5px; padding: 6px 12px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--muted); letter-spacing: .04em;
}
.pill .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); margin-inline-end: 7px; vertical-align: middle;
  box-shadow: 0 0 10px var(--green);
}

/* Language Switcher */
.lang-switch {
  position: relative;
}
.lang-btn {
  cursor: pointer; appearance: none;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); padding: 8px 14px; border-radius: 10px;
  font-family: inherit; font-weight: 600; font-size: 13px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s;
}
.lang-btn:hover { border-color: var(--line-2); }
.lang-menu {
  position: absolute; top: calc(100% + 8px);
  right: 0;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  min-width: 160px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 50;
}
body[dir="rtl"] .lang-menu { right: auto; left: 0; }
.lang-menu.show { display: block; }
.lang-menu button {
  display: flex; width: 100%; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  background: transparent; color: var(--text); border: none;
  font-family: inherit; font-size: 13.5px; cursor: pointer;
  text-align: start;
}
.lang-menu button:hover { background: var(--bg-3); }
.lang-menu button.active { background: rgba(124,92,255,.15); color: var(--accent); }

/* Avatar dropdown */
.avatar-wrap { position: relative; }
.avatar-btn {
  appearance: none; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-family: inherit; font-weight: 600; font-size: 13px;
  transition: all .2s;
}
body[dir="rtl"] .avatar-btn { padding: 4px 4px 4px 14px; }
.avatar-btn:hover { border-color: var(--line-2); }
.avatar-img {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grad);
  background-size: cover; background-position: center;
  display: grid; place-items: center;
  color: #0a0b10; font-weight: 700; font-size: 13px;
}
.avatar-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 50;
}
body[dir="rtl"] .avatar-menu { right: auto; left: 0; }
.avatar-menu.show { display: block; }
.avatar-menu .info {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.avatar-menu .info .nm { font-weight: 700; font-size: 14px; }
.avatar-menu .info .em { color: var(--muted); font-size: 12px; margin-top: 2px; }
.avatar-menu .info .rl {
  display: inline-block; margin-top: 6px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
  background: rgba(255,200,87,.12); color: var(--yellow);
  border: 1px solid rgba(255,200,87,.3);
}
.avatar-menu .info .rl.marketer {
  background: rgba(124,92,255,.12); color: var(--accent);
  border-color: rgba(124,92,255,.3);
}
.avatar-menu button {
  display: flex; width: 100%; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  background: transparent; color: var(--text); border: none;
  font-family: inherit; font-size: 13.5px; cursor: pointer;
  text-align: start;
}
.avatar-menu button:hover { background: var(--bg-3); }
.avatar-menu button.danger { color: var(--red); }
.avatar-menu button svg { width: 14px; height: 14px; opacity: .8; }

/* ========== Panels ========== */
.panel { display: none; animation: fade .35s ease both; }
.panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ========== Hero ========== */
.hero {
  position: relative;
  padding: 36px 38px;
  background: linear-gradient(160deg, rgba(124,92,255,.18), rgba(0,212,255,.06) 60%, rgba(255,106,213,.10));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 26px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(800px 200px at 90% 0%, rgba(0,212,255,.18), transparent 60%),
    radial-gradient(600px 200px at 0% 100%, rgba(255,106,213,.18), transparent 60%);
  pointer-events: none;
}
.hero h2 {
  margin: 0 0 8px;
  font-size: 34px; font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(120deg, #fff 0%, #b6b1ff 50%, #6ee9ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 0; color: var(--muted); font-size: 15px; max-width: 760px; line-height: 1.65; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.stat {
  background: rgba(13,16,25,.6);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  backdrop-filter: blur(10px);
}
.stat .num {
  font-size: 22px; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .lbl { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ========== Search ========== */
.search-row { display: flex; align-items: center; gap: 12px; margin: 6px 0 22px; flex-wrap: wrap; }
.search {
  flex: 1; min-width: 260px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 12px 16px; border-radius: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124,92,255,.15);
}
.search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 14px; font-family: inherit;
}
.search svg { width: 18px; height: 18px; color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  cursor: pointer; user-select: none;
  padding: 9px 14px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px; font-weight: 500;
  transition: all .2s;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.active { background: var(--bg-3); color: var(--text); border-color: var(--accent); }

/* ========== Sections / Cards ========== */
.section-title {
  display: flex; align-items: center; gap: 12px;
  margin: 30px 0 16px;
  font-size: 13px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
body[dir="rtl"] .section-title::after { background: linear-gradient(-90deg, var(--line), transparent); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: var(--line-2); }

.card-head {
  cursor: pointer;
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  user-select: none;
}
.card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 20px; flex-shrink: 0;
  background: rgba(124,92,255,.14); color: #b6a8ff;
  border: 1px solid rgba(124,92,255,.25);
}
.card-icon.yellow { background: rgba(255,200,87,.12); color: var(--yellow); border-color: rgba(255,200,87,.25); }
.card-icon.cyan   { background: rgba(0,212,255,.12); color: var(--accent-2); border-color: rgba(0,212,255,.25); }
.card-icon.green  { background: rgba(33,208,122,.12); color: var(--green); border-color: rgba(33,208,122,.25); }
.card-icon.blue   { background: rgba(74,168,255,.12); color: var(--blue); border-color: rgba(74,168,255,.25); }
.card-icon.pink   { background: rgba(255,106,213,.12); color: var(--accent-3); border-color: rgba(255,106,213,.25); }
.card-icon.purple { background: rgba(124,92,255,.14); color: #b6a8ff; border-color: rgba(124,92,255,.25); }

.card-head .meta { flex: 1; min-width: 0; }
.card-head h3 { margin: 0; font-size: 16.5px; font-weight: 700; letter-spacing: -.005em; }
.card-head .desc { color: var(--muted); font-size: 12.8px; margin-top: 3px; line-height: 1.5; }

.badge {
  font-size: 10.5px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(33,208,122,.12); color: var(--green);
  border: 1px solid rgba(33,208,122,.25);
  letter-spacing: .04em; text-transform: uppercase;
  flex-shrink: 0;
}
.badge.gold { background: rgba(255,200,87,.10); color: var(--yellow); border-color: rgba(255,200,87,.25); }
.badge.blue { background: rgba(74,168,255,.12); color: var(--blue); border-color: rgba(74,168,255,.25); }
.badge.pink { background: rgba(255,106,213,.12); color: var(--accent-3); border-color: rgba(255,106,213,.25); }

.chev {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  color: var(--muted);
  transition: transform .3s, background .25s, color .25s;
  background: var(--bg-3);
  flex-shrink: 0;
}
.card.open .chev { transform: rotate(180deg); color: var(--accent); background: rgba(124,92,255,.15); }

.card-body { max-height: 0; overflow: hidden; transition: max-height .5s cubic-bezier(.2,.8,.2,1); }
.card-body-inner {
  padding: 4px 22px 22px;
  border-top: 1px solid var(--line);
  margin-top: 0;
}

.block-title {
  font-size: 11.5px; font-weight: 700;
  color: var(--muted); letter-spacing: .12em;
  text-transform: uppercase;
  margin: 18px 0 10px;
  display: flex; align-items: center; gap: 8px;
}

.keyword-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.kw {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 6px 11px; border-radius: 8px;
  background: var(--bg-3); border: 1px solid var(--line);
  color: #c9d0e3;
}
.kw.example { color: var(--accent-2); border-color: rgba(0,212,255,.2); background: rgba(0,212,255,.06); }

ul.bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
ul.bullets li {
  position: relative; padding: 9px 12px 9px 32px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #d4d8e8; font-size: 13.5px; line-height: 1.5;
}
body[dir="rtl"] ul.bullets li { padding: 9px 32px 9px 12px; }
ul.bullets li::before {
  content: ""; position: absolute; inset-inline-start: 12px; top: 14px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
}
ul.bullets.warn li::before { background: var(--red); box-shadow: 0 0 10px var(--red); }
ul.bullets.good li::before { background: var(--green); box-shadow: 0 0 10px var(--green); }
ul.bullets.gold li::before { background: var(--yellow); box-shadow: 0 0 10px var(--yellow); }

/* Conversation / Script bubbles */
.conversation {
  background: linear-gradient(180deg, rgba(124,92,255,.06), rgba(0,212,255,.03));
  border: 1px solid var(--line);
  border-radius: 16px; padding: 16px;
  margin-top: 4px;
}
.bubble {
  background: var(--bg-3); border: 1px solid var(--line-2);
  padding: 12px 14px; border-radius: 14px;
  color: #e0e4f3; font-size: 14px; line-height: 1.65;
  margin-bottom: 10px;
  position: relative;
  white-space: pre-wrap;
  direction: ltr;
  text-align: left;
}
.bubble:last-child { margin-bottom: 0; }
.bubble.de { border-color: rgba(124,92,255,.3); background: rgba(124,92,255,.08); }
.bubble .lang {
  position: absolute; top: -10px; left: 14px;
  font-size: 10px; padding: 2px 8px; border-radius: 6px;
  background: var(--bg-0); color: var(--muted);
  border: 1px solid var(--line-2);
  letter-spacing: .1em; text-transform: uppercase;
}
.bubble .copy-btn {
  position: absolute; top: 10px; right: 10px;
  cursor: pointer; opacity: 0; transition: opacity .2s;
  background: var(--bg-0); border: 1px solid var(--line-2);
  color: var(--muted); padding: 4px 8px; border-radius: 7px;
  font-size: 11px; font-family: inherit;
}
.bubble:hover .copy-btn { opacity: 1; }
.bubble .copy-btn:hover { color: var(--text); }

.callout {
  padding: 14px 16px; border-radius: 12px;
  background: rgba(255,200,87,.06);
  border: 1px solid rgba(255,200,87,.25);
  color: #f7e7b8; font-size: 13.5px; line-height: 1.6;
  display: flex; gap: 12px;
  margin-top: 10px;
}
.callout.danger { background: rgba(255,93,108,.07); border-color: rgba(255,93,108,.25); color: #ffd3d8; }
.callout.info   { background: rgba(74,168,255,.06); border-color: rgba(74,168,255,.25); color: #cfe3ff; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }

/* Workflow steps */
.steps { display: grid; gap: 10px; }
.step {
  display: grid; grid-template-columns: 36px 1fr; gap: 14px;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
}
.step-num {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--grad); color: #08090f;
  font-weight: 700; display: grid; place-items: center;
  font-size: 13px;
}
.step h4 { margin: 2px 0 4px; font-size: 14px; font-weight: 600; }
.step p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.step code { font-family: 'JetBrains Mono', monospace; color: var(--accent-2); background: var(--bg-2); padding: 1px 6px; border-radius: 5px; }

/* Phrase grid */
.phrase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.phrase-col { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.phrase-col.bad  { border-color: rgba(255,93,108,.25); }
.phrase-col.good { border-color: rgba(33,208,122,.25); }
.phrase-col h5 {
  margin: 0 0 10px; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.phrase-col.bad h5  { color: var(--red); }
.phrase-col.good h5 { color: var(--green); }
.phrase-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.phrase-col li {
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
  padding: 7px 10px; border-radius: 8px;
  background: var(--bg-3);
}

/* Skip table */
table.skip { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.skip th, table.skip td {
  text-align: start; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
table.skip th { color: var(--muted); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; }
table.skip td:first-child { color: #fff; font-weight: 500; }

/* ========== Leads ========== */
.leads-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.btn {
  cursor: pointer; appearance: none;
  padding: 11px 18px; border-radius: 12px;
  font-family: inherit; font-weight: 600; font-size: 13.5px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--line-2); transform: translateY(-1px); }
.btn.primary { background: var(--grad); color: #08090f; border: none; box-shadow: 0 10px 24px rgba(124,92,255,.35); }
.btn.primary:hover { box-shadow: 0 14px 30px rgba(124,92,255,.45); }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(255,93,108,.08); border-color: rgba(255,93,108,.3); color: var(--red); }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.leads-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 22px; }
@media (max-width: 900px) { .leads-stats { grid-template-columns: repeat(3, 1fr); } }
.lead-stat {
  padding: 14px 16px; border-radius: 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.lead-stat::before {
  content:""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent-color, var(--accent));
}
.lead-stat .v { font-size: 22px; font-weight: 700; color: var(--accent-color, var(--text)); }
.lead-stat .k { font-size: 11.5px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .08em; }

.leads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }

.lead-card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  position: relative;
  transition: border-color .25s, transform .2s;
}
.lead-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.lead-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.lead-card h4 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.005em; }
.lead-card .person { color: var(--muted); font-size: 13px; margin-top: 3px; }
.lead-card .marketer-tag {
  margin-top: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 4px; border-radius: 999px;
  background: rgba(124,92,255,.10); border: 1px solid rgba(124,92,255,.3);
  font-size: 11.5px; color: #c9c0ff;
}
.lead-card .marketer-tag .av {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--grad); background-size: cover; background-position: center;
}
.lead-card .links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.lead-card .link-pill {
  font-size: 12px; padding: 5px 10px; border-radius: 8px;
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--text); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.lead-card .link-pill:hover { border-color: var(--accent); color: var(--accent-2); }
.lead-card .link-pill svg { width: 12px; height: 12px; color: var(--muted); }
.lead-card .notes {
  margin-top: 12px; padding: 10px 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px; color: #c8cee0; line-height: 1.55;
  white-space: pre-wrap;
  max-height: 100px; overflow: auto;
}
.lead-card .actions { display: flex; gap: 8px; margin-top: 14px; align-items: center; justify-content: space-between; }
.lead-card .icon-btn {
  background: var(--bg-3); border: 1px solid var(--line); color: var(--muted);
  padding: 7px 9px; border-radius: 8px; cursor: pointer;
  transition: all .2s;
}
.lead-card .icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.lead-card .icon-btn.del:hover { color: var(--red); border-color: rgba(255,93,108,.4); }

.status-select {
  appearance: none; cursor: pointer;
  background: var(--bg-3); color: var(--text);
  border: 1px solid var(--line);
  padding: 7px 30px 7px 12px;
  border-radius: 8px;
  font-size: 12.5px; font-family: inherit; font-weight: 600;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238a92a8' stroke-width='3'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
body[dir="rtl"] .status-select { padding: 7px 12px 7px 30px; background-position: left 10px center; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; }

/* Empty state */
.empty {
  text-align: center; padding: 70px 30px;
  border: 1.5px dashed var(--line-2);
  border-radius: 18px;
  color: var(--muted);
}
.empty .ic {
  width: 60px; height: 60px; border-radius: 18px;
  background: var(--bg-2); margin: 0 auto 14px;
  display: grid; place-items: center;
  color: var(--accent);
}
.empty h3 { color: var(--text); margin: 0 0 8px; font-size: 18px; }

/* ========== Modal ========== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(5,6,10,.7);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; animation: fade .2s ease; }
.modal {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 22px;
  width: 100%; max-width: 580px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow: auto;
  animation: pop .25s cubic-bezier(.2,.9,.2,1.1);
}
@keyframes pop { from { transform: scale(.95); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header {
  padding: 22px 26px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.modal-header h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.modal-header .close {
  cursor: pointer; background: var(--bg-2); border: 1px solid var(--line);
  color: var(--muted); width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  transition: all .2s;
}
.modal-header .close:hover { color: var(--text); }
.modal form { padding: 0 26px 26px; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px; font-weight: 600; color: var(--muted);
  margin-bottom: 6px; letter-spacing: .05em; text-transform: uppercase;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); font-family: inherit; font-size: 14px;
  padding: 11px 14px; border-radius: 11px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124,92,255,.15);
}
.field textarea { resize: vertical; min-height: 90px; }
.field .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { font-size: 11.5px; color: var(--dim); margin-top: 4px; }
.form-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
}
.form-error {
  background: rgba(255,93,108,.08);
  border: 1px solid rgba(255,93,108,.3);
  color: #ffd3d8;
  padding: 10px 14px; border-radius: 10px;
  font-size: 13px; margin-bottom: 14px;
}
.form-success {
  background: rgba(33,208,122,.08);
  border: 1px solid rgba(33,208,122,.3);
  color: #c8f4dd;
  padding: 10px 14px; border-radius: 10px;
  font-size: 13px; margin-bottom: 14px;
}

/* Avatar upload widget */
.avatar-upload {
  display: flex; align-items: center; gap: 16px;
  padding: 14px;
  background: var(--bg-2); border: 1px dashed var(--line-2);
  border-radius: 14px;
}
.avatar-preview {
  width: 70px; height: 70px; border-radius: 50%;
  background: var(--grad);
  background-size: cover; background-position: center;
  flex-shrink: 0;
  display: grid; place-items: center;
  color: #0a0b10; font-weight: 800; font-size: 22px;
}
.avatar-upload .pick-btn {
  display: inline-block; cursor: pointer;
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--text); padding: 8px 14px; border-radius: 9px;
  font-size: 13px; font-weight: 600;
}
.avatar-upload .pick-btn:hover { border-color: var(--accent); }
.avatar-upload input[type="file"] { display: none; }

/* ========== AUTH SCREEN ========== */
#authScreen {
  display: none;
  min-height: 100vh;
  position: relative; z-index: 1;
  align-items: center; justify-content: center;
  padding: 40px 20px;
}
#authScreen.show { display: flex; }
.auth-box {
  width: 100%; max-width: 460px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.auth-box .top-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px;
}
.auth-box .brand-mini {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px;
}
.auth-box .brand-mini .logo { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
.auth-box h2 {
  margin: 0 0 6px; font-size: 26px; font-weight: 800;
  background: linear-gradient(120deg, #fff 0%, #b6b1ff 50%, #6ee9ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-box .sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; line-height: 1.5; }
.auth-tabs {
  display: inline-flex; padding: 4px;
  background: var(--bg-3); border-radius: 10px;
  margin-bottom: 22px;
}
.auth-tabs button {
  background: transparent; border: none; cursor: pointer;
  padding: 8px 18px; border-radius: 7px;
  font-family: inherit; font-weight: 600; font-size: 13px;
  color: var(--muted); transition: all .2s;
}
.auth-tabs button.active { background: var(--bg-1); color: var(--text); box-shadow: 0 4px 12px rgba(0,0,0,.3); }

/* ========== MARKETERS GRID ========== */
.marketers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.marketer-card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color .25s, transform .2s;
}
.marketer-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.marketer-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 80px;
  background: linear-gradient(135deg, rgba(124,92,255,.15), rgba(0,212,255,.05));
  z-index: 0;
}
.marketer-card .av-big {
  width: 90px; height: 90px; border-radius: 50%;
  background: var(--grad);
  background-size: cover; background-position: center;
  margin: 0 auto 14px;
  position: relative; z-index: 1;
  display: grid; place-items: center;
  color: #0a0b10; font-weight: 800; font-size: 32px;
  border: 4px solid var(--bg-1);
  box-shadow: 0 8px 24px rgba(124,92,255,.35);
}
.marketer-card h4 { margin: 0 0 4px; font-size: 17px; font-weight: 700; position: relative; z-index: 1; }
.marketer-card .em { color: var(--muted); font-size: 12.5px; position: relative; z-index: 1; }
.marketer-card .role-pill {
  display: inline-block; margin-top: 10px; padding: 3px 10px;
  border-radius: 999px; font-size: 10.5px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  background: rgba(124,92,255,.15); color: var(--accent);
  border: 1px solid rgba(124,92,255,.3);
  position: relative; z-index: 1;
}
.marketer-card .role-pill.admin {
  background: rgba(255,200,87,.12); color: var(--yellow);
  border-color: rgba(255,200,87,.3);
}
.marketer-card .stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 18px;
  position: relative; z-index: 1;
}
.marketer-card .stats-row > div {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 6px;
}
.marketer-card .stats-row .v { font-size: 17px; font-weight: 700; }
.marketer-card .stats-row .v.green { color: var(--green); }
.marketer-card .stats-row .v.blue  { color: var(--blue); }
.marketer-card .stats-row .k { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ========== ADMIN ALL LEADS TABLE ========== */
.leads-table-wrap {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: auto;
}
table.leads-table {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px;
  min-width: 900px;
}
table.leads-table th, table.leads-table td {
  text-align: start; padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
table.leads-table thead th {
  color: var(--muted); font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .08em;
  background: var(--bg-1);
  position: sticky; top: 0;
  cursor: pointer; user-select: none;
  white-space: nowrap;
}
table.leads-table thead th:hover { color: var(--text); }
table.leads-table thead th.sorted { color: var(--accent); }
table.leads-table thead th .arr { font-size: 10px; opacity: .7; margin-inline-start: 4px; }
table.leads-table tbody tr:hover { background: var(--bg-3); }
table.leads-table .marketer-cell {
  display: inline-flex; align-items: center; gap: 8px;
}
table.leads-table .marketer-cell .av {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--grad);
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
table.leads-table .status-cell {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-2); }

/* Toast */
.toast {
  position: fixed;
  bottom: 30px; left: 50%; transform: translateX(-50%);
  padding: 12px 20px; border-radius: 12px;
  background: var(--bg-1); border: 1px solid var(--accent);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px; font-weight: 600;
  z-index: 200;
  animation: slideUp .3s ease;
  display: none;
}
.toast.show { display: block; }
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); color: #ffd3d8; }
@keyframes slideUp { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Loader */
.loader {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.full-loader {
  position: fixed; inset: 0;
  background: var(--bg-0);
  display: grid; place-items: center;
  z-index: 999;
}
.full-loader .loader { width: 36px; height: 36px; border-width: 3px; color: var(--accent); }

/* Hidden helper */
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 880px) {
  .grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero h2 { font-size: 26px; }
  .app { padding: 20px 16px 60px; }
  .phrase-grid { grid-template-columns: 1fr; }
  .field .row { grid-template-columns: 1fr; }
}
