    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      min-height: 100vh;
      padding: 20px;
    }

    .container {
      max-width: 1400px;
      margin: 0 auto;
    }

    /* Login Screen */
    .login-screen {
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      z-index: 1000;
    }

    .login-screen.hidden {
      display: none;
    }

    .login-card {
      background: white;
      padding: 40px;
      border-radius: 10px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      width: 100%;
      max-width: 400px;
    }

    .login-card h1 {
      margin-bottom: 10px;
      color: #333;
      font-size: 28px;
    }

    .login-card p {
      color: #666;
      margin-bottom: 30px;
      font-size: 14px;
    }

    .form-group {
      margin-bottom: 20px;
    }

    .form-group label {
      display: block;
      margin-bottom: 6px;
      color: #333;
      font-weight: 500;
      font-size: 14px;
    }

    .form-group input,
    .form-group textarea {
      width: 100%;
      padding: 10px;
      border: 1px solid #ddd;
      border-radius: 5px;
      font-size: 14px;
      font-family: monospace;
    }

    .form-group input:focus,
    .form-group textarea:focus {
      outline: none;
      border-color: #667eea;
      box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    .btn {
      width: 100%;
      padding: 12px;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border: none;
      border-radius: 5px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
    }

    .btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    }

    .btn:active {
      transform: translateY(0);
    }

    .btn-secondary {
      background: #f0f0f0;
      color: #333;
      margin-top: 10px;
    }

    .btn-secondary:hover {
      background: #e0e0e0;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .btn-secondary:disabled {
      background: #ddd;
      color: #999;
      cursor: not-allowed;
      opacity: 0.7;
    }

    .btn-secondary:disabled:hover {
      background: #ddd;
      box-shadow: none;
    }

    .error-message {
      background: #fee;
      color: #c33;
      padding: 12px;
      border-radius: 5px;
      margin-bottom: 20px;
      font-size: 14px;
      display: none;
    }

    .error-message.show {
      display: block;
    }

    .success-message {
      background: #efe;
      color: #3c3;
      padding: 12px;
      border-radius: 5px;
      margin-bottom: 20px;
      font-size: 14px;
      display: none;
    }

    .success-message.show {
      display: block;
    }

    .loading {
      display: none;
      text-align: center;
      color: #666;
      font-size: 14px;
    }

    .loading.show {
      display: block;
    }

    .spinner {
      border: 3px solid #f3f3f3;
      border-top: 3px solid #667eea;
      border-radius: 50%;
      width: 30px;
      height: 30px;
      animation: spin 1s linear infinite;
      margin: 0 auto 10px;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    /* Main App */
    .header {
      background: white;
      padding: 14px 24px;
      border-radius: 10px;
      margin-bottom: 20px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .header-brand {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .brand-logo {
      width: 38px;
      height: 38px;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: 800;
      font-size: 18px;
      flex-shrink: 0;
      letter-spacing: -1px;
    }

    .brand-name {
      font-size: 17px;
      font-weight: 700;
      color: #1a1a2e;
      line-height: 1.2;
    }

    .brand-subtitle {
      font-size: 11px;
      color: #aaa;
      line-height: 1.5;
    }

    .header-right {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .main-layout {
      display: grid;
      grid-template-columns: 300px 1fr;
      gap: 20px;
    }

    .sidebar {
      background: white;
      border-radius: 10px;
      padding: 20px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
      height: fit-content;
      max-height: 80vh;
      overflow-y: auto;
    }

    .sidebar-section {
      margin-bottom: 20px;
    }

    .sidebar-title {
      font-weight: 600;
      color: #333;
      font-size: 13px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 10px;
      padding: 0 5px;
      color: #667eea;
    }

    .endpoint-list {
      list-style: none;
    }

    .endpoint-item {
      margin-bottom: 8px;
    }

    .endpoint-link {
      display: block;
      /* A <button> shrink-to-fits even at display:block, so without this the row
         collapses to the width of its own text. Invisible in the 300px sidebar, but
         below the 1024px breakpoint the sidebar goes full width and every endpoint
         became a stub floating in an empty row. */
      width: 100%;
      text-align: left;
      border: none;
      font: inherit;
      padding: 8px 12px;
      background: #f5f5f5;
      border-radius: 5px;
      text-decoration: none;
      color: #333;
      font-size: 13px;
      cursor: pointer;
      transition: all 0.2s;
      border-left: 3px solid transparent;
    }

    .endpoint-link:hover {
      background: #efefef;
      border-left-color: #667eea;
    }

    .endpoint-link.active {
      background: #667eea;
      color: white;
      border-left-color: #764ba2;
    }

    .method-badge {
      display: inline-block;
      font-size: 11px;
      font-weight: 700;
      padding: 2px 6px;
      border-radius: 3px;
      margin-right: 5px;
    }

    .method-get { background: #e3f2fd; color: #1976d2; }
    .method-post { background: #f3e5f5; color: #7b1fa2; }
    .method-put { background: #fff3e0; color: #f57c00; }
    .method-delete { background: #ffebee; color: #c62828; }

    .content {
      background: white;
      border-radius: 10px;
      padding: 30px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .endpoint-detail {
      display: none;
    }

    .endpoint-detail.active {
      display: block;
    }

    .endpoint-detail h2 {
      color: #333;
      margin-bottom: 10px;
      font-size: 22px;
    }

    .endpoint-meta {
      display: flex;
      gap: 20px;
      margin-bottom: 20px;
      padding-bottom: 20px;
      border-bottom: 1px solid #eee;
    }

    .meta-item {
      font-size: 13px;
      color: #666;
    }

    .meta-item strong {
      color: #333;
    }

    .api-url {
      background: #f5f5f5;
      padding: 10px;
      border-radius: 5px;
      font-family: monospace;
      font-size: 12px;
      color: #333;
      word-break: break-all;
      margin-bottom: 20px;
    }

    .section {
      margin-bottom: 30px;
    }

    .section-title {
      font-size: 16px;
      font-weight: 600;
      color: #333;
      margin-bottom: 15px;
      padding-bottom: 10px;
      border-bottom: 2px solid #667eea;
    }

    .params-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 15px;
    }

    .form-group textarea {
      font-size: 13px;
      resize: vertical;
      min-height: 80px;
      font-family: monospace;
    }

    .action-bar {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-top: 30px;
      padding-top: 20px;
      border-top: 1px solid #eee;
      flex-wrap: wrap;
    }

    .btn-primary {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    /* Sized to be the obvious primary action without stretching edge to edge on a
       wide screen; the secondary cluster is pushed to the far side by the margin. */
    .btn-execute {
      flex: 0 1 260px;
      min-width: 180px;
      padding: 13px 20px;
      white-space: nowrap;
    }

    .action-bar-aside {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-left: auto;
    }

    /* Deliberately NOT `.btn`: that class sets width: 100%, which is what made the
       copy button expand to fill the row. These size to their own content. */
    .btn-mini {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      width: auto;
      padding: 9px 14px;
      font-size: 13px;
      font-weight: 600;
      font-family: inherit;
      line-height: 1.2;
      color: #4a4a58;
      background: #fff;
      border: 1px solid #dcdce6;
      border-radius: 6px;
      cursor: pointer;
      white-space: nowrap;
      transition: background 0.15s, border-color 0.15s, color 0.15s;
    }

    .btn-mini:hover {
      background: #f5f5fa;
      border-color: #c3c3d4;
      color: #2f2f3a;
    }

    .btn-mini:active {
      background: #ececf4;
    }

    .btn-mini:focus-visible {
      outline: 2px solid #667eea;
      outline-offset: 2px;
    }

    .btn-mini-icon {
      display: inline-flex;
      align-items: center;
      opacity: 0.6;
    }

    .btn-mini-ghost {
      border-color: transparent;
      color: #8a8a99;
      background: transparent;
    }

    .btn-mini-ghost:hover {
      background: #f2f2f7;
      border-color: transparent;
      color: #55555f;
    }

    .btn-mini-primary {
      background: #667eea;
      border-color: #667eea;
      color: #fff;
    }

    .btn-mini-primary:hover {
      background: #5a6fd8;
      border-color: #5a6fd8;
      color: #fff;
    }

    .btn-mini-danger {
      color: #c0392b;
      border-color: #f0c8c2;
    }

    .btn-mini-danger:hover {
      background: #fdf1ef;
      border-color: #e0a79e;
      color: #a33224;
    }

    .btn-mini.is-ok {
      background: #e8f7ee;
      border-color: #9fd8b4;
      color: #227a45;
    }

    .btn-mini.is-error {
      background: #fdecea;
      border-color: #f0b3ab;
      color: #b3392b;
    }

    .n8n-binding {
      display: flex;
      align-items: center;
      gap: 7px;
      flex-wrap: wrap;
      margin-top: 10px;
      font-size: 12px;
      color: #85858f;
    }

    .n8n-binding strong {
      color: #4a4a58;
      font-weight: 600;
    }

    .n8n-binding-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #d0d0d8;
      flex-shrink: 0;
    }

    .n8n-binding-dot.bound {
      background: #3fb27f;
    }

    .n8n-binding-type {
      padding: 1px 6px;
      border-radius: 4px;
      background: #f0f0f6;
      color: #7a7a88;
      font-family: monospace;
      font-size: 11px;
    }

    .link-button {
      background: none;
      border: none;
      padding: 0;
      font: inherit;
      color: #667eea;
      font-weight: 600;
      cursor: pointer;
      text-decoration: underline;
    }

    .link-button:hover {
      color: #4a5bd0;
    }

    .response-container {
      margin-top: 40px;
      padding-top: 30px;
      border-top: 2px solid #eee;
    }

    .response-container h3 {
      color: #333;
      margin-bottom: 15px;
      font-size: 16px;
    }

    .response-meta {
      display: flex;
      gap: 20px;
      margin-bottom: 15px;
      font-size: 13px;
      color: #666;
    }

    .status-code {
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 3px;
    }

    .status-code.success {
      background: #e8f5e9;
      color: #2e7d32;
    }

    .status-code.error {
      background: #ffebee;
      color: #c62828;
    }

    .response-body {
      background: #f8f9fa;
      color: #333;
      padding: 20px;
      border-radius: 8px;
      font-family: 'Segoe UI', 'Courier New', monospace;
      font-size: 13px;
      overflow-x: auto;
      line-height: 1.6;
      border: 1px solid #e9ecef;
    }

    .response-toolbar {
      display: flex;
      gap: 10px;
      margin-bottom: 15px;
      justify-content: flex-end;
    }

    .response-toolbar button {
      padding: 6px 12px;
      background: #667eea;
      color: white;
      border: none;
      border-radius: 4px;
      font-size: 12px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .response-toolbar button:hover {
      background: #764ba2;
    }

    .response-toolbar button.copied {
      background: #28a745;
    }

    .json-tree {
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .json-item {
      margin: 0;
      padding: 0;
    }

    .json-key {
      color: #0066cc;
      font-weight: 500;
    }

    .json-string {
      color: #a31515;
    }

    .json-number {
      color: #098658;
    }

    .json-boolean {
      color: #d73a49;
      font-weight: 600;
    }

    .json-null {
      color: #6f42c1;
      font-style: italic;
    }

    .json-toggle {
      background: none;
      border: none;
      cursor: pointer;
      padding: 0 4px;
      color: #667eea;
      font-weight: bold;
      font-size: 12px;
      vertical-align: top;
      width: 20px;
      text-align: center;
      transition: transform 0.2s;
    }

    .json-toggle:hover {
      transform: scale(1.2);
    }

    .json-toggle.collapsed {
      transform: rotate(-90deg);
    }

    .json-content {
      display: block;
      margin-left: 20px;
      border-left: 2px solid #e9ecef;
      padding-left: 12px;
    }

    .json-content.hidden {
      display: none;
    }

    .json-bracket {
      color: #666;
      font-weight: 600;
    }

    .json-item-row {
      display: flex;
      padding: 2px 0;
    }

    .json-item-row:hover {
      background: #f0f0f0;
      border-radius: 2px;
      padding-left: 4px;
    }

    .json-row-content {
      flex: 1;
    }

    .placeholder {
      color: #999;
      text-align: center;
      padding: 60px 20px;
      font-size: 14px;
    }

    /* Param type: select */
    .form-group select {
      width: 100%;
      padding: 10px;
      border: 1px solid #ddd;
      border-radius: 5px;
      font-size: 14px;
      font-family: inherit;
      background: white;
      cursor: pointer;
      color: #333;
    }

    .form-group select:focus {
      outline: none;
      border-color: #667eea;
      box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    /* Param type: multicheck chips + text input */
    .multicheck-group {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      padding: 6px 0 2px;
    }

    .multicheck-chip {
      padding: 3px 10px;
      background: #f5f5f5;
      border: 1px solid #ddd;
      border-radius: 20px;
      font-size: 12px;
      cursor: pointer;
      transition: all 0.15s;
      font-family: inherit;
      color: #555;
      line-height: 1.6;
    }

    .multicheck-chip:hover {
      background: #eef0ff;
      border-color: #667eea;
      color: #667eea;
    }

    .multicheck-chip.active {
      background: #667eea;
      border-color: #667eea;
      color: white;
      font-weight: 600;
    }

    /* Saved Accounts on login screen */
    .saved-accounts-section {
      margin-bottom: 0;
    }

    .saved-accounts-section h3 {
      font-size: 13px;
      color: #666;
      margin-bottom: 10px;
      font-weight: 500;
    }

    .account-cards {
      display: flex;
      flex-direction: column;
      gap: 8px;
      max-height: 220px;
      overflow-y: auto;
      margin-bottom: 16px;
    }

    .account-card {
      display: flex;
      align-items: center;
      padding: 12px;
      background: #f5f5f5;
      border: 2px solid transparent;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .account-card:hover {
      background: #eef0ff;
      border-color: #667eea;
    }

    .account-card-info {
      flex: 1;
      min-width: 0;
    }

    .account-card-name {
      font-weight: 600;
      font-size: 14px;
      color: #333;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .account-card-key {
      font-size: 11px;
      color: #999;
      font-family: monospace;
      margin-top: 2px;
    }

    .account-card-delete {
      background: none;
      border: none;
      color: #ccc;
      font-size: 20px;
      cursor: pointer;
      padding: 0 4px;
      line-height: 1;
      transition: color 0.2s;
      flex-shrink: 0;
    }

    .account-card-delete:hover {
      color: #c33;
    }

    .form-divider {
      border: none;
      border-top: 1px solid #eee;
      margin: 20px 0;
    }

    .form-toggle-link {
      background: none;
      border: none;
      color: #667eea;
      font-size: 13px;
      cursor: pointer;
      padding: 0;
      text-decoration: underline;
      margin-top: 10px;
      display: inline-block;
    }

    .form-toggle-link:hover {
      color: #764ba2;
    }

    .checkbox-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 20px;
    }

    .checkbox-row input[type="checkbox"] {
      width: auto;
      margin: 0;
      cursor: pointer;
    }

    .checkbox-row label {
      margin: 0;
      font-weight: normal;
      cursor: pointer;
      font-size: 14px;
    }

    /* Account Switcher in Header */
    .account-switcher {
      position: relative;
    }

    .account-switcher-btn {
      padding: 8px 14px;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border: none;
      border-radius: 5px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
      transition: opacity 0.2s;
    }

    .account-switcher-btn:hover {
      opacity: 0.88;
    }

    .account-dropdown {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      background: white;
      border: 1px solid #ddd;
      border-radius: 8px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
      min-width: 230px;
      z-index: 200;
      overflow: hidden;
      display: none;
    }

    .account-dropdown.open {
      display: block;
    }

    .account-dropdown-header {
      padding: 10px 14px;
      font-size: 11px;
      color: #999;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      background: #f9f9f9;
      border-bottom: 1px solid #eee;
    }

    .account-dropdown-item {
      display: flex;
      align-items: center;
      padding: 10px 14px;
      cursor: pointer;
      transition: background 0.15s;
      gap: 8px;
    }

    .account-dropdown-item:hover {
      background: #f5f5f5;
    }

    .account-dropdown-item.active {
      background: #f0f0ff;
    }

    .account-dropdown-item-name {
      flex: 1;
      font-size: 13px;
      font-weight: 500;
      color: #333;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .account-dropdown-item-badge {
      font-size: 10px;
      color: #667eea;
      font-weight: 700;
      background: #eef0ff;
      padding: 2px 6px;
      border-radius: 10px;
      flex-shrink: 0;
    }

    .account-dropdown-divider {
      border: none;
      border-top: 1px solid #eee;
      margin: 4px 0;
    }

    .account-dropdown-action {
      display: block;
      width: 100%;
      text-align: left;
      padding: 10px 14px;
      background: none;
      border: none;
      cursor: pointer;
      font-size: 13px;
      color: #555;
      transition: background 0.15s;
    }

    .account-dropdown-action:hover {
      background: #f5f5f5;
      color: #333;
    }

    .account-dropdown-action.danger {
      color: #c33;
    }

    .account-dropdown-action.danger:hover {
      background: #fff5f5;
    }

    @media (max-width: 1024px) {
      .main-layout {
        grid-template-columns: 1fr;
      }

      .sidebar {
        max-height: none;
      }

      .header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
      }

      .header-brand { justify-content: center; }

      .header-right {
        justify-content: center;
        flex-wrap: wrap;
      }
    }

/* Page nav */
.page-nav { display: flex; gap: 4px; padding: 0 24px; background: #fff; border-bottom: 1px solid #eee; }
.page-tab { padding: 14px 20px; border: none; background: none; font-size: 14px; font-weight: 600;
  color: #888; cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit; }
.page-tab:hover { color: #555; }
.page-tab.active { color: #667eea; border-bottom-color: #667eea; }

.sidebar-filter { position: sticky; top: 0; z-index: 2; padding: 12px; background: #fafafa; border-bottom: 1px solid #eee; }
.sidebar-filter input { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; font-family: inherit; }
.sidebar-section.filtered-out, .endpoint-item.filtered-out { display: none; }

.provider-chips { display: flex; gap: 8px; }
.provider-chip { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 14px;
  background: #f4f4f7; font-size: 12px; color: #555; }
.provider-chip .chip-dot { width: 7px; height: 7px; border-radius: 50%; background: #bbb; }
.provider-chip.connected .chip-dot { background: #2ecc71; }
.provider-chip.saved .chip-dot { background: #f39c12; }
.provider-chip.error .chip-dot { background: #e74c3c; }
.provider-chip button { border: none; background: none; cursor: pointer; color: #667eea; font-size: 12px; padding: 0; font-family: inherit; }

.connect-card { max-width: 520px; margin: 40px auto; padding: 28px; background: #fff;
  border: 1px solid #eee; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.05); }
.connect-card h3 { margin-bottom: 8px; }
.connect-card p { color: #666; font-size: 13px; margin-bottom: 18px; }

.main-layout.gated .sidebar,
.main-layout.gated .placeholder,
.main-layout.gated [id$="-endpointDetails"] { display: none; }

.documented-dot { margin-left: auto; color: #2ecc71; font-size: 9px; }

.inferred-note { padding: 10px 12px; margin-bottom: 18px; border-left: 3px solid #f39c12;
  background: #fff8ec; color: #8a6d3b; font-size: 12px; border-radius: 4px; }

.provider-fieldset { border: 1px solid #eee; border-radius: 8px; padding: 14px; margin-bottom: 14px; }
.provider-fieldset-title { font-size: 13px; font-weight: 700; color: #444; margin-bottom: 10px; }
.provider-fieldset-title span { font-weight: 400; color: #aaa; font-size: 11px; margin-left: 4px; }
.account-card-badges { display: flex; gap: 4px; align-items: center; }
.account-badge { width: 18px; height: 18px; border-radius: 4px; font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; background: #667eea; color: #fff; }
.account-badge.add { background: #f0f0f4; color: #667eea; cursor: pointer; border: 1px dashed #c9c9d6; }
/* A stored credential that will not decrypt — distinct from "not configured", because
   the fix is different: the server's ENCRYPTION_KEY changed and it must be re-entered. */
.account-badge.warn { background: #fdecea; color: #b3392b; border: 1px solid #f0b3ab; }

.body-section .section-title { display: flex; align-items: center; justify-content: space-between; }
.mode-toggle { display: inline-flex; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.mode-btn { padding: 5px 12px; border: none; background: #fff; font-size: 12px; color: #666;
  cursor: pointer; font-family: inherit; }
.mode-btn.active { background: #667eea; color: #fff; }
.raw-json { width: 100%; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12px;
  border: 1px solid #ddd; border-radius: 6px; padding: 12px; line-height: 1.5; }
.raw-json-toolbar { margin-top: 8px; }
.body-error { display: none; margin-top: 10px; padding: 10px; border-radius: 6px;
  background: #fdecea; color: #c0392b; font-size: 12px; }
.body-error.show { display: block; }
.body-empty { color: #999; font-size: 13px; }
.free-query { margin-top: 20px; }
.query-row { display: flex; gap: 8px; margin-bottom: 8px; }
.query-row input { flex: 1; padding: 8px; border: 1px solid #ddd; border-radius: 6px; font-family: inherit; }
.query-row button { width: 34px; border: 1px solid #ddd; border-radius: 6px; background: #fff; cursor: pointer; }

/* ===== Workspace / n8n settings ===== */

.modal-backdrop { display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(24, 24, 32, .45); padding: 40px 20px; overflow-y: auto; }
.modal-backdrop.open { display: block; }
.modal-card { max-width: 620px; margin: 0 auto; background: #fff; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid #eee; }
.modal-head h3 { font-size: 16px; color: #333; }
.modal-close { border: none; background: none; font-size: 22px; line-height: 1; color: #999;
  cursor: pointer; padding: 0 4px; font-family: inherit; }
.modal-close:hover { color: #555; }
.modal-body { padding: 8px 24px 24px; }

/* ===== Sign-in ===== */

.signin-card { max-width: 380px; }
.signin-note { margin-top: 22px; padding-top: 18px; border-top: 1px solid #eee;
  font-size: 11.5px; line-height: 1.6; color: #9a9aa8; }
.signin-note code { padding: 1px 5px; border-radius: 4px; background: #f0f0f6;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 11px; color: #6a6a7a; }
#signinButton:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ===== One-time import banner ===== */

.import-banner { padding: 14px; margin-bottom: 20px; border-radius: 8px;
  background: #fff8ec; border: 1px solid #f0d9ae; }
.import-banner-text { font-size: 12.5px; line-height: 1.6; color: #8a6d3b; margin-bottom: 12px; }
.import-banner-actions { display: flex; gap: 8px; }
/* Once the import has run the banner reports the outcome instead of asking. */
.import-banner.done { background: #e8f7ee; border-color: #9fd8b4; }
.import-banner.done .import-banner-text { color: #227a45; }

.account-card-warn { color: #b3392b; font-weight: 600; }

/* Workspace header on the login card — states the container the sub-accounts sit in. */
.ws-login-header { padding: 14px; margin-bottom: 20px; background: #f7f7fb;
  border: 1px solid #ececf2; border-radius: 8px; }
.ws-login-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: #9a9aa8; margin-bottom: 4px; }
.ws-login-name { width: 100%; padding: 4px 6px; margin-left: -6px; font-size: 16px; font-weight: 700;
  font-family: inherit; color: #2f2f3a; background: transparent; border: 1px solid transparent;
  border-radius: 5px; }
.ws-login-name:hover { border-color: #dcdce6; background: #fff; }
.ws-login-name:focus { outline: none; border-color: #667eea; background: #fff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, .1); }
.ws-login-n8n { display: flex; align-items: baseline; gap: 6px; margin-top: 8px;
  font-size: 11.5px; line-height: 1.5; color: #85858f; }
.ws-login-n8n strong { color: #55555f; font-weight: 600; }
.ws-login-n8n .n8n-binding-dot { position: relative; top: 4px; }

.ws-section { padding: 18px 0; border-bottom: 1px solid #f0f0f4; }
.ws-section:last-child { border-bottom: none; }
.ws-section h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px;
  color: #8a8a99; margin-bottom: 14px; }
.ws-muted { font-size: 12px; color: #8a8a99; line-height: 1.6; margin-bottom: 12px; }

.ws-status { font-size: 13px; padding: 9px 12px; border-radius: 6px; margin-bottom: 12px;
  background: #f4f4f7; color: #666; }
.ws-status.ok { background: #e8f7ee; color: #227a45; }
.ws-status.bad { background: #fdecea; color: #b3392b; }

.ws-note { font-size: 12px; line-height: 1.6; padding: 10px 12px; margin-bottom: 12px;
  border-left: 3px solid #f39c12; background: #fff8ec; color: #8a6d3b; border-radius: 4px; }
.ws-note.bad { border-left-color: #e74c3c; background: #fdecea; color: #a33224; }

.ws-subs { margin-top: 16px; padding: 14px; background: #fafafc; border-radius: 8px; }
.ws-subs-title { font-size: 12px; font-weight: 700; color: #555; margin-bottom: 10px; }
.ws-sub-list { list-style: none; margin-bottom: 10px; }
.ws-sub-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0;
  font-size: 13px; color: #444; border-bottom: 1px solid #f0f0f4; }
.ws-sub-list li:last-child { border-bottom: none; }
.ws-sub-name { font-weight: 600; }
.ws-sub-tags { display: flex; gap: 4px; }
.ws-tag { padding: 1px 7px; border-radius: 10px; background: #ececf4; color: #6a6a7a; font-size: 11px; }
.ws-tag.active { background: #667eea; color: #fff; margin-left: auto; }
.ws-empty { color: #aaa; font-style: italic; }

.ws-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.modal-body select { width: 100%; padding: 10px 12px; border: 2px solid #e0e0e0;
  border-radius: 5px; font-size: 14px; font-family: inherit; background: #fff; color: #333; }
.modal-body select:focus { outline: none; border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, .1); }

/* ======= Make → n8n converter =======
   Uses the same sidebar + content cards as the API pages: the scenario list is the
   sidebar's job, exactly as the endpoint list is on the other two pages. */

.convert-heading { font-size: 16px; color: #333; margin: 0 0 4px; }
.convert-heading + .response-body, .convert-report + .convert-heading { margin-top: 24px; }

.convert-hint { margin: 0 0 12px; font-size: 13px; color: #666; line-height: 1.5; }
.convert-hint-small { font-size: 12px; margin-bottom: 8px; }
.convert-warning { margin: 0 0 12px; font-size: 13px; color: #c62828; }
.convert-alert { color: #c62828; font-weight: 600; }

/* Stacked in a 300px sidebar, so the fields go full width and the button follows. */
.convert-connect { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.convert-field { width: 100%; padding: 9px 11px; border: 2px solid #e0e0e0; border-radius: 5px;
  font-size: 13px; font-family: inherit; background: #fff; color: #333; }
.convert-field:focus { outline: none; border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, .1); }
.convert-connect .btn { width: 100%; margin: 0; }

.convert-connected { display: flex; align-items: center; gap: 8px; font-size: 13px;
  color: #333; margin-bottom: 6px; }
.convert-links { display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  font-size: 12px; }

.convert-search { margin-bottom: 10px; }

/* Capped so a long list scrolls inside the sidebar rather than stretching the page. */
.convert-scenarios { display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; }

.convert-scenario { display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: left; padding: 9px 11px; border: 1px solid #e9ecef;
  border-radius: 6px; background: #f8f9fa; cursor: pointer; font-family: inherit; }
.convert-scenario:hover { border-color: #667eea; background: #fff; }
.convert-scenario:focus-visible { outline: 2px solid #667eea; outline-offset: 2px; }
.convert-scenario-name { font-size: 13px; font-weight: 600; color: #333; line-height: 1.3; }
.convert-scenario-meta { font-size: 11px; color: #888; }

.convert-result-head { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px; margin-bottom: 14px; }
.convert-result-head > div { flex: 1 1 auto; min-width: 0; }
/* .btn is width:100% app-wide (it suits the login forms). Here it sits beside a
   heading, so it has to size to its label or it pushes past the card edge. */
.convert-result-head .btn { margin: 0; width: auto; flex: 0 0 auto; padding: 10px 18px;
  font-size: 14px; }
.convert-source { margin: 0; font-size: 12px; color: #777; }

/* Monospace so the symbol, id and module name line up down the left edge and the
   report can be scanned rather than read. */
.convert-report { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px;
  padding: 18px; font-family: 'Courier New', monospace; font-size: 12px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word; margin: 0; color: #333; }

/* Secondary by design: pasting is the fallback once Make is connected. */
.convert-paste { margin-top: 26px; border-top: 1px solid #eee; padding-top: 18px; }
.convert-paste summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #667eea; }
.convert-paste[open] summary { margin-bottom: 12px; }
.convert-input { width: 100%; padding: 12px; border: 2px solid #e0e0e0; border-radius: 8px;
  font-family: 'Courier New', monospace; font-size: 12px; line-height: 1.5; resize: vertical;
  background: #fff; color: #333; }
.convert-input:focus { outline: none; border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, .1); }

.convert-status { margin: 14px 0 0; font-size: 13px; color: #667eea; min-height: 18px; }

.convert-folder { margin-bottom: 8px; cursor: pointer; }

/* The row IS the convert action, so it has to look like one. */
.convert-scenario { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.convert-scenario-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.convert-scenario-go { flex-shrink: 0; font-size: 11px; font-weight: 600; color: #667eea;
  opacity: 0; transition: opacity .15s; }
.convert-scenario:hover .convert-scenario-go,
.convert-scenario:focus-visible .convert-scenario-go { opacity: 1; }
.convert-scenario.is-busy { border-color: #667eea; background: #fff; }
.convert-scenario.is-busy .convert-scenario-go { opacity: 1; content: none; }

/* Credential mapping, chosen per conversion. */
.convert-credentials:not(:empty) { margin-top: 24px; }
.convert-cred-table { width: 100%; border-collapse: collapse; }
.convert-cred-table td { padding: 10px 0; border-top: 1px solid #eee; vertical-align: middle; font-size: 13px; }
.convert-cred-table td:first-child { width: 45%; padding-right: 20px; }
.convert-cred-type { font-size: 11px; color: #888; }
.convert-cred-none { display: block; margin-top: 6px; font-size: 11px; color: #c62828; }

.convert-result-actions { display: flex; gap: 10px; flex-shrink: 0; }
.convert-result-actions .btn { margin: 0; width: auto; padding: 10px 18px; font-size: 14px; }
