/* 配色对齐 Android App MouseRackTheme（RackApp.kt LightColors） */
:root {
  --primary: #1f6feb;
  --on-primary: #ffffff;
  --primary-container: #eaf1fb;
  --on-primary-container: #163a6b;
  --secondary: #3d4f7c;
  --secondary-container: #eef1f6;
  --on-secondary-container: #243044;
  --background: #f5f5f7;
  --surface: #ffffff;
  --surface-variant: #f0f0f2;
  --surface-dim: #e8e8ed;
  --on-surface: #1d1d1f;
  --on-surface-variant: #86868b;
  --outline: #e6e6ea;
  --error: #b5453a;
  --over: #b5453a;
  --ok: #0f7a6a;
  --warn: #a56a2a;
  --shadow: 0 1px 3px rgba(29, 29, 31, 0.06), 0 4px 16px rgba(29, 29, 31, 0.04);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--on-surface);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

a {
  color: var(--primary);
}

#app {
  min-height: 100vh;
}

.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.side {
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
  border-right: 1px solid var(--outline);
  background: var(--surface);
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--on-surface);
}

.brand-sub {
  color: var(--on-surface-variant);
  font-size: 0.82rem;
  margin: 0 0 22px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-title {
  padding: 0 12px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--on-surface-variant);
  opacity: 0.85;
}

.nav button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--on-surface-variant);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.nav button.active {
  background: var(--primary-container);
  color: var(--primary);
  font-weight: 600;
}

.nav button:hover {
  background: var(--secondary-container);
  color: var(--on-surface);
}

.nav button.active:hover {
  background: var(--primary-container);
  color: var(--primary);
}

.side-foot {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--outline);
  font-size: 0.85rem;
  color: var(--on-surface-variant);
}

.side-foot strong {
  color: var(--on-surface);
  font-weight: 600;
}

.main {
  padding: 28px 32px 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 22px;
}

.topbar h1 {
  font-size: 1.55rem;
  margin: 0 0 4px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.topbar p {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: 0.92rem;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.btn.primary:hover {
  filter: brightness(0.95);
  color: var(--on-primary);
}

.btn.ghost {
  background: transparent;
}

.btn.secondary {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--outline);
}

.btn.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn.danger {
  color: var(--error);
  border-color: rgba(181, 69, 58, 0.35);
}

.btn.danger:hover {
  background: rgba(181, 69, 58, 0.06);
  border-color: var(--error);
  color: var(--error);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.stat .label {
  color: var(--on-surface-variant);
  font-size: 0.8rem;
}

.stat .value {
  font-size: 1.55rem;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: -0.02em;
  color: var(--on-surface);
}

.stat.over .value {
  color: var(--error);
}

.stat.accent {
  background: var(--primary-container);
  border-color: transparent;
}

.stat.accent .label {
  color: var(--on-primary-container);
}

.stat.accent .value {
  color: var(--on-primary-container);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--outline);
  background: var(--surface);
}

.panel-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--outline);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--on-surface-variant);
  font-weight: 500;
  background: var(--surface-variant);
}

tr.clickable {
  cursor: pointer;
}

tr.row-warn td {
  background: color-mix(in srgb, var(--error, #dc2626) 6%, transparent);
}

tr.clickable:hover td {
  background: var(--primary-container);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid transparent;
}

.badge.over {
  color: var(--error);
  background: rgba(181, 69, 58, 0.08);
  border-color: rgba(181, 69, 58, 0.22);
}

.badge.ok {
  color: var(--ok);
  background: rgba(15, 122, 106, 0.08);
  border-color: rgba(15, 122, 106, 0.22);
}

.badge.warn {
  color: var(--warn);
  background: rgba(165, 106, 42, 0.1);
  border-color: rgba(165, 106, 42, 0.22);
}

.muted {
  color: var(--on-surface-variant);
}

.empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--on-surface-variant);
}

