/* ===========================
   🎨 ESTILOS GENERALES
=========================== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f6f9;
  color: #333;
  box-sizing: border-box;
}

h1, h2 {
  color: #2c3e50;
  margin-top: 0;
}

.hidden {
  display: none !important;
}

/* ===========================
   📌 SIDEBAR (DESKTOP)
=========================== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 220px;
  height: 100vh;
  background-color: #004080;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1rem;
  transition: all 0.3s ease-in-out;
}

.sidebar h2 {
  color: white;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.sidebar button,
.sidebar .logout-btn {
  width: 85%;
  margin: 0.4rem 0;
  padding: 0.7rem;
  border: none;
  background: #0059b3;
  color: white;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 6px;
  text-align: center;
  transition: background 0.3s;
}

.sidebar button:hover,
.sidebar .logout-btn:hover {
  background: #003366;
}

.logout-btn {
  text-decoration: none;
}

/* ===========================
   📌 CONTENIDO PRINCIPAL
=========================== */
.content {
  margin-left: 240px; /* espacio para el sidebar */
  padding: 2rem;
  max-width: 1100px;
}

/* Margen superior extra en desktop */
.section {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}

/* ===========================
   📊 TABLA
=========================== */
.table-test {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1rem auto;
  background: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
}

.table-test th, .table-test td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
}

.table-test th {
  background-color: #e0eafc;
  color: #333;
}

.btn {
  padding: 0.4rem 0.7rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-continue {
  background: #3498db;
  color: white;
}

.btn-send {
  background: #27ae60;
  color: white;
}

.btn-continue:hover {
  background: #2c80b4;
}

.btn-send:hover {
  background: #1f8f4d;
}

/* ===========================
   📝 FORMULARIO
=========================== */
form {
  max-width: 900px;
  margin: auto;
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

fieldset {
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 2rem;
  padding: 1rem;
}

legend {
  font-weight: bold;
  font-size: 1rem;
  color: #004080;
}

label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-top: 0.3rem;
  font-size: 0.9rem;
}

.field-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.camera-label {
  display: inline-block;
  background-color: #0077cc;
  color: white;
  padding: 0.4rem 0.6rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
}

.camera-label:hover {
  background-color: #005fa3;
}

/* ===========================
   📱 RESPONSIVE
=========================== */

/* --- Para tablets --- */
@media (max-width: 1024px) {
  .content {
    margin-left: 0;
    padding: 1rem;
  }

  .sidebar {
    position: fixed;
    width: 200px;
    left: -200px;
    z-index: 1000;
  }

  .sidebar.active {
    left: 0;
  }

  .hamburger {
    display: block;
    position: fixed;
    top: 15px;
    left: 15px;
    background: #004080;
    color: white;
    border: none;
    padding: 0.6rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1100;
  }
}

/* --- Para móviles --- */
@media (max-width: 768px) {
  body {
    font-size: 0.9rem;
  }

  .table-test th, .table-test td {
    font-size: 0.8rem;
    padding: 0.4rem;
  }

  form {
    padding: 1rem;
  }
}
#section-dashboard {
    max-width: 90%;
    margin: 2rem auto;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 🔹 Limita el alto del canvas */
#chart-test {
    max-height: 400px; /* Puedes subirlo a 500px si lo necesitas más grande */
    width: 100% !important;
    height: auto !important;
}
.chart-container {
    position: relative;
    width: 100%;
    max-width: 900px; /* ajusta si quieres */
    height: 400px; /* altura fija para evitar scroll infinito */
    margin: 2rem auto;
}
/* ✅ Grid para el Paso 1 */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

/* ✅ Tabla de resultados (responsive) */
.table-responsive {
  overflow-x: auto;
}

.test-table, .test-table th, .test-table td {
  border: 1px solid #ddd;
}

.test-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.test-table th, .test-table td {
  padding: 0.5rem;
  text-align: center;
}

.test-table th {
  background-color: #f7f7f7;
  font-weight: 600;
}

/* ✅ Inputs dentro de la tabla */
.input-result, .input-unit, .input-obs {
  width: 100%;
  padding: 0.3rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.btn-na, .btn-camera {
  padding: 0.3rem 0.5rem;
  border: none;
  border-radius: 4px;
  background-color: #3498db;
  color: white;
  cursor: pointer;
}

.btn-na {
  margin-bottom: 0.3rem;
  display: block;
  width: 100%;
}

.btn-na:hover, .btn-camera:hover {
  background-color: #2980b9;
}
