/* Layout: grouped sidebar navigation, breadcrumb top bar and one page structure
   (eyebrow, title, description, then tabs, filters and tables). Loaded last. */
.app-shell {
  grid-template:
    'rail top' 56px
    'rail main' minmax(0, 1fr)
    / 232px minmax(0, 1fr);
  height: 100dvh;
  overflow: hidden;
  transition: none;
}

/* Sidebar */
.nav-rail {
  grid-area: rail;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid #343434;
  background: #1c1c1c;
}
.nav-rail .brand {
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid #343434;
}
.nav-rail .brand img {
  width: 24px;
  height: 24px;
}
.nav-rail .brand small {
  overflow: hidden;
  max-width: 150px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-nav {
  display: flex;
  flex: 1 0 auto;
  order: 0;
  flex-direction: column;
  gap: 18px;
  padding: 16px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-group__label {
  margin: 0 0 6px;
  padding: 0 10px;
  color: #8a8a8a;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.workspace-nav button {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #bdbdbd;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}
.workspace-nav button:hover:not([aria-current='page']) {
  background: #262626;
  border-color: transparent;
  color: var(--text);
}
.workspace-nav button[aria-current='page'] {
  background: #2c2c2c;
  border-color: #3d3d3d;
  color: #f3f3f3;
  box-shadow: none;
}
.nav-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-rail__foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-top: 1px solid #343434;
  color: var(--muted);
  font-size: 11px;
}

/* Top bar */
.topbar {
  grid-area: top;
  grid-column: auto;
  height: 56px;
  padding: 0 20px;
}
.breadcrumb {
  min-width: 0;
}
.breadcrumb ol {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.breadcrumb li {
  overflow: hidden;
  text-overflow: ellipsis;
}
.breadcrumb li + li::before {
  content: '/';
  margin-right: 8px;
  color: #5a5a5a;
}
.breadcrumb li:last-child:not([hidden]),
.breadcrumb li[aria-current='page']:has(+ li[hidden]) {
  color: var(--text);
}

.workspace {
  grid-area: main;
  overflow-y: auto;
}

/* Page header: eyebrow, title, one-line description */
.page-header {
  margin-bottom: 22px;
}
.page-header h1 {
  margin: 6px 0;
  font-size: 1.8rem;
}
.page-header .muted {
  margin: 0;
}

/* Bots list, Trades and the bot page */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 22px;
}
.bots-view .empty-state {
  min-height: 0;
  padding-top: 24px;
}
.trades-tabs {
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.trades-tabs button {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  padding-inline: 14px;
  white-space: nowrap;
}
.page-header > .button {
  flex-shrink: 0;
  white-space: nowrap;
}
.trades-view .catalog-toolbar label {
  display: grid;
  gap: 7px;
  min-width: 220px;
  color: var(--muted);
  font-size: 12px;
}
.fleet-page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 30px;
}
.fleet-page #bot-content {
  max-width: none;
  padding: 0;
}
.back-link {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}
.back-link:hover {
  color: var(--text);
}
#bots-body tr,
#trades-body tr {
  cursor: pointer;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template:
      'top' auto
      'rail' auto
      'main' minmax(0, 1fr)
      / minmax(0, 1fr);
  }
  .topbar {
    height: auto;
    min-height: 52px;
  }
  .nav-rail {
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid #343434;
  }
  .nav-rail .brand,
  .nav-rail__foot,
  .nav-group__label {
    display: none !important;
  }
  .workspace-nav {
    flex-direction: row;
    gap: 2px;
    padding: 6px 10px;
    overflow-x: auto;
  }
  .nav-group {
    flex-direction: row;
  }
  .workspace-nav button {
    width: auto;
    white-space: nowrap;
  }
  .fleet-page {
    padding: 20px 16px;
  }
  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .breadcrumb {
    display: none;
  }
}

/* SteamBotic components: compact light selection, quiet surfaces and outline badges. */
@media (min-width: 981px) {
  .app-shell {
    grid-template-columns: 216px minmax(0, 1fr);
  }
}
.nav-group__label {
  font-size: 10px;
  letter-spacing: 0.12em;
}
.workspace-nav button {
  min-height: 32px;
  border: 0;
  color: #d0d0d0;
}
.workspace-nav button[aria-current='page'] {
  background: #282828;
}

