/* ============================================
   CAR VISION — ÁREA DO STAND (admin)
   Painel interno, mantém-se em tema escuro — só o site
   público (style.css) passou a tema claro.
   ============================================ */

:root {
  /* Fundo cinza neutro (não o --ink azulado/quase-preto do site público —
     esse token é partilhado com a secção escura de index.html, por isso o
     admin tem os seus próprios tons aqui). */
  --admin-bg: #1c1c1c;
  --surface: #232323;
  --surface-2: #2b2b2b;
  --surface-3: #333333;
  --chrome: #cfd3da;
  --grey: #90929e;
  --line: rgba(245, 245, 247, 0.09);
  --line-strong: rgba(245, 245, 247, 0.16);

  /* Cores de estado (nunca usadas como identidade de série, só para
     sinalizar bom/aviso/perigo — ver skill dataviz). */
  --ok: #2fbf71;
  --warn: #f0ab2e;
  --danger: #e0526b;

  /* Elevação: os cartões do painel eram planos (só fundo+contorno) —
     esta sombra dá profundidade sem mudar nenhum layout. */
  --admin-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.5);
  --admin-shadow-lg: 0 28px 60px -20px rgba(0, 0, 0, 0.55);
}

.admin-body { background: var(--admin-bg); color: var(--white); min-height: 100vh; }
.admin-body .logo { color: var(--white); }

.admin-body .form__group input,
.admin-body .form__group select,
.admin-body .form__group textarea {
  background: rgba(245,245,247,0.06);
  border-color: var(--line-strong);
  color: var(--white);
}
.admin-body .form__group input::placeholder,
.admin-body .form__group textarea::placeholder { color: rgba(245,245,247,0.35); }
.admin-body .form__group input:focus,
.admin-body .form__group select:focus,
.admin-body .form__group textarea:focus { border-color: var(--metal-hi); }
.admin-body .form__group label { color: var(--chrome); }
.admin-body .form__group label .hint { font-weight: 400; color: var(--grey); font-size: 12px; }

/* .btn--outline do site público usa texto escuro (pensado para cartões
   claros) — no painel escuro isso fica ilegível, por isso troca aqui. */
.admin-body .btn--outline { color: var(--chrome); border-color: var(--line-strong); }
.admin-body .btn--outline:hover { border-color: var(--metal-hi); color: var(--metal-hi); }

.admin-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--admin-bg);
  z-index: 30;
}
.admin-header__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  flex: 1;
}
.admin-menu-toggle {
  display: none;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  color: var(--chrome);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.admin-menu-toggle svg { width: 18px; height: 18px; }

.admin-main { padding: 0; }

.admin-login { max-width: 440px; margin: 60px auto 0; }
.admin-hint { color: var(--grey); font-size: 13px; line-height: 1.6; margin-bottom: 20px; }
.admin-hint code { color: var(--chrome); }
.admin-hint:last-child { margin-bottom: 0; }

#loginForm { display: flex; flex-direction: column; gap: 20px; }

.admin-error, .admin-msg {
  font-size: 13px;
  color: var(--metal-hi);
  min-height: 18px;
}

.form__row--3 { grid-template-columns: 1fr 1fr 1fr; }
.form__row--checks { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }

.admin-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--chrome);
}
.admin-check input { width: 16px; height: 16px; accent-color: var(--metal-hi); }

.admin-form-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.admin-danger-text { color: var(--danger); margin-left: auto; }

.admin-photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.admin-photo-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line-strong);
}
.admin-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-photo-thumb button {
  position: absolute;
  top: 2px; right: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(8,8,11,0.8);
  color: var(--white);
  font-size: 13px;
  line-height: 1;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: var(--admin-shadow);
}
.admin-card h1 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 18px;
}
.admin-card h3 { font-size: 15px; font-weight: 600; color: var(--white); margin-bottom: 4px; }

/* ============================================
   SHELL: sidebar + conteúdo
   ============================================ */

.admin-shell {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 71px);
}

.admin-sidebar-overlay {
  display: none;
}

.admin-sidebar {
  width: 216px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 24px 12px;
  position: sticky;
  top: 71px;
  height: calc(100vh - 71px);
  overflow-y: auto;
}

.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--grey);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}
.admin-nav__link svg { width: 19px; height: 19px; flex-shrink: 0; }
.admin-nav__link:hover { background: var(--surface); color: var(--chrome); }
.admin-nav__link.is-active { background: var(--surface); color: var(--white); }
.admin-nav__link.is-active svg { color: var(--metal-hi); }

.admin-content {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 100px;
}

