* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f3f4f6;
  color: #1f2937;
}
header {
  background: #1e3a8a;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
header h1 { font-size: 1.2rem; margin: 0; }
#sesion { font-size: .85rem; opacity: .85; }
.pantalla {
  max-width: 640px;
  margin: 16px auto;
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.oculto { display: none !important; }
h2 { margin-top: 0; font-size: 1.15rem; }
label { display: block; margin-bottom: 10px; font-size: .9rem; }
input, textarea, select {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  font-size: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}
button {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
}
button.secundario { background: #64748b; }
button.peligro { background: #dc2626; }
button:disabled { opacity: .6; }
.fila { display: flex; gap: 8px; align-items: center; }
.fila input { margin: 0; }
.fila button { width: auto; margin: 0; white-space: nowrap; }
.preview { max-width: 160px; border-radius: 6px; margin-bottom: 8px; }
.articulo {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 0;
}
.articulo img, .sin-foto {
  width: 72px; height: 72px; object-fit: cover; border-radius: 6px; background: #e5e7eb;
}
.articulo .nombre { font-weight: 600; }
.articulo .descripcion { font-size: .85rem; color: #4b5563; }
.articulo .precio { color: #065f46; font-weight: 600; }
.articulo .acciones { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.articulo .acciones input { width: 80px; margin: 0; }
.articulo .acciones button { width: auto; margin: 0; padding: 8px 12px; }
.total { font-size: 1.1rem; text-align: right; }
#aviso {
  position: fixed;
  left: 50%; bottom: 20px;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  max-width: 90%;
  z-index: 10;
}
#aviso.error { background: #b91c1c; }
