/* CSS Custom Properties */
:root {
  --bg-body: #080a0f;
  --bg-sidebar: rgba(10, 14, 23, 0.95);
  --bg-stat: rgba(18, 24, 38, 0.6);
  --bg-card: rgba(15, 21, 34, 0.55);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-input: rgba(30, 41, 59, 0.3);
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-rgb: 99, 102, 241;
  --success: #10b981;
  --success-light: #34d399;
  --success-dark: #059669;
  --success-rgb: 16, 185, 129;
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --warning-rgb: 245, 158, 11;
  --danger: #ef4444;
  --danger-light: #f87171;
  --danger-rgb: 239, 68, 68;
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --text: #f3f4f6;
  --text-secondary: #e5e7eb;
  --text-muted: #9ca3af;
  --text-muted-dark: #8b929a;
  --text-muted-darker: #6b7280;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-medium: rgba(255, 255, 255, 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;
}

/* General Theme Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-body);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #080a0f;
}

::-webkit-scrollbar-thumb {
  background: #1f293d;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #374151;
}

/* Glow Background Spots */
.glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.glow-spot {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary) 0%, rgba(99,102,241,0) 70%);
  top: -100px;
  right: -50px;
  animation: floatGlow 8s ease-in-out infinite alternate;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--success) 0%, rgba(16,185,129,0) 70%);
  bottom: -150px;
  left: -100px;
  animation: floatGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); opacity: 0.12; }
  100% { transform: translate(30px, -30px) scale(1.1); opacity: 0.18; }
}

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

/* Sidebar Styling */
.sidebar {
  width: 270px;
  background: rgba(10, 14, 23, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1.2rem;
  flex-shrink: 0;
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  margin-bottom: 2.5rem;
  text-align: center;
  padding: 0.5rem 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

/* Logo Tricapi (imagen). El badge es blanco ÃƒÂ¢Ã¢â‚¬Â Ã¢â‚¬â„¢ se ve sobre el sidebar oscuro. */
.brand-logo-img {
  width: 76px;
  height: auto;
  display: block;
  object-fit: contain;
}

.brand-logo i {
  font-size: 1.8rem;
}

.logo-wa {
  color: var(--success);
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
}

.logo-meta {
  color: #0064e0;
  filter: drop-shadow(0 0 8px rgba(0, 100, 224, 0.4));
}

.logo-plus {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-muted);
}

.sidebar-brand h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-status.online .dot {
  width: 6px;
  height: 6px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--success); }
  50% { opacity: 0.7; box-shadow: 0 0 12px var(--success); }
}

/* Sidebar Credit Balance */
.sidebar-balance {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  margin-bottom: 0.5rem;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.12);
  border-radius: 8px;
}
.sidebar-balance .balance-icon {
  color: var(--warning-light);
  font-size: 1rem;
}
.sidebar-balance .balance-info {
  flex-grow: 1;
}
.sidebar-balance .balance-label {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sidebar-balance .balance-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--warning-light);
}

/* Credits Page */
.credits-header {
  margin-bottom: 1.5rem;
}
.credits-balance-card {
  background: linear-gradient(135deg, rgba(251,191,36,0.1) 0%, rgba(217,119,6,0.03) 100%);
  border: 1.5px solid rgba(251,191,36,0.15);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  max-width: 520px;
  position: relative;
  overflow: hidden;
}
.credits-balance-card::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(251,191,36,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.credits-balance-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.15rem;
  font-weight: 500;
}
.credits-balance-label i {
  margin-right: 0.35rem;
}
.credits-balance-amount {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--warning-light);
  line-height: 1.1;
  letter-spacing: -1px;
}
.credits-stats-row {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.credits-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.credits-stat-label {
  font-size: 0.65rem;
  color: var(--text-muted-dark);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}
.credits-stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: -0.3px;
}

.credits-info-line {
  font-size: 0.78rem;
  color: var(--text-muted-dark);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  max-width: 600px;
}
.credits-info-line strong {
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s;
}
.credits-info-line strong:hover {
  color: var(--success);
}

/* Welcome Banner */
.welcome-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(16,185,129,0.10) 0%, rgba(5,150,105,0.04) 100%);
  border: 1.5px solid rgba(16,185,129,0.20);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 0 0 1px rgba(16,185,129,0.05), 0 4px 20px rgba(16,185,129,0.06);
}
.welcome-banner-left {
  flex: 1;
}
.welcome-banner-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  color: #ecfdf5;
  background: linear-gradient(135deg, var(--success), var(--success-dark));
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.3rem 1rem;
  border-radius: 100px;
  margin-bottom: 0.6rem;
  box-shadow: 0 2px 16px rgba(16,185,129,0.25);
}
.welcome-banner-quote {
  font-size: 0.9rem;
  color: #d1d5db;
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 0.35rem;
}
.welcome-banner-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.welcome-banner-detail strong {
  color: var(--success-light);
  font-weight: 700;
}
.welcome-banner-right {
  text-align: right;
  flex-shrink: 0;
}
.welcome-banner-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--success-light);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.welcome-banner-currency {
  font-size: 0.85rem;
  font-weight: 700;
  color: #6ee7b7;
}
.plan-currency {
  font-size: 0.62rem;
  font-weight: 700;
  color: #6ee7b7;
  vertical-align: middle;
}
.welcome-banner-unit {
  font-size: 0.75rem;
  color: var(--text-muted-dark);
  margin: 0.1rem 0 0.3rem 0;
}
.welcome-banner-off-chip {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f97316, var(--danger));
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.4rem;
  letter-spacing: 0.3px;
}
.welcome-banner-savings {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--success);
  background: rgba(16,185,129,0.12);
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  margin-bottom: 0.6rem;
}
.welcome-banner-btn {
  padding: 0.55rem 1.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 100px;
}

@media (max-width: 820px) {
  .welcome-banner {
    flex-direction: column;
    text-align: center;
  }
  .welcome-banner-right {
    text-align: center;
  }
}

/* Credits Plans */
.credits-plans-section {
  margin-bottom: 2rem;
}
.credits-plans-header {
  margin-bottom: 1rem;
}
.credits-plans-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0;
  letter-spacing: -0.3px;
}

.plans-carousel-wrapper {
  position: relative;
}
.plans-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  justify-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
}

/* Plan Card */
.plan-card {
  display: flex;
  flex-direction: column;
  background: rgba(75,85,99,0.06);
  border: 1px solid rgba(75,85,99,0.15);
  border-radius: 14px;
  padding: 1.2rem 1.15rem;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 245px;
  width: 100%;
}
.plan-card:hover {
  border-color: rgba(107,114,128,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.plan-card.plan-bonus {
  border-color: rgba(75,85,99,0.15);
  background: rgba(75,85,99,0.06);
}
.plan-card.plan-bonus:hover {
  border-color: rgba(107,114,128,0.3);
}
.plan-card.plan-test {
  border-color: rgba(59,130,246,0.25);
  background: rgba(59,130,246,0.03);
}
.plan-card.plan-contact-card {
  border: 1.5px dashed rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.01);
  min-height: 245px;
  justify-content: center;
  align-items: center;
}
.plan-card.plan-contact-card:hover {
  border-color: rgba(37,211,102,0.25);
  background: rgba(37,211,102,0.02);
}
.plan-test-chip {
  background: linear-gradient(135deg, var(--purple), #3b82f6) !important;
}

.plan-chips-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  min-height: 1.2rem;
}
.plan-chips-row .plan-bonus-chip {
  margin-bottom: 0;
}
.plan-off-chip {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f97316, var(--danger));
  padding: 0.1rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.plan-featured-container {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.plan-featured-container .plan-card.plan-featured {
  border-color: rgba(245,158,11,0.2);
  background: linear-gradient(135deg, rgba(245,158,11,0.04) 0%, rgba(245,158,11,0.01) 100%);
  box-shadow: 0 0 0 1px rgba(245,158,11,0.08);
  min-height: 240px;
  flex-grow: 1;
}
.plan-featured-container .plan-card.plan-featured:hover {
  border-color: rgba(245,158,11,0.35);
  box-shadow: 0 0 0 1px rgba(245,158,11,0.15), 0 8px 24px rgba(0,0,0,0.2);
}
.plan-featured-label {
  position: absolute;
  top: -1.3rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 700;
  color: #d97706;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  padding: 0.15rem 0.7rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  z-index: 2;
}

.plan-bonus-chip {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--success);
  background: rgba(16,185,129,0.12);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  align-self: flex-start;
}

.plan-card-top {
  margin-bottom: 0.5rem;
}
.plan-credits {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.plan-credits-plus {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--success);
}
.plan-unit-label {
  font-size: 0.68rem;
  color: var(--text-muted-dark);
  margin-top: -0.05rem;
}

.plan-card-divider {
  height: 1px;
  background: rgba(255,255,255,0.05);
  margin-bottom: 0.6rem;
}

.plan-card-bottom {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.plan-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--success-light);
  line-height: 1.1;
}
.plan-perunit {
  font-size: 0.62rem;
  color: var(--text-muted-dark);
}
.plan-total-full {
  font-size: 0.68rem;
  color: var(--text-muted-dark);
}
.plan-savings {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--success-light);
}
.plan-btn {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  margin-top: auto;
}

