/* Eroded Networks profile modules: inventory, reward reel, and role manager. */
#en-profile-inventory {
  --inv-border: rgba(255, 255, 255, .11);
  --inv-panel: rgba(12, 18, 29, .94);
  --inv-muted: rgba(224, 234, 247, .68);
  width: min(1320px, 100%);
  margin: 18px auto 34px;
  padding: 0 12px;
  color: #eef6ff;
}

#en-profile-inventory,
#en-profile-inventory * { box-sizing: border-box; }

#en-profile-inventory button,
#en-profile-inventory input,
#en-profile-inventory select { font: inherit; }

#en-profile-inventory .en-inv-shell {
  width: 100%;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--inv-border);
  border-radius: 24px;
  background:
    radial-gradient(720px circle at 0 0, rgba(59, 130, 246, .12), transparent 52%),
    rgba(13, 18, 28, .91);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

#en-profile-inventory .en-inv-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

#en-profile-inventory .en-inv-head > div:first-child { min-width: 0; flex: 1 1 430px; }
#en-profile-inventory .en-inv-head h2 { margin: 0; color: #fff; font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 950; letter-spacing: -.025em; }
#en-profile-inventory .en-inv-head p { margin: 5px 0 0; max-width: 760px; color: var(--inv-muted); line-height: 1.5; }

#en-profile-inventory .en-inv-pills,
#en-profile-inventory .en-inv-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

#en-profile-inventory .en-inv-pill,
#en-profile-inventory .en-inv-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--inv-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: #dce8f7;
  font-size: .75rem;
  font-weight: 850;
  line-height: 1.15;
}

#en-profile-inventory .en-inv-pill.count { border-color: rgba(59, 130, 246, .55); color: #b9dbff; }

#en-profile-inventory .en-inv-boosts { display: grid; gap: 9px; margin: 0 0 14px; }
#en-profile-inventory .en-inv-boosts[hidden] { display: none !important; }
#en-profile-inventory .en-inv-boost {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(74, 222, 128, .34);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(16, 185, 129, .15), rgba(59, 130, 246, .1));
}
#en-profile-inventory .en-inv-boost.personal { border-color: rgba(167, 139, 250, .38); background: linear-gradient(120deg, rgba(124, 58, 237, .17), rgba(34, 211, 238, .09)); }
#en-profile-inventory .en-inv-boost-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 13px; background: rgba(255, 255, 255, .07); font-size: 20px; }
#en-profile-inventory .en-inv-boost strong,
#en-profile-inventory .en-inv-boost span { display: block; overflow-wrap: anywhere; }
#en-profile-inventory .en-inv-boost span { margin-top: 2px; color: #a9c1d6; font-size: .83rem; }

#en-profile-inventory .en-inv-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) minmax(160px, .6fr) minmax(160px, .6fr);
  gap: 10px;
  margin-bottom: 16px;
}

#en-profile-inventory .en-inv-control {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 13px;
  outline: none;
  background: #0a1321;
  color: #fff;
  font-size: 16px;
}
#en-profile-inventory .en-inv-control:focus { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, .16); }

#en-profile-inventory .en-inv-admin { margin: 0 0 16px; overflow: hidden; border: 1px solid rgba(59, 130, 246, .28); border-radius: 18px; background: rgba(37, 99, 235, .07); }
#en-profile-inventory .en-inv-admin summary { padding: 13px 15px; color: #dbeafe; font-weight: 900; cursor: pointer; }
#en-profile-inventory .en-inv-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 12px; padding: 0 14px 14px; }
#en-profile-inventory .en-inv-admin form { display: grid; gap: 8px; min-width: 0; padding: 12px; border: 1px solid var(--inv-border); border-radius: 14px; background: rgba(2, 6, 14, .45); }
#en-profile-inventory .en-inv-admin-row { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 8px; }

#en-profile-inventory .en-inv-admin button,
#en-profile-inventory .en-inv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  color: #fff;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
}
#en-profile-inventory .en-inv-button.secondary { background: rgba(255, 255, 255, .055); color: #e8f1fb; }
#en-profile-inventory .en-inv-button:focus-visible,
#en-profile-inventory .en-inv-close:focus-visible { outline: 3px solid rgba(56, 189, 248, .7); outline-offset: 2px; }
#en-profile-inventory .en-inv-button:disabled { opacity: .58; cursor: wait; }
#en-profile-inventory .en-inv-admin button.danger { background: #b91c1c; }