.admin-global-banner {
  background: rgba(240, 171, 46, 0.1);
  border: 1px solid rgba(240, 171, 46, 0.35);
  color: var(--warn);
  font-size: 13px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.admin-global-banner code { color: var(--white); }

.admin-view[hidden] { display: none; }

.admin-view__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.admin-view__head h1 { font-family: var(--display); font-size: 24px; font-weight: 600; }

.admin-back {
  color: var(--grey);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
.admin-back:hover { color: var(--chrome); }

@media (max-width: 900px) {
  .admin-menu-toggle { display: inline-flex; }
  .admin-sidebar {
    position: fixed;
    left: 0; top: 0;
    height: 100vh;
    z-index: 60;
    background: var(--admin-bg);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 50;
  }
  .admin-content { padding: 20px 16px 80px; }
}

/* ============================================
   PAINEL (dashboard)
   ============================================ */

.dash-goal-card {
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--admin-shadow-lg);
}
.dash-goal-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dash-goal-card__title { font-size: 13px; color: var(--grey); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.dash-goal-card__count { font-family: var(--display); font-size: 30px; font-weight: 600; color: var(--white); margin-top: 6px; }
.dash-goal-card__pct { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--metal-hi); }
.dash-goal-card__pct-sub { display: block; font-size: 11px; color: var(--grey); text-align: right; }
.dash-goal-card__pace { font-size: 13px; color: var(--chrome); margin: 14px 0 10px; line-height: 1.6; }
.dash-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(245,245,247,0.08);
  overflow: hidden;
}
.dash-progress__fill { height: 100%; background: var(--gradient); border-radius: 999px; transition: width 0.4s ease; }

.dash-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  background: rgba(240, 171, 46, 0.1);
  border: 1px solid rgba(240, 171, 46, 0.3);
}
.dash-banner--warn { }
.dash-banner--pace { background: var(--surface); border-color: var(--line-strong); }
.dash-banner__icon { font-size: 20px; color: var(--warn); flex-shrink: 0; }
.dash-banner__text { flex: 1; min-width: 0; }
.dash-banner__text strong { display: block; color: var(--white); font-size: 14px; margin-bottom: 2px; }
.dash-banner__text p { color: var(--grey); font-size: 12.5px; margin: 0; }

.dash-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 26px 0 14px;
}
.dash-section-head--tight { margin: 0 0 14px; align-items: center; }
.dash-section-head h2 { font-family: var(--display); font-size: 19px; font-weight: 600; }
.dash-section-head h3 { margin-bottom: 0; }
.dash-section-head .admin-hint { margin-bottom: 0; }

.dash-tabs, .admin-tabs, .admin-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--surface);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.dash-tabs button, .admin-tabs button, .admin-filter-row button {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--grey);
}
.dash-tabs button.is-active, .admin-tabs button.is-active, .admin-filter-row button.is-active {
  background: var(--surface-3);
  color: var(--white);
}
.admin-filter-row { margin-bottom: 18px; display: inline-flex; }

.dash-custom-range { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: var(--grey); font-size: 13px; }
.dash-custom-range input { background: var(--surface); border: 1px solid var(--line-strong); color: var(--white); border-radius: var(--radius-sm); padding: 6px 10px; }

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.dash-kpis--4 { grid-template-columns: repeat(4, 1fr); }
.dash-kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--admin-shadow);
}
.dash-kpi__label { display: block; font-size: 12px; color: var(--grey); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.dash-kpi strong { display: block; font-family: var(--sans); font-size: 26px; font-weight: 600; color: var(--white); margin-top: 6px; }
.dash-kpi__sub { display: block; font-size: 12px; color: var(--ok); margin-top: 2px; min-height: 15px; }
.dash-kpi__spark { margin-top: 10px; height: 28px; }
.dash-kpi__spark svg { width: 100%; height: 100%; display: block; }

.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.dash-big { font-size: 26px; }

.dash-stock-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.dash-stock-rows > div { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.dash-stock-rows span { color: var(--grey); }
.dash-stock-rows strong { color: var(--white); font-weight: 600; }

/* Funil: ramp ordinal de um só tom (chrome), a estreitar por etapa */
.dash-funnel { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.dash-funnel__stage { display: flex; align-items: center; gap: 12px; }
.dash-funnel__bar {
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--metal-lo);
  display: flex; align-items: center;
  padding: 0 14px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  transition: width 0.4s ease;
  min-width: 46px;
}
.dash-funnel__stage:nth-child(1) .dash-funnel__bar { background: var(--metal-hi); }
.dash-funnel__stage:nth-child(2) .dash-funnel__bar { background: #a7abb3; }
.dash-funnel__stage:nth-child(3) .dash-funnel__bar { background: var(--metal-lo); color: var(--white); }
.dash-funnel__label { flex: 1; font-size: 12.5px; color: var(--grey); }
.dash-funnel__label strong { color: var(--white); font-weight: 600; }

.dash-gauge-wrap { display: flex; align-items: center; gap: 24px; margin-top: 10px; }
.dash-gauge {
  width: 130px; height: 130px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--ok) 0% var(--gauge-pct, 70%), var(--surface-3) var(--gauge-pct, 70%) 100%);
  position: relative;
}
.dash-gauge::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--surface);
}
.dash-gauge strong, .dash-gauge span { position: relative; z-index: 1; }
.dash-gauge strong { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--white); }
.dash-gauge span { font-size: 10.5px; color: var(--grey); }
.dash-gauge-legend { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--chrome); }
.dash-gauge-legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.dot--ok { background: var(--ok); }
.dot--stuck { background: var(--surface-3); border: 1px solid var(--line-strong); }

