@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ══════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════ */
:root {
  --bg:       #f5f5f6;
  --surface:  #ffffff;
  --surface2: #f4f4f5;
  --surface3: #e4e4e7;

  --border:  #e4e4e7;
  --border2: #d4d4d8;

  --brand:    #25d366;
  --brand-dk: #15803d;
  --brand-bg: #f0fdf4;

  --red:      #ef4444;
  --red-bg:   #fef2f2;
  --amber:    #f59e0b;
  --amber-bg: #fffbeb;
  --blue:     #3b82f6;
  --blue-bg:  #eff6ff;

  --text:  #18181b;
  --text2: #71717a;
  --text3: #a1a1aa;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 14px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
  --shadow-lg: 0 20px 48px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.06);

  --radius:    10px;
  --radius-sm: 7px;
  --radius-xs: 5px;
  --header-h:  56px;
  --t:         .12s ease;
}

/* ══════════════════════════════════════════
   RESET
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* Global: kill browser default outlines — we apply focus-visible instead */
*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--brand);
  color: #052210;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -.5px;
  flex-shrink: 0;
}

.logo-text  { font-weight: 800; font-size: 15px; letter-spacing: -.4px; }
.logo-badge {
  font-size: 10px;
  font-weight: 600;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text3);
  padding: 1px 7px;
  border-radius: 99px;
}

.header-nav { display: flex; gap: 2px; flex: 1; }

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-weight: 600;
  font-size: 13px;
  transition: color var(--t), background var(--t);
}
.nav-link:hover  { color: var(--text); background: var(--surface2); }
.nav-link.active { color: var(--text); background: var(--surface2); }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t), box-shadow var(--t), transform var(--t), border-color var(--t);
  white-space: nowrap;
  line-height: 1.3;
  -webkit-user-select: none;
  user-select: none;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* Primary — green */
.btn-primary {
  background: var(--brand);
  color: #052210;
}
.btn-primary:hover:not(:disabled) {
  background: #28de6d;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(37,211,102,.3);
}
.btn-primary:active:not(:disabled) { transform: none; box-shadow: none; }

/* Ghost — neutral */
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface2);
  border-color: var(--border2);
}

/* Danger ghost */
.btn-danger-ghost {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(239,68,68,.28);
}
.btn-danger-ghost:hover { background: var(--red-bg); border-color: rgba(239,68,68,.45); }

.btn-full { width: 100%; justify-content: center; }
.btn-sm   { padding: 5px 11px; font-size: 12px; }

/* ══════════════════════════════════════════
   MAIN LAYOUT & VIEWS
══════════════════════════════════════════ */
.main { max-width: 1280px; margin: 0 auto; padding: 32px 24px; }

.view        { display: none; }
.view.active { display: block; }

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
.view-title { font-size: 21px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 3px; }
.view-sub   { color: var(--text2); font-size: 13px; }

/* ══════════════════════════════════════════
   CHANNELS GRID
══════════════════════════════════════════ */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.empty-channels {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 32px;
  color: var(--text2);
}
.empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}
.empty-icon svg { width: 22px; height: 22px; }
.empty-channels h3 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-channels p  { font-size: 13px; margin-bottom: 22px; }

/* ══════════════════════════════════════════
   CHANNEL CARD
══════════════════════════════════════════ */
.channel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: box-shadow var(--t), border-color var(--t), transform var(--t);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

/* Status accent bar */
.channel-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border2);
}
.channel-card:has(.status-pill.ready)::before        { background: var(--brand); }
.channel-card:has(.status-pill.qr)::before           { background: var(--amber); }
.channel-card:has(.status-pill.connecting)::before    { background: var(--blue); }
.channel-card:has(.status-pill.auth_failure)::before  { background: var(--red); }

.channel-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-top: 6px;
}
.card-avatar {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--brand-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: var(--brand-dk);
  border: 1px solid rgba(37,211,102,.2);
  flex-shrink: 0;
}
.card-meta { flex: 1; margin-left: 11px; min-width: 0; }
.card-name   { font-weight: 700; font-size: 14.5px; letter-spacing: -.2px; margin-bottom: 2px; }
.card-number { font-size: 11.5px; color: var(--text3); font-family: 'JetBrains Mono', monospace; }