#en-profile-inventory .en-inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  width: 100%;
  min-width: 0;
  align-items: stretch;
}

#en-profile-inventory .en-inv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--inv-border);
  border-radius: 19px;
  background: linear-gradient(155deg, rgba(18, 27, 42, .97), rgba(7, 12, 21, .98));
  box-shadow: 0 14px 36px rgba(0, 0, 0, .25);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
#en-profile-inventory .en-inv-card:hover,
#en-profile-inventory .en-inv-card:focus-within { transform: translateY(-2px); border-color: rgba(96, 165, 250, .43); box-shadow: 0 20px 48px rgba(0, 0, 0, .34); }

#en-profile-inventory .en-inv-card-media {
  position: relative;
  display: block;
  width: 100%;
  height: 170px;
  flex: none;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, .17), rgba(2, 6, 14, .82));
}
#en-profile-inventory .en-inv-card-media img,
#en-profile-inventory .en-inv-card-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
#en-profile-inventory .en-inv-card-media.empty { display: grid; place-items: center; color: var(--inv-muted); font-size: .84rem; }
#en-profile-inventory .en-inv-quantity,
#en-profile-inventory .en-inv-rarity { position: absolute; z-index: 2; top: 10px; padding: 5px 9px; border-radius: 999px; color: #fff; font-size: .72rem; font-weight: 950; box-shadow: 0 7px 20px rgba(0, 0, 0, .35); }
#en-profile-inventory .en-inv-quantity { left: 10px; background: rgba(37, 99, 235, .92); }
#en-profile-inventory .en-inv-rarity { right: 10px; max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid rgba(255, 255, 255, .16); background: rgba(17, 24, 39, .88); }

#en-profile-inventory .en-inv-card-body { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 0; padding: 14px; }
#en-profile-inventory .en-inv-kind { color: #7dd3fc; font-size: .7rem; font-weight: 950; letter-spacing: .09em; text-transform: uppercase; }
#en-profile-inventory .en-inv-card h3 { margin: 0; color: #fff; font-size: 1rem; font-weight: 950; line-height: 1.25; overflow-wrap: anywhere; }
#en-profile-inventory .en-inv-card p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--inv-muted); font-size: .84rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
#en-profile-inventory .en-inv-card-actions { display: grid; gap: 8px; margin-top: auto; padding-top: 4px; }
#en-profile-inventory .en-inv-card-actions form { margin: 0; }

#en-profile-inventory .en-inv-empty,
#en-profile-inventory .en-inv-error { width: 100%; padding: 20px; border: 1px dashed rgba(255, 255, 255, .18); border-radius: 15px; background: rgba(255, 255, 255, .035); color: var(--inv-muted); line-height: 1.45; }
#en-profile-inventory .en-inv-error { margin-bottom: 12px; border-style: solid; border-color: rgba(248, 113, 113, .3); background: rgba(127, 29, 29, .12); color: #fecaca; }