.breadcrumb ol {
  gap: 24px;
}
.breadcrumb li {
  position: relative;
  overflow: visible;
}
.breadcrumb li + li::before {
  content: '›';
  position: absolute;
  top: 50%;
  left: -15px;
  margin: 0;
  transform: translateY(-52%);
  color: #6a6a6a;
}
.breadcrumb li[aria-current='page']:has(+ li[hidden]),
.breadcrumb li:last-child:not([hidden]) {
  padding: 4px 10px;
  border: 1px solid #3a3a3a;
  border-radius: 7px;
  color: var(--text);
}

.page-header h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.page-header .eyebrow {
  font-size: 11px;
  letter-spacing: 0.1em;
}

.tabs {
  gap: 6px;
  width: auto;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.tabs button {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #c8c8c8;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.tabs button:hover:not([aria-selected='true']) {
  background: #222;
  color: var(--text);
}
.tabs button[aria-selected='true'] {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
  color: var(--accent-ink);
}

.badge {
  min-height: 0;
  padding: 1px 7px;
  margin: 0;
  border: 1px solid #4a4a4a;
  border-radius: 999px;
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
}
.badge--success {
  border-color: #4f7a5d;
  background: rgb(161 210 178 / 6%);
  color: #a9d6b8;
}
.badge--warning {
  border-color: #7a6440;
  background: rgb(221 194 143 / 6%);
  color: #e2c99d;
}
.badge--danger {
  border-color: #7d4a4d;
  background: rgb(237 170 170 / 6%);
  color: #f0b4b4;
}
.badge--shared {
  border-color: #48607f;
  background: rgb(178 203 237 / 6%);
  color: #b2cbed;
}
.badge--muted,
.badge--outline {
  border-color: #474747;
  background: transparent;
  color: #bdbdbd;
}
.offer-status__badges {
  align-items: center;
}

.trade-origin {
  min-width: 160px;
  max-width: 240px;
}
.trade-origin__actor {
  display: block;
  margin-top: 5px;
  color: #c8c8c8;
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}
.badge--origin-api {
  color: #b2cbed;
  border-color: #48607f;
}
.badge--origin-account {
  color: #c8bde7;
  border-color: #615674;
}
.badge--origin-marketplace {
  color: #a1d2b2;
  border-color: #4f6b58;
}
.badge--origin-steam,
.badge--origin-steambotic {
  color: #c8c8c8;
  border-color: #505050;
}
.trade-origin-summary {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid #393939;
  border-radius: 8px;
}
.trade-origin-summary__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  overflow-wrap: anywhere;
}
.trade-origin-summary > p {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.5;
}
.activity-origin {
  overflow-wrap: anywhere;
}
.offer-status__badges .subline {
  flex-basis: 100%;
  max-width: none;
  margin: 0;
  font-size: 11px;
}

.panel {
  border-color: var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: none;
}
.panel__head {
  min-height: 0;
  padding: 18px 20px;
}
.panel h3 {
  font-size: 15px;
}
thead,
thead th {
  background: transparent;
}
thead th {
  padding: 12px 16px;
  color: #9e9e9e;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
}
tbody td {
  padding: 14px 16px;
  font-size: 13px;
}
tbody tr:hover {
  background: #232323;
}

.catalog-toolbar {
  align-items: end;
  gap: 10px;
  padding: 16px;
}
.catalog-toolbar input,
.catalog-toolbar select {
  min-height: 38px;
}
.catalog-results {
  padding: 14px 20px;
  border-bottom: 1px solid #333;
  font-size: 12px;
}
.catalog-results > span:first-child {
  color: var(--text);
  font-weight: 500;
}
.fleet-filter-bar {
  padding: 16px;
  border-color: #333;
  background: #1e1e1e;
}
.fleet-filter-bar input,
.fleet-filter-bar .inventory-select-trigger {
  height: 38px;
}
.stat-row div,
.stat-row div + div {
  padding: 12px 14px;
  border-color: #333;
  background: #1e1e1e;
  box-shadow: none;
}
.stat-row strong {
  font-size: 15px;
}