.credit-assign-input {
  width: 80px;
  padding: 0.3rem 0.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
}
.credit-assign-input:focus {
  outline: none;
  border-color: var(--primary);
}

.credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(251,191,36,0.08);
  color: var(--warning-light);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}
.credit-badge i {
  font-size: 0.65rem;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex-grow: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease-in-out;
  position: relative;
}

.menu-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

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

.menu-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
  color: var(--primary-light);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}

.menu-item[data-tab="docs"] {
  color: #6ee7b7;
}
.menu-item[data-tab="docs"]:hover,
.menu-item[data-tab="docs"].active {
  color: var(--success);
}
.menu-item[data-tab="docs"].active {
  background: rgba(16,185,129,0.08);
  box-shadow: inset 3px 0 0 var(--success);
}

.menu-logout {
  margin-top: auto;
  color: var(--danger) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.2rem;
  margin-top: 1.5rem;
  border-radius: 0;
}

.menu-logout:hover {
  background: rgba(239, 68, 68, 0.05) !important;
  color: #f87171 !important;
}

.sidebar-footer {
  font-size: 0.7rem;
  color: var(--text-muted-darker);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.2rem;
  margin-top: 1rem;
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  padding: 2rem 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: calc(100% - 270px);
  overflow-y: auto;
}

.content-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.content-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.2rem;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content-header p {
  font-size: 0.9rem;
}

.text-muted {
  color: var(--text-muted);
}

.text-hint {
  font-size: 0.8rem;
  color: var(--text-muted-dark);
}

/* Tabs Toggle */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease-out forwards;
}

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

/* Stats Grid & Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: rgba(18, 24, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 1.3rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(16px);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease, box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.12);
}

.stat-card:hover .stat-icon {
  transform: scale(1.06) translateY(-2px);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.stat-card:hover .stat-info {
  transform: translateX(2px);
}

/* Custom glows per card type on hover */
.stat-card-visitas:hover { border-color: rgba(129, 140, 248, 0.3) !important; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 6px 16px rgba(129, 140, 248, 0.08) !important; }
.stat-card-clicks:hover { border-color: rgba(59, 130, 246, 0.3) !important; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 6px 16px rgba(59, 130, 246, 0.08) !important; }
.stat-card-chats:hover { border-color: rgba(52, 211, 153, 0.3) !important; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 6px 16px rgba(52, 211, 153, 0.08) !important; }
.stat-card-buyers:hover { border-color: rgba(167, 139, 250, 0.3) !important; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 6px 16px rgba(167, 139, 250, 0.08) !important; }
.stat-card-conversion:hover { border-color: rgba(251, 191, 36, 0.3) !important; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 6px 16px rgba(251, 191, 36, 0.08) !important; }
.stat-card-buy:hover { border-color: rgba(251, 146, 60, 0.3) !important; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 6px 16px rgba(251, 146, 60, 0.08) !important; }
.stat-card-recaudado:hover { border-color: rgba(16, 185, 129, 0.4) !important; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 6px 20px rgba(16, 185, 129, 0.12) !important; }

/* Progress/Accent Bar at the bottom of each stat-card */
.stat-card-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  opacity: 0.3;
  transition: opacity 0.25s ease, height 0.25s ease;
}
.stat-card:hover .stat-card-progress {
  opacity: 0.8;
  height: 4px;
}
.progress-visitas { background: linear-gradient(90deg, var(--primary-light), transparent); }
.progress-clicks { background: linear-gradient(90deg, #3b82f6, transparent); }
.progress-chats { background: linear-gradient(90deg, var(--success-light), transparent); }
.progress-buyers { background: linear-gradient(90deg, var(--purple-light), transparent); }
.progress-conversion { background: linear-gradient(90deg, var(--warning-light), transparent); }
.progress-buy { background: linear-gradient(90deg, #fb923c, transparent); }
.progress-recaudado { background: linear-gradient(90deg, var(--success), var(--success-light)); }

.stat-info {
  flex: 1;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.3s ease;
}

.stat-icon.visitas {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
  color: var(--primary-light);
}

.stat-icon.conversiones {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
  color: var(--success-light);
}

.stat-icon.triangulado {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
  color: var(--purple-light);
}

.stat-icon.tasa {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
  color: var(--warning-light);
}

.stat-icon.clicks {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
  color: var(--primary-light);
}

.stat-icon.fuga {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
  color: var(--danger);
}

.stat-card-leak {
  border-color: rgba(239, 68, 68, 0.12) !important;
}

.stat-card-conv {
  border-color: rgba(16, 185, 129, 0.12) !important;
}

.stat-value-danger {
  color: var(--danger) !important;
}

.stat-value-green {
  color: var(--success) !important;
}

.stat-info h3 {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.stat-desc {
  font-size: 0.7rem;
  color: var(--text-muted-dark);
  display: block;
  margin-top: 0.15rem;
}

/* Cards (Generic Container) */
.details-card {
  background: rgba(15, 21, 34, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.details-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.details-card.card-glow-indigo {
  border-top: 2.5px solid var(--primary);
}

.details-card.card-glow-green {
  border-top: 2.5px solid var(--success);
}

.details-card.card-glow-purple {
  border-top: 2.5px solid var(--purple);
}

.details-card.card-glow-warning {
  border-top: 2.5px solid var(--warning);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.card-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header h2 i {
  font-size: 1rem;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(15,21,34,0.95) 0%, transparent 16px) left,
    linear-gradient(90deg, transparent calc(100% - 16px), rgba(15,21,34,0.95) 100%) right;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-attachment: local, local, scroll, scroll;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.25rem;
  padding: 0.4rem 0.5rem 0.1rem;
}

.pagination-controls .page-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 4.5rem;
  text-align: center;
  font-weight: 500;
}

.pagination-controls .btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-pagination {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: #cbd5e1;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
}

.btn-pagination:hover:not(:disabled):not(.active) {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

.btn-pagination.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

.btn-pagination:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.search-input-wrapper {
  position: relative;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.data-table th {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.data-table td {
  padding: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
  color: var(--text-secondary);
  word-break: break-word;
  overflow-wrap: anywhere;
}

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

.data-table tr {
  transition: background-color 0.2s ease;
}
.data-table tr td {
  transition: background-color 0.2s ease, color 0.15s ease;
}
.data-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.045);
}

/* Dashboard Toolbar */
.dash-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dash-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.dash-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.dash-date-presets {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.dash-date-range {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Dashboard Layout Fixes */
.dashboard-details {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

.details-card-wide {
  grid-column: 1 / -1;
}

@media (min-width: 1025px) {
  .dashboard-details {
    grid-template-columns: 1.6fr 1fr;
  }
  .details-card-wide {
    grid-column: 1;
  }
  .details-card-narrow {
    grid-column: 2;
  }
}

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

.card-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Stat Card Variants */
.stat-card-green {
  border-color: rgba(16, 185, 129, 0.15) !important;
}

/* New Stat Icons */
.stat-icon.revenue {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
  color: var(--success-light);
}

/* Cell Styles for Campaigns Table */
.cell-revenue {
  font-weight: 700;
  color: var(--success-light);
  font-size: 0.85rem;
}

.cell-rate {
  color: var(--warning);
}

.cell-muted {
  color: var(--text-muted-darker);
  font-style: italic;
  font-size: 0.8rem;
}

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

.py-4 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #d1d5db;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: rgba(30, 41, 59, 0.5);
}

.form-control::placeholder {
  color: var(--text-muted-darker);
}

select.form-control option {
  background-color: #0f172a;
  color: #ffffff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.3rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  letter-spacing: 0.2px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #d1d5db;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

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

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  box-shadow: none !important;
  cursor: not-allowed;
  transform: none !important;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-light);
  border-color: rgba(16, 185, 129, 0.2);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning-light);
  border-color: rgba(245, 158, 11, 0.2);
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}

.badge-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.2);
}

/* Meta (Pixel + CAPI) connection tags for lines */
.badge-meta-on {
  background-color: rgba(24, 119, 242, 0.12);
  color: #4599ff;
  border-color: rgba(24, 119, 242, 0.28);
}

.badge-meta-off {
  background-color: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.22);
}

.badge-purple {
  background-color: rgba(139, 92, 246, 0.1);
  color: var(--purple-light);
  border-color: rgba(139, 92, 246, 0.22);
}

.badge-whatsapp {
  background-color: rgba(37, 211, 102, 0.12);
  color: var(--success-light);
  border-color: rgba(37, 211, 102, 0.28);
}

/* Charts Layout */
.dashboard-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
  .dashboard-charts {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 1200px) {
  .dashboard-charts {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.chart-card {
  min-height: 0;
}

.chart-body {
  height: 240px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chart-body canvas {
  max-height: 100%;
  max-width: 100%;
}

/* Dashboard Details Layout */
.dashboard-details {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

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

.success-glow {
  animation: pulseGreen 2s infinite alternate;
}

@keyframes pulseGreen {
  from {
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.4));
  }
  to {
    filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.7));
  }
}

/* ====================================================
   VINCULAR CELULAR ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â Connection Console Styles
   ==================================================== */

/* QR Code Box */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.qr-instructions {
  display: flex;
  text-align: left;
  max-width: 500px;
  margin-bottom: 1.5rem;
  gap: 0.75rem;
  align-items: flex-start;
}
.qr-instructions i {
  font-size: 1.35rem;
  margin-top: 2px;
  flex-shrink: 0;
  color: #a5b4fc;
}
.qr-instructions strong { color: #e0e7ff; }
.qr-instructions ol {
  margin: 0.4rem 0 0 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}
.qr-instructions ol li::marker { color: var(--primary); font-weight: 700; }
.qr-wrapper {
  background: linear-gradient(135deg, #ffffff, var(--text));
  padding: 1.5rem;
  display: inline-block;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08);
  position: relative;
  animation: qrGlow 3s ease-in-out infinite;
}
@keyframes qrGlow {
  0%, 100% { box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08); }
  50% { box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(99,102,241,0.3), 0 0 60px rgba(99,102,241,0.08); }
}
.qr-wrapper img {
  width: 250px;
  height: 250px;
  display: block;
  border-radius: 8px;
}
.qr-refresh-text {
  color: var(--text-muted-dark);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}
.qr-refresh-text i { color: var(--primary); }
.qr-credit-note {
  color: var(--warning-light);
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  line-height: 1.5;
  max-width: 460px;
  margin-top: -0.5rem;
  text-align: center;
}
.qr-credit-note i { margin-right: 0.3rem; }

/* Connection States */
.connection-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 0;
}

/* Loading Pulse */
.loading-pulse {
  animation: loadingPulse 1.5s ease-in-out infinite;
}
@keyframes loadingPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* Connecting Spinner */
.connecting-spinner {
  animation: spin 1.2s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Connected Checkmark Animation */
.connected-icon {
  font-size: 4rem;
  color: var(--success);
  text-shadow: 0 0 20px rgba(16,185,129,0.3);
  animation: connectedPop 0.5s ease-out, pulseGreen 2s ease-in-out 0.5s infinite;
}
@keyframes connectedPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}
.connected-info-grid {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  max-width: 480px;
  width: 100%;
  margin: 1.5rem auto;
  text-align: left;
}
.connected-info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.connected-info-row:last-child { border-bottom: none; }
.connected-info-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.connected-info-value {
  font-weight: 600;
  color: #ffffff;
}
.connected-info-value.phone { color: var(--success-light); font-family: monospace; }

/* Error State */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 0;
}
.error-icon {
  font-size: 3rem;
  color: var(--danger);
  animation: errorShake 0.5s ease-out;
}
@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.error-title {
  color: var(--danger);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0;
}
.error-message {
  color: #fca5a5;
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}

/* No Lines State */
.no-lines-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 0;
}
.no-lines-icon {
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.4;
  margin-bottom: 0.5rem;
}

/* Sandbox split layout */
.sandbox-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .sandbox-split {
    grid-template-columns: 1fr;
  }
}

