:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-raised: #fafafa;
  --panel-soft: #f5f5f5;
  --line: #eeeeee;
  --line-bright: #d4d4d4;
  --text: #171717;
  --muted: #737373;
  --accent: #171717;
  --accent-ink: #ffffff;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 18px;
  --shadow: 0 18px 50px rgb(0 0 0 / 5%);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 15px;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 85% -15%, rgb(0 0 0 / 2%), transparent 30rem), var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  letter-spacing: -0.025em;
}

.muted {
  color: var(--muted);
}

.app-shell {
  display: grid;
  grid-template: 72px calc(100vh - 72px) / 276px minmax(0, 1fr);
  min-height: 100vh;
}

.topbar {
  position: relative;
  z-index: 5;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 88%);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 26px;
  height: 26px;
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand strong {
  font-family: 'Space Grotesk', Inter, ui-sans-serif, sans-serif;
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.topbar__actions,
.bot-heading__actions,
.panel__actions,
.row-actions,
.dialog__foot > div {
  display: flex;
  gap: 9px;
  align-items: center;
}

.topbar__actions {
  min-width: 0;
}

.environment-pill {
  padding: 6px 9px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-raised);
}

.runtime-stat {
  color: var(--muted);
  font-size: 0.8rem;
}

.button,
.icon-button {
  border: 0;
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  font-weight: 650;
  font-size: 0.83rem;
  border: 1px solid transparent;
  border-radius: 7px;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    transform 120ms ease;
  text-decoration: none;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.button--primary {
  color: var(--accent-ink);
  background: var(--accent);
}

.button--primary:hover:not(:disabled) {
  background: #303030;
}

.button--quiet {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel-raised);
}

.button--quiet:hover:not(:disabled) {
  border-color: var(--line-bright);
  background: var(--panel-soft);
}

.button--danger {
  color: var(--danger);
  border-color: rgb(220 38 38 / 18%);
  background: rgb(220 38 38 / 5%);
}

.button--small {
  min-height: 31px;
  padding: 0 10px;
  font-size: 0.75rem;
  border-radius: 8px;
}

.workspace-access {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 4px 10px 4px 5px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-raised);
  cursor: pointer;
}

.workspace-access:hover {
  border-color: var(--line-bright);
  background: var(--panel-soft);
}

.workspace-access__avatar {
  display: grid;
  width: 31px;
  height: 31px;
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 7px;
  background: var(--accent);
  place-items: center;
}

.workspace-access__copy {
  display: flex;
  min-width: 74px;
  flex-direction: column;
  line-height: 1.12;
}

.workspace-access__copy small {
  color: var(--muted);
  font-size: 0.58rem;
}

.workspace-access__copy strong {
  margin-top: 3px;
  font-size: 0.72rem;
}

.mobile-label {
  display: none;
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #fafafa;
}

.sidebar__head {
  padding: 24px 18px 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sidebar h1,
.dialog h2,
.bot-heading h2,
.panel h3 {
  margin: 0;
  letter-spacing: -0.035em;
  font-family: 'Space Grotesk', Inter, ui-sans-serif, sans-serif;
}

.sidebar h1 {
  font-size: 1.25rem;
}

.fleet-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}

.fleet-summary div {
  min-width: 0;
  padding: 12px;
}

.fleet-summary div + div {
  border-left: 1px solid var(--line);
}

.fleet-summary span,
.fleet-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-summary span {
  color: var(--muted);
  font-size: 0.62rem;
}

.fleet-summary strong {
  margin-top: 6px;
  font-size: 0.78rem;
}

.sidebar__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search {
  display: block;
  margin-top: 10px;
}

.search input,
.dialog input:not([type='checkbox'], [type='radio']),
.dialog textarea {
  width: 100%;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.search input {
  height: 39px;
  padding: 0 12px;
}

input::placeholder,
textarea::placeholder {
  color: #a3a3a3;
}

.bot-list {
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  padding: 0 10px;
  overflow-y: auto;
}

.bot-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 11px 10px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.bot-row:hover {
  background: var(--panel-raised);
}

.bot-row--selected {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: 0 8px 24px rgb(0 0 0 / 5%);
}

.signal {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.signal--success {
  background: var(--success);
  box-shadow: 0 0 9px rgb(22 163 74 / 28%);
}

.signal--warning {
  background: var(--warning);
}

.signal--danger {
  background: var(--danger);
}

.signal--muted {
  background: #a3a3a3;
}

.bot-row__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.bot-row__copy strong,
.bot-row__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-row__copy strong {
  font-size: 0.83rem;
}

.bot-row__copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: capitalize;
}

.empty-inline {
  padding: 20px 10px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.sidebar__foot {
  display: flex;
  justify-content: space-between;
  padding: 15px 18px;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.7rem;
  border-top: 1px solid var(--line);
}

.workspace {
  min-width: 0;
  overflow-y: auto;
}

#bot-content {
  min-width: 0;
  max-width: 1500px;
  padding: 30px;
  margin: 0 auto;
}

.empty-state {
  display: flex;
  width: min(620px, calc(100% - 32px));
  max-width: 620px;
  min-height: calc(100vh - 72px);
  padding: 48px 0;
  margin: auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-state__mark {
  display: grid;
  width: 70px;
  height: 70px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-raised);
  box-shadow: 0 18px 55px rgb(0 0 0 / 5%);
  place-items: center;
}

.empty-state h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  font-family: 'Space Grotesk', Inter, ui-sans-serif, sans-serif;
}