/* Trade, workspace settings, workspaces and account open as pages inside the main area. */
.page-view {
  max-width: 1600px;
  margin: 0 auto;
  padding: 30px;
}
#page-view > .dialog--page {
  position: static;
  display: block;
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}
#page-view > .dialog--page .dialog__form {
  max-height: none;
}
#page-view > .dialog--page .dialog__head {
  position: static;
  padding: 0 0 22px;
  border: 0;
  background: transparent;
}
#page-view > .dialog--page .dialog__head h2 {
  margin: 6px 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
#page-view > .dialog--page .dialog__head .eyebrow {
  margin-bottom: 0;
  font-size: 11px;
  letter-spacing: 0.1em;
}
#page-view > .dialog--page .dialog__description {
  margin: 0;
  font-size: 13px;
}
#page-view > .dialog--page .dialog__head [data-close-dialog] {
  display: none;
}
#page-view > .dialog--page .dialog__body {
  overflow: visible;
  padding: 24px;
  border: 1px solid #333;
  border-radius: 12px;
  background: #1e1e1e;
}
#page-view > .dialog--page .dialog__head + .tabs + .dialog__body,
#page-view > .dialog--page .tabs + .dialog__body {
  margin-top: 0;
}
#page-view > .dialog--page .dialog__foot {
  position: static;
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

/* Trades filter card: search, bot and status in one row */
.filter-card {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px;
  overflow: visible;
}
.filter-card .search {
  flex: 1 1 280px;
  margin: 0;
}
.filter-card .search input {
  height: 38px;
}
.filter-card > label:not(.search) {
  flex: 0 0 220px;
}
.filter-card .inventory-select-trigger {
  height: 38px;
}
@media (max-width: 980px) {
  .page-view {
    padding: 20px 16px;
  }
  .filter-card > label:not(.search) {
    flex: 1 1 160px;
  }
}

/* Inventory: holdings, breakdown and transfers sit in the same cards as other tables */
#fleet-inventory-results.panel {
  overflow: hidden;
}
#fleet-inventory-results > footer {
  padding: 12px 20px;
  border-top: 1px solid #333;
}

/* Home: bot availability */
.availability-now {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 4px 0 14px;
  font-size: 12px;
}
.availability-now__entry {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.availability-now__entry strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.status-dot--muted {
  background: #6f6f6f;
}

/* Home, laid out like the SkinsOne dashboard */
.home-view {
  gap: 18px;
}
.home-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}
.home-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.home-header p {
  margin: 0;
  font-size: 13px;
}
.home-header .home-health {
  margin-top: 4px;
  color: #8f8f8f;
  font-size: 12px;
}
.home-header__actions {
  display: flex;
  flex-shrink: 0;
  gap: 10px;
  align-items: center;
}
.home-refresh {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d0d0d0;
  cursor: pointer;
}
.home-refresh:hover {
  background: #262626;
}
.home-refresh .nav-icon {
  width: 18px;
  height: 18px;
}
.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid #333;
  border-radius: 9px;
  background: #1c1c1c;
}
.segmented button {
  min-height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #a8a8a8;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.segmented button:hover:not([aria-pressed='true']) {
  color: var(--text);
}
.segmented button[aria-pressed='true'] {
  background: var(--accent);
  color: var(--accent-ink);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.kpi-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 0 0;
  border: 1px solid #333;
  border-radius: 12px;
  background: #1e1e1e;
}
.kpi-card__label,
.kpi-card__value,
.kpi-card__detail {
  padding: 0 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kpi-card__label {
  color: #a8a8a8;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kpi-card__value {
  margin-top: 10px;
  font-size: 21px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.kpi-card__detail {
  margin-top: 4px;
  color: #9c9c9c;
  font-size: 12px;
}
.kpi-card__spark {
  height: 56px;
  margin-top: 10px;
}
.sparkline {
  display: block;
}

.chart-card {
  padding: 20px;
  border: 1px solid #333;
  border-radius: 12px;
  background: #1e1e1e;
}
.chart-card__head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.chart-card__head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}
.chart-card__head p {
  margin: 0;
  font-size: 12.5px;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 6px;
  color: #bdbdbd;
  font-size: 12px;
}
.chart-legend__key {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.chart-legend__swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.chart-area {
  min-width: 0;
}
.chart-empty {
  margin: 0;
  padding: 40px 0;
  text-align: center;
  font-size: 13px;
}
.line-chart-v2 {
  display: block;
  overflow: visible;
}
.line-chart-v2__grid {
  stroke: #333;
  stroke-dasharray: 3 4;
}
.line-chart-v2__label {
  fill: #8c8c8c;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.line-chart-v2__line {
  fill: none;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.line-chart-v2__guide {
  stroke: #555;
  stroke-dasharray: 2 3;
}
.line-chart-v2__hit {
  fill: transparent;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card,
#home-value-cards .value-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: none;
  color: var(--text);
  text-align: left;
}
#home-value-cards .value-card::before,
#home-value-cards .value-card::after {
  display: none;
}
#home-value-cards button.value-card {
  cursor: pointer;
}
#home-value-cards button.value-card:hover {
  border-color: #474747;
}
.stat-card__label,
#home-value-cards .value-card__label {
  color: #bdbdbd;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.stat-card__value,