.dash-stuck-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.dash-stuck-row:last-child { border-bottom: none; }
.dash-stuck-row__rank { width: 20px; color: var(--grey); font-weight: 700; flex-shrink: 0; }
.dash-stuck-row__name { flex: 1; min-width: 0; color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-stuck-row__price { color: var(--chrome); font-variant-numeric: tabular-nums; }
.dash-stuck-row__days { font-size: 11px; font-weight: 700; color: var(--warn); background: rgba(240,171,46,0.12); padding: 3px 8px; border-radius: 999px; flex-shrink: 0; }

.dash-yearchart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  margin-top: 12px;
  padding: 0 4px;
}
.year-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}
.year-bar__col {
  width: 100%;
  max-width: 22px;
  height: var(--h, 4%);
  min-height: 3px;
  background: var(--metal-hi);
  border-radius: 4px 4px 0 0;
  transition: height 0.4s ease, background 0.2s ease;
}
.year-bar:hover .year-bar__col { background: var(--white); }
.year-bar__month { font-size: 10.5px; color: var(--grey); margin-top: 8px; text-transform: uppercase; }
.year-bar__tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.year-bar:hover .year-bar__tip { opacity: 1; }

/* ============================================
   ESTOQUE (grelha + detalhe)
   ============================================ */

.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.car-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--admin-shadow);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.car-card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--admin-shadow-lg); }
.car-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.car-card__media img { width: 100%; height: 100%; object-fit: cover; }
.car-card__noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--grey); }
.car-card__noimg svg { width: 34px; height: 34px; }
.car-card__days {
  position: absolute; top: 8px; left: 8px;
  font-size: 10.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(10,10,13,0.75); color: var(--chrome);
  backdrop-filter: blur(4px);
}
.car-card__days.is-new { color: var(--ok); }
.car-card__body { padding: 14px 16px 16px; }
.car-card__title { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 2px; }
.car-card__price { font-size: 13px; color: var(--grey); margin-bottom: 10px; }
.car-card__margin { font-size: 12.5px; color: var(--ok); font-weight: 600; }
.car-card__margin-sub { font-size: 11.5px; color: var(--grey); margin-top: 2px; }
.car-card__cta {
  display: inline-block;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  background: var(--metal-hi);
  padding: 7px 14px;
  border-radius: 999px;
}

.car-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.car-detail__media { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 4/3; }
.car-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.car-detail__title { font-family: var(--display); font-size: 22px; font-weight: 600; margin: 16px 0 4px; }
.car-detail__meta { color: var(--grey); font-size: 13px; margin-bottom: 14px; }
.car-detail__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.car-detail__chip { font-size: 12px; color: var(--chrome); border: 1px solid var(--line-strong); padding: 5px 12px; border-radius: 999px; }

