/**
 * Auditor Silencioso - Design System do Dashboard SaaS
 * Estética Moderna, Fundo Escuro Premium (Linear/Vercel), Tipografia Limpa, Glassmorphism
 */

:root {
  --bg-primary: #090D16;
  --bg-secondary: #0F172A;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --accent-purple: #6366F1;
  --accent-purple-glow: rgba(99, 102, 241, 0.25);
  
  --health-green: #10B981;
  --health-green-glow: rgba(16, 185, 129, 0.2);
  --health-yellow: #F59E0B;
  --health-yellow-glow: rgba(245, 158, 11, 0.2);
  --health-red: #EF4444;
  --health-red-glow: rgba(239, 68, 68, 0.2);

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Scrollbar Customizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Layout Principal */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Superior */
.topbar {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #4F46E5, #06B6D4);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.4);
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #FFFFFF, #94A3B8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #A5B4FC;
  border-radius: var(--radius-full);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Controles Centrais do Topbar */
.topbar-center {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Seletor de Modo Operacional (Pill Toggle) */
.mode-toggle-group {
  background: #0B1120;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.mode-btn.active {
  background: var(--accent-purple);
  color: #FFFFFF;
  box-shadow: 0 0 12px var(--accent-purple-glow);
}

.mode-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Seletor de Empresa (Multiempresa) */
.tenant-selector-wrapper {
  position: relative;
}

.tenant-select {
  background: #0B1120;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A5B4FC' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 2.2rem 0.5rem 2.2rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.tenant-select:hover {
  border-color: #6366F1;
  background-color: #111827;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.tenant-select:focus {
  border-color: #818CF8;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
}

.tenant-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.9rem;
}

/* Controles da Direita */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-action {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-action:hover {
  background: rgba(51, 65, 85, 0.8);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-simulate {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #E9D5FF;
}

.btn-simulate:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(168, 85, 247, 0.35));
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

/* Conteúdo Principal */
.main-content {
  flex: 1;
  padding: 2rem;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* CARD DE SAÚDE DA OPERAÇÃO */
.health-hero-card {
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.health-hero-card.healthy {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.1);
}

.health-hero-card.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.1);
}

.health-hero-card.critical {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.15);
}

.health-info-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.health-indicator-disc {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.health-hero-card.healthy .health-indicator-disc {
  background: var(--health-green-glow);
  border: 2px solid var(--health-green);
  box-shadow: 0 0 20px var(--health-green);
}

.health-hero-card.warning .health-indicator-disc {
  background: var(--health-yellow-glow);
  border: 2px solid var(--health-yellow);
  box-shadow: 0 0 20px var(--health-yellow);
}

.health-hero-card.critical .health-indicator-disc {
  background: var(--health-red-glow);
  border: 2px solid var(--health-red);
  box-shadow: 0 0 25px var(--health-red);
  animation: pulseCritical 1.8s infinite;
}

@keyframes pulseCritical {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.85; }
}

.health-title-group h2 {
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.health-title-group p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-top: 0.2rem;
}

.health-stats-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.health-stat-pill {
  text-align: right;
}

.health-stat-pill .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.health-stat-pill .stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

/* Grade de Métricas KPIs */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(8px);
  transition: transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--bg-card-hover);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.kpi-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.kpi-icon {
  font-size: 1.1rem;
  opacity: 0.8;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #FFFFFF;
  margin-bottom: 0.25rem;
}

.kpi-footer {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.trend-good { color: var(--health-green); font-weight: 600; }
.trend-bad { color: var(--health-red); font-weight: 600; }

/* SEÇÃO DO FUNIL DE LEADS */
.funnel-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title-wrap h3 {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title-wrap p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.funnel-pipeline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.funnel-step {
  flex: 1;
  min-width: 140px;
  background: #0B1120;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  position: relative;
  transition: all 0.2s;
}

.funnel-step.bottleneck {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.05);
}

.funnel-step.bottleneck::before {
  content: "⚠️ Gargalo";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: #EF4444;
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
}

.step-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-count {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #FFFFFF;
}

.funnel-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  opacity: 0.5;
  flex-shrink: 0;
}

/* SEÇÃO DE ALERTAS ATIVOS */
.alerts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

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

.alerts-feed-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.alert-item-card {
  background: #0B1120;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--accent-purple);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.15s ease;
}

.alert-item-card:hover {
  transform: translateX(3px);
}

.alert-item-card.critical {
  border-left-color: var(--health-red);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.08) 0%, #0B1120 100%);
}

.alert-item-card.warning {
  border-left-color: var(--health-yellow);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.06) 0%, #0B1120 100%);
}

