/* M-QR · estilos propios de la app (el shell es de engine-base) */

/* ---- Tema sci-fi (Halo / StarCraft): azul noche, azul eléctrico, M ámbar ---- */
:root {
  color-scheme: dark;
  --bg: #050b14; --card: #0a1524; --ink: #d6e4f3; --muted: #7f95ae; --line: #183252;
  --glow: 0 0 0 1px #2f9bff1f, 0 0 22px #2f9bff12;
}
body {
  background: var(--bg);
  background-image: linear-gradient(#2f9bff08 1px, transparent 1px), linear-gradient(90deg, #2f9bff08 1px, transparent 1px);
  background-size: 28px 28px;
}
.top { background: linear-gradient(180deg, #0e2340, #070f1c); border-bottom: 1px solid var(--accent); box-shadow: 0 0 18px #2f9bff40; }
.logo { text-shadow: 0 0 12px #2f9bff66; }
.logo .m { text-shadow: 0 0 14px #ffb00099; }
h2, h3 { color: var(--ink); text-transform: uppercase; letter-spacing: 3px; font-size: 1.05rem; }
h2::before { content: ""; display: inline-block; width: 4px; height: .9em; background: var(--m); margin-right: 10px; vertical-align: -1px; box-shadow: 0 0 8px var(--m); }
.card { background: linear-gradient(180deg, #0c1a2d, #08121f); border: 1px solid var(--line); box-shadow: var(--glow);
  border-radius: 4px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)); }
.overlay { background: #02060ce6; }
.overlay .card { border-color: var(--accent); }
label { color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; font-size: .72rem; }
input, select, textarea { background: #050d18; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent); box-shadow: 0 0 10px #2f9bff55; }
.btn { background: #0b1a2e; color: var(--ink); border: 1px solid #23456e; border-radius: 3px; text-transform: uppercase; letter-spacing: 1px; font-size: .85rem; }
.btn:hover { border-color: var(--accent); box-shadow: 0 0 10px #2f9bff44; }
.btn.primary { background: var(--accent); color: #031021; border-color: var(--accent); font-weight: 800; box-shadow: 0 0 14px #2f9bff55; }
.btn.danger { background: #3a0f14; color: #ff8a8a; border-color: #7a2630; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.tabs { background: #060e1a; border-top: 1px solid var(--line); box-shadow: 0 -2px 14px #0008; }
.tabs button { color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.tabs button.on { color: var(--accent); text-shadow: 0 0 10px #2f9bff88; box-shadow: inset 0 3px 0 var(--accent); }
.chip { background: #12233a; color: var(--ink); border-radius: 2px; text-transform: uppercase; letter-spacing: 1px; font-size: .68rem; }
.chip.ok { background: #0d2e22; color: #3ee59a; } .chip.bad { background: #36121a; color: #ff7b86; } .chip.warn { background: #33270a; color: var(--m); }
.item { border-bottom-color: var(--line); }
.toast { background: #0b1a2e; border: 1px solid var(--accent); box-shadow: 0 0 18px #2f9bff55; }
.tbl th, .tbl td { border-bottom-color: var(--line); }
.foot { color: var(--muted); }
@media (min-width: 760px) { .tabs { border: 1px solid var(--line); } }

/* ---- M-QR ---- */
.small { font-size: .85rem; }
.qfilters { margin-top: 8px; }
.qlist { display: flex; flex-direction: column; }
.qitem { display: grid; grid-template-columns: auto 96px 1fr; gap: 12px; align-items: start; padding: 12px; }
.qitem.sel { border-color: var(--m); box-shadow: 0 0 0 1px var(--m), 0 0 18px #ffb00033; }
.qitem .t { font-weight: 700; overflow-wrap: anywhere; }
.qitem .s { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.qsel { width: 24px; height: 24px; margin-top: 4px; accent-color: var(--accent); }
.qthumb { width: 96px; height: 96px; image-rendering: pixelated; background: #fff; border-radius: 2px; border: 1px solid #23456e; }
.qchips { gap: 6px; margin: 4px 0 6px; }
.chip.din { background: #0f2c4f; color: var(--accent); }
.chip.fijo { background: #1c2633; color: #b8c6d6; }
.qacts { grid-column: 1 / -1; gap: 6px; }
.qacts .btn { flex: 1; min-width: 90px; }
.qcheck { display: flex; align-items: center; gap: 10px; font-size: 1rem; color: var(--ink); font-weight: 600; margin: 12px 0 4px; cursor: pointer; }
.qcheck input { width: 22px; height: 22px; accent-color: var(--accent); }
.qmode { margin-bottom: 4px; }
.qpreview { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px; background: #050d18; border: 1px solid var(--line); border-radius: 3px; margin-top: 14px; }
.qprev { width: 220px; height: 220px; image-rendering: pixelated; background: #fff; border-radius: 8px; }
.qlogoprev { width: 180px; height: 180px; image-rendering: pixelated; background: #fff; border-radius: 8px; border: 1px solid var(--line); margin: 10px auto; }
.qlote { font-size: .88rem; color: var(--muted); background: #050d18; border: 1px solid var(--line); border-radius: 3px; padding: 10px; margin: 10px 0; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 480px) {
  .qitem { grid-template-columns: auto 72px 1fr; }
  .qthumb { width: 72px; height: 72px; }
}
@media print {
  #printArea.qrprint { display: grid !important; gap: 6mm; grid-template-columns: repeat(var(--cols, 3), 1fr); }
  #printArea.qrprint .pc { break-inside: avoid; text-align: center; border: 1px dashed #bbb; padding: 3mm; border-radius: 3mm; }
  #printArea.qrprint img { width: 100%; display: block; }
}
