/* === Reset básico === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === Estilo general === */
body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom, #04375B, #0A4C7A);
  color: #ffffff;
  min-height: 100vh;
  transition: background 0.5s ease;
}




/* === Botón hamburguesa === */
.menu-toggle {
  position: fixed;
  top: 15px;
  left: 15px;
  cursor: pointer;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* === Sidebar === */
.sidebar {
  width: 250px;
  background-color: #04375B;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
  z-index: 150;
  transition: transform 0.4s ease;
}

.sidebar.oculto {
  transform: translateX(-100%);
}

.sidebar ul {
  list-style: none;
  width: 100%;
  padding: 0;
}

.sidebar ul li {
  margin: 15px 0;
}

.sidebar ul li a {
  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  padding: 10px 15px;
  display: block;
  border-radius: 5px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.sidebar ul li a:hover {
  background-color: #F3950D;
  color: #04375B;
  transform: translateX(5px);
}


/* Contenedor principal */
.content {
  position: fixed;
  top: 0;
  left: 250px;
  width: calc(100% - 250px);
  height: 100vh;
  transition: all 0.4s ease;
  z-index: 100;
}

.sidebar.oculto ~ .content {
  left: 0;
  width: 100%;
}


.fullscreen-image {
  width: 100%;
  height: 100%;
  position: relative;
}

.fullscreen-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* === Logo centrado === */
.logo-center {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40vh;
  padding: 20px;
  overflow: hidden;
}

.logo-center img {
  max-width: 100%;
  height: auto;
  width: clamp(200px, 30vw, 300px);
  object-fit: contain;
  transition: transform 0.5s ease;
}

.logo-center img:hover {
  transform: scale(1.05);
}

.content {
  position: fixed;
  top: 0;
  left: 250px;
  width: calc(100% - 250px);
  height: 100vh;
  transition: all 0.4s ease;
  z-index: 100;
}

.sidebar.oculto ~ .content {
  left: 0;
  width: 100%;
}

.fullscreen-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.fullscreen-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* === Contenedores === */
.container, .container-wide {
  max-width: 1000px;
  margin: 40px auto;
  background-color: #ffffff;
  color: #04375B;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.container:hover, .container-wide:hover {
  transform: translateY(-3px);
  opacity: 0.98;
} 

/* === Botones === */
.btn {
  background-color: #F3950D;
  color: white;
  border: none;
  padding: 12px 20px;       /* mismo padding para todos */
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  text-align: center;
  display: inline-flex;     /* asegura misma altura */
  align-items: center;      /* centra el texto verticalmente */
  justify-content: center;  /* centra el texto horizontalmente */
  min-height: 48px;         /* altura mínima uniforme */
}

/* Hover */
.btn:hover {
  background-color: #d67f0b;
  transform: scale(1.05);
}

/* Variante azul (Crear cuenta) */
.btn-back {
  background-color: #1572A1;
  margin-top: 20px;
  color: white;             /* asegura contraste */
  padding: 12px 20px;       /* igual que .btn */
  min-height: 48px;         /* misma altura */
}


/* === Botones de acción en tabla === */
.btn-edit {
  background-color: #1572A1;
  margin-right: 8px;
}

.btn-delete {
  background-color: #C0392B;
}

.btn-edit:hover {
  background-color: #125c80;
}

.btn-delete:hover {
  background-color: #a93226;
}


/* === Campos de formulario === */
label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
  color: #04375B;
  font-size: 16px;
  transition: color 0.3s ease;
}

label:hover {
  color: #F3950D;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 15px;
  border: 2px solid #1572A1;
  border-radius: 5px;
  font-size: 16px;
  color: #04375B;
  background-color: #f9f9f9;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #F3950D;
  box-shadow: 0 0 5px rgba(243, 149, 13, 0.5);
  outline: none;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2210%22%20height%3D%227%22%20viewBox%3D%220%200%2010%207%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M1%201L5%205L9%201%22%20stroke%3D%22%2304375B%22%20stroke-width%3D%222%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}


/* === Tablas === */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 20px;
  border-radius: 10px;
  border: 1px solid #ccc; /* marco general */
}

/* Tabla interna */
.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  color: #04375B;
  font-size: 14px; /* más compacta */
}

/* Celdas */
.table-responsive th,
.table-responsive td {
  border: 1px solid #ccc;
  padding: 8px 10px; /* menos padding para compactar */
  text-align: center; /* centrado para inputs y números */
  vertical-align: middle;
}

