/* Importar Fuentes Premium */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Variables de Diseño */
:root {
  --font-title: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Paleta Azul Metálico y Negro Oscuro */
  --bg-main: #000000;              /* Negro absoluto */
  --bg-card: #0c0f12;              /* Fondo de tarjeta negro azulado muy oscuro */
  --bg-sidebar: #050608;           /* Fondo de menú lateral negro metálico */
  --border-color: #1e2530;         /* Bordes azul metálico oscuro */
  --border-focus: #0066ff;         /* Enfoque en azul neón */
  
  /* Colores de Marca y Estados */
  --color-primary: #002d72;        /* Azul metálico profundo */
  --color-primary-hover: #0044a6;  /* Azul metálico medio */
  --color-accent: #0066ff;         /* Azul Metálico Neón (Vibrante/Neon) */
  --color-accent-hover: #3385ff;   /* Hover azul neón claro */
  
  --color-success: #057642;        /* Verde LinkedIn */
  --color-warning: #3b82f6;        /* Usamos azul metálico para advertencias */
  --color-danger: #d11124;         /* Rojo Peligro */
  --color-inactive: #4b5563;       /* Gris Desactivado */
  
  /* Textos */
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-dark: #0d1117;

  /* Sombras y Efectos */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.7);
  --glass: rgba(22, 27, 34, 0.75);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbars Personalizados */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Estructura de Páginas de la SPA */
.app-container {
  display: flex;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* --- VISTA DE LOGIN (DOS COLUMNAS PREMIUM) --- */
.login-view {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  background-color: var(--bg-main);
}

.login-left {
  flex: 1.2;
  position: relative;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(5, 7, 10, 0.98) 100%), 
              url('https://images.unsplash.com/photo-1560179707-f14e90ef3623?q=80&w=1470&auto=format&fit=crop') no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5% 6%;
}

.login-left::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 20% 30%, rgba(10, 102, 194, 0.15) 0%, transparent 70%);
  z-index: 1;
}

.login-logo {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.login-logo span {
  color: var(--color-accent);
}

.login-left-content {
  z-index: 2;
  margin-top: auto;
  margin-bottom: auto;
}

.login-left-content h1 {
  font-family: var(--font-title);
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
}

.login-left-content h1 span {
  color: var(--color-accent);
  background: linear-gradient(90deg, var(--color-accent), #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-left-content p {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 500px;
  margin-bottom: 30px;
}

.login-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 40px;
}

.login-feature-card {
  background: rgba(22, 27, 34, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 15px;
  backdrop-filter: blur(5px);
}

.login-feature-card h4 {
  color: var(--color-accent);
  font-size: 14px;
  margin-bottom: 5px;
  font-family: var(--font-title);
}

.login-feature-card p {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.login-left-footer {
  z-index: 2;
  color: var(--text-muted);
  font-size: 13px;
}

.login-right {
  width: 500px;
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  position: relative;
}

.login-right-header {
  margin-bottom: 40px;
}

.login-badge {
  background: rgba(112, 181, 249, 0.1);
  color: var(--color-accent);
  border: 1px solid rgba(112, 181, 249, 0.2);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

.login-right-header h2 {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-right-header p {
  color: var(--text-muted);
  font-size: 15px;
}

.login-form-group {
  margin-bottom: 24px;
  position: relative;
}

.login-form-group label {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

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

.login-input-wrapper > i,
.login-input-wrapper > svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  width: 18px;
  height: 18px;
  z-index: 10;
}

.login-toggle-password i,
.login-toggle-password svg {
  width: 18px;
  height: 18px;
  color: inherit;
}

.login-input-wrapper input {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 14px 40px 14px 45px;
  font-size: 15px;
  font-family: var(--font-body);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.login-toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
  width: 36px;
  height: 36px;
}

.login-toggle-password:hover {
  color: var(--text-main);
}


.login-input-wrapper input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(112, 181, 249, 0.15);
}

.login-btn-submit {
  width: 100%;
  background: var(--color-accent);
  color: var(--text-main);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  margin-top: 30px;
  font-family: var(--font-title);
}

.login-btn-submit:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
}

.login-error-msg {
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.2);
  color: var(--color-danger);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

/* --- SIDEBAR --- */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 20px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-logo {
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
}

.sidebar-logo span {
  color: var(--color-accent);
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
}

.sidebar-item a:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.03);
}

.sidebar-item.active a {
  color: var(--text-main);
  background: rgba(10, 102, 194, 0.15);
  border: 1px solid rgba(10, 102, 194, 0.2);
}

.sidebar-item.active a i {
  color: var(--color-primary);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.sidebar-profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-main);
  flex-shrink: 0;
}

