/* inventory.css — POS inventory view, matches compose look. */

body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px 60px;
}

.inv-header {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}
.back-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(7, 237, 190, 0.12);
  color: var(--teal);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}
.title-block h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.title-block .muted {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.loading { padding: 32px 0; text-align: center; color: var(--text-muted); }

.sku-section {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
}
.sku-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}
.sku-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.sku-total {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}
.sku-total strong { color: var(--teal); font-weight: 800; }

.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.color-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(248, 248, 248, 0.04);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.color-stat .dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
}
.color-stat .label { color: var(--text-muted); }
.color-stat .qty { font-weight: 800; color: var(--text); }
.color-stat[data-low="true"] {
  border-color: rgba(255, 168, 209, 0.55);
  background: rgba(255, 168, 209, 0.08);
}
.color-stat[data-low="true"] .qty { color: #FFA8D1; }
.color-stat[data-zero="true"] {
  opacity: 0.5;
}

.totals-card {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(7, 237, 190, 0.10) 0%, rgba(7, 237, 190, 0.02) 100%);
  border: 1px solid rgba(7, 237, 190, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.totals-card .left { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.totals-card .right { font-size: 22px; font-weight: 800; color: var(--teal); }

/* ---------- Adjust modal ---------- */
.color-stat[role="button"] { cursor: pointer; }
.color-stat[role="button"]:active { transform: scale(0.96); }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 26, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 18px;
}
[hidden] { display: none !important; }

.adjust-card {
  position: relative;
  box-sizing: border-box;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 28px 22px 22px;
  max-width: 420px;
  width: 100%;
  overflow: hidden;
}
.x-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px; height: 38px;
  border: none;
  background: rgba(248, 248, 248, 0.08);
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 999px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.x-btn:hover { background: rgba(248, 248, 248, 0.18); }
.x-btn:active { transform: scale(0.94); }

.adjust-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.adjust-card h2 {
  margin: 4px 0 18px;
  font-size: 22px;
  font-weight: 800;
}

.qty-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 10px;
  align-items: center;
  margin: 4px 0 22px;
}
.qty-btn {
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(7, 237, 190, 0.35);
  background: rgba(7, 237, 190, 0.10);
  color: var(--teal);
  font-size: 26px;
  font-weight: 800;
  cursor: pointer;
}
.qty-btn:active { transform: scale(0.96); }
#adjust-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 56px;
  padding: 0 8px;
  border-radius: 16px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  font-family: inherit;
  -moz-appearance: textfield;
}
#adjust-input::-webkit-outer-spin-button,
#adjust-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.reason-block { margin: 0 0 22px; }
.reason-block + .primary-btn { margin-top: 4px; }
.reason-block label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.reason-block input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.primary-btn {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border-radius: 999px;
  border: none;
  background: var(--teal);
  color: #0A091A;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.primary-btn:active { transform: scale(0.98); }
.primary-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
