/* ============================================================
   COLLECTORS CERTIFIED GRADING — inventory-cc.css
   Cloud Card "Inventory" subtab (js/inventory-cc.js).

   Rides the .cc-scope token set from cloudcard.css (--cc-blue,
   --cc-mist, --cc-mono, …) so the panel matches the Portfolio and
   Watch List subtabs; only the .cc-inv-* pieces live here.
   ============================================================ */

.cc-inv { padding: 6px 2px 10px; }

/* ---------------- head ---------------- */
.cc-inv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.cc-inv-head-text { min-width: 0; }
.cc-inv-head h2 { font-family: var(--font-display); font-size: 26px; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 8px; }
.cc-inv-intro { color: var(--cc-mist); font-size: 14px; max-width: 680px; }
.cc-inv-add { flex: none; margin-top: 4px; }

/* ---------------- filters + search ---------------- */
.cc-inv-tools {
  display: grid; grid-template-columns: repeat(3, minmax(120px, .8fr)) 1.6fr; gap: 12px;
  align-items: end; background: rgba(6,16,25,.4); border: 1px solid var(--cc-line);
  border-radius: var(--cc-radius); padding: 16px 18px;
}
.cc-inv-filter { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.cc-inv-filter > span { font-size: 12px; letter-spacing: .05em; color: var(--cc-mist); text-transform: uppercase; font-weight: 600; }
.cc-inv-filter select {
  width: 100%; background: rgba(6,16,25,.6); border: 1px solid var(--cc-line); border-radius: 11px;
  color: #e6eef7; font-size: 14px; padding: 11px 12px; font-family: inherit; height: 44px;
}
.cc-inv-filter select:focus { outline: none; border-color: var(--cc-blue); box-shadow: 0 0 0 3px rgba(20,146,253,.16); }

.cc-inv-search { position: relative; display: flex; align-items: center; min-width: 0; }
.cc-inv-search svg { position: absolute; left: 14px; color: var(--cc-mist); pointer-events: none; }
.cc-inv-search input {
  width: 100%; height: 44px; background: rgba(6,16,25,.6); border: 1px solid var(--cc-line);
  border-radius: 11px; color: #e6eef7; font-size: 14px; padding: 11px 14px 11px 40px; font-family: inherit;
}
.cc-inv-search input::placeholder { color: rgba(148,173,196,.6); }
.cc-inv-search input:focus { outline: none; border-color: var(--cc-blue); box-shadow: 0 0 0 3px rgba(20,146,253,.16); }

.cc-inv-count { font-family: var(--cc-mono); font-size: 12.5px; color: var(--cc-mist); margin: 16px 2px 10px; min-height: 16px; }

/* ---------------- list ---------------- */
.cc-inv-list { display: grid; gap: 8px; }
.cc-inv-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  background: rgba(22,39,53,.5); border: 1px solid transparent; border-radius: 14px;
  transition: background .2s, border-color .2s, opacity .2s;
}
.cc-inv-row:hover { background: rgba(87,218,249,.06); border-color: var(--cc-line); }
.cc-inv-row.is-hidden { opacity: .62; }
.cc-inv-row.is-busy { opacity: .4; pointer-events: none; }

.cc-inv-thumb {
  flex: none; width: 42px; height: 58px; border-radius: 7px; background-size: cover;
  background-position: center; background-color: var(--cc-slate2); border: 1px solid var(--cc-line);
}
.cc-inv-thumb.ph { display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 16px; color: #fff; }

.cc-inv-main { flex: 1; min-width: 0; }
.cc-inv-title { font-size: 14.5px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-inv-sub { font-size: 12px; color: var(--cc-mist); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cc-inv-grade {
  flex: none; font-family: var(--cc-mono); font-size: 12.5px; font-weight: 700; color: var(--cc-white);
  background: rgba(20,146,253,.14); border: 1px solid rgba(87,218,249,.28); border-radius: 7px; padding: 4px 9px;
}
.cc-inv-grade.is-raw { color: var(--cc-mist); background: rgba(166,196,224,.07); border-color: var(--cc-line); }

.cc-inv-val { flex: none; font-family: var(--cc-mono); font-size: 14.5px; font-weight: 700; min-width: 92px; text-align: right; }

.cc-inv-src {
  flex: none; font-family: var(--cc-mono); font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--cc-sky); background: rgba(87,218,249,.1);
  border: 1px solid rgba(87,218,249,.3); border-radius: 5px; padding: 2px 7px;
}
.cc-inv-src.is-manual { color: var(--cc-haze); background: rgba(166,196,224,.1); border-color: var(--cc-line); }

.cc-inv-hidden-tag {
  flex: none; font-family: var(--cc-mono); font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #FFB454; background: rgba(255,180,84,.1);
  border: 1px solid rgba(255,180,84,.35); border-radius: 5px; padding: 2px 7px;
}

.cc-inv-actions { flex: none; display: inline-flex; gap: 6px; }
.cc-inv-act {
  font-size: 12px; font-weight: 600; color: var(--cc-mist); cursor: pointer;
  background: rgba(166,196,224,.06); border: 1px solid var(--cc-line); border-radius: 8px;
  padding: 6px 11px; transition: color .2s, border-color .2s, background .2s;
}
.cc-inv-act:hover { color: var(--cc-sky); border-color: rgba(87,218,249,.4); }
.cc-inv-act-del:hover { color: #F76F72; border-color: rgba(247,111,114,.5); background: rgba(247,111,114,.08); }
.cc-inv-act:disabled { cursor: default; opacity: .5; }

.cc-inv-empty {
  color: var(--cc-mist); font-size: 13.5px; text-align: center; padding: 34px 20px;
  background: rgba(6,16,25,.35); border: 1px dashed var(--cc-line); border-radius: var(--cc-radius);
}
.cc-inv-empty b { color: var(--cc-haze); }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .cc-inv-tools { grid-template-columns: 1fr 1fr; }
  .cc-inv-search { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .cc-inv-head { flex-direction: column; align-items: stretch; }
  .cc-inv-add { align-self: flex-start; margin-top: 0; }
  .cc-inv-row { flex-wrap: wrap; }
  .cc-inv-main { flex: 1 1 60%; }
  .cc-inv-val { min-width: 0; margin-left: auto; }
  .cc-inv-actions { margin-left: auto; }
}
@media (max-width: 560px) {
  .cc-inv-tools { grid-template-columns: 1fr; }
}
