:root {
  --bg: #0e0e0e;
  --surface: #3b1010;
  --surface-2: #2a0b0b;
  --muted: #e5c2c2;
  --border: #5b1c1c;
  --accent-recebido: #3b82f6;
  --accent-preparo: #f59e0b;
  --accent-pronto: #22c55e;
  --accent-caminho: #38bdf8;
  --accent-finalizado: #16a34a;
  --accent-cancelado: #ef4444;
  --text: #fce4e4;
  --primary: #f97373;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);

  /* ✅ Chart colors CORRIGIDAS */
  --chart-total: rgba(139, 92, 246, 0.85);  /* ROXO para barras */
  --chart-delivery: rgba(56, 189, 248, 0.85);  /* AZUL para linha delivery */
  --chart-local: rgba(34, 197, 94, 0.85);  /* VERDE para linha local */
}

/* =======================
   RESET / BASE
======================= */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(62, 10, 10, 0.18), transparent 28%),
              radial-gradient(circle at 80% 0%, rgba(62, 10, 10, 0.18), transparent 22%),
              var(--bg);
  color: var(--text);
}

.hidden { display: none !important; }
.muted { color: var(--muted); }

/* =======================
   HEADER
======================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  background: rgba(46, 8, 8, 0.92);
  border-bottom: 1px solid rgba(91, 28, 28, 0.85);
  backdrop-filter: blur(12px);
}

.brand {
  text-align: center;
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 28px;
}

.header-right {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* =======================
   TABS
======================= */
.tabs {
  max-width: 1280px;
  margin: 14px auto 0;
  padding: 0 18px;
  display: flex;
  gap: 10px;
}

.tab {
  background: rgba(59, 16, 16, 0.65);
  border: 1px solid rgba(91, 28, 28, 0.85);
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s ease;
}

.tab:hover {
  transform: translateY(-1px);
  border-color: rgba(249, 115, 115, 0.6);
}

.tab.active {
  color: var(--text);
  border-color: rgba(249, 115, 115, 0.9);
  box-shadow: 0 12px 24px rgba(249, 115, 115, 0.15);
}

body.mode-crm .tabs,
body.mode-results .tabs {
  display: none !important;
}

/* =======================
   BOARD
======================= */
.board {
  max-width: 1280px;
  margin: 18px auto 40px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 18px;
}

.column {
  background: rgba(59, 16, 16, 0.55);
  border: 1px solid rgba(91, 28, 28, 0.85);
  border-radius: 16px;
  overflow: hidden;
  min-height: 72vh;
  box-shadow: var(--shadow);
}

.column-header {
  padding: 14px 16px;
  background: rgba(42, 11, 11, 0.75);
  border-bottom: 1px solid rgba(91, 28, 28, 0.85);
}

.column-header h2 {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(252, 228, 228, 0.75);
}

.column-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =======================
   CARD (antigo)
======================= */
.card {
  background: rgba(46, 8, 8, 0.85);
  border: 1px solid rgba(91, 28, 28, 0.85);
  border-radius: 14px;
  padding: 12px 12px 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
}

.order-id { font-weight: 800; letter-spacing: 0.3px; }
.order-time { font-size: 12px; color: rgba(229, 194, 194, 0.85); }
.customer { margin: 0 0 6px 0; font-weight: 700; }
.items { margin: 0 0 10px 0; font-size: 13px; color: rgba(229, 194, 194, 0.95); }

.action {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(90deg, rgba(185, 28, 28, 1), rgba(249, 115, 115, 1));
  color: rgba(46, 8, 8, 1);
}

/* =======================
   ORDER CARD (novo)
======================= */
.order-card {
  background: rgba(46, 8, 8, 0.85);
  border: 1px solid rgba(91, 28, 28, 0.85);
  border-radius: 14px;
  padding: 12px 12px 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.order-card:hover {
  transform: translateY(-1px);
  border-color: rgba(249, 115, 115, 0.55);
}

.order-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
}

.order-number {
  font-weight: 800;
  letter-spacing: 0.3px;
}

.order-client {
  font-weight: 800;
  color: rgba(252, 228, 228, 0.95);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: rgba(229, 194, 194, 0.85);
}