.error {
  color: var(--error);
  background: rgba(181, 69, 58, 0.08);
  border: 1px solid rgba(181, 69, 58, 0.22);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.success {
  color: var(--ok);
  background: rgba(15, 122, 106, 0.08);
  border: 1px solid rgba(15, 122, 106, 0.22);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.panel-body {
  padding: 14px 16px 16px;
}

.panel-body > :first-child {
  margin-top: 0;
}

.panel-body > :last-child {
  margin-bottom: 0;
}

.followup-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 14px;
  color: var(--on-surface-variant);
  font-size: 0.92rem;
  line-height: 1.45;
}

.followup-status .badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.followup-form {
  display: grid;
  gap: 12px;
}

.followup-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.followup-form .field {
  margin-bottom: 0;
}

.followup-form .field-span {
  grid-column: 1 / -1;
}

.followup-hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-size: 0.85rem;
  line-height: 1.45;
}

.followup-hint.is-merge {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.followup-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

.followup-actions .primary-actions,
.followup-actions .secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.followup-note {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--outline);
  font-size: 0.85rem;
  color: var(--on-surface-variant);
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--background);
}

.login-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-card .lead {
  color: var(--on-surface-variant);
  margin: 0 0 24px;
  font-size: 0.92rem;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--on-surface-variant);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface);
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(31, 111, 235, 0.25);
  border-color: var(--primary);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.mini-card h3 {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--on-surface-variant);
  font-weight: 500;
}

.seat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow: auto;
}

.seat-list li {
  padding: 7px 0;
  border-bottom: 1px dashed var(--outline);
  font-size: 0.9rem;
}

.seat-list li:last-child {
  border-bottom: 0;
}

.seat-list .tag-add {
  color: var(--ok);
}

.seat-list .tag-rm {
  color: var(--error);
}

.form-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 14px 16px;
  border-bottom: 1px solid var(--outline);
}

form.form-row.whitelist-filter {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
}

.placeholder-box {
  padding: 28px 20px;
  text-align: center;
}

.placeholder-box h2 {
  margin: 0 0 8px;
  font-weight: 700;
}

.placeholder-box ol {
  text-align: left;
  display: inline-block;
  color: var(--secondary);
  line-height: 1.7;
}

.note {
  font-size: 0.85rem;
  color: var(--on-surface-variant);
  margin: 8px 0 0;
}

.group-quota-card {
  text-align: left;
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface-2, #f6f6f7);
  margin: 0 0 4px;
}

.group-quota-card.is-ok {
  border-color: #8fd6a8;
  background: #f2fbf5;
}

.group-quota-card.is-warn {
  border-color: #e6c36a;
  background: #fffaf0;
}

.group-quota-card.is-over {
  border-color: #e8a0a0;
  background: #fff5f5;
}

.group-quota-head {
  font-weight: 600;
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.group-quota-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 0.88rem;
}

.group-quota-grid .k {
  color: var(--on-surface-variant);
  margin-right: 6px;
}

.group-quota-grid .v {
  font-weight: 500;
}

.confirm-check {
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.4;
}

#eligibility-modal {
  text-align: left;
}

#eligibility-modal .modal-actions {
  justify-content: flex-end;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(29, 29, 31, 0.45);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--outline);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
}

.modal h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.modal .qr-box {
  display: grid;
  place-items: center;
  margin: 16px 0;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--outline);
}

.modal .qr-box canvas {
  max-width: 100%;
  height: auto !important;
}

.modal .url {
  word-break: break-all;
  font-size: 0.82rem;
  color: var(--on-surface-variant);
  margin: 0 0 14px;
}

.modal.modal-wide {
  width: min(720px, 96vw);
  max-height: 90vh;
  overflow: auto;
}