#home-value-cards .value-card__value {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stat-card__detail,
#home-value-cards .value-card__detail {
  margin-top: 6px;
  color: #9c9c9c;
  font-size: 12px;
}
.chart-card .unlock-schedule {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 1400px) {
  .kpi-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .kpi-row,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-header,
  .chart-card__head {
    flex-direction: column;
  }
}
.home-view > .home-attention {
  position: static;
  max-height: 420px;
  border-color: #333;
  background: #1e1e1e;
}

/* Admin pass over every remaining page: one set of fields, cards, headers and dialogs */
:root {
  --admin-card: var(--panel);
  --admin-field: #1a1a1a;
  --admin-line: var(--line);
}
.workspace input[type='search'],
.workspace input[type='text'],
.workspace input[type='number'],
.workspace input[type='url'],
.workspace input[type='password'],
.workspace textarea,
.workspace .inventory-select-trigger {
  min-height: 38px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: var(--admin-field);
  color: var(--text);
  font-size: 13px;
  box-shadow: none;
}
.workspace input:focus-visible,
.workspace textarea:focus-visible,
.workspace .inventory-select-trigger:focus-visible {
  border-color: #5a6f94;
  outline: 2px solid rgb(159 185 232 / 35%);
  outline-offset: 0;
}
.workspace .inventory-select-trigger {
  padding: 0 34px 0 12px;
  text-align: left;
}

/* Bot page header and summary */
.bot-heading {
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  background: none;
}
.bot-heading h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.bot-summary {
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: var(--admin-card);
}
.bot-summary .section-heading h3 {
  font-size: 15px;
  font-weight: 600;
}
.summary-cards {
  gap: 12px;
}
.summary-card {
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: #1a1a1a;
  box-shadow: none;
}
.summary-card span {
  color: #bdbdbd;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}
.summary-card strong {
  font-size: 22px;
  font-weight: 600;
}

/* Bot tab panels: card header, then an inline filter row without stacked labels */
.panel__head {
  align-items: center;
  background: none;
}
.panel__head p {
  margin-top: 4px;
  color: #9c9c9c;
  font-size: 12.5px;
}
.count {
  padding: 1px 8px;
  border-color: #3d3d3d;
  background: transparent;
  color: #a8a8a8;
  font-size: 11px;
}
.panel__actions > label,
.inventory-filters > label,
.activity-toolbar > label,
.catalog-toolbar > label {
  display: block;
  margin: 0;
  font-size: 0;
}
.panel__actions > label > *,
.inventory-filters > label > *,
.activity-toolbar > label > *,
.catalog-toolbar > label > * {
  font-size: 13px;
}
.activity-toolbar > label > span:not(.sr-only) {
  display: none;
}
.inventory-filters,
.activity-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 14px 20px;
  border-bottom: 1px solid var(--admin-line);
  background: none;
}
.inventory-filters > .inventory-search,
.activity-toolbar > .search {
  flex: 1 1 280px;
  margin: 0;
}
.inventory-filters > .inventory-search input,
.activity-toolbar > .search input {
  width: 100%;
}
.inventory-filters > label:not(.inventory-search),
.activity-toolbar > label:not(.search) {
  flex: 0 0 220px;
}
.panel__actions > label {
  width: 180px;
}
.selection-count {
  color: #9c9c9c;
  font-size: 12px;
}

