/* ============================================
   DIAGNÓSTICO COMERCIAL — AGÊNCIA DO MORENO
   style.css
   ============================================ */

:root {
  --red: #c0392b;
  --red-hover: #a93226;
  --black: #0a0a0a;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --sidebar-w: 220px;
  --topbar-h: 64px;
  --green: #16a34a;
  --amber: #d97706;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ============ LOGIN ============ */
.tela-login {
  min-height: 100vh;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-bg-decoration {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  border: 80px solid rgba(192,57,43,0.08);
  pointer-events: none;
}

.login-bg-decoration::after {
  content: '';
  position: absolute;
  bottom: -200px;
  left: -300px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 60px solid rgba(192,57,43,0.05);
}

.login-card {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  padding: 48px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo img {
  height: 60px;
  object-fit: contain;
}

.logo-text-fallback {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--white);
  font-weight: 700;
}

.login-title {
  text-align: center;
  margin-bottom: 36px;
}

.login-title h1 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--white);
  margin-bottom: 6px;
}

.login-title p {
  font-size: 13px;
  color: var(--gray-500);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gray-400);
}

.field .hint {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: -4px;
}

.obrigatorio { color: var(--red); }

.login-form input {
  background: #1f1f1f;
  border: 1.5px solid #2e2e2e;
  border-radius: 10px;
  padding: 13px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.12);
}

.login-form input::placeholder { color: #444; }

.login-erro {
  background: rgba(192,57,43,0.12);
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #f87171;
}

.btn-login {
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 4px;
}

.btn-login:hover { background: var(--red-hover); }
.btn-login:active { transform: scale(0.99); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }

.login-footer {
  text-align: center;
  margin-top: 32px;
  font-size: 12px;
  color: #333;
}

/* ============ LAYOUT ADMIN ============ */
.area-admin {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: var(--black);
  border-right: 1px solid #1a1a1a;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 50;
}

.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid #1a1a1a;
}

.sidebar-logo img {
  height: 44px;
  object-fit: contain;
  width: 100%;
}

.sidebar-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: var(--white);
  font-weight: 700;
  text-align: center;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--gray-400);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--white);
}

.nav-item.active {
  background: rgba(192,57,43,0.15);
  color: var(--white);
}

.nav-icon { font-size: 16px; }

.sidebar-bottom {
  padding: 16px 12px;
  border-top: 1px solid #1a1a1a;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid #2a2a2a;
  color: var(--gray-500);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: all 0.15s;
}

.btn-logout:hover {
  border-color: var(--red);
  color: #f87171;
}

/* MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOPBAR */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
}

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

.user-avatar {
  width: 34px;
  height: 34px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
}

#topbar-email {
  font-size: 13px;
  color: var(--gray-500);
}

/* PÁGINAS */
.pagina { display: none; padding: 32px; }
.pagina.active { display: block; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 16px;
}

.page-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  margin-bottom: 4px;
}

.page-sub {
  font-size: 13px;
  color: var(--gray-500);
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--gray-500);
}

