/* RED GATE Portál – the approved design (Áttekintés, Eszközök, Hiányos adat, Polcnézet, phone screens). */
:root {
  --bg: #f2f2f6;
  --panel: #ffffff;
  --panel-2: #fafafc;
  --line: #e6e6ec;
  --line-2: #dcdde3;
  --line-soft: #f0f0f4;
  --text: #16171b;
  --text-2: #3b3e46;
  --text-3: #4a4d58;
  --muted: #6b6e7b;
  --faint: #8a8d99;
  --faint-2: #b3b5bf;
  --brand: #a31e34;
  --brand-hover: #84182a;
  --brand-soft: #fbf4f5;
  --brand-ring: rgba(163, 30, 52, .14);
  --blue: #2f6fe4; --blue-bg: #e9f0fd; --blue-text: #1f4fb8;
  --green: #1f9d55; --green-bg: #e8f5ee; --green-text: #17693f;
  --amber: #d98a0b; --amber-bg: #fdf1de; --amber-text: #8a4b00;
  --gray-bg: #f0f0f4; --gray-text: #4a4d58;
  --dark: #16171b;
  --shelf-bg: #1b1c21;
  --r-sm: 7px; --r: 9px; --r-lg: 14px;
  --shadow: 0 1px 2px rgba(22, 23, 27, .05);
  --shadow-pop: 0 0 0 1px rgba(22, 23, 27, .06), 0 12px 40px -12px rgba(22, 23, 27, .28);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --tabbar-h: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.m-only, .tbl .m-only { display: none; }
.noscript { text-align: center; padding: 40px; }
svg.ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.ic.sm { width: 14px; height: 14px; }
svg.ic.lg { width: 20px; height: 20px; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { opacity: .9; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ------------------------------------------------------------------ shell */
.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 16px 12px 12px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 10px 4px; color: var(--text); }
.brand img { height: 30px; width: auto; display: block; }
.brand span { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line-2); line-height: 22px; }
.side-search { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; color: var(--muted); width: 100%; text-align: left; box-shadow: var(--shadow); }
.side-search span { flex: 1; }
.side-search .kbd { flex: none; }
.kbd { font-family: var(--mono); font-size: 10.5px; border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; color: var(--faint); background: #fafafc; }
.scan-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 38px; border: 0; border-radius: var(--r); background: var(--brand); color: #fff; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 1px 2px rgba(163,30,52,.3); }
.scan-btn:hover { background: var(--brand-hover); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--muted); padding: 6px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-size: 14px; transition: background .15s ease; }
.nav-link:hover { background: rgba(22,23,27,.045); color: var(--text); }
.nav-link.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px rgba(22,23,27,.06), 0 1px 3px rgba(22,23,27,.05); }
.nav-link.active svg { color: var(--brand); }
.nav-link .count { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--muted); font-weight: 400; }
.nav-link.soon { color: var(--faint); }
.nav-link.soon:hover { color: var(--text-3); }
.nav-link.soon .count { font-family: var(--sans); font-size: 10.5px; letter-spacing: .02em; }
.side-foot { margin-top: auto; }
.me-card { color: var(--text); display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; box-shadow: var(--shadow); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--dark); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; letter-spacing: .02em; }
.me-card b { display: block; font-size: 13px; }
.me-card small { display: block; font-size: 12px; color: var(--muted); }
.me-card svg { margin-left: auto; color: var(--muted); }

