    .bot-toast-stack {
      position: fixed;
      right: 14px;
      bottom: calc(14px + env(safe-area-inset-bottom, 0px));
      z-index: 10000;
      width: min(430px, calc(100vw - 28px));
      max-height: calc(100vh - 28px - env(safe-area-inset-bottom, 0px));
      display: flex;
      flex-direction: column;
      gap: 8px;
      overflow-y: auto;
      overscroll-behavior: contain;
      pointer-events: none;
    }
    .bot-toast {
      flex: 0 0 auto;
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 28px;
      align-items: start;
      gap: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      padding: 11px 10px 11px 12px;
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
      pointer-events: auto;
      animation: bot-toast-in 160ms ease-out;
    }
    .bot-toast.ok {
      border-color: rgba(33, 197, 139, 0.55);
      box-shadow: inset 3px 0 0 rgba(33, 197, 139, 0.9), 0 12px 32px rgba(0, 0, 0, 0.42);
    }
    .bot-toast.bad {
      border-color: rgba(243, 184, 76, 0.58);
      box-shadow: inset 3px 0 0 rgba(243, 184, 76, 0.95), 0 12px 32px rgba(0, 0, 0, 0.42);
    }
    .bot-toast-content {
      min-width: 0;
      display: grid;
      gap: 4px;
    }
    .bot-toast-title {
      color: var(--text);
      font-size: 12px;
      line-height: 1.2;
    }
    .bot-toast.ok .bot-toast-title {
      color: var(--green);
    }
    .bot-toast.bad .bot-toast-title {
      color: var(--amber);
    }
    .bot-toast-message {
      min-width: 0;
      color: var(--text);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.35;
      overflow-wrap: anywhere;
    }
    .bot-toast-close {
      width: 28px;
      min-width: 28px;
      height: 28px;
      padding: 0;
      display: inline-grid;
      place-items: center;
      border-color: transparent;
      color: var(--muted);
      background: transparent;
      font-size: 20px;
      font-weight: 500;
      line-height: 1;
    }
    .bot-toast-close:hover,
    .bot-toast-close:focus-visible {
      border-color: var(--line2);
      color: var(--text);
      background: var(--panel2);
    }
    @keyframes bot-toast-in {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @media (prefers-reduced-motion: reduce) {
      .bot-toast { animation: none; }
    }
    .access-form {
      display: grid;
      grid-template-columns: minmax(140px, 1fr) minmax(170px, 1.2fr) auto auto;
      gap: 8px;
      margin: 0 0 8px;
      align-items: center;
    }
    .access-form input {
      min-width: 0;
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel2);
      color: var(--text);
      padding: 0 10px;
      font: inherit;
      outline: none;
    }
    .access-form input:focus {
      border-color: var(--blue);
    }
    .access-actions {
      display: flex;
      justify-content: center;
      gap: 6px;
    }
    .access-actions button {
      height: 28px;
      padding: 0 8px;
      font-size: 12px;
    }
    .access-password {
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 12px;
    }
    .bot-page .table-panel {
      margin-bottom: 8px;
    }
    .bot-create-form {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 8px;
      align-items: end;
    }
    .bot-create-form label,
    .bot-job-edit label {
      min-width: 0;
      display: grid;
      gap: 5px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 750;
      line-height: 1.15;
    }
    .bot-create-form [hidden],
    .bot-level-editor [hidden] {
      display: none !important;
    }
    .bot-create-form label > span,
    .bot-job-edit label > span {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 3px 6px;
      min-width: 0;
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    .bot-job-edit label > span {
      min-height: 25px;
    }
    .bot-field-hint {
      min-width: 0;
      margin-left: auto;
      color: var(--text);
      font-size: 10px;
      font-weight: 700;
      line-height: 1.2;
      text-align: right;
      letter-spacing: 0;
      overflow-wrap: anywhere;
    }
    .bot-field-hint-empty {
      color: var(--muted) !important;
      opacity: 0.72;
    }
    .bot-create-level-field .bot-field-hint,
    .bot-level-editor > label:first-child .bot-field-hint {
      flex: 1 1 100%;
      margin-left: 0;
      color: var(--blue);
      text-align: left;
    }
    .bot-create-form input,
    .bot-create-form select,
    .bot-job-edit input,
    .bot-job-edit select {
      width: 100%;
      min-width: 0;
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel2);
      color: var(--text);
      padding: 0 9px;
      font: inherit;
      outline: none;
    }
    .bot-create-form input:focus,
    .bot-create-form select:focus,
    .bot-job-edit input:focus,
    .bot-job-edit select:focus {
      border-color: var(--blue);
    }
    .bot-create-submit {
      height: 34px;
      border-color: var(--green);
      color: var(--green);
      background: rgba(33, 197, 139, 0.08);
      font-weight: 800;
    }
    .bot-create-level-field {
      grid-column: span 2;
    }
    .bot-create-pair-field {
      grid-column: span 2;
    }
    .bot-create-pair-controls {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(105px, 0.8fr) minmax(0, 1.7fr);
      gap: 5px;
    }
    .bot-panel-content[hidden] {
      display: none;
    }
    .bot-collapse-toggle,
    .bot-card-collapse {
      width: 30px;
      min-width: 30px;
      height: 30px;
      padding: 0;
      display: inline-grid;
      place-items: center;
      color: var(--muted);
      font-size: 14px;
      font-weight: 900;
      line-height: 1;
    }
    .bot-collapse-toggle:hover,
    .bot-card-collapse:hover {
      color: var(--text);
      border-color: #555762;
    }
    .bot-collapsible-panel.is-collapsed .panel-head {
      margin-bottom: 0;
    }
    .bot-jobs-head {
      align-items: center;
    }
    .bot-toolbar {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
      min-width: 0;
    }
    .bot-toolbar .overview-search {
      width: min(100%, 280px);
    }
    .bot-filter-toggle {
      height: 32px;
      border-color: var(--line);
      color: var(--muted);
      background: #12151b;
      font-size: 12px;
      font-weight: 820;
      white-space: nowrap;
    }
    .bot-filter-toggle.is-active {
      border-color: rgba(33, 197, 139, 0.45);
      background: rgba(33, 197, 139, 0.1);
      color: var(--green);
    }
    .bot-filter-toggle.bot-filter-error.is-active {
      border-color: rgba(255, 92, 122, 0.5);
      background: rgba(255, 92, 122, 0.12);
      color: var(--red);
    }
    .bot-filter-toggle.bot-filter-paused.is-active {
      border-color: rgba(255, 196, 76, 0.5);
      background: rgba(255, 196, 76, 0.12);
      color: var(--yellow);
    }
    .bot-bulk-toggle {
      height: 32px;
      border-color: var(--line);
      color: var(--muted);
      background: #12151b;
      font-size: 12px;
      font-weight: 820;
      white-space: nowrap;
    }
    .bot-bulk-toggle[aria-expanded="true"] {
      border-color: rgba(88, 166, 255, 0.48);
      background: rgba(88, 166, 255, 0.1);
      color: var(--blue);
    }
    .bot-bulk-toggle:disabled {
      border-color: var(--line);
      background: #12151b;
      color: var(--muted);
      cursor: default;
      opacity: 0.48;
    }
    .bot-exchange-filter {
      z-index: 25;
    }
    .pair-bot-panel {
      margin-top: 8px;
    }
    .pair-bot-create-panel {
      margin-top: 8px;
    }
    .pair-bot-panel .bot-jobs-list {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .bot-jobs-list {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      align-items: stretch;
      gap: 8px;
    }
    .bot-job-category {
      grid-column: 1 / -1;
      margin: 8px 0 0;
      padding: 6px 2px 2px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 880;
      letter-spacing: 0;
      text-transform: uppercase;
      border-top: 1px solid rgba(255, 255, 255, 0.07);
    }
    .bot-job-category:first-child {
      margin-top: 0;
      border-top: 0;
    }
    .bot-empty {
      grid-column: 1 / -1;
      border: 1px dashed var(--line);
      border-radius: 8px;
      color: var(--muted);
      padding: 16px;
      text-align: center;
      font-size: 12px;
      font-weight: 750;
    }
    .bot-job-card {
      min-width: 0;
      height: 100%;
      box-sizing: border-box;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel2);
      padding: 8px;
      display: flex;
      flex-direction: column;
    }
    .bot-job-top {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      justify-content: space-between;
      gap: 6px;
    }
    .bot-job-side {
      width: 100%;
      max-width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      min-width: 0;
    }
    .bot-job-title {
      min-width: 0;
    }
    .bot-job-title h2 {
      margin: 0;
      font-size: 12px;
      font-weight: 820;
      letter-spacing: 0;
      line-height: 1.2;
      overflow: hidden;
      text-overflow: ellipsis;
      overflow-wrap: normal;
      white-space: nowrap;
    }
    .bot-job-meta {
      display: none;
      margin-top: 2px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 650;
      overflow-wrap: anywhere;
    }
    .bot-job-status {
      min-width: 0;
      flex: 1 1 auto;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #12151b;
      color: var(--muted);
      padding: 5px 8px;
      font-size: 11px;
      font-weight: 800;
      text-align: left;
      overflow-wrap: anywhere;
    }
    .bot-job-status.green {
      border-color: rgba(33, 197, 139, 0.42);
      background: rgba(33, 197, 139, 0.09);
      color: var(--green);
    }
    .bot-job-status.yellow {
      border-color: rgba(243, 184, 76, 0.42);
      background: rgba(243, 184, 76, 0.09);
      color: var(--amber);
    }
    .bot-job-status.red {
      border-color: rgba(255, 92, 119, 0.42);
      background: rgba(255, 92, 119, 0.09);
      color: var(--red);
    }
    .bot-job-card.is-collapsed .bot-card-content {
      display: none;
    }
    .bot-action-bar {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
      margin: 8px 0 6px;
    }
    .bot-action-bar button {
      height: 25px;
      padding: 0 7px;
      font-size: 11px;
      font-weight: 720;
      width: 100%;
    }
    .bot-action-bar button:disabled {
      opacity: 0.42;
      cursor: not-allowed;
    }
    .bot-action-bar button.danger {
      border-color: rgba(255, 92, 119, 0.45);
      color: var(--red);
    }
    .bot-progress-line {
      height: 5px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.06);
      margin: 0 0 6px;
    }
    .bot-progress-line span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: var(--green);
    }
    .bot-metric-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 5px;
    }
    .bot-metric {
      min-width: 0;
      min-height: 58px;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      gap: 7px;
      border: 1px solid rgba(255, 255, 255, 0.065);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.025);
      padding: 6px 7px;
    }
    .bot-metric-wide {
      grid-column: 1 / -1;
    }
    .bot-metric > span {
      display: block;
      color: var(--muted);
      font-size: 10px;
      font-weight: 760;
      line-height: 1.15;
    }
    .bot-metric strong {
      display: block;
      color: var(--text);
      font-size: 12px;
      font-weight: 820;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }
    .bot-metric strong.raw {
      overflow-wrap: normal;
    }
    .bot-metric-unavailable {
      border-color: rgba(255, 255, 255, 0.045);
      background: rgba(255, 255, 255, 0.015);
    }
    .bot-metric-slot {
      min-height: 64px;
    }
    .bot-metric-unavailable strong,
    .bot-metric strong.bot-metric-empty {
      color: var(--muted);
      opacity: 0.72;
    }
    .bot-metric-value-large {
      font-size: 13px;
      font-variant-numeric: tabular-nums;
    }
    .bot-leg-stack {
      display: grid;
      gap: 3px;
      min-width: 0;
    }
    .bot-leg-stack div {
      min-width: 0;
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
    }
    .bot-leg-stack span {
      min-width: 0;
      display: block;
      color: var(--muted);
      font-size: 10px;
      font-weight: 820;
      line-height: 1.1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .bot-leg-stack b {
      flex: 0 0 auto;
      color: var(--text);
      font-size: 12px;
      font-weight: 850;
      line-height: 1.1;
      text-align: right;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .bot-metric-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      min-width: 0;
    }
    .bot-metric-chips em {
      min-width: 0;
      display: inline-flex;
      align-items: baseline;
      gap: 4px;
      border: 1px solid rgba(255, 255, 255, 0.075);
      border-radius: 7px;
      background: rgba(255, 255, 255, 0.035);
      color: var(--muted);
      padding: 3px 5px;
      font-size: 10px;
      font-style: normal;
      font-weight: 760;
      line-height: 1.1;
      white-space: nowrap;
    }
    .bot-metric-chips b {
      color: var(--text);
      font-size: 11px;
      font-weight: 850;
      font-variant-numeric: tabular-nums;
    }
    .bot-job-details {
      margin-top: 6px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      padding-top: 6px;
    }
    .bot-job-details summary {
      width: fit-content;
      cursor: pointer;
      color: var(--blue);
      font-size: 12px;
      font-weight: 800;
      user-select: none;
    }
    .bot-job-edit {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      align-items: end;
      margin-top: 8px;
    }
    .bot-job-edit button {
      min-width: 92px;
      height: 34px;
      border-color: var(--blue);
      color: var(--blue);
      font-weight: 800;
    }
    .bot-level-editor {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      align-items: end;
      padding-top: 8px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
    .bot-level-editor > button {
      grid-column: 1 / -1;
      white-space: nowrap;
    }
    .bot-level-editor > label:first-child {
      grid-column: 1 / -1;
    }
    .bot-level-editor > label:first-child > span {
      min-height: 40px;
    }
    .bot-level-editor [data-job-custom-level].is-level-preset input {
      border-color: rgba(255, 255, 255, 0.045);
      background: rgba(255, 255, 255, 0.02);
      color: var(--muted);
      cursor: default;
    }
    .bot-runtime {
      display: grid;
      gap: 6px;
      margin-top: 8px;
    }
    .bot-runtime div {
      display: grid;
      grid-template-columns: 110px minmax(0, 1fr);
      gap: 8px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 760;
    }
    .bot-runtime code {
      min-width: 0;
      color: var(--text);
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 12px;
    }
