/* ============================================================
   PEGASUS CRM — siyah + sampanya/fildisi, zarif serif
   Kayan yildizli gokyuzu, ince altin cizgiler, Playfair basliklar.
   ============================================================ */

:root {
  color-scheme: dark;

  --bg: #050506;
  --ink: #f2efe8;
  --muted: #a09b90;
  --muted-2: #6f6b62;
  --surface: rgba(17, 16, 15, 0.82);
  --surface-2: rgba(24, 23, 21, 0.9);
  --surface-strong: rgba(20, 19, 17, 0.96);
  --line: rgba(255, 255, 255, 0.07);
  --line-accent: rgba(218, 218, 213, 0.2);

  --accent: #cfcec7;
  --accent-bright: #edece7;
  --accent-deep: #8b8a82;
  --accent-ink: #f3f2ed;
  --accent-glow: rgba(215, 215, 210, 0.4);
  --accent-soft: rgba(215, 215, 210, 0.08);
  --accent-soft-2: rgba(215, 215, 210, 0.16);

  --danger: #c8524a;
  --danger-soft: rgba(200, 82, 74, 0.14);

  --money: #e9e7de;
  --money-soft: rgba(233, 231, 222, 0.12);
  --money-line: rgba(233, 231, 222, 0.3);

  --green: #34e0a1;
  --green-soft: rgba(52, 224, 161, 0.12);
  --amber: #ffc24b;
  --amber-soft: rgba(255, 194, 75, 0.12);
  --blue: #6ea8ff;
  --blue-soft: rgba(110, 168, 255, 0.12);
  --violet: #b58cff;
  --violet-soft: rgba(181, 140, 255, 0.12);

  --font-sans: "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --font-display: "Playfair Display", Georgia, serif;
  --font-headline: "The Mariam Story", "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-menu: "Agnets Type", "Cormorant Garamond", Georgia, serif;

  --radius: 18px;
  --radius-sm: 12px;
  font-size: 15px;
}

* { box-sizing: border-box; }

html { background: #000; }

body {
  background:
    radial-gradient(circle at 50% -12%, rgba(210, 210, 205, 0.07), transparent 52%),
    #020203;
  color: var(--ink);
  font-family: var(--font-sans);
  letter-spacing: 0.005em;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.28s ease;
}

body[data-background="nebula"] {
  background:
    radial-gradient(circle at 18% 12%, rgba(117, 79, 168, 0.2), transparent 38%),
    radial-gradient(circle at 82% 22%, rgba(57, 102, 145, 0.14), transparent 34%),
    #030205;
}
body[data-background="midnight"] {
  background: linear-gradient(145deg, #010102, #08090d 58%, #020203);
}
body[data-background="crimson"] {
  background:
    radial-gradient(circle at 15% 8%, rgba(168, 42, 52, 0.22), transparent 42%),
    radial-gradient(circle at 88% 78%, rgba(96, 16, 24, 0.28), transparent 46%),
    #060203;
}
body[data-background="ocean"] {
  background:
    radial-gradient(circle at 22% 10%, rgba(32, 84, 140, 0.26), transparent 44%),
    radial-gradient(circle at 80% 85%, rgba(14, 46, 84, 0.3), transparent 48%),
    #01050a;
}
body[data-background="emerald"] {
  background:
    radial-gradient(circle at 18% 12%, rgba(24, 112, 82, 0.24), transparent 42%),
    radial-gradient(circle at 84% 80%, rgba(10, 58, 44, 0.3), transparent 46%),
    #010604;
}
body[data-background="aurora"] {
  background:
    radial-gradient(60% 34% at 30% 0%, rgba(52, 224, 161, 0.16), transparent 70%),
    radial-gradient(55% 30% at 72% 4%, rgba(117, 79, 168, 0.2), transparent 68%),
    radial-gradient(circle at 55% 96%, rgba(38, 108, 130, 0.14), transparent 48%),
    #020306;
}
body[data-background="rose"] {
  background:
    radial-gradient(circle at 24% 14%, rgba(178, 96, 122, 0.2), transparent 44%),
    radial-gradient(circle at 82% 76%, rgba(110, 48, 68, 0.22), transparent 46%),
    #070305;
}
body[data-background="gold-dust"] {
  background:
    radial-gradient(circle at 50% -8%, rgba(216, 178, 110, 0.18), transparent 50%),
    radial-gradient(circle at 82% 82%, rgba(140, 104, 48, 0.16), transparent 44%),
    #060402;
}
body[data-background="violet-storm"] {
  background:
    radial-gradient(circle at 20% 10%, rgba(122, 74, 200, 0.28), transparent 44%),
    radial-gradient(circle at 84% 72%, rgba(64, 30, 120, 0.3), transparent 48%),
    #040208;
}
body[data-accent="gold"] {
  --accent: #d9c49d; --accent-bright: #f5e8c9; --accent-deep: #8e7650;
  --accent-ink: #f7ebd1; --accent-glow: rgba(217, 196, 157, 0.4);
  --accent-soft: rgba(217, 196, 157, 0.09); --accent-soft-2: rgba(217, 196, 157, 0.17);
  --line-accent: rgba(217, 196, 157, 0.28);
}
body[data-accent="violet"] {
  --accent: #b89aed; --accent-bright: #e4d8ff; --accent-deep: #7052a5;
  --accent-ink: #ece4ff; --accent-glow: rgba(184, 154, 237, 0.38);
  --accent-soft: rgba(184, 154, 237, 0.09); --accent-soft-2: rgba(184, 154, 237, 0.17);
  --line-accent: rgba(184, 154, 237, 0.27);
}
body[data-accent="ice"] {
  --accent: #9ec8dc; --accent-bright: #dff5ff; --accent-deep: #527d93;
  --accent-ink: #e5f7ff; --accent-glow: rgba(158, 200, 220, 0.38);
  --accent-soft: rgba(158, 200, 220, 0.09); --accent-soft-2: rgba(158, 200, 220, 0.17);
  --line-accent: rgba(158, 200, 220, 0.27);
}

body::after {
  background: radial-gradient(60% 40% at 50% 0%, rgba(210, 210, 205, 0.08), transparent 70%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

#starfield {
  position: fixed;
  inset: -72px;
  z-index: 0;
  pointer-events: none;
  background-repeat: repeat;
  background-size: 960px 720px;
  opacity: 0.74;
  transform: translate3d(0, 0, 0);
  transform-origin: center;
}
#starfield.isTwinkling { animation: starfieldTwinkle 5.5s ease-in-out infinite; }
@keyframes starfieldTwinkle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.82; }
}

.shootingStarLayer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}
.shaderFx,
.ambientEffect {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.shaderFx {
  width: 100%;
  height: 100%;
  opacity: 0.2;
  mix-blend-mode: screen;
}
.ambientEffect.aurora-flow {
  inset: -18%;
  opacity: 0.46;
  filter: blur(52px) saturate(1.25);
  background:
    radial-gradient(38% 32% at 25% 30%, var(--accent-soft-2), transparent 72%),
    radial-gradient(42% 36% at 75% 55%, rgba(86, 136, 186, 0.14), transparent 72%),
    conic-gradient(from 120deg at 50% 45%, transparent, var(--accent-soft), transparent 44%, rgba(98, 66, 145, 0.13), transparent 78%);
  animation: auroraFlow 15s ease-in-out infinite alternate;
}
@keyframes auroraFlow {
  0% { transform: translate3d(-3%, -1%, 0) rotate(-4deg) scale(1); }
  100% { transform: translate3d(4%, 3%, 0) rotate(7deg) scale(1.12); }
}
.ambientEffect.orbital-pulse {
  inset: -22%;
  opacity: 0.25;
  background:
    repeating-radial-gradient(ellipse at center, transparent 0 74px, var(--line-accent) 76px 77px, transparent 79px 135px),
    radial-gradient(circle at center, var(--accent-soft), transparent 48%);
  animation: orbitalPulse 18s linear infinite;
}
@keyframes orbitalPulse {
  0% { transform: rotate(0deg) scale(0.94); }
  50% { opacity: 0.42; transform: rotate(180deg) scale(1.06); }
  100% { transform: rotate(360deg) scale(0.94); }
}
.shootingStar {
  position: absolute;
  width: var(--trail, 130px);
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42) 55%, rgba(255, 255, 255, 0.96));
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
  opacity: 0;
  transform: translate3d(0, 0, 0) rotate(var(--angle, 24deg));
  transform-origin: right center;
  animation: shootingStarTravel var(--duration, 1.5s) ease-out forwards;
  will-change: transform, opacity;
}
@keyframes shootingStarTravel {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(var(--angle, 24deg)); }
  12% { opacity: 1; }
  70% { opacity: 0.8; }
  100% { opacity: 0; transform: translate3d(var(--travel-x, 520px), var(--travel-y, 230px), 0) rotate(var(--angle, 24deg)); }
}

