:root {
  color-scheme: dark;
  --bg: #181818;
  --panel: #202020;
  --panel-raised: #272727;
  --panel-soft: #303030;
  --line: #373737;
  --line-bright: #515151;
  --text: #e7e7e7;
  --muted: #a3a3a3;
  --accent: #ececec;
  --accent-ink: #202020;
  --success: #a1d2b2;
  --warning: #ddc28f;
  --danger: #edaaaa;
  --radius: 12px;
  --shadow: 0 20px 70px rgb(0 0 0 / 30%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
}
body {
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
.brand strong,
.metric strong,
.sidebar h1,
.dialog h2,
.bot-heading h2,
.panel h3,
.empty-state h2 {
  font-family: inherit;
}
::selection {
  background: #44536b;
  color: #fff;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
.button,
.bot-row,
.tabs button {
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #9fb9e8;
  outline-offset: 3px;
}
.app-shell {
  grid-template: 72px minmax(0, 1fr) / 260px minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
}
.topbar {
  background: #1c1c1c;
  border-bottom-color: #343434;
  backdrop-filter: none;
  padding-inline: 24px;
}
.brand img,
.empty-state__mark img {
  filter: invert(1);
  opacity: 0.85;
}
.brand strong {
  font-size: 14px;
  letter-spacing: -0.015em;
  font-weight: 650;
}
.brand small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.workspace-access {
  background: transparent;
  border-color: #3b3b3b;
  padding: 5px 12px 5px 6px;
  border-radius: 9px;
}
.workspace-access__avatar {
  background: #3b3b3b;
  color: #e5e5e5;
  font-weight: 500;
}
.workspace-access__copy strong {
  font-weight: 550;
}
.sidebar {
  background: #252525;
  border-right: 1px solid #383838;
}
.sidebar__head {
  flex-shrink: 0;
  padding: 16px 14px 10px;
}
.sidebar h1 {
  font-size: 17px;
  font-weight: 600;
}
.eyebrow {
  color: #a4a4a4;
  font-size: 10px;
  letter-spacing: 0.07em;
  font-weight: 500;
}
.fleet-summary {
  margin-top: 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.fleet-summary div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px 0 0;
}
.fleet-summary div + div {
  padding: 0 0 0 10px;
}
.fleet-summary span {
  font-size: 10px;
}
.fleet-summary strong {
  margin-top: 0;
  font-size: 12px;
  font-weight: 550;
}
.sidebar__section-head {
  margin-top: 12px;
  color: #ababab;
  font-weight: 500;
}
.search input {
  background: #202020;
  color: #e3e3e3;
  border-color: #444;
  border-radius: 8px;
}
.search input::placeholder {
  color: #999;
}
.sidebar .search {
  margin-top: 7px;
}
.sidebar .search input {
  height: 32px;
  font-size: 12px;
}
.bot-list {
  flex: 1;
  padding: 0 8px 8px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}
.bot-row {
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 42px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  padding: 5px 8px;
}
.bot-row:hover {
  background: #303030;
}
.bot-row--selected {
  background: #343434;
  border-color: #454545;
  box-shadow: none;
}
.bot-row--selected:hover {
  background: #393939;
}
.bot-row__copy strong {
  font-size: 12px;
  line-height: 17px;
  font-weight: 550;
}
.bot-row__copy small {
  margin-top: 1px;
  color: #a3a3a3;
  font-size: 10px;
  line-height: 13px;
  text-transform: none;
}
.bot-row__count {
  min-width: 24px;
  padding: 2px 4px;
  color: #b8b8b8;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.bot-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.bot-row__meta .bot-row__count {
  padding-block: 0;
  line-height: 13px;
}
.signal--success {
  background: #a1d2b2;
  box-shadow: none;
}
.sidebar__foot {
  flex-shrink: 0;
  margin-top: 0;
  padding: 9px 14px;
  color: #adadad;
  border-color: #3d3d3d;
  font-size: 11px;
}
#bot-content {
  padding: 32px;
}
.bot-heading {
  align-items: flex-start;
  margin-bottom: 28px;
}
.bot-heading > div:first-child {
  flex: 1;
}
.bot-heading .title-line {
  flex-wrap: wrap;
  gap: 6px 12px;
}
.bot-trade-url {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.bot-trade-url code {
  color: #d2d2d2;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.bot-notes {
  margin-top: 14px;
  padding-left: 12px;
  border-left: 2px solid #494949;
}
.bot-notes__label {
  color: #a3a3a3;
  font-size: 10px;
  font-weight: 550;
}
.bot-heading #bot-notes-text {
  max-height: 8.4em;
  margin: 4px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #d2d2d2;
  font-size: 12px;
  line-height: 1.4;
  scrollbar-width: thin;
}
.bot-heading h2 {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.04em;
}
#bot-steam-id {
  color: #a3a3a3;
  font-size: 11px;
}
.button {
  border-radius: 8px;
  font-size: 12px;
  min-height: 36px;
  font-weight: 550;
  padding-inline: 14px;
}
.button:hover:not(:disabled) {
  transform: none;
}
.button--quiet,
.button--outline {
  background: #292929;
  color: #dfdfdf;
  border: 1px solid #434343;
}
.button--quiet:hover:not(:disabled),
.button--outline:hover:not(:disabled) {
  background: #363636;
  border-color: #626262;
}
.button--primary {
  background: #e4e4e4;
  color: #1c1c1c;
  border: 1px solid #e4e4e4;
}
.button--primary:hover:not(:disabled) {
  background: #fff;
  color: #111;
  border-color: #fff;
}
.button--danger {
  background: #302526;
  color: #edb2b2;
  border-color: #5d4141;
}
.button--danger:hover:not(:disabled) {
  background: #493032;
  border-color: #916060;
}
.button:disabled {
  opacity: 1;
  background: #242424;
  color: #858585;
  border-color: #373737;
}
.metrics {
  gap: 14px;
  margin-bottom: 26px;
}
.metric {
  background: #212121;
  border-color: #3a3a3a;
  border-radius: 12px;
  min-height: 105px;
  padding: 20px;
}
.metric strong {
  font-size: 28px;
  font-weight: 500;
}
.metric span {
  font-size: 12px;
  color: #ababab;
}
.metric--accent::after {
  display: none;
}
.tabs {
  border: 1px solid #393939;
  background: #222;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 18px;
}
.tabs button {
  border-radius: 7px;
  font-size: 13px;
  color: #aaa;
  font-weight: 500;
}
.tabs button[aria-selected='true'] {
  background: #393939;
  color: #f0f0f0;
  box-shadow: 0 1px 3px rgb(0 0 0 / 15%);
}
.tabs button:hover:not([aria-selected='true']) {
  background: #2e2e2e;
  color: #ddd;
}
.panel {
  background: #202020;
  border: 1px solid #3b3b3b;
  border-radius: 12px;
}
.panel__head {
  padding: 22px;
  border-color: #393939;
}
.panel h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.panel__head p {
  font-size: 12px;
  color: #aaa;
}
.count {
  background: #2a2a2a;
  color: #bdbdbd;
  border-color: #454545;
  font-weight: 500;
}
thead,
thead th {
  background: #252525;
  color: #b1b1b1;
  border-color: #3c3c3c;
}
thead th {
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 550;
}
tbody td {
  border-color: #343434;
  font-size: 13px;
}
tbody tr:hover,
.offer-row:focus-within {
  background: #282828;
}
.item-icon {
  background: #292929;
  border-color: #454545;
  border-radius: 9px;
}
.item-name {
  font-size: 13px;
  font-weight: 550;
}
.inventory-row--historical {
  background: #1c1c1c;
}
.inventory-row--historical td,
.inventory-row--historical .item-name,
.inventory-row--historical .price-trigger {
  color: #969696;
}
.inventory-row--historical .item-name {
  text-decoration: line-through;
  text-decoration-color: #656565;
}
.inventory-row--historical .item-icon {
  filter: grayscale(1);
  opacity: 0.45;
}
.inventory-row--historical .item-pricing {
  filter: grayscale(1);
}
.subline {
  color: #aaa;
  font-size: 11px;
  line-height: 1.55;
}
.mono {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.84em;
  letter-spacing: -0.03em;
}
.offer-open {
  font-size: 12px;
  text-decoration-color: #666;
  text-underline-offset: 4px;
}
.badge {
  font-weight: 500;
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 6px;
  text-transform: none;
}
.badge--success {
  background: #26362c;
  color: #b0d8be;
  border-color: #405b49;
}
.badge--warning {
  background: #383023;
  color: #e2c99d;
  border-color: #60503a;
}
.badge--danger {
  background: #3c292a;
  color: #f0b8b8;
  border-color: #694347;
}
.badge--shared {
  background: #28313c;
  color: #b2cbed;
  border-color: #425570;
}
.catalog-risk-coverage {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  color: #bfbfbf;
}
.catalog-risk-coverage--warning {
  color: #e2c99d;
}
.bot-row .bot-row__shared {
  min-height: 0;
  margin: 0;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 9px;
  line-height: 11px;
}
.badge--muted,
.badge--outline {
  background: #2c2c2c;
  color: #bfbfbf;
  border-color: #4a4a4a;
}
input[type='checkbox'] {
  accent-color: #d4d4d4;
}
.panel__foot {
  border-color: #383838;
}
.logs-list {
  background: #1c1c1c;
}
.log-entry {
  background: #212121;
}
.log-entry--warn {
  border-left-color: #c4aa7e;
}
.log-entry--error {
  border-left-color: #d49b9b;
}
.empty-inline,
.empty-table,
.empty-panel {
  color: #b0b0b0;
}
.dialog {
  background: #252525;
  border: 1px solid #4a4a4a;
  border-radius: 16px;
  box-shadow: 0 28px 100px rgb(0 0 0 / 50%);
}
.dialog::backdrop {
  background: rgb(0 0 0 / 58%);
  backdrop-filter: blur(5px);
}
.dialog__form {
  padding: 26px;
}
.dialog h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.icon-button {
  background: #303030;
  border-color: #494949;
  color: #c8c8c8;
  border-radius: 8px;
}
.icon-button:hover {
  background: #404040;
  color: #fff;
}
.dialog label {
  color: #d2d2d2;
  font-size: 12px;
  font-weight: 500;
}
.dialog label > span {
  color: #aaa;
  font-size: 11px;
}
.dialog input:not([type='checkbox'], [type='radio']),
.dialog textarea,
.dialog select {
  background: #1c1c1c;
  color: #e4e4e4;
  border: 1px solid #555;
  border-radius: 8px;
}
.dialog input::placeholder,
.dialog textarea::placeholder {
  color: #999;
}
.dialog input:focus,
.dialog textarea:focus {
  border-color: #9cadd0;
}
.form-section {
  border-color: #444;
}
.form-section h3 {
  color: #c4c4c4;
}
.selected-summary,
.partner-inventory__head {
  background: #2e2e2e;
  border-color: #4a4a4a;
}
.partner-inventory {
  border-color: #4a4a4a;
}
.warning-box {
  background: #343028;
  color: #e1cca6;
  border-color: #665640;
}
.form-feedback {
  background: #392929;
  color: #edbbbb;
  border-color: #764c4c;
}
.dialog__foot {
  border-color: #454545;
}
.dialog__foot p,
.field-help {
  color: #aaa;
}
.trade-dialog .dialog__head {
  background: #252525;
  top: -26px;
}
.trade-item-card {
  background: #222;
  border-color: #444;
  border-radius: 10px;
}
.trade-facts dt {
  color: #aaa;
}
.trade-facts dd {
  color: #e1e1e1;
}
.trade-section {
  border-color: #444;
}
.toast {
  background: #303030;
  border-color: #555;
  color: #e7e7e7;
}
.toast--success {
  border-color: #698570;
}
.toast--danger {
  border-color: #966060;
}
@media (max-width: 800px) {
  .app-shell {
    grid-template: auto auto / minmax(0, 1fr);
  }
  #bot-content {
    padding: 22px 16px;
  }
  .topbar {
    padding: 12px 16px;
  }
  .sidebar__head {
    padding: 18px 16px 12px;
  }
  .dialog__form {
    padding: 20px;
  }
  .trade-dialog .dialog__head {
    top: -20px;
  }
  .button {
    padding-inline: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
.section-heading > span {
  background: #2e2e2e;
  border-color: #4a4a4a;
}
/* Modal layout: fixed controls, independently scrolling content. */
.dialog {
  width: min(660px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
}
.dialog--wide {
  width: min(960px, calc(100vw - 32px));
}
#trade-dialog {
  width: min(1000px, calc(100vw - 32px));
}
#offer-detail-dialog {
  width: min(1080px, calc(100vw - 32px));
}
#confirm-dialog {
  width: min(580px, calc(100vw - 32px));
}
.dialog__form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 50px);
  padding: 0;
  margin: 0;
}
.dialog__head,
.trade-dialog .dialog__head {
  position: static;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 26px 30px 22px;
  margin: 0;
  border-bottom: 1px solid #404040;
  background: #252525;
  flex-shrink: 0;
}
.dialog__head > div {
  min-width: 0;
}
.dialog__head .icon-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  margin: 0;
}
.dialog__head .eyebrow {
  margin-bottom: 9px;
}
.dialog__description {
  max-width: 660px;
  margin: 10px 0 0;
  color: #b1b1b1;
  font-size: 13px;
  line-height: 1.6;
}
.dialog__body {
  padding: 26px 30px 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  flex: 1 1 auto;
  scrollbar-width: thin;
  scrollbar-color: #606060 transparent;
}
.dialog__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 24px;
  padding: 18px 30px;
  margin: 0;
  background: #292929;
  border-top: 1px solid #444;
  flex: 0 0 auto;
}
.dialog__foot > p {
  max-width: 480px;
  margin: 0;
  flex: 1;
  font-size: 11px;
  line-height: 1.6;
}
.dialog__foot > div {
  margin-left: auto;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
}
.dialog__foot .button {
  min-height: 40px;
  padding-inline: 18px;
  min-width: 92px;
}
.dialog .form-grid {
  gap: 22px 24px;
}
.dialog label {
  min-width: 0;
  line-height: 1.45;
  font-size: 13px;
}
.dialog input:not([type='checkbox'], [type='radio']),
.dialog textarea,
.dialog select {
  min-height: 44px;
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 13px;
}
.field-note {
  display: block;
  color: #aaa;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  margin-top: 8px;
}
.dialog .field-help {
  margin: -8px 0 0;
  line-height: 1.6;
  font-size: 12px;
}
.dialog .form-section {
  margin: 0;
  padding: 26px 0;
}
.dialog__body > .form-section:first-child {
  border-top: 0;
  padding-top: 0;
}
.dialog__body > .form-section:last-child {
  padding-bottom: 0;
}
.dialog .form-section h3 {
  margin: 0 0 9px;
  font-size: 14px;
  text-transform: none;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: #e2e2e2;
}
.form-section--split {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 30px;
}
.section-description {
  color: #aaa;
  line-height: 1.65;
  font-size: 12px;
  margin: 0 0 20px;
}
.form-section__intro .section-description {
  margin: 0;
}
#trade-form .selected-summary {
  margin: 22px 0;
  padding: 16px 18px;
  border-radius: 9px;
}
#trade-form .trade-url-actions {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
#trade-form .trade-url-actions .button {
  min-height: 40px;
}
#trade-form .partner-inventory {
  margin-top: 2px;
}
#trade-form .partner-inventory__head {
  padding: 14px 16px;
}
#trade-form .partner-inventory__table {
  max-height: 270px;
}
#trade-form .partner-inventory__table .empty-table {
  height: 110px;
  font-size: 12px;
}
#proxy-form .warning-box {
  margin: 0 0 24px;
}
#api-key-form .form-section {
  padding-bottom: 0;
}
.developer-docs--cards {
  display: block;
  margin: 24px 0;
  padding: 20px;
  border: 1px solid #444;
  background: #222;
  border-radius: 10px;
}
.developer-docs--cards > div:last-child {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.developer-docs--cards a.button {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-start;
  gap: 7px;
  white-space: normal;
  min-height: 92px;
  padding: 14px;
  text-align: left;
}
.developer-docs--cards a span {
  color: #aaa;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.55;
}
#offer-detail-dialog .dialog__foot > button {
  order: -1;
}
#offer-detail-actions {
  flex: 1;
  margin: 0;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
