/* =============================================
   ALODIGA GROWTH ORCHESTRATOR — STYLE SYSTEM
   Palette: Verde Alodiga + Blanco / Dark mode
   ============================================= */

/* TOKENS — HUBSPOT B2B MODE (Default / Light) */
:root, [data-theme="light"] {
  --hubspot-orange: #ff7a59;
  --hubspot-orange-hover: #e86c4f;
  --hubspot-navy: #33475b;
  --hubspot-navy-hover: #2d3e50;
  --hubspot-teal: #00bda5;
  --hubspot-blue: #00a4bd;
  --hubspot-bg: #f5f8fa;
  --hubspot-border: #dfe3eb;
  
  --bg-page: var(--hubspot-bg);
  --bg-surface: #ffffff; 
  --bg-subtle: #f5f8fa;
  --bg-hover: #eaf0f6;
  
  --border: var(--hubspot-border);
  --border-subtle: #cbd6e2;
  
  --text-primary: var(--hubspot-navy);
  --text-body: #516f90;
  --text-muted: #7c98b6;
  --text-faint: #b0c1d4;
  
  --shadow-color: rgba(51, 71, 91, 0.05); /* very soft */
  --shadow-color-md: rgba(51, 71, 91, 0.08);
  
  /* Semantic Mapping */
  --green-400: var(--hubspot-orange); 
  --green-500: var(--hubspot-orange); 
  --red-500: #f2545b;
  --amber-500: #f5c26b;

  --sidebar-w: 240px;
  --sidebar-w-collapsed: 64px;
  --topbar-h: 60px;
  --radius: 3px; 
  --radius-sm: 2px;
  --shadow: 0 4px 12px var(--shadow-color);
  --shadow-md: 0 8px 24px var(--shadow-color-md);
  
  --transition: 0.2s ease-in-out;
  --glass-blur: none;
  --grid-color: rgba(51, 71, 91, 0.03);
  --text-glow: none; 

  --sidebar-bg: var(--hubspot-navy);
  --topbar-bg: #ffffff; 
}

/* TOKENS — HUBSPOT B2B DARK MODE */
[data-theme="dark"] {
  --bg-page: #1a252f;
  --bg-surface: #2d3e50;
  --bg-subtle: #1a252f;
  --bg-hover: #33475b;
  
  --border: #425b76;
  --border-subtle: #33475b;
  
  --text-primary: #ffffff;
  --text-body: #cbd6e2;
  --text-muted: #7c98b6;
  --text-faint: #516f90;

  --sidebar-bg: #111a22;
  --topbar-bg: #2d3e50;
  --grid-color: rgba(255, 255, 255, 0.02);
  --shadow-color: rgba(0, 0, 0, 0.2);
  --shadow-color-md: rgba(0, 0, 0, 0.4);
}
/* Smooth transition when switching themes */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

body,
.sidebar,
.topbar,
.card,
.stat-card,
.form-input,
.report-kpi,
.risk-item,
.backlog-item,
.agent-item,
.metric-row,
.data-table th,
.toast {
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}

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

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-page);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   SPLASH SCREEN
   ============================================= */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.splash-content {
  text-align: center;
}

.splash-logo {
  margin-bottom: 48px;
}

.alo-icon {
  font-size: 64px;
  animation: floatIcon 2s ease-in-out infinite;
}

.splash-title {
  font-size: 40px;
  font-weight: 800;
  color: var(--green-500);
  letter-spacing: -1px;
  margin-top: 8px;
}

.splash-sub {
  display: block;
  font-size: 16px;
  color: var(--gray-400);
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.splash-loader {
  max-width: 320px;
  margin: 0 auto;
}

.loader-bar {
  height: 4px;
  background: var(--gray-100);
  border-radius: 99px;
  overflow: hidden;
}

.loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green-400), var(--green-600));
  border-radius: 99px;
  transition: width 0.3s ease;
}

.loading-text {
  margin-top: 14px;
  font-size: 13px;
  color: var(--gray-400);
  letter-spacing: 0.5px;
}

@keyframes floatIcon {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* =============================================
   APP LAYOUT
   ============================================= */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: var(--hubspot-navy);
  border-right: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  transition: width var(--transition);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  z-index: 100;
}