.empty-state p {
  max-width: 470px;
  margin: 10px 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.empty-state > .eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
}

.setup-steps {
  display: grid;
  width: 100%;
  padding: 0;
  margin: 8px 0 24px;
  list-style: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.setup-steps li {
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  align-items: flex-start;
  text-align: left;
}

.setup-steps li + li {
  border-left: 1px solid var(--line);
}

.setup-steps span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: var(--accent);
  font-size: 0.68rem;
  border: 1px solid var(--line-bright);
  border-radius: 7px;
  background: var(--panel-raised);
  place-items: center;
}

.setup-steps strong {
  font-size: 0.72rem;
  line-height: 1.4;
}

.empty-state__actions {
  display: flex;
  gap: 9px;
}

.bot-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.title-line {
  display: flex;
  gap: 12px;
  align-items: center;
}

.bot-heading h2 {
  font-size: 1.85rem;
}

.bot-heading p {
  margin: 7px 0 0;
  font-size: 0.78rem;
}

.bot-heading > div > .eyebrow {
  margin: 0 0 8px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 25px;
}

.metric {
  position: relative;
  min-height: 102px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.metric--accent::after {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 90px;
  height: 90px;
  content: '';
  border-radius: 50%;
  background: rgb(0 0 0 / 3%);
  filter: blur(3px);
}

.metric span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.75rem;
}

.metric strong {
  font-family: 'Space Grotesk', Inter, ui-sans-serif, sans-serif;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.tabs {
  max-width: 100%;
  overflow-x: auto;
  display: flex;
  gap: 3px;
  padding: 4px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-raised);
  width: fit-content;
}

