/* =========================
   RESET + BASE
========================= */
* {
  box-sizing: border-box;
  font-family: "Inter", Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background: #020617;
  color: #e5e7eb;
}

/* =========================
   LOGIN
========================= */
.login-box {
  width: 320px;
  margin: 100px auto;
  padding: 26px;
  background: #0f172a;
  border-radius: 18px;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.2);
  text-align: center;
}

.login-box h2 {
  margin-bottom: 18px;
  color: #38bdf8;
}

.login-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #fff;
}

.login-box button {
  width: 100%;
  padding: 12px;
  background: #38bdf8;
  border: none;
  border-radius: 12px;
  color: #020617;
  font-weight: 700;
  cursor: pointer;
}

/* =========================
   APP & CONTENEDORES
========================= */
.app {
  max-width: 1100px;
  margin: 20px auto;
  padding: 20px;
  background: #0f172a;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

h1 {
  text-align: center;
  color: #38bdf8;
  font-size: 1.8rem;
}

/* BOTONES */
.botones {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.botones button {
  flex: 1;
  min-width: 120px;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #38bdf8;
  color: #020617;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.botones button:hover {
  background: #7dd3fc;
  transform: translateY(-2px);
}

.botones .danger {
  background: #ef4444;
  color: white;
}

/* =========================
   TABLA DE DESGLOSE
========================= */
#areaCaptura {
  background: #0f172a;
  padding: 10px;
  border-radius: 10px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

th {
  background: #1e293b;
  color: #38bdf8;
  padding: 12px;
  border: 1px solid #334155;
}

td {
  padding: 8px;
  border: 1px solid #334155;
  text-align: center;
}

td input {
  width: 80px;
  background: #020617;
  border: 1px solid #475569;
  color: white;
  padding: 5px;
  border-radius: 5px;
  text-align: center;
}

td input[readonly] {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-weight: bold;
}

/* =========================
   ESTILOS DEL OPTIMIZADOR
========================= */
#lista-medidas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
  padding: 15px;
  background: #1e293b;
  border-radius: 12px;
}

.medida-row {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #334155;
  padding: 5px;
  border-radius: 8px;
}

.perfil {
  background: #1e293b;
  border-left: 5px solid #38bdf8;
  padding: 15px;
  margin-top: 15px;
  border-radius: 8px;
}

.perfil h3 {
  margin-top: 0;
  color: #38bdf8;
  font-size: 1.1rem;
}

.perfil hr {
  border: 0;
  border-top: 1px solid #334155;
  margin: 10px 0;
}

/* =========================
   MODO CAPTURA (PARA LA FOTO)
========================= */
/* Cuando html2canvas toma la foto, usamos estas reglas */
.temp-text {
  color: white;
  font-weight: bold;
  text-align: center;
  display: block;
}

/* =========================
   RESPONSIVE (MÓVIL)
========================= */
@media (max-width: 600px) {
  .botones {
    flex-direction: column;
  }
  
  .botones button {
    width: 100%;
  }

  .app {
    margin: 10px;
    padding: 15px;
  }
}