.sidebar.collapsed {
  width: var(--sidebar-w-collapsed);
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .sidebar-footer span:not(.status-dot),
.sidebar.collapsed .sidebar-date {
  display: none;
}

.sidebar.collapsed .logo {
  justify-content: center;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px;
}

.sidebar.collapsed .sidebar-toggle {
  transform: rotate(180deg);
}

.sidebar-header {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--gray-100);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  font-size: 26px;
}

.logo-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
  line-height: 1;
}

.logo-tagline {
  display: block;
  font-size: 10px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 10px;
  overflow-y: auto;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-400);
  padding: 8px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  width: auto;
  margin: 2px 12px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  color: #cbd6e2;
  text-align: left;
  transition: all var(--transition);
  position: relative;
}

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

.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-left: 3px solid var(--hubspot-orange);
  box-shadow: none;
}

.nav-item .nav-icon {
  color: inherit;
}

.nav-icon {
  font-size: 17px;
  flex-shrink: 0;
}

.nav-text {
  flex: 1;
  white-space: nowrap;
}

.nav-badge {
  background: var(--hubspot-orange);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
  min-width: 22px;
  text-align: center;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--gray-100);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--green-400);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--green-500);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.sidebar-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(25, 166, 81, 0.4);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(25, 166, 81, 0);
  }
}

/* MARKETING HOTSPOT */
.marketing-hotspot {
  width: 8px;
  height: 8px;
  background: var(--amber-500);
  border-radius: 50%;
  position: absolute;
  top: 8px;
  right: 12px;
  display: block;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
  animation: pulseHotspot 2s infinite ease-in-out;
  cursor: help;
}

@keyframes pulseHotspot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* TOPBAR */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  padding: 6px;
  border-radius: var(--radius-sm);
}

.breadcrumb {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 15px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--green-600);
  background: var(--green-50);
  border: 1px solid var(--green-200);
  padding: 4px 12px;
  border-radius: 99px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--green-500);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.topbar-time {
  font-size: 13px;
  color: var(--gray-400);
  font-variant-numeric: tabular-nums;
}

/* VIEW CONTAINER */
.view-container {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
}

.view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-header {
  margin-bottom: 28px;
}

.view-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.view-sub {
  font-size: 14px;
  color: var(--gray-400);
  margin-top: 4px;
}

/* =============================================
   STAT CARDS
   ============================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card.primary {
  border-color: var(--green-200);
  background: var(--green-50);
}

.stat-icon {
  font-size: 28px;
}

.stat-body {
  flex: 1;
}

.stat-number {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-800);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
  font-weight: 500;
}

.stat-trend {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 99px;
  align-self: flex-start;
}

.stat-trend.up {
  background: #d6f5e3;
  color: var(--green-700);
}

.stat-trend.down {
  background: #fde8e8;
  color: var(--red-500);
}

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.mt-16 {
  margin-top: 20px;
}

.home-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* Agent list */
.agent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.agent-item:hover {
  border-color: var(--green-300);
  background: var(--green-50);
}

.agent-avatar {
  font-size: 22px;
}

.agent-info {
  flex: 1;
}

.agent-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.agent-desc {
  font-size: 12px;
  color: var(--gray-400);
}

.agent-open-btn {
  background: none;
  border: 1px solid var(--green-300);
  color: var(--green-600);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 99px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.agent-open-btn:hover {
  background: var(--green-500);
  color: white;
  border-color: var(--green-500);
}

/* Pipeline */
.pipeline {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 180px;
}

.pipeline-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.pipeline-bar-wrap {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  background: var(--gray-100);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.pipeline-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--green-400), var(--green-600));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.pipeline-arrow {
  color: var(--gray-400);
  font-size: 18px;
  margin-bottom: 36px;
}

.pipeline-count {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-800);
}

.pipeline-label {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
}

/* =============================================
   TWO-COL LAYOUT
   ============================================= */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* form-card inherits .card styles */
.result-card {
  overflow-y: auto;
  max-height: 680px;
}

/* =============================================
   FORMS
   ============================================= */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-surface);
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--hubspot-blue);
  box-shadow: 0 0 0 3px rgba(0, 164, 189, 0.15);
}

textarea.form-input {
  resize: vertical;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  transition: all var(--transition);
}