.step-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: white;
  padding: 0.25rem 0.9rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 0.8rem;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.step-badge.badge-green {
  background: linear-gradient(135deg, var(--success), var(--success-dark));
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

/* Result box styles */
.sim-result-box {
  margin-top: 1.5rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.2rem;
  animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sim-result-box h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.text-indigo {
  color: #a5b4fc;
}

.result-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 0.5rem;
}

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

.result-item .label {
  color: var(--text-muted);
}

.result-item .value {
  color: #ffffff;
  font-weight: 500;
  max-width: 60%;
}

.code-badge {
  background-color: rgba(99, 102, 241, 0.12);
  color: var(--primary-light);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.highlight {
  color: var(--success) !important;
  font-weight: 700 !important;
}

.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.font-mono {
  font-family: 'Courier New', Courier, monospace;
}

/* Phone Mockup */
.phone-mockup {
  margin: 1.5rem auto 0;
  width: 220px;
  background: #1e293b;
  border: 6px solid #0f172a;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.phone-screen {
  background-color: #0f172a;
  height: 240px;
  display: flex;
  flex-direction: column;
}

.phone-header {
  background: #0f172a;
  padding: 0.4rem 0.8rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: #475569;
}

.phone-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 0.8rem;
  justify-content: center;
}

.phone-url {
  font-size: 0.55rem;
  text-align: center;
  color: #64748b;
  background: #1e293b;
  padding: 0.2rem 0.5rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.phone-landing {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 0.8rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.phone-landing h3 {
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: #ffffff;
}

.phone-landing p {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.phone-wa-btn {
  background-color: var(--success);
  color: white;
  text-decoration: none;
  font-size: 0.7rem;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.phone-caption {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.8rem;
}

/* Alert styles */
.alert {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.2rem;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  font-size: 0.85rem;
  line-height: 1.4;
  border: 1px solid transparent;
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.08);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.15);
}

.alert-info i {
  color: #60a5fa;
  font-size: 1.1rem;
  margin-top: 0.1rem;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.08);
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.15);
}

.alert-success i {
  color: var(--success-light);
  font-size: 1.1rem;
  margin-top: 0.1rem;
}

/* Integration tab */
.integration-hero {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}
.integration-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.4rem;
  color: #fff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}
.integration-hero h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.integration-hero p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

.integration-step {
  margin-bottom: 1rem;
}

/* Line selector grid */
.integration-line-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.5rem;
}

.integration-line-btn {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  background: rgba(30, 41, 59, 0.6);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.integration-line-btn::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid #475569;
  transition: all 0.2s;
}
.integration-line-btn.btn-selected::before {
  content: '✓';
  width: auto;
  height: auto;
  border: none;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}
.integration-line-btn:hover {
  background: #334155;
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.12);
}
.integration-line-btn.btn-selected {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.3);
}
.integration-line-btn.btn-selected:hover {
  background: rgba(99, 102, 241, 0.25);
}

/* Code box */
.integration-code-box {
  margin-top: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: #090d16;
  overflow: hidden;
}
.integration-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.75rem;
  color: var(--text-muted-dark);
}
.integration-code-header button {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 6px;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.integration-code-header button:hover {
  background: rgba(99, 102, 241, 0.28);
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.5);
}
.integration-code-pre {
  padding: 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--success-light);
  overflow-x: auto;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre;
  margin: 0;
}

