/* University Inventory — design system. No build step. */
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --brand: #0f6b47; --brand-d: #0a4f34; --brand-l: #e6f3ec; --brand-ll: #f3faf6;
  --gold: #c8962b; --gold-l: #fbf3df;
  --bg: #f4f6f5; --card: #ffffff; --ink: #14201b; --ink-2: #4a5a53; --muted: #7a8a83; --line: #e3e9e6; --line-2: #eef2f0;
  --side: #0b3b2a; --side-2: #0e4a35; --side-ink: #c9ddd3; --side-ink-h: #ffffff;
  --ok: #15803d; --ok-l: #dcfce7; --warn: #b45309; --warn-l: #fef3c7; --bad: #b91c1c; --bad-l: #fee2e2; --info: #1d4ed8; --info-l: #dbeafe; --gray: #475569; --gray-l: #e2e8f0; --violet: #6d28d9; --violet-l: #ede9fe;
  --r: 12px; --r-sm: 8px;
  --shadow: 0 1px 2px rgba(16,40,30,.05), 0 4px 14px rgba(16,40,30,.05);
  --shadow-lg: 0 10px 40px rgba(10,30,22,.18);
}
[data-theme="dark"] {
  --brand: #34b27d; --brand-d: #2a9566; --brand-l: #123a2b; --brand-ll: #0f2c21;
  --gold: #e0b04a; --gold-l: #3a2f12;
  --bg: #0c1311; --card: #131d19; --ink: #e8f0ec; --ink-2: #b4c4bc; --muted: #829189; --line: #223029; --line-2: #1a2621;
  --side: #08120e; --side-2: #10201a; --side-ink: #9db3a8;
  --ok: #4ade80; --ok-l: #11331e; --warn: #fbbf24; --warn-l: #3a2c0b; --bad: #f87171; --bad-l: #3b1616; --info: #60a5fa; --info-l: #14284a; --gray: #cbd5e1; --gray-l: #243038; --violet: #a78bfa; --violet-l: #2a1f4d;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--ink); background: var(--bg); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; font-weight: 700; } h2 { font-size: 1.1rem; font-weight: 650; } h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 .6rem; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); } .nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; letter-spacing: -.01em; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--side) 0%, var(--side-2) 100%); color: var(--side-ink); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto; }
.brand { display: flex; gap: 11px; align-items: center; padding: 4px 8px 18px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand img, .brand .logo-fallback { width: 42px; height: 42px; border-radius: 10px; flex: none; background: #fff; object-fit: contain; padding: 3px; }
.logo-fallback { display: grid; place-items: center; color: var(--brand-d); font-weight: 800; font-size: 14px; letter-spacing: -.03em; }
.brand b { display: block; font-size: .95rem; line-height: 1.2; font-weight: 650; }
.brand span { font-size: .72rem; color: var(--side-ink); opacity: .85; }
.nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: #6f9484; margin: 16px 10px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--side-ink); font-weight: 500; margin-bottom: 2px; position: relative; }
.nav a:hover { background: rgba(255,255,255,.07); color: var(--side-ink-h); text-decoration: none; }
.nav a.on { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav a .i { opacity: .9; }
.nav .count { margin-left: auto; background: var(--gold); color: #3a2a05; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.side-foot { margin-top: auto; padding: 14px 8px 2px; border-top: 1px solid rgba(255,255,255,.08); font-size: .8rem; }
.me { display: flex; gap: 10px; align-items: center; color: #fff; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #3a2a05; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.me b { display: block; font-size: .85rem; line-height: 1.2; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me span { font-size: .72rem; opacity: .75; }

.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 12px 28px; display: flex; gap: 14px; align-items: center; }
.search { position: relative; flex: 1; max-width: 520px; }
.search input[type=search] { width: 100%; padding: 9px 14px 9px 38px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; font: inherit; color: var(--ink); }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: .7rem; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--muted); background: var(--bg); }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn.menu-btn { display: none; }
.content { padding: 26px 28px 60px; max-width: 1480px; width: 100%; margin: 0 auto; }

.page-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--muted); margin: 4px 0 0; }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); } .crumbs span { margin: 0 6px; opacity: .6; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- components ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { padding: 16px 20px 0; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.card-h h2 { display: flex; gap: 8px; align-items: center; }
.card-b { padding: 16px 20px 20px; }
.card-b.flush { padding: 0; }
.grid { display: grid; gap: 18px; } .g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.mt { margin-top: 18px; } .mb { margin-bottom: 18px; } .mt-s { margin-top: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: .88rem; padding: 8px 15px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; background: var(--brand); color: #fff; transition: .15s; white-space: nowrap; line-height: 1.3; }
.btn:hover { background: var(--brand-d); text-decoration: none; color: #fff; }
.btn.sec { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.sec:hover { background: var(--brand-ll); border-color: var(--brand); color: var(--brand-d); }
.btn.ghost { background: transparent; color: var(--ink-2); } .btn.ghost:hover { background: var(--line-2); color: var(--ink); }
.btn.gold { background: var(--gold); color: #2f2204; } .btn.gold:hover { background: #b78520; color: #2f2204; }
.btn.danger { background: var(--bad); } .btn.danger:hover { background: #991b1b; }
.btn.danger.sec { background: var(--card); color: var(--bad); border-color: var(--line); } .btn.danger.sec:hover { background: var(--bad-l); border-color: var(--bad); color: var(--bad); }
.btn.sm { padding: 5px 11px; font-size: .8rem; border-radius: 8px; } .btn.lg { padding: 12px 20px; font-size: 1rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--brand-ll); color: var(--brand); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: .74rem; font-weight: 600; white-space: nowrap; background: var(--gray-l); color: var(--gray); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.c-good, .badge.s-active, .badge.s-completed, .badge.s-verified, .badge.s-closed, .badge.s-resolved, .badge.s-approved { background: var(--ok-l); color: var(--ok); }
.badge.c-fair, .badge.s-pending, .badge.s-submitted { background: var(--warn-l); color: var(--warn); }
.badge.c-damaged, .badge.s-rejected, .badge.s-discrepancy { background: var(--bad-l); color: var(--bad); }
.badge.c-unserviceable, .badge.s-disposed, .badge.s-cancelled { background: var(--gray-l); color: var(--gray); }
.badge.s-missing { background: var(--violet-l); color: var(--violet); }
.badge.s-open { background: var(--info-l); color: var(--info); }
.badge.s-approved { background: var(--info-l); color: var(--info); }
.tag { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-size: .76rem; background: var(--line-2); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; color: var(--ink-2); white-space: nowrap; }

.alert { display: flex; gap: 11px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; font-size: .9rem; }
.alert.ok { background: var(--ok-l); border-color: color-mix(in srgb, var(--ok) 30%, transparent); color: var(--ok); }
.alert.err { background: var(--bad-l); border-color: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--bad); }
.alert.warn { background: var(--warn-l); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
.alert.info { background: var(--info-l); border-color: color-mix(in srgb, var(--info) 30%, transparent); color: var(--info); }
.alert .i { margin-top: 2px; }

/* KPI cards */
.kpi { padding: 18px 20px; display: flex; gap: 14px; align-items: center; transition: .15s; color: inherit; }
a.kpi:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.kpi .chip { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.kpi .chip.green { background: var(--brand-l); color: var(--brand); } .kpi .chip.blue { background: var(--info-l); color: var(--info); }
.kpi .chip.red { background: var(--bad-l); color: var(--bad); } .kpi .chip.violet { background: var(--violet-l); color: var(--violet); } .kpi .chip.gold { background: var(--gold-l); color: var(--gold); }
.kpi .n { font-size: 1.85rem; font-weight: 750; letter-spacing: -.03em; line-height: 1.05; }
.kpi .l { color: var(--muted); font-size: .82rem; font-weight: 500; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; padding: 11px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--card) 70%, var(--bg)); white-space: nowrap; position: sticky; top: 0; }
td { padding: 11px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tbody tr:hover td { background: var(--brand-ll); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 700; background: var(--line-2); border-top: 1px solid var(--line); }
.t-title { font-weight: 600; color: var(--ink); } .t-title:hover { color: var(--brand); }
.t-sub { color: var(--muted); font-size: .8rem; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .i { width: 38px; height: 38px; color: var(--line); display: block; margin: 0 auto 10px; stroke-width: 1.4; }
.empty b { display: block; color: var(--ink-2); margin-bottom: 4px; font-size: 1rem; }

/* forms */
label { display: block; font-weight: 600; font-size: .82rem; margin-bottom: 5px; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; min-height: 40px; transition: .15s; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--brand); vertical-align: middle; margin: 0; }
input[type=file] { padding: 7px 10px; }
.field { margin-bottom: 14px; } .hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.row { display: grid; gap: 14px; } .r2 { grid-template-columns: 1fr 1fr; } .r3 { grid-template-columns: repeat(3, 1fr); } .r4 { grid-template-columns: repeat(4, 1fr); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: .9rem; color: var(--ink); cursor: pointer; margin: 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 14px 20px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--card) 60%, var(--bg)); border-radius: var(--r) var(--r) 0 0; }
.filters > div { min-width: 140px; flex: 1 1 140px; } .filters .grow { flex: 2 1 220px; } .filters label { margin-bottom: 3px; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.filters select, .filters input { min-height: 38px; padding: 7px 10px; }
.filters .fa { flex: 0 0 auto; min-width: 0; display: flex; gap: 6px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 16px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 7px; align-items: center; }
.tabs a:hover { color: var(--ink); text-decoration: none; } .tabs a.on { color: var(--brand); border-color: var(--brand); }
.tabs .n { background: var(--line-2); border-radius: 99px; padding: 0 7px; font-size: .72rem; color: var(--ink-2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { border: 1px solid var(--line); background: var(--card); padding: 5px 13px; border-radius: 99px; font-size: .82rem; font-weight: 600; color: var(--ink-2); cursor: pointer; font-family: inherit; }
.chip-btn.on { background: var(--brand); color: #fff; border-color: var(--brand); } .chip-btn:hover { border-color: var(--brand); }

.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.pager-links { display: flex; gap: 4px; }
.pg { min-width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; font-weight: 600; font-size: .85rem; color: var(--ink-2); border: 1px solid transparent; }
a.pg:hover { background: var(--line-2); text-decoration: none; } .pg.cur { background: var(--brand); color: #fff; } .pg.off { color: var(--muted); opacity: .5; }

/* definition list */
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 9px 14px; margin: 0; }
.dl dt { color: var(--muted); font-size: .84rem; } .dl dd { margin: 0; font-weight: 500; }

/* charts */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 150px) 1fr 54px; gap: 12px; align-items: center; font-size: .86rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.bar-track { height: 10px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #7ee0b0)); border-radius: 99px; }
.bar-val { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.donut { width: 168px; height: 168px; flex: none; transform: rotate(0); }
.donut-n { font-size: 6.2px; font-weight: 750; fill: var(--ink); } .donut-l { font-size: 2.6px; fill: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; min-width: 150px; }
.legend li { display: flex; align-items: center; gap: 9px; font-size: .88rem; } .legend i { width: 11px; height: 11px; border-radius: 4px; flex: none; } .legend span { flex: 1; color: var(--ink-2); } .legend b { font-variant-numeric: tabular-nums; }
.progress { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; min-width: 90px; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .3s; }
.progress.warn > i { background: var(--gold); }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; } .list .grow b { display: block; font-weight: 600; } .list .grow small { color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { display: flex; gap: 14px; padding: 8px 0; position: relative; }
.timeline .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--brand-l); color: var(--brand); display: grid; place-items: center; flex: none; z-index: 1; border: 2px solid var(--card); font-size: .7rem; }
.timeline .dot.red { background: var(--bad-l); color: var(--bad); } .timeline .dot.gold { background: var(--gold-l); color: var(--gold); } .timeline .dot.blue { background: var(--info-l); color: var(--info); } .timeline .dot.gray { background: var(--gray-l); color: var(--gray); }
.timeline b { font-weight: 600; } .timeline small { color: var(--muted); display: block; }

/* dialog */
dialog { border: 0; border-radius: 16px; padding: 0; box-shadow: var(--shadow-lg); width: min(520px, 94vw); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(8, 22, 16, .55); backdrop-filter: blur(3px); }
.dlg-h { padding: 18px 22px 0; display: flex; justify-content: space-between; align-items: center; } .dlg-b { padding: 14px 22px 22px; }
.dlg-f { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* toast-like flash */
.flash-wrap { position: fixed; top: 74px; right: 22px; z-index: 60; width: min(420px, calc(100vw - 30px)); display: grid; gap: 10px; }
.flash-wrap .alert { box-shadow: var(--shadow-lg); margin: 0; background: var(--card); animation: slideIn .3s ease; }
.flash-wrap .alert.ok { background: var(--ok-l); } .flash-wrap .alert.err { background: var(--bad-l); }
.flash-wrap .alert b { word-break: break-word; }
@keyframes slideIn { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* item entry grid */
.entry-table input, .entry-table select { min-height: 36px; padding: 6px 9px; font-size: .88rem; }
.entry-table td { padding: 6px 8px; } .entry-table th { padding: 9px 8px; }
.photo { width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.photo-ph { height: 150px; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; color: var(--muted); font-size: .85rem; background: var(--bg); }
.qr-box { background: #fff; padding: 10px; border-radius: 10px; border: 1px solid var(--line); display: inline-block; line-height: 0; }

/* verification cards */
.vl { display: grid; gap: 10px; }
.vcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: center; transition: .2s; }
.vcard.st-verified { border-left: 4px solid var(--ok); } .vcard.st-discrepancy { border-left: 4px solid var(--bad); background: color-mix(in srgb, var(--bad-l) 40%, var(--card)); } .vcard.st-pending { border-left: 4px solid var(--line); } .vcard.st-resolved { border-left: 4px solid var(--info); }
.vcard.flash { box-shadow: 0 0 0 3px var(--gold); }
.vcard h3 { font-size: .98rem; }
.vact { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.vedit { grid-column: 1 / -1; display: none; gap: 10px; grid-template-columns: 110px 1fr 2fr auto; align-items: end; padding-top: 10px; border-top: 1px dashed var(--line); }
.vcard.editing .vedit { display: grid; }
.scanbar { display: flex; gap: 8px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; position: sticky; top: 64px; z-index: 10; box-shadow: var(--shadow); }
.scanbar input { flex: 1; }
.video-box { width: 100%; max-height: 300px; border-radius: 10px; background: #000; display: none; margin-top: 10px; }

/* login */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(circle at 20% 15%, #14825a 0, transparent 45%), radial-gradient(circle at 85% 90%, #c8962b33 0, transparent 40%), linear-gradient(160deg, #0b3b2a, #072a1d); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); pointer-events: none; }
.auth-art h1 { font-size: 2.3rem; letter-spacing: -.03em; line-height: 1.1; max-width: 460px; position: relative; z-index: 1; }
.auth-art p { opacity: .8; max-width: 440px; position: relative; z-index: 1; }
.auth-feats { display: grid; gap: 12px; position: relative; z-index: 1; } .auth-feats div { display: flex; gap: 12px; align-items: center; font-size: .95rem; opacity: .92; } .auth-feats .i { color: var(--gold); }
.auth-form { display: grid; place-items: center; padding: 32px; background: var(--bg); }
.auth-box { width: min(400px, 100%); } .auth-box h2 { font-size: 1.5rem; margin-bottom: 4px; }

/* print */
.print-body { background: #fff; color: #000; font-size: 12px; }
.sheet { max-width: 1000px; margin: 0 auto; padding: 24px; }
.sheet-head { display: flex; gap: 16px; align-items: center; border-bottom: 3px double #000; padding-bottom: 12px; margin-bottom: 14px; }
.sheet-head img, .sheet-head .logo-fallback { width: 64px; height: 64px; border-radius: 8px; border: 1px solid #ccc; }
.sheet-head h1 { font-size: 1.3rem; text-transform: uppercase; letter-spacing: .02em; } .sheet-head p { margin: 2px 0 0; color: #333; }
.sheet table th { background: #eee; color: #000; position: static; border: 1px solid #999; padding: 6px 8px; font-size: 10.5px; } .sheet table td { border: 1px solid #bbb; padding: 5px 8px; } .sheet tbody tr:hover td { background: none; }
.sheet .badge { background: none !important; color: #000 !important; padding: 0; } .sheet .badge::before { display: none; }
.sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 46px; } .sign div { border-top: 1px solid #000; padding-top: 5px; font-size: 11px; }
.print-bar { background: #0b3b2a; color: #fff; padding: 10px 24px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.print-bar a { color: #fff; }
.labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px; }
.label { border: 1px dashed #888; border-radius: 6px; padding: 8px; display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: center; break-inside: avoid; page-break-inside: avoid; background: #fff; color: #000; }
.label .q { width: 74px; height: 74px; line-height: 0; } .label .q svg, .label .q img { width: 100%; height: 100%; }
.label b { display: block; font-size: 11px; font-family: ui-monospace, Menlo, monospace; } .label small { font-size: 9.5px; line-height: 1.25; display: block; color: #222; } .label .org { font-size: 8.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* responsive */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g-main, .g3 { grid-template-columns: 1fr; } .r4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 70; transform: translateX(-102%); transition: .25s; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 65; } .scrim.on { display: block; }
  .icon-btn.menu-btn { display: inline-grid; } .content { padding: 18px 14px 80px; } .top { padding: 10px 14px; }
  .search kbd { display: none; } .g2, .r2, .r3 { grid-template-columns: 1fr; } .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
  .vedit { grid-template-columns: 1fr 1fr; } .vcard { grid-template-columns: 1fr; } .vact { justify-content: flex-start; }
  .dl { grid-template-columns: 120px 1fr; } .labels { grid-template-columns: repeat(2, 1fr); }
  .scanbar { top: 58px; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: 1fr; } .kpi .n { font-size: 1.6rem; } }
@media print {
  body { background: #fff !important; } .no-print, .side, .top, .print-bar, .flash-wrap, .pager, .filters { display: none !important; }
  .shell { display: block; } .content { padding: 0; max-width: none; } .card { box-shadow: none; border: 0; } .sheet { padding: 0; max-width: none; }
  @page { margin: 12mm; } .labels { gap: 6px; padding: 0; } a { color: #000; }
}

/* ---------- new inventory entry (catalogue-based lines) ---------- */
.eline { margin-bottom: 12px; padding: 14px 16px 4px; overflow: visible; }
.eline-head { display: flex; align-items: center; gap: 10px; }
.eline-n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-l); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; }
.eline .combo { position: relative; flex: 1; min-width: 0; }
.eline .cb-input { font-size: 1rem; min-height: 42px; }
.cb-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 300px; overflow-y: auto; padding: 4px; }
.cb-list[hidden] { display: none; }
.cb-opt { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; align-items: baseline; }
.cb-opt.on, .cb-opt:hover { background: var(--brand-l); }
.cb-opt small { color: var(--muted); white-space: nowrap; font-size: .76rem; }
.cb-opt.cb-add { color: var(--brand); font-weight: 600; justify-content: flex-start; gap: 8px; }
.cb-empty { padding: 10px; color: var(--muted); font-size: .88rem; }
.eline-meta { margin: 6px 0 12px 36px; min-height: 1.3em; }
.eline-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; margin-left: 36px; }
.eline .rm { flex: none; width: 38px; height: 38px; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.eline .rm:hover { background: var(--bad-l); color: var(--bad); }
.file-btn { display: flex; align-items: center; gap: 8px; border: 1px dashed var(--line); border-radius: 9px; padding: 9px 12px; cursor: pointer; color: var(--ink-2); font-size: .88rem; margin: 0; min-height: 40px; overflow: hidden; }
.file-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-ll); }
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-btn .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-btn.has { border-style: solid; border-color: var(--brand); color: var(--brand); background: var(--brand-ll); }
.entry-bar { position: sticky; bottom: 0; z-index: 20; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin-top: 4px; background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); }
.entry-bar .actions { display: flex; gap: 8px; }
@media (max-width: 720px) { .eline-meta, .eline-fields { margin-left: 0; } .eline { padding: 12px 12px 2px; } }