/* Prices */
.catalog-sync {
  gap: 12px;
}
.catalog-feed {
  padding: 18px 20px;
  border-color: var(--admin-line);
  background: var(--admin-card);
}
#catalog-schedule {
  margin: 12px 0 18px;
}
.catalog-toolbar > label:not(.search) {
  flex: 0 0 200px;
}

/* Workspace settings, Clients & workspaces, and Account pages */
#page-view > .dialog--page .tabs {
  margin: 0 0 16px;
}
#page-view > .dialog--page .form-section {
  border-color: var(--admin-line);
}
#page-view > .dialog--page .form-section h3 {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.management-search {
  color: #9c9c9c;
  font-size: 12px;
}

/* Dialogs that stay modal (add bot, edit bot, create offer, confirmations) */
.dialog {
  border-color: var(--line-bright);
  border-radius: 16px;
  background: var(--admin-card);
}
.dialog__head,
.trade-dialog .dialog__head {
  padding: 22px 26px 18px;
  border-color: var(--admin-line);
  background: var(--admin-card);
}
.dialog h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.dialog__head .eyebrow {
  font-size: 11px;
  letter-spacing: 0.1em;
}
.dialog__body {
  padding: 22px 26px 26px;
}
.dialog__foot {
  padding: 16px 26px;
  border-color: var(--admin-line);
  background: #1b1b1b;
}
.dialog input:not([type='checkbox'], [type='radio']),
.dialog textarea,
.dialog select {
  border-color: var(--admin-line);
  border-radius: 8px;
  background: var(--admin-field);
}
.dialog .form-section {
  border-color: var(--admin-line);
}
.log-entry > .badge {
  justify-self: start;
}
.log-entry {
  border-color: var(--admin-line);
}
#page-view > .dialog--page .settings-body .dialog__foot {
  margin: 22px -24px -24px;
  padding: 14px 24px;
  border-top: 1px solid var(--admin-line);
  border-radius: 0 0 12px 12px;
  background: #1b1b1b;
}
#page-view > .dialog--page .settings-tabs {
  margin: 0 0 16px;
}

/* Create offer needs room for both inventories side by side */
#trade-dialog {
  width: min(1440px, calc(100vw - 48px));
  max-width: none;
}
.filter-card > label:has(#trades-sort) {
  flex-basis: 210px;
}
@media (min-width: 1100px) {
  #trade-dialog .partner-inventory.span-2 {
    grid-column: span 1;
    min-width: 0;
  }
}
#trade-dialog .partner-inventory table {
  min-width: 560px;
}
#trade-dialog .partner-inventory > label,
#trade-dialog .partner-inventory > p {
  display: block;
  margin: 12px 0;
  padding: 0 16px;
}
#trade-dialog .partner-inventory > label select {
  width: 100%;
  margin-top: 6px;
}

/* One page anatomy for Bots, Trades, Inventory and Prices:
   header → stat cards → tabs → filter card → table card */
.catalog-view > .page-header {
  margin-bottom: 20px;
}
.catalog-view > .stat-grid,
.catalog-view > .tabs,
.catalog-view > .filter-card,
#bots-list > .filter-card,
.catalog-view > .catalog-sync {
  margin: 0 0 16px;
}
.table-card__head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--admin-line);
}
.table-card__head strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.table-card__head small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}
.table-card {
  overflow: hidden;
}
.table-card > .catalog-error,
.table-card > .error-text {
  margin: 0;
  padding: 12px 20px 0;
}
.fleet-filter-bar.filter-card {
  display: flex;
  grid-template-columns: none;
  align-items: center;
}
.fleet-filter-bar.filter-card > label {
  display: block;
  flex: 0 0 190px;
  font-size: 0;
}
.fleet-filter-bar.filter-card > label > * {
  font-size: 13px;
}
.fleet-filter-bar.filter-card > label:first-child {
  flex: 1 1 260px;
}
.fleet-filter-bar.filter-card input {
  height: 38px;
}
.home-view > .home-attention:first-child {
  max-height: 300px;
  margin-bottom: 2px;
}
@media (max-width: 980px) {
  .fleet-filter-bar.filter-card > label {
    flex: 1 1 160px;
  }
}
/* With nothing to fix, Needs attention shrinks to its one-line summary. */
.home-view > .home-attention[data-has-issues='false'] > :not(summary) {
  display: none;
}

