/* ─── ПЕРЕМЕННЫЕ ─────────────────────────────────────────────────────────── */
:root {
  --bg:        #0d0e11;
  --bg-panel:  #13151a;
  --bg-input:  #1a1d24;
  --bg-hover:  #1e2129;
  --border:    #2a2d38;
  --border-hi: #3d4155;

  --blue:      #4f8ef7;
  --blue-dim:  #2c4a8a;
  --green:     #3ddc84;
  --red:       #ff6b6b;
  --yellow:    #f5c842;
  --purple:    #b47cf7;

  --text:      #e2e4ed;
  --text-dim:  #c8cad8;
  --text-mute: #8a8fa8;

  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-ui:   'Unbounded', sans-serif;

  --radius:    8px;
  --radius-lg: 12px;
}


/* ─── СВЕТЛАЯ ТЕМА ───────────────────────────────────────────────────────── */
body.light {
  --bg:        #f0f2f7;
  --bg-panel:  #ffffff;
  --bg-input:  #f5f6fa;
  --bg-hover:  #ebedf5;
  --border:    #d4d7e3;
  --border-hi: #b0b4cc;

  --blue:      #1a56c4;
  --blue-dim:  #ccd9f5;
  --green:     #1a7a3f;
  --yellow:    #7a5c00;

  --text:      #0d0f1a;
  --text-dim:  #2e3250;
  --text-mute: #7a7f9a;
}

body.light::before {
  background-image:
    linear-gradient(rgba(79,142,247,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,142,247,.05) 1px, transparent 1px);
}

body.light .header {
  background: rgba(240,242,247,.92);
}

body.light .response-output { background: none; }