/* Info section */
.integration-info {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(13, 17, 26, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}
.integration-info h4 {
  font-size: 0.9rem;
  color: #d1d5db;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.integration-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) {
  .integration-info-grid {
    grid-template-columns: 1fr;
  }
}
.integration-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}
.integration-info-item .info-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  margin-bottom: 4px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
}
.integration-info-item strong {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.integration-info-item span {
  font-size: 0.78rem;
  color: var(--text-muted-dark);
  line-height: 1.4;
}
.integration-info-item code {
  color: #a5b4fc;
  font-family: monospace;
  font-size: 0.75rem;
}

/* Payload inspector */
.payload-inspector {
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background-color: #090d16;
  overflow: hidden;
}

.payload-header {
  background-color: rgba(255, 255, 255, 0.02);
  padding: 0.4rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.code-pre {
  padding: 0.8rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  color: var(--success-light);
  overflow-x: auto;
  max-height: 180px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Recent Leads List Dashboard */
.recent-leads-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.lead-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.lead-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(99, 102, 241, 0.15);
  transform: translateY(-1px);
}

.lead-user {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.lead-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.lead-meta-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
}

.lead-meta-info span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.lead-attribution {
  text-align: right;
}

.lead-campaign {
  font-size: 0.8rem;
  font-weight: 500;
  color: #a5b4fc;
}

.lead-time {
  font-size: 0.7rem;
  color: var(--text-muted-dark);
}

.hidden {
  display: none !important;
}

.mt-4 {
  margin-top: 1.5rem;
}
.mt-5 {
  margin-top: 2rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.my-3 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.flex-row {
  display: flex;
  align-items: center;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1.5rem;
}

/* Integration Instructions */
.instructions-list {
  padding-left: 1.5rem;
  margin-top: 1rem;
}

.instructions-list li {
  margin-bottom: 0.7rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.instructions-list strong {
  color: #ffffff;
}

/* Platform tabs in tutorial */
.platform-tabs {
  margin-top: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
}
.platform-tab-header {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}
.platform-tab-btn {
  padding: 0.45rem 1rem;
  font-size: 0.78rem;
  font-family: inherit;
  background: transparent;
  color: var(--text-muted-dark);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.platform-tab-btn:hover {
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.03);
}
.platform-tab-btn.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary-light);
  background: rgba(99, 102, 241, 0.06);
}
.platform-content {
  display: none;
  padding: 0.8rem 1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #d1d5db;
}
.platform-content.active {
  display: block;
}
.platform-content ol {
  padding-left: 1.2rem;
  margin: 0;
}
.platform-content li {
  margin-bottom: 0.4rem;
  color: #d1d5db;
}
.platform-content code {
  color: #a5b4fc;
  font-family: monospace;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

/* Clickable tab links & external links */
.tab-link {
  color: var(--primary-light);
  cursor: pointer;
  transition: color 0.15s;
}
.tab-link:hover {
  color: #a5b4fc;
  text-decoration: underline;
}
.external-link {
  color: #60a5fa;
  cursor: pointer;
  transition: color 0.15s;
}
.external-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Settings Sections */
.section-title {
  font-size: 0.95rem;
  color: #a5b4fc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.form-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

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

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

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.settings-details {
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
}

.settings-details summary {
  padding: 0.65rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
  user-select: none;
}

.settings-details summary:hover {
  color: #d1d5db;
}

.settings-details summary i {
  color: var(--text-muted-dark);
  font-size: 0.85rem;
}

.settings-details[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-details p,
.settings-details-list {
  padding: 0.8rem 0.9rem;
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.settings-details-list {
  padding-left: 2rem;
}

.settings-details-list li {
  margin-bottom: 0.4rem;
}

.settings-details code {
  color: #a5b4fc;
  font-size: 0.78rem;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
}

.settings-guide {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 1rem;
}

.settings-guide-header {
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #a5b4fc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.04);
}

.settings-guide-header i {
  color: var(--primary);
  font-size: 0.9rem;
}

.settings-guide-list {
  padding: 0.8rem 1rem 0.8rem 2rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.settings-guide-list li {
  margin-bottom: 0.3rem;
}

.settings-guide-list strong {
  color: #d1d5db;
}

.kommo-guide-img {
  display: block;
  max-width: 360px;
  width: 100%;
  margin: 0.5rem 0 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: zoom-in;
  transition: border-color 0.15s;
}
.kommo-guide-img:hover {
  border-color: rgba(124, 58, 237, 0.4);
}

.text-green {
  color: var(--success-light);
}

.status-msg {
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}




/* ====================================================
   MODAL ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â ADD NEW LINE
   ==================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(17, 24, 39, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 2.5px solid var(--success);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.03);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--success);
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.2rem;
}

.modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted-dark);
  margin: 0;
}

.phone-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.phone-prefix {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
}

.phone-input {
  padding-left: 1.6rem !important;
  letter-spacing: 0.04em;
}

.input-hint {
  font-size: 0.74rem;
  color: var(--text-muted-darker);
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.input-hint strong {
  color: var(--text-muted-dark);
}

.add-line-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 3px solid var(--warning);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #d1d5db;
}

.add-line-warning i {
  color: var(--warning);
  font-size: 1.1rem;
  margin-top: 0.05rem;
  flex-shrink: 0;
}

.add-line-warning strong {
  color: var(--warning-light);
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.84rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.modal-actions .btn {
  min-width: 130px;
  justify-content: center;
}

/* ====================================================
   ADMIN SECURITY / LOGIN SCREEN OVERLAY
   ==================================================== */
.login-overlay-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(25px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.login-overlay-container.active {
  opacity: 1;
  pointer-events: all;
}

.login-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2.5rem 2.2rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(99, 102, 241, 0.05);
  transform: translateY(20px);
  transition: transform 0.35s ease;
}

.login-overlay-container.active .login-card {
  transform: translateY(0);
}

.login-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
}

.login-card .text-muted {
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
}

.login-card .brand-logo {
  margin-bottom: 1.2rem;
}

.login-card .brand-logo i {
  font-size: 2rem;
}

.login-card .brand-logo .logo-plus {
  font-size: 1.1rem;
}

.login-card .form-group {
  text-align: left;
  margin-bottom: 1rem;
}

.login-card .form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.login-card .form-control {
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.95rem;
}

.login-card .btn-block {
  padding: 0.7rem;
  font-size: 0.9rem;
}

#login-error {
  margin-top: 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--danger);
  text-align: center;
}

.login-footer {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.login-footer a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
}

.login-footer a:hover {
  text-decoration: underline;
}

#register-error {
  margin-top: 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--danger);
  text-align: center;
}

#register-success {
  margin-top: 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--success);
  text-align: center;
}



/* Make cursor pointers for interactive leads tables */
.lead-item, #db-leads-table tbody tr, #db-clients-table tbody tr {
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.lead-item:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  transform: translateY(-2px);
}

#db-leads-table tbody tr:hover, #db-clients-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

/* Multi-line WhatsApp Layout */
.lines-container-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
}

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

.line-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  cursor: pointer;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  transition: all 0.2s ease;
}

.line-item-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.line-item-row.active {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.5);
  border-left: 3px solid var(--primary);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.18);
}

.line-item-row.active .line-name {
  color: #a5b4fc;
}

.line-item-row.active .line-phone {
  color: var(--primary-light);
}

.line-item-row.active::before {
  content: 'GESTIONANDO';
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  position: absolute;
  top: -0.65rem;
  left: 0.75rem;
  z-index: 1;
}

.line-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-start;
}

.line-name-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.line-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
}

.line-phone {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.line-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

/* Client sort bar */
#clients-sort-bar {
  flex-wrap: wrap;
}
.sort-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.sort-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}
.sort-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

/* Selector de secciÃƒÆ’Ã‚Â³n del tab Clientes: Contactos / Clientes / Ventas */
.section-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  font-weight: 600;
}
.section-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}
.section-btn.active {
  background: rgba(99, 102, 241, 0.9);
  border-color: rgba(99, 102, 241, 0.9);
  color: #fff;
}

.section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  height: 1.35em;
  padding: 0 0.35em;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 0.35em;
  background: rgba(255,255,255,0.15);
  color: inherit;
  transition: background 0.15s;
}
.section-btn:not(.active) .section-count {
  background: rgba(255,255,255,0.06);
  color: #94a3b8;
}

/* En la sección "Contactos" se ocultan las columnas de compra */
#db-clients-table.hide-buyer-cols .col-buyer {
  display: none;
}

/* GrÃƒÆ’Ã‚Â¡fico de facturaciÃƒÆ’Ã‚Â³n por dÃƒÆ’Ã‚Â­a */
.daily-revenue-card {
  margin-bottom: 1.5rem;
}

.cell-number {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Client badges */
.client-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.client-badge.comprador {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success-light);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.client-badge.comunicado {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.18);
}
.client-badge.potencial {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-light);
  border: 1px solid rgba(245, 158, 11, 0.18);
}
/* Tag violeta para contactos/ventas que entraron por una lÃƒÆ’Ã‚Â­nea Kommo */
.kommo-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  margin-left: 6px;
  vertical-align: middle;
  background: rgba(124, 58, 237, 0.12);
  color: var(--purple-light);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

