/* Estilos base y reset */
:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --accent-color: #4895ef;
  --danger-color: #f72585;
  --success-color: #4cc9f0;
  --warning-color: #f8961e;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --gray-color: #6c757d;
  --bg-color: #f5f7fa;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #d6d4d4; /* Fondo negro */
  color: #0a0404; /* Texto blanco para mejor contraste */
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--card-shadow);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

header h1 {
  font-weight: 600;
  font-size: 1.5rem;
}

.search-bar {
  flex-grow: 1;
  margin: 0 2rem;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1rem;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-bar input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.logout-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Container y sidebar */
.container {
  display: flex;
  min-height: calc(100vh - 70px);
}

.sidebar {
  width: 70px;
  background: rgb(231, 230, 230);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 100px;
  left: 0;
  bottom: 0;
  z-index: 999;
  overflow-y: auto;
  overflow: hidden;
}

.sidebar:hover {
  width: 250px;
}

.nav-button {
  background: none;
  border: none;
  padding: 1rem 2rem;
  text-align: left;
  font-size: 1rem;
  color: var(--gray-color);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.nav-button:hover {
  color: var(--primary-color);
  background: rgba(67, 97, 238, 0.1);
}

.nav-button::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--primary-color);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease;
}

.nav-button:hover::before {
  transform: scaleY(1);
}

.nav-button.active {
  color: var(--primary-color);
  background: rgba(67, 97, 238, 0.1);
  font-weight: 500;
}

.nav-button.active::before {
  transform: scaleY(1);
}

.nav-button i {
  min-width: 30px;
  font-size: 1.2rem;
  display: flex;
  justify-content: center;
  margin-right: 10px;
}

/* Contenido principal */
.content {
    flex-grow: 1;
    padding: 2rem;
    margin-left: 50px; /* Esto es para el sidebar */
    margin-top: 80px;  /* ESTA ES LA CLAVE: Ajusta este valor según el alto de tu header */
}

.sidebar:hover ~ .content {
  margin-left: 250px;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

/* Formularios */
form {
  background: rgb(236, 233, 233);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 1rem;
}

.form-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  flex: 1;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark-color);
}

input, select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(65, 82, 161, 0.2);
}

button[type="submit"] {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

button[type="submit"]:active {
  transform: translateY(0);
}

.mensaje {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-weight: 500;
}

.mensaje-exito {
  background: rgba(76, 201, 240, 0.2);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.mensaje-error {
  background: rgba(247, 37, 133, 0.2);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
}

/* Tablas */
.tabla-container {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: var(--primary-color);
  color: white;
  font-weight: 500;
  position: sticky;
  top: 0;
}

tr:hover {
  background: rgba(67, 97, 238, 0.05);
}

.sortable {
  cursor: pointer;
  position: relative;
}

.sortable:hover {
  background: rgba(0, 0, 0, 0.1);
}

.sortable::after {
  content: '⇅';
  margin-left: 5px;
  opacity: 0.7;
  font-size: 0.8em;
}

.sortable.asc::after {
  content: '↑';
}

.sortable.desc::after {
  content: '↓';
}

/* Botones de acción */
.btn-editar, .btn-eliminar, .btn-detalles, .btn-actualizar, 
.btn-recordatorio1, .btn-recordatorio2, .btn-baja, .btn-recordatorio-dia {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  margin-right: 0.5rem;
}

.btn-icon {
  padding: 0.5rem;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-editar {
  background: rgb(33, 231, 245);
  
}

.btn-editar:hover {
  background: rgba(72, 149, 239, 0.3);
  transform: translateY(-2px);
}

.btn-eliminar {
  background: rgb(238, 12, 34);
  
}

.btn-eliminar:hover {
  background: rgba(247, 37, 133, 0.3);
  transform: translateY(-2px);
}

.btn-detalles {
  background: rgb(53, 220, 206);
}

.btn-detalles:hover {
  background: rgba(76, 201, 240, 0.3);
  transform: translateY(-2px);
}

.btn-actualizar {
  background: rgba(248, 150, 30, 0.2);
  color: var(--warning-color);
}

.btn-actualizar:hover {
  background: rgba(248, 150, 30, 0.3);
  transform: translateY(-2px);
}

.btn-recordatorio1, .btn-recordatorio2, .btn-recordatorio-dia {
  background: rgba(67, 97, 238, 0.2);
  color: var(--primary-color);
}

.btn-recordatorio1:hover, .btn-recordatorio2:hover, .btn-recordatorio-dia:hover {
  background: rgba(67, 97, 238, 0.3);
  transform: translateY(-2px);
}

.btn-baja {
  background: rgba(247, 37, 133, 0.2);
  color: var(--danger-color);
}

.btn-baja:hover {
  background: rgba(247, 37, 133, 0.3);
  transform: translateY(-2px);
}

/* Estados */
.estado-disponible {
  color: rgb(26, 116, 47);
  font-weight: 500;
}

.estado-vendido {
  color: rgb(220, 53, 69);
  font-weight: 500;
}

.vencido {
  background: rgba(245, 195, 30, 0.7);
  position: relative;
}

.vencido:hover {
  background: rgba(245, 195, 30, 0.7);
  position: relative;
}

.vencido::after {
  content: 'VENCIDO';
  position: absolute;
  top: 0;
  right: 0;
  background: #ffc107;
  color: #856404;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0 0 0 4px;
}

/* Modales */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-color);
}

.close-modal:hover {
  color: var(--danger-color);
  transform: rotate(90deg);
}

.modal h3 {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    margin: -2rem -2rem 1.5rem -2rem; /* Para que ocupe todo el ancho del modal */
    border-radius: 10px 10px 0 0;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cliente-item {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.cliente-item:hover {
  background: rgba(67, 97, 238, 0.05);
}

.cliente-vencido {
  background: rgb(240, 206, 94);
}

.cliente-vencido:hover {
  background: rgb(243, 187, 2);
}

.modal-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
}

#recordatorio1-btn {
  background: rgba(67, 97, 238, 0.2);
  color: var(--primary-color);
}

#recordatorio1-btn:hover {
  background: rgba(67, 97, 238, 0.3);
  transform: translateY(-2px);
}