.radio-label:hover {
  border-color: var(--green-300);
  background: var(--green-50);
}

.radio-label input[type="radio"] {
  accent-color: var(--green-500);
}

.form-range {
  width: 100%;
  accent-color: var(--green-500);
  cursor: pointer;
}

.range-val {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-600);
  margin-left: 8px;
}

/* BUTTONS */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--hubspot-orange);
  color: white;
  border: none;
  cursor: pointer;
  padding: 11px 22px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition);
  width: 100%;
  justify-content: center;
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--hubspot-orange-hover);
  box-shadow: none;
  transform: translateY(0);
}

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

.btn-primary.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  width: auto;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition);
}

.btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--hubspot-orange);
}

.report-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.report-actions .btn-primary {
  width: auto;
}

/* =============================================
   EMPTY STATES
   ============================================= */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
}

.empty-state.full-empty {
  min-height: 300px;
}

.empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 14px;
  max-width: 280px;
  line-height: 1.6;
}

/* =============================================
   AGENT RESULTS
   ============================================= */
.score-display {
  text-align: center;
  padding: 24px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.score-display.hot {
  background: linear-gradient(135deg, #d6f5e3, #aeebc8);
  border: 1px solid var(--green-300);
}

.score-display.warm {
  background: linear-gradient(135deg, #fef9e7, #fef3c7);
  border: 1px solid #f59e0b;
}

.score-display.cold {
  background: linear-gradient(135deg, #fde8e8, #fecaca);
  border: 1px solid #e03a3a;
}

.score-number {
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
}

.score-label {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
}

.score-tag {
  font-size: 13px;
  opacity: 0.7;
  margin-top: 4px;
}

.result-section {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--gray-100);
}

.result-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.result-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 10px;
}

.result-list {
  list-style: none;
}

.result-list li {
  padding: 7px 0;
  font-size: 13px;
  color: var(--gray-600);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.result-list li::before {
  content: '→';
  color: var(--green-500);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  margin-bottom: 6px;
}

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

.metric-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
}

.roi-highlight {
  background: linear-gradient(135deg, var(--green-50), var(--green-100));
  border: 1px solid var(--green-200);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  margin-bottom: 14px;
}

.roi-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--green-700);
  text-transform: uppercase;
}

.roi-number {
  font-size: 36px;
  font-weight: 900;
  color: var(--green-600);
  line-height: 1;
  margin: 6px 0;
}

.roi-sub {
  font-size: 12px;
  color: var(--green-700);
}

.score-bar-row {
  margin-bottom: 10px;
}

.score-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--gray-600);
}

.score-bar-track {
  height: 6px;
  background: var(--gray-100);
  border-radius: 99px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-400), var(--green-600));
  border-radius: 99px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
  margin-bottom: 6px;
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-200);
}

/* =============================================
   DATA TABLE
   ============================================= */
.leads-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--gray-50);
  color: var(--gray-500);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--gray-200);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--green-50);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

.badge-hot {
  background: #d6f5e3;
  color: var(--green-700);
}

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

.badge-cold {
  background: #fde8e8;
  color: #991b1b;
}

.table-action-btn {
  background: none;
  border: 1px solid var(--green-300);
  color: var(--green-600);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.table-action-btn:hover {
  background: var(--green-500);
  color: white;
}

/* BACKLOG */
.backlog-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.backlog-item {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.backlog-priority {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  flex-shrink: 0;
  margin-top: 2px;
}

.priority-p1 {
  background: #fde8e8;
  color: var(--red-500);
}

.priority-p2 {
  background: #fef3c7;
  color: #92400e;
}

.priority-p3 {
  background: #d6f5e3;
  color: var(--green-700);
}

.backlog-content {
  flex: 1;
}

.backlog-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.backlog-meta {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 3px;
}

/* =============================================
   REPORT
   ============================================= */
.report-section {
  margin-bottom: 28px;
}

.report-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green-100);
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.report-kpi {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.report-kpi-number {
  font-size: 28px;
  font-weight: 900;
  color: var(--green-600);
  line-height: 1;
}

.report-kpi-label {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}

.risk-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid;
  margin-bottom: 8px;
  background: var(--gray-50);
}

.risk-high {
  border-color: var(--red-500);
}

.risk-med {
  border-color: var(--amber-500);
}

.risk-low {
  border-color: var(--green-400);
}

.risk-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.risk-text .risk-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.risk-text .risk-desc {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}

.action-plan-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.action-plan-item:last-child {
  border-bottom: none;
}

.action-day {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--green-100), var(--green-200));
  color: var(--green-700);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.2;
}

