/* =========================================
   1. COMPONENTES DEL SIDEBAR Y LOGO (CLON)
   ========================================= */

/* Contenedor principal del logo */
.brand-header {
  display: flex; /* Flexbox para poner el círculo y el texto uno al lado del otro */
  align-items: center; /* Centra verticalmente el contenido */
  gap: 12px; /* Espacio exacto de 12px entre el círculo y el texto */
  margin-bottom: 16px;
}

/* El círculo con la inicial del logo */
.brand-logo-circle {
  width: 42px;
  height: 42px;
  background-color: var(--accent-color); /* Usa nuestro verde corporativo */
  color: white;
  border-radius: 50%; /* 50% hace que un cuadrado perfecto se convierta en un círculo */
  display: flex;
  align-items: center; /* Centra la letra verticalmente */
  justify-content: center; /* Centra la letra horizontalmente */
  font-size: 1.5rem;
  font-weight: 900; /* El peso máximo de nuestra fuente Nunito */
}

/* Agrupa el nombre y el subtítulo para apilarlos verticalmente */
.brand-text {
  display: flex;
  flex-direction: column;
}

/* El nombre principal de la app */
.brand-name {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1; /* Altura de línea muy ajustada para que no haya espacio extra arriba/abajo */
  position: relative; /* Necesario por si posicionamos elementos absolutos dentro */
  letter-spacing: -0.5px; /* Junta las letras un poco para darle un aspecto más de "marca" */
}

/* El punto cyan decorativo al final del nombre */
.brand-dot {
  display: inline-block; /* Permite darle ancho y alto sin que rompa la línea de texto */
  width: 8px;
  height: 8px;
  background-color: #00E5FF;
  border-radius: 50%;
  margin-left: 4px; /* Lo separa un poco de la última letra */
}

/* Subtítulo bajo el logo */
.brand-subtitle {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-subtitle);
  letter-spacing: 1px; /* Separa las letras para que sea legible al ser tan pequeño */
  margin-top: 4px;
}

/* --- MÉTRICAS DEL SIDEBAR --- */
.brand-stats {
  display: flex;
  gap: 8px; /* Espacio entre los globos de métricas */
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color); /* Línea divisoria inferior */
}

/* Estilo base de cada etiqueta de métrica (To Do / Hechas) */
.stat-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: white;
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: var(--radius-pill); /* Bordes redondeados al máximo (estilo píldora) */
  color: var(--text-muted);
}

/* Clases de utilidad para colorear textos específicos */
.text-red { color: var(--danger-color); font-weight: 800; }
.text-green { color: var(--accent-color); font-weight: 800; }

/* --- BOTONES MASIVOS SIDEBAR --- */
.sidebar-action-buttons {
  display: flex;
  flex-direction: column; /* Apila los botones uno debajo de otro */
  gap: 12px;
  margin-bottom: 32px;
}

/* Estilo base para los botones grandes */
.btn-massive {
  width: 100%; /* Ocupan todo el ancho del menú lateral */
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  border: none;
  font-family: inherit; /* Hereda Nunito en lugar de usar la fuente por defecto del navegador */
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase; /* Convierte todo a mayúsculas automáticamente */
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.5px;
  
  /* Transición múltiple: suaviza el movimiento (transform) y el brillo (filter) */
  transition: transform 0.1s ease, filter 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Efecto al pasar el ratón: Aumenta el brillo y sube 1 pixel */
.btn-massive:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Efecto al hacer clic: Se hunde 1 pixel hacia abajo */
.btn-massive:active {
  transform: translateY(1px);
}

/* Variantes de color para los botones masivos */
.btn-red { background-color: var(--danger-color); }
.btn-green { background-color: var(--accent-color); }

/* Punto blanco decorativo dentro del botón rojo */
.dot-white {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 50%;
}

/* --- NAVEGACIÓN Y PERFIL --- */
.main-nav ul { list-style: none; /* Quita los puntos por defecto de las listas HTML */ }

.main-nav a {
  text-decoration: none; /* Quita el subrayado de los links */
  color: var(--text-muted);
  display: block; /* Hace que toda la fila sea clicable, no solo el texto */
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  font-weight: 600; 
}

/* Estado activo o al pasar el ratón en el menú */
.main-nav a:hover, .main-nav a.active {
  background-color: var(--accent-light); /* Fondo verde super clarito */
  color: var(--accent-color);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Reajuste del margen para el avatar de la cuenta (rompe la regla de las tarjetas) */
.user-avatar { margin-left: 0; width: 32px; height: 32px; }


/* =========================================
   2. COMPONENTES DEL TOP BAR
   ========================================= */

.board-title {
  font-size: 1.3rem; 
  font-weight: 900;
  color: white; /* Trello usa blanco para que resalte sobre el fondo de color */
  margin: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2); /* Sombrita sutil para leerlo mejor */
}

/* --- MAGIA TRELLO: Estilos de cristal SOLO para los botones de la cabecera --- */
.top-bar .btn-icon-muted,
.top-bar .btn-pastel-blue,
.top-bar .btn-text-danger {
  background-color: rgba(255, 255, 255, 0.25) !important; /* Blanco semitransparente */
  backdrop-filter: blur(4px);
  color: white !important;
  border: none !important;
  box-shadow: none !important;
}

/* Efecto al pasar el ratón (se vuelve un poco más opaco) */
.top-bar .btn-icon-muted:hover,
.top-bar .btn-pastel-blue:hover,
.top-bar .btn-text-danger:hover {
  background-color: rgba(255, 255, 255, 0.4) !important;
}

/* El botón principal de Nueva Tarea lo hacemos blanco sólido para que llame la atención */
.top-bar .btn-pastel-green {
  background-color: white !important;
  color: #172b4d !important; /* Azul marino corporativo */
  border: none !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
}
.top-bar .btn-pastel-green:hover {
  background-color: #f4f5f7 !important;
}

/* Botón principal (Nueva Tarea) */
.btn-primary {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  /* Sombra coloreada (verde transparente) para dar volumen y aspecto premium */
  box-shadow: 0 4px 10px rgba(var(--accent-color-rgb), 0.2);
  transition: all 0.2s ease;
}

.btn-primary:hover { 
  transform: translateY(-1px); 
  filter: brightness(1.1);
}

/* Escala el botón al 97% al hacer clic, creando un efecto de pulsación realista */
.btn-primary:active {
  transform: scale(0.97);
}

/* Botón secundario (Nueva Columna) */
.btn-secondary {
  background-color: white;
  color: var(--text-main);
  border: 1px solid var(--border-color); /* Borde gris sutil */
  padding: 9px 19px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--text-main); /* El borde se oscurece al pasar el ratón */
}