.order-delivery-tag,
.order-payment-tag {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(91, 28, 28, 0.85);
  background: rgba(46, 8, 8, 0.55);
  color: rgba(252, 228, 228, 0.9);
  font-weight: 800;
  font-size: 12px;
}

/* =======================
   EMPTY STATE / BALLOON
======================= */
.empty-state {
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(91, 28, 28, 0.85);
  color: rgba(229, 194, 194, 0.95);
  text-align: center;
  background: rgba(46, 8, 8, 0.5);
}

.empty-balloon {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.85);
  text-align: center;
  margin-top: 10px;
}

/* =======================
   BUTTONS
======================= */
.primary-button,
.ghost-button,
.danger-button,
.icon-button,
.btn-secondary {
  font-family: inherit;
}

.primary-button {
  background: linear-gradient(90deg, rgba(185, 28, 28, 1), rgba(249, 115, 115, 1));
  color: rgba(46, 8, 8, 1);
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(91, 28, 28, 0.85);
}

.ghost-button {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(91, 28, 28, 0.85);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.ghost-button.small {
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 12px;
}

.danger-button {
  background: rgba(239, 68, 68, 0.18);
  color: rgba(252, 228, 228, 1);
  border: 1px solid rgba(239, 68, 68, 0.55);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(91, 28, 28, 0.85);
  background: rgba(46, 8, 8, 0.75);
  color: rgba(252, 228, 228, 1);
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(91, 28, 28, 0.85);
  color: rgba(252, 228, 228, 1);
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 800;
}

/* =======================
   MODALS
======================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.55);
  z-index: 50;
}

.modal-backdrop.open { display: flex; }

.modal {
  width: min(720px, 94vw);
  background: rgba(59, 16, 16, 0.92);
  border: 1px solid rgba(91, 28, 28, 0.85);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  padding: 18px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.modal-body {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px;
  background: rgba(46, 8, 8, 0.35);
  border: 1px solid rgba(91, 28, 28, 0.55);
  border-radius: 14px;
}

.modal-section {
  padding: 10px 10px 12px;
  background: rgba(46, 8, 8, 0.25);
  border: 1px solid rgba(91, 28, 28, 0.55);
  border-radius: 14px;
}

.modal-label {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(229, 194, 194, 0.95);
}

.item-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  display: grid;
  gap: 8px;
}

.item-list li {
  padding: 10px 12px;
  background: rgba(46, 8, 8, 0.35);
  border: 1px dashed rgba(91, 28, 28, 0.85);
  border-radius: 14px;
}

.notes {
  margin: 10px 0 0 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(46, 8, 8, 0.35);
  border: 1px solid rgba(91, 28, 28, 0.55);
  min-height: 48px;
}

.modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* =======================
   FORMS
======================= */
.form-body label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  color: rgba(252, 228, 228, 0.95);
}

.form-body input,
.form-body textarea,
.form-body select {
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(91, 28, 28, 0.85);
  background: rgba(46, 8, 8, 0.45);
  color: rgba(252, 228, 228, 1);
  outline: none;
}

.form-body textarea {
  min-height: 90px;
  resize: vertical;
}

.form-body input::placeholder,
.form-body textarea::placeholder {
  color: rgba(229, 194, 194, 0.75);
}

/* =======================
   DELIVERY TOGGLE
======================= */
.delivery-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  user-select: none;
}

.delivery-address { display: block; margin-top: 10px; }
.payment-wrap { display: block; margin-top: 10px; }

/* =======================
   LOGIN
======================= */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: radial-gradient(circle at 20% 20%, rgba(62, 10, 10, 0.18), transparent 28%),
              radial-gradient(circle at 80% 0%, rgba(62, 10, 10, 0.18), transparent 22%),
              var(--bg);
}