/* User management styles */
.admin-card {
  margin-bottom: 1.5rem;
}

.admin-limit-input {
  width: 65px;
  display: inline-block;
  padding: 0.25rem 0.4rem;
  font-size: 0.8rem;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 4px;
  margin-right: 0.4rem;
  text-align: center;
}

.admin-stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.admin-stat-num {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fbbf24;
}
.admin-stat-label {
  font-size: 0.7rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Extra spacing utility */
.mt-3 {
  margin-top: 1rem;
}

/* ====================================================
   MODAL ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â LOGOUT CONFIRMATION
   ==================================================== */
.logout-modal-card {
  border-top-color: var(--danger) !important;
  max-width: 400px;
  text-align: center;
  padding: 2.5rem 2rem 2rem;
}

.logout-modal-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.6rem;
  color: var(--danger);
}

.logout-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.logout-modal-msg {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ====================================================
   MOBILE RESPONSIVE ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â HAMBURGER MENU
   ==================================================== */

.hamburger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 1001;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.08); }
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s;
}
.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.content-header-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

#hamburger-btn {
  margin-top: 4px;
  flex-shrink: 0;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top));
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 400px;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastSlideIn 0.3s ease-out forwards;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
}
.toast.toast-error { border-color: rgba(239,68,68,0.4); }
.toast.toast-error .toast-icon { color: var(--danger); }
.toast.toast-success { border-color: rgba(16,185,129,0.4); }
.toast.toast-success .toast-icon { color: var(--success); }
.toast.toast-warning { border-color: rgba(245,158,11,0.4); }
.toast.toast-warning .toast-icon { color: var(--warning); }
.toast .toast-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.toast .toast-body { flex-grow: 1; }
.toast .toast-body strong { display: block; font-weight: 600; margin-bottom: 0.15rem; }
.toast .toast-close {
  background: none; border: none; color: var(--text-muted-dark); cursor: pointer;
  font-size: 1rem; padding: 0; flex-shrink: 0; margin-left: 0.5rem;
}
.toast .toast-close:hover { color: var(--text); }
@keyframes toastSlideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

@media (max-width: 820px) {
  #hamburger-btn { display: flex; }

  .sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    bottom: 0;
    width: 280px;
    z-index: 999;
    transition: left 0.3s ease;
    border-right: 1px solid rgba(255,255,255,0.1);
    box-shadow: 4px 0 30px rgba(0,0,0,0.5);
    height: 100vh;
    padding-top: 1rem;
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay { display: block; }
  .sidebar-overlay.active { display: block; }

  .main-content {
    width: 100%;
    padding: 1rem 1rem 5rem;
    margin-left: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem;
  }
  .stat-card { padding: 1rem; }
  .stat-value { font-size: 1.4rem !important; }
  .stat-icon { width: 40px; height: 40px; font-size: 1rem; }

  .dashboard-charts,
  .dashboard-details,
  .sandbox-split,
  .lines-container-layout {
    grid-template-columns: 1fr !important;
  }

  .details-card .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table { font-size: 0.78rem; }
  .data-table th, .data-table td { padding: 0.5rem 0.4rem; }

  .docs-hero { padding: 1.5rem 1rem; }
  .docs-hero h2 { font-size: 1.2rem; }
  .docs-hero-text { font-size: 0.85rem; }
  .docs-hero-icon { font-size: 1.5rem; gap: 0.6rem; }
  .ventaja-card { padding: 1.2rem; }
  .docs-step-card { padding: 1rem; gap: 0.8rem; }
  .step-num { width: 2rem; height: 2rem; font-size: 0.9rem; margin-top: 0.1rem; }
  .step-content h3 { font-size: 0.9rem; }
  .step-content p { font-size: 0.78rem; }
  .step-highlight { font-size: 0.78rem; padding: 0.6rem 0.8rem; }

  .login-card { width: 92%; padding: 2rem 1.5rem; }
  .register-card { width: 92%; padding: 2rem 1.5rem; }

  .line-item-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .line-actions { align-self: flex-end; }

  .chat-drawer-container { width: 100% !important; }

  /* Dashboard toolbar mobile */
  .dash-toolbar-left {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .dash-date-filter {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .dash-date-presets {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .dash-date-presets .btn {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }

  .dash-date-range {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .dash-date-range label {
    font-size: 0.7rem;
  }

  .dash-date-range input[type="date"] {
    flex: 1;
    min-width: 0;
    font-size: 0.72rem;
    padding: 0.3rem 0.4rem;
  }

  .dash-date-range .btn {
    font-size: 0.72rem;
    padding: 0.3rem 0.6rem;
  }

  .date-filter-sep {
    display: none;
  }

  /* Sidebar animation on mobile */
  .sidebar {
    transition: left 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  .sidebar-overlay {
    transition: opacity 0.3s ease;
  }
}

/* ====================================================
   SUPPORT WIDGET ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â floating pill + chat-style panel
   ==================================================== */

/* -- FAB pill -- */
.support-fab {
  position: fixed;
  bottom: calc(28px + env(safe-area-inset-bottom));
  right: 28px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #4f46e5 0%, var(--primary) 100%);
  color: #fff;
  border: none;
  border-radius: 28px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease;
  user-select: none;
  outline: none;
}

.support-fab:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 32px rgba(99, 102, 241, 0.45);
  padding-right: 24px;
}

.support-fab:active {
  transform: scale(0.96);
}

.support-fab-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.support-fab-label {
  font-size: 0.85rem;
  letter-spacing: 0.3px;
}

.support-fab-pulse {
  display: none;
}
.support-fab-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid var(--bg);
  display: none;
  z-index: 2;
}

/* -- widget panel -- */
.support-widget {
  position: fixed;
  bottom: 90px;
  right: 28px;
  z-index: 9997;
  width: 380px;
  max-width: calc(100vw - 56px);
  max-height: min(600px, calc(100vh - 120px));
  background: #141822;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom right;
  overflow: hidden;
}

.support-widget.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* -- header -- */
.support-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: linear-gradient(135deg, #1e1b4b 0%, #141822 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.support-widget-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-widget-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.support-widget-avatar svg {
  width: 20px;
  height: 20px;
}

.support-widget-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}

.support-widget-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted-dark);
}

.support-widget-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.support-widget-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

/* -- body -- */
.support-widget-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.06) transparent;
}

.support-widget-body::-webkit-scrollbar {
  width: 4px;
}

.support-widget-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
}

/* -- type picker -- */
.support-widget-prompt {
  font-size: 0.95rem;
  color: #d1d5db;
  margin: 0 0 16px;
  font-weight: 500;
}

.support-type-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  margin-bottom: 8px;
}

.support-type-option:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateX(4px);
}

.support-type-option:last-child {
  margin-bottom: 0;
}
.support-type-whatsapp {
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.25);
  text-decoration: none;
}
.support-type-whatsapp:hover {
  background: rgba(37, 211, 102, 0.18);
  border-color: rgba(37, 211, 102, 0.45);
  transform: translateX(4px);
}
.support-type-whatsapp .support-type-icon,
.support-type-whatsapp .support-type-icon i {
  color: #25d366 !important;
}
.support-type-whatsapp .support-type-label {
  color: #25d366;
}
.support-type-whatsapp .support-type-desc {
  color: #6ee7b7;
}

.support-type-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.support-type-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.support-type-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted-dark);
  margin-top: 1px;
}

/* -- form (hidden by default, shown after type selection) -- */
.support-widget-form {
  display: none;
}

.support-form-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.support-form-back {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.support-form-back:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

#support-form-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.support-form-group {
  margin-bottom: 18px;
}

.support-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.support-form-optional {
  color: var(--text-muted-darker);
  font-weight: 400;
}

.support-form-group textarea,
.support-form-group input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}

.support-form-group textarea:focus,
.support-form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.support-form-group textarea::placeholder,
.support-form-group input::placeholder {
  color: var(--text-muted-darker);
}

.support-form-group textarea {
  min-height: 100px;
}

.support-form-submit {
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, var(--primary));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.support-form-submit:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.support-form-submit:active {
  transform: scale(0.98);
}

.support-form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.support-form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #f87171;
  margin-bottom: 14px;
}

.support-form-submit-text {}

.support-form-submit-sending {
  display: flex;
  align-items: center;
  gap: 8px;
}