.request-failure {
  min-width: 0;
  margin-block: 1rem;
}
.request-failure h4 {
  margin: 0 0 0.75rem;
}
.request-failure dd {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.request-failure-preview {
  flex-basis: 100%;
  min-width: 0;
}
.request-failure-preview summary {
  cursor: pointer;
  padding-block: 0.4rem;
}
#activity-error {
  padding: 1rem 1.5rem;
}

.button--primary {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 30%);
}
.trade-item-card,
.price-risk-summary {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.metric {
  border-color: var(--line);
  border-radius: 16px;
  background: var(--panel);
}
:is(.value-card, .stat-card, .metric, .price-direction-option) {
  position: relative;
  isolation: isolate;
}
/* The decorative overlay never receives clicks or changes the layout. */
:is(.value-card, .stat-card, .metric, .price-direction-option)::after,
#home-value-cards .value-card::after {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  height: auto;
  width: auto;
  filter: none;
  border: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--spotlight-x, 50%) var(--spotlight-y, 0%),
    rgb(236 236 236 / 7%),
    transparent 45%
  );
  opacity: 0;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :is(.value-card, .stat-card, .metric, .price-direction-option)::after {
    transition: opacity 250ms ease;
  }
  :is(.value-card, .stat-card, .metric, .price-direction-option):hover::after,
  #home-value-cards .value-card:hover::after {
    opacity: 1;
  }
}
.price-directions-switcher {
  gap: 14px;
  margin-bottom: 18px;
}
.price-direction-option {
  min-width: 0;
  gap: 8px;
  padding: 18px;
  border-color: var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
}
.price-direction-option:hover {
  border-color: var(--line-bright);
}
.price-direction-option[aria-pressed='true'] {
  color: var(--text);
  border-color: #777;
  background: var(--panel-raised);
  box-shadow: inset 0 0 0 1px rgb(236 236 236 / 8%);
}
.price-direction-option > span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.price-direction-option > strong {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.price-direction-option > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.price-source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}
.price-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #bdbdbd;
  background: var(--panel);
  font-size: 11px;
}
.price-source-chip::before {
  content: '';
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-bright);
}
.price-source-chip--primary::before {
  background: var(--text);
}
.price-risk-summary {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin: 18px 0;
  padding: 22px;
}
.price-risk-gauge {
  width: 100%;
  max-width: 180px;
  justify-self: center;
  overflow: visible;
}
.price-risk-gauge__track,
.price-risk-gauge__value {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}
.price-risk-gauge__track {
  stroke: var(--panel-soft);
}
.price-risk-gauge__value {
  stroke: var(--danger);
}
.price-risk-score--quiet .price-risk-gauge__value {
  stroke: var(--success);
}
.price-risk-gauge__number {
  fill: var(--text);
  font-size: 22px;
  font-weight: 650;
}
.price-risk-gauge__label {
  fill: var(--muted);
  font-size: 7px;
  letter-spacing: 0.2px;
}
.price-risk-copy > strong {
  color: var(--text);
}
@media (max-width: 600px) {
  .price-direction-option {
    padding: 14px;
  }
  .price-direction-option > strong {
    font-size: 24px;
  }
  .price-risk-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
  }
}