.action-content .action-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.action-content .action-desc {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}

/* =============================================
   NEXT STEP BANNER
   ============================================= */
.next-step-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--green-50), var(--green-100));
  border: 1px solid var(--green-200);
  border-radius: var(--radius);
  margin-top: 20px;
  gap: 14px;
}

.next-step-banner span {
  font-size: 13px;
  color: var(--green-800);
  flex: 1;
}

/* =============================================
   DARK MODE TOGGLE BUTTON
   ============================================= */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 99px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  flex-shrink: 0;
  transition: all var(--transition);
  line-height: 1;
}

.theme-toggle:hover {
  background: var(--green-50);
  border-color: var(--green-300);
  color: var(--green-600);
  transform: rotate(20deg);
}

/* =============================================
   TOAST
   ============================================= */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  background: var(--text-primary);
  color: var(--bg-surface);
  padding: 12px 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -260px;
    transition: left var(--transition);
  }

  .sidebar.mobile-open {
    left: 0;
    box-shadow: 0 0 0 100vw rgba(0, 0, 0, 0.3);
  }

  .menu-btn {
    display: flex;
  }

  .view-container {
    padding: 20px 16px;
  }

  .report-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .report-actions {
    flex-direction: column;
  }

  .next-step-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =============================================
   LOGIN SCREEN
   ============================================= */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.4s ease;
}

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

.login-logo {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.login-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-800);
}

.login-header p {
  font-size: 14px;
  color: var(--gray-400);
  margin-top: 4px;
}

.login-form .form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.login-form .form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: all var(--transition);
  background: var(--bg-surface);
  color: var(--text-primary);
}

.login-form .form-group input:focus {
  outline: none;
  border-color: var(--green-400);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--green-50);
}

.login-error {
  color: var(--red-500);
  font-size: 13px;
  font-weight: 600;
  margin-top: 16px;
  text-align: center;
}

/* =============================================
   EMAIL MARKETING
   ============================================= */
.email-preview-container {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 300px;
  margin-top: 8px;
  padding: 20px;
  color: var(--text-body);
  overflow-y: auto;
}

[data-theme="dark"] .email-preview-container {
  background: var(--bg-subtle);
  border-color: var(--border);
}

.email-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.history-item {
  background: var(--bg-surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-item .h-to {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.history-item .h-date {
  font-size: 11px;
  color: var(--text-faint);
}

.history-item .h-status {
  font-size: 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* UTILS */
.w-full { width: 100%; }
.my-16 { margin-top: 16px; margin-bottom: 16px; }
.flex-end { display: flex; justify-content: flex-end; }
.mt-16 { margin-top: 16px; }

/* =============================================
   HOTSPOT DESIGNER
   ============================================= */
.hotspot-designer-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: flex-start;
  margin-top: 10px;
}

.designer-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.designer-canvas-wrap {
  flex: 1;
}

.canvas-card {
  padding: 16px !important;
  background: var(--bg-surface);
}

.canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 8px;
}

.canvas-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.designer-canvas {
  position: relative;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #111;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-200);
}

.mockup-img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: filter 0.5s ease, opacity 0.5s ease;
  opacity: 0.8;
}

.designer-canvas.analyzing .mockup-img {
  filter: grayscale(0.2) brightness(0.7) contrast(1.1);
}

.canvas-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: linear-gradient(to bottom, transparent, rgba(0, 166, 81, 0.05) 50%, transparent);
  background-size: 100% 20px;
}

.designer-canvas.analyzing .canvas-overlay {
  opacity: 1;
  animation: scanline 4s linear infinite;
}

@keyframes scanline {
  0% { background-position: 0 -100px; }
  100% { background-position: 0 1000px; }
}

