* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f6f7f9;
  color: #1a1a1a;
}

.contenedor {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.contenedor.angosto {
  max-width: 420px;
}

h1 {
  text-align: center;
  letter-spacing: 1px;
  margin-bottom: 30px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.precio {
  font-size: 22px;
  font-weight: 600;
  margin: 8px 0 16px;
}

.ref {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  background: #16a34a;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}

.btn:hover { background: #15803d; }

.volver {
  display: inline-block;
  margin-bottom: 16px;
  color: #374151;
  text-decoration: none;
}

.vacio {
  text-align: center;
  color: #6b7280;
}

form label {
  display: block;
  text-align: left;
  margin: 12px 0 4px;
  font-size: 14px;
  color: #374151;
}

form input {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
}

form button.btn {
  margin-top: 16px;
}

.error {
  color: #dc2626;
  font-size: 14px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.admin-header h1 { margin: 0; }

.salir {
  color: #374151;
  text-decoration: none;
  font-size: 14px;
}

.tabla {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 24px;
}

.tabla th, .tabla td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.btn-eliminar {
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.comprobante .marca {
  letter-spacing: 2px;
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 0;
}

.datos {
  text-align: left;
  margin: 20px 0;
  font-size: 14px;
}

.datos p { margin: 6px 0; }

.ok {
  color: #16a34a;
  font-weight: 700;
  font-size: 18px;
}

.pendiente {
  color: #b45309;
  font-weight: 600;
}

.nota {
  color: #6b7280;
  font-size: 13px;
}

.centrado { text-align: center; }

.spinner {
  margin: 20px auto;
  width: 36px;
  height: 36px;
  border: 4px solid #e5e7eb;
  border-top-color: #16a34a;
  border-radius: 50%;
  animation: girar 0.8s linear infinite;
}

@keyframes girar {
  to { transform: rotate(360deg); }
}
