/* Painel MDV Express: mesma identidade da landing (preto, marfim, azul; Sora/Anton/Inter) */
:root {
  --bg: #08090b;
  --panel: #0d0e11;
  --card: #121316;
  --card-2: #18191d;
  --card-3: #1f2025;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f1eded;
  --text-2: #c7c6ca;
  --muted: #94949b;
  --muted-2: #6c6c73;
  --ivory: #eeece6;
  --ivory-2: #d8d5cc;
  --blue: #4169e0;
  --blue-2: #6b8cf5;
  --blue-3: #9db3f7;
  --green: #3fb67a;
  --amber: #e0a83a;
  --violet: #a98bf0;
  --red: #e5484d;
  --radius: 16px;
  --sora: 'Sora', ui-sans-serif, system-ui, sans-serif;
  --anton: 'Anton', 'Impact', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.eyebrow {
  margin: 0;
  font-family: var(--sora);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }

/* ---------- botões e campos ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--card-3);
  font-family: var(--sora);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn--ivory { background: var(--ivory); color: #14140f; }
.btn--ivory:hover { background: var(--ivory-2); }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.28); color: var(--text); }
.btn--danger { color: #ff9a9d; border-color: rgba(229, 72, 77, 0.35); }
.btn--danger:hover { color: #ffc2c4; border-color: rgba(229, 72, 77, 0.6); }
.btn--danger-solid { background: var(--red); color: #fff; }
.btn--green { background: rgba(63, 182, 122, 0.14); color: #7fe0ad; border-color: rgba(63, 182, 122, 0.35); }
.btn--green:hover { background: rgba(63, 182, 122, 0.22); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn--block { width: 100%; }

.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.icon-btn svg { width: 18px; height: 18px; }

.field { display: block; margin: 0 0 12px; min-width: 0; }
.field > span {
  display: block;
  margin-bottom: 6px;
  font-family: var(--sora);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--muted-2); font-weight: 400; margin-left: 4px; }
.field input, .field textarea, .search input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 10px 12px;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input { height: 42px; }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.field input:focus, .field textarea:focus, .search input:focus {
  outline: none;
  border-color: var(--blue-2);
  box-shadow: 0 0 0 3px rgba(65, 105, 224, 0.22);
}
.row { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 560px) { .row { grid-template-columns: 1fr 1fr; } }
.form-error {
  margin: 4px 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(229, 72, 77, 0.1);
  border: 1px solid rgba(229, 72, 77, 0.35);
  color: #ffb3b5;
  font-size: 13px;
}

/* segmentado (período, filtros) */
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 11px;
  background: var(--card);
  border: 1px solid var(--line);
}
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: var(--sora);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.seg input:checked + span { background: var(--card-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg input:focus-visible + span { outline: 2px solid var(--blue-2); }

/* ---------- login ---------- */
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    linear-gradient(180deg, rgba(8, 9, 11, 0.55), var(--bg) 75%),
    url('/images/bg-dollars-1920.webp') center top / cover no-repeat;
}
.login__card {
  width: 100%;
  max-width: 380px;
  padding: 30px 26px 26px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.login__logo { width: 100%; max-width: 280px; margin: 0 auto 18px; }
.login h1 { font-family: var(--sora); font-size: 20px; margin: 0; text-align: center; }
.login .muted { text-align: center; margin: 4px 0 22px; font-size: 13px; }

/* ---------- estrutura ---------- */
.app { min-height: 100dvh; }
.side {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(8, 9, 11, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.side__brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.side__brand img { height: 26px; width: auto; }
.side__brand small, .side__foot span { display: none; }
.side__nav { display: flex; gap: 2px; margin-left: auto; }
.side__nav a, .side__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--sora);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.side__nav a svg, .side__link svg { width: 19px; height: 19px; flex-shrink: 0; }
.side__nav a:hover, .side__link:hover { color: var(--text); background: var(--card); }
.side__nav a.on { color: var(--text); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.side__nav a span { display: none; }
.side__badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 17px; height: 17px;
  padding: 0 5px;
  border-radius: 9999px;
  background: var(--blue);
  color: #fff;
  font: 700 10px/17px var(--sora);
  text-align: center;
}
.side__foot { display: flex; gap: 2px; }
.main { padding: 20px 16px 64px; min-width: 0; }

@media (min-width: 640px) {
  .side__nav a span { display: inline; }
}

@media (min-width: 1000px) {
  .app { display: grid; grid-template-columns: 232px minmax(0, 1fr); }
  .side {
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 22px 14px;
    border-bottom: none;
    border-right: 1px solid var(--line);
    background: var(--panel);
  }
  .side__brand { flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 8px 22px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
  .side__brand img { height: auto; width: 100%; max-width: 190px; }
  .side__brand small {
    display: block;
    font-family: var(--sora);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .side__nav { flex-direction: column; margin: 0; gap: 4px; }
  .side__nav a { padding: 10px 12px; }
  .side__badge { position: static; margin-left: auto; }
  .side__foot { flex-direction: column; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
  .side__foot span { display: inline; }
  .side__link { width: 100%; padding: 9px 12px; font-size: 12.5px; }
  .main { padding: 32px 36px 80px; }
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 22px;
}
.page-head h1 {
  margin: 0;
  font-family: var(--sora);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.page-head h1 b { color: var(--blue-2); font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.page-head__tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (min-width: 1000px) { .page-head h1 { font-size: 28px; } }

/* ---------- números do topo ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
@media (min-width: 760px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1280px) { .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.stat {
  position: relative;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  min-width: 0;
  overflow: hidden;
}
.stat__label {
  margin: 0;
  font-family: var(--sora);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat__value {
  margin: 8px 0 2px;
  font-family: var(--anton);
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.stat__delta { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.stat__delta b { font-weight: 600; color: var(--text-2); }
.stat__delta b.up { color: #7fe0ad; }
.stat__delta b.down { color: #ff9a9d; }
.stat--hero {
  grid-column: 1 / -1;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(65, 105, 224, 0.35), transparent 60%),
    linear-gradient(160deg, #18213f, var(--card) 70%);
  border-color: rgba(107, 140, 245, 0.35);
}
.stat--hero .stat__label { color: var(--blue-3); }
.stat--hero .stat__value { font-size: 44px; }
@media (min-width: 760px) { .stat--hero { grid-column: span 1; } }
@media (min-width: 1280px) { .stat--hero .stat__value { font-size: 40px; } }
.loading { opacity: 0.55; transition: opacity 0.2s; pointer-events: none; }

/* ---------- cards ---------- */
.card {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  min-width: 0;
}
.card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 14px; }
.card__head h2 { margin: 0; font-family: var(--sora); font-size: 15px; font-weight: 700; }
.card__head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.grid-2, .grid-3 { display: grid; gap: 12px; margin-bottom: 12px; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1.25fr 1fr 1fr; }
}
.stack { display: grid; gap: 12px; align-content: start; }
.empty { margin: 0; padding: 18px 4px; text-align: center; color: var(--muted); font-size: 13px; }

/* gráficos */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; stroke: none; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--muted-2); font-size: 11px; font-family: 'Inter', sans-serif; }
.chart .line { stroke: var(--blue-2); stroke-width: 2.2; fill: none; }
.chart .area { fill: url(#areaFill); }
.chart .dot { fill: var(--bg); stroke: var(--blue-2); stroke-width: 2.2; }
.chart .col { fill: var(--ivory); opacity: 0.85; }
.chart .col.hl { opacity: 1; fill: #fff; }
.chart .col2 { fill: var(--blue-2); }
.chart .cross { stroke: var(--line-2); stroke-width: 1; }
.chart .hit { cursor: crosshair; outline: none; }
.tip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 12px));
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--card-3);
  border: 1px solid var(--line-2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  white-space: nowrap;
  font-size: 12px;
  z-index: 2;
}
.tip b { display: block; font-family: var(--sora); font-size: 13px; }
.tip span { color: var(--muted); }
.legend { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.table-view { margin-top: 10px; font-size: 12.5px; }
.table-view summary { cursor: pointer; color: var(--muted); }
.tbl-wrap { max-height: 240px; overflow: auto; margin-top: 8px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl th { font-weight: 600; color: var(--muted); font-size: 11.5px; }
.tbl .r { text-align: right; }

/* funil */
.funnel { display: grid; gap: 12px; }
.funnel__step { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; }
.funnel__step span { font-size: 13px; color: var(--text-2); }
.funnel__step b { font-family: var(--sora); font-size: 15px; font-variant-numeric: tabular-nums; }
.funnel__step small { grid-column: 1 / -1; order: 3; font-size: 11.5px; color: var(--muted); }
.funnel__bar { grid-column: 1 / -1; height: 10px; border-radius: 9999px; background: var(--card-3); overflow: hidden; }
.funnel__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--blue-2)); min-width: 4px; }
.funnel__step--last .funnel__bar i { background: linear-gradient(90deg, var(--ivory-2), #fff); }

/* barras horizontais */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 13px; }
.bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bar-row b { font-family: var(--sora); font-size: 13px; }
.bar-row b small { font-family: 'Inter', sans-serif; font-weight: 400; color: var(--muted); font-size: 11.5px; margin-left: 4px; }
.track { grid-column: 1 / -1; height: 6px; border-radius: 9999px; background: var(--card-3); overflow: hidden; }
.fill { height: 100%; border-radius: inherit; background: var(--blue-2); }

/* feed de leads recentes */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: none; }
.feed a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 4px; border-radius: 10px; }
.feed a:hover { background: var(--card-2); }
.feed b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.feed small { grid-column: 2; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .when { grid-row: 1 / 3; grid-column: 3; font-size: 11.5px; color: var(--muted); text-align: right; }
.avatar {
  grid-row: 1 / 3;
  width: 34px; height: 34px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: var(--card-3);
  color: var(--text-2);
  font: 700 12px var(--sora);
  border: 1px solid var(--line);
}

/* etapas: cor de cada coluna */
.st-novo { --st: var(--blue-2); }
.st-contato { --st: var(--violet); }
.st-negociacao { --st: var(--amber); }
.st-ganho { --st: var(--green); }
.st-perdido { --st: var(--muted-2); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-2);
  background: color-mix(in srgb, var(--st, var(--muted)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--st, var(--muted)) 35%, transparent);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 9999px; background: var(--st, var(--muted)); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--card-3);
  color: var(--muted);
  white-space: nowrap;
}
.tag svg { width: 11px; height: 11px; stroke-width: 2.2; }
.tag--checkout { background: rgba(238, 236, 230, 0.1); color: var(--ivory); }
.tag--again { background: rgba(107, 140, 245, 0.14); color: var(--blue-3); }

/* ---------- CRM (kanban) ---------- */
.crm-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.search { position: relative; flex: 1 1 240px; max-width: 360px; }
.search svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { height: 40px; padding-left: 34px; }
.crm-summary { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }
.crm-summary b { color: var(--text); font-family: var(--sora); }

.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(268px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 16px;
  overscroll-behavior-x: contain;
}
@media (min-width: 1000px) { .board { margin: 0; padding-left: 0; padding-right: 0; grid-auto-columns: minmax(212px, 1fr); gap: 10px; } }
.col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: calc(100dvh - 220px);
  min-height: 320px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  scroll-snap-align: start;
}
.col__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.col__head::before { content: ""; width: 8px; height: 8px; border-radius: 9999px; background: var(--st); box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 18%, transparent); }
.col__head h2 { margin: 0; font-family: var(--sora); font-size: 13px; font-weight: 700; }
.col__count {
  margin-left: auto;
  min-width: 24px;
  padding: 1px 8px;
  border-radius: 9999px;
  background: var(--card-3);
  font: 600 11.5px/18px var(--sora);
  text-align: center;
  color: var(--text-2);
}
.col__list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
  min-height: 80px;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: background-color 0.15s;
}
.col__list.is-over { background: color-mix(in srgb, var(--st) 7%, transparent); }
.col__empty { margin: auto 0; padding: 22px 8px; text-align: center; font-size: 12px; color: var(--muted-2); border: 1px dashed var(--line-2); border-radius: 12px; }
.col__list.is-over .col__empty, .col__list .placeholder ~ .col__empty { display: none; }

