/* We Collect portal */
@font-face { font-family: 'Heebo'; font-weight: 400 800; font-display: swap; src: url(/assets/heebo-latin.woff2) format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-weight: 400 800; font-display: swap; src: url(/assets/inter-tight-latin.woff2) format('woff2'); }

:root {
  --ink: #1f2224; --dark: #17191b; --text: #33373a; --muted: #646a6e; --line: #e2e5e7; --bg: #f4f5f3;
  --lime: #a2d61d; --lime-hover: #b4e43a; --lime-dark: #4a7300; --lime-soft: #eef6d8;
  --red: #b42318; --red-soft: #fde9e7; --amber: #8a5a00; --amber-soft: #fff3d6; --blue: #175cd3; --blue-soft: #e6effd;
  --radius: 12px; --font: 'Heebo', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Inter Tight', var(--font);
}
* { box-sizing: border-box; }
body { margin: 0; font: 400 15px/1.55 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--lime-dark); }
h1, h2, h3 { font-family: var(--display); color: var(--ink); letter-spacing: -.015em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.65rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
code, .mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .92em; }
.muted { color: var(--muted); } .small { font-size: .87rem; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Frame */
body:not(.bare) { display: grid; grid-template-columns: 230px 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; background: var(--dark); padding: 10px 20px; position: sticky; top: 0; z-index: 20; }
.top__brand img { display: block; }
.top__menu { display: none; }
.top__scan { flex: 1; max-width: 520px; margin-left: auto; }
.top__scan input { width: 100%; background: #2a2d30; border: 1px solid #3a3e42; color: #fff; border-radius: 999px; padding: 9px 16px; font: inherit; }
.top__scan input::placeholder { color: #9aa1a6; }
.top__scan input:focus { outline: 2px solid var(--lime); border-color: transparent; }
.nav { background: var(--ink); color: #cfd4d7; display: flex; flex-direction: column; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; }
.nav ul { list-style: none; margin: 0; padding: 12px 10px; display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: #dfe3e5; text-decoration: none; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a[aria-current="page"] { background: rgba(162,214,29,.14); color: var(--lime); }
.nav .count { margin-left: auto; background: var(--lime); color: var(--ink); font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.nav__foot { margin-top: auto; padding: 14px 22px; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.nav__foot button { background: none; border: 0; color: var(--lime); cursor: pointer; font: inherit; padding: 0; }
.main { padding: 26px 30px 60px; min-width: 0; }
.main--bare { padding: 0; }

@media (max-width: 860px) {
  body:not(.bare) { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .top__menu { display: inline-block; margin-left: auto; background: transparent; color: #fff; border: 1px solid #3a3e42; border-radius: 8px; padding: 7px 12px; font: inherit; }
  .top__scan { order: 3; flex-basis: 100%; max-width: none; }
  .nav { display: none; position: fixed; inset: 108px 0 0 0; height: auto; z-index: 30; }
  .nav.is-open { display: flex; }
  .main { padding: 18px 14px 50px; }
}

/* Building blocks */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.card > h2:first-child { margin-bottom: 14px; }
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.head h1 { margin: 0; }
.head .sub { color: var(--muted); margin: 2px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: inherit; display: block; }
a.stat:hover { border-color: var(--lime); }
.stat strong { display: block; font-family: var(--display); font-size: 1.8rem; color: var(--ink); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .88rem; }
.stat--warn strong { color: var(--red); }

.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 .93rem/1 var(--font); padding: 10px 16px; border-radius: 8px; border: 1px solid #cdd2d5; background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn--primary { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn--primary:hover { background: var(--lime-hover); border-color: var(--lime-hover); }
.btn--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--danger { color: var(--red); border-color: #f0b8b2; }
.btn--sm { padding: 6px 10px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Forms */
label { display: block; font-weight: 600; color: var(--ink); font-size: .9rem; }
label .opt { font-weight: 400; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: 5px; font: inherit; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid #c9cfd3; border-radius: 8px; padding: 9px 11px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime-dark); box-shadow: 0 0 0 3px rgba(162,214,29,.35); }
input[type="checkbox"], input[type="radio"] { display: inline; width: auto; margin: 0 6px 0 0; }
.stack { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.inline-form { display: inline; }
.check { display: flex; align-items: center; font-weight: 500; }

/* Tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #fafbf9; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbf9; }
td a { font-weight: 600; }
.num { text-align: right; }
.empty { padding: 26px; text-align: center; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.filters label { font-size: .8rem; }
.filters input, .filters select { margin-top: 3px; padding: 7px 10px; min-width: 150px; }

/* Badges */
.badge { display: inline-block; font-size: .76rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #eceff1; color: #3a3f43; white-space: nowrap; }
.badge--new, .badge--pending, .badge--quoted, .badge--booked, .badge--received { background: var(--blue-soft); color: var(--blue); }
.badge--processing, .badge--collected, .badge--check, .badge--contacted { background: var(--amber-soft); color: var(--amber); }
.badge--wiped, .badge--destroyed, .badge--complete, .badge--ready, .badge--cleared, .badge--won, .badge--sold, .badge--donated, .badge--for_sale { background: var(--lime-soft); color: var(--lime-dark); }
.badge--failed, .badge--lost, .badge--cancelled { background: var(--red-soft); color: var(--red); }

.flash { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-weight: 500; }
.flash--ok { background: var(--lime-soft); color: #2f4a00; }
.flash--err { background: var(--red-soft); color: var(--red); }
.flash--warn { background: var(--amber-soft); color: var(--amber); }
.note { background: var(--amber-soft); color: #5f3e00; border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; font-size: .92rem; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: .88rem; }
dl.facts dd { margin: 0; color: var(--ink); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; font-size: .9rem; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); }
.timeline time { color: var(--muted); font-size: .82rem; display: block; }

.barcode { display: block; max-width: 100%; height: auto; }
.tagbox { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px 4px; text-align: center; }
.tagbox code { display: block; font-weight: 700; margin-top: 2px; }

/* Sign-in pages */
.auth { max-width: 420px; margin: 8vh auto; padding: 0 16px; }
.auth--wide { max-width: 520px; }
.auth__logo { display: block; margin: 0 auto 22px; }
.auth .card { padding: 30px; }
.qr { display: flex; justify-content: center; margin: 18px 0; }
.qr img, .qr canvas { border: 8px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.key { word-spacing: 4px; font-weight: 700; }
.steps-list { padding-left: 1.2em; }

/* Scan & check-in */
.scan-box { display: flex; gap: 10px; }
.scan-box input { font-size: 1.3rem; padding: 14px 16px; margin: 0; }
.scan-box .btn { flex: none; }
.camera { display: none; margin-top: 12px; }
.camera.is-on { display: block; }
.camera video { width: 100%; max-width: 480px; border-radius: 10px; background: #000; }
.last-added { border-left: 4px solid var(--lime); }

/* Customer portal */
.cert-list li { margin-bottom: 6px; }

@media print {
  .top, .nav, .no-print { display: none !important; }
  body { display: block !important; background: #fff; }
}

/* Hardware */
.meter { height: 10px; background: #eceff1; border-radius: 999px; overflow: hidden; margin: 4px 0 8px; max-width: 320px; }
.meter span { display: block; height: 100%; border-radius: 999px; }
.meter--ok { background: var(--lime); } .meter--warn { background: #e0a400; } .meter--bad { background: var(--red); }
.badge--ok { background: var(--lime-soft); color: var(--lime-dark); }
details summary { cursor: pointer; }
.batt { font-weight: 700; } .batt--warn { color: var(--amber); } .batt--bad { color: var(--red); }