.login-card {
  width: min(520px, 92vw);
  background: rgba(59, 16, 16, 0.92);
  border: 1px solid rgba(91, 28, 28, 0.85);
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.login-badge {
  width: 120px;  /* Aumentado de 74px */
  height: 120px;  /* Aumentado de 74px */
  margin: 0 auto 10px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: transparent;  /* Removido o gradiente - agora fica transparente */
  border: none;  /* Remove qualquer borda se houver */
}

.login-logo {
  width: 120px;  /* Aumentado de 44px - agora a fênix ocupa todo o espaço */
  height: 120px;  /* Aumentado de 44px */
  object-fit: contain;
}
.google-btn { display: flex; justify-content: center; margin-top: 12px; }

/* =======================
   DRAWER (SIDEBAR)
======================= */
.drawer {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 320px;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  background: rgba(42, 11, 11, 0.95);
  border-right: 1px solid rgba(91, 28, 28, 0.85);
  z-index: 90;
  display: flex;
  flex-direction: column;
}

.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 14px;
  border-bottom: 1px solid rgba(91, 28, 28, 0.85);
}

.drawer-nav { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 10px; }

.drawer-item {
  width: 100%;
  text-align: left;
  background: rgba(59, 16, 16, 0.65);
  border: 1px solid rgba(91, 28, 28, 0.85);
  color: rgba(252, 228, 228, 0.92);
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: 0.2s ease;
}

.drawer-item:hover {
  transform: translateY(-1px);
  border-color: rgba(249, 115, 115, 0.6);
}

.drawer-item.locked {
  opacity: 0.6;
  filter: grayscale(0.2);
}

.drawer-item.locked::after {
  content: "  🔒";
  opacity: 0.9;
}

.drawer-footer {
  padding: 14px;
  border-top: 1px solid rgba(91, 28, 28, 0.85);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 89;
}

.drawer-backdrop.open { display: block; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(59, 16, 16, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}

.user-chip img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 1);
}

/* =======================
   CRM VIEW
======================= */
.crm-view,
.results-view {
  max-width: 1280px;
  margin: 18px auto 40px;
  padding: 0 18px;
}

.crm-header,
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 10px 0 14px;
}

.crm-title,
.results-title {
  font-weight: 900;
  letter-spacing: 0.6px;
  font-size: 18px;
}

.crm-content,
.results-content {
  background: rgba(59, 16, 16, 0.55);
  border: 1px solid rgba(91, 28, 28, 0.85);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

/* =======================
   CRM TABLE
======================= */
.crm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 14px;
  table-layout: fixed;
}