.sidebar-profile-info h4 {
  font-size: 14px;
  font-weight: 600;
}

.sidebar-profile-info p {
  color: var(--text-muted);
  font-size: 12px;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-danger);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.sidebar-logout:hover {
  background: rgba(248, 81, 73, 0.1);
}

/* --- CONTENIDO PRINCIPAL --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  background-color: var(--bg-main);
  overflow-y: auto;
}

.main-header {
  height: 80px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background-color: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.main-header-title h2 {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
}

.main-header-title p {
  color: var(--text-muted);
  font-size: 13px;
}

.main-header-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Selector de Idioma (Pill Switch) */
.lang-switch {
  display: flex;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 4px;
  position: relative;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-title);
}

.lang-btn.active {
  background-color: var(--color-accent);
  color: var(--text-main);
}

.view-section {
  padding: 40px;
  flex: 1;
}

/* --- DASHBOARD VIEW --- */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.dash-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.dash-card:hover {
  transform: translateY(-4px);
  border-color: rgba(10, 102, 194, 0.4);
}

.dash-card-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: rgba(10, 102, 194, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.dash-card:nth-child(2) .dash-card-icon {
  background: rgba(96, 165, 250, 0.1);
  color: var(--color-accent);
}

.dash-card:nth-child(3) .dash-card-icon {
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-accent-hover);
}

.dash-card:nth-child(4) .dash-card-icon {
  background: rgba(30, 64, 175, 0.15);
  color: #93c5fd;
}

.dash-card-info p {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.dash-card-info h3 {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 800;
  margin-top: 4px;
}

/* Panel Inferior del Dashboard */
.dash-bottom-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 30px;
}

.panel-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
}

.panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.panel-card-header h3 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Embudo de Conversión */
.funnel-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
}

.funnel-stage {
  display: flex;
  align-items: center;
}