#recordatorio2-btn {
  background: rgba(248, 150, 30, 0.2);
  color: var(--warning-color);
}

#recordatorio2-btn:hover {
  background: rgba(248, 150, 30, 0.3);
  transform: translateY(-2px);
}

#baja-btn {
  background: rgba(247, 37, 133, 0.2);
  color: var(--danger-color);
}

#baja-btn:hover {
  background: rgba(247, 37, 133, 0.3);
  transform: translateY(-2px);
}

/* Efectos de carga */
.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loading::before {
  content: '';
  width: 40px;
  height: 40px;
  border: 4px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive */
@media (max-width: 992px) {
  .container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    flex-direction: row;
    padding: 0;
    overflow-x: auto;
  }
  
  .nav-button {
    padding: 1rem;
    white-space: nowrap;
    text-align: center;
  }
  
  .nav-button::before {
    width: 100%;
    height: 4px;
    top: auto;
    bottom: 0;
    transform: scaleX(0);
    transform-origin: right;
  }
  
  .nav-button:hover::before, 
  .nav-button.active::before {
    transform: scaleX(1);
    transform-origin: left;
  }
  
  .content {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    padding: 1rem;
  }
  
  .search-bar {
    margin: 1rem 0;
    width: 100%;
  }
  
  .logout-btn {
    width: 100%;
    margin-top: 1rem;
    text-align: center;
  }
  
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  table {
    display: block;
    overflow-x: auto;
  }
}

/* Contenedor del formulario de usuario */
#usuarios form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Ajuste para los inputs en usuarios */
#form-usuario .form-group {
  margin-bottom: 0;
}

/* Alineación del botón y mensaje */
#form-usuario button[type="submit"] {
  align-self: flex-start;
}

/* style.css - agregar esto al final */

/* Estilo específico para la sección de usuarios */
#usuarios .tabla-container {
  margin-top: 2rem;
}

/* Ajustar el formulario de usuarios */
#form-usuario {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#form-usuario .form-row {
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0;
}

/* Ajustar los mensajes */
.mensaje {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  width: fit-content;
  max-width: 100%;
}

/* Asegurar que el botón no sea demasiado ancho */
#form-usuario button[type="submit"] {
  width: auto;
  margin-top: 0.5rem;
}

/* Ajustar el input de teléfono */
#telefono-usuario, #editar-telefono-usuario {
  direction: ltr;
  text-align: left;
}

/* Menú lateral colapsable */
.sidebar-toggle {
    display: flex;
    justify-content: center;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--gray-color);
}

/* Estilo para móviles */
@media (max-width: 992px) {
  .sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
  }
  
  .sidebar:hover {
    width: 100%;
  }
  
  .sidebar-toggle {
    display: none;
  }
  
  .nav-button {
    padding: 0.8rem 1rem;
  }
}

/* Agrega esto al final de style.css */
#clientes-asociados {
  width: 100%;
  margin-top: 1rem;
}

#clientes-asociados table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

#clientes-asociados th {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem;
  text-align: left;
}