.car-detail__panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--admin-shadow-lg); }
.car-detail__label { font-size: 11.5px; color: var(--grey); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.car-detail__table-price { font-size: 20px; font-weight: 600; color: var(--white); margin: 4px 0 16px; }
.car-detail__min-box { background: rgba(47,191,113,0.1); border: 1px solid rgba(47,191,113,0.3); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px; }
.car-detail__min-price { font-size: 22px; font-weight: 700; color: var(--ok); }
.car-detail__min-hint { font-size: 11.5px; color: var(--grey); margin-top: 4px; }
.car-detail__no-margin { background: rgba(240,171,46,0.1); border: 1px solid rgba(240,171,46,0.3); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px; font-size: 13px; color: var(--warn); }

.car-detail__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.car-detail__stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.car-detail__stat span { display: block; font-size: 11px; color: var(--grey); margin-bottom: 4px; }
.car-detail__stat strong { font-size: 15px; color: var(--white); font-variant-numeric: tabular-nums; }

.car-detail__actions { display: flex; flex-direction: column; gap: 10px; }
.car-detail__actions .btn { width: 100%; text-align: center; }

@media (max-width: 780px) {
  .car-detail { grid-template-columns: 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .dash-kpis, .dash-kpis--4 { grid-template-columns: 1fr; }
  .metas-grid { grid-template-columns: 1fr !important; }
}

/* ============================================
   CLIENTES (CRM / kanban)
   ============================================ */

.clientes-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--admin-shadow);
}
.stat-tile span { display: block; font-size: 12px; color: var(--grey); margin-bottom: 6px; }
.stat-tile strong { font-family: var(--display); font-size: 24px; font-weight: 600; color: var(--white); }

.admin-month-nav { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; font-size: 13px; }
.admin-month-nav button {
  width: 28px; height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--chrome);
}
.admin-month-nav button:hover { border-color: var(--metal-hi); color: var(--metal-hi); }
.admin-month-nav strong { color: var(--white); min-width: 130px; }

.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kanban__col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--stage-color, var(--line));
  border-radius: var(--radius);
  width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  max-height: 640px;
  box-shadow: var(--admin-shadow);
  transition: box-shadow .15s ease;
}
.kanban__col.is-dragover { border-color: var(--stage-color, var(--metal-hi)); box-shadow: var(--admin-shadow), 0 0 0 2px var(--stage-color, var(--metal-hi)) inset; }
.kanban__col-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px; font-weight: 700;
  background: color-mix(in srgb, var(--stage-color, transparent) 10%, transparent);
}
.kanban__col-head .pill { margin-left: auto; background: var(--surface-3); color: var(--chrome); font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.kanban__col-head .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.kanban__list { padding: 10px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 60px; }

.kanban__card {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--stage-color, var(--line-strong));
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: grab;
  position: relative;
  box-shadow: 0 8px 18px -12px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.kanban__card:hover { box-shadow: var(--admin-shadow); transform: translateY(-2px); }
.kanban__card.is-dragging { opacity: 0.4; }
.kanban__card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kanban__card-top strong { font-size: 13.5px; color: var(--white); }
.kanban__card-menu { color: var(--grey); font-size: 16px; line-height: 1; padding: 2px 6px; flex-shrink: 0; }
.kanban__card-menu:hover { color: var(--white); }
.kanban__card-phone, .kanban__card-car { display: block; font-size: 12px; color: var(--grey); margin-top: 3px; }
.kanban__card-note { font-size: 12px; color: var(--chrome); margin-top: 6px; line-height: 1.5; }
.kanban__card-dates { font-size: 11px; color: var(--grey); margin-top: 8px; }
.kanban__card-sold { font-size: 12px; color: var(--ok); font-weight: 600; margin-top: 8px; }

.kanban__menu-popover {
  position: absolute;
  top: 30px; right: 8px;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 6px;
  z-index: 20;
  min-width: 168px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
.kanban__menu-popover button {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; font-size: 12.5px; color: var(--chrome);
  border-radius: var(--radius-sm);
}
.kanban__menu-popover button:hover { background: var(--surface-2); color: var(--white); }
.kanban__menu-popover .menu-label { font-size: 10.5px; color: var(--grey); text-transform: uppercase; padding: 6px 10px 2px; }
.kanban__menu-popover hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
.kanban__menu-popover .danger { color: var(--danger); }

/* ============================================
   TABELAS (Compradores / Relatórios)
   ============================================ */

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; box-shadow: var(--admin-shadow); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; white-space: nowrap; }
.admin-table th { color: var(--grey); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--line-strong); }
.admin-table td { border-bottom: 1px solid var(--line); color: var(--chrome); font-variant-numeric: tabular-nums; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table td:first-child, .admin-table th:first-child { color: var(--white); font-variant-numeric: initial; }
.admin-table tfoot td { color: var(--white); font-weight: 700; border-top: 1px solid var(--line-strong); border-bottom: none; }
.admin-link-btn { color: var(--chrome); font-size: 12.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.admin-link-btn:hover { color: var(--metal-hi); }

/* ============================================
   GESTÃO
   ============================================ */

.gestao-kind-tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }

/* ============================================
   ANALISTA ANDRÉ (chat)
   ============================================ */

.analista-chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.analista-chat__messages {
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 24px;
  min-height: 360px;
  max-height: 60vh;
  overflow-y: auto;
}
.analista-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.analista-msg--assistant { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--white); }
.analista-msg--user { align-self: flex-end; background: var(--gradient); color: var(--ink); }
.analista-msg--typing { display: flex; align-items: center; gap: 4px; padding: 13px; }
.analista-msg--typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--grey); animation: analistaTyping 1.2s ease-in-out infinite; }
.analista-msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.analista-msg--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes analistaTyping {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.analista-chat__form { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); }
.analista-chat__form input {
  flex: 1; font: inherit; font-size: 14px; color: var(--white);
  background: rgba(245,245,247,0.06); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 11px 14px;
}
.analista-chat__form input:focus { outline: none; border-color: var(--metal-hi); }