/* ---------- Acilis introsu (HTML katmanlari) ---------- */
.introGate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  cursor: pointer;
  outline: none;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.75s ease;
}
.introGate.introLeaving { opacity: 0; pointer-events: none; }

#introSky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.introElement {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* kadraj gorselin icinde — sanat kendi tarafinda kalir */
  opacity: 0;
  filter: var(--elFilter, grayscale(1) brightness(1.2));
  animation: none;
  will-change: transform, opacity, filter;
  user-select: none;
  pointer-events: none;
}
.introGate.introReady .introElement {
  animation:
    introElementIn 1.15s ease-out forwards,
    introElementLive 14s ease-in-out 1.2s infinite alternate;
}
@keyframes introElementIn {
  from { opacity: 0; transform: scale(1.05); filter: var(--elFilter, grayscale(1) brightness(1.2)) blur(12px); }
  to { opacity: 0.92; transform: scale(1); filter: var(--elFilter, grayscale(1) brightness(1.2)) blur(0); }
}
@keyframes introElementLive {
  from { transform: scale(1); }
  to { transform: scale(1.025); }
}

.introTextWrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(660px, 76vw);
  opacity: 0;
  animation: none;
  will-change: transform, opacity, filter;
  pointer-events: none;
}
.introGate.introReady .introTextWrap { animation: introTextIn 1.05s ease-out 0.28s forwards; }
.introTextImg {
  width: 100%;
  display: block;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.1));
  user-select: none;
}
.introPegasusWordmark {
  display: block;
  width: min(170px, 34vw);
  height: auto;
  margin: 12px auto 0;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  filter: drop-shadow(0 0 18px rgba(220, 0, 0, 0.26));
  user-select: none;
}
.introGate.introReady .introPegasusWordmark {
  animation: introPegasusSignature 1.65s ease 3.65s forwards;
}
@keyframes introPegasusSignature {
  from { opacity: 0; transform: translateY(8px) scale(0.96); filter: blur(5px) drop-shadow(0 0 8px rgba(220, 0, 0, 0.12)); }
  to { opacity: 0.92; transform: translateY(0) scale(1); filter: blur(0) drop-shadow(0 0 18px rgba(220, 0, 0, 0.28)); }
}
@keyframes introTextIn {
  from { opacity: 0; transform: translate(-50%, -52%) scale(1.06); filter: blur(14px); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
}

.introHint {
  position: absolute;
  bottom: 7vh;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 13.5px;
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.82);
  animation: introPulse 2.2s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes introPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Hareket azaltilmis cihaz: animasyonsuz final gorunum */
.introGate.introStill .introElement,
.introGate.introStill .introTextWrap { animation: none; opacity: 1; }
.introGate.introStill .introElement { opacity: 0.92; }
.introGate.introStill .introPegasusWordmark { animation: none; opacity: 0.92; transform: none; }

@media (max-width: 900px) {
  .introElement { opacity: 0.75; }
  .introTextWrap { width: 88vw; left: 50%; top: 50%; }
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; }
.hidden { display: none !important; }

button {
  font: inherit;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  background: linear-gradient(180deg, #f1f0ea, #c9c8c0);
  color: #15130f;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(210, 210, 205, 0.16);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
button:hover { filter: brightness(1.06); box-shadow: 0 0 26px rgba(210, 210, 205, 0.3); }
button:disabled { opacity: 0.55; cursor: default; }

.ghostButton {
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.ghostButton:hover { background: rgba(255, 255, 255, 0.07); filter: none; box-shadow: none; }

input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: rgba(10, 10, 14, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
select option { background: #101014; color: var(--ink); }
input[type="date"] { color-scheme: dark; }

/* ---------- Login ---------- */
.loginView {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}
.loginCard {
  width: 100%;
  max-width: 400px;
  background: var(--surface-strong);
  border: 1px solid var(--line-accent);
  border-radius: 22px;
  padding: 36px 32px;
  box-shadow:
    0 0 60px rgba(210, 210, 205, 0.12),
    0 24px 60px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  backdrop-filter: blur(12px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.wordmark img { height: 26px; display: block; }
.wordmark .wordmark-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent-bright);
  border: 1px solid var(--line-accent);
  border-radius: 6px;
  padding: 3px 7px;
  background: var(--accent-soft);
}
.wordmark.lg { margin-bottom: 10px; }
.wordmark.lg img { height: 40px; }

#loginIntro { color: var(--muted); margin: 4px 0 20px; font-size: 13.5px; }

.loginTabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.tabButton {
  flex: 1;
  background: transparent;
  color: var(--muted);
  padding: 8px;
  box-shadow: none;
}
.tabButton:hover { filter: none; box-shadow: none; color: var(--ink); }
.tabButton.active {
  background: var(--accent-soft-2);
  color: var(--accent-ink);
  font-weight: 600;
}
.loginForm { display: flex; flex-direction: column; gap: 10px; }
.loginError { color: var(--danger); min-height: 1.2em; margin: 12px 0 0; font-size: 13px; }
.trialNotice {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--line-accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}
.trialNotice b { color: var(--accent-ink); font-family: var(--font-display); font-size: 15px; }
.trialNotice span { color: var(--muted); font-size: 11.5px; line-height: 1.45; }

/* ---------- Layout ---------- */
.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  padding: 10px;
  gap: 14px;
}

.sidebar {
  width: 86px;
  flex-shrink: 0;
  position: sticky;
  top: 10px;
  height: calc(100vh - 20px);
  z-index: 20;
  overflow: visible;
}
.sidebarPanel {
  position: absolute;
  inset: 0 auto 0 0;
  width: 240px;
  height: 100%;
  background: #000;
  border: 1px solid rgba(210, 210, 205, 0.18);
  border-radius: 16px;
  padding: 44px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  transition: width 0.25s ease;
}
.sidebar.isCollapsed .sidebarPanel {
  width: 86px;
}
.sidebarToggle {
  position: absolute;
  top: 12px;
  right: 13px;
  width: 38px;
  height: 28px;
  padding: 5px 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.035);
  color: var(--accent-ink);
  border-color: var(--line-accent);
  box-shadow: none;
}
.sidebarToggle svg { width: 18px; height: 18px; display: block; }
.brand { text-align: center; }
.brandLogo {
  width: 170px;
  display: block;
  margin: 0 auto;
  /* Kompozitoru zorlayan blend/mask yerine panelle ayni koyu zemini kullan. */
  mix-blend-mode: normal;
  filter: none;
  user-select: none;
  transition: none;
}
.brandLogo.lg { width: 220px; margin-bottom: 6px; }
.salonPanelTag {
  display: block;
  margin: 12px auto 0;
  width: fit-content;
  padding: 7px 22px;
  border: 1px solid var(--line-accent);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.nav { display: flex; flex-direction: column; gap: 4px; }
.navButton {
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: none;
  border: 1px solid transparent;
  font-family: var(--font-menu);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.015em;
}
.navButton .navLabel {
  flex: 1;
  min-width: 0;
  opacity: 1;
  overflow: hidden;
  transition: none;
}
.navIcon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  opacity: 0.75;
}
.navIcon svg { width: 16px; height: 16px; display: block; }
.navButton:hover { background: rgba(255, 255, 255, 0.04); filter: none; box-shadow: none; color: var(--ink); }
.navButton.active {
  background: var(--accent-soft);
  border-color: var(--line-accent);
  color: var(--accent-ink);
  font-weight: 600;
  box-shadow: inset 0 0 24px rgba(210, 210, 205, 0.08);
}
.navButton.active .navIcon { opacity: 1; }
.navBadge {
  background: #8c2f2a;
  color: #f5e9e7;
  font-size: 11px;
  font-family: var(--font-mono);
  border-radius: 999px;
  padding: 1px 7px;
  box-shadow: 0 0 12px rgba(140, 47, 42, 0.5);
}
.navBadge:empty { display: none; }
.waDot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.waDot.on { background: var(--green); box-shadow: 0 0 10px rgba(52, 224, 161, 0.7); }

.sidebarFoot { margin-top: auto; display: flex; flex-direction: column; gap: 7px; }
.sidebarFoot .ghostButton { width: 100%; }
.settingsNavButton { width: 100%; }

.waRow {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-accent);
  color: var(--ink);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  box-shadow: none;
  text-align: left;
}
.waRow:hover { background: rgba(255, 255, 255, 0.06); filter: none; }
.waRow .waIcon { margin-left: auto; width: 17px; height: 17px; color: var(--accent); opacity: 0.85; }
.waRow .waIcon svg { width: 100%; height: 100%; display: block; }

.content {
  flex: 1;
  padding: 28px 30px 34px;
  min-width: 0;
  min-height: calc(100vh - 20px);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(210, 210, 205, 0.18);
  border-radius: 16px;
  background: rgba(2, 2, 3, 0.22);
  /* Menunun ustune gelip geri cekilmesi ana paneli tekrar rasterlamasin. */
  contain: layout paint;
  isolation: isolate;
  transform: translateZ(0);
  will-change: transform;
}
.heroPegasus {
  position: absolute;
  top: -12px;
  right: 0;
  height: 330px;
  opacity: 0.32;
  filter: none;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: clamp(190px, 27vh, 260px);
  margin-bottom: 10px;
  padding: 20px 18px;
  position: relative;
  z-index: 1;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before, .eyebrow::after { content: "✦"; font-size: 9px; opacity: 0.8; }
.eyebrow::before { content: "— ✦"; letter-spacing: 0.1em; }
.eyebrow::after { content: "✦ —"; letter-spacing: 0.1em; }
.hero h1 {
  font-family: var(--font-headline);
  font-size: clamp(38px, 4.3vw, 62px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 0.96;
  text-transform: none;
  color: #edece7;
  text-shadow: 0 0 40px rgba(230, 230, 226, 0.16);
}
.heroSub {
  color: var(--muted);
  font-size: 13.5px;
  max-width: 460px;
  margin: 10px 0 0;
  line-height: 1.5;
}
.workspace { position: relative; z-index: 1; }

.panel {
  background: var(--surface);
  border: 1px solid rgba(210, 210, 205, 0.16);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.subPanel {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.panelHead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.panelHead h2 {
  font-family: var(--font-headline);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.panelHead p { color: var(--muted); margin: 4px 0 0; font-size: 12.5px; }
.panelTools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Stats ---------- */
.statRow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.statCard {
  background: linear-gradient(180deg, rgba(28, 26, 23, 0.85), rgba(15, 14, 13, 0.9));
  border: 1px solid var(--line-accent);
  border-radius: var(--radius-sm);
  padding: 20px 14px 16px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.statCard b {
  display: block;
  font-size: 34px;
  font-weight: 500;
  font-family: var(--font-display);
  color: #edece7;
  line-height: 1.1;
  margin-bottom: 8px;
}
.statCard small { color: var(--muted); font-size: 12px; }
.statCard.accent b { color: var(--accent-bright); text-shadow: 0 0 20px var(--accent-glow); }
.statCard.money b { color: var(--money); }

/* ---------- Tables ---------- */
.tableWrap { overflow-x: auto; }
.dataTable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dataTable th {
  text-align: left;
  color: var(--muted-2);
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.dataTable td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.dataTable tr:hover td { background: rgba(255, 255, 255, 0.02); }
.dataTable tr:last-child td { border-bottom: none; }
.cellMuted { color: var(--muted); }
.cellMessage { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.moneyCell { color: var(--money); font-family: var(--font-mono); font-weight: 600; }

.statusSelect {
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12.5px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 14, 0.85);
}
.statusSelect.s-new { color: var(--ink); }
.statusSelect.s-talked { color: var(--blue); border-color: rgba(110, 168, 255, 0.35); background: var(--blue-soft); }
.statusSelect.s-demo_scheduled { color: var(--amber); border-color: rgba(255, 194, 75, 0.35); background: var(--amber-soft); }
.statusSelect.s-demo_attended { color: var(--violet); border-color: rgba(181, 140, 255, 0.35); background: var(--violet-soft); }
.statusSelect.s-to_call { color: #ff9f6e; border-color: rgba(255, 159, 110, 0.35); background: rgba(255, 159, 110, 0.12); }
.statusSelect.s-sale { color: var(--green); border-color: rgba(52, 224, 161, 0.35); background: var(--green-soft); }
.statusSelect.s-lost { color: var(--danger); border-color: rgba(200, 82, 74, 0.35); background: var(--danger-soft); }

.platformSelect {
  width: 68px;
  padding: 5px 8px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}
.platformSelect.p-wp {
  color: var(--green);
  border-color: rgba(52, 224, 161, 0.35);
  background: var(--green-soft);
}
.platformSelect.p-ig {
  color: #ed8bd4;
  border-color: rgba(237, 139, 212, 0.38);
  background: rgba(237, 139, 212, 0.11);
}

.noteInput { width: 160px; padding: 5px 8px; font-size: 12.5px; }
.iconButton {
  background: transparent;
  color: var(--muted-2);
  padding: 4px 8px;
  font-size: 14px;
  box-shadow: none;
  border: none;
}
.iconButton:hover { color: var(--danger); background: var(--danger-soft); filter: none; box-shadow: none; }

.sourceTag {
  display: inline-block;
  font-size: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  border-radius: 6px;
  padding: 1px 6px;
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid rgba(52, 224, 161, 0.3);
  margin-left: 6px;
}

/* ---------- Card lists ---------- */
.cardList { display: flex; flex-direction: column; gap: 8px; }
.listCard {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.listCard.called { opacity: 0.45; }
.listCard b { font-size: 14px; }
.listCard small { color: var(--muted); display: block; margin-top: 2px; }
.listCard .cardActions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.emptyNote { color: var(--muted-2); font-size: 13px; padding: 14px 4px; }

/* ---------- Payments ---------- */
.twoCol { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .twoCol { grid-template-columns: 1fr; } }
.inlineForm { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.inlineForm input { flex: 1; min-width: 110px; }

.payButtons { display: flex; gap: 6px; }
.payButtons button { padding: 5px 10px; font-size: 12px; }
.payYes {
  background: linear-gradient(180deg, #2fce93, #1ba873);
  box-shadow: 0 0 14px rgba(52, 224, 161, 0.25);
}
.payNo {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(200, 82, 74, 0.35);
  box-shadow: none;
}
.payNo:hover { background: var(--danger-soft); filter: none; }
.badge {
  display: inline-block;
  font-size: 11px;
  font-family: var(--font-mono);
  border-radius: 999px;
  padding: 2px 9px;
  border: 1px solid transparent;
}
.badge.paid { background: var(--green-soft); color: var(--green); border-color: rgba(52, 224, 161, 0.3); }
.badge.pending { background: var(--amber-soft); color: var(--amber); border-color: rgba(255, 194, 75, 0.3); }
.badge.due { background: var(--danger-soft); color: var(--danger); border-color: rgba(200, 82, 74, 0.35); }

/* ---------- Media ---------- */
.uploadButton {
  display: inline-block;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(210, 210, 205, 0.28);
}
.uploadButton:hover { filter: brightness(1.1); }
.uploadProgress { margin-bottom: 14px; }
.uploadBar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  overflow: hidden;
}
.uploadBar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-bright));
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 0.2s ease;
}
.uploadProgress small { color: var(--muted); }

.mediaGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.mediaCard {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.mediaCard b { display: block; font-size: 13px; word-break: break-all; margin-bottom: 4px; }
.mediaCard small { color: var(--muted-2); display: block; margin-bottom: 10px; font-size: 11.5px; }
.mediaCard .cardActions { display: flex; gap: 6px; flex-wrap: wrap; }
.mediaCard .cardActions button { padding: 6px 10px; font-size: 12px; }

/* ---------- WhatsApp ---------- */
.waGateModal { max-width: 420px; align-items: center; text-align: center; }
.waGateIntro { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.waGateModal .waActions { justify-content: center; }
.waStatus { display: flex; align-items: center; gap: 10px; font-weight: 500; justify-content: center; }
.waStateDot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted-2); }
.waStateDot.on { background: var(--green); box-shadow: 0 0 14px rgba(52, 224, 161, 0.8); }
.waStateDot.wait { background: var(--amber); box-shadow: 0 0 14px rgba(255, 194, 75, 0.6); }
.waQrWrap { text-align: center; }
.waQrWrap img {
  width: 260px;
  height: 260px;
  border: 1px solid var(--line-accent);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
  box-shadow: 0 0 40px rgba(210, 210, 205, 0.15);
}
.waQrWrap p { color: var(--muted); font-size: 13px; max-width: 280px; margin: 8px auto 0; }
.waActions { display: flex; gap: 8px; }

/* ---------- Modals ---------- */
.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 2, 3, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal {
  background: var(--surface-strong);
  border: 1px solid var(--line-accent);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 60px rgba(210, 210, 205, 0.12), 0 30px 70px rgba(0, 0, 0, 0.7);
}
.modal.wide { max-width: 560px; }
.modal h3 { margin-bottom: 4px; font-size: 17px; }
.modalActions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.modalError { color: var(--danger); font-size: 13px; min-height: 1.2em; margin: 0; }

.formGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .formGrid { grid-template-columns: 1fr; } }
.formGrid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- Ayarlar ---------- */
.pageTitleText {
  display: inline-block;
  font-family: var(--font-headline);
  font-size: clamp(46px, 5vw, 72px);
  color: var(--accent-ink);
  line-height: 0.95;
}
.trialBadge {
  border: 1px solid var(--line-accent);
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.settingsHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.settingsHeader h2 { font-family: var(--font-headline); font-size: 28px; }
.settingsHeader p { color: var(--muted); margin: 4px 0 0; font-size: 12.5px; }
.settingsGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.settingsCard {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, rgba(28, 27, 25, 0.82), rgba(11, 11, 13, 0.9));
  padding: 17px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.settingsCardWide { grid-column: 1 / -1; }
.settingsCardHead { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 14px; }
.settingsCardHead h3 { font-size: 17px; color: var(--accent-ink); }
.settingsCardHead p { color: var(--muted); font-size: 11.5px; line-height: 1.45; margin: 2px 0 0; }
.settingsIcon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid var(--line-accent);
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 11px;
}
.settingsFormGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.settingsCard label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.035em;
}
.settingsCard label input,
.settingsCard label select,
.settingsCard label textarea { width: 100%; }
.recommendationNote,
.integrationNote { color: var(--muted-2); font-size: 11px; line-height: 1.5; margin: 12px 0 0; }
.recommendationNote b { color: var(--accent-ink); }
.connectionRow,
.toggleRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.connectionRow:first-of-type { border-top: 0; padding-top: 0; }
.connectionRow div,
.toggleRow div { display: flex; flex-direction: column; gap: 2px; }
.connectionRow b,
.toggleRow b { font-size: 13px; }
.connectionRow span,
.toggleRow span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.connectionRow button { padding: 7px 10px; font-size: 11.5px; white-space: nowrap; }
.mutedConnection { margin-top: 10px; }
.soonBadge { color: var(--accent) !important; font-family: var(--font-mono); letter-spacing: 0.12em; }
.settingsCard label.switch {
  display: inline-flex !important;
  position: relative;
  flex: 0 0 50px;
  width: 50px;
  height: 28px;
  flex-direction: row;
  align-items: center;
  gap: 0;
  cursor: pointer;
}
.settingsCard .switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.settingsCard .switch > span {
  display: block;
  position: relative;
  width: 50px;
  height: 28px;
  flex: 0 0 50px;
  border: 1px solid var(--line-accent);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.settingsCard .switch > span::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  position: absolute;
  top: 3px;
  left: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
  transition: transform 0.2s ease, background 0.2s ease;
}
.settingsCard .switch input:checked + span {
  background: var(--accent-soft-2);
  border-color: var(--accent);
  box-shadow: inset 0 0 15px var(--accent-soft);
}
.settingsCard .switch input:checked + span::after { transform: translateX(21px); background: var(--accent-bright); }
.settingsCard .switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.followUpFields {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(260px, 1fr);
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  transition: opacity 0.15s ease;
}
.followUpFields.isDisabled { opacity: 0.42; pointer-events: none; }
.delayInput { display: flex; align-items: center; gap: 8px; }
.delayInput input { min-width: 0; }
.delayInput span { color: var(--muted); font-family: var(--font-sans); font-size: 12px; }
.planProgress { height: 7px; background: rgba(255, 255, 255, 0.06); border-radius: 999px; overflow: hidden; }
.planProgress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent-bright)); transition: width 0.25s ease; }
.helpCard { display: flex; flex-direction: column; justify-content: space-between; }
.helpCard:hover { border-color: var(--line-accent); background: var(--accent-soft); filter: none; }
.helpCard > b { color: var(--accent-ink); font-size: 14px; }
.settingsFeedback { min-height: 18px; margin: 13px 2px 0; color: var(--accent-ink); font-size: 12px; }

/* ---------- Yeni hesap onboarding ---------- */
.onboardingModal { max-width: 600px; padding: 30px; }
.onboardingKicker { color: var(--accent); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; }
.onboardingModal > h3 { font-family: var(--font-headline); font-size: 32px; line-height: 1; }
.onboardingModal > p { color: var(--muted); margin: 0 0 6px; font-size: 12.5px; }
.onboardingSteps { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 8px; }
.onboardingSteps li { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 11px; padding: 11px; background: rgba(255, 255, 255, 0.025); }
.onboardingSteps li > span { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--font-mono); font-size: 11px; }
.onboardingSteps div { display: flex; flex-direction: column; gap: 2px; }
.onboardingSteps b { font-size: 13px; }
.onboardingSteps small { color: var(--muted); font-size: 11px; line-height: 1.4; }

body[data-motion="reduced"] .sidebar,
body[data-motion="reduced"] .brandLogo,
body[data-motion="reduced"] .switch > span,
body[data-motion="reduced"] .switch > span::after,
body[data-motion="reduced"] .planProgress span { transition: none; }

body[data-motion="reduced"] .ambientEffect { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .ambientEffect { animation: none !important; }
}

@media (max-width: 900px) {
  .settingsGrid { grid-template-columns: 1fr; }
  .settingsCardWide { grid-column: auto; }
  .followUpFields { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .settingsHeader { align-items: flex-start; flex-direction: column; }
  .settingsFormGrid { grid-template-columns: 1fr; }
  .settingsHeader button { width: 100%; }
  .connectionRow, .toggleRow { align-items: flex-start; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(210, 210, 205, 0.4); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .layout { flex-direction: column; padding: 0; gap: 0; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    overflow: visible;
  }
  .sidebarPanel {
    width: 100% !important;
    height: auto;
    position: static;
    border-width: 0 0 1px;
    border-radius: 0;
    padding: 14px;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  .sidebarToggle { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .sidebarFoot { margin: 0 0 0 auto; }
  .content { min-height: 100vh; padding: 18px 14px; border: 0; border-radius: 0; }
  .hero { min-height: 190px; padding: 16px 6px; }
  .heroPegasus { right: -90px; opacity: 0.26; }
}

/* ---------- Baslik gorselleri (optimize WebP) ---------- */
.pageTitleImg {
  display: block;
  width: auto;
  height: auto;
  max-height: 112px;
  max-width: min(660px, 72vw);
  filter: none;
  user-select: none;
}
.heroActions { display: flex; align-items: center; gap: 8px; }

/* ---------- Kapali sol menu (masaustu): sabit ray + tiklamali panel ---------- */
@media (min-width: 821px) {
  /* Menu acilinca icerigi itmek yerine kendi genisligi buyur — tasma olmaz */
  .sidebar { width: 240px; transition: width 0.25s ease; }
  .sidebar.isCollapsed { width: 86px; }
  .sidebar.isCollapsed .sidebarToggle { left: 23px; right: auto; }
  .sidebar.isCollapsed .brand,
  .sidebar.isCollapsed .sidebarFoot { width: 52px; }
  .sidebar.isCollapsed .brandLogo { width: 52px; margin-left: 0; margin-right: 0; }
  .sidebar.isCollapsed .salonPanelTag,
  .sidebar.isCollapsed .navLabel,
  .sidebar.isCollapsed .navBadge,
  .sidebar.isCollapsed #waRowText,
  .sidebar.isCollapsed .waDot {
    opacity: 0;
    width: 0;
    min-width: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
  }
  .sidebar.isCollapsed .navButton,
  .sidebar.isCollapsed .waRow {
    width: 52px;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    gap: 0;
  }
  .sidebar.isCollapsed .navIcon,
  .sidebar.isCollapsed .waRow .waIcon { margin-left: 0; margin-right: 0; }
  .sidebar.isCollapsed .sidebarFoot .ghostButton { font-size: 0; padding: 9px 0; }
  .sidebar.isCollapsed .sidebarFoot .ghostButton::before { content: "⏻"; font-size: 15px; margin: 0 auto; }
  .navButton, .waRow { white-space: nowrap; overflow: hidden; }
}

/* Kartlar artik sabit; isaretciyi izleyen glow kaldirildi. */
.panel, .subPanel, .statCard, .listCard, .mediaCard, .loginCard, .modal { position: relative; }

/* ---------- Satis hunisi (gelismis gorunum) ---------- */
.funnelModal { max-width: 780px; }
.funnelHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.funnelHead p { color: var(--muted); font-size: 12.5px; margin: 4px 0 0; }
.funnelRow { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.funnelMeta { width: 158px; flex-shrink: 0; text-align: right; }
.funnelMeta b { display: block; font-family: var(--font-display); font-size: 15px; }
.funnelMeta small { color: var(--muted); font-size: 11.5px; }
.funnelStuck {
  display: inline-block;
  margin-top: 3px;
  font-size: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(200, 82, 74, 0.35);
  border-radius: 999px;
  padding: 1px 8px;
}
.funnelBarWrap { flex: 1; }
.funnelBar {
  position: relative;
  height: 54px;
  margin: 0 auto;
  min-width: 90px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  border: 1px solid color-mix(in srgb, var(--fc, #cfcec7) 40%, transparent);
  box-shadow: inset 0 0 24px color-mix(in srgb, var(--fc, #cfcec7) 10%, transparent);
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 16px 100%);
  border-radius: 8px;
}
.funnelDot {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px color-mix(in srgb, currentColor 60%, transparent);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.funnelDot:hover { transform: translate(-50%, -50%) scale(1.5); z-index: 3; }
.funnelDot.still { position: static; display: inline-block; transform: none; cursor: default; width: 9px; height: 9px; }
.funnelSide { display: flex; gap: 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.funnelSideRow { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.funnelSideRow b { color: var(--ink); }
.funnelTip {
  position: absolute;
  z-index: 20;
  max-width: 250px;
  background: var(--surface-strong);
  border: 1px solid var(--line-accent);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
}
.funnelTip b { display: block; font-size: 13px; }
.funnelTip small { color: var(--muted); display: block; }

/* ---------- Ayarlar: arka plan / vurgu swatchlari ---------- */
.visuallyHidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.settingsFull { margin-bottom: 14px; }
.settingsLabel {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.bgSwatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.bgSwatch {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  color: var(--muted);
}
.bgSwatch:hover { border-color: var(--line-accent); filter: none; box-shadow: none; color: var(--ink); }
.bgSwatch.active {
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px var(--accent-glow);
}
.bgSwatchPreview {
  display: block;
  height: 40px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.bgSwatchLabel { font-size: 10.5px; text-align: center; line-height: 1.2; }
.accentSwatches { display: flex; gap: 8px; flex-wrap: wrap; }
.accentSwatch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12px;
  color: var(--muted);
  box-shadow: none;
  cursor: pointer;
}
.accentSwatch:hover { border-color: var(--line-accent); color: var(--ink); filter: none; box-shadow: none; }
.accentSwatch.active { border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 14px var(--accent-glow); }
.accentDot { width: 13px; height: 13px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }

/* ---------- Mesaj onerileri ---------- */
.suggestModal { max-width: 620px; }
.suggestIntro { color: var(--muted); font-size: 12.5px; margin: 2px 0 12px; }
.suggestList { display: flex; flex-direction: column; gap: 10px; }
.suggestCard {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  padding: 13px 15px;
}
.suggestCard b { font-size: 13px; color: var(--accent-ink); display: block; margin-bottom: 6px; }
.suggestCard p { margin: 0 0 10px; font-size: 13px; line-height: 1.55; color: var(--ink); }
.suggestActions { display: flex; gap: 8px; align-items: center; }
.suggestActions .ghostButton { padding: 6px 12px; font-size: 12px; }
.waSendLink {
  display: inline-block;
  font-size: 12px;
  color: var(--green);
  border: 1px solid rgba(52, 224, 161, 0.3);
  background: var(--green-soft);
  border-radius: 9px;
  padding: 6px 12px;
  text-decoration: none;
}
.waSendLink:hover { filter: brightness(1.15); }

/* ---------- Geri donus rozeti (lead satiri) ---------- */
.rowActions { white-space: nowrap; }
.followBadge {
  background: var(--amber-soft);
  border: 1px solid rgba(255, 194, 75, 0.35);
  color: var(--amber);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  box-shadow: none;
  cursor: pointer;
  margin-right: 4px;
  animation: followPulse 2.4s ease-in-out infinite;
}
@keyframes followPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 194, 75, 0); }
  50% { box-shadow: 0 0 12px rgba(255, 194, 75, 0.35); }
}
.suggestButton { margin-right: 4px; }

/* ============================================================
   SPA DIJITAL ESINTILI PEGASUS UI
   Varsayilan siyah, kirmizi aksan; beyaz tema secenegi dahil.
   ============================================================ */
:root {
  --bg: #080909;
  --ink: #f5f5f3;
  --muted: #969a96;
  --muted-2: #696d69;
  --surface: #111312;
  --surface-2: #151716;
  --surface-strong: #111312;
  --line: rgba(255, 255, 255, 0.085);
  --line-accent: rgba(240, 66, 72, 0.32);
  --accent: #ef444a;
  --accent-bright: #ff666b;
  --accent-deep: #b91f28;
  --accent-ink: #fff5f5;
  --accent-glow: rgba(239, 68, 74, 0.26);
  --accent-soft: rgba(239, 68, 74, 0.11);
  --accent-soft-2: rgba(239, 68, 74, 0.18);
  --radius: 16px;
  --radius-sm: 12px;
  --font-sans: "DM Sans", "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
  --font-display: "DM Sans", "Space Grotesk", sans-serif;
  --font-headline: "DM Sans", "Space Grotesk", sans-serif;
  --font-menu: "DM Sans", "Space Grotesk", sans-serif;
}

html { background: #080909; }
body,
body[data-background],
body[data-background="deep-space"],
body[data-background="nebula"],
body[data-background="midnight"],
body[data-background="crimson"],
body[data-background="ocean"],
body[data-background="emerald"],
body[data-background="aurora"],
body[data-background="rose"],
body[data-background="gold-dust"],
body[data-background="violet-storm"] {
  background: #080909;
  color: var(--ink);
  font-family: var(--font-sans);
}
body::after,
#starfield,
.heroPegasus { display: none !important; }

body[data-ui-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f5;
  --ink: #18201d;
  --muted: #78817d;
  --muted-2: #929b97;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --surface-strong: #ffffff;
  --line: #dfe7e3;
  --line-accent: rgba(219, 45, 54, 0.28);
  --accent: #dc3038;
  --accent-bright: #c8212a;
  --accent-deep: #a31720;
  --accent-ink: #8f1219;
  --accent-glow: rgba(220, 48, 56, 0.16);
  --accent-soft: rgba(220, 48, 56, 0.075);
  --accent-soft-2: rgba(220, 48, 56, 0.13);
  background: #f4f6f5;
}
body[data-ui-theme="light"] .content,
body[data-ui-theme="light"] .panel,
body[data-ui-theme="light"] .subPanel,
body[data-ui-theme="light"] .statCard,
body[data-ui-theme="light"] .modal,
body[data-ui-theme="light"] .listCard,
body[data-ui-theme="light"] .mediaCard {
  background: var(--surface);
  box-shadow: 0 10px 34px rgba(20, 45, 36, 0.07);
}
body[data-ui-theme="light"] input,
body[data-ui-theme="light"] select,
body[data-ui-theme="light"] textarea {
  color: var(--ink);
  background: #f8faf9;
}

.layout {
  display: flex;
  min-height: 100vh;
  padding: 0;
  gap: 0;
  background: var(--bg);
}
.sidebar {
  position: sticky;
  top: 0;
  width: 250px;
  height: 100vh;
}
.sidebarPanel {
  position: absolute;
  inset: 0;
  width: 250px;
  height: 100%;
  padding: 27px 18px 18px;
  gap: 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background:
    radial-gradient(circle at 0 0, rgba(199, 31, 40, 0.2), transparent 44%),
    linear-gradient(180deg, #150709, #0b0c0b 62%, #080909);
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.16);
  transition: width 0.24s ease;
}
.sidebarToggle {
  top: 23px;
  right: 15px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  background: rgba(255,255,255,.045);
}
.brand {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 42px 0 7px;
  text-align: left;
  white-space: nowrap;
}
.crmBrandWord { color: #fff; font-size: 20px; letter-spacing: .075em; }
.salonPanelTag {
  display: inline-flex;
  margin: 0;
  width: auto;
  padding: 2px 5px;
  border-color: rgba(255,255,255,.25);
  border-radius: 5px;
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.06);
  font-family: var(--font-sans);
  font-size: 8px;
  letter-spacing: .08em;
}
.activeSalonCard {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
}
.activeSalonAvatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #ff5a60, #bd1f29);
  font-weight: 800;
}
.activeSalonCard span:nth-child(2) { min-width: 0; }
.activeSalonCard small,
.activeSalonCard b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activeSalonCard small { margin-bottom: 3px; color: rgba(255,255,255,.52); font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.activeSalonCard b { color: #fff; font-size: 12px; }
.activeSalonCard i { color: rgba(255,255,255,.48); font-style: normal; }
.navSectionLabel {
  margin: 2px 9px -3px;
  color: rgba(255,255,255,.4);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.nav { gap: 5px; }
.navButton,
.navActionButton {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  color: rgba(255,255,255,.62);
  background: transparent;
  box-shadow: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.navButton:hover,
.navActionButton:hover { color: #fff; background: rgba(255,255,255,.06); transform: translateX(2px); }
.navButton.active {
  color: #fff;
  border: 0;
  background: linear-gradient(90deg, rgba(239,68,74,.28), rgba(239,68,74,.13));
  box-shadow: inset 3px 0 #ef444a;
}
.navIcon { color: currentColor; opacity: .86; }
.navIcon svg { width: 19px; height: 19px; }
.navBadge { margin-left: auto; background: #ff6469; color: #250507; box-shadow: none; font-weight: 800; }
.sidebarGoal {
  padding: 13px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, rgba(239,68,74,.14), rgba(255,255,255,.035));
}
.sidebarGoal small { color: rgba(255,255,255,.52); font-size: 9px; }
.sidebarGoal strong { display: block; margin: 4px 0 9px; font-size: 18px; }
.sidebarGoal > span { display: block; height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.12); }
.sidebarGoal > span i { display: block; width: 0; height: 100%; border-radius: inherit; background: #ff5a60; transition: width .35s ease; }
.sidebarGoal p { margin: 8px 0 0; color: rgba(255,255,255,.45); font-size: 9px; }
.sidebarFoot { gap: 8px; }
.waRow { color: rgba(255,255,255,.82); border-color: rgba(255,255,255,.11); background: rgba(255,255,255,.035); }
.settingsNavButton { color: rgba(255,255,255,.65); }

.content {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  padding: 0 32px 38px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  contain: none;
  background: var(--bg);
}
.crmTopbar {
  position: sticky;
  z-index: 18;
  top: 0;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 -32px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 91%, transparent);
  backdrop-filter: blur(18px);
}
.crmTopbar h1 { margin: 0; color: var(--ink); font-size: 20px; letter-spacing: -.035em; }
.crmTopbarActions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.syncBadge {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 700;
}
.syncBadge i { width: 8px; height: 8px; border-radius: 50%; background: #4fd28a; box-shadow: 0 0 12px rgba(79,210,138,.5); }
.topSearch { position: relative; width: min(310px, 28vw); }
.topSearch svg { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.topSearch input {
  width: 100%;
  min-height: 40px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--surface);
}
.topIconButton,
.topAddButton {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.topIconButton { width: 42px; padding: 0; color: var(--ink); background: var(--surface); font-size: 17px; }
.topAddButton { padding: 0 16px; color: #fff; border-color: #c72831; background: linear-gradient(135deg, #ef444a, #be222b); font-weight: 700; }
.topAddButton span { font-size: 18px; }
.topIconButton:hover,
.topAddButton:hover { transform: translateY(-1px); box-shadow: 0 8px 22px var(--accent-glow); }

.hero {
  min-height: 156px;
  margin: 0;
  padding: 31px 0 24px;
  align-items: flex-end;
  animation: spaRise .42s ease both;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}
.eyebrow::before,
.eyebrow::after { display: none; }
.hero h1,
.pageTitleText {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-headline);
  font-size: clamp(31px, 3.2vw, 46px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.05em;
  text-shadow: none;
}
.heroSub { max-width: 650px; margin-top: 8px; color: var(--muted); font-size: 14px; }
.heroActions .ghostButton { border-color: var(--line); background: var(--surface); color: var(--ink); }
.panel,
.subPanel,
.listCard,
.mediaCard,
.modal {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(0,0,0,.2);
}
.panel { padding: 22px; animation: spaRise .48s .04s ease both; }
.panelHead { margin-bottom: 18px; align-items: center; }
.panelHead h2,
.settingsHeader h2 { color: var(--ink); font-family: var(--font-headline); font-size: 20px; letter-spacing: -.035em; }
.panelHead p,
.settingsHeader p { color: var(--muted); font-size: 12px; }
.statRow {
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.statCard {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  text-align: left;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  transition: transform .18s ease, border-color .18s ease;
}
.statCard:hover { transform: translateY(-2px); border-color: var(--line-accent); }
.statCard b { order: 2; margin: 0; color: var(--ink); font-family: var(--font-sans); font-size: 29px; font-weight: 700; }
.statCard small { order: 1; color: var(--muted); font-size: 11px; }
.statCard.accent { background: linear-gradient(145deg, var(--surface-2), var(--accent-soft)); }
.statCard.accent b { color: var(--accent-bright); text-shadow: none; }
.panelTools input,
.panelTools select,
input,
select,
textarea {
  border-color: var(--line);
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 78%, #000 22%);
}
.panelTools #addLeadButton,
.uploadButton,
#saveSettingsButton {
  color: #fff;
  border-color: #c72831;
  background: linear-gradient(135deg, #ef444a, #be222b);
}
.dataTable { font-size: 12px; }
.dataTable th { padding: 12px 10px; color: var(--muted); font-family: var(--font-sans); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.dataTable td { padding: 13px 10px; border-bottom-color: var(--line); }
.dataTable tr { transition: background .16s ease; }
.dataTable tr:hover td { background: var(--accent-soft); }
.statusSelect,
.platformSelect,
.noteInput { background: color-mix(in srgb, var(--surface) 84%, #000 16%); }

@keyframes spaRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero,
  .panel { animation: none; }
  * { scroll-behavior: auto !important; }
}
@media (min-width: 821px) {
  .sidebar { width: 250px; transition: width .24s ease; }
  .sidebar.isCollapsed { width: 82px; }
  .sidebar.isCollapsed .sidebarPanel { width: 82px; padding-left: 15px; padding-right: 15px; }
  .sidebar.isCollapsed .brand,
  .sidebar.isCollapsed .activeSalonCard,
  .sidebar.isCollapsed .sidebarGoal,
  .sidebar.isCollapsed .navSectionLabel { display: none; }
  .sidebar.isCollapsed .navLabel,
  .sidebar.isCollapsed .navBadge,
  .sidebar.isCollapsed #waRowText,
  .sidebar.isCollapsed .waDot { display: none; }
  .sidebar.isCollapsed .navButton,
  .sidebar.isCollapsed .navActionButton,
  .sidebar.isCollapsed .waRow { width: 52px; justify-content: center; padding: 0; }
}
@media (max-width: 1180px) {
  .statRow { grid-template-columns: repeat(4, minmax(115px, 1fr)); }
  .syncBadge { display: none; }
}
@media (max-width: 820px) {
  .layout { display: block; }
  .sidebar { position: relative; width: 100%; height: auto; }
  .sidebarPanel {
    position: relative;
    width: 100% !important;
    height: auto;
    padding: 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    align-items: center;
    gap: 9px;
  }
  .sidebarToggle,
  .activeSalonCard,
  .navSectionLabel,
  .sidebarGoal,
  .waRow,
  .sidebarFoot > .ghostButton { display: none; }
  .brand { min-height: 36px; padding: 0; }
  .crmBrandWord { font-size: 16px; }
  .nav { flex: 1; flex-direction: row; overflow-x: auto; }
  .navButton,
  .navActionButton { width: auto; min-width: 46px; padding: 0 12px; white-space: nowrap; }
  .sidebarFoot { margin: 0; }
  .settingsNavButton { width: 46px; padding: 0; justify-content: center; }
  .settingsNavButton .navLabel { display: none; }
  .content { min-height: 100vh; padding: 0 16px 28px; }
  .crmTopbar { min-height: 64px; margin: 0 -16px; padding: 0 16px; }
  .crmTopbarActions { gap: 7px; }
  .topSearch { display: none; }
  .topAddButton { padding: 0 12px; font-size: 0; }
  .topAddButton span { font-size: 20px; }
  .hero { min-height: 142px; padding-top: 25px; }
  .statRow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 15px; }
}

/* ============================================================
   PEGASUS CRM SANDBOX — SPA TARZI GENEL BAKIS + KONUSMA PANELI
   ============================================================ */
:root {
  --spa-accent: #ef444a;
  --spa-accent-soft: rgba(239, 68, 74, 0.14);
  --spa-whatsapp: #34d18b;
  --spa-instagram: #a777ff;
}

.topbarIdentity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.sandboxBadge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid rgba(239, 68, 74, 0.26);
  border-radius: 999px;
  color: #ff8589;
  background: rgba(239, 68, 74, 0.08);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
  white-space: nowrap;
}
.sandboxMode button:disabled,
.sandboxMode input:disabled,
.sandboxMode select:disabled {
  cursor: not-allowed;
  opacity: .52;
}

#leadsView {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}
#leadsView > .panelHead,
#leadsView > .tableWrap {
  background: var(--surface);
}
#leadsView > .panelHead {
  margin: 0;
  padding: 22px 24px 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}
#leadsView > .tableWrap {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
}
.statRow {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.overviewKpi {
  min-height: 150px;
  padding: 21px 22px;
  animation: spaCardEnter .52s cubic-bezier(.2,.75,.3,1) both;
}
.overviewKpi:nth-child(2) { animation-delay: .045s; }
.overviewKpi:nth-child(3) { animation-delay: .09s; }
.overviewKpi:nth-child(4) { animation-delay: .135s; }
.overviewKpi .kpiTop {
  order: 1;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  width: 100%;
  gap: 11px;
}
.overviewKpi .kpiIcon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #ff8589;
  background: var(--spa-accent-soft);
  font-size: 18px;
  font-weight: 800;
}
.overviewKpi:nth-child(2) .kpiIcon { color: #f2b94b; background: rgba(242,185,75,.13); }
.overviewKpi:nth-child(3) .kpiIcon { color: #a777ff; background: rgba(167,119,255,.13); }
.overviewKpi:nth-child(4) .kpiIcon { color: #6fa8ff; background: rgba(111,168,255,.13); }
.overviewKpi .kpiTop small {
  position: static;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.overviewKpi .kpiTop i {
  color: var(--muted-2);
  font-style: normal;
  letter-spacing: 2px;
}
.overviewKpi > b {
  order: 2;
  margin: 13px 0 2px 49px;
  font-size: clamp(26px, 2.15vw, 38px);
  letter-spacing: -.055em;
}
.overviewKpi > p {
  order: 3;
  margin: 0 0 0 49px;
  color: var(--muted);
  font-size: 11px;
}

.overviewGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, .75fr);
  gap: 18px;
  margin-bottom: 18px;
}
.overviewCard {
  min-height: 350px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 16px 46px rgba(0,0,0,.12);
  animation: spaCardEnter .58s .15s cubic-bezier(.2,.75,.3,1) both;
}
.overviewCard > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 24px 17px;
  border-bottom: 1px solid var(--line);
}
.overviewCard h2 { margin: 0; color: var(--ink); font-size: 17px; letter-spacing: -.035em; }
.overviewCard header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.reportLink {
  border: 0;
  color: #ff7479;
  background: transparent;
  box-shadow: none;
  padding: 7px 0;
  font-size: 11px;
  font-weight: 800;
}
.reportLink:hover { filter: none; transform: translateX(2px); color: var(--accent-bright); }
.revenueTotal {
  padding: 22px 24px 4px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.055em;
}
.revenueChart {
  position: relative;
  min-height: 235px;
  padding: 0 19px 8px;
}
.revenueChart svg { display: block; width: 100%; height: 210px; overflow: visible; }
.chartGrid line { stroke: var(--line); stroke-dasharray: 4 6; }
.chartArea { fill: url(#revenueFill); }
.chartLine {
  fill: none;
  stroke: var(--spa-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 5px 10px rgba(239,68,74,.24));
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawRevenue 1.1s .25s ease forwards;
}
.revenueChart circle {
  fill: var(--surface);
  stroke: var(--spa-accent);
  stroke-width: 2.5;
  opacity: 0;
  animation: spaFade .3s .8s ease forwards;
}
.chartLabels {
  position: absolute;
  right: 19px;
  bottom: 10px;
  left: 19px;
  height: 24px;
}
.chartLabels span {
  position: absolute;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 10px;
  text-transform: capitalize;
}
.sourceChartWrap {
  display: grid;
  place-items: center;
  min-height: 285px;
  padding: 22px;
}
.sourceDonut {
  --wp-angle: 0deg;
  position: relative;
  display: grid;
  place-items: center;
  width: 174px;
  height: 174px;
  border-radius: 50%;
  background: conic-gradient(var(--spa-whatsapp) 0 var(--wp-angle), var(--spa-instagram) var(--wp-angle) 360deg);
  transform: rotate(-90deg);
  animation: spaScale .55s .25s cubic-bezier(.2,.75,.3,1) both;
}
.sourceDonut::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: inherit;
  background: var(--surface);
}
.sourceDonut > span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  transform: rotate(90deg);
}
.sourceDonut b { color: var(--ink); font-size: 28px; line-height: 1; }
.sourceDonut small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.sourceLegend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 10px 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 10px;
}
.sourceLegend div { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 6px; }
.sourceLegend b { color: var(--ink); }
.sourceDot { width: 7px; height: 7px; border-radius: 50%; }
.sourceDot.wp { background: var(--spa-whatsapp); }
.sourceDot.ig { background: var(--spa-instagram); }

.leadRow { cursor: pointer; outline: none; }
.leadRow:focus td { background: var(--accent-soft); }
.leadIdentity {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  text-align: left;
}
.leadIdentity:hover { filter: none; transform: none; color: var(--accent-bright); }
.leadIdentity > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--line-accent);
  border-radius: 9px;
  color: #ff8589;
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
}
.leadIdentity b { font-size: 12px; font-weight: 700; }
.cellMessage[data-action="conversation"] { cursor: pointer; }
.cellMessage[data-action="conversation"] span {
  display: inline-block;
  max-width: 290px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}
.cellMessage[data-action="conversation"] i {
  float: right;
  color: var(--muted-2);
  font-style: normal;
  transition: transform .18s ease, color .18s ease;
}
.leadRow:hover .cellMessage i { color: var(--accent-bright); transform: translateX(3px); }

.conversationBackdrop {
  position: fixed;
  z-index: 150;
  inset: 0;
  background: rgba(0,0,0,.54);
  backdrop-filter: blur(5px);
  animation: spaFade .2s ease both;
}
.conversationDrawer {
  position: fixed;
  z-index: 151;
  top: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  width: min(470px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: -24px 0 70px rgba(0,0,0,.34);
  backdrop-filter: blur(22px);
  transform-origin: right center;
  animation: drawerIn .36s cubic-bezier(.2,.75,.3,1) both;
}
.conversationHead {
  display: grid;
  grid-template-columns: 45px 1fr 38px;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.conversationAvatar {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #ef444a, #a81722);
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(239,68,74,.22);
}
.conversationHead h2 { margin: 0; font-size: 17px; letter-spacing: -.035em; }
.conversationHead p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.conversationClose {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-2);
  box-shadow: none;
  font-size: 24px;
  font-weight: 300;
}
.conversationNotice {
  margin: 12px 18px 0;
  padding: 10px 12px;
  border: 1px solid rgba(242,185,75,.22);
  border-radius: 10px;
  color: #e7bd68;
  background: rgba(242,185,75,.08);
  font-size: 10px;
  line-height: 1.45;
}
.conversationMessages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 20px 18px 26px;
  scroll-behavior: smooth;
}
.messageBubble {
  width: fit-content;
  max-width: 84%;
  padding: 11px 13px 8px;
  border: 1px solid var(--line);
  border-radius: 15px 15px 15px 4px;
  background: var(--surface-2);
  animation: messageIn .28s ease both;
}
.messageBubble.outgoing {
  align-self: flex-end;
  border-color: rgba(239,68,74,.23);
  border-radius: 15px 15px 4px 15px;
  background: linear-gradient(145deg, rgba(239,68,74,.18), rgba(239,68,74,.09));
}
.messageBubble p { margin: 0; color: var(--ink); font-size: 12.5px; line-height: 1.48; white-space: pre-wrap; }
.messageBubble small { display: block; margin-top: 6px; color: var(--muted-2); font-size: 8.5px; text-align: right; }
.conversationLoading,
.conversationEmpty {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
  text-align: center;
}
.conversationLoading span {
  width: 25px;
  height: 25px;
  border: 2px solid var(--line);
  border-top-color: var(--spa-accent);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
.conversationLoading p,
.conversationEmpty p { margin: 9px 0 0; font-size: 11px; }
.conversationEmpty b { color: var(--ink); }
.conversationEmpty.error b { color: var(--accent-bright); }
.conversationFoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.conversationFoot small { color: var(--accent-bright); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.conversationFoot p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.conversationFoot button {
  flex: 0 0 auto;
  min-height: 39px;
  padding: 0 14px;
  border: 1px solid #b6252d;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #ef444a, #bd222b);
  font-size: 10px;
  font-weight: 800;
}

body[data-ui-theme="light"] #leadsView > .panelHead,
body[data-ui-theme="light"] #leadsView > .tableWrap,
body[data-ui-theme="light"] .overviewCard,
body[data-ui-theme="light"] .conversationDrawer,
body[data-ui-theme="light"] .conversationFoot {
  background: #fff;
}

@keyframes spaCardEnter {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes drawRevenue { to { stroke-dashoffset: 0; } }
@keyframes spaFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spaScale {
  from { opacity: 0; transform: rotate(-90deg) scale(.82); }
  to { opacity: 1; transform: rotate(-90deg) scale(1); }
}
@keyframes drawerIn {
  from { opacity: 0; transform: translateX(32px) scale(.985); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes messageIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1120px) {
  .overviewGrid { grid-template-columns: 1fr; }
  .sourceChartWrap { grid-template-columns: 210px 1fr; min-height: 220px; }
}
@media (max-width: 820px) {
  .sandboxBadge { display: none; }
  .overviewGrid { grid-template-columns: 1fr; }
  .overviewKpi { min-height: 132px; padding: 16px; }
  .overviewKpi > b,
  .overviewKpi > p { margin-left: 0; }
  .overviewCard { min-height: 300px; }
  .sourceChartWrap { grid-template-columns: 1fr; }
  #leadsView > .panelHead { padding: 18px 15px 13px; }
  .conversationDrawer { top: 0; right: 0; bottom: 0; width: 100%; border-radius: 0; }
}
@media (max-width: 560px) {
  .statRow { grid-template-columns: 1fr 1fr; gap: 10px; }
  .overviewKpi { min-height: 122px; }
  .overviewKpi .kpiTop { grid-template-columns: 32px 1fr; }
  .overviewKpi .kpiTop i { display: none; }
  .overviewKpi .kpiIcon { width: 32px; height: 32px; }
  .overviewKpi > b { font-size: 22px; }
  .overviewKpi > p { font-size: 9px; }
  .conversationFoot p { display: none; }
}
