/* NerG brand colours */
:root {
  --flame: #FF5100; --pumpkin: #FF6900; --pumpkin-light: #FF7D32;
  --pitch: #131606; --forest: #2E3C34; --warm-grey: #525349;
  --stone: #D6D2C1; --linen: #E6DFD5; --parchment: #F1F1EC; --white: #FFFFFF;
  --red: #b42318;
  --bg: var(--parchment); --card: var(--white); --line: var(--stone); --text: var(--pitch); --muted: var(--warm-grey);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--forest); text-underline-offset: 2px; }
a:hover { color: var(--flame); }
h1 { font-size: 1.4rem; line-height: 1.2; font-weight: 700; margin: 0 0 .5rem; }
h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
p { margin: .4rem 0; }
code { background: var(--linen); padding: 1px 4px; border-radius: 3px; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

.top { background: var(--white); color: var(--pitch); padding: .55rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--stone); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--pitch); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.brand img { height: 38px; width: auto; display: block; }
.brand span { border-left: 2px solid var(--stone); padding-left: .6rem; color: var(--warm-grey); }
.who { font-size: .85rem; color: var(--warm-grey); text-align: right; }
.nav { background: var(--pitch); display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--stone); text-decoration: none; padding: .65rem .9rem; white-space: nowrap; font-size: .95rem; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--white); }
.nav a.on { color: var(--white); border-bottom-color: var(--flame); font-weight: 600; }

main { max-width: 980px; margin: 0 auto; padding: .8rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin-bottom: .8rem; }
.card.narrow { max-width: 420px; margin: 1.5rem auto; }
.card.warn { border-color: var(--pumpkin-light); background: var(--linen); }
.headrow { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }

label { display: block; margin: .55rem 0; font-size: .9rem; color: var(--forest); font-weight: 600; }
input, select, textarea { display: block; width: 100%; margin-top: .25rem; padding: .65rem .7rem; font: inherit; font-weight: 400; border: 1px solid var(--stone); border-radius: 8px; background: #fff; color: var(--text); }
input[type=checkbox] { display: inline-block; width: 1.25rem; height: 1.25rem; margin: 0 .45rem 0 0; vertical-align: middle; }
input[type=file] { padding: .5rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--pumpkin-light); outline-offset: 0; border-color: var(--flame); }
input[type=checkbox] { accent-color: var(--flame); }
label.check { font-weight: 400; display: flex; align-items: center; }
.row { display: grid; grid-template-columns: 1fr; gap: 0 .8rem; }
@media (min-width: 560px) { .row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.filters .row label { margin: .35rem 0; }
form.inline { display: inline-flex; gap: .4rem; margin: .3rem .3rem .6rem 0; }
form.inline input { margin: 0; }

.btn { display: inline-block; background: var(--flame); color: #fff; border: 0; border-radius: 8px; padding: .65rem 1.1rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; margin: .3rem .3rem .3rem 0; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn:hover { background: var(--pumpkin); color: #fff; }
.btn.grey { background: var(--linen); color: var(--pitch); }
.btn.grey:hover { background: var(--stone); color: var(--pitch); }
.btn.small { padding: .35rem .7rem; font-size: .85rem; }
.btn.big { display: block; width: 100%; padding: .95rem; font-size: 1.1rem; margin: .7rem 0 .2rem; }
.btn.scan { background: var(--flame); box-shadow: 0 2px 0 #c43e00; }

.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: .8rem; }
.alert.ok { background: #e8efe9; border: 1px solid #9fb5a6; color: var(--forest); }
.alert.err { background: #fdeceb; border: 1px solid #f1b0aa; color: #7a1d14; }
.err-text { color: var(--red); font-weight: 600; }

.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: .4rem -.2rem; }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th, table.list td { padding: .5rem .45rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list thead th { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
table.list tfoot th { border-top: 2px solid var(--warm-grey); border-bottom: 0; }
table.list tr.mine td { background: #fff1e8; font-weight: 600; }
table.list tr.low td { background: var(--linen); }
table.list td input { margin: 0; padding: .4rem .5rem; }
table.grid td, table.grid th { padding: .35rem .4rem; font-size: .85rem; }
.r { text-align: right !important; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tag { background: var(--flame); color: #fff; font-size: .7rem; padding: 1px 6px; border-radius: 10px; text-transform: uppercase; }
.countbox { width: 6.5rem; display: inline-block; text-align: right; }
.shortbox { width: 7rem; }

.partcode { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.tabs { display: flex; gap: .3rem; margin-bottom: .6rem; flex-wrap: wrap; }
.tabs button { flex: 1 1 auto; padding: .65rem .5rem; border: 1px solid var(--stone); background: var(--parchment); border-radius: 8px; font: inherit; font-weight: 600; color: var(--forest); cursor: pointer; }
.tabs button.on { background: var(--pitch); border-color: var(--pitch); color: #fff; box-shadow: inset 0 -3px 0 var(--flame); }

ul.plain { margin: 0; padding-left: 1.1rem; }
ul.picklist, ul.checklist { list-style: none; margin: 0; padding: 0; }
ul.picklist li a { display: flex; justify-content: space-between; gap: .5rem; padding: .8rem .3rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
ul.picklist .qty { color: var(--muted); white-space: nowrap; }
ul.checklist li { border-bottom: 1px solid var(--line); }
ul.checklist label { margin: 0; padding: .45rem 0; }

.scanner #reader { width: 100%; border-radius: 8px; overflow: hidden; background: #000; min-height: 60px; }
.scanner #reader video { width: 100% !important; }

.loginlogo { display: block; width: 190px; max-width: 70%; margin: .3rem auto 1.2rem; }
.inputrow { display: flex; gap: .4rem; align-items: stretch; margin-top: .25rem; }
.inputrow input { margin: 0; flex: 1; min-width: 0; }
.inputrow .btn { margin: 0; }
.quickfind { padding: .7rem 1rem; }
.quickfind label { margin: 0; }
.btn.danger { background: #b42318; color: #fff; }
.btn.danger:hover { background: #8f1c13; color: #fff; }
ul.checklist li.labelrow { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
ul.checklist li.labelrow .btn { margin: .25rem 0; white-space: nowrap; }