/* Encabezados */
.table-responsive th {
  background-color: #ecf0f1;
  font-weight: bold;
  color: #04375B;
}

/* Inputs dentro de la tabla */
.table-responsive input {
  width: 100%;
  padding: 6px;
  border: 1px solid #1572A1;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  color: #04375B;
  background-color: #f9f9f9;
}

.table-responsive input:focus {
  border-color: #F3950D;
  box-shadow: 0 0 4px rgba(243, 149, 13, 0.4);
  outline: none;
}



/* === Responsive === */
@media screen and (max-width: 768px) {
  .content {
    margin-left: 0;
    padding: 20px;
  }

  .logo-center {
    justify-content: center;
    padding: 20px;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.oculto {
    transform: translateX(0);
  }

  .container, .container-wide {
    margin: 20px;
    padding: 20px;
  }
}

/* === Formulario en dos columnas para reporte_vendedor === */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

/* Cada grupo en columna */
.form-group {
  display: flex;
  flex-direction: column;
}

/* === Bloque de acciones (botones) === */
.form-actions {
  grid-column: 1 / -1;       /* ocupa todo el ancho del grid */
  display: flex;             /* alinea los botones en fila */
  justify-content: center;   /* centra los botones */
  gap: 30px;                 /* espacio uniforme entre botones */
  margin-top: 20px;          /* separa del contenido anterior */
}

/* Ajuste para pantallas pequeñas */
@media screen and (max-width: 600px) {
  .form-actions {
    flex-direction: column;  /* botones en columna en móviles */
    gap: 15px;               /* espacio vertical entre botones */
  }
}


/* Ajuste para pantallas pequeñas */
@media screen and (max-width: 600px) {
  .form-actions {
    grid-column: 1 / -1;
  }
}

/* === Tablas compactas y sin desbordes de inputs === */
.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-responsive th,
.table-responsive td {
  padding: 8px 10px;
  text-align: center;
  vertical-align: middle;
}

/* Inputs dentro de las celdas: no ocupar 100% para evitar superposiciones */
.table-responsive td input {
  width: 90%;
  box-sizing: border-box;
  padding: 6px;
  text-align: center;
  border: 1px solid #1572A1;
  border-radius: 4px;
  background-color: #fff;
}

/* === Ocultar elementos dinámicamente === */
.oculto {
  display: none;
}

/* === Agrupación horizontal de CHULÓN y EMPACADO (si usas fieldsets) === */
.fieldset-group {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.fieldset-group .fieldset {
  border: 1px dashed #1572A1;
  padding: 15px;
  border-radius: 8px;
  background-color: #fdfdfd;
  color: #04375B;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.fieldset-group .fieldset:first-child {
  flex: 0 0 auto;
}

.fieldset-group .fieldset:last-child {
  margin-left: auto;
  flex: 0 0 auto;
}

.legend {
  font-weight: bold;
  color: #04375B;
  margin-bottom: 10px;
  font-size: 15px;
}

.fieldset label {
  margin-top: 10px;
  font-weight: 600;
  font-size: 14px;
}

.fieldset input {
  margin-bottom: 10px;
}

/* === Formularios divididos por tipo (si los usas) === */
#formJavas,
#formUnidades,
#tablaJavas,
#tablaUnidades {
  grid-column: 1 / -1;     /* ocupan el ancho completo del grid */
  margin-top: 10px;
}

/* === Carrusel a pantalla completa === */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.carousel {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: 300vw; /* 3 imágenes de 100vw cada una */
  height: 100vh;
  animation: slide 12s infinite;
}

.carousel img {
  width: 100vw;
  height: 100vh;
  object-fit: contain; /* muestra la imagen completa sin recorte */
  flex-shrink: 0;
  background-color: #04375B; /* relleno si sobra espacio */
  display: block;
}

/* === Botones sobre el carrusel === */
.carousel-buttons {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  z-index: 10;
}

.carousel-buttons .btn {
  background-color: rgba(243, 149, 13, 0.9);
  color: #fff;
  padding: 12px 24px;
  font-size: 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.carousel-buttons .btn:hover {
  background-color: #d67f0b;
  transform: scale(1.05);
}

/* === Animación del carrusel === */
@keyframes slide {
  0% { transform: translateX(0); }
  30% { transform: translateX(0); }
  33% { transform: translateX(-100vw); }
  63% { transform: translateX(-100vw); }
  66% { transform: translateX(-200vw); }
  96% { transform: translateX(-200vw); }
  100% { transform: translateX(0); }
}


.btn-center {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}