.main { padding: 8px 8px 8px 0; min-width: 0; }
.page { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); min-height: calc(100vh - 16px); display: flex; flex-direction: column; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 20px 28px 18px; border-bottom: 1px solid var(--line-soft); min-height: 76px; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-left: 2px; }
.page-head .crumbs { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 2px; }
.page-head .crumbs a { color: var(--muted); }
.page-head .crumbs a:hover { color: var(--text); }
.head-title { flex: 1 1 320px; min-width: 0; }
.head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.page-body { padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.back-btn { display: none; }

.tabbar { display: none; }

/* ------------------------------------------------------------------ buttons, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: #fff; color: var(--text); font-weight: 600; font-size: 14px; white-space: nowrap; box-shadow: var(--shadow); transition: filter .15s ease, transform .12s ease, background .15s ease; text-decoration: none; }
.btn:hover { background: #fafafc; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; pointer-events: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 1px 2px rgba(163,30,52,.3); }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-dark { background: var(--dark); border-color: var(--dark); color: #fff; }
.btn-dark:hover { background: #2a2b31; color: #fff; }
.btn-quiet { border-color: transparent; box-shadow: none; background: transparent; color: var(--text-3); }
.btn-quiet:hover { background: rgba(22,23,27,.05); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 18px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { color: var(--brand-hover); }

.input, .select, textarea.input { height: 38px; width: 100%; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; font-size: 14px; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.input::placeholder { color: var(--faint); }
.input.mono { font-family: var(--mono); font-size: 13.5px; }
.select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6e7b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.select-sm { height: 32px; font-size: 13px; padding-left: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.field small { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.search-input { position: relative; }
.search-input svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input .input { padding-left: 36px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { padding-right: 44px; }
.input-wrap .in-btn { position: absolute; right: 4px; height: 30px; }
.err-text { color: var(--brand); font-size: 13px; }

/* ------------------------------------------------------------------ pills, chips, dots */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--gray-bg); color: var(--gray-text); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.in_stock { background: var(--green-bg); color: var(--green-text); }
.pill.in_stock::before { background: var(--green); }
.pill.checked_out { background: var(--blue-bg); color: var(--blue-text); }
.pill.checked_out::before { background: var(--blue); }
.pill.in_service { background: var(--amber-bg); color: var(--amber-text); }
.pill.in_service::before { background: var(--amber); }
.pill.unknown { background: var(--gray-bg); color: var(--gray-text); }
.pill.retired { background: #f3eef0; color: #7c3a48; }
.pill.plain::before { display: none; }
.flag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; background: var(--amber-bg); color: var(--amber-text); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.flag svg { width: 13px; height: 13px; }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 7px; background: var(--gray-bg); color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cat { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); white-space: nowrap; }
.cat i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.cat .code { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.issue-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); margin-left: 6px; vertical-align: middle; }
.num { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: -.01em; }
.count-badge { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* ------------------------------------------------------------------ cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.card-head h2 { font-size: 16px; font-weight: 700; }
.card-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.card-head .right { margin-left: auto; font-size: 13px; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.banner .b-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--amber-bg); color: var(--amber-text); flex: none; }
.banner h3 { font-size: 15px; font-weight: 700; }
.banner p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.banner .actions { margin-left: auto; }
.note-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: #fdf6ea; border: 1px solid #f1dfbd; color: var(--amber-text); font-size: 13px; }
.note-box.info { background: #f4f6fb; border-color: #e1e6f2; color: var(--text-3); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 16px; margin-bottom: 6px; }

/* ------------------------------------------------------------------ KPI + dashboard */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); }
.kpi { padding: 16px 22px 18px; color: inherit; position: relative; }
.kpi + .kpi::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 1px; background: var(--line); }
.kpi:hover { background: #fcfcfd; color: inherit; }
.kpi small { font-size: 13px; color: var(--muted); }
.kpi strong { display: block; font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin: 2px 0 2px; font-variant-numeric: tabular-nums; }
.kpi strong.amber { color: var(--amber-text); }
.kpi p { margin: 0; font-size: 13px; color: var(--muted); }
.dash-row { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; }
.dash-row-3 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .95fr); gap: 16px; }
.catbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; margin: 4px 0 16px; }
.catbar i { display: block; height: 100%; }
.cat-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.cat-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px 44px; align-items: center; gap: 8px; height: 30px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; color: inherit; }
.cat-row:hover { color: var(--brand); }
.cat-row b { text-align: right; font-variant-numeric: tabular-nums; }
.cat-row span.pct { text-align: right; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.att-list { display: flex; flex-direction: column; }
.att { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; color: inherit; border-bottom: 1px solid var(--line-soft); }
.att:last-child { border-bottom: 0; }
.att .a-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--gray-bg); color: var(--text-3); }
.att .a-ic.amber { background: var(--amber-bg); color: var(--amber-text); }
.att b { display: block; font-size: 14px; }
.att small { display: block; color: var(--muted); font-size: 12.5px; }
.att .go { color: var(--brand); font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.att:hover b { color: var(--brand); }
.wh-progress { height: 4px; border-radius: 2px; background: var(--line); margin: 8px 0 16px; overflow: hidden; }
.wh-progress i { display: block; height: 100%; background: var(--brand); }
.wh-label { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }
.wh-label span:last-child { text-transform: none; letter-spacing: 0; font-weight: 400; }
.mini-shelves { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 8px; margin-bottom: 16px; }
.mini-shelf { border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 10px; color: inherit; background: #fff; }
.mini-shelf:hover { border-color: var(--line-2); box-shadow: 0 6px 18px -10px rgba(22,23,27,.3); color: inherit; }
.mini-shelf header { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; }
.mini-shelf header b { font-weight: 700; }
.mini-shelf header span { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.mini-rack { border-left: 2px solid #c9cbd2; border-right: 2px solid #c9cbd2; padding: 2px 3px; display: flex; flex-direction: column-reverse; gap: 3px; }
.mini-rack div { display: flex; gap: 2px; }
.mini-rack i { flex: 1; height: 5px; border-radius: 1.5px; background: #e3e4ea; }
.mini-rack i.on { background: #3b3e46; }
.proj { display: grid; grid-template-columns: minmax(0, 1fr) 46% 26px; align-items: center; gap: 12px; padding: 7px 0; color: inherit; font-size: 14px; }
.proj:hover { color: var(--brand); }
.proj .bar { height: 7px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.proj .bar i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.proj b { text-align: right; font-variant-numeric: tabular-nums; }
.feed { display: flex; flex-direction: column; }
.feed-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); color: inherit; }
.feed-row:last-child { border-bottom: 0; }
.feed-row .f-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-bg); color: var(--text-3); }
.feed-row b { font-size: 13.5px; display: block; }
.feed-row small { color: var(--muted); font-size: 12.5px; display: block; }
.feed-row time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.live { color: var(--green); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* ------------------------------------------------------------------ tabs, toolbars, tables */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-top: -6px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 10px; color: var(--text-3); font-size: 14.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); font-weight: 700; border-color: var(--text); }
.tab .count-badge { font-size: 11.5px; }
.tab .amber-count { background: var(--amber-bg); color: var(--amber-text); font-family: var(--mono); font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; }
.tab .dot-amber { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar .search-input { flex: 0 1 300px; min-width: 200px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; padding: 3px; background: var(--gray-bg); border-radius: 10px; gap: 2px; }
.seg button, .seg a { border: 0; background: none; height: 30px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 7px; }
.seg .on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(22,23,27,.1); }

.table-card { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 0 12px; height: 40px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fff; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 14px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 18px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 18px; }
.tbl tbody tr.click { cursor: pointer; transition: background .12s ease; }
.tbl-fixed { table-layout: fixed; }
.tbl-fixed td, .tbl-fixed th { overflow: hidden; text-overflow: ellipsis; }
.tbl-fixed .flag { white-space: normal; }
.tbl-fixed .fix-cell { min-width: 0; flex-wrap: wrap; }
.tbl-fixed .fix-cell .input { min-width: 130px; }
.tbl tbody tr.click:hover { background: #f8f8fb; }
.tbl .t-title { font-weight: 700; color: var(--text); display: block; max-width: 300px; }
.tbl .t-sub { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 1px; }
.tbl .t-warn { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--amber-text); font-weight: 600; margin-top: 1px; }
.tbl .loc { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); white-space: nowrap; }
.tbl .loc svg { color: var(--muted); }
.tbl .loc.warn { color: var(--amber-text); background: var(--amber-bg); padding: 2px 8px; border-radius: 6px; font-weight: 600; font-size: 13px; }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 6px; }
.skeleton { background: linear-gradient(90deg, #f1f1f5 25%, #e8e8ee 37%, #f1f1f5 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px; height: 14px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* filter dropdown (popover) */
.fbtn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; font-size: 13.5px; font-weight: 500; color: var(--text-2); box-shadow: var(--shadow); }
.fbtn.on { border-color: var(--text); color: var(--text); font-weight: 600; }
.fbtn .x { margin-left: 2px; color: var(--muted); }
.popover { position: fixed; z-index: 60; min-width: 220px; max-width: 320px; max-height: 60vh; overflow-y: auto; background: #fff; border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; }
.popover button { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text-2); }
.popover button:hover { background: var(--gray-bg); color: var(--text); }
.popover button.on { font-weight: 700; color: var(--text); }
.popover button .r { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.popover hr { border: 0; border-top: 1px solid var(--line-soft); margin: 4px 0; }

/* ------------------------------------------------------------------ missing data */
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fchip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.fchip .count-badge { font-size: 11px; }
.fchip.on { background: var(--dark); border-color: var(--dark); color: #fff; font-weight: 700; }
.fchip.on .count-badge { color: rgba(255,255,255,.7); }
.chips-row .lbl { font-size: 13.5px; font-weight: 700; color: var(--muted); padding: 0 4px 0 6px; }
.chips-row .sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.fix-cell { display: flex; gap: 8px; align-items: center; min-width: 240px; }
.fix-cell .input { height: 34px; font-family: var(--mono); font-size: 13px; width: auto; flex: 1 1 140px; min-width: 0; }
.fix-cell .btn { flex: none; }
.fix-cell .select { height: 34px; font-size: 13px; max-width: 260px; }
.fix-cell .hint { font-size: 12.5px; color: var(--muted); flex: 1; min-width: 0; }
.was { font-family: var(--mono); font-size: 12.5px; color: var(--amber-text); }
.was s { text-decoration-color: var(--amber); }
.issues-col { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
tr.done td { background: #f6fbf8; }
.done-note { color: var(--green-text); font-weight: 600; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }

/* ------------------------------------------------------------------ item page */
.item-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.item-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.item-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.item-hero { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 20px; }
.photo { border-radius: 12px; background: #f1f1f5; border: 1px solid var(--line); aspect-ratio: 1; display: grid; place-items: center; color: var(--muted); font-size: 12.5px; text-align: center; padding: 12px; }
.photo .ph-ic { width: 76px; height: 76px; border-radius: 16px; display: grid; place-items: center; color: #fff; margin: 0 auto 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 20px -10px rgba(0,0,0,.4); }
.photo .ph-ic svg { width: 34px; height: 34px; stroke-width: 1.5; }
.hero-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; color: var(--text-3); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.fact small { display: block; color: var(--muted); font-size: 12.5px; }
.fact > span { display: block; font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.fact .empty-val { color: var(--faint-2); }
.fact .cat { white-space: normal; }
.issue-box { margin-top: 16px; border: 1px solid #f1dfbd; background: #fdf8ef; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.issue-box header { display: flex; align-items: center; gap: 8px; color: var(--amber-text); font-weight: 700; font-size: 13.5px; }
.issue-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.issue-line .d { color: var(--text-3); flex: 1; min-width: 160px; }
.where-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 10px; }
.where-row .w-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--gray-bg); color: var(--text-3); }
.where-row .w-ic.blue { background: var(--blue-bg); color: var(--blue-text); }
.where-row small { display: block; color: var(--muted); font-size: 12px; }
.where-row b { display: block; font-size: 14px; }
.mini-map { background: #f6f6f9; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 6px 0 12px; }
.mini-map .rack { border-left: 3px solid #b9bcc6; border-right: 3px solid #b9bcc6; padding: 4px; display: flex; flex-direction: column-reverse; gap: 5px; }
.mini-map .row { display: flex; gap: 4px; }
.mini-map .row i { flex: 1; height: 13px; border-radius: 3px; background: #dfe0e6; }
.mini-map .row i.on { background: #3b3e46; }
.mini-map .row i.me { background: var(--brand); box-shadow: 0 0 0 2px rgba(163,30,52,.25); }
.timeline { display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; padding-bottom: 18px; position: relative; }
.tl::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .t-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-bg); color: var(--text-3); }
.tl b { font-size: 14.5px; }
.tl .when { color: var(--muted); font-size: 12.5px; margin-left: 8px; }
.tl p { margin: 3px 0 0; color: var(--text-3); font-size: 13.5px; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.sublist { display: flex; flex-direction: column; }
.sub-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft); color: inherit; }
.sub-row:last-child { border-bottom: 0; }
.sub-row:hover .ellipsis { color: var(--brand); }

/* ------------------------------------------------------------------ shelf view */
.shelf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 18px; align-items: start; }
.rack-card { background: var(--shelf-bg); border-radius: 18px; padding: 22px 24px 18px; color: #fff; position: relative; min-width: 0; box-shadow: 0 20px 50px -30px rgba(0,0,0,.6); }
.rack-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.rack-head .tag { display: inline-flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; color: rgba(255,255,255,.55); }
.rack-head .tag b { background: var(--brand); color: #fff; padding: 2px 7px; border-radius: 5px; letter-spacing: 0; font-size: 12px; }
.rack-head h2 { font-size: 22px; font-weight: 700; margin-top: 8px; }
.rack-head p { margin: 2px 0 0; color: rgba(255,255,255,.55); font-size: 13.5px; }
.shelf-switch { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.shelf-switch a { min-width: 40px; height: 30px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.75); font-weight: 700; font-size: 12.5px; }
.shelf-switch a:hover { background: rgba(255,255,255,.12); color: #fff; }
.shelf-switch a.on { background: #fff; color: var(--dark); border-color: #fff; }
.shelf-switch a small { font-weight: 500; margin-left: 6px; opacity: .65; font-family: var(--mono); font-size: 10.5px; }
.rack { margin: 26px 8px 4px 26px; position: relative; }
.rack-level { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: end; }
.rack-level .lvl { color: rgba(255,255,255,.4); font-size: 11px; font-family: var(--mono); padding-bottom: 14px; text-align: right; }
.rack-row { display: flex; gap: 8px; padding: 0 12px; border-left: 8px solid #6e7280; border-right: 8px solid #6e7280; position: relative; }
.rack-row::after { content: ""; position: absolute; left: -8px; right: -8px; bottom: -8px; height: 8px; background: linear-gradient(#a3a6b0, #6e7280); border-radius: 2px; }
.rack-level + .rack-level { margin-top: 20px; }
.rack-col { display: flex; flex-direction: column-reverse; gap: 4px; min-width: 0; padding-top: 6px; }
.crate { position: relative; height: 70px; border-radius: 6px; background: linear-gradient(#2c2e35, #23252b); border: 1px solid rgba(255,255,255,.08); color: #fff; padding: 10px 9px 8px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; text-align: left; cursor: pointer; overflow: hidden; min-width: 0; transition: transform .15s ease, box-shadow .15s ease; }
.crate::before { content: ""; position: absolute; top: 6px; left: 50%; width: 26px; height: 4px; margin-left: -13px; border-radius: 2px; background: rgba(0,0,0,.55); }
.crate:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(0,0,0,.8); }
.crate .c-num { display: inline-flex; align-self: flex-start; align-items: center; gap: 5px; background: #fff; color: var(--dark); font-family: var(--mono); font-weight: 700; font-size: 10.5px; padding: 1px 5px; border-radius: 4px; }
.crate .c-num i { width: 6px; height: 6px; border-radius: 50%; }
.crate .c-title { font-weight: 700; font-size: 12.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.crate .c-fill { position: absolute; left: 9px; right: 9px; bottom: 4px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.crate .c-fill i { display: block; height: 100%; }
.crate.sel { outline: 2px solid var(--brand); outline-offset: 1px; box-shadow: 0 0 0 5px rgba(163,30,52,.35); }
.crate.flagged .c-num::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.crate.empty { background: transparent; border: 1px dashed rgba(255,255,255,.16); color: rgba(255,255,255,.35); }
.crate.empty::before { display: none; }
.crate.empty .c-title { font-weight: 600; }
.crate.empty .c-num { background: rgba(255,255,255,.08); color: rgba(255,255,255,.5); }
.crate.empty:hover { border-color: rgba(255,255,255,.45); color: rgba(255,255,255,.8); }
.crate.empty.locked { cursor: default; }
.crate.empty.locked:hover { transform: none; box-shadow: none; border-color: rgba(255,255,255,.16); color: rgba(255,255,255,.35); }
.crate.hl { box-shadow: 0 0 0 2px #fff, 0 0 18px rgba(255,255,255,.4); }
.rack-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; font-size: 12.5px; color: rgba(255,255,255,.6); }
.rack-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rack-legend i { width: 7px; height: 7px; border-radius: 2px; }
.rack-note { margin-top: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: rgba(255,255,255,.75); display: flex; gap: 10px; align-items: center; }
.side-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.side-panel section { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.side-panel section:last-child { border-bottom: 0; }
.big-num { font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.progress { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--dark); }
.progress.red i { background: var(--brand); }
.crate-pick { display: flex; flex-direction: column; gap: 6px; }
.crate-pick button { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 12px; text-align: left; }
.crate-pick button:hover { border-color: var(--text); }

/* ------------------------------------------------------------------ search, account, auth */
.results { display: flex; flex-direction: column; gap: 18px; }
.res-group h3 { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.res-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: inherit; }
.res-row:hover { background: var(--gray-bg); color: inherit; }
.res-row small { display: block; color: var(--muted); font-size: 12.5px; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px 26px; box-shadow: 0 30px 80px -40px rgba(22,23,27,.35); }
.auth-card .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-card .logo img { height: 34px; }
.auth-card .logo span { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line-2); line-height: 24px; }
.auth-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.auth-card .lead { margin: 6px 0 20px; color: var(--muted); font-size: 14px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card .alt { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12.5px; margin: 6px 0; }
.auth-card .alt::before, .auth-card .alt::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-foot { margin-top: 16px; text-align: center; font-size: 13.5px; }
.code-input { font-family: var(--mono); font-size: 26px; letter-spacing: .4em; text-align: center; height: 56px; padding-left: .4em; }
.form-error { background: var(--brand-soft); color: var(--brand); border: 1px solid #f0d4da; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.form-ok { background: var(--green-bg); color: var(--green-text); border: 1px solid #cbe8d7; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.qr-box { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 20px; align-items: center; }
.qr-box .qr { width: 168px; height: 168px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: #fff; }
.qr-box .qr svg { width: 100%; height: 100%; display: block; }
.secret { font-family: var(--mono); font-size: 14px; background: var(--gray-bg); border-radius: 8px; padding: 8px 10px; word-break: break-all; letter-spacing: .06em; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-family: var(--mono); font-size: 15px; background: var(--gray-bg); border-radius: 12px; padding: 14px 18px; }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 14px; }
.step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; }
.step::before { counter-increment: s; content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--dark); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.settings { max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.set-row:last-child { border-bottom: 0; }
.set-row .s-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--gray-bg); color: var(--text-3); flex: none; }
.set-row b { display: block; font-size: 14.5px; }
.set-row small { display: block; color: var(--muted); font-size: 13px; }
.set-row > div:not(.r) { flex: 1; min-width: 0; }
.set-row .r { margin-left: auto; display: flex; gap: 8px; align-items: center; flex: none; }
.ok-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--green-text); background: var(--green-bg); font-weight: 600; font-size: 12.5px; padding: 3px 8px; border-radius: 6px; }
.soon-card { max-width: 560px; }
.role-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; background: #fff; }
.role-opt:hover { border-color: var(--faint-2); }
.role-opt:has(input:checked) { border-color: var(--text); background: #fafafc; box-shadow: 0 0 0 1px var(--text); }
.role-opt input { margin-top: 3px; accent-color: var(--brand); }
.role-opt b { display: block; font-size: 14px; }
.role-opt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.soon-card ul { margin: 10px 0 0; padding-left: 18px; color: var(--text-3); }
.soon-card li { margin: 4px 0; }

/* ------------------------------------------------------------------ kiadás: selection bar, scanner */
.select-bar { position: fixed; z-index: 45; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: var(--dark); color: #fff; padding: 8px 8px 8px 16px; border-radius: 14px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); font-weight: 600; }
.out-row { cursor: default; }
.out-row input { accent-color: var(--brand); width: 16px; height: 16px; }
.scan-page { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 440px; background: #0e0f12; }
.scan-cam { position: relative; overflow: hidden; background: radial-gradient(circle at 50% 40%, #2a2c33, #0e0f12 70%); }
.scan-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-top { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 16px; right: 16px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; justify-items: center; gap: 10px; z-index: 3; }
.scan-top > .cam-btn:first-child { justify-self: start; }
.cam-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cam-btn:hover { color: #fff; background: rgba(255,255,255,.22); }
.cam-btn svg { width: 20px; height: 20px; }
.cam-seg { display: flex; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cam-seg button { border: 0; background: none; color: #fff; font-weight: 700; font-size: 15px; height: 36px; padding: 0 16px; border-radius: 999px; }
.cam-seg button.on { background: #fff; color: var(--dark); }
.scan-frame { position: absolute; left: 50%; top: 50%; width: min(62vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 2; pointer-events: none; }
.scan-frame i { position: absolute; width: 42px; height: 42px; border: 4px solid #fff; }
.scan-frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.scan-frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.scan-frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.scan-frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.scan-chip { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 999px; font-weight: 700; color: #fff; max-width: calc(100% - 32px); box-shadow: 0 10px 30px -10px rgba(0,0,0,.6); }
.scan-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-chip.ok { background: #1f9d55; }
.scan-chip.bad { background: var(--brand); }
.cam-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; width: min(86%, 380px); background: rgba(20,21,26,.92); color: #fff; padding: 16px 18px; border-radius: 14px; font-size: 14px; text-align: center; }
.cam-msg p { margin: 0 0 10px; }
.scan-sheet { background: #fff; overflow-y: auto; padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.scan-sheet .grab { display: none; }
.sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sheet-head h2 { font-size: 22px; font-weight: 800; }
.manual { display: flex; gap: 8px; margin-bottom: 12px; }
.scan-list { display: flex; flex-direction: column; margin-bottom: 14px; }
.scan-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.scan-row .s-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--green-bg); color: var(--green-text); }
.scan-row.bad .s-ic { background: var(--brand-soft); color: var(--brand); }
.scan-row.bad b { color: var(--muted); text-decoration: line-through; }
.dmg { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-3); }
.dmg input { accent-color: var(--brand); }
.scan-sheet .form-grid { margin-bottom: 12px; }
.scan-sheet #submit { margin-top: auto; position: sticky; bottom: 0; box-shadow: 0 -10px 20px 6px #fff, inset 0 1px 0 rgba(255,255,255,.16), 0 1px 2px rgba(163,30,52,.3); }

/* ------------------------------------------------------------------ leltározás */
.st-idle { max-width: 900px; display: grid; gap: 16px; }
.st-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--gray-bg); color: var(--text-3); flex: none; }
.steps .step p { margin: 2px 0 0; font-size: 13px; }
.st-top { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.st-bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.st-prog { display: flex; gap: 28px; align-items: flex-start; }
.st-ring { width: 148px; height: 148px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.st-ring > div { width: 118px; height: 118px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.st-ring strong { font-size: 32px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.st-ring small { font-size: 12px; color: var(--muted); }
.st-shelves { flex: 1 1 auto; min-width: 0; }
.st-shelves .wh-label { margin: 12px 0 2px; }
.st-shelves .wh-label:first-child { margin-top: 0; }
.st-srow { display: grid; grid-template-columns: 40px minmax(0, 1fr) 140px 64px; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; color: var(--text-2); }
.st-srow .num { font-weight: 700; color: var(--text); }
.st-srow.none { color: var(--faint); }
.st-cta { display: none; align-items: center; justify-content: center; gap: 8px; }
.st-bar { height: 8px; border-radius: 4px; background: #efeff3; overflow: hidden; }
.st-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.st-frac { font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.feed-row .f-ic.good { background: var(--green-bg); color: var(--green-text); }
.feed-row .f-ic.warn { background: var(--amber-bg); color: var(--amber-text); }
.st-row { grid-template-columns: 76px minmax(0, 1fr) auto; }
.st-row.open { box-shadow: inset 3px 0 0 var(--amber); padding-left: 10px; margin-left: -10px; }
.st-was { display: block; overflow-wrap: anywhere; }
.st-acts { display: flex; gap: 6px; align-items: center; }
.st-foot { margin: 10px 0 0; display: flex; gap: 6px; align-items: center; font-size: 13px; }
.st-hrow { grid-template-columns: 130px minmax(0, 1fr) auto; }
.st-hdate { font-size: 13px; color: var(--muted); }
/* phone scanning */
.st-crate { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; margin-bottom: 12px; }
.st-crate h2 { font-size: 19px; font-weight: 750; letter-spacing: -.01em; margin-top: 1px; }
.st-crate small { font-size: 12.5px; }
.st-count { font-family: var(--mono); font-weight: 700; font-size: 15px; min-width: 52px; height: 40px; padding: 0 10px; border-radius: 20px; background: var(--gray-bg); display: grid; place-items: center; }
.st-note { margin-bottom: 12px; align-items: center; }
.st-note .btn { margin-left: auto; flex: none; }
.st-focus { border-radius: 14px; padding: 14px; margin-bottom: 12px; background: #fff; box-shadow: inset 0 0 0 1.5px rgba(217, 138, 11, .45); display: flex; flex-direction: column; gap: 10px; }
.st-focus-head { display: flex; gap: 12px; align-items: flex-start; }
.st-focus-head b { font-size: 15.5px; }
.st-focus small { font-size: 12.5px; }
.st-focus .link-btn { align-self: flex-start; }
.st-amber { width: 32px; height: 32px; border-radius: 9px; background: var(--amber-bg); color: var(--amber-text); display: grid; place-items: center; flex: none; }
.st-flags { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.st-flag { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #fdf6ea; border: 1px solid #f1dfbd; margin-bottom: 12px; }
.st-flags .st-flag { margin-bottom: 0; }
.st-flag small { font-size: 12.5px; }
.st-item { grid-template-columns: 28px minmax(0, 1fr) auto; }
.st-item.todo .s-ic { background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.st-item.todo b { color: var(--text-3); font-weight: 600; }
.st-item.warn .s-ic { background: var(--amber-bg); color: var(--amber-text); }
.st-sn { border: 0; height: 26px; padding: 0 8px; border-radius: 7px; background: var(--amber-bg); color: var(--amber-text); font: 700 11.5px var(--mono); }
.st-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 10px; }
.st-done { margin-top: auto; position: sticky; bottom: 0; box-shadow: 0 -10px 20px 6px #fff, 0 30px 0 10px #fff, inset 0 1px 0 rgba(255,255,255,.16), 0 1px 2px rgba(163,30,52,.3); flex: none; }
.st-tick { border: 0; padding: 0; cursor: pointer; }
.st-hint { font-size: 12.5px; margin: -6px 0 14px; }
.st-pp { margin-top: 2px; }

/* ------------------------------------------------------------------ modal, toast */
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(22,23,27,.35); display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(22,23,27,.45); animation: pop .18s ease; }
.modal.wide { max-width: 680px; }
.modal header { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; }
.modal header h2 { font-size: 18px; font-weight: 700; }
.modal header .x { margin-left: auto; }
.modal .m-body { padding: 10px 20px 4px; display: flex; flex-direction: column; gap: 14px; }
.modal footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 16px 20px 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.toasts { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--dark); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); display: flex; gap: 8px; align-items: center; animation: pop .2s ease; max-width: min(92vw, 520px); }
.toast.err { background: var(--brand); }
.toast svg { flex: none; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
  .dash-row-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dash-row-3 > :last-child { grid-column: 1 / -1; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis .kpi:nth-child(4)::before { display: none; }
  .dash-row { grid-template-columns: minmax(0, 1fr); }
  .item-layout, .shelf-layout { grid-template-columns: minmax(0, 1fr); }
  .tbl .col-proj { display: none; }
}
@media (max-width: 820px) {
  body { background: #f2f2f6; }
  .app { display: block; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .main { padding: 0; }
  .page { border: 0; border-radius: 0; min-height: 100vh; background: var(--bg); }
  .page-head { position: sticky; top: 0; z-index: 20; background: rgba(242,242,246,.88); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); padding: calc(10px + env(safe-area-inset-top)) 16px 10px; min-height: 0; border-bottom: 1px solid rgba(22,23,27,.06); flex-wrap: wrap; gap: 8px 10px; }
  .page-head h1 { font-size: 20px; }
  .head-title { flex: 1 1 0; }
  .page-head .sub { display: none; }
  .page-head h1.ellipsis { white-space: normal; overflow: visible; }
  .head-actions .hide-m { display: none; }
  .back-btn { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); align-items: center; justify-content: center; color: var(--text); flex: none; }
  .page-body { padding: 14px 16px 28px; gap: 14px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 14px 16px; }
  .kpi strong { font-size: 28px; }
  .kpis .kpi::before { display: none; }
  .kpis .kpi { border-bottom: 1px solid var(--line-soft); }
  .kpis .kpi:nth-child(odd) { border-right: 1px solid var(--line-soft); }
  .kpis .kpi:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .dash-row-3 { grid-template-columns: minmax(0, 1fr); }
  .cat-table { grid-template-columns: minmax(0, 1fr); }
  .card-pad { padding: 16px; }
  .toolbar .search-input { flex: 1 1 100%; }
  .tabs { margin: -4px -16px 0; padding: 0 12px; }
  /* tables turn into stacked rows */
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { padding: 0 !important; border: 0; }
  .tbl td.m-hide { display: none; }
  .tbl td.m-full { grid-column: 1 / -1; }
  .tbl td.m-right { justify-self: end; align-self: start; }
  .m-only, .tbl .m-only { display: inline; }
  .tbl .m-only.loc { display: inline-flex; }
  .d-only { display: none !important; }
  .tbl .t-title { max-width: none; }
  .fix-cell { min-width: 0; margin-top: 6px; }
  .item-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
  .photo { aspect-ratio: auto; height: 120px; }
  .photo .ph-ic { width: 54px; height: 54px; margin-bottom: 6px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rack-card { padding: 16px 12px 14px; border-radius: 16px; }
  .rack { margin: 20px 0 4px 0; }
  .rack-row { padding: 0 6px; gap: 5px; border-width: 0 6px; }
  .rack-level { grid-template-columns: 12px minmax(0, 1fr); gap: 5px; }
  .crate { height: 58px; padding: 8px 6px 7px; }
  .crate .c-title { font-size: 11px; }
  .crate .c-num { font-size: 9.5px; }
  .shelf-switch { margin-left: 0; justify-content: flex-start; width: 100%; }
  .qr-box { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .input, .select, textarea.input, .input.mono, .fix-cell .input, .fix-cell .select { font-size: 16px; }
  .code-input { font-size: 24px; }
  .set-row { flex-wrap: wrap; }
  .set-row .r { margin-left: 52px; flex-basis: calc(100% - 52px); }
  .crate.empty .c-title { display: none; }
  .crate.empty { justify-content: center; align-items: center; }
  .profile-row { flex-wrap: wrap; }
  .scan-page { grid-template-columns: minmax(0, 1fr); grid-template-rows: 46vh minmax(0, 1fr); }
  .scan-sheet { border-radius: 22px 22px 0 0; margin-top: -22px; position: relative; z-index: 5; padding-top: 10px; }
  .scan-sheet .grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: #d6d7dd; margin: 0 auto 10px; }
  .scan-frame { top: 46%; width: min(56vw, 240px); }
  .st-top, .st-bottom { grid-template-columns: minmax(0, 1fr); }
  .st-cta { display: flex; }
  .st-prog { flex-direction: column; align-items: center; gap: 18px; }
  .st-shelves { width: 100%; }
  .st-srow { grid-template-columns: 34px minmax(0, 1fr) 72px 52px; gap: 10px; }
  .st-row { grid-template-columns: 70px minmax(0, 1fr); }
  .st-row .st-acts, .st-row > .btn, .st-row > .pill { grid-column: 2; justify-self: start; }
  .st-hrow { grid-template-columns: minmax(0, 1fr) auto; }
  .st-hdate { grid-column: 1 / -1; }
  .st-flag > .btn { grid-column: 2 / -1; justify-self: start; }
  .st-flag { grid-template-columns: 32px minmax(0, 1fr); }
  .scan-chip { bottom: 40px; }
  .select-bar { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); }
  .modal-back { align-items: end; padding: 0; }
  .modal footer .btn { flex: 1 1 auto; margin-right: 0 !important; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
  .toasts { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 6px 6px env(safe-area-inset-bottom); background: rgba(255,255,255,.92); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-top: 1px solid rgba(22,23,27,.08); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 600; border: 0; background: none; }
  .tabbar a.active { color: var(--brand); }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar .scan { color: #fff; }
  .tabbar .scan span.ring { width: 48px; height: 48px; border-radius: 16px; background: var(--brand); display: grid; place-items: center; box-shadow: 0 8px 20px -8px rgba(163,30,52,.7); margin-top: -18px; }
  .tabbar .scan small { color: var(--muted); font-size: 10.5px; }
}
@media (max-width: 420px) {
  .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .head-actions .btn span.lbl { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