#offer-detail-actions .row-actions:not(:has(button)) {
  display: none;
}
.trade-facts {
  gap: 22px 32px;
}
.trade-item-columns {
  gap: 20px;
}
.trade-item-card {
  padding: 20px;
}
.dialog .form-feedback {
  flex: 0 0 auto;
  margin: 0 0 22px;
}
@media (max-width: 720px) {
  .dialog,
  .dialog--wide,
  #trade-dialog,
  #offer-detail-dialog,
  #confirm-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }
  .dialog__form {
    max-height: calc(100dvh - 26px);
  }
  .dialog__head,
  .trade-dialog .dialog__head {
    padding: 20px;
    gap: 14px;
  }
  .dialog h2 {
    font-size: 22px;
  }
  .dialog__description {
    font-size: 12px;
  }
  .dialog__body {
    padding: 22px 20px;
  }
  .dialog__foot {
    padding: 16px 20px;
    gap: 14px;
    flex-wrap: wrap;
  }
  .dialog__foot > p {
    flex-basis: 100%;
    max-width: none;
  }
  .dialog__foot > div {
    width: auto;
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .dialog__foot .button {
    width: auto;
    min-width: 88px;
    min-height: 42px;
    padding-inline: 14px;
  }
  .form-section--split {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .dialog .form-grid--2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .dialog .form-grid .span-2 {
    grid-column: auto;
  }
  .developer-docs--cards > div:last-child {
    grid-template-columns: minmax(0, 1fr);
  }
  .developer-docs--cards a.button {
    min-height: 0;
  }
  #offer-detail-actions {
    flex: 1;
    width: auto;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }
  .topbar {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 12px 16px;
  }
  .workspace-nav {
    order: 3;
    flex-basis: 100%;
  }
}
@media (max-width: 980px) {
  .app-shell {
    grid-template: auto auto minmax(0, 1fr) / minmax(0, 1fr);
  }
  .sidebar__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    padding: 12px 16px 8px;
  }
  .sidebar .search {
    width: 100%;
    margin: 0;
  }
  .bot-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 2px 6px;
    max-height: 146px;
    padding: 0 10px 8px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .bot-row {
    min-width: 0;
    min-height: 44px;
  }
  .workspace {
    overflow-y: auto;
  }
}
@media (max-width: 480px) {
  .topbar {
    gap: 8px;
    padding: 10px 12px;
  }
  .topbar__actions {
    gap: 4px;
  }
  .topbar .button {
    min-height: 32px;
    padding-inline: 8px;
  }
}

