body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    display: flex;
    height: 100vh;
}
.panel_proyectos {
    width: 220px;
    background: #f4f4f4;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.menu-container {
    flex-grow: 1; /* Ocupa todo el espacio restante */
    overflow: auto; /* Permite desplazamiento solo en el menú */
    margin-top: 10px; /* Ajusta para separarlo del texto superior */
}

.content {
    /* max-width: 500px; */
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.dashboard{
    display: flex;
    height: 100%;
}

form {
    width: 500px;  /* Ajusta según lo necesites */
    max-width: 100%; /* Evita que se desborde en pantallas pequeñas */
}

form input[type="text"], form input[type="email"], form input[type="password"] {
    width: 90%;
    max-width: 480px;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.forgot-password-link {
    color: #007bff; /* Color azul */
    text-decoration: none; /* Elimina el subrayado por defecto */
    font-size: 14px; /* Tamaño de fuente */
    display: inline-block; /* Para poder controlar el espacio alrededor */
    transition: color 0.3s; /* Efecto de transición */
    margin-bottom: 20px; /* Espaciado inferior */
}

form button {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

form button:hover {
    background-color: #45a049;
}

button.register-button {
    width: 100%;
    background-color: #007bff; /* Color azul para el botón de registro */
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.register-button:hover {
    background-color: #0056b3; /* Azul más oscuro al pasar el mouse */
}

.error {
    color: red;
    font-size: 14px;
}

h1 {
    text-align: center;
    color: white; /* Color de la letra */
    font-weight: bold; /* Hace que la letra sea gruesa */
    text-shadow: -2px -2px 0 rgb(4, 72, 10),  
                 2px -2px 0 rgb(4, 72, 10),  
                 -2px 2px 0 rgb(4, 72, 10),  
                 2px 2px 0 rgb(4, 72, 10); /* Crea un borde azul */
}

/* Estilo de la barra lateral */
.sidebar {
    width: 55px; /* Reduce el ancho del panel cuando está contraído */
    background: #222;
    color: white;
    padding: 10px 5px;
    font-family: 'Arial', sans-serif;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.5);
    transition: width 0.3s ease; /* Transición para el cambio de tamaño */
}

/* Efecto cuando el mouse pasa por encima */
.sidebar:hover {
    width: 220px; /* Ancho completo de la barra lateral */
}

/* Lista de enlaces en la barra lateral */
.sidebar ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Estilo de cada enlace */
.sidebar ul li {
    margin: 15px 0;
    width: 100%; /* Esto ayuda a que los enlaces se alineen con el ancho de la barra */
}

/* Enlaces de la barra lateral */
.sidebar ul li a {
    text-decoration: none;
    color: white;
    display: block;
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center; /* Centra el texto */
    transition: background 0.3s ease, color 0.3s ease;
}

/* Cambia de color al pasar el mouse */
.sidebar ul li a:hover {
    background: #FFD700; /* Amarillo de carretera */
    color: black;
    font-weight: bold;
}

/* Estilo para el enlace activo */
.sidebar ul li a.active {
    background: #FFD700; /* Amarillo de carretera */
    color: black;
    font-weight: bold;
    border-left: 5px solid white; /* Borde blanco a la izquierda */
    padding-left: 20px; /* Ajuste de espaciado */
    transition: background 0.3s ease, border-left 0.3s ease;
}

/* El texto en los enlaces será oculto cuando el panel esté contraído */
.sidebar ul li a span {
    display: none;
}

/* El texto debe aparecer cuando el panel está expandido */
.sidebar.expanded {
    width: 220px; /* Ancho cuando está expandido */
}

.sidebar.expanded ul li a span {
    display: inline; /* Mostrar el texto solo cuando el panel esté expandido */
}

/* Para los íconos de FontAwesome */
.sidebar ul li a i {
    font-size: 20px; /* Ajustar tamaño del icono */
    margin-right: 10px; /* Separación entre el ícono y el texto */
}

.arrow {
    margin-right: auto; /* Mueve la flecha a la izquierda */
    margin-left: 10px; /* Espaciado desde el borde izquierdo */
}

.menu {
    margin-top: 20px;
}

.menu-item {
    cursor: pointer;
    padding: 10px;
    margin: 5px 0;
    background-color: #34495e; /* Azul oscuro */
    color: white;
    border-radius: 5px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.menu-item:hover {
    background-color: #85C1AE; /* Gris claro cálido */
}

/* Flecha alineada a la izquierda */
.menu-item .arrow {
    position: absolute;
    left: 10px;
}

.menu-item.active {
    background-color: #48C9B0; /* Verde menta suave */
    color: white;
}

.submenu {
    display: none;
    margin-top: 5px;
    list-style: none;
    padding-left: 40px;
}

.submenu-item {
    padding: 0;
    margin: 5px 0;
    background-color: #2C3E50; /* Gris oscuro cálido */
    border-radius: 5px;
    text-align: center;
    transition: 0.3s;
}

.submenu-item a {
    cursor: pointer;
    text-decoration: none;
    color: white;
    display: block;
    padding: 10px;
    border-radius: 5px;
}

.submenu-item:hover {
    background-color: #85C1AE; /* Azul suave */
}

.submenu-item a.active {
    background-color: #48C9B0; /* Azul profundo */
    color: white;
}

.neutral-button {
    padding: 8px 12px;
    border: 1px solid #bbb;
    border-radius: 5px;
    background-color: #e0e0e0;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease, border 0.3s ease;
}

.neutral-button:hover {
    background-color: #d6d6d6;
    border: 1px solid #999;
}

.delete-button {
    background-color: #e0e0e0;
    border: 1px solid #bbb;
}

.delete-button:hover {
    background-color: #d6d6d6;
    border: 1px solid #999;
}

.loading-spinner {
    display: none; 
    width: 24px; 
    height: 24px; 
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff; /* Color del borde superior */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.main-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-left: 8px;
}

.dynamic-container {
    flex-grow: 1; /* Hace que el contenedor ocupe todo el espacio disponible */
    max-height: 100%; /* No sobrepasa la altura del contenedor padre */
    overflow-y: auto; /* Permite el scroll si el contenido excede la altura */
}


/* Para ocultar las flechas solo en el input con id="imageIndexInput" */

/* Para Chrome, Safari, Edge */
#imageIndexInput::-webkit-outer-spin-button,
#imageIndexInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Para Firefox */
#imageIndexInput {
    -moz-appearance: textfield;
    appearance: none; /* propiedad estándar */
}

/* Estilos para los botones */
.custom-button {
    width: 80px;
    border-radius: 5px;
    background-color: #f0f0f0;
    border: 3px solid #ccc;
    color: black;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.custom-button:hover {
    background-color: #ddd;
    border-color: #bbb;
}

.custom-button:active {
    background-color: #bbb;
    border-color: #888;
}

/* Estilo para los botones activos */
.custom-button.active {
    background-color: #3e8e41;
    border-color: #2c6d33;
    color: white;
}

/* Estilos para los labels */
.custom-label {
    background-color: white;
    color: black;
    font-size: 10px;
    width: 40px;
    height: 20px;
    line-height: 20px;
}

/* Estilos de contenedor de botones */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.button-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.custom-button.active {
    background-color: #4CAF50; /* Verde */
    color: white;
    border: 2px solid #2E7D32;
}


/* Estilo de los demás botones en showmodal */
.button-othershow {
    width: auto;
    border-radius: 5px;
    background-color: #f0f0f0;
    border: 3px solid #ccc;
    color: black;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s, transform 0.1s;
}

/* Efecto al pasar el mouse */
.button-othershow:hover {
    background-color: #ddd;
    border-color: #bbb;
}

/* Efecto al hacer clic */
.button-othershow:active {
    background-color: #ccc;  /* Color más oscuro al hacer clic */
    border-color: #999;      /* Borde más oscuro */
    transform: scale(0.9);  /* Hace un efecto de "presión" */
}

/* Estilo de los demás botones en showmodal */
.button-othershow-icon {
    width: 34px;
    height: 34px;
    border-radius: 5px;
    background-color: #f0f0f0;
    border: 3px solid #ccc;
    color: black;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Efecto al pasar el mouse */
.button-.button-othershow-icon:hover {
    background-color: #ddd;
    border-color: #bbb;
}

/* Efecto al hacer clic */
.button-othershow-icon:active {
    background-color: #ccc;  /* Color más oscuro al hacer clic */
    border-color: #999;      /* Borde más oscuro */
    transform: scale(0.9);  /* Hace un efecto de "presión" */
}


/* Estilo del tooltip */
button {
    position: relative;
}

button::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 12px;
    white-space: normal; /* Permite que el texto se divida en varias líneas */
    word-wrap: break-word; /* Permite que las palabras largas se dividan */
    width: auto; /* El ancho se ajusta al contenido */
    display: inline-block; /* Asegura que el ancho se ajuste al contenido */
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out;
}


/* Mostrar tooltip al pasar el mouse */
button[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}


/* Contenedor padre para que el div no se mueva */
.classes-wrapper {
    position: relative;
    display: inline-block;
}

#classesContainer {
    display: none;
    width: 180px;
    max-height: 75px;
    font-size: 12px;
    border: 1px solid black;
    overflow-y: auto;
    overflow-x: hidden;
    background: white;
    position: absolute;
    top: 100%;  /* Justo debajo del botón */
    left: 0;
    z-index: 100;
}


/* Botón para desplegar el contenedor */
#toggleClassesBtn {
    cursor: pointer;
    background: #007BFF;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    display: inline-block;
}

/* Contenedor de clases seleccionadas */
#selectedClassesContainer {
    width: 180px;
    height: 60px;
    border-radius: 6px;
    overflow-y: auto;
    border: 1px solid black;
    min-height: 50px;
    background: #f8f9fa;
}

.selected-class {
    display: inline-block;
    background-color: lightgray;
    padding: 3px;
    margin: 3px;
    border-radius: 5px;
    font-size: 11px;
}

.placeholder-text {
    color: gray;       /* Color más claro */
    font-style: italic; /* Texto en cursiva */
    font-size: 14px;   /* Tamaño un poco más pequeño */
    text-align: center;
    display: block;
    padding: 5px;
}

.light-glow {
    position: relative;
    height: 3px;
    margin: 8px 0;
    background: linear-gradient(to right, white, white);
    box-shadow: 0 0 8px 2px white;
    overflow: hidden;
  }
  
  .light-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30%;
    width: 30%;
    height: 100%;
    background: linear-gradient(to right, transparent, white, transparent);
    animation: slide 1.5s linear infinite;
  }
  
  @keyframes slide {
    0% { left: -30%; }
    100% { left: 100%; }
  }
  


  /* Estilos modal tablas resumen
  /* Estilos para el modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 30%;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}


/* Estilo para el botón de subida */
.upload-button-style {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.upload-button-style:hover:not(.in-progress) {
  background-color: #45a049;
}
.upload-button-style.in-progress {
  background-color: #888;
  cursor: not-allowed;
}

/* Texto de progreso al lado del botón */
.upload-button-style {
  margin-left: 10px;
  font-weight: bold;
  display: inline-block;
}


/* Estilo para el botón de descarga */
.download-button-style {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #4585a0;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.download-button-style:hover:not(.in-progress) {
  background-color: #4566a0;
}
.download-button-style.in-progress {
  background-color: #888;
  cursor: not-allowed;
}

/* Texto de progreso al lado del botón */
.download-button-style {
  margin-left: 10px;
  font-weight: bold;
  display: inline-block;
}


/* Base: Arial y tamaño cómodo */
  #historialSection {
    font-family: Arial, sans-serif;
    color: black;
  }

  /* Estilo de tabla minimalista (como la primera versión) */
    .historial-table {
    width: 100%;
    max-width: 920px;
    margin: 0 auto; /* Esto centra la tabla si el contenedor es más ancho */
    border-collapse: collapse;
    font-size: 14px;
    background-color: #fff; /* Asegura fondo blanco */
    }

  .historial-table th {
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    font-weight: bold;
    text-align: center;
  }

  .historial-table td {
    padding: 10px;
    border: 1px solid #ccc;
  }

  /* Estados de vigencia */
  .fila-vencida {
    opacity: 0.6;
    background-color: #fcfcfc;
  }

  .texto-tachado {
    text-decoration: line-through;
  }

  .status-expirado {
    font-size: 10px;
    color: #d32f2f;
    font-weight: bold;
    display: block;
  }

  .valor-disponible {
    font-weight: bold;
    color: #2e7d32;
  }


  /* =========================
   TOASTS / ALERTAS UI
   ========================= */

