/* ── Reset & Variables ─────────────────────────────────────────────────── */
:root {
  --bg:        #0e0f12;
  --bg2:       #161820;
  --bg3:       #1e2029;
  --border:    #2a2c38;
  --text:      #e8eaf0;
  --muted:     #7a8494;
  --accent:    #5da7fd;
  --accent2:   #3ec97e;
  --danger:    #e05252;
  --warn:      #e09c38;
  --purple:    #ab6ef7;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 8px 32px rgba(0,0,0,.55);
  --nav-h:     62px;
  --header-h:  50px;
  --stats-h:   56px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(93,167,253,.12); }

/* ── Auth Gate ──────────────────────────────────────────────────────────── */
.inv-gate {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  z-index: 100;
  padding: 20px;
}
.inv-gate-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  width: 100%; max-width: 360px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow);
}
.inv-gate-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.inv-gate-card h2 { font-size: 1.5rem; font-weight: 700; }
.inv-gate-card button#gate-btn {
  background: var(--accent);
  color: #fff; font-weight: 700;
  padding: 14px; border-radius: var(--radius-sm);
  font-size: 1rem; margin-top: 4px;
  transition: opacity .15s, transform .1s;
}
.inv-gate-card button#gate-btn:active { transform: scale(.98); }
.inv-gate-card button#gate-btn:disabled { opacity: .5; }
.inv-gate-hint { font-size: 0.8rem; color: var(--muted); text-align: center; }
.inv-subtle-link { color: var(--accent); text-decoration: none; }
.inv-error { color: var(--danger); font-size: 0.85rem; }

/* ── Logo ───────────────────────────────────────────────────────────────── */
.inv-logo-mark {
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 8px;
  position: relative; flex-shrink: 0;
}
.inv-logo-mark::after {
  content: ''; position: absolute; inset: 6px;
  background: var(--bg2); border-radius: 3px;
}
.inv-logo-mark.small { width: 22px; height: 22px; border-radius: 6px; }
.inv-logo-mark.small::after { inset: 4px; }
.inv-wordmark { font-size: 0.82rem; font-weight: 600; color: var(--muted); }

/* ── App Shell ──────────────────────────────────────────────────────────── */
#inv-app {
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  overflow: hidden;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.inv-header {
  flex-shrink: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.inv-header-left  { display: flex; align-items: center; gap: 8px; }
.inv-header-title { font-size: 1rem; font-weight: 700; }
.inv-header-right { display: flex; align-items: center; gap: 8px; }

.inv-icon-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg3); color: var(--muted);
  transition: background .15s, color .15s;
}
.inv-icon-btn:active { background: var(--border); }

.inv-user-chip {
  font-size: 0.72rem; font-weight: 600;
  background: var(--bg3); color: var(--muted);
  padding: 4px 10px; border-radius: 100px;
  white-space: nowrap;
}
.inv-admin-chip { background: rgba(93,167,253,.15); color: var(--accent); }