.tabs button {
  min-width: 104px;
  padding: 8px 15px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.tabs button[aria-selected='true'] {
  color: var(--text);
  background: var(--panel-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel__head {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel__title {
  display: flex;
  gap: 10px;
  align-items: center;
}

.panel h3 {
  font-size: 1rem;
}

.panel__head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
}

.count,
.selection-count {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
}

.count {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: #fafafa;
}

td {
  font-size: 0.75rem;
  vertical-align: middle;
}

tbody tr:hover {
  background: rgb(0 0 0 / 1.5%);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.check-column {
  width: 42px;
}

input[type='checkbox'] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.item-name,
.subline {
  display: block;
}

.item-identity {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 260px;
}

.item-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.item-copy {
  min-width: 0;
}

.item-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.subline {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.65rem;
}

.asset-separator {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 999px;
  text-transform: capitalize;
}

.badge--success {
  color: var(--success);
  border-color: rgb(22 163 74 / 18%);
  background: rgb(22 163 74 / 6%);
}

.badge--warning {
  color: var(--warning);
  border-color: rgb(217 119 6 / 18%);
  background: rgb(217 119 6 / 6%);
}

.badge--danger {
  color: var(--danger);
  border-color: rgb(220 38 38 / 18%);
  background: rgb(220 38 38 / 6%);
}

.badge--muted,
.badge--outline {
  color: var(--muted);
  border-color: var(--line);
  background: rgb(0 0 0 / 2%);
}

.badge--outline {
  background: transparent;
}

.empty-table {
  height: 190px;
  color: var(--muted);
  text-align: center;
}

.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  min-height: 54px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.72rem;
  border-top: 1px solid var(--line);
}

.activity-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
}
.activity-toolbar .search {
  flex: 1;
  max-width: 420px;
  margin: 0;
}
.activity-toolbar input,
.activity-toolbar select {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
}
.activity-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.activity-list {
  max-height: min(680px, 70vh);
  min-height: 180px;
  overflow-y: auto;
}

.logs-list {
  max-height: calc(100vh - 360px);
  min-height: 240px;
  overflow: auto;
  background: #fafafa;
}

.log-entry {
  display: grid;
  grid-template-columns: 172px 58px max-content minmax(max-content, 1fr);
  gap: 12px;
  align-items: center;
  min-width: max-content;
  min-height: 38px;
  padding: 7px 14px 7px 11px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid #737373;
  background: var(--panel);
}

.log-entry--info {
  border-left-color: #737373;
}
.log-entry--warn {
  border-left-color: var(--warning);
}
.log-entry--error {
  border-left-color: var(--danger);
}

.log-entry__time {
  font-size: 0.67rem;
}

.log-entry__message {
  font-size: 0.78rem;
  white-space: nowrap;
}

.log-entry__meta {
  color: var(--muted);
  font:
    0.68rem/1.35 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  white-space: nowrap;
}

.developer-docs {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-raised);
}

.developer-docs p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.developer-docs > div:last-child {
  display: flex;
  gap: 8px;
}

@media (max-width: 1180px) {
  .topbar .docs-link {
    display: none;
  }
}

.activity-entry {
  border-bottom: 1px solid var(--line);
}
.activity-entry:last-child {
  border-bottom: 0;
}
.activity-entry__summary {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 145px 66px;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
  cursor: pointer;
  list-style: none;
}
.activity-entry__summary::-webkit-details-marker {
  display: none;
}
.activity-entry__summary:hover,
.activity-entry[open] > summary {
  background: var(--panel-raised);
}
.activity-entry__summary:focus-visible {
  outline: 2px solid var(--line-bright);
  outline-offset: -2px;
}
.activity-entry__summary > .badge {
  justify-self: start;
}
.activity-entry__time {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.activity-entry__time strong {
  font-weight: 500;
}
.activity-entry__time span {
  color: var(--muted);
  font-size: 11px;
}
.activity-entry__title {
  font-size: 14px;
}
.activity-entry__context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.activity-bot {
  color: var(--text);
}
.activity-entry__target {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.activity-entry__message {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.activity-entry--danger .activity-entry__message {
  color: var(--danger);
}
.activity-entry--warning .activity-entry__message {
  color: var(--warning);
}
.activity-entry__expand {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}
.activity-entry__expand::after {
  content: '⌄';
  display: inline-block;
  margin-left: 8px;
}
.activity-entry[open] .activity-entry__expand::after {
  transform: rotate(180deg);
}
.activity-entry__body {
  padding: 0 24px 18px 152px;
  background: var(--panel-raised);
}
.activity-details {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  gap: 9px 16px;
  margin: 0;
  padding-top: 16px;
  font-size: 12px;
  border-top: 1px solid var(--line);
}
.activity-details dt {
  color: var(--muted);
}
.activity-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.activity-entry__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  font-size: 12px;
}
@media (max-width: 800px) {
  .activity-entry__summary {
    grid-template-columns: 86px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px;
  }
  .activity-entry__expand {
    display: none;
  }
  .activity-entry__body {
    padding: 0 16px 16px;
  }
  .activity-toolbar {
    flex-wrap: wrap;
    padding: 12px 16px;
  }
}
@media (max-width: 480px) {
  .activity-entry__summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .activity-entry__time {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
  }
  .activity-toolbar .search {
    min-width: 100%;
  }
  .activity-details {
    grid-template-columns: 95px minmax(0, 1fr);
  }
}

.offer-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-bright);
  text-underline-offset: 3px;
}

.offer-link:hover {
  color: var(--accent);
}

.empty-panel {
  display: grid;
  min-height: 240px;
  color: var(--muted);
  place-items: center;
}

.dialog {
  width: min(520px, calc(100vw - 28px));
  max-height: min(840px, calc(100vh - 28px));
  padding: 0;
  overflow: hidden auto;
  color: var(--text);
  border: 1px solid var(--line-bright);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.dialog--wide {
  width: min(720px, calc(100vw - 28px));
}

.dialog::backdrop {
  background: rgb(0 0 0 / 45%);
  backdrop-filter: blur(5px);
}

.dialog__form {
  padding: 22px;
}

.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.dialog h2 {
  font-size: 1.35rem;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  color: var(--muted);
  font-size: 1.45rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-raised);
  place-items: center;
}

.form-section {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.form-section h3 {
  margin: 0 0 13px;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.dialog label {
  display: block;
  color: #404040;
  font-size: 0.72rem;
  font-weight: 650;
}

.dialog label > span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 450;
}

.dialog input:not([type='checkbox'], [type='radio']),
.dialog textarea {
  display: block;
  min-height: 40px;
  padding: 9px 11px;
  margin-top: 7px;
  resize: vertical;
}

.dialog input:focus,
.dialog textarea:focus {
  border-color: #737373;
}

.selected-summary,
.warning-box {
  padding: 13px 14px;
  margin-bottom: 18px;
  border-radius: 10px;
}

.selected-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 18px;
  align-items: center;
  border: 1px solid var(--line-bright);
  background: var(--panel-raised);
}

.selected-summary span {
  color: var(--muted);
  font-size: 0.7rem;
}

.selected-summary strong {
  font-size: 0.77rem;
  text-align: right;
}

.trade-url-actions,
.partner-inventory__head,
.partner-inventory__head > div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.trade-url-actions {
  min-height: 38px;
}

.partner-inventory {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.partner-inventory__head {
  justify-content: space-between;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-raised);
}

.partner-inventory__head > div {
  min-width: 0;
}

.partner-inventory__table {
  max-height: 310px;
  overflow-y: auto;
}

.partner-inventory__table table {
  min-width: 560px;
}

.partner-inventory__table .empty-table {
  height: 130px;
}

.warning-box {
  color: #92400e;
  font-size: 0.73rem;
  line-height: 1.5;
  border: 1px solid rgb(217 119 6 / 18%);
  background: rgb(217 119 6 / 5%);
}

.dialog__foot {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.dialog__foot p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.45;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  max-width: min(430px, calc(100vw - 44px));
  padding: 13px 16px;
  color: var(--text);
  font-size: 0.78rem;
  border: 1px solid var(--line-bright);
  border-radius: 11px;
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.toast[data-tone='success'] {
  border-color: rgb(22 163 74 / 35%);
}

.toast[data-tone='danger'] {
  border-color: rgb(220 38 38 / 35%);
}

@media (max-width: 1220px) {
  .environment-pill,
  .runtime-stat {
    display: none;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template: 68px auto minmax(0, 1fr) / 1fr;
  }

  .topbar {
    grid-row: 1;
    padding: 0 14px;
  }

  .sidebar {
    grid-row: 2;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar__head {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
  }

  .fleet-summary,
  .sidebar__section-head {
    display: none;
  }

  .search {
    width: min(320px, 52vw);
    margin: 0;
  }

  .bot-list {
    display: flex;
    gap: 6px;
    padding: 0 14px 12px;
    overflow-x: auto;
  }

  .bot-row {
    min-width: 180px;
  }

  .sidebar__foot {
    display: none;
  }

  .workspace {
    grid-row: 3;
    overflow: visible;
  }

  .empty-state {
    min-height: 55vh;
  }

  #bot-content {
    padding: 22px 14px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .brand span,
  .topbar #refresh-all {
    display: none;
  }

  .topbar__actions {
    gap: 6px;
  }

  .topbar .button {
    padding: 0 10px;
  }

  .desktop-label {
    display: none;
  }

  .mobile-label {
    display: inline;
  }

  .workspace-access {
    padding-right: 5px;
  }

  .workspace-access__copy {
    display: none;
  }

  .bot-heading,
  .panel__head,
  .dialog__foot {
    align-items: stretch;
    flex-direction: column;
  }

  .bot-heading__actions,
  .panel__actions {
    flex-wrap: wrap;
  }

  .metrics {
    gap: 8px;
  }

  .setup-steps {
    grid-template-columns: 1fr;
  }

  .setup-steps li + li {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric {
    min-height: 86px;
    padding: 14px;
  }

  .metric strong {
    font-size: 1.4rem;
  }

  .tabs {
    width: 100%;
  }

  .tabs button {
    min-width: max-content;
    flex: 1 0 auto;
  }

  .form-grid--2 {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .dialog__foot > div {
    justify-content: flex-end;
  }
}

/* Shared form and detail primitives keep every operator flow consistent. */
.dialog input:not([type='checkbox'], [type='radio']),
.dialog textarea,
.dialog select {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line-bright);
  border-radius: 8px;
}
.field-help {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}
.dialog__head {
  gap: 20px;
}
.dialog__head .icon-button {
  flex-shrink: 0;
}
.dialog__form {
  padding: 26px;
}
.dialog__foot {
  gap: 16px;
}
.dialog__foot .button {
  white-space: nowrap;
}
.form-feedback {
  padding: 12px 14px;
  margin: 16px 0;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.85rem;
  line-height: 1.5;
}
.topbar {
  gap: 24px;
}
.topbar__actions {
  flex-shrink: 0;
}
.brand {
  flex-shrink: 0;
}
.bot-heading {
  gap: 20px;
}
.bot-heading > div:first-child {
  min-width: 0;
}
.bot-heading h2,
#bot-steam-id {
  overflow-wrap: anywhere;
}
.bot-heading__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.offer-status {
  min-width: 220px;
  max-width: 310px;
}
.offer-status__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.offer-status__note {
  margin: 10px 0 0;
  white-space: normal;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}
.offer-details {
  margin-top: 10px;
  font-size: 0.8rem;
}
.offer-details summary,
.offer-items summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}
.offer-details dl {
  display: grid;
  gap: 5px;
  margin: 12px 0;
}
.offer-details dt {
  color: var(--muted);
}
.offer-details dd {
  margin: 0 0 7px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.offer-items {
  min-width: 155px;
  max-width: 340px;
}
.offer-items[open] {
  min-width: 240px;
}
.offer-items__group {
  margin-top: 16px;
}
.offer-items__group h4 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--muted);
}
.offer-items .item-identity {
  margin: 10px 0;
}
.offer-items .item-name {
  white-space: normal;
}
.offer-items .item-icon {
  width: 36px;
  height: 36px;
}
.offer-status .badge {
  margin: 0;
}
.table-wrap {
  overscroll-behavior-x: contain;
}
.tabs button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 1100px) {
  .bot-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .bot-heading__actions {
    justify-content: flex-start;
  }
}
@media (max-width: 680px) {
  .topbar {
    gap: 8px;
    padding: 0 12px;
  }
  .dialog__form {
    padding: 20px;
  }
  .dialog__foot > div {
    flex-wrap: wrap;
  }
  .offer-status {
    min-width: 200px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.developer-docs {
  flex-direction: column;
  align-items: stretch;
}
.developer-docs > div:last-child {
  flex-wrap: wrap;
}
.confirmation-message {
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
#offers-body td {
  vertical-align: top;
}

@media (min-width: 681px) and (max-width: 980px) {
  .topbar {
    gap: 12px;
  }
  .topbar__actions {
    gap: 6px;
  }
  .workspace-access__copy {
    display: none;
  }
  .workspace-access {
    padding-right: 5px;
  }
}

.offer-row {
  cursor: pointer;
}
.offer-row:focus-within {
  background: var(--panel-soft, #f5f5f5);
}
.offer-open {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.offer-open:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 5px;
  border-radius: 2px;
}
.trade-dialog {
  width: min(920px, calc(100vw - 28px));
}
.trade-dialog .dialog__head {
  position: sticky;
  top: -22px;
  z-index: 1;
  background: var(--panel);
  padding: 14px 0;
}
.trade-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  margin: 22px 0 0;
}
.trade-facts dt {
  color: var(--muted);
  font-size: 0.76rem;
  margin-bottom: 5px;
}
.trade-facts dd {
  margin: 0;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}
.trade-item-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}
.trade-item-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  min-width: 0;
}
.trade-item-card h3,
.trade-section h3 {
  font-size: 0.95rem;
  margin: 0 0 14px;
}
.trade-item + .trade-item {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}
.trade-item .item-identity {
  min-width: 0;
  align-items: flex-start;
}
.trade-item .item-copy {
  overflow-wrap: anywhere;
}
.trade-item .item-pricing {
  min-width: 0;
  max-width: none;
  margin-top: 12px;
}
.trade-section {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 24px;
}
.trade-section > p,
.trade-overview > p {
  font-size: 0.84rem;
  line-height: 1.6;
}
#offer-detail-actions {
  width: 100%;
  justify-content: space-between;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .trade-facts,
  .trade-item-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