/* Stats row: first two = big metric, third = key */
.card-stats {
  display: flex;
  align-items: stretch;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.card-stat {
  font-size: 11px;
  font-weight: 500;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.card-stat:nth-child(-n+2) {
  flex: 1;
  text-align: center;
  padding: 0 8px;
}
.card-stat:nth-child(1) { padding-left: 0; border-right: 1px solid var(--border); margin-right: 8px; }
.card-stat:nth-child(2) { border-right: 1px solid var(--border); margin-right: 8px; }
.card-stat:nth-child(-n+2) strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.4px;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 2px;
}
.card-stat:last-child {
  flex: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}
.card-stat:last-child strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ══════════════════════════════════════════
   STATUS PILLS
══════════════════════════════════════════ */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px 2px 7px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.5;
}
.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
  opacity: .75;
}
.status-pill.ready        { background: var(--brand-bg); color: var(--brand-dk); border-color: rgba(37,211,102,.28); }
.status-pill.qr           { background: var(--amber-bg); color: var(--amber);    border-color: rgba(245,158,11,.28); }
.status-pill.connecting   { background: var(--blue-bg);  color: var(--blue);     border-color: rgba(59,130,246,.25); }
.status-pill.disconnected { background: var(--surface2); color: var(--text3);    border-color: var(--border); }
.status-pill.auth_failure { background: var(--red-bg);   color: var(--red);      border-color: rgba(239,68,68,.25); }

/* ══════════════════════════════════════════
   DETAIL VIEW
══════════════════════════════════════════ */
.detail-layout {
  display: grid;
  grid-template-columns: 284px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }

/* Back button — plain link, no browser outline */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text3);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 20px;
  padding: 0;
  background: none;
  border: none;
  outline: none !important;
  cursor: pointer;
  transition: color var(--t);
  -webkit-appearance: none;
}
.back-btn:hover          { color: var(--text); }
.back-btn:focus          { outline: none !important; }
.back-btn:focus-visible  { outline: none !important; }

.channel-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.channel-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  color: var(--brand-dk);
  border: 1px solid rgba(37,211,102,.2);
  flex-shrink: 0;
}
.channel-name   { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.channel-number { font-size: 11.5px; color: var(--text3); font-family: 'JetBrains Mono', monospace; margin-top: 1px; }

/* Connect card */
.connect-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}
.connect-hint { color: var(--text2); font-size: 13px; margin-bottom: 14px; line-height: 1.5; }

.qr-img {
  width: 184px;
  height: 184px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin: 0 auto 12px;
  display: block;
}
.qr-refresh { font-size: 11px; color: var(--text3); }

.ready-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-bg);
  border: 1.5px solid rgba(37,211,102,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  color: var(--brand-dk);
}
.ready-icon svg { width: 20px; height: 20px; }
.ready-label { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; }

.spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* API Key card */
.api-key-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
}
.api-key-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 8px;
}
.api-key-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-bottom: 8px;
  min-width: 0;
}
.api-key-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text2);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.copy-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  padding: 3px 7px;
  transition: var(--t);
  flex-shrink: 0;
  line-height: 1.4;
  display: flex;
  align-items: center;
}
.copy-btn:hover { color: var(--text); background: var(--surface3); }
.api-key-hint { font-size: 11.5px; color: var(--text3); line-height: 1.5; }

/* ══════════════════════════════════════════
   TABS
══════════════════════════════════════════ */
.tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.tab {
  padding: 9px 15px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--t), border-color var(--t);
  margin-bottom: -1px;
}
.tab:hover  { color: var(--text); }
.tab.active { color: var(--brand-dk); border-bottom-color: var(--brand); }
.tab-pane        { display: none; }
.tab-pane.active { display: block; }

/* ══════════════════════════════════════════
   PANE CARDS
══════════════════════════════════════════ */
.pane-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}
.pane-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.pane-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.pane-toolbar .pane-title { margin-bottom: 0; }
.mt16 { margin-top: 16px; }

/* ══════════════════════════════════════════
   FORMS
══════════════════════════════════════════ */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 700; color: var(--text2); margin-bottom: 5px; }
.form-hint  { font-size: 11.5px; color: var(--text3); margin-top: 4px; display: block; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 7px 11px;
  font-size: 13px;
  transition: border-color var(--t), box-shadow var(--t);
  box-shadow: var(--shadow-xs);
}
.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,211,102,.12);
}
.input::placeholder { color: var(--text3); }
select.input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.textarea { min-height: 108px; resize: vertical; }

.send-result {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}
.send-result.ok  { background: var(--brand-bg); border: 1px solid rgba(37,211,102,.25); color: var(--brand-dk); }
.send-result.err { background: var(--red-bg);   border: 1px solid rgba(239,68,68,.22);  color: var(--red); }