/* Administrator sign-in and account forms */
body:not(.authenticated) .app-shell {
  visibility: hidden;
}
.account-form {
  display: grid;
  gap: 18px;
}
.account-form label {
  display: grid;
  gap: 8px;
}
.account-form input,
.account-form select,
.menu-search input {
  min-height: 42px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #242424;
  color: #eee;
  padding: 10px 12px;
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}
.account-form input:focus-visible,
.account-form select:focus-visible,
.menu-search input:focus-visible {
  outline: 2px solid #b6b6b6;
  outline-offset: 2px;
}
.account-form > button {
  justify-self: start;
}
.account-operator {
  margin-top: 28px;
  border-top: 1px solid #353535;
  padding-top: 20px;
}
.account-operator summary {
  color: #aaa;
  cursor: pointer;
  margin-bottom: 16px;
}
.workspace-directory-dialog {
  width: min(980px, calc(100vw - 32px));
  max-width: 980px;
}
.account-secret {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 16px;
  padding: 16px;
  background: #151515;
  border-radius: 8px;
}
.error-message {
  color: #f7a9a9;
}

body:not(.authenticated) #auth-dialog [data-close-dialog],
body:not(.authenticated) #auth-dialog .dialog__foot {
  display: none;
}

#auth-dialog[open],
#workspace-directory-dialog[open] {
  display: flex;
  flex-direction: column;
}
@media (max-width: 1100px) {
  .topbar__actions {
    flex: 1 1 auto;
    flex-wrap: wrap;
    min-width: 0;
  }
}
@media (max-width: 680px) {
  .topbar__actions {
    flex-basis: calc(100% - 56px);
  }
}