.design-log {
  height: 240px;
  overflow-y: auto;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: 'Inter', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.log-entry {
  margin-bottom: 8px;
  animation: logSlide 0.3s ease-out;
}

@keyframes logSlide {
  from { opacity: 0; transform: translateX(-5px); }
  to { opacity: 1; transform: translateX(0); }
}

.log-time {
  color: var(--green-500);
  font-weight: 700;
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}

.log-empty {
  text-align: center;
  color: var(--text-faint);
  margin-top: 60px;
  font-style: italic;
}

/* Placed Hotspot in Designer */
.placed-hotspot {
  position: absolute;
  z-index: 20;
  animation: hotspotPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes hotspotPop {
  0% { transform: scale(0) rotate(-10deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.hotspot-dot {
  width: 16px;
  height: 16px;
  background: var(--amber-500);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  cursor: help;
  position: relative;
  transition: transform 0.2s ease;
}

.hotspot-dot:hover {
  transform: scale(1.2);
}

.hotspot-dot::before {
  content: '';
  position: absolute;
  inset: -6px;
  border: 2px solid var(--amber-500);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hotspot-tooltip {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green-900);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  width: 220px;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 30;
  text-align: left;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
}

.hotspot-tooltip strong {
  display: block;
  color: var(--green-300);
  margin-bottom: 4px;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.hotspot-dot:hover + .hotspot-tooltip {
  opacity: 1;
  bottom: 34px;
}

.heatmap-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 166, 81, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 4;
  pointer-events: none;
  animation: glowPulse 4s infinite ease-in-out;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 0.8; }
}

/* =============================================
   NEON PURPLE ANIMATED OVERRIDES (Simulation Mode)
   ============================================= */
body {
  font-family: 'Avenir Next', 'Inter', sans-serif !important;
  font-size: 14px !important;
  background: var(--bg-page) !important;
  background-image: 
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px) !important;
  background-size: 40px 40px !important;
  background-attachment: fixed;
  color: var(--text-primary) !important;
}
h1, h2, h3, .card-title, .stat-number, .logo-name {
  font-family: 'Avenir Next', 'Inter', sans-serif !important;
  color: var(--text-primary) !important;
  text-shadow: none !important;
}
.sidebar, .card, .stat-card, .login-card, .toast {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: var(--radius) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  background: var(--bg-surface) !important;
  animation: none !important;
}
@keyframes breathe {
  0% {}
  100% {}
}
.topbar {
  background: var(--topbar-bg) !important;
  border-bottom: 1px solid var(--border) !important;
}
.sidebar {
  background: var(--sidebar-bg) !important;
  border-right: 1px solid var(--border) !important;
}
.sidebar .nav-text {
  color: #dfe3eb !important;
}
.sidebar .nav-item { color: #cbd6e2 !important; }
.sidebar .nav-item:hover {
  background: rgba(255,255,255,0.05) !important;
  color: #ffffff !important;
}
.sidebar .nav-item.active {
  background: rgba(255, 122, 89, 0.1) !important;
  color: var(--hubspot-orange) !important;
  border-left: 3px solid var(--hubspot-orange);
  border-radius: 0; box-shadow: none !important;
}
.btn-primary {
  background: var(--hubspot-orange) !important;
  color: white !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  border: 1px solid var(--hubspot-orange) !important;
  box-shadow: 0 2px 4px rgba(255, 122, 89, 0.2) !important;
  border-radius: 3px !important;
  transition: all 0.2s ease !important;
}
.btn-primary:hover {
  background: var(--hubspot-orange-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 122, 89, 0.3) !important;
  color: white !important;
}
.form-input {
  background: var(--bg-page) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: 3px !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02) !important;
}
.form-input:focus {
  border-color: var(--hubspot-blue) !important;
  box-shadow: 0 0 0 2px rgba(0, 164, 189, 0.2) !important;
}
.data-table th {
  background: var(--bg-page) !important;
  color: var(--text-body) !important;
  border-bottom: 2px solid var(--border-subtle) !important;
  text-shadow: none !important;
  font-weight: 600;
}
.data-table td {
  color: var(--text-primary) !important;
}
.pulse-dot { display: inline-block; background: var(--hubspot-teal); box-shadow: none; animation: none;}

/* Live Posts Feed Animations */
.live-posts-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow: hidden;
}
.post-item {
  background: rgba(184, 41, 255, 0.05);
  border-left: 4px solid var(--green-400);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideInNeon 0.5s cubic-bezier(0.1, 0.7, 0.1, 1) forwards;
  box-shadow: 0 0 10px rgba(184, 41, 255, 0.1);
  transform-origin: top;
}
@keyframes slideInNeon {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); filter: brightness(2); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1); }
}
.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.post-author {
  font-weight: 700;
  color: var(--green-400);
  font-size: 13px;
  text-transform: uppercase;
}
.post-time {
  font-size: 11px;
  color: var(--green-500);
}
.post-content {
  font-size: 14px;
  color: var(--text-primary);
  font-style: italic;
  border-bottom: 1px solid rgba(184, 41, 255, 0.1);
  padding-bottom: 8px;
}
.post-footer {
  display: flex;
  gap: 10px;
  font-size: 12px;
  align-items: center;
}
.post-rating {
  background: rgba(0, 255, 204, 0.1);
  color: #00ffcc;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #00ffcc;
  font-weight: bold;
}
.post-feedback {
  color: #ffb800;
  font-weight: 600;
  text-shadow: 0 0 5px rgba(255, 184, 0, 0.3);
}