.support-spinner {
  width: 18px;
  height: 18px;
  animation: supportSpin 0.8s linear infinite;
}

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

/* -- success state -- */
.support-widget-success {
  display: none;
  text-align: center;
  padding: 30px 10px;
}

.support-success-check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--success);
  animation: supportCheckBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.support-success-check svg {
  width: 28px;
  height: 28px;
}

@keyframes supportCheckBounce {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

/* -- inbox / mis consultas -- */
.support-widget-inbox {
  display: none;
  height: 100%;
}
.support-inbox-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.support-inbox-header span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.support-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.support-inbox-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px;
}
.support-inbox-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.support-inbox-type {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.support-inbox-date {
  font-size: 0.72rem;
  color: var(--text-muted-darker);
}
.support-inbox-card-message {
  font-size: 0.85rem;
  color: #d1d5db;
  line-height: 1.5;
  word-break: break-word;
}
.support-inbox-card-reply {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.12);
  border-radius: 8px;
}
.support-inbox-reply-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.support-inbox-reply-text {
  font-size: 0.85rem;
  color: #d1d5db;
  line-height: 1.5;
  word-break: break-word;
}
.support-inbox-card-pending {
  margin-top: 10px;
}

/* -- widget footer -- */
.support-widget-footer {
  margin-top: 16px;
  padding-top: 12px;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.support-footer-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.support-footer-btn:hover {
  background: rgba(99,102,241,0.08);
  color: var(--text-secondary);
}

/* -- widget history button in header -- */
.support-widget-history {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 4px;
}
.support-widget-history:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
}
.support-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--bg-card);
}

/* -- admin feedback reply form -- */
.feedback-reply-form {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.feedback-reply-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-family: inherit;
  resize: vertical;
  outline: none;
}
.feedback-reply-textarea:focus {
  border-color: var(--primary);
}
.feedback-reply-actions {
  display: flex;
  gap: 6px;
}
.feedback-reply-actions .btn {
  font-size: 0.75rem;
  padding: 4px 12px;
}
.feedback-reply-cell {
  max-width: 160px;
  font-size: 0.8rem;
}
.feedback-reply-badge {
  color: var(--success-light);
  font-size: 0.8rem;
  line-height: 1.4;
}
.feedback-pending {
  color: var(--text-muted-darker);
  font-size: 0.78rem;
  font-style: italic;
}
.feedback-actions {
  white-space: nowrap;
}
.feedback-reply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: rgba(99,102,241,0.1);
  color: var(--primary-light);
  cursor: pointer;
  transition: background 0.15s;
}
.feedback-reply-btn:hover {
  background: rgba(99,102,241,0.2);
  color: #a5b4fc;
}

.support-widget-success h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.support-widget-success p {
  font-size: 0.85rem;
  color: var(--text-muted-dark);
  margin: 0 0 24px;
  line-height: 1.5;
}

/* -- admin feedback table polish -- */
.feedback-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.feedback-type-soporte {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.feedback-type-bug {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.feedback-type-reporte {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning-light);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.feedback-type-sugerencia {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success-light);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.feedback-message-text {
  display: inline;
  color: #d1d5db;
  font-size: 0.85rem;
}

.feedback-message-full {
  margin-top: 6px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.feedback-expand-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0 4px;
  font-weight: 600;
  transition: color 0.15s;
}

.feedback-expand-btn:hover {
  color: var(--primary-light);
}

.feedback-row td {
  vertical-align: top;
}

.feedback-no-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.1);
  cursor: help;
  font-size: 0.85rem;
}

.feedback-respond-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
  text-decoration: none;
  transition: background 0.15s;
}

.feedback-respond-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.feedback-contact {
  font-size: 0.8rem;
  color: var(--text-muted-dark);
}

/* -- mobile responsive for widget -- */
@media (max-width: 560px) {
  .support-widget {
    bottom: 0;
    right: 0;
    left: 0;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 18px 18px 0 0;
    transform: translateY(100%) scale(1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .support-widget.open {
    transform: translateY(0) scale(1);
  }
  .support-fab {
    bottom: calc(16px + env(safe-area-inset-bottom));
    right: 16px;
  }
}

/* ====================================================
   DASHBOARD ENHANCEMENTS
   ==================================================== */

/* Skeleton loading placeholders */
@keyframes skeletonPulse {
  0% { opacity: 0.3; }
  50% { opacity: 0.6; }
  100% { opacity: 0.3; }
}
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s ease-in-out infinite;
  border-radius: 6px;
  color: transparent !important;
  user-select: none;
  pointer-events: none;
}
.skeleton-block {
  display: inline-block;
  height: 1.6rem;
  width: 80px;
}
.skeleton-inline {
  display: inline-block;
  height: 0.8rem;
  width: 60px;
  vertical-align: middle;
}

/* Skeleton rows for table loading */
.skeleton-row td {
  padding: 0.65rem 0.75rem;
  vertical-align: middle;
}
.skel-bar {
  height: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s ease-in-out infinite;
  border-radius: 4px;
  min-width: 40px;
}

/* Animated value transitions */
.stat-value {
  transition: color 0.3s ease;
}
.stat-value.animate-up {
  animation: countUpPop 0.4s ease-out;
}
@keyframes countUpPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); color: var(--success-light); }
  100% { transform: scale(1); }
}

/* Date filter bar */
.dash-date-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.dash-date-filter label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.dash-date-filter input[type="date"] {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-secondary);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-family: 'Outfit', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  cursor: pointer;
}
.dash-date-filter input[type="date"]:focus {
  border-color: var(--primary);
}
.dash-date-filter input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
  cursor: pointer;
}
.date-filter-sep {
  color: var(--text-muted-darker);
  font-size: 0.8rem;
}
.btn-date-clear {
  background: none;
  border: none;
  color: var(--text-muted-dark);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  transition: color 0.2s;
}
.btn-date-clear:hover {
  color: var(--danger);
}

/* Date filter button active state */
.dash-date-filter .btn-filter-active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  color: #a5b4fc;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}

/* Sortable table headers */
.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 1.5rem;
}
.data-table th.sortable:hover {
  color: var(--text-secondary);
}
.data-table th.sortable::after {
  content: '\f0dc';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--text-muted-darker);
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
}
.data-table th.sortable:hover::after {
  opacity: 1;
  color: var(--primary);
}
.data-table th.sortable.sorted-asc::after {
  content: '\f0de';
  color: var(--primary);
  opacity: 1;
}
.data-table th.sortable.sorted-desc::after {
  content: '\f0dd';
  color: var(--primary);
  opacity: 1;
}

/* Theme toggle button */

/* Export button */
.btn-export {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  color: var(--success-light);
}
.btn-export:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

/* Enhanced stat card hover */
.stat-card.glow-active {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.08), 0 8px 30px rgba(0,0,0,0.3);
}

/* Mini sparkline area in stat cards */
.stat-spark {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 70px;
  height: 30px;
  opacity: 0.15;
  pointer-events: none;
}
.stat-spark canvas {
  width: 100%;
  height: 100%;
}

/* Toolbar enhancement */
.dash-toolbar {
  background: rgba(15, 21, 34, 0.3);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

/* Credits responsive */
@media (max-width: 768px) {
  .credits-balance-card {
    max-width: 100%;
  }
  .plans-carousel {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 0.5rem 0 0;
  }
  .plan-card {
    min-height: 220px;
  }
  .plan-featured-label {
    top: -0.85rem;
  }
}
@media (max-width: 480px) {
  .plans-carousel {
    grid-template-columns: 1fr;
  }
  .credits-balance-amount {
    font-size: 2rem;
  }
  .credits-stats-row {
    gap: 1.25rem;
  }
}

/* Pantallas pequeÃƒÆ’Ã‚Â±as-medianas (<560px) */
@media (max-width: 560px) {
  .docs-step-card {
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.9rem;
  }
  .step-num {
    width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
    align-self: flex-start;
    margin-top: 0;
  }
  .ventaja-card {
    padding: 1rem;
  }
  .docs-hero {
    padding: 1.2rem 0.8rem;
  }
  .docs-hero h2 {
    font-size: 1.1rem;
  }
  .docs-hero-text {
    font-size: 0.82rem;
  }
  .step-highlight {
    font-size: 0.78rem;
    padding: 0.5rem 0.7rem;
  }
  .platform-tab-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.72rem;
  }
  .platform-content {
    padding: 0.6rem 0.8rem;
    font-size: 0.78rem;
  }
}