/* ── Stats Strip ────────────────────────────────────────────────────────── */
.inv-stats-strip {
  flex-shrink: 0;
  display: flex; align-items: stretch;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  height: var(--stats-h);
}
.inv-stat {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4px 6px; gap: 1px;
  border-right: 1px solid var(--border);
}
.inv-stat:last-child { border-right: none; }
.inv-stat-num { font-size: 1.3rem; font-weight: 800; color: var(--text); line-height: 1; }
.inv-stat-lbl { font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.inv-stat-warn .inv-stat-num { color: var(--warn); }

/* ── Tab Panels (scroll area) ───────────────────────────────────────────── */
.inv-tab-panel {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* ── Scan Tab ───────────────────────────────────────────────────────────── */
.inv-scan-hero {
  padding: 14px 14px 12px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.inv-scan-hero-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.inv-scan-hero-label {
  font-size: 0.72rem; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
}
.inv-scan-status {
  font-size: 0.7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 100px;
  background: rgba(62,201,126,.12); color: var(--accent2);
  border: 1px solid rgba(62,201,126,.28);
  transition: all .2s;
}
.inv-scan-status.searching {
  background: rgba(93,167,253,.12); color: var(--accent);
  border-color: rgba(93,167,253,.28);
}
.inv-scan-status.found {
  background: rgba(62,201,126,.22); color: var(--accent2);
  border-color: rgba(62,201,126,.5);
}
.inv-scan-status.nomatch {
  background: rgba(224,156,56,.12); color: var(--warn);
  border-color: rgba(224,156,56,.28);
}
.inv-scan-hero-input-wrap {
  position: relative;
  display: flex; align-items: center;
}
.inv-scan-hero-icon {
  position: absolute; left: 14px;
  color: var(--accent); pointer-events: none;
  flex-shrink: 0;
}
.inv-scan-hero-field {
  padding-left: 44px; padding-right: 42px;
  border-radius: 100px;
  font-size: 1rem;
  height: 50px;
  border-color: var(--border);
  background: var(--bg3);
}
.inv-scan-hero-field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(93,167,253,.12); }
.inv-scan-clear {
  position: absolute; right: 12px;
  color: var(--muted);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 100px;
  background: var(--border);
  transition: background .1s;
}
.inv-scan-clear:active { background: var(--muted); }
.inv-scan-hint {
  font-size: 0.73rem; color: var(--muted);
  text-align: center; margin-top: 9px;
  letter-spacing: .01em; line-height: 1.4;
}
.inv-scan-result-count {
  padding: 8px 16px;
  font-size: 0.7rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
}
/* Empty / no-match search state */
.inv-empty-scan {
  padding: 52px 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.inv-empty-scan-icon { font-size: 2.4rem; opacity: .45; }
.inv-empty-scan-msg  { font-size: 1rem; font-weight: 700; color: var(--text); }
.inv-empty-scan-hint { font-size: 0.8rem; color: var(--muted); max-width: 240px; line-height: 1.4; }

/* ── Browse Filters ─────────────────────────────────────────────────────── */
.inv-list-filters {
  display: flex; gap: 8px;
  padding: 10px 12px 8px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.inv-filter-sel { font-size: 0.82rem; padding: 9px 12px; flex: 1; }

/* ── Item Cards ─────────────────────────────────────────────────────────── */
.inv-item-list, .inv-alert-list { display: flex; flex-direction: column; }

.inv-item-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg);
  transition: background .1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.inv-item-card:active { background: var(--bg2); }
.inv-item-card.inv-item-alert { border-left: 3px solid var(--danger); padding-left: 13px; }

.inv-item-thumb {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0;
}
.inv-thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--muted);
  flex-shrink: 0;
}

.inv-item-info { flex: 1; min-width: 0; }
.inv-item-name {
  font-size: 0.93rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.inv-item-sub {
  font-size: 0.75rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 6px;
}
.inv-item-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.inv-dot-alert  { color: var(--danger); font-size: 0.5rem; vertical-align: middle; margin-left: 2px; }

.inv-item-qty-col { flex-shrink: 0; text-align: center; min-width: 40px; }
.inv-qty-num  { display: block; font-size: 1.4rem; font-weight: 800; color: var(--accent2); line-height: 1; }
.inv-qty-zero { color: var(--danger); }
.inv-qty-unit { display: block; font-size: 0.62rem; color: var(--muted); margin-top: 2px; }

/* ── Chips ──────────────────────────────────────────────────────────────── */
.inv-badge-chip {
  display: inline-block;
  font-size: 0.68rem; font-weight: 700;
  padding: 3px 8px; border-radius: 100px;
  border: 1px solid currentColor;
}
.inv-loc-chip {
  display: inline-block;
  font-size: 0.7rem; font-weight: 600;
  padding: 3px 8px; border-radius: 100px;
  background: var(--bg3); color: var(--muted); border: 1px solid var(--border);
}
.inv-loc-van      { background: rgba(93,167,253,.14); color: #5da7fd; border-color: rgba(93,167,253,.3); }
.inv-loc-shop     { background: rgba(62,201,126,.14); color: #3ec97e; border-color: rgba(62,201,126,.3); }
.inv-loc-jobsite  { background: rgba(224,156,56,.14);  color: #e09c38; border-color: rgba(224,156,56,.3); }
.inv-loc-tech_held{ background: rgba(171,110,247,.14); color: #ab6ef7; border-color: rgba(171,110,247,.3); }
.inv-qty-chip     { font-size: 0.72rem; font-weight: 700; color: var(--text); padding: 3px 9px; background: var(--bg3); border-radius: 100px; border: 1px solid var(--border); }

/* ── Tags ───────────────────────────────────────────────────────────────── */
.inv-tag { font-size: 0.62rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; vertical-align: middle; letter-spacing: .03em; }
.inv-tag-order   { background: rgba(224,82,82,.2);  color: #e05252; }
.inv-tag-low     { background: rgba(224,156,56,.2); color: #e09c38; }
.inv-tag-damaged { background: rgba(224,82,82,.2);  color: #e07070; }

/* ── Transfers Tab ──────────────────────────────────────────────────────── */
.inv-transfer-list { padding: 12px; display: flex; flex-direction: column; gap: 10px; }

.inv-transfer-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
}
.inv-transfer-card.inv-transfer-pending  { border-left: 3px solid var(--warn); }
.inv-transfer-card.inv-transfer-approved { border-left: 3px solid var(--accent2); }
.inv-transfer-card.inv-transfer-rejected { opacity: .5; }

.inv-transfer-name   { font-weight: 700; font-size: 0.93rem; margin-bottom: 4px; }
.inv-transfer-route  { font-size: 0.85rem; color: var(--text); margin-bottom: 4px; }
.inv-transfer-meta   { font-size: 0.75rem; color: var(--muted); }
.inv-transfer-status { font-size: 0.7rem; font-weight: 800; margin-top: 8px; text-transform: uppercase; letter-spacing: .05em; }
.inv-ts-pending  { color: var(--warn); }
.inv-ts-approved { color: var(--accent2); }
.inv-ts-rejected { color: var(--muted); }
.inv-transfer-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ── Alerts Tab ─────────────────────────────────────────────────────────── */
.inv-alert-list { display: flex; flex-direction: column; }
.inv-alert-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; background: var(--bg); transition: background .1s;
}
.inv-alert-card:active { background: var(--bg2); }

/* ── Activity Feed Tab ──────────────────────────────────────────────────── */
.inv-activity-feed { padding: 0; display: flex; flex-direction: column; }
.inv-feed-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .1s;
}
.inv-feed-row:active { background: var(--bg2); }
.inv-feed-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--muted); flex-shrink: 0; margin-top: 5px;
}
.inv-feed-dot[data-action="transfer"]       { background: var(--accent); }
.inv-feed-dot[data-action="status_changed"] { background: var(--accent2); }
.inv-feed-dot[data-action="photo_added"]    { background: var(--purple); }
.inv-feed-dot[data-action="note"]           { background: var(--warn); }
.inv-feed-dot[data-action="created"]        { background: var(--accent2); }
.inv-feed-dot[data-action="imported"]       { background: var(--muted); }
.inv-feed-body { flex: 1; min-width: 0; }
.inv-feed-item-name { font-size: 0.78rem; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.inv-feed-detail    { font-size: 0.85rem; color: var(--text); line-height: 1.4; }
.inv-feed-meta      { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }

/* ── Bottom Navigation Dock ─────────────────────────────────────────────── */
.inv-bottom-nav {
  flex-shrink: 0;
  height: var(--nav-h);
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  /* Safe area for iPhone home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.inv-nav-btn {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  font-size: 0.62rem; font-weight: 600;
  color: var(--muted);
  position: relative;
  transition: color .15s;
  padding: 6px 2px;
  min-height: 44px;
}
.inv-nav-btn svg { transition: stroke .15s; }
.inv-nav-btn.active { color: var(--accent); }
.inv-nav-btn.active svg { stroke: var(--accent); }
.inv-nav-btn:active { opacity: .7; }

.inv-nav-badge {
  position: absolute; top: 6px; right: calc(50% - 18px);
  background: var(--danger); color: #fff;
  font-size: 0.58rem; font-weight: 800;
  border-radius: 100px; min-width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg2);
}

/* ── Detail Sheet ───────────────────────────────────────────────────────── */
.inv-sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 200;
  backdrop-filter: blur(3px);
}
.inv-detail-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  z-index: 210;
  max-height: 92vh; max-height: 92dvh;
  display: flex; flex-direction: column;
  animation: slideUp .28s cubic-bezier(.32,1,.23,1);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
body.inv-sheet-open { overflow: hidden; }

.inv-sheet-drag-handle {
  width: 36px; height: 4px;
  background: var(--border); border-radius: 2px;
  margin: 10px auto 4px; flex-shrink: 0;
}
.inv-sheet-scroll {
  overflow-y: auto; flex: 1;
  padding: 8px 16px 0;
  -webkit-overflow-scrolling: touch;
}
.inv-sheet-close {
  position: sticky; bottom: 0; flex-shrink: 0;
  width: 100%; padding: 16px;
  background: var(--bg3); border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.9rem; font-weight: 700;
  letter-spacing: .02em;
}

/* Sheet photos section */
.inv-sheet-photos-wrap {
  margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.inv-photos-gallery {
  display: flex; gap: 8px; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  border-radius: var(--radius-sm);
}
.inv-photos-gallery img {
  height: 180px; width: auto; max-width: 90%;
  object-fit: cover; display: block;
  border-radius: var(--radius-sm);
  flex-shrink: 0; scroll-snap-align: start;
}
.inv-photos-empty {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 0; color: var(--muted); font-size: 0.82rem;
}
.inv-add-photo-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 0.9rem; font-weight: 700; color: var(--accent);
  cursor: pointer; padding: 14px 16px;
  background: rgba(93,167,253,.08); border-radius: var(--radius-sm);
  border: 1.5px dashed rgba(93,167,253,.4);
  transition: background .15s, border-color .15s;
  width: 100%;
}
.inv-add-photo-btn:active { background: rgba(93,167,253,.18); border-color: var(--accent); }
.inv-photos-role-note {
  font-size: 0.72rem; color: var(--muted); text-align: center; padding: 8px 0;
  font-style: italic;
}

/* Sheet identity */
.inv-sheet-identity { margin-bottom: 10px; }
.inv-sheet-name { font-size: 1.25rem; font-weight: 800; line-height: 1.2; margin-bottom: 4px; }
.inv-sheet-meta { font-size: 0.78rem; color: var(--muted); }

/* Sheet chips */
.inv-sheet-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.inv-toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--bg3); color: var(--text);
  padding: 10px 22px; border-radius: 100px;
  font-size: 0.85rem; font-weight: 700;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
  z-index: 500; pointer-events: none; white-space: nowrap;
  animation: toastIn .18s ease;
}
.inv-toast-success { border-color: rgba(62,201,126,.4); color: var(--accent2); }
.inv-toast-error   { border-color: rgba(224,82,82,.4);  color: var(--danger);  }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Sheet section label */
.inv-sheet-section-label {
  font-size: 0.7rem; font-weight: 800;
  color: var(--muted); text-transform: uppercase; letter-spacing: .07em;
  margin: 18px 0 10px;
}

/* Sheet actions grid */
.inv-sheet-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px; margin-bottom: 4px;
}
.inv-action-btn {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  font-size: 0.85rem; font-weight: 600; color: var(--text);
  text-align: left; line-height: 1.3;
  transition: background .1s, border-color .1s;
}
.inv-action-btn:active { background: var(--border); }
.inv-action-btn:disabled { opacity: .5; }
.inv-action-btn-icon { display: block; font-size: 1.1rem; margin-bottom: 4px; }

/* Sheet notes */
.inv-sheet-notes-row { margin-bottom: 4px; }
.inv-sheet-notes { font-size: 0.85rem; color: var(--muted); font-style: italic; line-height: 1.5; }

/* Sheet activity */
.inv-sheet-activity { display: flex; flex-direction: column; }
.inv-activity-row {
  display: flex; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}
.inv-activity-row:last-child { border-bottom: none; }
.inv-activity-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border); flex-shrink: 0; margin-top: 4px;
}
.inv-activity-dot[data-action="transfer"]       { background: var(--accent); }
.inv-activity-dot[data-action="status_changed"] { background: var(--accent2); }
.inv-activity-dot[data-action="photo_added"]    { background: var(--purple); }
.inv-activity-dot[data-action="note"]           { background: var(--warn); }
.inv-activity-dot[data-action="created"]        { background: var(--accent2); }
.inv-activity-dot[data-action="imported"]       { background: var(--muted); }
.inv-activity-detail { color: var(--text); line-height: 1.4; }
.inv-activity-meta   { color: var(--muted); font-size: 0.7rem; margin-top: 2px; }