.offer-reason {
  max-width: 280px;
  white-space: normal;
  flex-basis: 100%;
}

.settings-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.settings-fields:disabled {
  opacity: 0.55;
}
.settings-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.settings-checkbox input {
  width: auto;
}

.inventory-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}
.inventory-filters label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.inventory-search {
  flex: 1 1 260px;
}
.inventory-filters input,
.inventory-filters select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

.attention-panel {
  margin-bottom: 24px;
}
.attention-panel > summary {
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
}
.panel-note {
  margin: 0;
  padding: 0 24px 18px;
  color: var(--muted);
}
.bot-summary {
  margin: 0 0 22px;
}
.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.section-heading h3 {
  margin: 0;
}
.section-heading .muted {
  font-size: 12px;
}
.summary-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
}
.summary-card:hover {
  background: var(--panel-raised);
  border-color: var(--line-bright);
}
.summary-card span {
  color: var(--muted);
  font-size: 12px;
}
.summary-card strong {
  font-size: 18px;
}
.freshness {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 8px;
}
.sync-status {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
}
.sync-label {
  color: var(--muted);
  font-size: 12px;
}
.sync-time {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sync-state {
  font-size: 11px;
  color: var(--muted);
}
.sync-status--warning {
  color: var(--warning);
}
.sync-detail {
  flex-basis: 100%;
  color: var(--muted);
  font-weight: normal;
}
.home-sync-time .sync-label {
  display: none;
}
.sync-status--warning .sync-state {
  color: var(--warning);
  font-weight: 600;
}
.swarm-name {
  overflow-wrap: anywhere;
}
.brand small {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bot-errors {
  margin-bottom: 10px;
}
.errors-clear {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.error-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--notice-color) 35%, transparent);
  border-left: 3px solid var(--notice-color);
  border-radius: 8px;
  background: color-mix(in srgb, var(--notice-color) 8%, var(--panel));
  font-size: 13px;
  overflow-wrap: anywhere;
}
.error-notice + .error-notice {
  margin-top: 6px;
}
.error-notice--warning {
  --notice-color: var(--warning);
}
.error-notice--error {
  --notice-color: var(--danger);
}
.error-notice strong {
  color: var(--notice-color);
}
.error-notice small {
  margin-left: auto;
  color: var(--muted);
}
.operations-list {
  overflow-wrap: anywhere;
}
.operation-row {
  padding: 20px 24px;
  border-top: 1px solid var(--line);
}
.operation-row > .button {
  display: block;
  margin-top: 12px;
}
.operation-row p {
  margin: 8px 0;
}
.webhook-payload-details {
  margin-top: 18px;
  font-size: 12px;
}
.webhook-payload-details summary {
  color: var(--muted);
  cursor: pointer;
}
.webhook-attempt-title {
  margin: 20px 0 10px;
  font-size: 12px;
  font-weight: 500;
}
.webhook-attempt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.webhook-destination {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#webhooks-coverage {
  font-size: 12px;
}
.webhook-payload {
  padding: 14px;
  background: var(--panel-soft);
  border-radius: 8px;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 12px;
}
.webhook-attempts {
  font-size: 12px;
}
@media (max-width: 1300px) {
  .summary-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .summary-cards {
    grid-template-columns: 1fr;
  }
}