.lead-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  padding: 12px 10px 11px 14px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--line);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
}
.lead-card::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--st);
  opacity: 0.85;
}
.lead-card:hover { border-color: var(--line-2); background: var(--card-3); }
.lead-card:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 1px; }
.lead-card__name { margin: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-card__meta { grid-column: 1; margin: 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-card__tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.lead-card__when { margin-left: auto; font-size: 11px; color: var(--muted-2); align-self: center; }
.lead-card__grip {
  grid-row: 1 / 3;
  grid-column: 2;
  width: 28px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted-2);
  touch-action: none;
  cursor: grab;
}
.lead-card__grip svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.lead-card:hover .lead-card__grip { color: var(--muted); }
.lead-card.is-hidden { display: none; }
.placeholder {
  flex-shrink: 0;
  border-radius: 12px;
  border: 1.5px dashed color-mix(in srgb, var(--st, var(--blue-2)) 60%, transparent);
  background: color-mix(in srgb, var(--st, var(--blue-2)) 8%, transparent);
}
.ghost {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  margin: 0;
  cursor: grabbing;
  background: var(--card-3);
  border-color: var(--line-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  transform-origin: 20px 20px;
  will-change: transform;
}
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none !important; }
.lead-card.is-flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 40% { border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(107, 140, 245, 0.25); } }