/* ── Transfer Modal ─────────────────────────────────────────────────────── */
.inv-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72);
  z-index: 300;
  display: flex; align-items: flex-end;
}
.inv-modal-card {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 20px 20px 36px;
  width: 100%;
  animation: slideUp .22s ease;
  max-height: 90vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.inv-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.inv-modal-title  { font-size: 1.1rem; font-weight: 800; }
.inv-modal-close-x {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bg3); color: var(--muted);
}
.inv-modal-close-x:active { background: var(--border); }
.inv-modal-item-name { font-size: 0.85rem; color: var(--accent); margin-bottom: 18px; font-weight: 600; }
.inv-modal-row       { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.inv-modal-row-inline { flex-direction: row; align-items: center; }
.inv-modal-label     { font-size: 0.75rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.inv-modal-value     { font-size: 0.9rem; color: var(--text); padding: 6px 0; font-weight: 600; }
.inv-modal-input     { font-size: 0.95rem; }
.inv-modal-select    { font-size: 0.95rem; }
.inv-modal-qty       { max-width: 100px; }
.inv-required        { color: var(--danger); }
.inv-hint            { color: var(--muted); font-weight: 400; font-size: 0.72rem; }
.inv-modal-msg       { font-size: 0.85rem; color: var(--danger); padding: 6px 0; }
.inv-modal-pending-note {
  font-size: 0.82rem; color: var(--warn);
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: rgba(224,156,56,.1); border: 1px solid rgba(224,156,56,.2);
  margin-bottom: 4px;
}
.inv-modal-btns { display: flex; gap: 10px; margin-top: 18px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.inv-btn {
  flex: 1; padding: 14px 16px;
  font-size: 0.95rem; font-weight: 700;
  border-radius: var(--radius-sm);
  transition: opacity .15s, transform .1s;
}
.inv-btn:active { transform: scale(.98); }
.inv-btn:disabled { opacity: .5; }
.inv-btn-primary { background: var(--accent); color: #fff; }
.inv-btn-ghost   { background: var(--bg3); color: var(--muted); border: 1px solid var(--border); }
.inv-btn-sm      { flex: none; padding: 9px 16px; font-size: 0.82rem; }
.inv-btn-danger  { background: rgba(224,82,82,.15); color: var(--danger); border: 1px solid rgba(224,82,82,.3); }

/* ── Empty / Loading ────────────────────────────────────────────────────── */
.inv-empty, .inv-loading, .inv-error-msg {
  padding: 48px 20px; text-align: center;
  color: var(--muted); font-size: 0.92rem;
}
.inv-error-msg { color: var(--danger); }

/* ── Desktop ────────────────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .inv-item-card { padding: 16px 24px; }
  .inv-detail-sheet { left: auto; right: 0; max-width: 480px; max-height: 100dvh; border-radius: 0; border-left: 1px solid var(--border); border-top: none; animation: slideRight .25s ease; }
  @keyframes slideRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
  .inv-modal { align-items: center; }
  .inv-modal-card { border-radius: var(--radius); border: 1px solid var(--border); max-width: 440px; margin: 0 auto; padding: 28px; }
  .inv-bottom-nav { max-width: none; }
}