#fleet-view > .attention-panel {
  margin: 24px 32px 0;
}
.metrics[aria-label='Fleet overview'] .metric {
  min-height: 76px;
  padding: 14px 20px;
}
.metrics[aria-label='Fleet overview'] .metric strong {
  font-size: 24px;
}
@media (max-width: 680px) {
  #fleet-view > .attention-panel {
    margin: 16px 20px 0;
  }
}

.task-outcome {
  max-width: 105px;
  text-align: right;
  overflow-wrap: anywhere;
}
.diagnostics-content {
  padding: 20px 24px;
  overflow-wrap: anywhere;
}
.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 18px 0;
}
.diagnostic-metric {
  display: grid;
  gap: 6px;
  font-size: 12px;
}
.diagnostic-metric strong {
  font-size: 14px;
  font-weight: 500;
}
.diagnostic-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.diagnostic-warning {
  color: var(--warning);
}
.diagnostic-request,
.item-history-event {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.item-history-event time {
  font-size: 11px;
}
#item-history-dialog {
  width: min(850px, calc(100vw - 32px));
}
#item-history-content {
  max-height: 65vh;
  overflow-y: auto;
}
.item-history-link {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.item-history-link:hover {
  color: var(--text);
}
@media (max-width: 760px) {
  .diagnostic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .diagnostics-content {
    padding: 16px;
  }
}

/* Compact inventory values; details live outside the polling table. */
.item-pricing {
  min-width: 160px;
  white-space: nowrap;
}
.price-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  color: var(--text);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.price-trigger strong {
  text-decoration: underline;
  text-decoration-color: var(--line-bright);
  text-underline-offset: 4px;
}
.price-trigger:hover strong {
  text-decoration-color: currentColor;
}
.price-directions {
  display: grid;
  justify-items: start;
  gap: 2px;
}
.price-direction-label {
  width: 30px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}
.price-directions-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}
.price-direction-option {
  display: grid;
  gap: 8px;
  padding: 12px;
  text-align: left;
  color: var(--muted);
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.price-direction-option[aria-pressed='true'] {
  color: var(--text);
  border-color: #a5c9ff;
  background: rgb(111 166 250 / 8%);
}
.badge.price-confidence--high {
  color: #8ed7ac;
  border-color: rgb(74 190 124 / 35%);
  background: rgb(74 190 124 / 12%);
}
.badge.price-confidence--medium {
  color: #a5c9ff;
  border-color: rgb(111 166 250 / 35%);
  background: rgb(111 166 250 / 12%);
}
.badge.price-confidence--low {
  color: #f0aaaa;
  border-color: rgb(224 112 112 / 35%);
  background: rgb(224 112 112 / 12%);
}
.price-modal-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dialog.price-dialog {
  width: min(760px, calc(100vw - 32px));
}
.price-modal-summary > strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}
.price-modal-note {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 12px;
}
.price-dialog .price-market-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.price-market-table th:first-child {
  width: 38%;
}
.price-market-table th:nth-child(2) {
  width: 42%;
}
.price-dialog .price-market-table :is(th, td) {
  padding: 14px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}