#en-profile-inventory .en-inv-modal[hidden],
#en-profile-inventory [hidden] { display: none !important; }
#en-profile-inventory .en-inv-modal { position: fixed; inset: 0; z-index: 100120; display: grid; place-items: center; padding: 14px; }
#en-profile-inventory .en-inv-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#en-profile-inventory .en-inv-dialog { position: relative; width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain; padding: 20px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 24px; background: radial-gradient(640px circle at 0 0, rgba(124, 58, 237, .23), transparent 55%), linear-gradient(145deg, #111a2a, #070c15); box-shadow: 0 35px 90px rgba(0, 0, 0, .65); }
#en-profile-inventory .en-inv-dialog > h2 { margin: 8px 52px 4px 0; color: #fff; font-size: clamp(1.45rem, 5vw, 2rem); }
#en-profile-inventory .en-inv-close { position: absolute; top: 12px; right: 12px; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255, 255, 255, .17); border-radius: 13px; background: rgba(2, 6, 14, .86); color: #fff; font-size: 1.55rem; line-height: 1; cursor: pointer; }
#en-profile-inventory .en-inv-detail-grid { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
#en-profile-inventory .en-inv-detail-media { min-height: 260px; overflow: hidden; border: 1px solid var(--inv-border); border-radius: 18px; background: #050a12; }
#en-profile-inventory .en-inv-detail-media:empty::after { content: "No preview available"; display: grid; min-height: 260px; place-items: center; color: var(--inv-muted); }
#en-profile-inventory .en-inv-detail-media img,
#en-profile-inventory .en-inv-detail-media video { display: block; width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
#en-profile-inventory .en-inv-detail-copy { min-width: 0; padding: 32px 2px 2px; }
#en-profile-inventory .en-inv-detail-copy h2 { margin: 7px 0 8px; color: #fff; font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 950; overflow-wrap: anywhere; }
#en-profile-inventory .en-inv-detail-copy p { color: #b6c6d8; line-height: 1.55; }
#en-profile-inventory .en-inv-detail-status { min-height: 1.4em; color: #a7f3d0 !important; font-weight: 700; }

#en-profile-inventory .en-inv-reel { position: relative; height: 142px; overflow: hidden; margin: 18px 0; border: 1px solid rgba(167, 139, 250, .35); border-radius: 18px; background: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, .18), rgba(2, 6, 14, .97)); }
#en-profile-inventory .en-inv-reel::before,
#en-profile-inventory .en-inv-reel::after { content: ""; position: absolute; z-index: 2; top: 0; bottom: 0; width: 22%; pointer-events: none; }
#en-profile-inventory .en-inv-reel::before { left: 0; background: linear-gradient(90deg, #080e19, transparent); }
#en-profile-inventory .en-inv-reel::after { right: 0; background: linear-gradient(-90deg, #080e19, transparent); }
#en-profile-inventory .en-inv-reel-track { display: flex; align-items: center; gap: 12px; width: max-content; height: 100%; padding: 0 20px; will-change: transform; }
#en-profile-inventory .en-inv-reel-item { display: flex; flex: none; flex-direction: column; justify-content: center; gap: 6px; width: 150px; height: 96px; padding: 11px; border: 1px solid rgba(148, 163, 184, .22); border-radius: 14px; background: linear-gradient(145deg, #17243a, #0c1423); text-align: center; }
#en-profile-inventory .en-inv-reel-item strong { color: #fff; font-size: .8rem; line-height: 1.25; overflow-wrap: anywhere; }
#en-profile-inventory .en-inv-reel-item span { color: #93a8c1; font-size: .67rem; text-transform: uppercase; letter-spacing: .07em; }
#en-profile-inventory .en-inv-reel-item img { display: block; width: 36px; height: 36px; margin: 0 auto; border-radius: 9px; object-fit: cover; }
#en-profile-inventory .en-inv-reel-item.result { border-color: #fbbf24; box-shadow: 0 0 30px rgba(251, 191, 36, .3); }
#en-profile-inventory .en-inv-reel-marker { position: absolute; z-index: 4; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(transparent, #fbbf24 16%, #fbbf24 84%, transparent); box-shadow: 0 0 16px #f59e0b; }
#en-profile-inventory .en-inv-final { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid rgba(74, 222, 128, .34); border-radius: 16px; background: rgba(16, 185, 129, .1); }
#en-profile-inventory .en-inv-final-icon { flex: none; font-size: 2.2rem; }
#en-profile-inventory .en-inv-final-icon img { display: block; width: 56px; height: 56px; border-radius: 13px; object-fit: cover; }
#en-profile-inventory .en-inv-final strong { display: block; color: #fff; font-size: 1.14rem; overflow-wrap: anywhere; }
#en-profile-inventory .en-inv-final p { margin: 3px 0 0; color: #add0be; overflow-wrap: anywhere; }