/* Pantallas muy pequeÃƒÆ’Ã‚Â±as (<400px) */
@media (max-width: 400px) {
  .qr-wrapper {
    padding: 1rem;
  }
  .qr-wrapper img {
    width: 180px;
    height: 180px;
  }
  .qr-instructions {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .qr-instructions ol {
    text-align: left;
  }
  .qr-instructions i {
    font-size: 1.1rem;
  }
  .qr-credit-note {
    font-size: 0.72rem;
    padding: 0.5rem 0.7rem;
  }
  .qr-refresh-text {
    font-size: 0.75rem;
  }
  #wa-qr-credit-window {
    padding: 0.6rem 0.8rem !important;
  }
  #wa-qr-credit-window div {
    font-size: 0.8rem !important;
    flex-wrap: wrap;
    text-align: center;
  }
  #wa-qr-window-note {
    font-size: 0.7rem !important;
  }
  .phone-mockup {
    width: 180px;
  }
  .phone-screen {
    height: 200px;
  }
  .phone-url {
    font-size: 0.45rem;
  }
  .phone-landing h3 {
    font-size: 0.75rem;
  }
  .phone-landing p {
    font-size: 0.55rem;
  }
  .phone-wa-btn {
    font-size: 0.6rem;
    padding: 0.3rem 0.5rem;
  }
  .connection-state {
    padding: 1rem 0.5rem;
  }
  .no-lines-state {
    padding: 1rem 0.5rem;
  }
  .details-card {
    padding: 0.8rem;
  }
  .details-card .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    margin-bottom: 0.6rem;
  }
  .details-card .card-header h2 {
    font-size: 0.95rem;
  }
  .details-card .card-header p {
    font-size: 0.75rem;
  }
  .line-item-row {
    padding: 0.5rem;
    gap: 0.4rem;
  }
  .line-name-badge {
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .line-name {
    font-size: 0.82rem;
  }
  .line-phone {
    font-size: 0.65rem;
  }
  .line-actions {
    flex-wrap: wrap;
    gap: 0.25rem;
    width: 100%;
  }
  .line-actions .btn {
    font-size: 0.65rem !important;
    padding: 0.2rem 0.4rem !important;
  }
  .credit-actions {
    width: 100%;
  }
  .credit-actions .btn {
    flex: 1;
  }

  /* Docs tab responsive */
  .docs-hero {
    padding: 1.2rem 0.8rem;
    border-radius: 16px;
    margin-bottom: 1.2rem;
  }
  .docs-hero h2 {
    font-size: 1rem;
  }
  .docs-hero-text {
    font-size: 0.78rem;
  }
  .docs-hero-icon {
    font-size: 1.2rem;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
  }
  .docs-ventajas-header h2 {
    font-size: 1.25rem;
  }
  .docs-ventajas-header p {
    font-size: 0.85rem;
  }
  .ventaja-card {
    padding: 1rem;
    gap: 0.6rem;
  }
  .ventaja-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .ventaja-info h3 {
    font-size: 0.88rem;
  }
  .ventaja-info p {
    font-size: 0.78rem;
  }
  .faq-question {
    padding: 1rem;
    font-size: 0.88rem;
  }
  .faq-answer {
    padding: 0 1rem 1rem 1rem;
    font-size: 0.78rem;
  }
  .docs-step-card {
    flex-direction: column;
    padding: 0.8rem;
    gap: 0.5rem;
    border-left-width: 3px;
  }
  .docs-step-card:hover {
    transform: translateY(-2px);
  }
  .step-num {
    width: 1.8rem;
    height: 1.8rem;
    font-size: 0.8rem;
    margin-top: 0;
    align-self: flex-start;
  }
  .step-content h3 {
    font-size: 0.85rem;
  }
  .step-content p,
  .step-content li {
    font-size: 0.75rem;
  }
  .docs-timeline {
    gap: 1rem;
    padding-left: 0;
  }
  .step-highlight {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.5rem 0.7rem;
    font-size: 0.75rem;
  }
  .step-highlight i {
    font-size: 0.9rem;
    margin-top: 0;
  }
  .platform-tab-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
  }
  .platform-content {
    padding: 0.6rem 0.8rem;
    font-size: 0.75rem;
  }
  .platform-content ol {
    padding-left: 1rem;
  }
  .docs-list {
    padding-left: 1rem;
  }
  .docs-list li {
    font-size: 0.75rem;
  }
}

/* Scroll suave en la guÃƒÆ’Ã‚Â­a / FAQ */
#tab-docs { scroll-behavior: smooth; }