.price-market-table :is(th, td):first-child {
  padding-left: 0;
}
.price-market-table :is(th, td):last-child {
  text-align: right;
  padding-right: 0;
}
.price-market-meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.price-market-value {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.price-market-count {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 600px) {
  .price-market-table th:first-child {
    width: 34%;
  }
  .price-dialog .price-market-table :is(th, td) {
    padding-inline: 5px;
  }
}

.workspace-nav {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
  margin-right: auto;
}
.workspace-nav button {
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.workspace-nav button[aria-current='page'],
.workspace-nav button:hover {
  color: var(--text);
  background: var(--panel-raised);
  border-color: var(--line-bright);
}
.catalog-view {
  max-width: 1600px;
  margin: 0 auto;
  padding: 30px;
}
.catalog-heading,
.catalog-feed-heading,
.catalog-results {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.catalog-heading {
  margin-bottom: 24px;
}
.catalog-heading h2 {
  margin: 4px 0 10px;
  font-size: 28px;
}
.catalog-sync {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.catalog-feed {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.catalog-feed p {
  margin: 16px 0 10px;
  font-size: 13px;
}
.catalog-feed small {
  font-size: 12px;
}
#catalog-schedule {
  font-size: 12px;
  margin: 16px 0 24px;
  line-height: 1.6;
}
.catalog-toolbar {
  display: flex;
  gap: 12px;
  padding: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.catalog-toolbar .search {
  flex: 1;
  min-width: 220px;
}
.catalog-toolbar input,
.catalog-toolbar select {
  min-height: 42px;
}
.catalog-results {
  padding: 14px 20px;
  font-size: 12px;
}
.catalog-table td {
  padding: 16px 20px;
}
.catalog-item-name {
  min-width: 240px;
}
.catalog-item-name strong {
  font-weight: 550;
}
.catalog-date {
  font-size: 12px;
  min-width: 145px;
}
.catalog-error {
  color: var(--danger);
}
.bot-row__name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.bot-buy-value {
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.bot-row__name .bot-buy-value {
  font-size: 11px;
}
.price-risk-warning {
  color: var(--danger);
  border: 1px solid currentColor;
  border-radius: 8px;
  padding: 12px 16px;
  line-height: 1.5;
}
.price-risk-label {
  display: block;
  color: var(--danger);
  margin-top: 6px;
  font-size: 12px;
}
.price-risk-indicator {
  color: var(--danger);
}
.price-risk-score {
  font-size: 11px;
  white-space: nowrap;
}
.price-risk-score--unknown,
.price-risk-score--quiet {
  color: var(--muted);
}
.price-risk-score--raised {
  color: var(--warning);
}
.price-risk-score--strong {
  color: var(--danger);
}
.price-risk-summary {
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.5;
}
.price-risk-summary strong {
  font-size: 16px;
}
.price-risk-summary p {
  color: var(--muted);
  margin: 6px 0 0;
}
.price-risk-factors {
  padding-left: 18px;
  margin-bottom: 0;
}
#catalog-error {
  margin: 16px 20px;
}
@media (max-width: 760px) {
  .catalog-view {
    padding: 20px;
  }
  .catalog-sync {
    grid-template-columns: 1fr;
  }
  .catalog-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .catalog-results {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

.workspace-item-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  border: 0;
  padding: 0;
  margin: 0;
}

.workspace-item-types legend {
  margin-bottom: 16px;
  font-weight: 600;
}

.workspace-item-types label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.workspace-item-types input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.workspace {
  scrollbar-gutter: stable;
}

:is([role='tabpanel'], #bot-content) {
  position: relative;
}

:is([role='tabpanel'], #bot-content) > :not(.panel-loader) {
  transition: opacity 160ms ease;
}

:is([role='tabpanel'], #bot-content)[aria-busy='true'] > :not(.panel-loader) {
  opacity: 0.2;
  pointer-events: none;
}

.panel-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding-top: 100px;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: progress;
  animation: panel-loader-enter 180ms ease both;
}

.panel-loader::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid var(--line-bright);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: panel-loader-spin 700ms linear infinite;
}

@keyframes panel-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes panel-loader-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is([role='tabpanel'], #bot-content) > :not(.panel-loader) {
    transition: none;
  }
  .panel-loader,
  .panel-loader::before {
    animation: none;
  }
}

#workspace-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg);
  color: var(--muted);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    visibility 180ms;
}
#workspace-loader i {
  width: 20px;
  height: 20px;
  border: 2px solid var(--line-bright);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: panel-loader-spin 700ms linear infinite;
}
.workspace-loading #workspace-loader {
  opacity: 1;
  visibility: visible;
}
.app-shell {
  transition: opacity 180ms ease;
}
.workspace-loading .app-shell {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  #workspace-loader,
  .app-shell {
    transition: none;
  }
  #workspace-loader i {
    animation: none;
  }
}