#clientes-asociados td {
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
}

#clientes-asociados tr.cliente-vencido td {
  background-color: rgba(255, 193, 7, 0.3);
}

/* Modifica estos estilos en style.css */
tr {
  background-color: rgb(81, 245, 89); /* Fondo verde claro para filas activas */
  
}

tr:hover {
   background-color: rgb(81, 245, 89); /* Fondo verde claro para filas activas */
}

/* ========================================= */
/* --- ESTILOS ESPECÍFICOS PARA EL LOGIN (Máxima Prioridad) --- */
/* ========================================= */

/* Sobrescribir estilos del body global */
.login-body {
    /* Reinicia el body para centrar el formulario */
    display: flex !important; 
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    overflow: hidden !important;
    position: relative !important;
    background: #252834 !important;
    margin: 0 !important; /* Asegurar que no hay margen global */
}

/* El fondo degradado */
.background-container {
    position: fixed; /* Usar fixed para asegurar que cubra toda la ventana */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); 
    z-index: -1; 
}


/* Contenedor Principal del Login */
.login-container {
    background-color: rgba(255, 255, 255, 0.95); 
    padding: 40px; 
    border-radius: 15px; 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3); 
    text-align: center;
    width: 100%;
    max-width: 450px; /* <--- AUMENTADO EL ANCHO MÁXIMO */
    box-sizing: border-box; 
    z-index: 10; 
    transition: transform 0.3s ease;
    /* Remover cualquier margen/padding que pueda venir del estilo global */
    margin: auto; 
    position: relative;
}

.login-container:hover {
    transform: translateY(-5px);
}

.login-container h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2.2em; 
    font-weight: 700; 
}

/* Grupos de Entrada */
.input-group {
    margin-bottom: 20px; 
    position: relative;
}

/* 🎯 SELECTOR CLAVE: Input en el formulario de login (.login-form) */
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%; 
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px; /* Bordes redondeados */
    font-size: 1.1em;
    color: #333;
    outline: none; 
    transition: all 0.3s ease;
    background-color: white; 
    /* ¡Usar !important en las propiedades que el estilo global está forzando! */
    height: auto !important; 
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #6a11cb; 
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.2);
}

.login-form input[type="text"]::placeholder,
.login-form input[type="password"]::placeholder {
    color: #aaa;
}

/* Contenedor de Enlaces */
.links-container {
    text-align: right; 
    margin-bottom: 25px;
}

.forgot-password {
    color: #6a11cb; 
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #2575fc; 
    text-decoration: underline;
}

/* 🎯 SELECTOR CLAVE: Botón del login (.login-button) */
.login-button {
    width: 100%;
    padding: 15px;
    /* Degradado para el botón */
    background: linear-gradient(45deg, #6a11cb 0%, #2575fc 100%) !important; 
    color: white;
    border: none;
    border-radius: 8px; 
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    /* Asegurar que se aplique la propiedad y no el estilo global de button[type="submit"] */
    margin: 0; 
    transform: none;
}

.login-button:hover {
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Estilo para el mensaje de error */
.login-container .error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
    text-align: center;
}

/* Media Query para hacerlo responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
        margin: 20px;
        border-radius: 10px;
    }
    .login-container h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    .login-form input, .login-button {
        padding: 12px;
        font-size: 1em;
    }
    .links-container {
        margin-bottom: 20px;
    }
}

/* Botón base */
.btn-hogar {
    padding: 5px 10px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
}

/* Estado Actualizado (Verde) */
.btn-hogar-ok {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.btn-hogar-ok:hover {
    background-color: #c8e6c9;
}

/* Estado Pendiente (Naranja/Amarillo) */
.btn-hogar-no {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc80;
}
.btn-hogar-no:hover {
    background-color: #ffe0b2;
}

/* Ajuste para la tabla del modal */
.tabla-detalles th, .tabla-detalles td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

/* ========================================= */
/* --- AJUSTE ESPECÍFICO PARA MODAL DETALLES --- */
/* ========================================= */

/* Hacemos que solo este modal sea más ancho */
#detalles-modal .modal-content {
    max-width: 900px; /* Aumentado de 600px a 900px */
    width: 95%;       /* Para que se vea bien en pantallas medianas */
}

/* Mejoramos el espaciado interno de la tabla de detalles */
#clientes-asociados th, 
#clientes-asociados td {
    padding: 12px 15px; /* Más aire alrededor del texto */
    text-align: center; /* Centrar todo para más orden */
    font-size: 0.95rem;
}

/* El nombre del cliente (primera columna) se ve mejor alineado a la izquierda */
#clientes-asociados td:first-child,
#clientes-asociados th:first-child {
    text-align: left;
}

