/* AutoWAREHOUSE — light theme matched to the Product Dashboard CI
   (white background, navy primary buttons, slate text, light borders). */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --bg: #F8FAFC; --card: #FFFFFF; --card2: #F1F5F9; --line: #E2E8F0;
  --text: #1E293B; --dim: #64748B; --accent: #1E3A5F; --accent2: #3B6DA8;
  --ok: #38A169; --bad: #E53E3E; --warn: #D69E2E;
}
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font: 16px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif; }
#app { max-width: 560px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }
#topbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #FFFFFF; z-index: 5; }
#brand { font-weight: 800; letter-spacing: .5px; color: var(--accent); }
#whoami { flex: 1; color: var(--dim); font-size: 14px; }
#view { flex: 1; padding: 14px; padding-bottom: 40px; }

h1 { font-size: 20px; margin: 6px 0 14px; color: var(--accent); }
h2 { font-size: 16px; margin: 14px 0 8px; color: var(--dim); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; }
.dim { color: var(--dim); font-size: 14px; }
.big { font-size: 22px; font-weight: 700; }
.mono { font-family: ui-monospace, Menlo, monospace; }

button { border: 0; border-radius: 8px; padding: 14px 16px; font-size: 16px; font-weight: 700; color: #fff; background: var(--accent); width: 100%; margin-top: 8px; cursor: pointer; }
button:hover { filter: brightness(1.12); }
button.ok { background: var(--ok); } button.bad { background: var(--bad); } button.warn { background: var(--warn); color: #fff; }
button.ghost { background: #fff; border: 1px solid var(--line); color: #475569; width: auto; padding: 8px 12px; margin: 0; font-weight: 600; }
button.small { width: auto; padding: 10px 14px; margin: 0; font-size: 14px; }
button:disabled { opacity: .45; cursor: default; }
.tile { display: block; text-align: left; background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; color: var(--text); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.tile:hover { border-color: var(--accent2); filter: none; }
.tile .t { font-size: 18px; color: var(--accent); } .tile .d { font-size: 13px; color: var(--dim); font-weight: 400; margin-top: 2px; }

input, select { width: 100%; background: #fff; color: var(--text); border: 1px solid #CBD5E1; border-radius: 8px; padding: 13px; font-size: 17px; margin-top: 6px; }
input:focus, select:focus { outline: 2px solid var(--accent2); outline-offset: -1px; }
input.qty { font-size: 28px; text-align: center; font-weight: 800; }
label { font-size: 13px; color: var(--dim); display: block; margin-top: 10px; }

#scanner { border-radius: 10px; overflow: hidden; border: 2px solid var(--accent2); margin-top: 8px; background: #0f172a; }
#scanner video { display: block; width: 100% !important; }
.scanhint { text-align: center; color: var(--dim); font-size: 13px; margin-top: 6px; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.pill.ok { background: #E6F4EA; color: #276749; }
.pill.bad { background: #FDE8E8; color: #C53030; }
.pill.warn { background: #FEF3C7; color: #92400E; }
.pill.dim { background: #EDF2F7; color: #475569; }

.list { border-top: 1px solid var(--line); }
.list .item { padding: 11px 2px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

#flash { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 50; }
#flash.ok { background: rgba(56,161,105,.4); opacity: 1; }
#flash.bad { background: rgba(229,62,62,.45); opacity: 1; }

#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); max-width: 92%; z-index: 60;
  background: var(--bad); color: #fff; font-size: 14px; font-weight: 600; padding: 12px 18px; border-radius: 10px;
  box-shadow: 0 4px 14px rgba(15,23,42,.25); opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.show { opacity: 1; }
#toast.info { background: var(--accent2); }

.qrbox { background: #fff; border: 1px solid var(--line); padding: 18px; border-radius: 10px; display: flex; justify-content: center; margin-top: 10px; }
.center { text-align: center; }
.spacer { height: 8px; }
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plain td, table.plain th { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: left; }