.fleet-inventory-view {
  position: relative;
  padding: 30px;
  max-width: 1600px;
  margin: auto;
}
.inventory-view-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.inventory-view-heading h1 {
  font-size: 1.8rem;
  margin: 6px 0;
}
.inventory-view-heading h2 {
  margin: 6px 0;
}
.inventory-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.inventory-filters label,
.inventory-view-heading label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
}
.inventory-filters label:first-child {
  flex: 1;
  min-width: 200px;
}
.inventory-filters input,
.inventory-filters select,
.inventory-view-heading select {
  padding: 10px;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}
.inventory-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.inventory-stat {
  display: grid;
  gap: 9px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.inventory-stat strong {
  font-size: 1.6rem;
  overflow-wrap: anywhere;
}
.inventory-stat small {
  line-height: 1.5;
}
.inventory-asset-id {
  display: block;
  margin-top: 5px;
}
.inventory-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 16px;
}
.fleet-inventory-view[aria-busy='true'] > :not(.panel-loader) {
  opacity: 0.25;
}
@media (max-width: 720px) {
  .fleet-inventory-view {
    padding: 16px;
  }
  .inventory-view-heading {
    align-items: start;
  }
  .inventory-filters label {
    flex: 1;
    min-width: 130px;
  }
}

#fleet-inventory-results {
  position: relative;
}
#fleet-inventory-results[aria-busy='true'] > :not(.panel-loader) {
  opacity: 0.25;
}

.fleet-item-icon {
  float: left;
  object-fit: contain;
  margin-right: 12px;
}

/* Workspace inventory uses its own filter layout; per-bot inventory keeps its toolbar. */
.fleet-inventory-view .inventory-view-heading {
  margin-bottom: 22px;
}
.fleet-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(130px, 1fr));
  gap: 12px;
  align-items: end;
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.fleet-filter-bar label,
.fleet-inventory-view .inventory-view-heading > label {
  display: grid;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}
.fleet-filter-bar input,
.inventory-select-trigger {
  width: 100%;
  height: 42px;
  min-width: 0;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: var(--panel-raised);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
}
.inventory-select {
  min-width: 0;
}
.inventory-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.inventory-select-trigger::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  flex-shrink: 0;
}
.inventory-select-trigger:hover,
.inventory-select-trigger[aria-expanded='true'] {
  border-color: #818181;
}
.inventory-select-menu[popover] {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 6px;
  max-height: min(360px, 70vh);
  overflow: auto;
  border: 1px solid #484848;
  border-radius: 10px;
  background: #262626;
  color: #ededed;
  box-shadow: 0 14px 40px #0008;
}
.inventory-select-menu .inventory-select-search {
  width: 100%;
  height: 36px;
  border: 1px solid #4a4a4a;
  border-radius: 6px;
  padding: 8px;
  background: #1d1d1d;
  color: #ededed;
  margin: 0 0 6px;
  font-size: 12px;
}
.inventory-select-option {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 10px 30px 10px 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  font-size: 13px;
  position: relative;
  cursor: pointer;
}
.inventory-select-option:hover,
.inventory-select-option:focus-visible {
  background: #383838;
  outline: none;
}
.inventory-select-option[aria-selected='true'] {
  background: #3b4440;
  color: #a5ebd3;
}
.inventory-select-option[aria-selected='true']::after {
  content: '✓';
  position: absolute;
  right: 10px;
}
.fleet-inventory-view .inventory-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.fleet-inventory-view .inventory-stat {
  padding: 18px;
  gap: 7px;
}
.fleet-inventory-view .inventory-stat strong {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}
.fleet-inventory-view .inventory-stat small {
  font-size: 11px;
}
#fleet-inventory-freshness {
  font-size: 11px;
  margin: 0 0 22px;
}
@media (max-width: 1100px) {
  .fleet-filter-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .fleet-filter-bar label:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .fleet-filter-bar {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
    gap: 12px;
  }
  .fleet-inventory-view .inventory-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .fleet-inventory-view .inventory-stat {
    padding: 14px;
  }
  .fleet-inventory-view .inventory-stat strong {
    font-size: 22px;
  }
}