.crm-table thead th {
  text-align: center;
  padding: 12px 16px;
  color: rgba(252, 228, 228, 0.75);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.crm-table tbody tr {
  background: rgba(46, 8, 8, 0.40);
  border: 1px solid rgba(91, 28, 28, 0.55);
}

.crm-table tbody td {
  text-align: center;
  vertical-align: middle;
  padding: 18px 16px;
  border-bottom: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-table tbody tr td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.crm-table tbody tr td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.crm-table th:nth-child(1),
.crm-table td:nth-child(1) { width: 30%; }

.crm-table th:nth-child(2),
.crm-table td:nth-child(2) { width: 30%; }

.crm-table th:nth-child(3),
.crm-table td:nth-child(3) { width: 12%; }

.crm-table th:nth-child(4),
.crm-table td:nth-child(4) { width: 28%; }

/* =======================
   RESULTS EXEC (novo layout limpo)
======================= */
/* =======================
   RESULTS VIEW (esconder elementos antigos)
======================= */
/* Remove textos soltos e elementos antigos da view de resultados */
.results-view > p,
.results-view > div:not(.results-content):not(.results-header),
.results-view > span,
.results-view > small {
  display: none !important;
}

/* Remove cards antigos de métricas que aparecem antes do layout novo */
.results-view .results-grid:first-of-type,
.results-view .result-card:not(.results-exec-root .result-card) {
  display: none !important;
}

/* Esconde qualquer texto direto dentro de results-view */
.results-view::before {
  content: none !important;
}

.results-exec-root {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.results-exec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.results-exec-title {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.6px;
  font-size: 18px;
}

.results-exec-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.results-pill {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(91, 28, 28, 0.85);
  background: rgba(46, 8, 8, 0.55);
  color: rgba(252, 228, 228, 0.95);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.results-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(249, 115, 115, 0.6);
}

.results-pill.active {
  border-color: rgba(249, 115, 115, 0.9);
  box-shadow: 0 12px 24px rgba(249, 115, 115, 0.12);
}

select.results-pill {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px;
  line-height: 1;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(252,228,228,0.85) 50%),
    linear-gradient(135deg, rgba(252,228,228,0.85) 50%, transparent 50%),
    linear-gradient(to right, rgba(91,28,28,0.65), rgba(91,28,28,0.0));
  background-position:
    calc(100% - 18px) 52%,
    calc(100% - 12px) 52%,
    calc(100% - 42px) 50%;
  background-size:
    6px 6px,
    6px 6px,
    1px 18px;
  background-repeat: no-repeat;
}

select.results-pill:focus {
  outline: none;
  border-color: rgba(249, 115, 115, 0.9);
  box-shadow: 0 0 0 4px rgba(249, 115, 115, 0.14);
}

select.results-pill option {
  background: rgba(42, 11, 11, 0.98);
  color: rgba(252, 228, 228, 0.95);
}

/* =======================
   CHART (gráfico SVG)
======================= */
.results-exec-chart {
  background: rgba(46, 8, 8, 0.55);
  border: 1px solid rgba(91, 28, 28, 0.85);
  border-radius: 16px;
  padding: 14px;
  overflow: hidden;
}

.results-exec-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ✅ LEGENDA - cores corretas */
.results-exec-legend {
  margin-top: 12px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-weight: 800;
  font-size: 13px;
  color: rgba(252, 228, 228, 0.9);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(91, 28, 28, 0.55);
  background: rgba(46, 8, 8, 0.35);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

/* ✅ Cores corretas na legenda */
.legend-total { background: var(--chart-total); }  /* ROXO */
.legend-delivery { background: var(--chart-delivery); }  /* AZUL */
.legend-local { background: var(--chart-local); }  /* VERDE */

/* ✅ FORÇAR cores no SVG (barras e linhas) */
.results-exec-chart svg rect {
  fill: var(--chart-total) !important;  /* barras ROXAS */
}

.results-exec-chart svg path:nth-of-type(1) {
  stroke: var(--chart-delivery) !important;  /* linha delivery AZUL */
  fill: none !important;
}

.results-exec-chart svg path:nth-of-type(2) {
  stroke: var(--chart-local) !important;  /* linha local VERDE */
  fill: none !important;
}

/* =======================
   CARDS (métricas)
======================= */
.results-exec-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}

.metric-card {
  background: rgba(46, 8, 8, 0.55);
  border: 1px solid rgba(91, 28, 28, 0.85);
  border-radius: 16px;
  padding: 14px;
}

.metric-label {
  color: rgba(252, 228, 228, 0.75);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0;
}

.metric-value {
  margin-top: 8px;
  font-weight: 900;
  font-size: 28px;
}

.metric-sub {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(229, 194, 194, 0.9);
}

/* =======================
   INSIGHTS (novo layout limpo)
======================= */
.results-exec-insights {
  background: rgba(59, 16, 16, 0.55);
  border: 1px solid rgba(91, 28, 28, 0.85);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.insights-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.insights-title {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.6px;
  font-size: 16px;
  color: rgba(252, 228, 228, 0.95);
}

.insights-subtitle {
  margin: 6px 0 0 0;
  font-size: 13px;
  color: rgba(229, 194, 194, 0.9);
}

/* Grid com 4 cards de insights */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

/* Cada card de insight individual */
.insight-card {
  background: rgba(46, 8, 8, 0.35);
  border: 1px solid rgba(91, 28, 28, 0.55);
  border-radius: 16px;
  padding: 14px 16px;
  transition: transform 0.15s ease;
}

.insight-card:hover {
  transform: translateY(-2px);
}

.insight-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(252, 228, 228, 0.75);
  margin: 0;
}

.insight-value {
  margin-top: 8px;
  font-weight: 900;
  font-size: 22px;
  color: rgba(252, 228, 228, 0.95);
}

.insight-note {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(229, 194, 194, 0.9);
  line-height: 1.4;
}

/* ✅ BALÃO DE RECURSOS CUSTOM (design premium e chamativo) */
.insights-locked {
  background: linear-gradient(145deg, rgba(249, 115, 115, 0.08), rgba(46, 8, 8, 0.65));
  border: 2px solid rgba(249, 115, 115, 0.55);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 12px 28px rgba(249, 115, 115, 0.18), 
              0 4px 12px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

/* Efeito de brilho sutil no topo */
.insights-locked::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(249, 115, 115, 0.4), 
    transparent
  );
}

.locked-title {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.4px;
  color: rgba(249, 115, 115, 1);
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.locked-title::before {
  content: "🔒";
  font-size: 20px;
}

/* Lista de recursos custom */
.locked-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.locked-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(46, 8, 8, 0.45);
  border: 1px solid rgba(91, 28, 28, 0.65);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(252, 228, 228, 0.90);
  transition: all 0.2s ease;
}

.locked-item:hover {
  background: rgba(46, 8, 8, 0.65);
  border-color: rgba(249, 115, 115, 0.45);
  transform: translateX(4px);
}

/* =======================
   RESPONSIVE
======================= */
@media (max-width: 1100px) {
  .board { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .results-exec-cards { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .insights-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .board { grid-template-columns: 1fr; }
  .brand { font-size: 22px; }
  .tabs { overflow-x: auto; }
  .results-exec-cards { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: 1fr; }
}

/* =======================
   MODAL DE UPGRADE (bloqueio de plano)
======================= */
.upgrade-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

.upgrade-modal-backdrop.open {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.upgrade-modal {
  width: min(520px, 92vw);
  background: linear-gradient(145deg, rgba(59, 16, 16, 0.95), rgba(42, 11, 11, 0.98));
  border: 2px solid rgba(249, 115, 115, 0.65);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65),
              0 0 40px rgba(249, 115, 115, 0.25);
  text-align: center;
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Efeito de brilho no topo */
.upgrade-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(249, 115, 115, 0.8), 
    transparent
  );
  border-radius: 2px;
}

.upgrade-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(249, 115, 115, 0.25), rgba(185, 28, 28, 0.35));
  border: 2px solid rgba(249, 115, 115, 0.45);
  font-size: 42px;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.upgrade-title {
  margin: 0 0 10px 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.4px;
  color: rgba(249, 115, 115, 1);
  text-shadow: 0 2px 8px rgba(249, 115, 115, 0.3);
}

.upgrade-message {
  margin: 0 0 10px 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(252, 228, 228, 0.90);
}

.upgrade-plan {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(249, 115, 115, 0.18);
  border: 1px solid rgba(249, 115, 115, 0.55);
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  color: rgba(249, 115, 115, 1);
  margin: 8px 0 20px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.upgrade-features {
  text-align: left;
  background: rgba(46, 8, 8, 0.45);
  border: 1px solid rgba(91, 28, 28, 0.65);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 16px 0 20px;
}

.upgrade-features-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(229, 194, 194, 0.85);
  margin: 0 0 10px 0;
}

.upgrade-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgrade-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(252, 228, 228, 0.88);
}

