:root {
  --azul: #0b4fa3;
  --azul-claro: #e8f0fb;
  --rojo: #d62d20;
  --fondo: #f3f4f6;
  --tinta: #1a1a1a;
  --gris: #6b7280;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--fondo);
  color: var(--tinta);
  font-size: 17px;
}
.barra { background: #fff; text-align: center; padding: 8px; border-bottom: 3px solid var(--azul); }
.barra img { height: 64px; }

.pestanas { display: flex; background: var(--azul); position: sticky; top: 0; z-index: 5; }
.pestanas button {
  flex: 1; border: 0; background: none; color: #cfe0f7; padding: 14px 4px;
  font-size: 15px; font-weight: 600;
}
.pestanas button.activa { color: #fff; box-shadow: inset 0 -4px 0 #fff; }

main { max-width: 560px; margin: 0 auto; padding: 12px 16px 40px; }
h2 { font-size: 15px; text-transform: uppercase; color: var(--azul); margin: 22px 0 8px; letter-spacing: .5px; }
label { display: block; font-size: 14px; color: var(--gris); margin-bottom: 10px; }
input {
  display: block; width: 100%; margin-top: 4px; padding: 12px; font-size: 18px;
  border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--tinta);
}
input:focus { outline: 2px solid var(--azul); border-color: var(--azul); }
input.placa { text-transform: uppercase; font-weight: 700; letter-spacing: 2px; }

.aviso { background: var(--azul-claro); border-left: 4px solid var(--azul); padding: 10px 12px; border-radius: 8px; margin-bottom: 10px; font-size: 15px; }

.item { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.item .fila { display: flex; gap: 8px; }
.item .fila label { flex: 1; margin-bottom: 6px; }
.item .fila label.cant { flex: 0 0 80px; }
.item .pie-item { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.item .quitar { border: 0; background: none; color: var(--rojo); font-size: 15px; padding: 6px 0; }

.total-grande {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--azul); color: #fff; border-radius: 12px; padding: 14px 16px;
  font-size: 20px; font-weight: 700; margin: 18px 0;
}

button.principal, button.secundario {
  display: block; width: 100%; padding: 15px; font-size: 18px; font-weight: 700;
  border-radius: 12px; border: 0; margin-top: 8px;
}
button.principal { background: #1fa855; color: #fff; }
button.secundario { background: #fff; color: var(--azul); border: 2px solid var(--azul); }

.tarjeta {
  background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px;
  border: 1px solid #e5e7eb; width: 100%; text-align: left; font-size: 15px; color: var(--tinta);
  display: block;
}
.tarjeta .arriba { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 4px; }
.tarjeta .gris { color: var(--gris); font-size: 14px; }
.vacio { text-align: center; color: var(--gris); padding: 30px 10px; }

dialog { border: 0; border-radius: 14px; padding: 12px; width: min(96vw, 560px); max-height: 94vh; }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog img { width: 100%; border: 1px solid #e5e7eb; border-radius: 6px; }