.modal.modal-text-detail {
  width: min(420px, 100%);
  max-height: min(80vh, 640px);
  text-align: left;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal.modal-text-detail .text-detail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(52vh, 420px);
  overflow: auto;
  margin: 0 0 14px;
  padding: 0 4px 0 0;
  border: 1px solid var(--outline);
  border-radius: 10px;
  background: var(--surface-variant, #f5f5f7);
}

.modal.modal-text-detail .text-detail-scroll .seat-list {
  max-height: none;
  padding: 8px 12px;
}

.modal.modal-text-detail .modal-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.seats-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.seats-cell-summary {
  font-size: 0.9rem;
}

.modal.modal-seat {
  width: min(980px, 98vw);
  text-align: left;
}

.approve-cage-list {
  max-height: 42vh;
  overflow: auto;
  margin: 8px 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}

.seat-map-wrap {
  max-height: 52vh;
  overflow: auto;
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #f7f7f8;
}

.seat-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 0.78rem;
  color: var(--on-surface-variant);
  margin: 0 0 10px;
}

.seat-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.seat-map-legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--outline);
  display: inline-block;
  background: #fff;
}

.seat-map-legend i.vacant {
  background: #fff;
}

.seat-map-legend i.in-use {
  background: #eaf1fb;
  border-color: #1f6feb;
}

.seat-map-legend i.paused {
  background: #f3e8ff;
  border-color: #7c3aed;
}

.seat-map-legend i.special-water {
  background: #d6ebff;
  border-color: #93c5fd;
}

.seat-map-legend i.special-food {
  background: #ffe4c2;
  border-color: #fdba74;
}

.seat-map-legend i.special-both {
  background: linear-gradient(90deg, #d6ebff, #ffe4c2);
  border-color: #93c5fd;
}

.seat-map-legend i.selected {
  background: #1f6feb;
  border-color: #1f6feb;
}

.seat-map-legend i.hit {
  box-shadow: 0 0 0 2px #1f6feb;
}

.seat-map {
  display: inline-block;
  min-width: 100%;
}

.seat-map-hint {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: var(--on-surface-variant);
}

.seat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.seat-row-label,
.seat-col-label {
  width: 22px;
  flex-shrink: 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--on-surface-variant);
  font-weight: 600;
}

.seat-col-head {
  display: flex;
  gap: 6px;
  margin: 0 0 6px 28px;
}

.seat-col-head .seat-col-label {
  width: 52px;
}

.seat-cell {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1.5px solid #e6e6ea;
  background: #fff;
  padding: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  line-height: 1.1;
  color: #1d1d1f;
  cursor: default;
  user-select: none;
  box-sizing: border-box;
  position: relative;
}

.seat-cell .seat-name {
  font-weight: 700;
  font-size: 0.72rem;
}

.seat-cell .seat-sub {
  font-size: 0.62rem;
  color: #86868b;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-cell.vacant {
  cursor: pointer;
}

.seat-cell.vacant:hover {
  border-color: #1f6feb;
  background: #f3f7fd;
}

.seat-cell.vacant .seat-x {
  color: #8e8e93;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1;
}

.seat-cell.in_use {
  background: #fff;
  border-color: #e6e6ea;
}

/* 与手机 App 一致：特殊水偏蓝、特殊粮偏橙；二者并存时左右渐变 */
.seat-cell.in_use.special-water:not(.special-food) {
  background: #d6ebff;
  border-color: #93c5fd;
}

.seat-cell.in_use.special-food:not(.special-water) {
  background: #ffe4c2;
  border-color: #fdba74;
}