.account-form small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
}
.account-form input[autocomplete='one-time-code'] {
  max-width: 200px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2em;
}

#auth-dialog #change-password {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}
#show-webhook-secret {
  margin-top: 20px;
}

.account-login-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* The sign-in flow has its own branding and separate credential / verification screens. */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.035em;
}
.auth-brand img {
  filter: invert(1);
  opacity: 0.9;
}
body.authenticated .auth-brand,
body:not(.authenticated) .auth-account-label {
  display: none;
}
body:not(.authenticated) #auth-dialog {
  width: min(460px, calc(100vw - 32px));
}
body:not(.authenticated) #auth-dialog .dialog__head {
  padding: 30px 30px 24px;
  border-bottom: 0;
}
body:not(.authenticated) #auth-dialog .dialog__body {
  padding: 0 30px 30px;
}
#admin-login .account-login-actions {
  justify-content: space-between;
  margin-top: 8px;
}
#admin-login .account-login-actions .button {
  min-height: 42px;
}
#auth-dialog[data-login-step='credentials'] #admin-login .account-login-actions {
  flex-wrap: nowrap;
  align-items: stretch;
}
#auth-dialog[data-login-step='credentials'] #admin-login .account-login-actions .button {
  flex: 1 1 0;
  min-width: 0;
}
#auth-dialog[data-login-step='totp'] #passkey-login {
  display: none;
}
#auth-dialog[data-login-step='totp'] #login-totp input {
  max-width: none;
  font-size: 20px;
  letter-spacing: 0.35em;
}
@media (max-width: 480px) {
  body:not(.authenticated) #auth-dialog .dialog__head {
    padding: 24px 24px 20px;
  }
  body:not(.authenticated) #auth-dialog .dialog__body {
    padding: 0 24px 24px;
  }
}