/* Asegurar que las fechas no se partan en dos líneas */
#clientes-asociados td:nth-child(2),
#clientes-asociados td:nth-child(3) {
    white-space: nowrap;
}



/* Contenedor Superior */
.estado-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;      /* Espacio entre tarjetas */
    width: 100%;
    margin-top: 10;  /* Aseguramos que no haya margen superior */
    margin-bottom: 30px;
}

.estado-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    box-shadow: var(--card-shadow);
}

.estado-card.warning i { color: var(--danger-color); }

.estado-card .label { font-size: 0.85rem; color: var(--gray-color); }
.estado-card h3 { font-size: 1.5rem; margin: 0; }
.estado-card:hover { transform: translateY(-5px); }


.dashboard-wrapper {
    width: 100%;
    padding: 10px;
}


.estado-card {
    flex: 1; /* Todas crecen igual */
    background: white;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}


.card-icon {
    width: 55px;
    height: 55px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 15px;
}

.active-clients .card-icon { background: #e3f2fd; color: #1976d2; }
.new-clients .card-icon { background: #e8f5e9; color: #2e7d32; }
.expired-accounts .card-icon { background: #ffebee; color: #c62828; }

.estado-card h3 { font-size: 1.8rem; margin: 0; color: #333; }
.estado-card .label { color: #666; font-weight: 600; font-size: 0.9rem; }


/* Contenedor principal del inventario */
.plataformas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 10px;
}

/* Estilo de cada tarjeta de plataforma */
.plataforma-item {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

/* Efecto al pasar el mouse */
.plataforma-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

/* Decoración interna (opcional: una franja de color arriba) */
.plataforma-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Iconos más grandes y llamativos */
.plataforma-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(67, 97, 238, 0.3));
}

/* Nombre de la plataforma */
.plataforma-nombre-box {
    font-weight: 700;
    color: var(--dark-color);
    font-size: 1.1rem;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* Contador de cuentas */
.plataforma-count {
    background: var(--bg-color);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(67, 97, 238, 0.1);
}




.section-header {
    text-align: center;
    margin-bottom: 25px;
    padding-top: 20px; /* Esto empuja el título hacia abajo dentro de su sección */
    width: 100%;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--dark-color);
    font-weight: 700;
    display: flex;          /* Cambiamos a flex para alinear icono y texto */
    align-items: center;    /* Centra verticalmente el icono con el texto */
    justify-content: center;/* Centra horizontalmente todo el grupo */
    gap: 15px;             /* Separa el icono del texto automáticamente */
}

.section-header h2 i {
    color: var(--primary-color);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    /* Eliminamos el margin-right porque ya usamos 'gap' arriba */
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
}
.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    width: 800px;
    border-radius: 8px;
}
.btn-pago {
    background-color: #4361ee;
    color: rgb(255, 255, 255);
    border: none;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* ========================================= */
/* --- BOTÓN CERRAR SESIÓN EN EL SIDEBAR --- */
/* ========================================= */

.logout-sidebar {
    margin-top: auto; /* Empuja el botón al fondo del sidebar */
    text-decoration: none;
    color: var(--danger-color) !important; /* Color rojizo para distinguir la acción de salir */
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.logout-sidebar:hover {
    background: rgba(247, 37, 133, 0.1) !important;
    color: var(--danger-color) !important;
}

.logout-sidebar::before {
    background: var(--danger-color) !important; /* Línea lateral roja al pasar el mouse */
}

/* Ajuste para cuando se vea en celulares (menú horizontal) */
@media (max-width: 992px) {
    .logout-sidebar {
        margin-top: 0;
        margin-left: auto;
        border-top: none;
    }
}


/* ========================================= */
/* --- ESTILOS PARA EL REPORTE DIARIO --- */
/* ========================================= */

.filtro-fecha-diario {
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 8px 18px;
    border-radius: 50px;
    box-shadow: var(--card-shadow);
}

.filtro-fecha-diario label {
    margin: 0;
    font-weight: 600;
    white-space: nowrap;
}

.filtro-fecha-diario input {
    border: 1px solid #ccc;
    padding: 6px 12px;
    border-radius: 20px;
    width: auto;
}

.diario-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.subtitulo-diario {
    padding: 15px;
    background: #f8f9fa;
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    font-size: 1.1rem;
    margin: 0;
}

.badge-nuevo {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
}

.badge-renovado {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
}

@media (max-width: 992px) {
    .diario-grid {
        grid-template-columns: 1fr;
    }
}


/* ========================================================= */
/* --- BOTÓN DE CAMBIO DE TEMA Y MODO SUAVE / OSCURO ---     */
/* ========================================================= */

.theme-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.theme-btn i {
    font-size: 1.1rem;
}

/* ========================================================= */
/* --- TEMA PROFESIONAL OSCURO PREMIUM (NIVEL LINEAR) ---    */
/* ========================================================= */
.theme-btn {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.6rem 1.3rem;
    border-radius: 100px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.22s cubic-bezier(0.25, 0.1, 0.25, 1);
    white-space: nowrap;
    backdrop-filter: blur(8px);
}
.theme-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.theme-btn:active {
    transform: translateY(0);
}

/* 1. Fondo general con gradiente atmosférico */
body.tema-suave {
    background: radial-gradient(circle at top right, #1e293b 0%, #0b1120 50%, #070b14 100%);
    color: #e2e8f0;
    min-height: 100vh;
}
body.tema-suave header {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.6);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

/* 2. Tarjetas con elevación por capas */
body.tema-suave .sidebar,
body.tema-suave form,
body.tema-suave .estado-card,
body.tema-suave .plataforma-item,
body.tema-suave .filtro-fecha-diario,
body.tema-suave .resumen-financiero {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(22, 31, 51, 0.9));
    color: #f8fafc;
    border: 1px solid rgba(38, 51, 77, 0.7);
    border-radius: 12px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}
body.tema-suave .estado-card:hover,
body.tema-suave .plataforma-item:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

/* 3. Mejoras de texto y jerarquía */
body.tema-suave label,
body.tema-suave .section-header h2,
body.tema-suave .estado-card h3,
body.tema-suave .plataforma-nombre-box,
body.tema-suave .plataformas-section h3,
body.tema-suave .resumen-financiero h3,
body.tema-suave .subtitulo-diario {
    color: #f1f5f9 !important;
    font-weight: 600;
    letter-spacing: -0.2px;
}
body.tema-suave .subtitulo-diario {
    background: linear-gradient(90deg, #1e293b, #161f33);
    border-bottom: 2px solid #3b82f6;
}

/* 4. Inputs con estados de focus premium */
body.tema-suave input,
body.tema-suave select {
    background-color: #0f172a;
    color: #f8fafc !important;
    border: 1px solid rgba(51, 65, 85, 0.7);
    color-scheme: dark;
    border-radius: 8px;
    transition: all 0.2s ease;
}
body.tema-suave input:focus,
body.tema-suave select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    outline: none;
}

/* 5. Tablas con profundidad */
body.tema-suave .tabla-container {
    background-color: #161f33;
    border: 1px solid rgba(38, 51, 77, 0.7);
    border-radius: 12px;
    overflow: hidden;
}
body.tema-suave th {
    background: linear-gradient(180deg, #1e293b, #1a2436);
    color: #93c5fd;
    border-bottom: 1px solid #334155;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.7px;
}
body.tema-suave tr {
    background-color: #161f33;
    color: #e2e8f0;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}
body.tema-suave tr:hover {
    background-color: rgba(35, 49, 77, 0.8) !important;
    border-left-color: #3b82f6;
}
body.tema-suave td {
    border-bottom: 1px solid rgba(35, 48, 74, 0.6);
    color: #e2e8f0 !important;
    vertical-align: middle;
}

/* 6. Botones con efecto de brillo en hover */
body.tema-suave .btn-editar,
body.tema-suave .btn-detalles,
body.tema-suave .btn-pago,
body.tema-suave .btn-eliminar,
body.tema-suave .btn-actualizar,
body.tema-suave .btn-recordatorio1,
body.tema-suave .btn-recordatorio2,
body.tema-suave .btn-recordatorio-dia,
body.tema-suave .btn-baja {
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    border: 1px solid transparent;
}
body.tema-suave .btn-editar:hover,
body.tema-suave .btn-detalles:hover,
body.tema-suave .btn-pago:hover,
body.tema-suave .btn-eliminar:hover,
body.tema-suave .btn-actualizar:hover,
body.tema-suave .btn-recordatorio1:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 7. Modales con glassmorphism */
body.tema-suave .modal-content {
    background: rgba(22, 31, 51, 0.92);
    color: #f8fafc;
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* 8. Scrollbar personalizada premium */
body.tema-suave ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
body.tema-suave ::-webkit-scrollbar-track {
    background: #0f172a;
}
body.tema-suave ::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.6);
    border-radius: 10px;
}
body.tema-suave ::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, 0.8);
}

/* 9. Estados de carga más suaves */
body.tema-suave .loading::after {
    background: rgba(11, 17, 32, 0.85) !important;
    backdrop-filter: blur(6px);
}