/* =========================================
   3. COMPONENTES DE COLUMNA Y CABECERA
   ========================================= */

.column {
  background-color: var(--bg-column);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  /* EL FIX: Le decimos que como máximo mida la pantalla (100vh) 
     menos el alto aproximado de la cabecera y paddings (130px) */
  max-height: calc(100vh - 130px); 
}

/* Cabecera de la columna usando GRID TRICK para centrado perfecto */
.column-header {
  padding: 16px 20px;
  display: grid;
  /* 3 columnas: 
     1fr = Espacio vacío a la izq. 
     auto = Tamaño exacto del texto al centro. 
     1fr = Espacio libre a la der. */
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.column-title {
  grid-column: 1 / 4; /* Que ocupe todo el ancho para alinearse a la izquierda si queremos */
  font-size: 0.95rem; /* Más sutil, como en Trello */
  font-weight: 700;
  text-align: left; /* Trello alinea los títulos a la izquierda */
  color: #240655; /* El azul marino*/
  
  outline: none;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  cursor: text;
  transition: all 0.2s;
}

/* Efecto al pasar el ratón */
.column-title:hover {
  background-color: rgba(0,0,0,0.05);
}

/* Efecto cuando estás escribiendo dentro */
.column-title:focus {
  background-color: white;
  box-shadow: 0 0 0 2px var(--accent-color);
}

/* Globo contador de tarjetas */
.card-count {
  grid-column: 3; /* Obliga al contador a vivir en la columna derecha del grid */
  justify-self: end; /* Lo empuja hacia la esquina derecha máxima */
  background-color: white;
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-main);
}


/* =========================================
   4. COMPONENTES DE LA TARJETA (CARD)
   ========================================= */

.card {
  background-color: #ffffff;
  /* Reducimos el padding y dejamos espacio a la derecha para los 3 puntos */
  padding: 10px 32px 10px 12px; 
  border-radius: 8px; /* Trello usa curvas más suaves (8px en lugar de 12px) */
  border: none; /* Quitamos los bordes sólidos */
  /* La inconfundible sombra sutil de Trello */
  box-shadow: 0 1px 1px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
  cursor: pointer; 
  position: relative;
  transition: background-color 0.1s ease;
}

.card:hover {
  background-color: #f4f5f7; /* Gris muy clarito al pasar el ratón */
}