@media (max-width: 640px) {
  .analista-chat__messages { min-height: 260px; }
  .analista-msg { max-width: 92%; }
}

/* ============================================
   METAS
   ============================================ */

.metas-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.metas-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.metas-goal-card {
  position: relative;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--admin-shadow-lg);
}
.metas-goal-edit {
  position: absolute; top: 20px; right: 20px;
  width: 30px; height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--chrome);
}
.metas-goal-edit:hover { border-color: var(--metal-hi); color: var(--metal-hi); }
.metas-goal-card__name { font-size: 12px; color: var(--grey); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.metas-goal-card__count { font-family: var(--display); font-size: 32px; font-weight: 700; color: var(--white); margin: 6px 0 14px; }
.metas-goal-card__sub { font-size: 13px; color: var(--chrome); margin-top: 10px; line-height: 1.6; }
.metas-tip p { color: var(--chrome); font-size: 13.5px; line-height: 1.7; }

/* ============================================
   RELATÓRIOS
   ============================================ */

.lancamento-rows { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 18px; }
.lancamento-row { display: flex; align-items: center; gap: 14px; }
.lancamento-row__label { flex: 1; font-size: 13px; color: var(--chrome); }
.lancamento-row input { width: 150px; background: rgba(245,245,247,0.06); border: 1px solid var(--line-strong); color: var(--white); border-radius: var(--radius-sm); padding: 8px 12px; }

/* ============================================
   DIALOGS (nativos)
   ============================================ */

.admin-dialog {
  background: var(--surface);
  color: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 28px;
  width: min(480px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--admin-shadow-lg);
}
.admin-dialog--wide { width: min(640px, 92vw); }
.admin-dialog::backdrop { background: rgba(5,5,8,0.65); backdrop-filter: blur(2px); }
.admin-dialog form { display: flex; flex-direction: column; gap: 18px; }
.admin-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-dialog__head h2 { font-family: var(--display); font-size: 18px; font-weight: 600; }
.admin-dialog__close { font-size: 22px; color: var(--grey); line-height: 1; padding: 4px; }
.admin-dialog__close:hover { color: var(--white); }

.admin-dates, .admin-sold-fields { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px 2px; }
.admin-dates legend, .admin-sold-fields legend { font-size: 11.5px; color: var(--grey); text-transform: uppercase; letter-spacing: 0.05em; padding: 0 6px; }

.margin-preview { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 13px; color: var(--chrome); display: flex; flex-direction: column; gap: 6px; }
.margin-preview strong { color: var(--white); }
.margin-preview .ok { color: var(--ok); }
.margin-preview .warn { color: var(--warn); }

/* ============================================
   AGENDA
   ============================================ */

.agenda-day {
  font-size: 13px;
  font-weight: 700;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 22px 0 10px;
}
.agenda-day:first-child { margin-top: 0; }
.agenda-day.is-past { color: rgba(144,146,158,0.5); }

.agenda-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--surface);
  box-shadow: var(--admin-shadow);
}
.agenda-row__time { width: 48px; flex-shrink: 0; font-weight: 700; color: var(--white); font-variant-numeric: tabular-nums; }
.agenda-row__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.agenda-row__info strong { color: var(--white); font-size: 14px; }
.agenda-row__info span { color: var(--grey); font-size: 12.5px; }
.agenda-row__actions { display: flex; gap: 8px; flex-shrink: 0; }

@media (max-width: 640px) {
  .form__row--3 { grid-template-columns: 1fr; }
  .clientes-stats, .metas-tiles { grid-template-columns: 1fr 1fr; }
  .dash-kpis, .dash-kpis--4 { grid-template-columns: 1fr; }
  .agenda-row { flex-wrap: wrap; }
}
