/* Existing-content workspace -------------------------------------------------
   One inventory owns discovery. Platform editors still own every write. */

#v-inventory {
  max-width: 1280px;
  margin: 0 auto;
}

.content-inventory-head {
  align-items: flex-end;
  padding-bottom: 19px;
}

.content-inventory-head .btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.content-inventory {
  display: grid;
  gap: 12px;
}

.content-inventory-loading {
  min-height: 280px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: #596275;
  font-size: 13px;
}

.content-inventory-loading > span {
  width: 26px;
  height: 26px;
  border: 3px solid #e6e4fb;
  border-top-color: #5748ef;
  border-radius: 50%;
  animation: content-inventory-spin .75s linear infinite;
}

@keyframes content-inventory-spin { to { transform: rotate(360deg); } }

.content-inventory-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 20px;
  border: 1px solid #dedcf8;
  border-radius: 15px;
  background:
    radial-gradient(circle at 100% 0, rgba(76, 189, 255, .1), transparent 34%),
    linear-gradient(135deg, #fff 0%, #fbfaff 62%, #f7fbff 100%);
  box-shadow: 0 8px 22px rgba(38, 42, 66, .055);
}

.content-inventory-site {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.content-inventory-site-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #6655f4, #4938e2);
  box-shadow: 0 7px 16px rgba(79, 70, 229, .2);
  font-size: 13px;
  font-weight: 900;
}