/* ---------- ficha do lead (gaveta lateral) ---------- */
dialog { color: var(--text); }
dialog::backdrop { background: rgba(4, 5, 7, 0.7); backdrop-filter: blur(3px); }
.drawer {
  margin: 0 0 0 auto;
  width: min(100%, 520px);
  height: 100dvh;
  max-height: 100dvh;
  max-width: 100%;
  padding: 0;
  border: none;
  border-left: 1px solid var(--line);
  background: var(--panel);
}
.drawer[open] { animation: slideIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
.drawer__shell { display: flex; flex-direction: column; height: 100%; }
.drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 14px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { margin: 4px 0 0; font-family: var(--sora); font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.drawer__body { flex: 1; overflow-y: auto; padding: 16px 20px 8px; }
.drawer__foot { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--panel); }
.block { margin-bottom: 20px; }
.block h3 { margin: 0 0 10px; font-family: var(--sora); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.quick:empty { display: none; }
.stage-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-pick label { position: relative; }
.stage-pick input { position: absolute; opacity: 0; pointer-events: none; }
.stage-pick span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 9999px;
  border: 1px solid var(--line-2);
  font-family: var(--sora);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.stage-pick span::before { content: ""; width: 7px; height: 7px; border-radius: 9999px; background: var(--st); }
.stage-pick input:checked + span {
  color: var(--text);
  background: color-mix(in srgb, var(--st) 16%, transparent);
  border-color: color-mix(in srgb, var(--st) 55%, transparent);
}
.stage-pick input:focus-visible + span { outline: 2px solid var(--blue-2); }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }

/* confirmação */
.confirm { padding: 0; border: none; background: transparent; width: min(100% - 32px, 400px); }
.confirm__card { padding: 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.confirm h3 { margin: 0 0 6px; font-family: var(--sora); font-size: 17px; }
.confirm p { margin: 0 0 18px; font-size: 13.5px; }
.confirm__actions { display: flex; justify-content: flex-end; gap: 8px; }

/* conta */
.account { max-width: 460px; }
.account .card + .card { margin-top: 12px; }

/* avisos */
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; width: min(100% - 32px, 420px); }
.toast {
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--card-3);
  border: 1px solid var(--line-2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  font-size: 13.5px;
  animation: toastIn 0.2s ease;
}
.toast--error { border-color: rgba(229, 72, 77, 0.5); color: #ffc2c4; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