.table-sort {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border: 0;
  padding: 6px 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.table-sort::after {
  content: '↕';
  opacity: 0.45;
}
th[aria-sort='ascending'] .table-sort::after {
  content: '↑';
  opacity: 1;
}
th[aria-sort='descending'] .table-sort::after {
  content: '↓';
  opacity: 1;
}
th[aria-sort='ascending'],
th[aria-sort='descending'] {
  color: var(--text);
}
.table-sort:focus-visible {
  outline: 2px solid #92aaff;
  outline-offset: 4px;
  border-radius: 3px;
}
.inventory-table-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 16px;
}
.inventory-table-heading h2 {
  margin: 0;
}
.inventory-table-heading label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  width: min(100%, 360px);
}
.inventory-table-heading input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0 12px;
  color: var(--text);
}
@media (max-width: 600px) {
  .inventory-table-heading {
    align-items: stretch;
    flex-direction: column;
  }
}

.item-inspect-summary {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.item-float {
  width: 220px;
  max-width: 100%;
  margin-top: 5px;
}
.item-float-gauge {
  position: relative;
  height: 15px;
}
.item-float-track {
  position: absolute;
  inset: 6px 0 auto;
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}
.item-float-segment {
  flex: none;
  height: 100%;
}
.item-float-segment + .item-float-segment {
  box-shadow: inset 1px 0 rgb(0 0 0 / 25%);
}
.item-float-marker {
  position: absolute;
  top: 5px;
  width: 2px;
  height: 9px;
  border-radius: 1px;
  background: #f5f5f5;
  box-shadow: 0 0 0 1px #202020;
  transform: translateX(-50%);
  pointer-events: none;
}
.item-float-marker::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -3px;
  border-inline: 4px solid transparent;
  border-top: 4px solid #f5f5f5;
}
.item-float-caption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.item-inspect-details {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.item-inspect-details > summary {
  cursor: pointer;
  width: fit-content;
}
.item-inspect-body {
  display: grid;
  gap: 5px;
  padding: 8px 0;
}
.item-inspect-body small {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}
.item-inspect-attachment {
  padding-left: 10px;
}

/* Bulk account import keeps credentials in the form, with a credential-free pairing preview. */
.bot-add-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.bot-add-modes {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.bot-add-modes [aria-pressed='true'] {
  background: var(--text);
  color: var(--bg);
}
.bot-import-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
[data-bulk-bots] textarea,
#bot-transfer-form textarea {
  width: 100%;
  margin-top: 12px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  resize: vertical;
}
.bot-import-preview {
  max-height: 180px;
  overflow: auto;
  padding-left: 24px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.bot-import-preview:empty,
.bot-import-result:empty {
  display: none;
}
.bot-import-result ul {
  max-height: 180px;
  overflow: auto;
  padding-left: 24px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.send-security-panel,
.send-authenticator,
.send-limit-fields {
  padding: 20px;
}
.send-security-panel {
  margin-bottom: 16px;
}
.send-limit-fields,
.send-authenticator {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 22px;
}
.send-limit-fields label,
.send-authenticator label {
  display: grid;
  gap: 8px;
}
.send-usage {
  display: grid;
  gap: 9px;
  width: 100%;
}
.send-usage progress {
  width: 100%;
  height: 10px;
  accent-color: var(--accent);
}
.send-approval-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.send-approval-row p {
  margin: 6px 0;
}
.send-approval-row small {
  overflow-wrap: anywhere;
}
.send-approval-row .button {
  flex-shrink: 0;
}
.authenticator-secret {
  display: block;
  overflow-wrap: anywhere;
  margin: 12px 0;
  user-select: all;
}
.approval-items {
  max-height: 260px;
  overflow: auto;
}
.approval-items .approval-sale-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 8px;
}
.dialog .approval-items .approval-sale-price {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.dialog .approval-items .approval-sale-price input {
  width: 110px;
  margin-top: 0;
}
@media (max-width: 640px) {
  .send-approval-row {
    align-items: stretch;
    flex-direction: column;
  }
}
.offer-acceptance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--warning);
  border-radius: 8px;
}
.offer-acceptance[hidden] {
  display: none;
}
.offer-acceptance p {
  margin: 4px 0 0;
}
.offer-acceptance .button {
  flex-shrink: 0;
}
.offer-acceptance--success {
  border-left-color: var(--success);
}
.offer-acceptance--danger {
  border-left-color: var(--danger);
}
@media (max-width: 640px) {
  .offer-acceptance {
    align-items: stretch;
    flex-direction: column;
  }
}

.send-authenticator h3,
.send-authenticator p,
.send-limit-fields p {
  margin: 0;
}