.seat-cell.in_use.special-water.special-food {
  background: linear-gradient(90deg, #d6ebff, #ffe4c2);
  border-color: #93c5fd;
}

.seat-cell.paused {
  background: #f3e8ff;
  border-color: #c4b5fd;
  color: #5b21b6;
}

.seat-cell.selected {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #fff;
}

.seat-cell.selected .seat-sub,
.seat-cell.selected .seat-x {
  color: rgba(255, 255, 255, 0.9);
}

.seat-cell.search-hit {
  box-shadow: 0 0 0 2px #1f6feb;
  z-index: 1;
}

.seat-cell.disabled-rack {
  opacity: 0.45;
  cursor: not-allowed;
}

.seat-map-compact .seat-cell {
  width: 44px;
  height: 44px;
}

.seat-map-compact .seat-col-head .seat-col-label {
  width: 44px;
}

.modal .modal-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .side {
    border-right: 0;
    border-bottom: 1px solid var(--outline);
  }
  .nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px 18px;
  }
  .nav-section {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
  }
  .nav-section-title {
    width: 100%;
    padding: 0 4px 2px;
  }
  .nav button {
    width: auto;
  }
  .stats,
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .form-row,
  form.form-row.whitelist-filter,
  .followup-fields {
    grid-template-columns: 1fr 1fr;
  }
  .main {
    padding: 20px 16px 40px;
  }
}

/* 库存与采购 */
.inv-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.inv-help-panel {
  border-color: rgba(31, 111, 235, 0.22);
  background: #f7faff;
}
.inv-help-body {
  padding: 0 16px 14px;
  color: var(--on-surface);
  font-size: 0.92rem;
  line-height: 1.55;
}
.inv-help-body p {
  margin: 0 0 10px;
}
.inv-help-body p:last-child {
  margin-bottom: 0;
}
.inv-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--outline);
}
.inv-budget-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 10px;
  font-size: 0.95rem;
}
.inv-budget-over {
  color: var(--error);
}
.inv-budget-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-variant);
  overflow: hidden;
}
.inv-budget-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.25s ease;
}
.inv-budget-fill.over {
  background: var(--error);
}
.inv-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 16px 8px;
}
.inv-chart-card {
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 12px 14px 14px;
  background: var(--surface-variant);
}
.inv-chart-card h3,
.inv-chart-sub {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--on-surface);
}
.inv-donut-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}
.inv-donut {
  flex: 0 0 auto;
  display: block;
}
.inv-donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 140px;
  font-size: 0.82rem;
}
.inv-donut-legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: center;
  margin: 0 0 6px;
}
.inv-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.inv-leg-label {
  color: var(--on-surface);
}
.inv-leg-val {
  color: var(--on-surface-variant);
  white-space: nowrap;
}
.inv-donut-empty {
  padding: 28px 8px;
  text-align: center;
  font-size: 0.9rem;
}
.inv-share-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.inv-share-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 4px;
  font-size: 0.88rem;
}
.inv-share-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-variant);
  overflow: hidden;
}
.inv-share-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
}
@media (max-width: 900px) {
  .inv-chart-grid {
    grid-template-columns: 1fr;
  }
}
.inv-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
}
.inv-badge.badge-ok {
  background: rgba(15, 122, 106, 0.12);
  color: var(--ok);
}
.inv-badge.badge-warn {
  background: rgba(165, 106, 42, 0.14);
  color: var(--warn);
}
.inv-badge.badge-empty {
  background: rgba(181, 69, 58, 0.12);
  color: var(--error);
}
.inv-badge.badge-muted {
  background: var(--surface-variant);
  color: var(--on-surface-variant);
}
.inv-alert-panel {
  margin-bottom: 16px;
  border-color: rgba(165, 106, 42, 0.35);
  background: #fffaf3;
}
.inv-alert-list {
  margin: 0;
  padding: 0 16px 14px 32px;
  color: var(--on-surface);
}
.inv-alert-list li {
  margin: 6px 0;
}

@media (max-width: 560px) {
  .stats,
  .cards,
  .grid-2,
  .followup-fields {
    grid-template-columns: 1fr;
  }
  .form-row,
  form.form-row.whitelist-filter {
    grid-template-columns: 1fr;
  }
  .followup-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .followup-actions .primary-actions,
  .followup-actions .secondary-actions {
    width: 100%;
  }
  .followup-actions .primary-actions .btn,
  .followup-actions .secondary-actions .btn {
    flex: 1;
  }
}