body.light .json-key    { color: #1a56c4; }
body.light .token-user    { border-color: #1a7a3f; color: #1a7a3f; background: rgba(26,122,63,.1); }
body.light .token-service { border-color: #7a5c00; color: #7a5c00; background: rgba(122,92,0,.1); }
body.light .modal-steps   { color: #2e3250; }
body.light .modal-desc    { color: #2e3250; }
body.light .json-string { color: #2a7a3b; }
body.light .json-number { color: #b8860b; }
body.light .json-bool   { color: #7b3fb0; }
body.light .json-null   { color: var(--text-mute); }

/* ─── КНОПКА ТЕМЫ ────────────────────────────────────────────────────────── */
.btn-theme {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-theme:hover { border-color: var(--blue); color: var(--blue); }

/* ─── СБРОС И BASE ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Сетка фона */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,142,247,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,142,247,.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* ─── ШАПКА ──────────────────────────────────────────────────────────────── */
.header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: rgba(13,14,17,.9);
  backdrop-filter: blur(12px);
}

.header-logo {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo-bracket { color: var(--blue); }
.logo-text    { color: var(--text); }
.logo-accent  { color: var(--blue); }

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

.user-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; color: var(--text-dim);
}
.user-badge strong { color: var(--green); }
.token-age {
  color: var(--text-mute);
  font-size: .7rem;
  font-weight: 400;
}

.btn-login {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--blue);
  background: transparent;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: .8rem;
  cursor: pointer;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.btn-login:hover { background: var(--blue); color: #fff; }

.btn-logout {
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-hi);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: .75rem;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }


/* ─── ИНФОРМАЦИОННЫЙ БЛОК ────────────────────────────────────────────────── */
.info-banner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 24px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.info-banner-text {
  font-size: .78rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.info-banner-title {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--text);
}

.info-banner-text a {
  color: var(--blue);
  text-decoration: none;
}
.info-banner-text a:hover { text-decoration: underline; }

.info-banner-links {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.info-banner-links a {
  font-size: .75rem;
  color: var(--text-mute);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.info-banner-links a:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.info-banner-contact {
  font-size: .78rem;
  color: var(--text-mute);
}
.info-banner-contact a {
  color: var(--blue);
  text-decoration: none;
  border: none;
  padding: 0;
}
.info-banner-contact a:hover { text-decoration: underline; }

body.light .info-banner { background: #fff; }

/* ─── ОСНОВНОЙ LAYOUT ────────────────────────────────────────────────────── */
.main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  height: calc(100vh - 56px);
}

/* ─── ПАНЕЛИ ─────────────────────────────────────────────────────────────── */
.panel {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-left  { border-right: 1px solid var(--border); }

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-blue   { background: var(--blue); box-shadow: 0 0 6px var(--blue); }
.dot-green  { background: var(--green); box-shadow: 0 0 6px var(--green); }

/* ─── ПОЛЯ ВВОДА ─────────────────────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group-row { flex-direction: row; align-items: flex-start; gap: 12px; }

.field-label {
  font-size: .7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 600;
}

.field-hint { font-size: .7rem; color: var(--text-mute); }

.field-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .85rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(79,142,247,.12);
}
.field-input::placeholder { color: var(--text-mute); }

/* Автодополнение метода */
.method-input-wrap { position: relative; }

.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  overflow: hidden;
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}
.suggestions.open { display: block; }

.suggestion-item {
  padding: 8px 12px;
  font-size: .82rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  transition: background .1s;
}
.suggestion-item:hover, .suggestion-item.selected {
  background: var(--bg-hover);
}
.suggestion-method { color: var(--blue); }
.suggestion-desc   { color: var(--text-mute); font-size: .72rem; flex-shrink: 0; }

/* ─── ПАРАМЕТРЫ ──────────────────────────────────────────────────────────── */
.params-container { display: flex; flex-direction: column; gap: 6px; }

.param-row {
  display: flex;
  gap: 6px;
  align-items: center;
  animation: slideIn .15s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.param-row .field-input { flex: 1; }
.param-name  { font-size: .78rem; color: var(--purple); }
.param-value { color: var(--green); }

.btn-remove-param {
  width: 28px; height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  font-size: .9rem;
  line-height: 1;
  transition: border-color .15s, color .15s;
  display: flex; align-items: center; justify-content: center;
}
.btn-remove-param:hover { border-color: var(--red); color: var(--red); }

/* ─── СТАТУС ТОКЕНА ──────────────────────────────────────────────────────── */
.token-status {
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: .78rem;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}
.token-user    { border-color: var(--green);  color: var(--green);  background: rgba(61,220,132,.08); }
.token-service { border-color: var(--yellow); color: var(--yellow); background: rgba(245,200,66,.08); }
.token-none    { border-color: var(--border); color: var(--text-mute); }

/* ─── КНОПКИ ─────────────────────────────────────────────────────────────── */
.btn-execute {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  border: none;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-ui);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  position: relative;
  overflow: hidden;
}
.btn-execute:hover {
  background: #6b9ff8;
  box-shadow: 0 4px 20px rgba(79,142,247,.35);
}
.btn-execute:active { transform: scale(.98); }
.btn-execute.loading { pointer-events: none; opacity: .7; }

.btn-arrow { font-size: 1rem; }

.btn-ghost {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-hi);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: .78rem;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

.btn-sm { padding: 5px 10px; font-size: .72rem; }

/* ─── URL PREVIEW ────────────────────────────────────────────────────────── */
.url-preview {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  overflow-x: auto;
}
.url-preview code {
  font-size: .75rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.btn-copy {
  align-self: flex-end;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: .72rem;
  cursor: pointer;
  transition: all .15s;
}
.btn-copy:hover { border-color: var(--blue); color: var(--blue); }

/* ─── ССЫЛКА НА ДОКИ ─────────────────────────────────────────────────────── */
.docs-link {
  color: var(--text-mute);
  font-size: .75rem;
  text-decoration: none;
  transition: color .15s;
}
.docs-link:hover { color: var(--blue); }

/* ─── ВКЛАДКИ ────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.tab {
  padding: 12px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.tab-active { border-color: var(--blue); color: var(--blue); }

.badge {
  background: var(--blue-dim);
  color: var(--blue);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: .65rem;
}
.badge:empty { display: none; }

/* ─── КОНТЕНТ ВКЛАДОК ────────────────────────────────────────────────────── */
.tab-content { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.tab-content.active { display: flex; }

/* ─── ОТВЕТ ──────────────────────────────────────────────────────────────── */
.response-header {
  padding: 8px 16px;
  font-size: .75rem;
  min-height: 30px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.status-ok    { color: var(--green); }
.status-error { color: var(--red); }
.status-time  { color: var(--text-mute); margin-left: auto; }

.response-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.toggle-wrap {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem; color: var(--text-mute);
  cursor: pointer;
}

.response-output {
  flex: 1;
  overflow: auto;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: .78rem;
  line-height: 1.7;
  tab-size: 2;
  background: none;
  white-space: pre;
}

/* Подсветка JSON */
.json-key     { color: #9ec5f7; }
.json-string  { color: #98d882; }
.json-number  { color: #f7c948; }
.json-bool    { color: #b47cf7; }
.json-null    { color: var(--text-mute); }
.json-comment { color: var(--text-mute); font-style: italic; }
.json-error   { color: var(--red); }

/* ─── ИСТОРИЯ ────────────────────────────────────────────────────────────── */
.history-toolbar {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-item {
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-input);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.history-item:hover { border-color: var(--border-hi); background: var(--bg-hover); }

.history-method {
  font-size: .82rem;
  color: var(--blue);
  font-weight: 500;
}
.history-meta {
  font-size: .7rem;
  color: var(--text-mute);
  display: flex; gap: 10px;
}
.history-status-ok    { color: var(--green); }
.history-status-error { color: var(--red); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-mute);
  font-size: .8rem;
}

/* ─── СПРАВКА ────────────────────────────────────────────────────────────── */
.docs-content {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.docs-content h3 {
  font-family: var(--font-ui);
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--blue);
  text-transform: uppercase;
  margin-top: 8px;
}
.docs-content p { font-size: .8rem; color: var(--text-dim); line-height: 1.6; }
.docs-content ul { list-style: none; padding: 0; }
.docs-content li { font-size: .8rem; color: var(--text-dim); padding: 3px 0; }
.docs-content code {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--blue);
  font-size: .78rem;
}
.docs-ext-link {
  display: block;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  text-decoration: none;
  font-size: .78rem;
  transition: border-color .15s, color .15s;
}
.docs-ext-link:hover { border-color: var(--blue); color: var(--blue); }

/* ─── УВЕДОМЛЕНИЕ ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--bg-panel);
  border: 1px solid var(--border-hi);
  color: var(--text);
  font-size: .8rem;
  font-weight: 600;
  z-index: 999;
  transform: translateY(80px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red);   }

body.light .toast           { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.15); }
body.light .toast.success   { border-color: #1a7a3f; color: #1a7a3f; }
body.light .toast.error     { border-color: #c0392b; color: #c0392b; }



/* ─── МОДАЛЬНОЕ ОКНО ─────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  margin: 16px;
}

.modal-title {
  font-family: var(--font-ui);
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.modal-desc {
  font-size: .78rem;
  color: var(--text-dim);
  margin-bottom: 20px;
  line-height: 1.6;
}
.modal-desc a { color: var(--blue); text-decoration: none; }
.modal-desc a:hover { text-decoration: underline; }

.modal-input-wrap { display: flex; gap: 8px; margin-bottom: 12px; }
.modal-input-wrap .field-input { flex: 1; font-size: .8rem; }

.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

.modal-error {
  font-size: .75rem;
  color: var(--red);
  margin-top: 4px;
  min-height: 18px;
}

.modal-steps {
  background: var(--bg);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: .76rem;
  color: var(--text-dim);
  line-height: 1.8;
}
.modal-steps ol { margin: 0; padding-left: 18px; }
.modal-steps li { margin-bottom: 4px; }
.modal-steps code {
  background: var(--bg-panel);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--blue);
  font-size: .75rem;
}

.modal-toggle-steps {
  font-size: .75rem;
  color: var(--blue);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 14px;
  text-decoration: underline;
  font-family: var(--font-mono);
}

body.light .modal-steps { color: #2e3250; }
body.light .modal-desc  { color: #2e3250; }

/* ─── НАВИГАЦИЯ ──────────────────────────────────────────────────────────── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  margin: 0 24px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: color .15s, border-color .15s, background .15s;
  white-space: nowrap;
}
.nav-item:hover {
  color: var(--text);
  background: var(--bg-hover);
}
.nav-item-active {
  color: var(--blue);
  border-color: var(--border);
  background: var(--bg-input);
}
body.light .nav-item        { color: #0d0f1a; }
body.light .nav-item:hover  { color: #0d0f1a; }
body.light .nav-item-active { color: var(--blue); }
.nav-icon { font-style: normal; font-size: .85rem; }

/* ─── СТРАНИЦЫ ИНСТРУМЕНТОВ ──────────────────────────────────────────────── */
.tool-page {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 56px);
}

.tool-sidebar {
  border-right: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tool-content {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tool-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.tool-section-title {
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

/* Прогресс-бар */
.progress-wrap {
  display: none;
  flex-direction: column;
  gap: 6px;
}
.progress-wrap.visible { display: flex; }
.progress-bar-bg {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
  transition: width .3s ease;
  width: 0%;
}
.progress-label {
  font-size: .72rem;
  color: var(--text-mute);
}

/* Таблица результатов */
.result-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: calc(100vh - 220px);
}
.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}
.result-table th {
  background: var(--bg-input);
  color: var(--text-dim);
  font-weight: 600;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
.result-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.result-table tr:last-child td { border-bottom: none; }
.result-table tr:hover td { background: var(--bg-hover); }
.result-table .cell-id   { color: var(--text-mute); font-size: .72rem; }
.result-table .cell-name { color: var(--text); font-weight: 500; }
.result-table .cell-link a { color: var(--blue); text-decoration: none; font-size: .72rem; }
.result-table .cell-link a:hover { text-decoration: underline; }

/* Счётчик результатов */
.result-count {
  font-size: .78rem;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-count strong { color: var(--green); }

/* Предупреждение о токене */
.token-warning {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--yellow);
  background: rgba(245,200,66,.06);
  color: var(--yellow);
  font-size: .78rem;
  line-height: 1.5;
  display: none;
}
.token-warning.visible { display: block; }
body.light .token-warning { background: rgba(122,92,0,.06); }

/* ─── СКРОЛЛБАР ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #55596e; }

/* ─── АДАПТИВ ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .main { grid-template-columns: 1fr; height: auto; }
  .panel { max-height: none; }
  .panel-left { border-right: none; border-bottom: 1px solid var(--border); }
  .header-logo .logo-text { display: none; }
}
