/* --- CONFIGURACIÓN GENERAL Y FONDO --- */
body { 
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
  margin: 0; 
  padding: 30px 15px; 
  background: linear-gradient(135deg, #0d1b2a 0%, #004e92 100%);
  color: #f0f4f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.container {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 100%;
  max-width: 650px;
  box-sizing: border-box;
}

h1 { 
  color: #00d2ff; 
  text-align: center;
  margin-top: 0;
  margin-bottom: 25px;
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0, 210, 255, 0.3);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #e0f2fe;
  font-size: 14px;
}

/* --- SECCIÓN FECHA --- */
.fecha-wrapper {
  text-align: center;
  margin-bottom: 25px;
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 10px;
}

#textoFecha {
  font-weight: bold;
  color: #38bdf8;
  margin: 0 0 10px 0;
  font-size: 16px;
}

input[type="date"] { 
  padding: 6px 12px; 
  width: auto; 
  max-width: 160px;
  margin: 0 auto;
  display: block;
  text-align: center;
  font-size: 14px;
  border-radius: 6px;
  border: 2px solid #0284c7;
  background-color: #0f172a;
  color: #ffffff;
  font-weight: bold;
}

/* --- SECCIÓN CÓDIGO CLIENTE --- */
#codigoSection {
  margin-bottom: 25px;
  text-align: center;
}

input[type="text"]#codigoCliente { 
  padding: 12px; 
  width: 80%; 
  max-width: 280px;
  font-size: 22px; 
  font-weight: bold;
  text-align: center;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-radius: 10px;
  border: 3px solid #38bdf8;
  background-color: #ffffff;
  color: #0f172a;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
  transition: all 0.3s ease;
}

input[type="text"]#codigoCliente:focus {
  outline: none;
  border-color: #00d2ff;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
}

#nombreCliente {
  margin-top: 10px;
  font-size: 16px;
  font-weight: bold;
}

/* --- BOTONES DE TURNOS --- */
#turnosSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.btn-turno {
  padding: 12px 24px; 
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white; 
  border: none; 
  border-radius: 8px;
  cursor: pointer; 
  margin: 6px; 
  font-size: 15px;
  font-weight: bold;
  width: 100%;
  max-width: 250px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-turno:hover { 
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
}
/* Mensaje Deuda */
#mensajeDeuda {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid #eab308;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 20px;
}
#mensajeDeuda p { margin: 0 0 12px 0; color: #fef08a; font-size: 14px; line-height: 1.4; }

.btn-aceptar {
  padding: 8px 20px;
  background: #eab308;
  color: #0f172a;
  border: none;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}
.btn-atras {
  padding: 8px 20px;
  background: #64748b; /* gris azulado suave */
  color: #ffffff;
  border: none;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s ease;
}
.btn-atras:hover {
  background: #475569; /* un poco más oscuro al pasar el mouse */
}
/* Forzar flechitas en Chrome/Android */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: auto;
  margin: 0;
}

/* Para Safari/iOS y Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

/* --- TABLA DE PANES --- */
table { 
  border-collapse: separate; 
  border-spacing: 0;
  margin-top: 25px; 
  width: 100%; 
  background: #0f172a; 
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

th, td { padding: 12px 10px; text-align: center; }

th { 
  background: #1e3a8a; 
  color: #38bdf8; 
  font-weight: bold;
  font-size: 15px;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}

td {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #f1f5f9;
  font-size: 15px;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.03); }
td:first-child { font-weight: bold; text-align: left; padding-left: 20px; color: #e0f2fe; }

table input[type="number"] { 
  padding: 8px; 
  width: 80px; 
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid #475569;
  background: #1e293b;
  color: #ffffff;
  font-weight: bold;
  text-align: center;
  font-size: 15px;
}

table input[type="number"]:focus {
  outline: none;
  border-color: #38bdf8;
  background: #0f172a;
}

/* Totales y Registro */
#totales {
  text-align: center;
  margin-top: 25px;
  font-size: 20px;
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.1);
  padding: 12px;
  border-radius: 8px;
  border: 1px dashed rgba(244, 63, 94, 0.4);
}

#btnRegistrar { 
  width: 100%;
  padding: 15px; 
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: white; 
  border: none; 
  cursor: pointer; 
  margin-top: 20px; 
  font-size: 18px;
  font-weight: bold;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  transition: all 0.3s ease;
}

#btnRegistrar:hover { 
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}
.btn-aceptar {
  padding: 8px 20px;
  background: #eab308;
  color: #0f172a;
  border: none;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
}

/* --- MEDIA QUERIES PARA CELULAR --- */
@media (max-width: 600px) {
  body { padding: 15px 10px; }
  .container { padding: 20px; max-width: 100%; }
  h1 { font-size: 22px; }
  input[type="text"], input[type="date"] { width: 100%; font-size: 14px; }
  button { width: 100%; font-size: 14px; }

  /* Scroll horizontal como respaldo */
  #listaPanes { overflow-x: auto; }
  /* Tabla normal pero más compacta */
  table { width: 100%; margin: 0; }
  th, td { font-size: 12px; padding: 4px; } /* texto y padding más pequeños */
  td:first-child { padding-left: 5px; }
  
  table input[type="number"] {
    width: 60%;      /* más compacto */
    max-width: 120px; /* nunca más ancho que 120px */
    font-size: 14px;
  }
}