/* ==========================================================================
   MUSICPARTY - DESIGN SYSTEM SAAS ULTRA-ELEGANTE & PROFISSIONAL
   Inspirado no padrão de excelência de interfaces corporativas modernas
   (Stripe, Linear, Raycast e Vercel Dashboard)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Paleta Base - Modo Claro de Alto Padrão */
  --bg-app: #f8fafc;
  --bg-sidebar: #090d16;
  --bg-sidebar-card: rgba(255, 255, 255, 0.04);
  --bg-sidebar-hover: rgba(255, 255, 255, 0.06);
  --border-sidebar: rgba(255, 255, 255, 0.07);
  --text-sidebar: #94a3b8;
  --text-sidebar-bright: #ffffff;
  --text-sidebar-muted: #64748b;

  --bg-surface: #ffffff;
  --bg-surface-raised: #f8fafc;
  --bg-surface-alt: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-card: #eef2f6;
  --border-strong: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Cores de Destaque / Identidade Visual */
  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-emerald-hover: #059669;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;

  /* Cores dos Naipes */
  --color-c: #2563eb;
  --color-eb: #ec4899;
  --color-bb: #0891b2;

  /* Tipografia */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Sombras Suaves e Profissionais (Multi-layer) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.03);

  /* Raios de Curvatura */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Dimensões */
  --sidebar-width: 275px;
  --topbar-height: 72px;
}