#en-profile-inventory .en-inv-history { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--inv-border); }
#en-profile-inventory .en-inv-history h3 { margin: 0 0 10px; color: #fff; }
#en-profile-inventory .en-inv-history-list { display: grid; gap: 7px; }
#en-profile-inventory .en-inv-history-row { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(180px, 1.2fr) auto; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: rgba(255, 255, 255, .035); font-size: .82rem; }
#en-profile-inventory .en-inv-history-row > * { min-width: 0; overflow-wrap: anywhere; }
#en-profile-inventory .en-inv-history-row span,
#en-profile-inventory .en-inv-history-row time { color: var(--inv-muted); }
body.en-inventory-modal-open { overflow: hidden; }

#en-profile-roles,
#en-profile-roles * { box-sizing: border-box; }
#en-profile-roles .en-role-grid { min-width: 0; }
#en-profile-roles .en-role-panel { min-width: 0; overflow: hidden; }
#en-profile-roles .en-role-chip-list { align-items: flex-start; }
#en-profile-roles .en-role-chip { max-width: 100%; min-width: 0; }
#en-profile-roles .en-role-chip span { min-width: 0; overflow-wrap: anywhere; }
#en-profile-roles .en-role-add-form select { width: 100%; min-height: 44px; font-size: 16px; }
#en-profile-roles button:focus-visible,
#en-profile-roles select:focus-visible { outline: 3px solid rgba(56, 189, 248, .68); outline-offset: 2px; }

@media (max-width: 760px) {
  #en-profile-inventory { padding: 0 8px; }
  #en-profile-inventory .en-inv-shell { padding: 15px; border-radius: 19px; }
  #en-profile-inventory .en-inv-head { display: grid; gap: 12px; }
  #en-profile-inventory .en-inv-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  #en-profile-inventory .en-inv-pill { justify-content: center; min-width: 0; text-align: center; }
  #en-profile-inventory .en-inv-filters,
  #en-profile-inventory .en-inv-admin-grid,
  #en-profile-inventory .en-inv-detail-grid { grid-template-columns: 1fr; }
  #en-profile-inventory .en-inv-admin-row { grid-template-columns: 78px minmax(0, 1fr); }
  #en-profile-inventory .en-inv-admin-row button { grid-column: 1 / -1; }
  #en-profile-inventory .en-inv-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 225px), 1fr)); }
  #en-profile-inventory .en-inv-detail-media,
  #en-profile-inventory .en-inv-detail-media img,
  #en-profile-inventory .en-inv-detail-media video { min-height: 210px; max-height: 300px; }
  #en-profile-inventory .en-inv-detail-copy { padding-top: 0; }
  #en-profile-inventory .en-inv-history-row { grid-template-columns: 1fr; gap: 3px; }

  #en-profile-roles.en-role-manager { padding: 0 7px !important; }
  #en-profile-roles .en-role-shell { padding: 15px !important; border-radius: 19px !important; }
  #en-profile-roles .en-role-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }
  #en-profile-roles .en-role-panel { width: 100%; padding: 14px !important; }
  #en-profile-roles .en-role-add-form { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: end !important; width: 100%; }
  #en-profile-roles .en-role-chip-list { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #en-profile-roles .en-role-chip { width: 100%; justify-content: space-between; border-radius: 14px !important; padding-left: 9px !important; }
}

@media (max-width: 430px) {
  #en-profile-inventory .en-inv-pills { grid-template-columns: 1fr; }
  #en-profile-inventory .en-inv-grid { grid-template-columns: 1fr; }
  #en-profile-inventory .en-inv-card-media { height: 190px; }
  #en-profile-inventory .en-inv-dialog { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); padding: 14px; border-radius: 18px; }
  #en-profile-inventory .en-inv-close { top: 9px; right: 9px; }
  #en-profile-inventory .en-inv-reel { height: 124px; }
  #en-profile-inventory .en-inv-reel-item { width: 132px; height: 84px; }
  #en-profile-inventory .en-inv-boost { align-items: flex-start; }
  #en-profile-inventory .en-inv-boost-icon { width: 36px; height: 36px; }
  #en-profile-roles .en-role-chip-list { grid-template-columns: 1fr; }
  #en-profile-roles .en-role-add-form { grid-template-columns: 1fr; }
  #en-profile-roles .en-role-add-form button { width: 100%; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  #en-profile-inventory .en-inv-card,
  #en-profile-inventory .en-inv-reel-track { animation: none !important; transition: none !important; }
}