/* =============================================
   LANDING PAGE (MARKETING + LOGIN)
   ============================================= */
.landing-wrapper {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100vh;
  z-index: 1000;
  display: flex; flex-direction: column;
  background: var(--hubspot-bg);
  overflow-y: auto;
  overflow-x: hidden;
}

.landing-wrapper.hidden {
  display: none !important;
}

.landing-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 60px;
  background: #ffffff;
  border-bottom: 1px solid #dfe3eb;
  position: sticky; top:0; z-index: 50;
}

.l-logo { display:flex; align-items:center; gap: 12px; }
.l-icon { font-size: 28px; color: var(--hubspot-orange); }
.l-text { font-size: 20px; font-weight: 700; color: var(--text-primary); }

.landing-hero {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 60px; gap: 60px; max-width: 1400px; margin: 0 auto;
}

.l-hero-left { flex: 1.2; }
.l-hero-right { flex: 0.8; display:flex; justify-content:flex-end; }

.hero-badge {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255, 122, 89, 0.1);
  border: 1px solid var(--hubspot-orange);
  color: var(--hubspot-orange);
  border-radius: 4px;
  font-weight: 600; font-size: 13px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 48px; font-weight: 700; line-height: 1.1;
  color: var(--text-primary) !important; margin-bottom: 24px; letter-spacing: -1px;
}
.glow-text {
  color: var(--hubspot-orange) !important;
  text-shadow: none !important;
}

.hero-subtitle {
  font-size: 18px; color: var(--text-body); line-height: 1.6;
  margin-bottom: 40px; max-width: 90%;
}

.l-features-list { display: flex; flex-direction: column; gap: 16px; }
.l-feat-item {
  display: flex; align-items: flex-start; gap: 16px;
  background: #ffffff;
  padding: 16px 20px; border-radius: 4px;
  border: 1px solid #dfe3eb;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.l-feat-item:hover {
  transform: translateY(-2px);
  border-color: var(--hubspot-orange);
  box-shadow: 0 4px 12px rgba(51, 71, 91, 0.08); /* HubSpot shadow */
}

.l-feat-icon { font-size: 24px; }
.l-feat-text { color: var(--text-body); font-size: 15px; line-height: 1.5; }
.l-feat-text strong { color: var(--text-primary); font-weight: 600;}

.landing-login-box {
  width: 100%; max-width: 420px;
  background: #ffffff;
  border-radius: 4px; border: 1px solid #dfe3eb;
  padding: 40px;
  box-shadow: 0 8px 24px rgba(51, 71, 91, 0.1), 0 0 1px rgba(51, 71, 91, 0.2);
  animation: none !important; /* No float */
}

@keyframes floatLogin {
  0%, 100% { }
}

@media (max-width: 992px) {
  .landing-hero { flex-direction: column; padding: 40px 20px; }
  .l-hero-right { justify-content: center; width: 100%; margin-top:40px; }
  .landing-nav { padding: 20px; }
  .hero-title { font-size: 36px; }
}
/* =============================================
   SWITCH TOGGLE (SALIR DE DEMO)
   ============================================= */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd6e2;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: #ff4d4f;
}

input:focus + .slider {
  box-shadow: 0 0 1px #ff4d4f;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}