.card:active { 
  cursor: grabbing; 
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

/* --- ETIQUETAS DE PRIORIDAD (Estilo Trello puro con CSS puro) --- */
/* En lugar de un borde lateral, creamos una pequeña píldora pastel encima del título */
.card-title::before {
  content: '';
  display: none; /* Oculto por defecto */
  width: 40px;
  height: 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

/* Mostramos la píldora con nuestros colores pastel según la prioridad */
.card[data-priority="high"] .card-title::before { display: block; background-color: var(--col-red); }
.card[data-priority="medium"] .card-title::before { display: block; background-color: var(--col-yellow); }
.card[data-priority="low"] .card-title::before { display: block; background-color: var(--col-green); }

.card-title {
  font-size: 0.9rem; /* Más pequeño y elegante */
  font-weight: 500; /* Trello no usa negritas extremas en los títulos */
  color: #172b4d; /* Azul/gris muy oscuro, estándar de Atlassian */
  line-height: 1.4;
  margin-bottom: 6px;
}

.card-description {
  font-size: 0.8rem;
  color: #5e6c84;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Reducimos a 2 líneas para que las tarjetas sean más compactas */
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- FECHAS DE VENCIMIENTO --- */
.badge-date {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.date-normal { background: transparent; color: #5e6c84; }
.date-warning { background: var(--col-yellow); color: #172b4d; }
.date-overdue { background: var(--col-red); color: white; }

/* --- AVATARES DE USUARIO --- */
.card-footer {
  display: flex;
  justify-content: flex-end;
}
.avatars-group { display: flex; }
.avatar {
  width: 24px; /* Avatares más pequeños */
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  border: 2px solid white;
  margin-left: -6px;
}
.creator-avatar { background-color: #dfe1e6; color: #172b4d; z-index: 1; }
.assignee-avatar { background-color: var(--col-blue); color: white; z-index: 2; }




/* =========================================
   5. FOOTER DE COLUMNA Y SELECTOR DE COLOR
   ========================================= */

.column-footer {
  padding: 8px 12px 12px 12px;
  margin-top: 4px; /* Cambiamos 'auto' por un valor fijo para evitar comportamientos erráticos del scroll */
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* --- ESTILOS DE LOS NUEVOS BOTONES DE ICONO --- */
.column-header-actions {
  display: flex;
  align-items: center;
  gap: 12px; /* Añade el espacio solicitado entre el contador y el icono de archivo */
}

/* Botón fantasma (invisible por defecto) para añadir tarjetas */
.btn-add-card {
  flex: 1; /* Ocupa todo el espacio sobrante que deja el selector de color */
  padding: 8px 12px;
  background-color: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add-card:hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--text-main);
}

.btn-add-card:active {
  background-color: rgba(0, 0, 0, 0.1);
}

.btn-icon-muted, .btn-icon-danger {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-muted:hover { background: var(--bg-app); }

.btn-icon-danger { color: var(--danger-color); }
.btn-icon-danger:hover {
  background: var(--danger-color);
  border-color: var(--danger-color);
  color: white; /* Hará que el emoji (si es fuente) o SVG se vuelva blanco */
}

/* --- NUEVO: Estilos personalizados para la barra de scroll (Scrollbar) --- */
/* Afecta a cualquier elemento con scroll (columnas principales y lista de tarjetas) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px; /* Para el scroll horizontal */
}

/* --- 3. SCROLLBAR: Estilo visible pero elegante (Solo en la lista) --- */
.card-list::-webkit-scrollbar {
  width: 6px;
}

.card-list::-webkit-scrollbar-track {
  background: transparent;
  margin: 8px 0; /* Deja un poco de aire arriba y abajo de la pista */
}

/* Se verá de color gris suave siempre que exista la barra */
.card-list::-webkit-scrollbar-thumb {
  background-color: #c4c1dd; 
  border-radius: var(--radius-pill);
}

/* Se oscurece al pasar el ratón para indicar que se puede interactuar */
.card-list::-webkit-scrollbar-thumb:hover {
  background-color: #94A3B8; 
}

/* --- SCROLLBAR HORIZONTAL: Tablero principal --- */
.board-canvas::-webkit-scrollbar {
  height: 10px; /* Un poco más gruesa para poder arrastrarla cómodamente */
}

.board-canvas::-webkit-scrollbar-track {
  background: transparent;
  /* El margen respeta el padding de 32px que tiene el tablero en los laterales */
  margin: 0 32px; 
}

.board-canvas::-webkit-scrollbar-thumb {
  background-color: #c4c1dd; /* Usamos tu variable de gris sutil */
  border-radius: var(--radius-pill);
}

.board-canvas::-webkit-scrollbar-thumb:hover {
  background-color: #94A3B8; /* Se oscurece al pasar el ratón */
}


/* --- SELECTOR DE COLOR (POPUP SIN JS) --- */

/* El contenedor actúa como ancla (relative) para que la paleta (absolute) se posicione respecto a él */
.color-picker-wrapper { position: relative; }

/* Botón que muestra el color actual */
.btn-color-picker {
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.btn-color-picker:hover { background-color: rgba(0, 0, 0, 0.06); }

/* Circulito interno de muestra */
.color-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
}

.current-column-color { background-color: var(--bg-column); }

/* La ventana emergente de colores */
.color-palette {
  position: absolute; /* Se "sale" del flujo normal para flotar por encima */
  bottom: 110%; /* Se dibuja justo encima del botón (100% de la altura del botón + 10%) */
  right: 0; /* Alineado al borde derecho de su ancla */
  background-color: white;
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: var(--shadow-hover);
  border: 1px solid rgba(0,0,0,0.05);
  
  /* Sistema de cuadrícula para los 9 colores */
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columnas iguales */
  gap: 8px;
  
  /* Estado por defecto: Oculto, transparente y desplazado 10px hacia abajo */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 10; /* Se asegura de estar por encima de las tarjetas */
}

/* La "magia": Cuando pasas el ratón por el contenedor, la paleta cambia su estado y se muestra */
.color-picker-wrapper:hover .color-palette {
  opacity: 1;
  visibility: visible;
  transform: translateY(0); /* Sube a su posición original */
}

/* Los círculos de color individuales dentro de la paleta */
.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.1);
  transition: transform 0.1s ease;
}

/* Efecto lupa en el color seleccionado */
.color-swatch:hover { transform: scale(1.15); }

/* Las variables de color aplicadas (definidas en variables.css) */
.swatch-blue { background-color: var(--col-blue); }
.swatch-green { background-color: var(--col-green); }
.swatch-yellow { background-color: var(--col-yellow); }
.swatch-orange { background-color: var(--col-orange); }
.swatch-red { background-color: var(--col-red); }
.swatch-white { background-color: var(--col-white); }
.swatch-gray { background-color: var(--col-gray); }
.swatch-purple { background-color: var(--col-purple); }
.swatch-pink { background-color: var(--col-pink); }

/* =========================================
   6. FILTROS Y BÚSQUEDA (TOP BAR)
   ========================================= */
.board-filters {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Input de búsqueda estilo Trello (Cristalino) */
.filter-search {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: none;
  background-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  width: 250px;
  outline: none;
  transition: all 0.2s ease;
}

/* Cambia el color del texto falso (placeholder) a blanco */
.filter-search::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

/* Cuando pinchas para escribir, se vuelve blanco sólido */
.filter-search:focus {
  background-color: white;
  color: var(--text-dark);
}

.filter-pills {
  display: flex;
  gap: 8px;
}

/* Botones de filtro estilo Trello */
.filter-pill {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: none;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill:hover { background: rgba(255, 255, 255, 0.4); }

/* Filtro seleccionado (blanco sólido) */
.filter-pill.active {
  background: white;
  color: var(--text-dark);
}

.filter-search, .filter-pill {
  height: 38px; /* Fijamos altura exacta */
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

/* Botón hamburguesa (Oculto por defecto en PC) */
.btn-mobile-menu {
  display: none;
  background: white;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Forzamos que se muestre en móviles desde los componentes */
@media (max-width: 1024px) {
  .btn-mobile-menu {
    display: block;
  }
}

/* =========================================
   7. MENÚ CONTEXTUAL DE LA TARJETA (···)
   ========================================= */
.card-tags-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-menu-wrapper { 
  position: absolute; 
  top: 8px; 
  right: 8px; 
}

/* El botón de los 3 puntitos */
.btn-card-menu {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.btn-card-menu:hover {
  background: var(--bg-app);
  color: var(--text-dark);
}

/* --- NUEVOS BOTONES PASTEL --- */
.btn-pastel-blue {
  background-color: #E0F2FE;
  color: #0284C7;
  border: none;
  padding: 0 16px;
  height: 38px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-pastel-blue:hover { background-color: #BAE6FD; }

.btn-pastel-green {
  background-color: #DCFCE7;
  color: #16A34A;
  border: none;
  padding: 0 16px;
  height: 38px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-pastel-green:hover { background-color: #BBF7D0; }

/* El desplegable inteligente (Fixed Position) */
.card-dropdown {
  position: fixed; /* VITAL: Lo saca de la columna, anclándolo a la pantalla del usuario */
  background: white;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-hover);
  border-radius: var(--radius-md);
  min-width: 150px;
  display: none; 
  flex-direction: column;
  padding: 8px;
  z-index: 999999; /* Z-index supremo para sobreponerse a todo */
}

.card-dropdown a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.card-dropdown a:hover { background: var(--bg-app); }


/* =========================================
   8. FECHAS DE VENCIMIENTO
   ========================================= */
.badge-date {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Fecha normal (Gris) */
.date-normal { background: var(--bg-app); color: var(--text-muted); }

/* Vence pronto (Naranja) */
.date-warning { background: #FEF3C7; color: #D97706; }

/* Vencida (Rojo fuego invertido para máxima alerta) */
.date-overdue { background: var(--dangerdate-color); color: white; }


/* =========================================
   9. FEEDBACK VISUAL: DRAG & DROP
   ========================================= */
/* Estas clases las añadiremos con JavaScript cuando el usuario arrastre */

/* Estilo para la tarjeta que estás arrastrando en el aire */
.is-dragging {
  opacity: 0.5;
  transform: rotate(3deg) scale(1.02);
  cursor: grabbing !important;
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Estilo para la columna cuando le pasas una tarjeta por encima */
.drag-over {
  background-color: var(--accent-light) !important;
  border: 2px dashed var(--accent-color) !important;
}


/* =========================================
   10. ESTADO VACÍO (EMPTY STATE)
   ========================================= */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 10px; /* Menos espacio para no empujar todo hacia abajo */
  text-align: center;
  border: none; /* ¡Fuera las rayas! */
  background: transparent;
  margin-top: 4px;
}

.empty-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.empty-state span {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94A3B8;
}

/* --- LÓGICA CONDICIONAL CSS --- */
/* Si la lista de tarjetas contiene al menos un elemento con la clase .card, 
   ocultamos el estado vacío automáticamente */
.card-list:has(.card) .empty-state {
  display: none;
}

/* =========================================
   11. VENTANA EMERGENTE (MODAL)
   ========================================= */

/* Fondo oscuro desenfocado (Backdrop) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(18, 24, 40, 0.4); 
  backdrop-filter: blur(4px); 
  display: flex;
  align-items: center; 
  justify-content: center; 
  z-index: 1000; 
  
  /* Transición suave para aparecer/desaparecer */
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* CLASE PARA OCULTAR EL MODAL CON JAVASCRIPT */
.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* Evita clics fantasma cuando está invisible */
}

/* Tarjeta central del formulario */
.modal-card {
  background-color: white;
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(var(--accent-color-rgb), 0.15);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color); /* Borde sutil premium */
  
  /* Se anima solo cuando el contenedor NO tiene la clase hidden */
  transform: scale(1);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Efecto de "salto" inverso al ocultar */
.modal-overlay.hidden .modal-card {
  transform: scale(0.95);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text-dark);
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-modal:hover {
  background-color: var(--bg-column);
  color: var(--danger-color); /* Se pone rojo al pasar el ratón para indicar cierre */
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --- ESTILOS DE FORMULARIO CLON HEALTH-TECH --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: flex;
  gap: 16px;
}
.form-row > .form-group { flex: 1; }

.form-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Estilo unificado para inputs (Adaptado a tu Top Bar) */
.form-input, .form-select {
  padding: 10px 16px;
  border: 1px solid var(--border-color); /* Borde fino premium */
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  background-color: white;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02); /* Sombra interior ligerísima */
  transition: all 0.2s ease;
  outline: none;
  resize: vertical; 
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
  opacity: 0.7;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  background-color: var(--bg-column); /* Usa el fondo azul/gris claro de tus columnas */
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg); 
}

/* =========================================
   12. MENÚ CONTEXTUAL DE COLUMNAS
   ========================================= */
.column-menu-wrapper { position: relative; }

.column-dropdown {
  position: fixed; /* Fundamental para que coincida con las coordenadas del JS */
  background: white;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-hover);
  border-radius: var(--radius-md);
  min-width: 220px;
  display: none; 
  flex-direction: column;
  padding: 8px;
  z-index: 999999; /* Z-index supremo para pisar cualquier elemento */
}

.column-dropdown a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.column-dropdown a:hover { background: var(--bg-app); }


/* =========================================
   13. PAPELERA DE RECICLAJE
   ========================================= */
.btn-text-danger {
  background: transparent;
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-text-danger:hover {
  background: var(--danger-color);
  color: white;
  box-shadow: 0 4px 10px rgba(255, 26, 85, 0.2);
}

.trash-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: #FAFCFB;
}

.trash-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trash-item-title {
  font-weight: 800;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.trash-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* =========================================
   14. CONTROLES DE ZOOM
   ========================================= */
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: var(--radius-pill);
  padding: 4px 8px;
}

.zoom-controls #zoom-level-text {
  font-size: 0.8rem;
  font-weight: 800;
  color: white; /* Texto blanco */
  width: 45px;
  text-align: center;
  user-select: none; 
}

.zoom-controls .btn-zoom {
  border: none;
  background: transparent;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  font-weight: 900;
  color: white; /* Signos + y - en blanco */
}

.zoom-controls .btn-zoom:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* =========================================
   15. PANTALLA DE LOGIN (OVERLAY)
   ========================================= */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-app);
  z-index: 9999; /* Por encima de TODO */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Cuando el usuario inicie sesión correctamente, le añadiremos esta clase */
.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  background-color: white;
  width: 100%;
  max-width: 400px;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border-color);
}

/* =========================================
   16. MENÚ DESPLEGABLE DE USUARIO
   ========================================= */
.user-dropdown {
  position: absolute;
  bottom: 110%; /* Lo empuja hacia arriba, por encima del botón */
  left: 0;
  width: 100%; /* Que mida el mismo ancho que la barra lateral */
  background: white;
  border: 1px solid var(--border-color);
  box-shadow: 0 -4px 15px rgba(0,0,0,0.05); /* Sombra hacia arriba */
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  padding: 8px;
  z-index: 50;
  
  /* Estado por defecto: Oculto y desplazado hacia abajo */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

/* Clase que añadiremos con JS para mostrarlo */
.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-item {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px; /* Espacio entre el icono y el texto */
  transition: all 0.2s;
}

.user-dropdown-item:hover {
  background: var(--bg-app);
}

.user-dropdown-item.text-red:hover {
  background: #FFF0F2;
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 4px 0;
}


/* =========================================
   17. FONDOS DE TABLERO (DEGRADADOS)
   ========================================= */
.grad-1 { background: linear-gradient(135deg, #4A00E0 0%, #8E2DE2 50%, #eaafc8 100%) !important; background-size: cover !important; } /* Estilo captura Trello */
.grad-2 { background: linear-gradient(135deg, #0079bf 0%, #00B4DB 100%) !important; background-size: cover !important; } /* Azul Trello clásico */
.grad-3 { background: linear-gradient(135deg, #8A2387 0%, #E94057 50%, #F27121 100%) !important; background-size: cover !important; } /* Atardecer vibrante */
.grad-4 { background: linear-gradient(to right bottom, #00C9FF 0%, #92FE9D 100%) !important; background-size: cover !important; } /* Menta y agua */
.grad-5 { background: linear-gradient(135deg, #FC466B 0%, #3F5EFB 100%) !important; background-size: cover !important; } /* Fucsia a Azul eléctrico */
.grad-6 { background: linear-gradient(135deg, #f12711 0%, #f5af19 100%) !important; background-size: cover !important; } /* Fuego/Naranja */
.grad-7 { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important; background-size: cover !important; } /* Verde esmeralda */
.grad-8 { background: linear-gradient(135deg, #654ea3 0%, #eaafc8 100%) !important; background-size: cover !important; } /* Morado suave a rosa */
.grad-9 { background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%) !important; background-size: cover !important; } /* Cereza intenso */

/* Degradado exclusivo para el menú de Mis Tableros (Dashboard) */
.grad-dashboard { 
  background: linear-gradient(135deg, #2b2b36 0%, #4a1f64 100%) !important; 
  background-size: cover !important; 
}
.grad-teams { 
  background: linear-gradient(135deg, #6B46C1 0%, #1E1E28 100%) !important; 
  background-size: cover !important; 
}

/* Selector de fondos en el Top Bar */
.bg-picker-wrapper { position: relative; display: flex; align-items: center; }
.bg-dropdown {
  position: absolute; top: 100%; right: 0; background: white; border-radius: 8px;
  padding: 12px; box-shadow: 0 8px 16px rgba(0,0,0,0.15); display: grid;
  grid-template-columns: repeat(3, 1fr); gap: 8px; z-index: 100;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.2s;
}
.bg-picker-wrapper:hover .bg-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.bg-swatch { width: 40px; height: 30px; border-radius: 4px; cursor: pointer; transition: transform 0.1s; }
.bg-swatch:hover { transform: scale(1.1); }


/* =========================================
   18. COMPONENTES DEL CALENDARIO
   ========================================= */

/* --- BARRA LATERAL (LISTA) --- */
.calendar-sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-task-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Tarjeta fina (Estilo Lista) */
.task-thin-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.task-thin-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

/* Círculo de completado rápido */
.task-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.task-thin-card:hover .task-check {
  border-color: var(--accent-color);
}

/* Textos truncados */
.task-thin-info {
  flex: 1;
  min-width: 0; /* Truco vital para que el truncate funcione en Flexbox */
}

.task-thin-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Pone los puntos suspensivos (...) */
  margin-bottom: 2px;
}

.task-thin-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Círculo indicador de Tablero */
.board-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* --- CUADRÍCULA DEL CALENDARIO --- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr); /* 7 columnas iguales (Lunes a Domingo) */
  gap: 12px;
  flex: 1;
}

.day-name {
  text-align: center;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  text-transform: uppercase;
  padding-bottom: 8px;
}

/* Casilla de cada día */
.calendar-day {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-md);
  padding: 10px;
  height: 100px; /* ALTURA FIJA ESTRICTA */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  box-sizing: border-box; /* Asegura que el padding no engorde la caja */
}

/* Forzamos que el contenedor de los puntitos mida exactamente lo que miden los puntos */
.heat-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  margin-top: auto; /* Lo empuja siempre abajo del todo */
  height: 8px; /* Altura exacta del puntito */
}

.calendar-day:hover {
  background: white;
  transform: scale(1.03);
}

/* Días vacíos del mes anterior/siguiente */
.calendar-day.empty {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  cursor: default;
}
.calendar-day.empty:hover { transform: none; }

.day-number {
  font-weight: 900;
  color: var(--text-main);
  font-size: 1.1rem;
  margin-bottom: auto; /* Empuja los puntitos hacia abajo */
}

/* Puntos de calor (Prioridad) */
.heat-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 8px;
}

.heat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}


/* =========================================
   19. MODO OSCURO PREMIUM PARA EL SIDEBAR
   ========================================= */

.sidebar .brand-name,
.sidebar .user-name { color: #F8FAFC; }

.sidebar .brand-subtitle { color: #38BDF8; /* Cyan brillante estilo Tailwind */ }

/* Enlaces del menú (Gris pizarra claro) */
.sidebar .main-nav a {
  color: #94A3B8;
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

/* Hover súper limpio */
.sidebar .main-nav a:hover, 
.sidebar .main-nav a.active {
  background-color: rgba(255, 255, 255, 0.06);
  color: #F8FAFC;
}

/* Badges de métricas (To Do / Urgente) */
.sidebar .stat-badge {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #CBD5E1;
}

/* Nuevo Botón de Notificaciones del Sidebar */
.sidebar-notification-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 15px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #F8FAFC;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sidebar-notification-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.sidebar .sidebar-bottom { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.sidebar .user-profile span { color: #94A3B8 !important; }
.sidebar .user-name {
  color: white;
}

/* Subtítulo un poco más brillante para que contraste con el gris */
.sidebar .brand-subtitle {
  color: #92FE9D; 
}

/* Enlaces del menú (gris clarito) */
.sidebar .main-nav a {
  color: rgba(255, 255, 255, 0.7);
}

/* Enlaces al pasar el ratón (blanco y con fondo semitransparente) */
.sidebar .main-nav a:hover, 
.sidebar .main-nav a.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Badges de métricas (To Do / Urgente) */
.sidebar .stat-badge {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.9);
}

/* La línea separadora de la zona del perfil abajo */
.sidebar .sidebar-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* La flechita del menú de usuario */
.sidebar .user-profile span {
  color: rgba(255, 255, 255, 0.5) !important;
}




/* =========================================
   Cosas Varias
   ========================================= */

   /* --- FIX: Forzar salto de línea en textos largos --- */
.card-title, .card-description {
  overflow-wrap: break-word; /* Rompe la palabra si es más ancha que la tarjeta */
  word-wrap: break-word;
  word-break: break-word; 
  white-space: normal;
}

/* 1. Oculta las tareas archivadas por defecto */
.card.archived { display: none !important; }

/* 2. Muestra las tareas archivadas cuando la columna activa el modo archivo */
.column.show-archived .card.archived { 
  display: block !important; 
  opacity: 0.8; /* Le subimos un poco la opacidad para que se lean mejor ahora que están solas */
  filter: grayscale(100%);
}

/* 3. NUEVO: Oculta las tareas ACTIVAS cuando estamos en modo archivo */
.column.show-archived .card:not(.archived) {
  display: none !important;
}

/* 4. Modal nuevo tablero */
#modal-nuevo-tablero .modal-content {
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
}

/* 5 Menú de acciones del tablero */
.board-card { position: relative; }
.board-menu-wrapper { position: absolute; top: 10px; right: 10px; }
.board-dropdown {
  display: none; 
  position: absolute; /* FIX: Como la tarjeta tiene 'transform', el menú debe ser absolute */
  top: 100%; /* Nace justo debajo de los 3 puntitos */
  right: 0;  /* Alineado a la derecha */
  background: white; 
  border: 1px solid var(--border-color); 
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover); 
  z-index: 999999; 
  min-width: 180px; 
  text-align: left;
  flex-direction: column; 
  padding: 8px;
}
.board-dropdown a { 
  display: flex; 
  align-items: center; 
  gap: 8px;
  padding: 8px 12px; 
  text-decoration: none; 
  color: var(--text-main); 
  font-size: 0.85rem; 
  font-weight: 700; 
  border-radius: var(--radius-sm);
}
.board-dropdown a:hover { background-color: var(--bg-app); }

/* 6 Asegurar que las alertas y confirmaciones siempre queden por encima de otros modales */
#modal-confirmacion, #modal-notificacion {
  z-index: 9999 !important;
}


/* 7 --- SCROLLBAR: Lista del Calendario --- */
.calendar-task-list::-webkit-scrollbar {
  width: 6px;
}
.calendar-task-list::-webkit-scrollbar-track {
  background: transparent;
}
.calendar-task-list::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.15); 
  border-radius: var(--radius-pill);
}
.calendar-task-list::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0,0,0,0.3); 
}


/* =========================================
   20. TEXTOS Y BOTONES DEL DASHBOARD OSCURO
   ========================================= */

/* Textos de bienvenida (Atrapa h1, h2, h3 y los nombres de usuario en spans) */
.dashboard-canvas h1,
.dashboard-canvas h2,
.dashboard-canvas h3,
.dashboard-header h1,
.dashboard-header h2,
.dashboard-header h3,
.dashboard-canvas h1 span,
.dashboard-canvas h2 span,
.dashboard-header h1 span,
.dashboard-header h2 span {
  color: #FFFFFF !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dashboard-canvas p,
.dashboard-header p {
  color: #E2E8F0 !important; 
  font-weight: 500;
}

/* Tarjeta de Crear Nuevo Tablero */
.create-board-btn {
  border: 2px dashed rgba(255, 255, 255, 0.4) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Iluminamos el texto y el icono del + */
.create-board-btn h3,
.create-board-btn .create-icon {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Efecto al pasar el ratón por la tarjeta */
.create-board-btn:hover {
  border-color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.15) !important; 
}

/* El texto brilla al máximo al pasar el ratón */
.create-board-btn:hover h3,
.create-board-btn:hover .create-icon {
  color: #FFFFFF !important;
}


/* =========================================
   21. PANTALLA DE PERFIL DE USUARIO
   ========================================= */

/* Efecto flotante en las tarjetas del perfil */
.profile-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.profile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08) !important;
}

/* Estilos premium para los inputs de texto */
.profile-card input.form-control {
  border: 1px solid #E2E8F0;
  padding: 12px;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
  background-color: #F8FAFC;
}
.profile-card input.form-control:focus {
  outline: none;
  background-color: #FFFFFF;
  border-color: #AFCFE0; /* Tu azul pastel */
  box-shadow: 0 0 0 3px rgba(175, 207, 224, 0.3);
}
.profile-card label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057; /* Tu gris plomo */
  margin-bottom: 6px;
  display: block;
}

/* Botón de Google interactivo */
#btn-link-google:hover {
  background-color: #F8FAFC !important;
  border-color: #D2E3FC !important;
  cursor: pointer;
}


/* =========================================
   22. NOTIFICACIONES FLOTANTES (TOASTS)
   ========================================= */
.toast-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #10B981; /* Verde éxito */
  color: white;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  font-weight: 500;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* Animación de rebote suave */
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-notification.error {
  background: #EF4444; /* Rojo para errores */
}


/* =========================================
   23. CENTRO DE NOTIFICACIONES E INVITACIONES
   ========================================= */

/* El contador rojo */
.notification-badge {
  background-color: #EF4444;
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
}
.notification-badge.hidden { 
  display: none; 
}

#btn-notifications:hover {
  background: white;
  border-color: #E2E8F0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* La ventana desplegable */
.notifications-dropdown {
  position: absolute;
  bottom: 110%; /* Se abre hacia arriba porque está abajo del todo */
  left: 0;
  width: 280px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  border: 1px solid #E2E8F0;
}

.notifications-dropdown.show { 
  display: flex; 
}

/* FIX: Límite de altura y scroll independiente para la lista */
.notifications-dropdown .dropdown-body {
  max-height: 60vh; /* Máximo 60% del alto de la ventana visible */
  overflow-y: auto;
}

/* Hacemos que la barra de scroll sea bonita y sutil */
.notifications-dropdown .dropdown-body::-webkit-scrollbar {
  width: 6px;
}
.notifications-dropdown .dropdown-body::-webkit-scrollbar-thumb {
  background-color: #c4c1dd;
  border-radius: var(--radius-pill);
}

.notifications-dropdown .dropdown-header {
  background: #F8FAFC;
  padding: 14px 16px;
  border-bottom: 1px solid #E2E8F0;
  /* Lo mantenemos por encima de la lista al hacer scroll */
  z-index: 2; 
  position: relative;
}



.notifications-dropdown .dropdown-header h4 {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-dark);
}

/* Diseño de cada invitación individual */
.invite-item {
  padding: 16px;
  border-bottom: 1px solid #F1F5F9;
}
.invite-item:last-child { 
  border-bottom: none; 
}
.invite-item p { 
  margin: 0 0 12px 0; 
  font-size: 0.85rem; 
  line-height: 1.4;
}
.invite-actions { 
  display: flex; 
  gap: 8px; 
}
.invite-actions button {
  flex: 1;
  padding: 6px;
  font-size: 0.8rem;
}

/* Estilo para las alertas de tareas en Notificaciones 2.0 */
.task-alert-item {
  padding: 16px;
  border-bottom: 1px solid #F1F5F9;
  cursor: pointer;
  transition: background 0.2s;
}
.task-alert-item:hover {
  background: #F8FAFC;
}
.task-alert-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.task-alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.task-alert-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}



