body {
  margin: 0;
  padding: 0;

  background: #f2f2f2;
  font-family: Arial, sans-serif;
}

#login {
  max-width: 350px;
  margin: 120px auto;
  background: white;
  padding: 30px;
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  text-align: center;
}

#login h2 {
  margin-bottom: 20px;
}

#login input {
  width: 90%;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 16px;
}

#login button,
button {
  background: #1565c0;
  color: white;
  border: none;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
}

#login button:hover,
button:hover {
  background: #333333;
}

#error {
  color: red;
  font-weight: bold;
}

#contenido {
    padding: 20px;
  width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}


#tituloPrincipal {
    background: #1051ca;
    color: white;
    margin: 0 0 20px 0;
    padding: 20px;
    text-align: center;
    border-radius: 0 0 20px 20px;
}

#detallePrecio {
    background: #d81e05;
    color: white;
    margin: 0 0 20px 0;
    padding: 20px;
    text-align: center;
    border-radius: 0 0 20px 20px;
}

#buscador {
  width: 90%;
  max-width: 500px;
  padding: 14px;
  border-radius: 12px;
  border: 2px solid #111;
  font-size: 16px;
  margin-bottom: 15px;
}

table {
  width: 100%;
  max-width: 1800px;
  margin: 20px auto;
  border-collapse: collapse;
  background: white;
  border-radius: 14px;
  overflow: hidden;
}

th {
  background: #1565c0;
  color: white;
  padding: 14px;
}

td {
  padding: 12px;
  border-bottom: 1px solid #ddd;
}

td:nth-child(11), th:nth-child(11) {
  background: #e74c3c;
  color: white;
  font-weight: bold;
}

tr:hover {
  background: #f5f5f5;
}

@media (max-width: 700px) {
  table {
    font-size: 13px;
  }

  th, td {
    padding: 8px;
  }

  h1 {
    font-size: 22px;
  }
  th, td {
  text-align: center;
}

td:nth-child(5),
th:nth-child(5) {
  min-width: 130px;
}
#contenido {
  width: 100%;
  overflow-x: auto;
}
#cerrarCamara {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    background: red;
    color: white;
    font-size: 16px;
    display: none;
}
#camara {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    background: black;
    z-index: 9999;
    display: none;
}
@media (max-width: 768px) {
  body {
    background: #f4f6f9;
    margin: 0;
    font-family: Arial, sans-serif;
  }

  h1 {
    position: sticky;
    top: 0;
    z-index: 100;
    margin: 0;
    padding: 18px;
    border-radius: 0 0 18px 18px;
    font-size: 22px;
    background: #1565c0;
    color: white;
  }

  #buscador {
    width: calc(100% - 32px);
    margin: 18px 16px 10px 16px;
    padding: 14px;
    font-size: 16px;
    border-radius: 14px;
  }

  button {
    width: calc(100% - 32px);
    margin: 8px 16px 18px 16px;
    padding: 14px;
    border-radius: 14px;
    font-size: 16px;
  }

  #contenido {
    padding: 0;
  }

  table {
    width: calc(100% - 20px);
    margin: 10px;
    font-size: 12px;
    border-radius: 16px;
    overflow: hidden;
  }

  th {
    padding: 10px 6px;
    font-size: 12px;
  }

  td {
    padding: 9px 6px;
    font-size: 12px;
  }

  td:nth-child(3),
  th:nth-child(3) {
    min-width: 150px;
  }

  td:nth-child(11),
  th:nth-child(11) {
    font-weight: bold;
  }
}
}
#scanner-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: black;
    z-index: 9999;
    display: none;
    overflow: hidden;
}
#scanner-container video {
    position: absolute !important;
    top: 0;
    left: 0;

    width: 100% !important;
    height: 100% !important;

    object-fit: cover;
    z-index: 1;
}

#scanner-container canvas {
    position: absolute !important;
    top: 0;
    left: 0;

    width: 100% !important;
    height: 100% !important;

    z-index: 2;
}
#scanner-overlay {
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 220px;
    transform: translate(-50%, -50%);
    border: 4px solid rgba(255,255,255,0.8);
    border-radius: 20px;
    box-sizing: border-box;
 z-index: 999999 !important;
    overflow: hidden;
}

#scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;

    display: block !important;
    opacity: 1 !important;

    background: red;
    box-shadow: 0 0 20px red;

    z-index: 1000000 !important;

    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% {
        top: 0;
    }

    50% {
        top: calc(100% - 4px);
    }

    100% {
        top: 0;
    }
}
#detalle {
    text-align: center;
    padding: 20px;
}

#detalle h1,
#detalle h2,
#detalle h3,
#detalle p {
    margin: 10px 0;
}

#detalle button {
    display: block;
    margin: 0 auto 20px auto;
}
#detallePrecio {
    font-size: 60px;
    font-weight: bold;
    color: white;
}
#logo {
    display: block;
    margin: 20px auto;
    width: 300px;
    height: auto;
}


#scanner-container video,
#scanner-container canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}