.funnel-label {
  width: 140px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.funnel-bar-wrapper {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  height: 28px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.funnel-bar {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width 1s ease-out;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 15px;
}

.funnel-stage:nth-child(1) .funnel-bar {
  background: linear-gradient(90deg, #1d4ed8 0%, #60a5fa 100%);
}

.funnel-stage:nth-child(2) .funnel-bar {
  background: linear-gradient(90deg, #1e40af 0%, #3b82f6 100%);
}

.funnel-stage:nth-child(3) .funnel-bar {
  background: linear-gradient(90deg, #172554 0%, #1d4ed8 100%);
}

.funnel-stage:nth-child(4) .funnel-bar {
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 100%);
}

.funnel-value {
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Gráfico Radial de Ratio de Actividad */
.donut-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}

.donut-svg-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
}

.donut-svg-wrapper svg {
  transform: rotate(-90deg);
}

.donut-bg {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 12;
}

.donut-fill {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease-out;
}

.donut-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-text h4 {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 800;
}

.donut-text p {
  font-size: 11px;
  color: var(--text-muted);
}

.donut-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  width: 100%;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Feed de Actividad Reciente */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 5px;
}

.activity-item {
  display: flex;
  gap: 15px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.activity-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.activity-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--color-primary);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.activity-dot.success { background-color: var(--color-success); box-shadow: 0 0 0 2px var(--color-success); }
.activity-dot.failed { background-color: var(--color-danger); box-shadow: 0 0 0 2px var(--color-danger); }
.activity-dot.warning { background-color: var(--color-warning); box-shadow: 0 0 0 2px var(--color-warning); }

.activity-line {
  flex: 1;
  width: 2px;
  background-color: var(--border-color);
  margin-top: 4px;
}

.activity-content {
  flex: 1;
}

.activity-content p {
  font-size: 13.5px;
  line-height: 1.4;
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* --- PIPELINE VIEW (KANBAN) --- */
.pipeline-view {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 80px);
  padding: 30px;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  flex: 1;
  overflow-x: auto;
  padding-bottom: 15px;
  margin-top: 20px;
  align-items: stretch;
}

.pipeline-column {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.pipeline-column-header {
  padding: 16px 20px;
  border-bottom: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pipeline-column-header h4 {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
}

.pipeline-column-header .badge {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
}

.pipeline-card-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
}

.pipeline-card-list.drag-over {
  background-color: rgba(10, 102, 194, 0.03);
  border: 1px dashed rgba(10, 102, 194, 0.4);
  border-radius: var(--radius-sm);
}

/* Kanban Cards */
.pipeline-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: grab;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pipeline-card:active {
  cursor: grabbing;
}

.pipeline-card:hover {
  transform: translateY(-2px);
  border-color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

.pipeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pipeline-card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  flex-shrink: 0;
}

.pipeline-card-status-pill {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 50px;
  background-color: rgba(35, 134, 54, 0.15);
  color: #2ea043;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pipeline-card-status-pill.inactive {
  background-color: rgba(248, 81, 73, 0.15);
  color: var(--color-danger);
}

.pipeline-card-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.pipeline-card-job {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.pipeline-card-company {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pipeline-card-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Botones y Acciones en Tarjeta */
.card-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.card-action-status {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

.card-action-status.done {
  color: var(--color-success);
}

.card-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.card-btn.accent {
  background: rgba(112, 181, 249, 0.15);
  border-color: rgba(112, 181, 249, 0.3);
  color: var(--color-accent);
}

.card-btn.accent:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--text-main);
}

.pdf-upload-wrapper {
  position: relative;
  overflow: hidden;
}

.pdf-upload-wrapper input[type="file"] {
  position: absolute;
  left: 0; top: 0; opacity: 0;
  width: 100%; height: 100%;
  cursor: pointer;
}

/* Post list en estudio */
.posts-study-drawer {
  margin-top: 8px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 11px;
  display: none;
}

.posts-study-drawer.active {
  display: block;
}

.posts-study-title {
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
}

.post-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6px 0;
}

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

.post-text {
  color: var(--text-main);
  line-height: 1.3;
}

.post-meta {
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  gap: 10px;
}

/* --- LEADS VIEW (TABLA Y BUSCADOR) --- */
.leads-table-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 24px;
}

.leads-filters {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.leads-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.leads-search-wrapper i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.leads-search-wrapper input {
  width: 100%;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 15px 10px 40px;
  font-size: 14px;
}

.leads-search-wrapper input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.leads-select-filters {
  display: flex;
  gap: 10px;
}

.filter-select {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--text-main);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  font-family: var(--font-title);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.leads-table th {
  background-color: rgba(0, 0, 0, 0.15);
  padding: 16px 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.leads-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

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

.leads-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.01);
}

.lead-name-cell {
  display: flex;
  align-items: center;
  gap: 15px;
}

.lead-avatar-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  flex-shrink: 0;
}

.lead-detail-info h4 {
  font-size: 15px;
  font-weight: 600;
}

.lead-detail-info p {
  color: var(--text-muted);
  font-size: 12px;
}

.lead-linkedin-link {
  color: var(--color-primary-hover);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lead-linkedin-link:hover {
  text-decoration: underline;
}

.leads-table td .badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.badge.day1 { background-color: rgba(10, 102, 194, 0.15); color: #4dabf7; }
.badge.day2 { background-color: rgba(240, 120, 16, 0.15); color: #ffa94d; }
.badge.day3 { background-color: rgba(35, 134, 54, 0.15); color: #69db7c; }
.badge.day4 { background-color: rgba(210, 153, 34, 0.15); color: #ffd43b; }
.badge.synergy { background-color: rgba(156, 39, 176, 0.15); color: #da77f2; }

/* Modales */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

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

.modal-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: translateY(-20px);
  transition: var(--transition);
}

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

.modal-header {
  padding: 24px 30px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 30px;
  max-height: 70vh;
  overflow-y: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input, .form-group select {
  width: 100%;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

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

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}


/* --- PLANTILLAS VIEW --- */
.pitches-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
  margin-top: 24px;
}

.pitches-list {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.pitch-item-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.pitch-item-card:hover, .pitch-item-card.active {
  border-color: var(--color-accent);
  background-color: rgba(240, 120, 16, 0.03);
}

.pitch-item-card h4 {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.pitch-item-card p {
  font-size: 12px;
  color: var(--text-muted);
}

.pitch-editor-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag-btn {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 50px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tag-btn:hover {
  background-color: rgba(10, 102, 194, 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary-hover);
}

.textarea-pitch {
  width: 100%;
  height: 120px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  resize: vertical;
  outline: none;
  margin-bottom: 20px;
}

.textarea-pitch:focus {
  border-color: var(--color-primary);
}

.pitch-preview-box {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 15px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #c9d1d9;
  min-height: 80px;
}

/* --- CONFIG VIEW --- */
.config-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 24px;
}

.config-section-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.config-section-card h3 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-form-group {
  margin-bottom: 20px;
}

.config-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.config-form-group .sublabel {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.config-form-group input {
  width: 100%;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 12px;
  font-size: 14px;
}

.config-form-group input:focus {
  border-color: var(--color-primary);
  outline: none;
}

.n8n-url-box {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.n8n-url-box input {
  flex: 1;
}

.n8n-url-box button {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0 15px;
  cursor: pointer;
}

.n8n-url-box button:hover {
  color: var(--text-main);
}

.endpoint-indicator {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  font-family: monospace;
  font-size: 12px;
  color: #58a6ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
}

.endpoint-indicator span.method {
  background-color: rgba(88, 166, 255, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

.endpoint-indicator span.method.post {
  color: #56d364;
  background-color: rgba(86, 211, 100, 0.15);
}

/* Simulador Console Log */
.simulation-console {
  background-color: #010409;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 15px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12.5px;
  height: 200px;
  overflow-y: auto;
  color: #39ff14; /* Neon Green */
  margin-top: 15px;
}

.simulation-console-line {
  margin-bottom: 6px;
  line-height: 1.4;
}

.simulation-console-line.info { color: #58a6ff; }
.simulation-console-line.warn { color: var(--color-warning); }
.simulation-console-line.error { color: var(--color-danger); }

/* --- RESPONSIVIDAD GENERAL --- */
@media (max-width: 1200px) {
  .dash-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-bottom-grid {
    grid-template-columns: 1fr;
  }
  .pitches-layout {
    grid-template-columns: 1fr;
  }
  .config-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    padding: 20px;
  }
  .sidebar-logo {
    margin-bottom: 20px;
  }
  .sidebar-menu {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sidebar-footer {
    display: none;
  }
  .main-header {
    padding: 0 20px;
  }
  .view-section {
    padding: 20px;
  }
  .login-view {
    flex-direction: column;
  }
  .login-left {
    display: none;
  }
  .login-right {
    width: 100%;
    padding: 40px 20px;
  }
}