/* Workspace navigation belongs to the account control, rather than the global toolbar. */
.workspace-menu {
  position: relative;
  flex: 0 0 auto;
}
.workspace-menu > summary {
  list-style: none;
  cursor: pointer;
}
.workspace-menu > summary::-webkit-details-marker {
  display: none;
}
.workspace-menu .workspace-access {
  max-width: 240px;
}
.workspace-access__copy {
  min-width: 0;
}
.workspace-access__copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-chevron {
  color: var(--muted);
  margin-left: 8px;
}
.workspace-menu__panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #3b3b3b;
  border-radius: 16px;
  background: #242424;
  color: var(--text);
  box-shadow: 0 18px 60px #0008;
  z-index: 120;
}
.workspace-menu__identity {
  display: grid;
  gap: 4px;
  padding: 12px 12px 16px;
  overflow-wrap: anywhere;
}
.workspace-menu__identity strong {
  font-size: 14px;
}
.workspace-menu__identity span {
  font-size: 12px;
}
.workspace-menu__workspaces {
  border-block: 1px solid #ffffff12;
  padding: 14px 0 8px;
}
.menu-search {
  display: grid;
  gap: 9px;
  padding: 0 8px 10px;
  color: var(--muted);
  font-size: 12px;
}
.menu-search input {
  width: 100%;
  min-height: 38px;
}
.workspace-options {
  display: grid;
  gap: 3px;
  min-height: 36px;
  font-size: 13px;
}
.workspace-option {
  display: grid;
  gap: 3px;
  width: 100%;
  text-align: left;
  padding: 10px 32px 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  position: relative;
}
.workspace-option span {
  overflow-wrap: anywhere;
}
.workspace-option small {
  font-size: 11px;
  color: var(--muted);
}
.workspace-option:hover,
.workspace-menu__actions button:hover {
  background: #ffffff09;
}
.workspace-option[aria-current='true'] {
  background: #ffffff0d;
}
.workspace-option[aria-current='true']::after {
  content: '✓';
  position: absolute;
  right: 13px;
  top: 13px;
  color: #bbb;
}
.workspace-menu__actions {
  display: grid;
  padding-top: 6px;
}
.workspace-menu__actions button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}
.workspace-menu__actions button span {
  color: var(--muted);
}
.workspace-menu__actions #menu-sign-out {
  color: #bcbcbc;
}
.account-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font-size: 12px;
}
.menu-pagination {
  margin-top: 8px;
  padding: 0 4px;
}
.menu-pagination .button {
  min-height: 28px;
  padding: 4px 10px;
}
.workspace-directory-dialog {
  width: min(960px, calc(100vw - 40px));
}
.management-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.management-search {
  display: grid;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.management-search input {
  width: 100%;
}
.management-list {
  min-height: 96px;
}
#workspace-directory-dialog .dialog__body,
#workspace-directory-dialog .management-list,
.management-toolbar,
.management-search,
.account-pagination,
#workspace-directory-summary {
  flex-shrink: 0;
}
.workspace-menu .workspace-access__copy small {
  font-size: 11px;
}
.workspace-menu .workspace-access__copy strong {
  font-size: 13px;
}
.menu-search input {
  background: #1c1c1c;
  font-size: 13px;
}

