/* ============================================================
   YASSA CRM — black + vivid red, soft "premium glow" theme
   Visual layer only. Class/id hooks preserved for app.js.
   Red theme is driven by --red* tokens (decoupled from the
   backend-controlled --pink/--purple vars so it stays red).
   ============================================================ */

:root {
  color-scheme: dark;

  /* base surfaces */
  --bg: #050506;
  --bg-2: #0a0a0d;
  --ink: #f7f7fb;
  --muted: #9a9aa6;
  --muted-2: #6a6a76;
  --surface: rgba(19, 19, 24, 0.82);
  --surface-2: rgba(26, 26, 32, 0.9);
  --surface-strong: rgba(22, 22, 28, 0.96);
  --line: rgba(255, 255, 255, 0.07);
  --line-red: rgba(255, 45, 64, 0.18);

  /* vivid red system */
  --red: #ff2d40;
  --red-bright: #ff5e6e;
  --red-deep: #d40d22;
  --red-ink: #ffd2d7;
  --red-glow: rgba(255, 45, 64, 0.55);
  --red-soft: rgba(255, 45, 64, 0.10);
  --red-soft-2: rgba(255, 45, 64, 0.18);

  /* money accent (champagne gold — premium + distinct) */
  --money: #f7cd7e;
  --money-soft: rgba(247, 205, 126, 0.12);
  --money-line: rgba(247, 205, 126, 0.3);

  /* functional status colors */
  --green: #34e0a1;
  --amber: #ffc24b;
  --rose: #ff5d77;

  /* legacy vars kept ONLY as a harmless target for backend
     applyClientBrand() — nothing visible depends on them. */
  --pink: #ff2d40;
  --pink-2: #ff5e6e;
  --purple: #d40d22;

  --font-sans: "Space Grotesk", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: "Orbitron", "Space Grotesk", sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  background: #000;
}

body {
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 45, 64, 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;
}

/* very soft glow at the top — replaces the harsh scanline */
body::after {
  background: radial-gradient(60% 40% at 50% 0%, rgba(255, 45, 64, 0.08), transparent 70%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input,
textarea {
  border-radius: var(--radius-sm);
}

/* primary action button — soft vivid red with gentle glow */
button {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 22px rgba(255, 45, 64, 0.28);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.01em;
  min-height: 44px;
  padding: 0 18px;
  transition: transform 0.14s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 12px 30px rgba(255, 45, 64, 0.42);
  filter: brightness(1.05);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 44px;
  padding: 0 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
  padding: 11px 14px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

input:focus,
select:focus,
textarea:focus {
  background: rgba(255, 45, 64, 0.04);
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 45, 64, 0.16);
  outline: 0;
}

select option {
  background: #131318;
  color: var(--ink);
}

/* custom scrollbars */
* {
  scrollbar-color: rgba(255, 45, 64, 0.4) transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  height: 9px;
  width: 9px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 45, 64, 0.35);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 45, 64, 0.6);
  background-clip: padding-box;
}