/* ══════════════════════════════════════════
   TABLE
══════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface2); }
.empty-cell { color: var(--text3); text-align: center; padding: 28px; }

.dir-in {
  display: inline-block; padding: 1px 7px; border-radius: 99px;
  background: var(--brand-bg); color: var(--brand-dk);
  border: 1px solid rgba(37,211,102,.25); font-size: 10px; font-weight: 700;
}
.dir-out {
  display: inline-block; padding: 1px 7px; border-radius: 99px;
  background: var(--blue-bg); color: var(--blue);
  border: 1px solid rgba(59,130,246,.22); font-size: 10px; font-weight: 700;
}
.msg-body { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2); }

.pagination { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 14px; }
.pagination button {
  padding: 4px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text2); font-size: 12px; cursor: pointer;
  transition: var(--t); box-shadow: var(--shadow-xs);
}
.pagination button:hover:not(:disabled) { background: var(--surface2); color: var(--text); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.pagination span { font-size: 12px; color: var(--text3); }

/* ══════════════════════════════════════════
   WEBHOOKS
══════════════════════════════════════════ */
.webhook-form { display: flex; flex-direction: column; }
.webhook-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.webhook-item:last-child { border-bottom: none; }
.webhook-info { flex: 1; min-width: 0; }
.webhook-url { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.webhook-meta { display: flex; gap: 6px; margin-top: 4px; }
.badge { padding: 1px 7px; border-radius: 99px; font-size: 10px; font-weight: 600; background: var(--surface2); color: var(--text3); border: 1px solid var(--border); }
.badge.on { background: var(--brand-bg); color: var(--brand-dk); border-color: rgba(37,211,102,.25); }

/* ══════════════════════════════════════════
   CODE BLOCKS
══════════════════════════════════════════ */
.code-block {
  background: #f8f9fc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12px;
  color: #1e2d3d;
  line-height: 1.8;
  overflow-x: auto;
  white-space: pre;
}
code {
  background: var(--surface2);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--brand-dk);
  border: 1px solid var(--border);
}

/* ══════════════════════════════════════════
   DOCS LAYOUT
══════════════════════════════════════════ */
.docs-layout { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: start; }
@media (max-width: 768px) { .docs-layout { grid-template-columns: 1fr; } }

.docs-nav {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-xs);
}
.docs-nav-section {
  font-size: 10px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .7px; padding: 14px 8px 4px;
}
.docs-nav-section:first-child { padding-top: 2px; }
.docs-nav-link {
  display: block; padding: 5px 8px; border-radius: var(--radius-xs);
  color: var(--text2); font-size: 13px; font-weight: 500; transition: var(--t);
}
.docs-nav-link:hover { color: var(--text); background: var(--surface2); }

.doc-section { margin-bottom: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--border); }
.doc-section:last-child { border-bottom: none; }
.doc-h2 { font-size: 18px; font-weight: 800; letter-spacing: -.35px; margin-bottom: 10px; }
.doc-p  { color: var(--text2); margin-bottom: 16px; font-size: 13.5px; line-height: 1.7; }
.doc-example { margin-bottom: 12px; }
.doc-example-label {
  font-size: 10.5px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px;
}
.endpoint-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.endpoint-path {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: var(--radius-sm); color: var(--text);
}
.method {
  padding: 3px 10px; border-radius: var(--radius-sm);
  font-size: 10.5px; font-weight: 700; letter-spacing: .4px;
}
.method.get    { background: var(--blue-bg);  color: var(--blue);     border: 1px solid rgba(59,130,246,.22); }
.method.post   { background: var(--brand-bg); color: var(--brand-dk); border: 1px solid rgba(37,211,102,.25); }
.method.delete { background: var(--red-bg);   color: var(--red);      border: 1px solid rgba(239,68,68,.22); }
.method.patch  { background: var(--amber-bg); color: var(--amber);    border: 1px solid rgba(245,158,11,.25); }
.params-table {
  margin-bottom: 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
}

/* ══════════════════════════════════════════
   MODAL
══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-header h3 { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.modal-close {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); color: var(--text2); font-size: 13px;
  cursor: pointer; padding: 3px 8px; line-height: 1.3; transition: var(--t);
}
.modal-close:hover { color: var(--text); background: var(--surface3); }
.modal-sub     { color: var(--text2); font-size: 13px; margin-bottom: 18px; line-height: 1.55; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13px; font-weight: 700; color: var(--text);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: slideUp .15s ease;
}
.toast.ok  { border-left-color: var(--brand); }
.toast.err { border-left-color: var(--red); }
@keyframes slideUp { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* ══════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════ */
.hidden { display: none !important; }
.mt16   { margin-top: 16px; }