/* FILTROS */
.filtros {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.input-busca {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  background: var(--white);
  transition: border-color 0.2s;
}

.input-busca:focus { border-color: var(--red); }

.select-filtro {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 36px 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  background: var(--white);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.2s;
}

.select-filtro:focus { border-color: var(--red); }

/* LISTA DE DIAGNÓSTICOS */
.lista-diagnosticos {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diagnostico-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}

.diagnostico-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.diag-info { flex: 1; min-width: 0; }

.diag-nome {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diag-meta {
  font-size: 12px;
  color: var(--gray-500);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.diag-acoes {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.status-badge.em_andamento {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.concluido {
  background: #dcfce7;
  color: #166534;
}

/* BOTÕES */
.btn-primary {
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.btn-primary:hover { background: var(--red-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-secondary:hover { background: var(--gray-200); }

.btn-outline {
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
  border-radius: 8px;
  padding: 10px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-outline:hover {
  background: rgba(192,57,43,0.05);
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
  color: var(--gray-500);
}

.btn-icon:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.btn-voltar {
  background: transparent;
  border: none;
  color: var(--gray-500);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
}

.btn-voltar:hover { color: var(--gray-900); }

/* CARD FORMULÁRIO */
.card-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: 700px;
}

.card-form .field label {
  color: var(--gray-700);
  text-transform: uppercase;
}

.card-form input, .card-form textarea, .card-form select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card-form input:focus, .card-form textarea:focus, .card-form select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.08);
}

.novo-acoes {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* LINK GERADO */
.link-gerado-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--green);
  border-radius: 12px;
  padding: 24px 28px;
  margin-top: 20px;
  max-width: 700px;
  box-shadow: var(--shadow);
}

.link-gerado-titulo {
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 14px;
}

.link-gerado-url {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-family: monospace;
  color: var(--gray-700);
  word-break: break-all;
  margin-bottom: 16px;
}

.link-gerado-acoes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.link-gerado-dica {
  font-size: 12px;
  color: var(--gray-400);
}

/* DETALHE */
.detalhe-acoes {
  display: flex;
  gap: 8px;
  align-items: center;
}

.detalhe-secao {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.detalhe-secao-titulo {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.detalhe-campo {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detalhe-campo-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gray-400);
}

.detalhe-campo-valor {
  font-size: 14px;
  color: var(--gray-900);
  line-height: 1.5;
}

.detalhe-campo-valor.empty { color: var(--gray-300); font-style: italic; }

.campo-span-2 { grid-column: span 2; }

/* FUNIL VISUAL */
.funil-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.funil-etapa {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.funil-etapa-num {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 4px;
}

.funil-etapa-label {
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* PLANO ESTRATÉGICO */
.plano-estrategico-area {
  margin-top: 8px;
}

.plano-estrategico-area textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
  min-height: 160px;
  outline: none;
  transition: border-color 0.2s;
  color: var(--gray-900);
}

.plano-estrategico-area textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.08);
}

.plano-salvo-msg {
  font-size: 12px;
  color: var(--green);
  margin-top: 8px;
  display: none;
}

/* ESTADOS */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--gray-400);
  gap: 16px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 60px;
  color: var(--gray-400);
}

.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.empty-state-sub { font-size: 13px; }

/* GRIDS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* RESPONSIVO */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .main-content { margin-left: 0; }
  .pagina { padding: 20px 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .funil-visual { grid-template-columns: 1fr 1fr; }
  .detalhe-grid { grid-template-columns: 1fr; }
  .campo-span-2 { grid-column: span 1; }
  .page-header { flex-direction: column; }
  .filtros { flex-direction: column; }
}

/* ============ FASE 2 — ADIÇÕES ============ */

/* Tags para checkboxes */
.tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.tag {
  display: inline-flex;
  align-items: center;
  background: rgba(192,57,43,0.08);
  color: var(--red);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: 100px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
}

.detalhe-campo-valor .empty {
  color: var(--gray-300);
  font-style: italic;
  font-size: 13px;
}

/* Barra de progresso no card */
.progresso-wrapper {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.progresso-bar {
  height: 4px;
  border-radius: 2px;
  transition: width 0.4s;
  flex-shrink: 0;
}

/* A barra precisa de um container */
.diagnostico-card .progresso-wrapper {
  background: var(--gray-100);
  border-radius: 4px;
  height: 4px;
  position: relative;
  overflow: hidden;
  flex: 1;
  max-width: 200px;
}

.diagnostico-card .progresso-wrapper .progresso-bar {
  position: absolute;
  left: 0; top: 0; height: 100%;
}

.diagnostico-card .progresso-wrapper .progresso-label {
  display: none;
}

/* Refazendo progresso no card para funcionar corretamente */
.diag-info .progresso-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.diag-info .progresso-track {
  flex: 1;
  max-width: 160px;
  height: 4px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.diag-info .progresso-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s;
}

.diag-info .progresso-texto {
  font-size: 11px;
  color: var(--gray-400);
  white-space: nowrap;
}

/* Barra de progresso no detalhe */
.progresso-detalhe {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.progresso-detalhe-bar {
  flex: 1;
  max-width: 240px;
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.progresso-detalhe span {
  font-size: 12px;
  color: var(--gray-500);
}

/* ============ FASE 4 — ADIÇÕES ============ */

/* Avatar no card */
.diagnostico-card { align-items: flex-start; gap: 14px; }
.card-avatar {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
  flex-shrink: 0; margin-top: 2px; letter-spacing: 0.5px;
}

/* Nome + badge novo */
.diag-nome-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.badge-novo {
  background: #c0392b; color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  padding: 2px 7px; border-radius: 100px;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.7; } }

/* Card com destaque de novo */
.card-novo { border-left: 3px solid #c0392b; }

/* Empty state elaborado */
.empty-state-elaborado {
  text-align: center; padding: 60px 40px;
  background: var(--white); border: 1px dashed var(--gray-200);
  border-radius: 16px;
}
.empty-state-ilustracao { font-size: 56px; margin-bottom: 16px; }
.empty-state-titulo { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--gray-900); margin-bottom: 8px; }
.empty-state-desc { font-size: 14px; color: var(--gray-500); line-height: 1.6; max-width: 360px; margin: 0 auto; }

/* Header fixo no detalhe */
.detalhe-header-nome {
  font-size: 13px; font-weight: 600; color: var(--gray-500);
  padding: 0 0 0 4px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 300px;
}

/* Próximos passos */
.proximos-passos-add {
  display: flex; gap: 10px; margin-top: 12px;
}
.proximos-passos-add input {
  flex: 1; border: 1.5px solid var(--border); border-radius: 8px;
  padding: 10px 14px; font-family: 'DM Sans', sans-serif; font-size: 14px;
  outline: none; transition: border-color .2s;
}
.proximos-passos-add input:focus { border-color: var(--red); }

.passo-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--gray-100);
  transition: opacity .2s;
}
.passo-feito { opacity: .55; }
.passo-feito .passo-texto { text-decoration: line-through; color: var(--gray-400); }

.passo-check {
  background: none; border: none; cursor: pointer;
  font-size: 18px; padding: 0; flex-shrink: 0; line-height: 1;
  transition: transform .15s;
}
.passo-check:hover { transform: scale(1.15); }

.passo-texto { flex: 1; font-size: 14px; color: var(--gray-900); line-height: 1.4; }

.passo-remover {
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--gray-300); padding: 0 4px;
  transition: color .15s; flex-shrink: 0;
}
.passo-remover:hover { color: var(--red); }

/* Botões de ação do detalhe mais compactos */
.detalhe-acoes { flex-wrap: wrap; }

/* ============ FASE 5 — IA ============ */

/* Header do plano com botão IA */
.plano-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

/* Botão Gerar com IA */
.btn-ia {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(124,58,237,.25);
}

.btn-ia:hover {
  opacity: .92;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124,58,237,.35);
}

.btn-ia:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

/* Loading da IA */
.ia-loading {
  background: linear-gradient(135deg, rgba(124,58,237,.04), rgba(168,85,247,.06));
  border: 1px solid rgba(124,58,237,.15);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 16px;
  text-align: center;
}

.ia-loading p {
  font-size: 13px;
  color: #7c3aed;
  margin-top: 12px;
  font-weight: 500;
}

.ia-loading-bar {
  height: 3px;
  background: rgba(124,58,237,.15);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.ia-loading-bar::after {
  content: '';
  position: absolute;
  top: 0; left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #7c3aed, transparent);
  animation: ia-slide 1.4s ease-in-out infinite;
}

@keyframes ia-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* Preview da sugestão */
.ia-preview {
  background: linear-gradient(135deg, rgba(124,58,237,.03), rgba(168,85,247,.05));
  border: 1.5px solid rgba(124,58,237,.2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.ia-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(124,58,237,.07);
  border-bottom: 1px solid rgba(124,58,237,.1);
  gap: 12px;
  flex-wrap: wrap;
}

.ia-preview-header span {
  font-size: 12px;
  font-weight: 600;
  color: #7c3aed;
}

.ia-preview-acoes {
  display: flex;
  gap: 8px;
}

.ia-preview-texto {
  padding: 16px;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.75;
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
}