.alert-item-card.info {
  border-left-color: #38BDF8;
}

.alert-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.alert-badge-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-sev {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-sev.critical { background: rgba(239, 68, 68, 0.2); color: #FCA5A5; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-sev.warning { background: rgba(245, 158, 11, 0.2); color: #FDE68A; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-sev.info { background: rgba(56, 189, 248, 0.2); color: #BAE6FD; border: 1px solid rgba(56, 189, 248, 0.4); }

.alert-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.alert-title-text {
  font-weight: 800;
  font-size: 1.05rem;
  color: #FFFFFF;
}

.alert-metrics-box {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.alert-action-rec {
  font-size: 0.85rem;
  color: #CBD5E1;
  background: rgba(99, 102, 241, 0.08);
  border-left: 2px solid var(--accent-purple);
  padding: 0.5rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* CELULAR DE PREVIEW DO WHATSAPP NO DASHBOARD */
.phone-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.phone-mockup {
  background: #0B141A;
  border: 2px solid #222E35;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.phone-header {
  background: #202C33;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #2A3942;
}

.phone-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #00A884;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.phone-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #E9EDEF;
}

.phone-user-status {
  font-size: 0.72rem;
  color: #00A884;
}

.phone-chat-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background-image: radial-gradient(#111B21 1px, transparent 1px);
  background-size: 16px 16px;
  overflow-y: auto;
  max-height: 460px;
}

.wa-bubble {
  background: #005C4B;
  color: #E9EDEF;
  padding: 0.75rem 1rem;
  border-radius: 12px 12px 2px 12px;
  max-width: 90%;
  align-self: flex-end;
  font-size: 0.84rem;
  line-height: 1.5;
  white-space: pre-wrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  position: relative;
}

.wa-bubble-time {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: right;
  margin-top: 0.25rem;
}

/* TABELA DE HISTÓRICO DE ALERTAS */
.history-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.data-table th {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.status-tag.open { background: rgba(239, 68, 68, 0.15); color: #FCA5A5; border: 1px solid rgba(239, 68, 68, 0.3); }
.status-tag.tracking { background: rgba(245, 158, 11, 0.15); color: #FDE68A; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-tag.resolved { background: rgba(16, 185, 129, 0.15); color: #6EE7B7; border: 1px solid rgba(16, 185, 129, 0.3); }

/* MODAIS (Configurações e Simulador) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-input, .form-select {
  background: #0B1120;
  border: 1px solid var(--border-subtle);
  color: #FFFFFF;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-purple);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-primary {
  background: var(--accent-purple);
  color: #FFFFFF;
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 0 15px var(--accent-purple-glow);
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #4F46E5;
}

/* Botões do Simulador */
.simulator-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.sim-trigger-btn {
  background: #0B1120;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: all 0.2s;
}

.sim-trigger-btn:hover {
  border-color: var(--accent-purple);
  background: rgba(99, 102, 241, 0.1);
}

.sim-trigger-btn span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ==========================================================================
   License Block Banner & Gestão de Licenças
   ========================================================================== */
.license-block-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(185, 28, 28, 0.25) 100%);
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
  animation: pulseBlock 3s infinite alternate;
}

.license-block-banner.hidden {
  display: none !important;
}

@keyframes pulseBlock {
  0% { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2); }
  100% { box-shadow: 0 4px 30px rgba(239, 68, 68, 0.45); }
}

.block-banner-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.block-banner-info {
  flex-grow: 1;
}

.block-banner-info strong {
  display: block;
  font-size: 1.1rem;
  color: #FCA5A5;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.block-banner-info p {
  font-size: 0.85rem;
  color: #E2E8F0;
  line-height: 1.4;
}

.btn-regularize {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: #FFFFFF !important;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
  transition: transform 0.2s, filter 0.2s;
}

.btn-regularize:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Badges de Licença */
.badge-lic {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-lic.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-lic.trial {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-lic.expiring {
  background: rgba(249, 115, 22, 0.15);
  color: #FB923C;
  border: 1px solid rgba(249, 115, 22, 0.35);
}

.badge-lic.blocked {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Botões de Ação na Tabela de Licenças */
.btn-lic-action {
  background: #0B1120;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-left: 0.3rem;
  transition: all 0.2s;
}

.btn-lic-action:hover {
  border-color: var(--accent-purple);
  background: rgba(99, 102, 241, 0.15);
}

.btn-lic-action.btn-trial:hover {
  border-color: #F59E0B;
  color: #FBBF24;
}

.btn-lic-action.btn-paid:hover {
  border-color: #10B981;
  color: #34D399;
}

.btn-lic-action.btn-block:hover {
  border-color: #EF4444;
  color: #F87171;
}