.layout {
  align-items: stretch;
  background: linear-gradient(90deg, rgba(6, 6, 9, 0.98) 0 300px, transparent 300px);
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.hidden {
  display: none !important;
}

/* ---------- brand wordmark (futuristic logo) ---------- */
.wordmark {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  line-height: 1;
  user-select: none;
}

.wordmark-main {
  background: linear-gradient(180deg, #fff, #ffdfe3 75%, var(--red-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  filter: drop-shadow(0 0 18px rgba(255, 45, 64, 0.45));
}

.wordmark-tag {
  background: var(--red-soft);
  border: 1px solid var(--red-soft-2);
  border-radius: 6px;
  color: var(--red-bright);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  padding: 3px 7px;
  text-transform: uppercase;
}

.wordmark.lg .wordmark-main {
  font-size: 2.3rem;
}

/* ---------------------- login ---------------------- */
.loginView {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.loginCard {
  background:
    radial-gradient(120% 80% at 50% 120%, rgba(255, 45, 64, 0.16), transparent 60%),
    var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(255, 45, 64, 0.05),
    0 40px 100px rgba(0, 0, 0, 0.6);
  margin: 0 auto;
  max-width: 452px;
  overflow: hidden;
  padding: 40px 38px;
  position: relative;
  width: 100%;
}

.loginCard img {
  display: block;
  filter: drop-shadow(0 0 18px rgba(255, 45, 64, 0.45));
  margin-bottom: 18px;
  width: 180px;
}

.loginCard .wordmark {
  margin-bottom: 24px;
}

.loginCard h1 {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.loginCard p {
  color: var(--muted);
  line-height: 1.55;
}

.loginForm {
  display: grid;
  gap: 11px;
  margin-top: 22px;
}

.loginTabs {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 24px;
  padding: 6px;
}

.tabButton {
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  color: var(--muted);
  font-weight: 600;
  min-height: 40px;
  padding: 0 12px;
}

.tabButton.active,
.tabButton:hover {
  background: var(--red-soft);
  border-color: var(--red-soft-2);
  box-shadow: none;
  color: #fff;
  filter: none;
  transform: none;
}

.loginError {
  color: var(--rose) !important;
  font-size: 0.88rem;
  min-height: 1.4em;
  margin-top: 14px !important;
}

/* ---------------------- sidebar ---------------------- */
.sidebar {
  background:
    radial-gradient(80% 30% at 30% 0%, rgba(255, 45, 64, 0.07), transparent 70%),
    linear-gradient(180deg, rgba(13, 13, 17, 0.96), rgba(6, 6, 9, 0.98));
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: auto;
  min-height: 100dvh;
  overflow-y: auto;
  padding: 26px 20px;
  position: relative;
}

.brand {
  display: grid;
  gap: 12px;
}

.brand img {
  filter: drop-shadow(0 0 18px rgba(255, 45, 64, 0.45));
  height: auto;
  width: 160px;
}

.brand small,
.panelHead p,
.leadMeta {
  color: var(--muted);
}

.brand small {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.nav {
  display: grid;
  gap: 5px;
}

.navButton {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  box-shadow: none;
  color: #d4d4dc;
  cursor: pointer;
  font-weight: 600;
  min-height: 0;
  padding: 12px 14px;
  text-align: left;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.navButton:hover {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  color: #fff;
  filter: none;
  transform: none;
}

.navButton.active {
  background: linear-gradient(90deg, var(--red-soft), transparent 90%);
  border-color: var(--red-soft-2);
  box-shadow: inset 3px 0 0 var(--red);
  color: #fff;
  filter: none;
  transform: none;
}

.websiteLeadsNav {
  align-items: center;
  display: none !important;
  justify-content: space-between;
}

.reformerWebsiteCrm .websiteLeadsNav {
  display: flex !important;
}

.navCount {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
}

.navButton.active .navCount {
  background: var(--red-soft-2);
  border-color: rgba(255, 45, 64, 0.35);
  color: #fff;
}

/* section eyebrow (used across sidebar blocks) */
.sideLabel,
.sideStats > span,
.filterBox > span {
  color: var(--muted-2);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ----- revenue donut (replaces Oranlar) ----- */
.revenuePanel {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.revenueHead {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
}

.revenueTotal {
  color: var(--money);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
}

.donutWrap {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: center;
}

.donut {
  flex: 0 0 auto;
  height: 98px;
  width: 98px;
}

.donut .donutHole {
  fill: var(--bg-2);
}

.donutCenter {
  fill: #fff;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
}

.donutCenterSub {
  fill: var(--muted);
  font-family: var(--font-sans);
  font-size: 4.8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.donutLegend {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.legendItem {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 9px 1fr auto;
}

.legendDot {
  border-radius: 3px;
  height: 9px;
  width: 9px;
}

.legendName {
  color: #e7e7ee;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legendPct {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

/* ----- tag filters ----- */
.filterBox {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filterBox > span {
  grid-column: 1 / -1;
}

.filterButton {
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  box-shadow: none;
  color: #d4d4dc;
  display: flex;
  font-size: 0.82rem;
  font-weight: 600;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 12px;
  text-align: left;
}

.filterButton strong {
  color: var(--red-bright);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.filterButton.active,
.filterButton:hover {
  background: var(--red-soft);
  border-color: var(--red-soft-2);
  box-shadow: none;
  color: #fff;
  filter: none;
  transform: none;
}

/* ----- to-do + notes + assistant (sidebar mini sections) ----- */
.miniSection {
  display: grid;
  gap: 10px;
}

.miniSection .sideLabel {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.miniCount {
  color: var(--muted);
  font-family: var(--font-mono);
}

.miniInputRow {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr auto;
}

.miniInputRow input,
.miniInputRow textarea,
.miniSelect {
  min-height: 38px;
}

.miniSelect {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line);
  color: #e3e3ea;
  font-size: 0.78rem;
  width: 100%;
}

.miniAddBtn {
  min-height: 38px;
  min-width: 38px;
  padding: 0 10px;
}

.assignmentPicker,
.itemAssignments {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.assignmentPicker label,
.itemAssignments label {
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.68rem;
  gap: 5px;
}

.assignmentPicker input,
.itemAssignments input {
  accent-color: var(--red);
  cursor: pointer;
  height: 14px;
  margin: 0;
  min-height: 0;
  padding: 0;
  width: 14px;
}

.miniList {
  display: grid;
  gap: 6px;
  max-height: none;
  overflow: visible;
}

.todoItem,
.noteItem {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: auto auto 1fr auto;
  padding: 9px 10px;
}

.noteItem {
  grid-template-columns: auto 1fr auto;
}

.sidebarItemBody {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.dragHandle {
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--muted-2);
  cursor: grab;
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  justify-content: center;
  line-height: 1;
  min-height: 22px;
  padding: 0 2px;
}

.dragHandle:hover {
  background: transparent;
  box-shadow: none;
  color: #fff;
  filter: none;
  transform: none;
}

.dragHandle:active {
  cursor: grabbing;
}

.sidebarItem.dragging {
  border-color: var(--red);
  opacity: 0.55;
}

.noteCustomer {
  color: var(--money);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todoCheck {
  accent-color: var(--red);
  cursor: pointer;
  height: 16px;
  margin-top: 2px;
  width: 16px;
}

.todoText,
.noteText {
  color: #e3e3ea;
  font-size: 0.82rem;
  line-height: 1.35;
  word-break: break-word;
}

.todoItem.done .todoText {
  color: var(--muted-2);
  text-decoration: line-through;
}

.miniDelete {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--muted-2);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  min-height: 0;
  padding: 2px 4px;
}

.miniDelete:hover {
  background: transparent;
  box-shadow: none;
  color: var(--red);
  filter: none;
  transform: none;
}

.noteMeta {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  margin-top: 4px;
}

.assistantBox {
  display: grid;
  gap: 8px;
}

.assistantBox textarea {
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  min-height: 64px;
}

.assistantActions {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
}

.assistantActions button {
  font-size: 0.78rem;
  min-height: 38px;
  padding: 0 8px;
}

.assistantHint {
  color: var(--muted-2);
  font-size: 0.68rem;
  line-height: 1.4;
}

.goalMiniSection {
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(247, 205, 126, 0.08), transparent 72%),
    rgba(255, 255, 255, 0.018);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.goalInputRow {
  display: grid;
  gap: 6px;
}

.goalInputRow span {
  color: var(--muted-2);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.goalInputRow input {
  color: var(--money);
  font-family: var(--font-mono);
  font-weight: 700;
  min-height: 38px;
}

.goalMiniGrid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.goalMiniGrid div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px;
}

.goalMiniGrid span {
  color: var(--muted-2);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.goalMiniGrid strong {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ghostMini {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  box-shadow: none;
  color: #d4d4dc;
}

.ghostMini:hover {
  background: var(--red-soft);
  border-color: var(--red-soft-2);
  box-shadow: none;
  filter: none;
}

/* ---------------------- content ---------------------- */
.content {
  padding: 28px 30px 44px;
}

.hero {
  align-items: center;
  background:
    radial-gradient(90% 120% at 0% 120%, rgba(255, 45, 64, 0.14), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto 20px;
  max-width: 1460px;
  overflow: hidden;
  padding: 20px 24px;
  position: relative;
}

.heroLogo {
  display: none;
}

.eyebrow {
  color: var(--red-bright);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: #fff;
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
  max-width: 720px;
}

h2 {
  color: #fff;
  font-size: 1.08rem;
  font-weight: 600;
}

.authBox {
  display: flex;
  gap: 10px;
}

.authBox input {
  min-width: 210px;
}

/* ---------------------- panels / tables ---------------------- */
.workspace {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1460px;
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 150px),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  min-width: 0;
  overflow: hidden;
  position: relative;
}

/* signature soft glow at the bottom of each panel */
.panel::after {
  background: radial-gradient(70% 60% at 50% 130%, rgba(255, 45, 64, 0.12), transparent 70%);
  content: "";
  inset: auto 0 0;
  height: 180px;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panelHead {
  align-items: center;
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 20px 22px;
}

.panelTools {
  align-items: center;
  display: flex;
  gap: 10px;
}

.panelTools input {
  min-width: min(360px, 42vw);
}

.panelHead p {
  font-size: 0.9rem;
  margin-top: 6px;
}

.tableWrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

.campaignPanel table {
  min-width: 840px;
}

.leadTable {
  min-width: 1860px;
}

.simpleCrm .reformerOnly {
  display: none !important;
}

.nonAttributionCrm .reformerOnly {
  display: none !important;
}

.simpleCrm .agencyOnly {
  display: none !important;
}

.simpleCrm .leadTable,
.nonAttributionCrm .leadTable {
  min-width: 980px;
}

.customerTable {
  min-width: 1120px;
}

.callContactsTable {
  min-width: 1520px;
}

.callContactTools {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.callContactTools select {
  min-width: 160px;
}

.callSummary {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 22px;
}

.callSummary span {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 7px 10px;
}

.callSummary strong {
  color: #fff;
  font-family: var(--font-mono);
  margin-right: 5px;
}

.paymentsTable {
  min-width: 960px;
}

.checkTable {
  min-width: 1180px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  color: #e9e9f0;
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: rgba(255, 255, 255, 0.012);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

tbody tr {
  transition: background 0.13s ease;
}

tbody tr:hover {
  background: rgba(255, 45, 64, 0.04);
}

.code {
  background: var(--red-soft);
  border: 1px solid var(--red-soft-2);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  white-space: nowrap;
}

/* money values get a distinct, pleasant accent */
.money,
.moneyCell {
  color: var(--money);
  font-family: var(--font-mono);
  font-weight: 700;
}

.moneyTag {
  background: var(--money-soft);
  border: 1px solid var(--money-line);
  border-radius: 8px;
  color: var(--money);
  display: inline-flex;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 4px 9px;
  white-space: nowrap;
}

.messageCell {
  line-height: 1.45;
  max-width: 340px;
  min-width: 240px;
  white-space: normal;
  word-break: break-word;
}

/* ---------------------- website quiz leads ---------------------- */
.websiteLeadsPanel {
  overflow: hidden;
}

.websiteLeadsHead {
  align-items: flex-start;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 45, 64, 0.1), transparent 42%),
    rgba(14, 14, 18, 0.72);
}

.panelKicker {
  color: var(--red-bright) !important;
  font-family: var(--font-mono);
  font-size: 0.66rem !important;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 0 0 7px !important;
}

.websiteLeadTools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 860px;
}

.websiteLeadTools input {
  min-width: min(330px, 44vw);
}

.websiteLeadTools select {
  min-width: 168px;
}

.websiteLeadSummary {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 16px 22px;
}

.websiteSummaryCard {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 13px 14px;
}

.websiteSummaryCard span {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.websiteSummaryCard strong {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1.22rem;
}

.websiteSummaryCard small {
  color: var(--muted-2);
  font-size: 0.7rem;
}

.websiteLeadCards {
  display: grid;
  gap: 14px;
  padding: 18px 22px 24px;
}

.websiteLeadCard {
  background:
    linear-gradient(135deg, rgba(255, 45, 64, 0.035), transparent 45%),
    rgba(13, 13, 17, 0.88);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.websiteLeadCard[data-quality="high"] {
  border-color: rgba(52, 224, 161, 0.24);
  box-shadow: inset 3px 0 0 rgba(52, 224, 161, 0.72);
}

.websiteLeadCard[data-quality="medium"] {
  border-color: rgba(255, 194, 75, 0.22);
  box-shadow: inset 3px 0 0 rgba(255, 194, 75, 0.72);
}

.websiteLeadCard[data-quality="low"] {
  border-color: rgba(255, 93, 119, 0.2);
  box-shadow: inset 3px 0 0 rgba(255, 93, 119, 0.65);
}

.websiteLeadTop {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  padding: 17px 18px;
}

.websiteLeadIdentity {
  display: grid;
  gap: 5px;
}

.websiteLeadIdentity h3 {
  font-size: 1.02rem;
  margin: 0;
}

.websiteLeadIdentity p {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin: 0;
}

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

.websiteLeadActions {
  display: flex;
  gap: 7px;
}

.qualityBlock {
  align-items: center;
  display: flex;
  gap: 10px;
}

.qualityScore {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-flex;
  flex-direction: column;
  font-family: var(--font-mono);
  height: 58px;
  justify-content: center;
  line-height: 1;
  width: 58px;
}

.qualityScore strong {
  font-size: 1.05rem;
}

.qualityScore small {
  color: var(--muted-2);
  font-size: 0.55rem;
  margin-top: 3px;
}

.qualityTag {
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 8px;
  white-space: nowrap;
}

.qualityTag.high {
  background: rgba(52, 224, 161, 0.08);
  color: var(--green);
}

.qualityTag.medium {
  background: rgba(255, 194, 75, 0.08);
  color: var(--amber);
}

.qualityTag.low {
  background: rgba(255, 93, 119, 0.08);
  color: var(--rose);
}

.websiteLeadBody {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  padding: 16px 18px 18px;
}

.websiteInfoBlock {
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 14px;
}

.websiteInfoBlock h4 {
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.attributionGrid,
.computedGrid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.attributionItem,
.computedItem {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.attributionItem span,
.computedItem span {
  color: var(--muted-2);
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.attributionItem strong,
.computedItem strong {
  color: #ececf2;
  font-size: 0.78rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.attributionItem.wide,
.computedItem.wide {
  grid-column: 1 / -1;
}

.attributionWarning {
  background: rgba(255, 194, 75, 0.07);
  border: 1px solid rgba(255, 194, 75, 0.2);
  border-radius: 8px;
  color: var(--amber);
  font-size: 0.72rem;
  line-height: 1.4;
  margin-top: 11px;
  padding: 9px 10px;
}

.websiteQuizDetails {
  border-top: 1px solid var(--line);
  grid-column: 1 / -1;
  padding-top: 2px;
}

.websiteQuizDetails summary {
  color: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  list-style: none;
  padding: 11px 0 3px;
}

.websiteQuizDetails summary::before {
  color: var(--red-bright);
  content: "+";
  display: inline-block;
  font-family: var(--font-mono);
  margin-right: 8px;
}

.websiteQuizDetails[open] summary::before {
  content: "−";
}

.websiteAnswerGrid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 10px;
}

.websiteAnswer {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  gap: 4px;
  padding: 10px 11px;
}

.websiteAnswer span {
  color: var(--muted-2);
  font-size: 0.64rem;
}

.websiteAnswer strong {
  color: #f2f2f6;
  font-size: 0.78rem;
  line-height: 1.4;
}

.websiteLeadEmpty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  padding: 34px;
  text-align: center;
}

.leadNoteCell {
  min-width: 260px;
}

.leadNoteEditor {
  align-items: start;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(170px, 1fr) auto;
}

.leadNoteInput {
  line-height: 1.4;
  min-height: 76px;
  resize: vertical;
  width: 100%;
}

.leadNoteSave {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  box-shadow: none;
  min-height: 36px;
  padding: 0 11px;
}

.leadNoteSave.saved {
  border-color: rgba(52, 224, 161, 0.4);
  color: var(--green);
}

.statusSelect,
.funnelSelect {
  min-width: 210px;
}

.funnelSelect {
  min-width: 190px;
}

.actionGroup {
  display: flex;
  gap: 7px;
}

.actionButton {
  align-items: center;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  box-shadow: 0 6px 16px rgba(255, 45, 64, 0.22);
  color: #fff;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 600;
  height: 34px;
  justify-content: center;
  min-width: 44px;
  padding: 0 11px;
  text-decoration: none;
  transition: filter 0.16s ease, transform 0.14s ease;
  white-space: nowrap;
}

.actionButton:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.tableActionButton {
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  box-shadow: none;
  color: #fff;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 600;
  height: 34px;
  justify-content: center;
  min-width: 70px;
  padding: 0 11px;
  white-space: nowrap;
}

.tableActionButton:hover {
  background: var(--red-soft);
  border-color: var(--red-soft-2);
  box-shadow: none;
  filter: none;
  transform: none;
}

.calledToggle {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  box-shadow: none;
  color: var(--muted);
  min-height: 36px;
  min-width: 126px;
  padding: 0 12px;
  white-space: nowrap;
}

.calledToggle:hover {
  background: rgba(52, 224, 161, 0.08);
  border-color: rgba(52, 224, 161, 0.34);
  box-shadow: none;
  color: #fff;
  filter: none;
  transform: none;
}

.calledToggle.isCalled {
  background: rgba(52, 224, 161, 0.1);
  border-color: rgba(52, 224, 161, 0.38);
  color: var(--green);
}

.outcomeSelect {
  min-width: 190px;
}

.outcomeSelect:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.outcome-no_answer,
.outcome-wrong_number,
.outcome-not_interested {
  color: #ff8c96;
}

.outcome-call_back {
  color: var(--money);
}

.outcome-interested,
.outcome-meeting {
  color: var(--green);
}

.calledContact td:first-child {
  box-shadow: inset 3px 0 0 rgba(52, 224, 161, 0.6);
}

.ghostAction,
.ghostButton {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  box-shadow: none;
}

.ghostAction {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #fff;
}

.ghostButton {
  color: #d4d4dc;
}

.dangerGhostButton {
  border-color: rgba(255, 47, 80, 0.45);
  color: #ff9aa8;
}

.ghostButton:hover,
.ghostAction:hover {
  background: var(--red-soft) !important;
  border-color: var(--red-soft-2);
  box-shadow: none;
  filter: none;
}

.deleteButton {
  background: rgba(255, 45, 64, 0.08);
  border: 1px solid rgba(255, 45, 64, 0.28);
  box-shadow: none;
  color: var(--red-ink);
  font-weight: 600;
  min-height: 34px;
  padding: 0 12px;
}

.deleteButton:hover {
  background: rgba(255, 45, 64, 0.18);
  box-shadow: 0 0 16px rgba(255, 45, 64, 0.22);
  filter: none;
  transform: none;
}

.advIcon {
  border: 1px solid var(--line);
  border-radius: 9px;
  display: block;
  /* recolor the legacy purple ADV glyphs to match the red theme */
  filter: hue-rotate(72deg) saturate(1.35) brightness(1.05);
  height: 38px;
  object-fit: cover;
  width: 38px;
}

/* ---------------------- encoder ---------------------- */
.encoderPanel {
  max-width: 980px;
}

.encoderGrid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 22px;
}

.encoderGrid label {
  display: grid;
  gap: 8px;
}

.encoderGrid span,
.codeResult small,
.manualForm span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.codeResult {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 28px 22px;
}

.codeResult small {
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.codeResult strong {
  color: #fff;
  font-family: var(--font-mono);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-shadow: 0 0 44px rgba(255, 45, 64, 0.5);
}

.codeResult p {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.codeResult button {
  justify-self: start;
}

/* ---------------------- status / pills ---------------------- */
.status-sale {
  color: var(--green);
}

.status-lost {
  color: var(--rose);
}

.status-potential {
  color: var(--amber);
}

.status-message_replied,
.status-call_scheduled,
.status-meeting_attended,
.status-thinking,
.status-proposal_sent,
.status-waiting_payment {
  color: var(--money);
}

.status-deposit_paid {
  color: var(--green);
}

.status-paused {
  color: var(--muted);
}

.followupRows {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.followupCard {
  background:
    linear-gradient(145deg, rgba(255, 45, 64, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(15, 13, 17, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 18px;
  padding: 18px;
}

.followupLeadHead {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.followupLeadHead h3 {
  color: #fff;
  font-size: 1.1rem;
  margin: 6px 0;
}

.followupLeadHead p,
.followupNote span {
  color: var(--muted);
}

.followupStatus {
  border: 1px solid rgba(255, 47, 80, 0.35);
  border-radius: 999px;
  color: var(--red-bright);
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  text-transform: uppercase;
}

.followupSteps {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.followupStep {
  align-items: start;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: grid;
  gap: 12px;
  min-height: 154px;
  padding: 14px;
}

.followupStep.done {
  background: rgba(52, 224, 161, 0.07);
  border-color: rgba(52, 224, 161, 0.32);
}

.followupStepText {
  display: grid;
  gap: 8px;
}

.followupStep strong {
  color: #fff;
  display: grid;
  gap: 4px;
}

.followupStep em {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-style: normal;
}

.followupStep small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.followupStep input {
  align-self: end;
  height: 24px;
  width: 24px;
}

.followupNote {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding-top: 14px;
}

.dueDate {
  color: var(--amber);
  font-weight: 700;
}

.compactSelect {
  min-width: 138px;
}

.splitPanels {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.splitPanels section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.splitPanels section > h2 {
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid var(--line);
  padding: 15px 16px;
}

/* ---------------------- payments ---------------------- */
.paymentGrid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 22px;
}

.paymentGrid div {
  background:
    radial-gradient(80% 70% at 50% 130%, rgba(255, 45, 64, 0.1), transparent 70%),
    rgba(255, 255, 255, 0.022);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 10px;
  min-height: 110px;
  padding: 18px;
  position: relative;
}

/* money-flavoured payment cards */
.paymentGrid div.moneyCard {
  background:
    radial-gradient(80% 70% at 50% 130%, rgba(247, 205, 126, 0.12), transparent 70%),
    rgba(247, 205, 126, 0.04);
  border-color: var(--money-line);
}

.paymentGrid small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paymentGrid strong {
  color: #fff;
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 2.1vw, 2.2rem);
  font-weight: 700;
  line-height: 1;
}

.paymentGrid div.moneyCard strong {
  color: var(--money);
}

.subValue {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.paymentGrid div.moneyCard .subValue {
  color: rgba(247, 205, 126, 0.75);
}

.targetBar {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 14px;
  margin: 0 22px;
  overflow: hidden;
}

.targetBar span {
  background: linear-gradient(90deg, var(--red-deep), var(--red), var(--red-bright));
  box-shadow: 0 0 22px rgba(255, 45, 64, 0.5);
  display: block;
  height: 100%;
  transition: width 0.3s ease;
  width: 0;
}

.panelNote {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  padding: 14px 22px 4px;
}

/* $50M life-goal projection card */
.goalNote {
  align-items: center;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(247, 205, 126, 0.1), transparent 60%),
    rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 14px 22px 6px;
  padding: 14px 18px;
}

.goalNote .goalIcon {
  color: var(--money);
  font-size: 1.1rem;
}

.goalNote b {
  color: var(--money);
  font-family: var(--font-mono);
}

.goalNote .goalText {
  color: #e7e7ee;
  font-size: 0.9rem;
  line-height: 1.5;
}

.goalNote .goalSub {
  color: var(--muted);
  font-size: 0.8rem;
}

.paymentAction {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  white-space: nowrap;
}

.futurePayment {
  background: rgba(255, 194, 75, 0.1);
  border-color: rgba(255, 194, 75, 0.28);
  color: var(--amber);
}

.todayPayment {
  background: rgba(52, 224, 161, 0.1);
  border-color: rgba(52, 224, 161, 0.3);
  color: var(--green);
}

.latePayment {
  background: rgba(255, 45, 64, 0.1);
  border-color: rgba(255, 45, 64, 0.3);
  color: var(--red-ink);
}

/* ---------------------- pills ---------------------- */
.miniPill {
  background: var(--red-soft);
  border: 1px solid var(--red-soft-2);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  white-space: nowrap;
}

.mutedPill {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--muted);
}

.pill-kotu,
.pill-durdur,
.pill-aksiyon-al {
  background: rgba(255, 45, 64, 0.12);
  border-color: rgba(255, 45, 64, 0.3);
  color: var(--red-ink);
}

.pill-iyi,
.pill-mukemmel,
.pill-devam,
.pill-gereksiz {
  background: rgba(52, 224, 161, 0.1);
  border-color: rgba(52, 224, 161, 0.3);
  color: var(--green);
}

.pill-orta,
.pill-bekleme,
.pill-analiz-et,
.pill-gerekli {
  background: rgba(255, 194, 75, 0.1);
  border-color: rgba(255, 194, 75, 0.3);
  color: var(--amber);
}

.empty {
  color: var(--muted);
  font-size: 0.86rem;
  padding: 20px;
}

/* ---------------------- modals ---------------------- */
.modal {
  align-items: center;
  background: rgba(3, 3, 5, 0.78);
  backdrop-filter: blur(8px);
  display: grid;
  inset: 0;
  padding: 22px;
  position: fixed;
  z-index: 20;
}

.modalCard {
  background:
    radial-gradient(120% 70% at 50% 120%, rgba(255, 45, 64, 0.14), transparent 60%),
    var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(255, 45, 64, 0.05),
    0 40px 100px rgba(0, 0, 0, 0.65);
  margin: 0 auto;
  max-width: 560px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.wideModal {
  max-width: 820px;
}

.modalHead {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
}

.modalHead p {
  color: var(--muted);
  margin-top: 5px;
}

.manualForm {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.twoColumnForm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.twoColumnForm button,
.twoColumnForm .loginError {
  grid-column: 1 / -1;
}

.twoColumnForm .fullField {
  grid-column: 1 / -1;
}

.manualForm label {
  display: grid;
  gap: 7px;
}

.invalidLead td {
  background: rgba(255, 45, 64, 0.06);
  box-shadow: inset 3px 0 0 var(--red);
}

/* ---------------------- animations ---------------------- */
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(52, 224, 161, 0.12), 0 0 14px rgba(52, 224, 161, 0.2);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(52, 224, 161, 0.03), 0 0 26px rgba(52, 224, 161, 0.4);
  }
}

/* ---------------------- responsive ---------------------- */
@media (max-width: 1020px) {
  .layout {
    background: transparent;
    grid-template-columns: 1fr;
    overflow-x: hidden;
  }

  .sidebar {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    gap: 12px;
    height: auto;
    min-height: auto;
    overflow-y: visible;
    padding: 12px 16px 14px;
    position: static;
  }

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

  .brand img {
    width: 132px;
  }

  .brand small {
    font-size: 0.68rem;
    text-align: right;
  }

  .nav {
    display: flex;
    gap: 8px;
    margin: 0 -16px;
    overflow-x: auto;
    padding: 0 16px 4px;
    scroll-snap-type: x proximity;
  }

  .navButton {
    border-color: var(--line);
    flex: 0 0 auto;
    min-height: 42px;
    padding: 10px 12px;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .miniSection,
  .revenuePanel {
    display: none;
  }

  .content {
    max-width: 100vw;
    overflow-x: hidden;
    padding: 14px;
  }

  .hero {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 14px;
    min-height: 0;
    padding: 18px;
  }

  .hero h1 {
    font-size: clamp(2rem, 11vw, 3.6rem);
    line-height: 0.98;
  }

  .workspace,
  .panel,
  .tableWrap {
    max-width: 100%;
    min-width: 0;
  }

  .panelHead {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }

  .panelHead h2 {
    font-size: 1.15rem;
  }

  .panelTools {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .panelTools input,
  .panelTools select,
  .panelTools button {
    min-width: 0;
    width: 100%;
  }

  .tableWrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .leadTable {
    min-width: 1040px;
  }

  .leadTable th,
  .leadTable td {
    font-size: 0.78rem;
    padding: 12px 10px;
  }

  .leadTable th {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .actionGroup {
    gap: 6px;
  }

  .actionButton {
    min-height: 38px;
    padding: 0 10px;
  }

  .statusSelect,
  .funnelSelect {
    min-height: 42px;
    min-width: 168px;
  }

  .messageCell {
    max-width: 260px;
  }

  .leadNoteInput {
    min-height: 82px;
  }

  .websiteLeadSummary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .websiteLeadTop,
  .websiteLeadBody {
    grid-template-columns: 1fr;
  }

  .qualityBlock {
    justify-content: space-between;
  }

  .websiteLeadActions {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }

  .loginView {
    padding: 14px;
  }

  .loginCard {
    border-radius: 16px;
    padding: 28px 20px;
  }

  .wordmark.lg .wordmark-img {
    height: 34px;
    max-width: 220px;
  }

  .wordmark-tag {
    font-size: 0.52rem;
    padding: 3px 6px;
  }

  .sidebar {
    padding: 10px 14px 12px;
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand small {
    text-align: left;
  }

  .nav {
    margin: 0 -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .navButton {
    font-size: 0.88rem;
  }

  .content {
    padding: 12px;
  }

  .hero {
    padding: 16px;
  }

  .hero .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.2em;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 12vw, 3rem);
  }

  .leadTable {
    min-width: 920px;
  }

  .simpleCrm .leadTable,
  .nonAttributionCrm .leadTable {
    min-width: 900px;
  }

  .leadTable th,
  .leadTable td {
    padding: 10px 8px;
  }

  .followupRows {
    gap: 12px;
    padding: 12px;
  }

  .followupCard {
    gap: 14px;
    padding: 14px;
  }

  .followupStatus {
    align-self: start;
  }

  .followupStep {
    min-height: 0;
    padding: 12px;
  }

  .websiteLeadSummary,
  .attributionGrid,
  .computedGrid,
  .websiteAnswerGrid {
    grid-template-columns: 1fr;
  }

  .websiteLeadTools,
  .websiteLeadTools input,
  .websiteLeadTools select,
  .websiteLeadTools button {
    min-width: 100%;
    width: 100%;
  }

  .websiteLeadCards,
  .websiteLeadSummary {
    padding-left: 14px;
    padding-right: 14px;
  }

  .websiteLeadTop,
  .websiteLeadBody {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* ---------------------- payment PIN vault ---------------------- */
.paymentPinModal {
  background:
    radial-gradient(circle at 50% 35%, rgba(247, 205, 126, 0.1), transparent 38%),
    rgba(0, 0, 0, 0.88);
}

.pinVault {
  background:
    linear-gradient(145deg, rgba(247, 205, 126, 0.05), transparent 40%),
    #0b0b0e;
  border: 1px solid var(--money-line);
  border-radius: 8px;
  box-shadow: 0 42px 100px rgba(0, 0, 0, 0.78);
  display: grid;
  gap: 14px;
  max-width: 400px;
  padding: 30px;
  text-align: center;
  width: calc(100% - 32px);
}

.pinVaultMark {
  align-items: center;
  background: var(--money-soft);
  border: 1px solid var(--money-line);
  border-radius: 50%;
  color: var(--money);
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  height: 58px;
  justify-content: center;
  margin: 0 auto 4px;
  width: 58px;
}

.pinVault > p:not(.eyebrow):not(.loginError) {
  color: var(--muted);
  line-height: 1.45;
}

#paymentPinInput {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.pinDots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 4px 0;
  min-height: 16px;
}

.pinDots span {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  border-radius: 50%;
  height: 12px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  width: 12px;
}

.pinDots span.filled {
  background: var(--money);
  box-shadow: 0 0 14px rgba(247, 205, 126, 0.55);
}

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

.pinPad button {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line);
  box-shadow: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1rem;
  min-height: 48px;
}

.pinPad button:hover {
  background: var(--money-soft);
  border-color: var(--money-line);
  box-shadow: none;
  color: var(--money);
}

.pinUnlockButton {
  background: linear-gradient(135deg, #dba94c, #8e611d);
  box-shadow: 0 10px 28px rgba(219, 169, 76, 0.22);
  color: #100b03;
}

.pinCancelButton {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--muted);
  min-height: 30px;
}

/* ---------------------- salon media library ---------------------- */
.mediaStorageUsage {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 8px 11px;
  white-space: nowrap;
}

.mediaWorkspace {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 610px;
}

.mediaFolderRail {
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
}

.mediaRailHead {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 6px 14px;
}

.mediaFolderList {
  display: grid;
  gap: 6px;
}

.mediaFolderButton {
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  color: #d9d9e0;
  display: grid;
  gap: 3px;
  justify-items: start;
  min-height: 56px;
  padding: 10px 12px;
  text-align: left;
}

.mediaFolderButton small {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.mediaFolderButton:hover,
.mediaFolderButton.active {
  background: var(--red-soft);
  border-color: var(--red-soft-2);
  box-shadow: inset 3px 0 0 var(--red);
  filter: none;
  transform: none;
}

.mediaLibrary {
  min-width: 0;
  padding: 22px;
}

.mediaEmptyState {
  align-content: center;
  color: var(--muted);
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 520px;
  text-align: center;
}

.mediaEmptyState strong {
  color: #fff;
  font-size: 1.15rem;
}

.mediaLibraryHead {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.mediaTabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 22px;
  margin: 22px 0 18px;
}

.mediaTab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  box-shadow: none;
  color: var(--muted);
  min-height: 42px;
  padding: 0 2px;
}

.mediaTab:hover,
.mediaTab.active {
  border-bottom-color: var(--red);
  box-shadow: none;
  color: #fff;
  filter: none;
  transform: none;
}

.mediaAssetGrid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.mediaAssetCard {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
}

.mediaAssetThumbnail {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 45, 64, 0.18), transparent 42%),
    #08080a;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: none;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}

.mediaAssetThumbnail:hover {
  border-color: var(--red-soft-2);
  box-shadow: 0 10px 28px rgba(255, 45, 64, 0.14);
  filter: none;
}

.mediaAssetThumbnail video {
  background: #050507;
  height: 100%;
  inset: 0;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 0.2s ease;
  width: 100%;
}

.mediaAssetThumbnail img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.mediaAssetThumbnail video.ready {
  opacity: 1;
}

.mediaAssetThumbnail > span {
  background: rgba(5, 5, 7, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  bottom: 10px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 6px 9px;
  pointer-events: none;
  position: absolute;
  right: 10px;
  z-index: 1;
}

.mediaAssetThumbnailFallback {
  align-items: center;
  color: var(--red-bright);
  display: flex;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  justify-content: center;
}

.mediaAssetThumbnailFallback > span {
  background: transparent;
  border: 0;
  bottom: auto;
  color: var(--red-bright);
  font-size: 0.76rem;
  padding: 0;
  position: static;
}

.mediaAssetMeta {
  min-width: 0;
}

.mediaAssetMeta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mediaAssetMeta span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.mediaAssetMeta small {
  color: var(--muted-2);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mediaSourceBadge {
  border: 1px solid rgba(255, 45, 64, 0.38);
  border-radius: 999px;
  color: var(--red-bright);
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-style: normal;
  margin-top: 7px;
  padding: 3px 7px;
}

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

.mediaAssetActions button {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  box-shadow: none;
  font-size: 0.75rem;
  min-height: 36px;
  padding: 0 8px;
}

.mediaAssetActions button:hover {
  background: var(--red-soft);
  border-color: var(--red-soft-2);
  box-shadow: none;
}

.mediaUploadQueue {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.mediaUploadJob {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 11px 12px;
}

.mediaUploadJob.status-completed {
  border-color: rgba(52, 224, 161, 0.34);
}

.mediaUploadJob.status-warning {
  border-color: rgba(247, 205, 126, 0.45);
}

.mediaUploadJobHead {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.mediaUploadJobHead > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mediaUploadJobHead strong,
.mediaUploadJobHead span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mediaUploadJobHead span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.mediaUploadJobHead b {
  color: var(--red-bright);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.mediaUploadTrack {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.mediaUploadTrack i {
  background: linear-gradient(90deg, var(--red-deep), var(--red-bright));
  display: block;
  height: 100%;
  transition: width 0.15s linear;
  width: 0;
}

.shareResult {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
}

.shareResult button {
  padding: 0 12px;
}

.mediaPreviewModal {
  padding: 24px;
}

.mediaPreviewCard {
  max-width: min(1080px, calc(100vw - 48px));
  width: 100%;
}

.mediaPreviewPlayer {
  background: #000;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.mediaPreviewPlayer video {
  aspect-ratio: 16 / 9;
  display: block;
  max-height: 72vh;
  object-fit: contain;
  width: 100%;
}

.mediaPreviewPlayer img {
  display: block;
  max-height: 72vh;
  object-fit: contain;
  width: 100%;
}

/* ---------------------- public protected share ---------------------- */
.sharePage {
  min-height: 100vh;
}

.shareShell {
  margin: 0 auto;
  max-width: 1160px;
  padding: 34px 24px 70px;
  position: relative;
  z-index: 1;
}

.shareBrand {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
}

.shareBrand img {
  height: 34px;
  width: auto;
}

.shareBrand span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.shareVideoCard {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 580px;
  padding: 24px;
}

.shareLoading,
.sharePasswordGate {
  align-content: center;
  display: grid;
  gap: 14px;
  justify-items: center;
  min-height: 520px;
  text-align: center;
}

.sharePasswordGate p {
  color: var(--muted);
}

.sharePasswordGate input,
.sharePasswordGate button {
  max-width: 360px;
  width: 100%;
}

.shareLock {
  color: var(--money);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  letter-spacing: 0.35em;
}

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

.shareTitle > span {
  border: 1px solid var(--money-line);
  border-radius: 999px;
  color: var(--money);
  font-size: 0.74rem;
  padding: 7px 10px;
}

.protectedPlayer {
  background: #000;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.protectedPlayer video {
  aspect-ratio: 16 / 9;
  display: block;
  max-height: 72vh;
  object-fit: contain;
  width: 100%;
}

.protectedPlayer img {
  display: block;
  max-height: 72vh;
  object-fit: contain;
  width: 100%;
}

.shareWatermark {
  bottom: 16px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  pointer-events: none;
  position: absolute;
  right: 16px;
  text-shadow: 0 1px 8px #000;
}

.shareNotice {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  margin-top: 14px;
}

/* ---------------------- public upload ---------------------- */
.uploadShell {
  max-width: 820px;
}

.uploadCard h1 {
  font-size: clamp(2.2rem, 8vw, 5.8rem);
  letter-spacing: 0;
  line-height: 0.92;
  margin: 10px 0 12px;
}

.uploadCard > p:not(.eyebrow) {
  color: var(--muted);
  margin-bottom: 22px;
}

.uploadDropzone {
  align-items: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 45, 64, 0.22), transparent 38%),
    rgba(255, 255, 255, 0.035);
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 220px;
  padding: 28px;
  text-align: center;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.uploadDropzone:hover,
.uploadDropzone.dragging {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 45, 64, 0.34), transparent 42%),
    rgba(255, 255, 255, 0.055);
  border-color: var(--red);
  transform: translateY(-1px);
}

.uploadDropzone.disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.uploadDropzone strong {
  color: #fff;
  font-size: 1.25rem;
}

.uploadDropzone span {
  color: var(--muted);
}

.publicUploadForm {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .followupLeadHead {
    align-items: stretch;
    flex-direction: column;
  }

  .followupSteps {
    grid-template-columns: 1fr;
  }

  .mediaWorkspace {
    grid-template-columns: 1fr;
  }

  .mediaFolderRail {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .mediaFolderList {
    grid-auto-columns: minmax(180px, 1fr);
    grid-auto-flow: column;
    overflow-x: auto;
  }

  .mediaLibraryHead,
  .shareTitle {
    align-items: stretch;
    flex-direction: column;
  }

  .mediaPanel .panelTools {
    width: 100%;
  }

  .mediaStorageUsage {
    margin-right: auto;
  }

  .mediaPreviewModal {
    padding: 10px;
  }

  .mediaPreviewCard {
    max-width: calc(100vw - 20px);
  }

  .shareResult {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .content {
    padding: 12px;
  }

  .authBox,
  .panelHead,
  .panelTools {
    align-items: stretch;
    flex-direction: column;
  }

  .authBox input,
  .authBox button,
  .panelTools input,
  .panelTools button {
    width: 100%;
  }

  .encoderGrid {
    grid-template-columns: 1fr;
  }

  .paymentGrid,
  .twoColumnForm {
    grid-template-columns: 1fr;
  }
}

/* ---------------------- brand logo image ---------------------- */
.wordmark-img {
  display: block;
  height: 30px;
  width: auto;
  filter: drop-shadow(0 0 18px rgba(255, 45, 64, 0.45));
}

.wordmark.lg .wordmark-img {
  height: 46px;
}

/* ---------------------- intro gate ---------------------- */
.introGate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.55) 80%);
  cursor: pointer;
  outline: none;
  transition: opacity 0.7s ease, filter 0.7s ease;
}

.introGate.introLeaving {
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
}

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

.introCenter {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.introArc {
  position: absolute;
  left: -52px;
  top: 50%;
  width: 28px;
  height: 62px;
  transform: translateY(-50%);
  border-left: 2px solid var(--red);
  border-radius: 60% 0 0 60% / 50%;
  box-shadow: -2px 0 18px rgba(255, 45, 64, 0.6);
  opacity: 0.9;
}

.introEnter {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  letter-spacing: 0.16em;
  padding-left: 0.16em;
  color: #fff;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.22);
  animation: introPulse 3s ease-in-out infinite;
}

.introEnter b {
  color: var(--red-bright);
  font-weight: 600;
}

.introHint {
  position: absolute;
  bottom: 12%;
  left: 0;
  right: 0;
  z-index: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted-2);
}

@keyframes introPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ---------------------- payment collection buttons ---------------------- */
.payReceivedBtn {
  background: linear-gradient(135deg, var(--green), #15a06f);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 16px rgba(52, 224, 161, 0.22);
  color: #04140d;
  font-weight: 700;
  min-height: 34px;
  padding: 0 13px;
}

.payReceivedBtn:hover {
  box-shadow: 0 10px 22px rgba(52, 224, 161, 0.38);
  filter: brightness(1.06);
}

.payUnpaidBtn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  box-shadow: none;
  color: #d4d4dc;
  font-weight: 600;
  min-height: 34px;
  padding: 0 13px;
}

.payUnpaidBtn:hover {
  background: var(--red-soft);
  border-color: var(--red-soft-2);
  box-shadow: none;
  filter: none;
}

.payUnpaidBtn.isFlagged {
  background: rgba(255, 45, 64, 0.14);
  border-color: rgba(255, 45, 64, 0.4);
  color: var(--red-ink);
}

.unpaidBadge {
  display: inline-block;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 45, 64, 0.12);
  border: 1px solid rgba(255, 45, 64, 0.3);
  color: var(--red-ink);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  white-space: nowrap;
}

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

/* ---------------------- global starfield ---------------------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
}

/* panel content sits above the starfield; hidden until "Hosgeldin" gate */
.layout,
.loginView {
  transition: opacity 0.6s ease;
}

body.booting .layout,
body.booting .loginView {
  opacity: 0;
  pointer-events: none;
}

/* ---------------------- payments: revenue + goal ---------------------- */
.paymentInsights {
  display: grid;
  grid-template-columns: minmax(0, 820px);
  gap: 16px;
  justify-content: center;
  padding: 6px 22px 18px;
}

.paymentInsights .revenuePanel,
.paymentInsights .goalMiniSection {
  align-content: start;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 13px;
  padding: 18px;
}

.goalInputRow {
  display: grid;
  gap: 7px;
}

.goalInputRow > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.goalMiniGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.goalMiniGrid div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 4px;
  padding: 11px;
}

.goalMiniGrid span {
  color: var(--muted-2);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.goalMiniGrid strong {
  color: var(--money);
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

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

/* ---------------------- Evolution WhatsApp ---------------------- */
.whatsappStatusButton {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line);
  box-shadow: none;
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  min-height: 44px;
  white-space: nowrap;
}

.whatsappStatusButton:hover {
  background: rgba(52, 224, 161, 0.07);
  border-color: rgba(52, 224, 161, 0.28);
  box-shadow: none;
  filter: none;
}

.whatsappStatusButton.isConnected {
  background: rgba(52, 224, 161, 0.08);
  border-color: rgba(52, 224, 161, 0.3);
  color: var(--green);
}

.whatsappStatusButton.isUnconfigured {
  color: var(--amber);
}

.whatsappStatusDot {
  background: var(--muted-2);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.03);
  display: inline-block;
  flex: 0 0 auto;
  height: 9px;
  width: 9px;
}

.whatsappStatusButton.isConnected .whatsappStatusDot,
.whatsappStatusDot.isConnected {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 224, 161, 0.1), 0 0 15px rgba(52, 224, 161, 0.55);
}

.whatsappStatusButton.isConnecting .whatsappStatusDot,
.whatsappStatusDot.isConnecting {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 194, 75, 0.1);
}

.whatsappModalCard {
  max-width: 680px;
}

.whatsappConnectionState {
  align-items: center;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 13px;
  margin: 22px 22px 0;
  padding: 14px 16px;
}

.whatsappConnectionState > div {
  display: grid;
  gap: 3px;
}

.whatsappConnectionState small {
  color: var(--muted);
}

.whatsappQrWrap {
  align-items: center;
  display: grid;
  gap: 20px;
  grid-template-columns: 230px minmax(0, 1fr);
  padding: 22px;
}

.whatsappQrWrap img {
  aspect-ratio: 1;
  background: #fff;
  border: 8px solid #fff;
  border-radius: 14px;
  display: block;
  width: 100%;
}

.whatsappQrWrap p {
  color: var(--muted);
  line-height: 1.6;
}

.whatsappQrWrap strong {
  color: #fff;
}

.whatsappModalActions {
  display: flex;
  gap: 10px;
  padding: 0 22px 22px;
}

.whatsappModalCard .loginError {
  margin: 0 22px 18px !important;
}

.leadSourceBadge {
  background: rgba(52, 224, 161, 0.09);
  border: 1px solid rgba(52, 224, 161, 0.28);
  border-radius: 999px;
  color: var(--green);
  display: table;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 6px;
  padding: 3px 6px;
  white-space: nowrap;
}

/* ---------------------- Pegasus benzeri masaustu oranlari ---------------------- */
@media (min-width: 1021px) {
  .layout {
    background: linear-gradient(90deg, rgba(6, 6, 9, 0.98) 0 250px, transparent 250px);
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .sidebar {
    gap: 18px;
    padding: 22px 16px;
  }

  .content {
    padding: 24px 24px 40px;
  }

  .hero,
  .workspace {
    max-width: none;
  }

  .panelHead {
    padding: 18px 20px;
  }

  .panelTools {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .panelTools input {
    min-width: min(290px, 30vw);
  }

  .nonAttributionCrm .leadTableWrap {
    overflow-x: hidden;
  }

  .nonAttributionCrm .leadTable {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
  }

  .nonAttributionCrm .leadTable th,
  .nonAttributionCrm .leadTable td {
    font-size: 0.78rem;
    overflow-wrap: anywhere;
    padding: 12px 8px;
  }

  .nonAttributionCrm .leadTable th {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .nonAttributionCrm .leadTable th:nth-child(1),
  .nonAttributionCrm .leadTable td:nth-child(1) { width: 9%; }
  .nonAttributionCrm .leadTable th:nth-child(2),
  .nonAttributionCrm .leadTable td:nth-child(2) { width: 10%; }
  .nonAttributionCrm .leadTable th:nth-child(3),
  .nonAttributionCrm .leadTable td:nth-child(3) { width: 12%; }
  .nonAttributionCrm .leadTable th:nth-child(4),
  .nonAttributionCrm .leadTable td:nth-child(4) { width: 9%; }
  .nonAttributionCrm .leadTable th:nth-child(11),
  .nonAttributionCrm .leadTable td:nth-child(11) { width: 15%; }
  .nonAttributionCrm .leadTable th:nth-child(12),
  .nonAttributionCrm .leadTable td:nth-child(12) { width: 12%; }
  .nonAttributionCrm .leadTable th:nth-child(13),
  .nonAttributionCrm .leadTable td:nth-child(13) { width: 15%; }
  .nonAttributionCrm .leadTable th:nth-child(14),
  .nonAttributionCrm .leadTable td:nth-child(14) { width: 14%; }
  .nonAttributionCrm .leadTable th:nth-child(15),
  .nonAttributionCrm .leadTable td:nth-child(15) { width: 4%; }

  .nonAttributionCrm .messageCell,
  .nonAttributionCrm .leadNoteCell {
    max-width: none;
    min-width: 0;
  }

  .nonAttributionCrm .messageCell {
    line-height: 1.4;
  }

  .nonAttributionCrm .leadNoteEditor {
    grid-template-columns: minmax(0, 1fr);
  }

  .nonAttributionCrm .leadNoteInput {
    font-size: 0.72rem;
    min-height: 56px;
    padding: 8px;
  }

  .nonAttributionCrm .leadNoteSave {
    min-height: 28px;
    padding: 0 8px;
  }

  .nonAttributionCrm .statusSelect,
  .nonAttributionCrm .funnelSelect {
    font-size: 0.72rem;
    min-width: 0;
    padding: 0 8px;
    width: 100%;
  }

  .nonAttributionCrm .actionGroup {
    gap: 4px;
  }

  .nonAttributionCrm .actionButton {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 5px;
  }

  .nonAttributionCrm .deleteButton {
    font-size: 0.68rem;
    min-width: 0;
    padding: 0 5px;
    width: 100%;
  }
}

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

  .whatsappQrWrap img {
    margin: 0 auto;
    max-width: 230px;
  }

  .whatsappModalActions {
    flex-direction: column;
  }
}