.content-inventory-site > span:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.content-inventory-site small {
  color: #6356dc;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.content-inventory-site strong {
  overflow: hidden;
  color: #171a23;
  font-size: 17px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-inventory-site em {
  overflow: hidden;
  color: #858da0;
  font-size: 10.5px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-inventory-stats {
  display: flex;
  align-items: stretch;
  border: 1px solid #e4e6ed;
  border-radius: 11px;
  background: rgba(255, 255, 255, .78);
}

.content-inventory-stats > span {
  min-width: 92px;
  display: grid;
  gap: 1px;
  padding: 9px 13px;
  text-align: center;
}

.content-inventory-stats > span + span { border-left: 1px solid #e7e8ee; }
.content-inventory-stats strong { color: #181b24; font-size: 16px; line-height: 1.2; }
.content-inventory-stats small { color: #8a91a0; font-size: 9.5px; font-weight: 700; }

.content-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.content-source {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #e2e4ec;
  border-radius: 9px;
  color: #41495b;
  background: #fff;
  font-size: 10px;
}

.content-source::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #18af75;
  box-shadow: 0 0 0 3px #e5f9f1;
  content: '';
}

.content-source.mixed::before,
.content-source.partial::before { background: #e59a1a; box-shadow: 0 0 0 3px #fff5dc; }
.content-source.error::before,
.content-source.audit::before { background: #9ba2b0; box-shadow: 0 0 0 3px #eff1f5; }
.content-source b { font-weight: 800; }
.content-source small { overflow: hidden; color: #8991a1; text-overflow: ellipsis; white-space: nowrap; }

.content-inventory-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #f0d9a3;
  border-radius: 10px;
  color: #7a5712;
  background: #fffaf0;
  font-size: 10.5px;
}
.content-inventory-notice strong { flex: 0 0 auto; }
.content-inventory-notice span { color: #8f743e; }

.content-inventory-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 270px) 145px;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e1e3e9;
  border-radius: 13px;
  background: #fff;
}

.content-type-filters {
  min-width: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.content-type-filters::-webkit-scrollbar { display: none; }
.content-type-filters button {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  color: #626a7a;
  background: transparent;
  font: inherit;
  font-size: 10.5px;
  font-weight: 750;
  cursor: pointer;
}
.content-type-filters button:hover { color: #3026b6; background: #f3f1ff; }
.content-type-filters button[aria-pressed="true"] { color: #4436d3; background: #eeecff; }
.content-type-filters button span { color: #9197a5; font-size: 9px; }
.content-type-filters button[aria-pressed="true"] span { color: #6659df; }

.content-inventory-search {
  min-width: 0;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #dde0e8;
  border-radius: 9px;
  background: #fbfcfe;
}
.content-inventory-search:focus-within { border-color: #8c82ed; box-shadow: 0 0 0 3px rgba(91, 76, 240, .1); background: #fff; }
.content-inventory-search svg { width: 14px; height: 14px; flex: 0 0 14px; color: #939aa8; }
.content-inventory-search input { min-width: 0; width: 100%; border: 0; outline: 0; color: #252936; background: transparent; font: inherit; font-size: 11px; }
.content-inventory-search input::placeholder { color: #a1a7b3; }

.content-inventory-toolbar select {
  width: 100%;
  height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid #dde0e8;
  border-radius: 9px;
  outline: 0;
  color: #4e5667;
  background: #fbfcfe;
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
}

.content-inventory-count {
  padding: 0 3px;
  color: #8d94a2;
  font-size: 9.5px;
  font-weight: 650;
}

.content-inventory-list {
  overflow: hidden;
  border: 1px solid #dee1e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(35, 39, 60, .045);
}

.content-item {
  display: grid;
  grid-template-columns: 36px minmax(240px, 1fr) minmax(190px, .48fr) minmax(116px, auto);
  gap: 12px;
  align-items: center;
  padding: 13px 15px;
}
.content-item + .content-item { border-top: 1px solid #e8e9ee; }
.content-item:hover { background: #fbfbfe; }

.content-item-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #5748df;
  background: #efedff;
  font-size: 10px;
  font-weight: 900;
}
.content-item-icon.post { color: #1b7d68; background: #e7f8f3; }
.content-item-icon.product { color: #a55b08; background: #fff2db; }
.content-item-icon.collection { color: #1872a8; background: #e9f5fc; }

.content-item-main { min-width: 0; }
.content-item-title { min-width: 0; display: flex; align-items: center; gap: 6px; }
.content-item-title strong { overflow: hidden; color: #242832; font-size: 11.5px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.content-item-live { flex: 0 0 auto; color: #9189be; text-decoration: none; font-size: 11px; }
.content-item-live:hover { color: #5546dc; }
.content-item-url { overflow: hidden; margin-top: 2px; color: #a0a6b2; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.content-item-reason { overflow: hidden; margin-top: 5px; color: #697284; font-size: 9.5px; line-height: 1.42; text-overflow: ellipsis; white-space: nowrap; }

.content-item-meta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.content-item-meta > span {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 6px;
  color: #677082;
  background: #f2f3f6;
  font-size: 8.5px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.content-item-meta .content-item-type { color: #4d42ca; background: #efedff; }
.content-item-fields { display: inline-flex; gap: 3px; background: transparent !important; padding: 0 !important; }
.content-item-fields span { padding: 3px 5px; border-radius: 5px; color: #188063; background: #e8f8f1; }

.content-item-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.content-item-action .btn { min-width: 70px; }
.content-item-status {
  padding: 4px 7px;
  border-radius: 999px;
  color: #31705e;
  background: #e9f8f2;
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}
.content-item-status.attention { color: #a45c06; background: #fff1d8; }
.content-item-status.facts { color: #9d4d21; background: #fff0e8; }
.content-item-status.audit { color: #747c8b; background: #eef0f4; }

.content-inventory-more {
  min-height: 40px;
  border: 1px solid #dfe1e8;
  border-radius: 10px;
  color: #5548d6;
  background: #fff;
  font: inherit;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}
.content-inventory-more:hover { border-color: #bbb5ed; background: #f8f7ff; }

.content-inventory-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid #e1e2e9;
  border-radius: 11px;
  color: #6f7787;
  background: #fafbfc;
  font-size: 9.5px;
}
.content-inventory-foot strong { color: #353a47; }
.content-inventory-foot .btn { margin-left: auto; flex: 0 0 auto; }

.content-inventory-empty {
  min-height: 300px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 30px;
  border: 1px solid #e0e2e9;
  border-radius: 14px;
  text-align: center;
  background: #fff;
}
.content-inventory-empty.compact { min-height: 210px; border: 0; border-radius: 0; box-shadow: none; }
.content-inventory-empty-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #5446dc; background: #efedff; }
.content-inventory-empty h3 { margin: 0; font-size: 16px; }
.content-inventory-empty p { max-width: 480px; margin: 0; color: #727a8a; font-size: 11px; }
.content-inventory-empty > div { display: flex; gap: 7px; }

@media (max-width: 1100px) {
  .content-inventory-toolbar { grid-template-columns: 1fr 220px; }
  .content-type-filters { grid-column: 1 / -1; }
  .content-item { grid-template-columns: 34px minmax(220px, 1fr) minmax(150px, .4fr) auto; }
  .content-item-action { align-items: flex-end; flex-direction: column; }
}

@media (max-width: 760px) {
  #v-inventory { width: 100%; }
  .content-inventory-head { align-items: flex-start; }
  .content-inventory-head .btn { margin-top: 2px; }
  .content-inventory-summary { align-items: stretch; flex-direction: column; padding: 16px; }
  .content-inventory-stats { width: 100%; }
  .content-inventory-stats > span { min-width: 0; flex: 1 1 0; }
  .content-source-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .content-source-row::-webkit-scrollbar { display: none; }
  .content-source { flex: 0 0 auto; }
  .content-inventory-notice { align-items: flex-start; flex-direction: column; }
  .content-inventory-toolbar { grid-template-columns: minmax(0, 1fr) 126px; padding: 8px; }
  .content-type-filters { grid-column: 1 / -1; }
  .content-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px;
  }
  .content-item-main { grid-column: 2 / 4; }
  .content-item-icon { grid-row: 1; }
  .content-item-meta { grid-column: 2; }
  .content-item-action { grid-column: 3; align-items: flex-end; }
  .content-item-reason { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .content-inventory-foot { align-items: flex-start; flex-wrap: wrap; }
  .content-inventory-foot span { flex-basis: 100%; }
  .content-inventory-foot .btn { margin-left: 0; }
}

@media (max-width: 460px) {
  .content-inventory-head { gap: 12px; }
  .content-inventory-head .btn { padding-inline: 10px; }
  .content-inventory-site strong { font-size: 15px; }
  .content-inventory-toolbar { grid-template-columns: minmax(0, 1fr); }
  .content-type-filters { flex-wrap: wrap; overflow-x: visible; }
  .content-inventory-toolbar select { grid-column: 1; }
  .content-inventory-stats small { font-size: 8.5px; }
  .content-item { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .content-item-icon { width: 30px; height: 30px; border-radius: 8px; }
  .content-item-title strong { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .content-item-meta { grid-column: 2 / 4; }
  .content-item-action { grid-column: 2 / 4; align-items: center; justify-content: flex-start; flex-direction: row; }
  .content-item-meta .content-item-platform,
  .content-item-fields { display: none; }
  .content-item-action .btn { min-width: 62px; padding-inline: 9px; }
}
