.inventory-app {
  background:
    radial-gradient(circle at top left, rgba(10, 205, 218, 0.18), transparent 34rem),
    linear-gradient(135deg, #f8fcff 0%, #eef7fb 100%);
}

.inventory-workspace {
  gap: 1.5rem;
}

.inventory-explain {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  gap: 1rem;
  align-items: stretch;
}

.inventory-explain p {
  margin: 0.4rem 0 0;
  color: #496176;
  line-height: 1.55;
}

.inventory-legend {
  display: grid;
  gap: 0.7rem;
}

.inventory-legend span {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid #d8e6f0;
  border-radius: 1rem;
  background: #f7fbfd;
  color: #385066;
}

.inventory-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.inventory-kpi-grid article {
  border: 1px solid #d7e8f2;
  border-radius: 1.25rem;
  background: #fff;
  padding: 1.1rem;
  box-shadow: 0 14px 40px rgba(28, 74, 96, 0.08);
}

.inventory-kpi-grid span,
.inventory-table th {
  color: #52657a;
  font-weight: 800;
}

.inventory-kpi-grid strong {
  display: block;
  margin-top: 0.35rem;
  font-size: clamp(1.45rem, 2.2vw, 2.4rem);
  color: #102333;
}

.inventory-kpi-grid small {
  color: #6b7b8d;
}

.inventory-kpi-grid .warning strong {
  color: #a46b00;
}

.inventory-filter-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(12rem, 0.25fr) auto;
  gap: 1rem;
  align-items: end;
}

.inventory-filter-grid input,
.inventory-filter-grid select,
.inventory-form input,
.inventory-form select,
.inventory-form textarea {
  width: 100%;
  border: 1px solid #d8e6f0;
  border-radius: 0.95rem;
  background: #fff;
  color: #203142;
  font: inherit;
  font-weight: 750;
  padding: 0.85rem 1rem;
}

.inventory-filter-grid span,
.inventory-help {
  color: #65788a;
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 950px;
}

.inventory-table th,
.inventory-table td {
  border-bottom: 1px solid #e5eef5;
  padding: 0.8rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.inventory-table td {
  color: #233445;
  font-weight: 700;
}

.inventory-table small {
  display: block;
  color: #6b7b8d;
  font-weight: 600;
  line-height: 1.35;
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: #e7f8f9;
  color: #006f7a;
  font-size: 0.86rem;
  font-weight: 900;
}

.stock-pill.low {
  background: #fff3d7;
  color: #9b6500;
}

.stock-pill.empty {
  background: #ffe4e4;
  color: #9d1e1e;
}

.stock-pill.quote {
  background: #edf3fb;
  color: #45576b;
}

.inventory-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.inventory-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.inventory-form label {
  display: grid;
  gap: 0.35rem;
  color: #43566b;
  font-weight: 900;
}

.inventory-form .wide-field,
.inventory-form button {
  grid-column: 1 / -1;
}

.inventory-checkbox {
  grid-template-columns: auto 1fr !important;
  align-items: center;
}

.inventory-checkbox input {
  width: auto;
  min-width: 1.1rem;
}

.inventory-selected-product {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line, #d8e6f0);
  border-radius: 12px;
  background: var(--surface-soft, #f7fbfd);
}

.inventory-selected-product[hidden] {
  display: none;
}

.inventory-selected-product > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.inventory-selected-product small {
  display: block;
  margin-top: 3px;
  color: var(--muted, #65788a);
}

.inventory-form .search-picker {
  min-width: 0;
}

.inventory-movements-list {
  display: grid;
  gap: 0.75rem;
}

.movement-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid #deebf4;
  border-radius: 1rem;
  background: #f9fcfe;
  padding: 0.9rem;
}

.movement-card strong {
  color: #183044;
}

.movement-card small {
  color: #6b7b8d;
}

.movement-delta {
  font-weight: 950;
  color: #0b8994;
}

.movement-delta.negative {
  color: #b11c32;
}

.supplier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
}

.supplier-card {
  border: 1px solid #dce9f2;
  border-radius: 1.1rem;
  background: #fff;
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.supplier-card strong {
  color: #172b3d;
}

.supplier-card small {
  color: #65788a;
}

@media (max-width: 1100px) {
  .inventory-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inventory-explain,
  .inventory-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .inventory-kpi-grid,
  .inventory-filter-grid,
  .inventory-form {
    grid-template-columns: 1fr;
  }

  .movement-card {
    grid-template-columns: 1fr;
  }
}
