/* ============================================================
   CRM Soluciones Takana — Design System Principal
   Paleta oficial: solucionestakana.pe
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

/* ============================================================
   TOKENS DE COLOR — MODO OSCURO (Paleta Oficial Takana)
   ============================================================ */
:root,
[data-theme="dark"] {
  /* Fondos — Exactos del sitio web */
  --bg-base:       #020617;          /* slate-950 — fondo body del sitio */
  --bg-surface:    #0f172a;          /* slate-900 */
  --bg-elevated:   #1e293b;          /* slate-800 */
  --bg-hover:      rgba(30,41,59,0.8);
  --bg-glass:      rgba(15, 23, 42, 0.7);   /* glass del sitio */

  /* Bordes — Exactos del sitio web */
  --border-subtle: rgba(255,255,255,0.05);
  --border-muted:  rgba(56, 189, 248, 0.1); /* glass-card border */
  --border-accent: rgba(56, 189, 248, 0.4); /* glass-card:hover border */

  /* Texto — Alto Contraste */
  --text-primary:   #ffffff;   /* blanco puro */
  --text-secondary: #cbd5e1;   /* slate-300 — alta visibilidad en subtextos */
  --text-muted:     #94a3b8;   /* slate-400 — notas y fechas legibles */
  --text-inverse:   #020617;

  /* ============================================================
     COLORES NEON — Paleta oficial de Soluciones Takana
     Extraída de: @theme { --color-neon-* } en input.css
     ============================================================ */
  --accent-primary:       #06b6d4;   /* neon-cyan  — color principal */
  --accent-primary-dark:  #0891b2;   /* cyan-600 */
  --accent-primary-glow:  rgba(6, 182, 212, 0.15);
  --accent-secondary:     #8b5cf6;   /* neon-purple */
  --accent-secondary-glow: rgba(139, 92, 246, 0.15);

  --color-neon-cyan:   #06b6d4;
  --color-neon-purple: #8b5cf6;
  --color-neon-blue:   #3b82f6;
  --color-neon-green:  #10b981;
  --color-neon-orange: #f97316;
  --color-neon-pink:   #ec4899;

  /* Gradiente de texto oficial del sitio: #22d3ee → #818cf8 */
  --gradient-brand: linear-gradient(to right, #22d3ee, #818cf8);
  --gradient-brand-diagonal: linear-gradient(135deg, #06b6d4, #8b5cf6);

  /* Colores semánticos */
  --color-success: #10b981;   /* neon-green */
  --color-warning: #f97316;   /* neon-orange */
  --color-danger:  #ef4444;
  --color-info:    #3b82f6;   /* neon-blue */

  /* Sombras con el glow del sitio */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.6);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.7);
  --shadow-glow: 0 0 24px rgba(6, 182, 212, 0.2);
  --shadow-glow-hover: 0 10px 40px -10px rgba(6, 182, 212, 0.2);

  /* Radios */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Transiciones */
  --transition-fast:   0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow:   0.4s ease;

  /* Sidebar */
  --sidebar-width: 240px;
  --sidebar-collapsed: 68px;
  --topbar-height: 60px;

  /* Canales */
  --ch-whatsapp:  #25d366;
  --ch-facebook:  #1877f2;
  --ch-instagram: #e1306c;
  --ch-email:     #ea4335;
}

/* ============================================================
   MODO CLARO (mantiene identidad Takana con fondo claro)
   ============================================================ */
[data-theme="light"] {
  --bg-base:       #f0f9ff;
  --bg-surface:    #ffffff;
  --bg-elevated:   #e0f2fe;
  --bg-hover:      #cffafe;
  --bg-glass:      rgba(255,255,255,0.85);
  --border-subtle: rgba(6,182,212,0.1);
  --border-muted:  rgba(6,182,212,0.2);
  --border-accent: rgba(6,182,212,0.5);
  --text-primary:  #0c1a2e;
  --text-secondary: #334155;
  --text-muted:    #64748b;
  --text-inverse:  #f1f5f9;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.16);
  --shadow-glow: 0 0 24px rgba(6, 182, 212, 0.25);
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
  transition: background var(--transition-slow), color var(--transition-slow);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;  /* Fuente oficial Soluciones Takana */
  line-height: 1.3;
  font-weight: 600;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; }
.hidden { display: none !important; }

/* ============================================================
   SCROLLBAR PERSONALIZADA
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-muted); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   GLASSMORPHISM — Igual al del sitio web solucionestakana.pe
   ============================================================ */
.glass-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.1);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--shadow-glow-hover);
}

/* Glass sólido para sidebar */
.glass-solid {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================================
   GRADIENTES DE TEXTO — Exactos del sitio web
   ============================================================ */
.gradient-text {
  background: var(--gradient-brand);   /* #22d3ee → #818cf8 */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-diagonal {
  background: var(--gradient-brand-diagonal);  /* #06b6d4 → #8b5cf6 */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   CANAL CHIPS
   ============================================================ */
.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.channel-chip.whatsapp  { background: rgba(37, 211, 102, 0.15); color: var(--ch-whatsapp); }
.channel-chip.facebook  { background: rgba(24, 119, 242, 0.15); color: var(--ch-facebook); }
.channel-chip.instagram { background: rgba(225, 48, 108, 0.15); color: var(--ch-instagram); }
.channel-chip.email     { background: rgba(234, 67, 53, 0.15);  color: var(--ch-email); }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}
.badge-lead        { background: rgba(99,102,241,0.15);  color: #818cf8; }
.badge-prospect    { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.badge-negotiation { background: rgba(59,130,246,0.15);  color: #60a5fa; }
.badge-customer    { background: rgba(6,182,212,0.15);   color: var(--accent-primary); }
.badge-inactive    { background: rgba(239,68,68,0.15);   color: #f87171; }
.badge-open        { background: rgba(99,102,241,0.15);  color: #818cf8; }
.badge-in-progress { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.badge-resolved    { background: rgba(16,185,129,0.15);  color: #34d399; }
.badge-success     { background: rgba(16,185,129,0.15);  color: #34d399; }
.badge-danger      { background: rgba(239,68,68,0.15);   color: #f87171; }
.badge-warning     { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.badge-info        { background: rgba(59,130,246,0.15);  color: #60a5fa; }
.badge-low         { background: rgba(100,116,139,0.15); color: #94a3b8; }
.badge-medium      { background: rgba(59,130,246,0.15);  color: #60a5fa; }
.badge-high        { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.badge-urgent      { background: rgba(239,68,68,0.15);   color: #f87171; }