/* Indicadores de estado de lÃƒÆ’Ã‚Â­nea (dashboard) */
.dot-green, .dot-yellow, .dot-red, .dot-indigo, .dot-gray {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}
.dot-yellow {
  background: #eab308;
  box-shadow: 0 0 6px rgba(234,179,8,0.5);
}
.dot-red {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239,68,68,0.4);
}
.dot-indigo {
  background: #818cf8;
  box-shadow: 0 0 6px rgba(129,140,248,0.4);
}
.dot-gray {
  background: #6b7280;
  box-shadow: 0 0 3px rgba(107,114,128,0.3);
  opacity: 0.5;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

/* ====================================================
   MOBILE HARDENING ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â appended 2026-07
   Dashboard 100% usable en celular. Todo dentro de media
   queries de pantalla chica ÃƒÂ¢Ã¢â‚¬Â Ã¢â‚¬â„¢ el desktop NO se toca.
   ==================================================== */
@media (max-width: 820px) {
  /* --- FIX CRÃƒÆ’Ã‚ÂTICO: overlay del menÃƒÆ’Ã‚Âº tapaba la pantalla ---
     El overlay estaba display:block con pointer-events activos aunque el
     menÃƒÆ’Ã‚Âº estuviera cerrado (invisible por opacity:0), interceptando TODOS
     los toques ÃƒÂ¢Ã¢â‚¬Â Ã¢â‚¬â„¢ ningÃƒÆ’Ã‚Âºn botÃƒÆ’Ã‚Â³n se podÃƒÆ’Ã‚Â­a tocar. Solo debe capturar toques
     cuando el menÃƒÆ’Ã‚Âº estÃƒÆ’Ã‚Â¡ abierto (.active). */
  .sidebar-overlay { display: block; pointer-events: none; }
  .sidebar-overlay.active { pointer-events: auto; }

  /* --- Matar el scroll horizontal (causa de "todo se rompe") --- */
  html, body { overflow-x: clip; overscroll-behavior-y: contain; }
  .app-container,
  .main-content { max-width: 100%; overflow-x: hidden; }
  img, svg, canvas, video, iframe { max-width: 100%; height: auto; }
  pre, code { max-width: 100%; overflow-x: auto; }

  /* --- Todos los grids multi-columna ÃƒÂ¢Ã¢â‚¬Â Ã¢â‚¬â„¢ una sola columna --- */
  .dashboard-charts,
  .dashboard-details,
  .sandbox-split,
  .lines-container-layout,
  .connected-info-grid,
  .integration-info-grid,
  .integration-line-grid,
  .docs-ventajas-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* --- Botones cÃƒÆ’Ã‚Â³modos de tocar (mÃƒÆ’Ã‚Â­n. 44px) y sin desbordar --- */
  .btn { min-height: 44px; max-width: 100%; }
  .btn-sm { min-height: 44px; padding: 0.5rem 0.8rem; }
  .card-header { flex-wrap: wrap; gap: 0.6rem; }
  .card-header > .btn-primary { max-width: 100%; }

  /* --- Inputs/formularios a ancho completo --- */
  .form-control,
  select.form-control,
  textarea.form-control { width: 100%; max-width: 100%; box-sizing: border-box; }

  /* --- min-width:0 = clave para que una tabla/contenido ancho DEJE encoger su
     caja. Sin esto, flex/grid no achican el item bajo su contenido y el cuadro
     se sale de la pantalla (causa de "partes que no entran"). --- */
  .details-card,
  .card-body,
  .table-responsive,
  .lines-container-layout > *,
  .dashboard-details > *,
  .connected-info-grid > * { min-width: 0; }

  /* --- Tablas: scroll propio dentro de su caja, no de la pÃƒÆ’Ã‚Â¡gina --- */
  .table-responsive,
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

  /* --- Barras de botones en headers (orden/acciones) que envuelvan --- */
  .flex-row,
  #clients-sort-bar,
  .card-header-actions { flex-wrap: wrap; }
  .flex-row { max-width: 100%; }

  /* --- Grids con estilo INLINE de 2 columnas ÃƒÂ¢Ã¢â‚¬Â Ã¢â‚¬â„¢ una sola en mÃƒÆ’Ã‚Â³vil.
     El !important sobre selector de atributo vence al style inline. --- */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:repeat(2"],
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns:1fr 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr 1fr"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"],
  #sim-receipt-form {
    grid-template-columns: 1fr !important;
  }

  /* --- Modales usables en pantallas cortas (alcanzar el botÃƒÆ’Ã‚Â³n de abajo) --- */
  .modal-overlay { padding: 1rem; }
  .modal-card { max-height: 90vh; overflow-y: auto; }

  /* --- QR siempre dentro del ancho --- */
  .qr-wrapper { max-width: 100%; box-sizing: border-box; }
  .qr-wrapper img { width: 220px; max-width: 100%; height: auto; }
  .qr-instructions { max-width: 100%; }

  /* --- Touch: sin delay de 300ms en iOS, sin double-tap-to-zoom indeseado --- */
  .btn, .menu-item, .line-item-row, .sort-btn, .section-btn, .sidebar-tab-btn,
  .data-table tr, .lead-item, .sidebar-balance, .tab-link,
  .device-btn, .tb-btn, button, [role="button"] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(99,102,241,0.15);
  }

  /* --- Safe-area para iPhones con notch --- */
  .sidebar { padding-bottom: env(safe-area-inset-bottom); }
  .main-content { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }

  /* --- Filtro de fechas mobile --- */
  .dash-toolbar-left {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.5rem;
  }
  .dash-date-filter {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .dash-date-presets {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .dash-date-presets .btn {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.72rem;
    padding: 0.35rem 0.4rem;
  }
  .dash-date-range {
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .dash-date-range label {
    font-size: 0.68rem;
  }
  .dash-date-range input[type="date"] {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    padding: 0.5rem 0.6rem;
    min-height: 44px;
  }
  .dash-date-range .btn {
    font-size: 0.78rem;
    padding: 0.4rem 0.6rem;
  }
  .date-filter-sep {
    display: none;
  }

  /* --- Fuentes pequeÃƒÆ’Ã‚Â±as ÃƒÂ¢Ã¢â‚¬Â Ã¢â‚¬â„¢ legibles en mobile --- */
  .sidebar-balance .balance-label,
  .plan-off-chip, .plan-featured-label, .plan-bonus-chip,
  .stat-desc, .phone-header,
  .credits-stat-label, .welcome-banner-off-chip, .plan-perunit { font-size: 0.72rem !important; }

  /* --- Charts mÃƒÆ’Ã‚Â¡s compactos en mobile --- */
  .chart-body { height: 200px; }
  .chart-body canvas { width: 100% !important; height: 100% !important; }

  /* --- Bloquea zoom de iOS en inputs --- */
  .form-control, textarea.form-control, select.form-control { font-size: 16px !important; }

  /* --- Sort buttons tappeables --- */
  .sort-btn, .section-btn { font-size: 0.8rem; padding: 0.5rem 0.8rem; }

  /* --- Login card scrolleable --- */
  .login-card { max-height: 90vh; overflow-y: auto; }
}

.dash-toolbar-right .btn {
  min-height: 38px;
}
/* Refresh spin */
.btn-spinning i {
  animation: spin 0.8s linear infinite;
}
/* Empty state icons */
.empty-state-icon {
  font-size: 2rem;
  color: var(--text-muted-dark);
  opacity: 0.35;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.empty-state-cell {
  padding: 2.5rem 1rem !important;
}
.empty-state-small .empty-state-icon {
  font-size: 1.6rem;
}

/* TelÃƒÆ’Ã‚Â©fonos (ÃƒÂ¢Ã¢â‚¬Â°Ã‚Â¤480px): compactar y stat cards a una columna */
@media (max-width: 480px) {
  .main-content { padding: 0.85rem 0.8rem 5rem; }
  .stats-grid { grid-template-columns: 1fr !important; }
  .details-card,
  .stat-card { padding: 1rem !important; }
  .card-header h2 { font-size: 1.1rem; }
}

/* ====================================================
   GUÃƒÆ’Ã‚ÂA FAB ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â botÃƒÆ’Ã‚Â³n flotante para ir a la GuÃƒÆ’Ã‚Â­a & Tutorial
   desde cualquier pestaÃƒÆ’Ã‚Â±a. Abajo-izquierda para no chocar
   con el FAB de Feedback (abajo-derecha). Queda por debajo
   del overlay de login (z-index 9999), asÃƒÆ’Ã‚Â­ no aparece antes
   de iniciar sesiÃƒÆ’Ã‚Â³n.
   ==================================================== */


/* ----------------------------------------------------------------
   INTEGRALES TAB
   ---------------------------------------------------------------- */
.integrations-hero {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}
.integrations-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--purple), #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.4rem;
  color: #fff;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25);
}
.integrations-hero h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.integrations-hero p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}
@media (max-width: 480px) {
  .integrations-grid { grid-template-columns: 1fr; }
  .landings-grid { grid-template-columns: 1fr; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { min-width: 0; flex: 1; }
  .chart-body { height: 180px; }
  #buy-pack-modal .modal-card { padding: 1.5rem 1rem; }
}

.integration-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.integration-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.08);
}

.integration-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.integration-card-logo {
  flex-shrink: 0;
}
.integration-card-logo svg {
  display: block;
}
.integration-card-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.25rem;
}
.integration-card-info {
  flex: 1;
}

.integration-card-body {
  flex: 1;
}
.integration-card-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 1rem;
}

.integration-features {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.integration-feature {
  font-size: 0.78rem;
  color: #d1d5db;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.integration-feature i {
  color: var(--success-light);
  font-size: 0.7rem;
  flex-shrink: 0;
}

.integration-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.integration-card-placeholder {
  border-style: dashed;
  border-color: rgba(255,255,255,0.08);
  opacity: 0.7;
}
.integration-placeholder-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(107, 114, 128, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted-dark);
}

/* ── Mini Curso ─────────────────────────────────────────────────────── */
.course-locked-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.2);
}
.course-locked-banner > i {
  font-size: 1.3rem;
  color: #fbbf24;
  flex-shrink: 0;
}
.course-locked-banner strong {
  color: #fff;
  font-size: 0.92rem;
}
.course-locked-banner p {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #9ca3af;
  line-height: 1.5;
}
.course-locked-banner .btn {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .course-locked-banner { flex-direction: column; align-items: flex-start; }
}

.course-loading {
  padding: 2.5rem 2rem;
  text-align: center;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}
.course-loading i { font-size: 1.1rem; color: var(--accent); }

.course-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.course-admin-toolbar .course-chapter-count {
  font-size: 0.8rem;
  color: #6b7280;
}

.course-chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.course-chapter-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.2rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}
.course-chapter-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08);
}
.course-chapter-card.locked {
  opacity: 0.7;
  cursor: pointer;
}
.course-chapter-card.locked:hover {
  opacity: 0.85;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.04);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.06);
}
.course-chapter-card:active {
  transform: translateY(0);
}
.course-chapter-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.2);
}
.course-chapter-card.locked .course-chapter-icon {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.2);
}
.course-chapter-order {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}
.course-chapter-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}
.course-chapter-desc {
  margin: 0;
  font-size: 0.8rem;
  color: #9ca3af;
  line-height: 1.5;
  flex: 1;
}
.course-chapter-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  width: fit-content;
}
.course-chapter-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.course-chapter-actions button {
  background: none;
  border: none;
  color: var(--text-muted-dark);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: all 0.15s;
}
.course-chapter-actions button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.course-chapter-actions .btn-course-delete:hover {
  color: var(--danger);
}

.course-watch-player {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.course-watch-player iframe,
.course-watch-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
/* Loading skeleton mientras se carga el video */
.course-player-loading {
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.course-player-loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -20px 0 0 -20px;
}

/* Course modals — override green top border with indigo */
#course-watch-modal .modal-card,
#course-admin-modal .modal-card {
  border-top-color: rgba(99, 102, 241, 0.5);
}

#course-empty-state i {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.4;
}
#course-empty-state h3 {
  font-size: 1rem;
  color: var(--text-muted-dark);
  margin: 0 0 0.25rem;
}
#course-empty-state p {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted-dark);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