.upgrade-features li::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(249, 115, 115, 0.25);
  color: rgba(249, 115, 115, 1);
  font-weight: 900;
  font-size: 12px;
  flex-shrink: 0;
}

.upgrade-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.upgrade-btn {
  background: linear-gradient(90deg, rgba(185, 28, 28, 1), rgba(249, 115, 115, 1));
  color: rgba(14, 14, 14, 1);
  border: 0;
  border-radius: 14px;
  padding: 12px 24px;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(249, 115, 115, 0.35);
}

.upgrade-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249, 115, 115, 0.45);
}

.upgrade-btn:active {
  transform: translateY(0);
}

.upgrade-close-btn {
  background: transparent;
  border: 1px solid rgba(91, 28, 28, 0.85);
  color: rgba(252, 228, 228, 0.85);
  border-radius: 14px;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upgrade-close-btn:hover {
  border-color: rgba(249, 115, 115, 0.6);
  color: rgba(252, 228, 228, 1);
}

/* Botão X no canto */
.upgrade-dismiss {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  background: rgba(46, 8, 8, 0.65);
  color: rgba(252, 228, 228, 0.85);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.upgrade-dismiss:hover {
  background: rgba(239, 68, 68, 0.25);
  color: rgba(239, 68, 68, 1);
}