/* Exact-asset details live outside refreshed inventory and offer rows. */
.item-inspect-trigger {
  display: block;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-decoration-color: var(--line-bright);
  text-underline-offset: 3px;
  cursor: pointer;
}
.item-inspect-trigger:hover {
  color: var(--text);
}
.item-phase {
  display: inline-flex;
  margin-top: 6px;
  color: #c9c0ee;
  border-color: #5c537a;
}
.item-detail-dialog {
  width: min(760px, calc(100vw - 32px));
}
.item-detail-overview {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 24px;
}
.item-detail-image {
  width: 160px;
  height: 160px;
  object-fit: contain;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.item-detail-identity {
  flex: 1;
  min-width: 0;
}
.item-detail-identity .item-float {
  width: 100%;
  max-width: 360px;
  margin: 12px 0;
}
.item-detail-dialog .item-inspect-body {
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.item-detail-dialog .item-inspect-body small {
  font-size: 13px;
}
.item-detail-dialog .dialog__foot {
  gap: 18px;
  justify-content: space-between;
}
@media (max-width: 520px) {
  .item-detail-overview {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .item-detail-image {
    align-self: center;
  }
}

.item-attachments {
  margin-top: 12px;
}
.item-attachments-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}
.item-attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 10px;
}
.item-attachment-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}
.item-attachment-image {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.item-attachment-info {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.item-attachment-name {
  font-size: 13px;
  line-height: 1.5;
}
.item-attachment-wear-meter {
  width: 100%;
  max-width: 160px;
  height: 6px;
  accent-color: var(--text-muted);
}

/* Sales: connector card, totals and profit cells */
.sales-connector {
  padding: 18px;
  margin-bottom: 20px;
}
.sales-connector > p {
  margin: 10px 0 14px;
  font-size: 13px;
}
.sales-connector__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}
.sales-connector__fields label {
  display: grid;
  gap: 6px;
  font-size: 12px;
}
.sales-connector__fields:disabled {
  opacity: 0.5;
}
.sales-table td {
  white-space: nowrap;
}
.sales-table .catalog-item-name {
  white-space: normal;
  min-width: 240px;
}

.sales-connector__fields .span-all {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
}
.sales-platform {
  display: grid;
  gap: 4px;
  min-width: 200px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.sales-platform small {
  font-size: 11px;
}

/* Marketplace data stays secondary to the sales and their Steam trades. */
.sales-connector {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.sales-connector .catalog-feed-heading {
  display: flex;
  gap: 12px;
  align-items: center;
}
.sales-connector > p {
  flex: 1;
  margin: 0;
  font-size: 12px;
}
.sales-trade-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 7px;
  font-size: 12px;
}
.sales-table td {
  vertical-align: top;
  padding-top: 16px;
  padding-bottom: 16px;
}
.sales-table td:nth-child(n + 4):nth-child(-n + 7),
.sales-table th:nth-child(n + 4):nth-child(-n + 7) {
  text-align: right;
}
.marketplace-sync {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}
.marketplace-sync__heading {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  grid-column: 1 / -1;
}
.marketplace-sync p {
  margin: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
#marketplace-connection-status {
  grid-column: 1;
}
#marketplace-sync-now {
  grid-column: 2;
  grid-row: 2 / 4;
  align-self: center;
}
@media (max-width: 640px) {
  .sales-connector > p {
    flex-basis: 100%;
  }
  .marketplace-sync {
    grid-template-columns: 1fr;
  }
  #marketplace-sync-now {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}
.sales-trade-links a {
  color: var(--text);
  text-underline-offset: 3px;
  text-decoration-color: var(--text-muted);
}
.sales-trade-links a:hover {
  text-decoration-color: currentColor;
}
.sales-connector__fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 640px) {
  .sales-connector__fields {
    grid-template-columns: 1fr;
  }
}

/* Dashboard navigation follows the mock's compact, grouped rail. */
.workspace-nav {
  gap: 14px;
  padding: 12px 10px 18px;
}

.workspace-nav .nav-group__label {
  margin-block-end: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

.workspace-nav button {
  gap: 9px;
  min-height: 31px;
  border-radius: 7px;
  color: #c4c4c4;
}

.workspace-nav button[aria-current='page'] {
  background: #2c2c2c;
  font-weight: 500;
}

.workspace-nav .nav-icon {
  width: 15px;
  height: 15px;
  stroke-width: 1.7;
}

#workspace-nav-toggle {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

#workspace-nav-toggle:hover {
  background: #262626;
  color: var(--text);
}

#workspace-nav-toggle + .breadcrumb {
  margin-inline-end: auto;
}

@media (min-width: 981px) {
  .app-shell:has(.nav-rail[hidden]) {
    grid-template-columns: 0 minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .nav-rail .workspace-nav {
    flex-direction: column;
    max-height: 46dvh;
    overflow: auto;
  }

  .workspace-nav .nav-group {
    flex-direction: column;
  }

  .workspace-nav .nav-group__label {
    display: block !important;
  }

  .workspace-nav button {
    width: 100%;
    min-height: 38px;
  }
}