/* Modo Escuro Elegante (OLED Deep Slate) */
[data-theme="dark"] {
  --bg-app: #080c14;
  --bg-sidebar: #04070e;
  --bg-sidebar-card: rgba(255, 255, 255, 0.03);
  --bg-sidebar-hover: rgba(255, 255, 255, 0.05);
  --border-sidebar: rgba(255, 255, 255, 0.05);
  
  --bg-surface: #0f172a;
  --bg-surface-raised: #131c31;
  --bg-surface-alt: #1e293b;
  --border-subtle: #1e293b;
  --border-card: rgba(255, 255, 255, 0.06);
  --border-strong: #334155;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 12px 24px -4px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   RESET E BASE GLOBAL
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Layout Principal */
.app-dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   1. SIDEBAR LATERAL PROFISSIONAL
   ========================================================================== */
.sidebar-panel {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-sidebar);
  color: var(--text-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header da Sidebar */
.sidebar-header {
  padding: 1.35rem 1.25rem 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid var(--border-sidebar);
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.sidebar-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.4px;
}

.sidebar-logo-text span {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Card do Administrador */
.sidebar-user-card {
  margin: 1.1rem 1rem 0.6rem 1rem;
  padding: 0.85rem;
  background: var(--bg-sidebar-card);
  border: 1px solid var(--border-sidebar);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.2s ease;
}

.sidebar-user-card:hover {
  background: var(--bg-sidebar-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #ffffff;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.sidebar-user-details {
  overflow: hidden;
}

.sidebar-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.sidebar-user-badges {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}

.sidebar-badge-role {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.sidebar-badge-status {
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Campo de Busca Rápida (Ctrl+K) */
.sidebar-search-box {
  padding: 0.6rem 1rem 0.5rem 1rem;
}

.sidebar-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sidebar-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-sidebar);
  color: #ffffff;
  padding: 0.55rem 2.2rem 0.55rem 2.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  outline: none;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.sidebar-search-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.sidebar-search-icon {
  position: absolute;
  left: 0.7rem;
  font-size: 0.8rem;
  opacity: 0.5;
}

.sidebar-search-kbd {
  position: absolute;
  right: 0.5rem;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-sidebar-muted);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Itens de Navegação */
.sidebar-nav {
  padding: 0.5rem 0.75rem 1.5rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  padding: 0.85rem 0.75rem 0.3rem 0.75rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.62rem 0.85rem;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
}

.sidebar-nav-item:hover {
  background: var(--bg-sidebar-hover);
  color: #ffffff;
}

.sidebar-nav-item.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-weight: 700;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.sidebar-nav-item .nav-icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav-item .nav-text {
  flex: 1;
}

.sidebar-nav-item .nav-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-sidebar);
}

.btn-sidebar-logout {
  width: 100%;
  padding: 0.65rem;
  background: rgba(244, 63, 94, 0.08);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.18);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}

.btn-sidebar-logout:hover {
  background: #f43f5e;
  color: #ffffff;
  border-color: #f43f5e;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
}

.pulse-green-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ==========================================================================
   2. MAIN STAGE & TOPBAR SUPERIOR
   ========================================================================== */
.main-stage {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Topbar Flutuante com Efeito Glassmorphism */
.topbar {
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .topbar {
  background: rgba(15, 23, 42, 0.85);
  border-bottom-color: var(--border-subtle);
}

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

.topbar-greeting {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.topbar-clock-tag {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-mono);
  box-shadow: var(--shadow-xs);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Botões de Ação na Barra Superior */
.btn-topbar-action {
  padding: 0.52rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.btn-topbar-action:hover {
  background: var(--bg-surface-alt);
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-topbar-action.btn-accent-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

.btn-topbar-action.btn-accent-green:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.topbar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.topbar-icon-btn:hover {
  background: var(--bg-surface-alt);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.topbar-icon-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-rose);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
}

/* Área de Conteúdo */
.content-body {
  padding: 2rem;
  flex: 1;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   3. SELETOR DE PERÍODO & CARDS KPIS DE ALTO PADRÃO
   ========================================================================== */
.period-tabs-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.period-pills {
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  gap: 0.25rem;
  box-shadow: var(--shadow-xs);
}

.period-pill-btn {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.period-pill-btn:hover {
  color: var(--text-primary);
}

.period-pill-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

/* Grid de 8 KPIs */
.kpi-grid-saas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.kpi-card-saas {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.kpi-card-saas:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-strong);
}

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

.kpi-card-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.kpi-card-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.kpi-card-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.6px;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

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

.kpi-trend-up {
  color: var(--accent-emerald);
  font-weight: 800;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.kpi-trend-warn {
  color: var(--accent-amber);
  font-weight: 800;
  background: rgba(245, 158, 11, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* ==========================================================================
   4. CARDS CIRCULARES DE NAIPES (ESTILO GESTÃO ESCOLAR)
   ========================================================================== */
.naipes-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.2px;
}

.naipes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.naipe-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem 1.25rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s ease;
}

.naipe-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-strong);
}

.naipe-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.9rem;
  letter-spacing: -0.2px;
}

.circular-progress-wrap {
  position: relative;
  width: 105px;
  height: 105px;
  margin-bottom: 1.1rem;
}

.circular-progress-wrap svg {
  transform: rotate(-90deg);
  width: 105px;
  height: 105px;
}

.circular-bg {
  fill: none;
  stroke: var(--bg-surface-alt);
  stroke-width: 9;
}

.circular-bar {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.circular-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.naipe-details-list {
  width: 100%;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.78rem;
}

.naipe-detail-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.naipe-detail-row strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ==========================================================================
   5. CENTRAL DE AÇÕES E NOTIFICAÇÕES (FEED COM WHATSAPP)
   ========================================================================== */
.actions-feed-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

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

.actions-feed-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.2px;
}

.actions-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.action-row-item {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  transition: all 0.15s ease;
}

.action-row-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.action-row-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 260px;
}

.action-tag-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 5px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.action-tag-orange {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.action-tag-blue {
  background: rgba(2, 132, 199, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.action-tag-green {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.action-row-text {
  font-size: 0.86rem;
  color: var(--text-primary);
}

.action-row-text strong {
  font-weight: 700;
}

.action-row-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Botão Oficial do WhatsApp */
.btn-whatsapp-action {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  border: none;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
  transition: all 0.15s ease;
}

.btn-whatsapp-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.35);
}

.btn-action-sm {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.btn-action-sm:hover {
  background: var(--bg-surface-alt);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-delete-sm {
  background: rgba(244, 63, 94, 0.08);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.18);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-delete-sm:hover {
  background: #f43f5e;
  color: #ffffff;
}

/* ==========================================================================
   6. TABELAS E FORMULÁRIOS
   ========================================================================== */
.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

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

.table-saas th {
  padding: 0.85rem 1rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-raised);
}

.table-saas td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.table-saas tbody tr:hover {
  background: var(--bg-surface-raised);
}

/* Botões de Naipes nas Tabelas */
.btn-pitch-saas {
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-xs);
  font-size: 0.76rem;
  font-weight: 800;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-raised);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pitch-saas.active-c {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.3);
}

.btn-pitch-saas.active-eb {
  background: rgba(236, 72, 153, 0.1);
  color: #db2777;
  border-color: rgba(236, 72, 153, 0.3);
}

.btn-pitch-saas.active-bb {
  background: rgba(6, 182, 212, 0.1);
  color: #0891b2;
  border-color: rgba(6, 182, 212, 0.3);
}

.btn-pitch-saas.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Chips de Gênero */
.genre-chip-saas {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.genre-chip-saas:hover {
  background: var(--bg-surface-alt);
  border-color: var(--border-strong);
}

.genre-chip-saas.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

/* ==========================================================================
   7. MODAIS E TOASTS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  padding: 1.75rem;
}

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  background: #090d16;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid #f43f5e; }
.toast.warning { border-left: 4px solid #f59e0b; }
.toast.info { border-left: 4px solid #0284c7; }

@keyframes slideInToast {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   8. COMPONENTES E RESPONSIVIDADE MOBILE
   ========================================================================== */

/* Backdrop Overlay para Sidebar no Mobile */
.mobile-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Barra de Navegação Inferior para Mobile (Bottom Navigation) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  z-index: 95;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(15, 23, 42, 0.95);
  border-top-color: var(--border-subtle);
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem 0;
  transition: all 0.15s ease;
}

.mobile-nav-icon {
  font-size: 1.25rem;
}

.mobile-nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: -0.1px;
}

.mobile-nav-item.active {
  color: var(--accent-primary);
}

.mobile-nav-item.active .mobile-nav-icon {
  transform: translateY(-2px);
}

/* Regras de Mídia para Tablets e Smartphones */
@media (max-width: 1100px) {
  .kpi-grid-saas {
    grid-template-columns: repeat(2, 1fr);
  }
  .naipes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar-panel {
    transform: translateX(-100%);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  }

  .sidebar-panel.mobile-open {
    transform: translateX(0);
  }

  .main-stage {
    margin-left: 0;
    padding-bottom: 70px; /* Espaço para o bottom nav */
  }

  .topbar {
    padding: 0 1rem;
    height: 62px;
  }

  .topbar-icon-btn.mobile-only {
    display: flex !important;
  }

  .topbar-greeting {
    font-size: 0.98rem;
  }

  .topbar-clock-tag {
    display: none;
  }

  .btn-topbar-action:not(.btn-accent-green) {
    display: none;
  }

  .btn-topbar-action.btn-accent-green {
    padding: 0.45rem 0.75rem;
    font-size: 0.76rem;
  }

  .content-body {
    padding: 1.15rem;
  }

  .kpi-grid-saas {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .naipes-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .period-tabs-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .period-pills {
    width: 100%;
    justify-content: space-between;
  }

  .period-pill-btn {
    flex: 1;
    text-align: center;
    padding: 0.35rem 0.25rem;
    font-size: 0.75rem;
  }

  .actions-feed-card {
    padding: 1.15rem;
  }

  .action-row-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .action-row-right {
    justify-content: flex-end;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .table-card {
    padding: 1.15rem;
  }
}

/* =========================================================================
   MODAL DE UPLOAD E PUBLICAÇÃO INTELIGENTE
   ========================================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

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

.audio-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1.75rem 1rem;
  text-align: center;
  background: var(--bg-surface-raised);
  cursor: pointer;
  transition: all 0.2s ease;
}

.audio-dropzone:hover {
  border-color: var(--accent-primary);
  background: rgba(2, 132, 199, 0.05);
}

/* =========================================================================
   BARRA DE PLAYER GLOBAL FLUTUANTE
   ========================================================================= */
.global-player-bar {
  position: fixed;
  bottom: 0;
  left: 260px;
  right: 0;
  height: 72px;
  background: var(--bg-topbar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  display: none;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 5000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.global-player-bar.active {
  display: flex;
}

@media (max-width: 992px) {
  .global-player-bar {
    left: 0;
    bottom: 64px; /* Acima da mobile bottom nav */
  }
}

.player-progress-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--border-subtle);
  cursor: pointer;
}

.player-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-emerald));
  transition: width 0.1s linear;
}

.btn-pitch-saas {
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-raised);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.btn-pitch-saas.active-c {
  background: rgba(2, 132, 199, 0.12);
  border-color: rgba(2, 132, 199, 0.3);
  color: #0284c7;
}

.btn-pitch-saas.active-eb {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10B981;
}

.btn-pitch-saas.active-bb {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #F59E0B;
}

.btn-pitch-saas.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.genre-chip-saas {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.genre-chip-saas.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