:root{
  --toast-radius: 14px;
  --toast-shadow: 0 10px 30px rgba(0,0,0,.18);
  --toast-border: rgba(0,0,0,.10);
  --toast-bg: #ffffff;
  --toast-text: #111;
  --toast-muted: rgba(0,0,0,.65);
}

#toastHost{
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast{
  pointer-events: auto;
  background: var(--toast-bg);
  color: var(--toast-text);
  border: 1px solid var(--toast-border);
  border-radius: var(--toast-radius);
  box-shadow: var(--toast-shadow);
  overflow: hidden;
  transform: translateY(-6px);
  opacity: 0;
  transition: opacity .16s ease, transform .16s ease;
}

.toast.show{
  opacity: 1;
  transform: translateY(0);
}

.toast-grid{
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px 12px 12px 0;
}

.toast-bar{
  height: 100%;
  width: 10px;
  background: #999;
}

.toast-body{
  padding: 12px 0;
}

.toast-title{
  font-weight: 900;
  margin: 0 0 4px 0;
  font-size: 14px;
  line-height: 1.2;
}

.toast-msg{
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--toast-muted);
  white-space: pre-wrap; /* respeta saltos de línea (\n) */
}

.toast-close{
  margin: 10px 10px 0 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: .65;
}
.toast-close:hover{ opacity: 1; }

