/* Inventory section of admin.html (assets/admin-inventory.js) */
.iv-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.iv-note { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-500); }

.iv-alert { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 11px 14px; border: 1px solid #f1d9a6; border-radius: 12px; background: var(--amber-bg); font-size: 13.5px; }
.iv-alert b { color: #8a5a00; white-space: nowrap; }
.iv-alert span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-500); }
.iv-alert.is-out { border-color: #f2c4b9; background: var(--red-bg); }
.iv-alert.is-out b { color: var(--red); }

.iv-group { margin-bottom: 26px; }
.iv-gh { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.iv-gh h2 { margin: 0; font-size: 17px; font-weight: 650; color: var(--ink); }
.iv-gh .btn { margin-left: auto; }

.iv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.iv-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); }
.iv-card.is-low { border-color: #f1d9a6; }
.iv-card.is-out { border-color: #f2c4b9; }
.iv-main { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.iv-main:hover b { text-decoration: underline; text-underline-offset: 3px; }
.iv-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; }
.iv-ic--box { background: #eef2f7; color: var(--navy); }
.iv-ic--ice { background: #f1ebf8; color: #7a4bb0; }
.iv-what { min-width: 0; }
.iv-what b { display: block; font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-what small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-pill { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.iv-pill--ok { background: var(--green-bg); color: var(--green); }
.iv-pill--low { background: var(--amber-bg); color: #8a5a00; }
.iv-pill--out { background: var(--red-bg); color: var(--red); }

.iv-count { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.iv-count b { font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.iv-count span { margin-left: 4px; font-size: 16px; font-weight: 600; color: var(--ink-500); }
.iv-count small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink-500); }
.iv-step { display: flex; gap: 6px; }
.iv-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--white); color: var(--ink); font: inherit; font-size: 20px; font-weight: 600; cursor: pointer; }
.iv-btn:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); }
.iv-btn:disabled { opacity: .35; cursor: default; }

.iv-bar { display: block; height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.iv-bar b { display: block; height: 100%; border-radius: 999px; background: var(--green); transition: width .2s; }
.is-low .iv-bar b { background: var(--amber); }
.is-out .iv-bar b { background: var(--red); }
.iv-foot { margin: -6px 0 0; font-size: 12px; color: var(--ink-400); }

.iv-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 34px 20px; border: 1.5px dashed var(--line-2); border-radius: 14px; background: transparent; color: var(--ink); font: inherit; text-align: center; cursor: pointer; transition: border-color .12s, background .12s; }
.iv-empty:hover { border-color: var(--navy); background: var(--white); }
.iv-empty b { font-size: 15px; }
.iv-empty small { max-width: 34em; font-size: 13px; color: var(--ink-500); }

.iv-grow { flex: 1; }
#dwInv .dw__foot { align-items: center; }
#dwInv .box2 .field { margin-bottom: 14px; }
#dwInv .box2 { gap: 0 12px; }

@media (max-width: 720px) {
  .iv-top .seg { display: flex; width: 100%; }
  .iv-top .seg button { flex: 1; padding: 0 8px; }
  .iv-note { margin-left: 0; }
  .iv-grid { grid-template-columns: minmax(0, 1fr); }
  .iv-count b { font-size: 30px; }
  .iv-btn { width: 46px; height: 44px; }
  #dwInv .box2 { grid-template-columns: minmax(0, 1fr); }
}