@media (max-width: 680px) {
  .workspace-menu__panel {
    position: fixed;
    top: 110px;
    right: 16px;
  }
  .workspace-menu .workspace-access {
    max-width: 180px;
  }
  .management-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

.developer-secret-actions,
.key-bot-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.key-access,
.key-bot-access {
  min-width: 0;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}
.key-access legend,
.key-bot-access legend {
  margin-bottom: 12px;
  color: #e2e2e2;
  font-size: 14px;
  font-weight: 600;
}
.dialog label.key-bot-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #242424;
  cursor: pointer;
}
.key-access .key-bot-option + .key-bot-option {
  margin-top: 4px;
}
.key-bot-option > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.key-bot-option strong,
.key-bot-option small {
  display: block;
}
.key-bot-option small {
  color: #aaa;
  margin-top: 3px;
  font-size: 12px;
}
.key-bot-option input[type='checkbox'],
.key-bot-option input[type='radio'] {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0;
}
.key-bot-access > label[for='key-bot-search'] {
  margin-top: 18px;
}
.key-bot-list {
  display: grid;
  gap: 4px;
  max-height: 290px;
  overflow: auto;
  margin-top: 12px;
  padding: 4px;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
}
.key-bot-option .key-bot-status {
  margin-left: auto;
  color: #aaa;
  font-size: 12px;
  flex-shrink: 0;
}
.key-bot-toolbar {
  justify-content: space-between;
  margin-top: 12px;
  font-size: 12px;
}