.toast-actions{
  display: flex;
  gap: 8px;
  padding: 0 12px 12px 22px;
}

.toast-btn{
  border: 1px solid rgba(0,0,0,.14);
  background: #f6f6f6;
  color: #111;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
}
.toast-btn:hover{ filter: brightness(0.98); }

.toast-btn.primary{
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Tipos */
.toast.info .toast-bar{ background: #2f80ed; }
.toast.success .toast-bar{ background: #27ae60; }
.toast.warning .toast-bar{ background: #f2c94c; }
.toast.error .toast-bar{ background: #eb5757; }
.toast.loading .toast-bar{ background: #9b51e0; }

/* “Loading” sutil */
.toast.loading .toast-title::after{
  content: " ⏳";
  font-weight: 800;
}

/* Móvil: que no tape tanto arriba */
@media (max-width: 520px){
  #toastHost{
    top: 10px;
    right: 10px;
    width: calc(100vw - 20px);
  }
}




/* Banner para mensaje en vista de folder_camera.html */

.storage-warning-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff4e5; /* Un tono naranja suave/alerta */
    border-left: 5px solid #ffa117;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #663c00;
    font-size: 14.5px;
    /* ✅ AJUSTE DE ANCHO AQUÍ */
    max-width: 1000px; /* Para que coincida con tu dynamic-container */
    width: 100%;      /* Para que sea responsivo en pantallas pequeñas */
    box-sizing: border-box; /* Para que el padding no sume al ancho total */
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner-content i {
    color: #ffa117;
    font-size: 18px;
}

.close-banner-btn {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: #663c00;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.close-banner-btn:hover {
    opacity: 1;
}


  /* =========================
   BORRAR CUENTAS
   ========================= */

/* Overlay del fondo */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75); /* Azul muy oscuro traslúcido */
  backdrop-filter: blur(4px); /* Efecto de desenfoque moderno */
  z-index: 3000;
  animation: fadeIn 0.2s ease-out;
}

/* Tarjeta del modal */
.modal-card {
  max-width: 480px;
  margin: 12vh auto;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Cabecera */
.modal-header {
  padding: 24px 24px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.warning-icon {
  font-size: 24px;
  background: #fef2f2;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header h3 {
  margin: 0;
  color: #991b1b;
  font-size: 1.25rem;
  font-weight: 700;
}

/* Cuerpo */
.modal-body {
  padding: 0 24px 20px;
  color: #4b5563;
  line-height: 1.6;
}

.modal-list {
  margin: 12px 0;
  padding-left: 20px;
  font-size: 0.95rem;
}

.modal-list li { margin-bottom: 6px; }

.confirmation-box {
  margin-top: 20px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.confirmation-box label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

#deleteAccountConfirmationInput {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

#deleteAccountConfirmationInput:focus {
  outline: none;
  border-color: #991b1b;
}

/* Footer y Botones */
.modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-secondary, .btn-danger {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.btn-secondary:hover { background: #e5e7eb; }

.btn-danger {
  background: #dc2626;
  color: white;
}

.btn-danger:hover { background: #b91c1c; }

.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mensajes de estado */
.status-msg {
  padding: 0 24px 16px;
  text-align: center;
  font-size: 0.85rem;
  min-height: 1.2rem;
}

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