/* Workspace settings and guided integration key creation. */
.settings-tabs {
  flex-shrink: 0;
  width: auto;
  max-width: 100%;
  margin: 16px 30px 0;
  overflow-x: auto;
}
.settings-tabs button {
  white-space: nowrap;
}
.settings-body .dialog__foot {
  margin: 24px -30px -30px;
}
.key-steps {
  display: flex;
  gap: 12px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.key-steps li {
  flex: 1;
  padding: 10px 0;
  border-bottom: 2px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.key-steps [aria-current='step'] {
  color: var(--text);
  border-color: #e5c78d;
  font-weight: 650;
}
.key-wizard h3 {
  margin: 0 0 10px;
}
.key-wizard .form-grid {
  margin-top: 22px;
}
.key-review {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 18px;
  margin: 24px 0;
  line-height: 1.6;
}
.key-review dt {
  color: var(--muted);
}
.key-review dd {
  margin: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .settings-tabs {
    margin-inline: 18px;
  }
  .settings-body .dialog__foot {
    margin-inline: -18px;
  }
  .key-steps {
    gap: 8px;
  }
}

.passkey-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.passkey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}
.passkey-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.passkey-row strong,
.passkey-row small {
  display: block;
}
.passkey-row small {
  opacity: 0.7;
  margin-top: 4px;
}
#passkey-form {
  margin-top: 16px;
}
