/* П.А.У.К. — Аналитический портал */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --hdr-h:   58px;
  --tabs-h:  44px;
  --ftr-h:   42px;
  --left-w:  220px;
  --right-w: 300px;

  --bg:        #F4F2ED;
  --surface:   #FFFFFF;
  --surface2:  #F0EDE6;
  --border:    #E2DDD5;
  --text:      #1A1916;
  --muted:     #8A8278;
  --accent:    #B5341D;
  --accent-bg: rgba(181,52,29,0.07);
  --green:     #1A7A42;
  --green-bg:  rgba(26,122,66,0.08);
  --amber:     #A07000;
  --amber-bg:  rgba(160,112,0,0.08);
  --red:       #C0321A;
  --red-bg:    rgba(192,50,26,0.08);
  --blue:      #1B5EA0;
  --blue-bg:   rgba(27,94,160,0.08);

  --shadow:    0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.1);
  --r:         8px;
  --r-sm:      5px;
  --ff:        'Inter', system-ui, sans-serif;
  --ff-h:      'Playfair Display', Georgia, serif;
  --ff-mono:   'JetBrains Mono', monospace;
  --trans:     0.18s ease;
}

.dark {
  --bg:        #111118;
  --surface:   #1B1B26;
  --surface2:  #141420;
  --border:    #28283A;
  --text:      #E2E0D8;
  --muted:     #6A6878;
  --accent-bg: rgba(181,52,29,0.12);
  --green-bg:  rgba(26,122,66,0.12);
  --amber-bg:  rgba(160,112,0,0.12);
  --red-bg:    rgba(192,50,26,0.12);
  --blue-bg:   rgba(27,94,160,0.12);
  --shadow:    0 1px 3px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.2);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.4);
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[x-cloak] { display: none !important; }
html, body { height: 100%; overflow: hidden; }
body { font-family: var(--ff); background: var(--bg); color: var(--text); font-size: 14px; }
button { font-family: var(--ff); cursor: pointer; border: none; }
a { text-decoration: none; color: inherit; }
input { font-family: var(--ff); }

/* ── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ════════════════════════════════════════════════════════════════
   LOGIN
════════════════════════════════════════════════════════════════ */
.login-wrap {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 30% 40%, rgba(181,52,29,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(27,94,160,0.05) 0%, transparent 60%);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 44px;
  width: 400px;
  box-shadow: var(--shadow-lg);
}

.login-brand {
  text-align: center;
  margin-bottom: 36px;
}
.login-spider {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 8px rgba(181,52,29,0.25));
  animation: hover 3s ease-in-out infinite;
}
@keyframes hover { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }

.login-title {
  font-family: var(--ff-h);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text);
  margin-bottom: 6px;
}
.login-sub {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.field label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.field input {
  padding: 11px 14px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 0.93rem;
  outline: none;
  transition: border-color var(--trans);
}
.field input:focus { border-color: var(--accent); }
.field input::placeholder { color: var(--muted); opacity: 0.6; }

.login-err {
  font-size: 0.82rem;
  color: var(--red);
  background: var(--red-bg);
  padding: 9px 12px;
  border-radius: var(--r-sm);
  margin-bottom: 14px;
}
.btn-login {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: opacity var(--trans), transform var(--trans);
  margin-top: 4px;
}
.btn-login:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.btn-login:disabled { opacity: 0.45; cursor: not-allowed; }

/* ════════════════════════════════════════════════════════════════
   APP SHELL
════════════════════════════════════════════════════════════════ */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── Header ─────────────────────────────────────────────────────── */
.hdr {
  height: var(--hdr-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 10;
}
.hdr-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.hdr-spider {
  font-size: 1.5rem;
  filter: drop-shadow(0 1px 4px rgba(181,52,29,0.3));
}
.hdr-title {
  font-family: var(--ff-h);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text);
}
.hdr-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hdr-user {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}
.btn-hdr {
  width: 32px; height: 32px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  transition: border-color var(--trans), color var(--trans);
}
.btn-hdr:hover { border-color: var(--accent); color: var(--accent); }

/* ── Module Tabs ────────────────────────────────────────────────── */
.tabs-bar {
  height: var(--tabs-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 2px;
  flex-shrink: 0;
}
.tab-btn {
  padding: 7px 18px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  transition: background var(--trans), color var(--trans);
  white-space: nowrap;
}
.tab-btn:hover { background: var(--surface2); color: var(--text); }
.tab-btn.active {
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 600;
}
.tab-soon {
  font-size: 0.65rem;
  background: var(--border);
  color: var(--muted);
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Main body ──────────────────────────────────────────────────── */
.body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ── Left panel ─────────────────────────────────────────────────── */
.panel-left {
  width: var(--left-w);
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 12px;
  overflow-y: auto;
  flex-shrink: 0;
}
.panel-left-title {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.panel-left-empty {
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.6;
  text-align: center;
  padding-top: 20px;
}

/* ── Center ─────────────────────────────────────────────────────── */
.panel-center {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

/* ── Right panel (notifications) ───────────────────────────────── */
.panel-right {
  width: var(--right-w);
  border-left: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.notif-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.notif-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.notif-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.btn-notif-clear {
  font-size: 0.72rem;
  color: var(--muted);
  background: transparent;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: color var(--trans), border-color var(--trans);
}
.btn-notif-clear:hover { color: var(--red); border-color: var(--red); }
.notif-filter {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.filter-btn {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all var(--trans);
}
.filter-btn.active { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }

.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.notif-empty {
  text-align: center;
  padding: 30px 10px;
  color: var(--muted);
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Notification card */
.notif-card {
  border-left: 3px solid transparent;
  background: var(--surface2);
  border-radius: var(--r-sm);
  padding: 9px 10px;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }
.notif-card.lvl-info    { border-left-color: var(--blue); }
.notif-card.lvl-success { border-left-color: var(--green); }
.notif-card.lvl-warning { border-left-color: var(--amber); }
.notif-card.lvl-error   { border-left-color: var(--red); }

.nc-top { display: flex; justify-content: space-between; margin-bottom: 3px; }
.nc-bot { font-size: 0.68rem; color: var(--muted); font-weight: 600; }
.nc-time { font-size: 0.68rem; color: var(--muted); font-family: var(--ff-mono); }
.nc-title { font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.nc-body { font-size: 0.78rem; color: var(--muted); line-height: 1.4; white-space: pre-line; }
.nc-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.nc-act-btn {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background var(--trans);
}
.nc-act-btn:hover { background: var(--border); }
.nc-dl-btn {
  font-size: 0.72rem;
  padding: 4px 10px;
  background: var(--blue);
  color: #fff;
  border-radius: 10px;
  border: none;
  margin-top: 6px;
  transition: opacity var(--trans);
}
.nc-dl-btn:hover { opacity: 0.85; }

/* ── Bot section in center ──────────────────────────────────────── */
.bot-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: visible;
  flex-shrink: 0;
}

.bot-sec-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.bot-sec-left { flex: 1; min-width: 0; }
.bot-sec-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.bot-sec-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.bot-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-online  { background: var(--green); box-shadow: 0 0 5px rgba(26,122,66,0.4); }
.dot-offline { background: var(--muted); }
.bot-updated {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--ff-mono);
}
.bot-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 4px;
}

.bot-sec-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: flex-start;
  flex-shrink: 0;
}
.btn-action {
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all var(--trans);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-action:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Иконки модуля (шапка секции) и команд (кнопки) ──────────────────
   Картинка из /static/icons/, эмодзи-фоллбэк если файла нет (см. app.js
   iconOnError). Используется во всех модулях через MODULE_ICON_FILES /
   COMMAND_ICON_FILES в app.js — не нужно ничего менять в manifest.json. */
.mod-icon-wrap {
  display: inline-flex;
  align-items: center;
  width: 18px;
  height: 18px;
  margin-right: 4px;
  vertical-align: -3px;
}
.mod-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
}
.mod-icon-fallback {
  font-size: 0.95rem;
}
.cmd-icon-wrap {
  display: inline-flex;
  align-items: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.cmd-icon-img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}
.cmd-icon-fallback {
  font-size: 0.85rem;
  line-height: 1;
}

.btn-action--collapse {
  min-width: 32px;
  padding: 0 8px;
  font-size: 0.7rem;
  color: var(--muted);
  border-color: transparent;
  background: transparent;
  margin-left: 4px;
}
.btn-action--collapse:hover { border-color: var(--border); color: var(--text); background: var(--bg2); }
.btn-action.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-action.primary:hover:not(:disabled) { opacity: 0.88; background: var(--accent); color: #fff; }

/* Table subsection */
.bot-subsection {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.bot-subsection:last-child { border-bottom: none; }
.sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.sub-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sub-actions { display: flex; gap: 6px; }

/* ── Data Table ─────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.data-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface2); }
.data-table .mono { font-family: var(--ff-mono); }
.data-table .num { text-align: right; font-family: var(--ff-mono); }
.data-table .lnk a {
  color: var(--blue);
  font-size: 0.75rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.data-table .lnk a:hover { color: var(--accent); }

/* Status dot in table */
.tbl-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.tbl-dot.green  { background: var(--green); }
.tbl-dot.yellow { background: var(--amber); }
.tbl-dot.red    { background: var(--red); }
.tbl-dot.grey   { background: var(--muted); }

/* Table wrapper bottom padding so totals row is visible */
.bot-subsection div[style*="overflow-x"] {
  padding-bottom: 4px;
  margin-bottom: 4px;
}

/* Totals row bottom padding */
.tbl-totals td {
  padding-bottom: 12px;
}

/* Table footer totals */
.tbl-totals td {
  font-weight: 600;
  background: var(--surface2);
  border-top: 2px solid var(--border) !important;
  font-size: 0.82rem;
  color: var(--text);
}
.data-table tbody tr.tbl-totals:hover td {
  background: var(--surface2);
}

/* Empty table */
.tbl-empty {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
}

/* ── Footer ─────────────────────────────────────────────────────── */
.ftr {
  height: var(--ftr-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ftr-text {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.ftr-sep { margin: 0 10px; opacity: 0.4; }

/* ── Modal ──────────────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px;
  width: 380px;
  box-shadow: var(--shadow-lg);
}
.modal-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.modal-prompt { font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
.modal-inp {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  margin-bottom: 16px;
  transition: border-color var(--trans);
}
.modal-inp:focus { border-color: var(--accent); }
.modal-row { display: flex; gap: 8px; justify-content: flex-end; }
.btn-cancel {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  color: var(--muted);
  transition: border-color var(--trans);
}
.btn-cancel:hover { border-color: var(--muted); }
.modal-wallets {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.modal-wallets-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.modal-wallet-item {
  font-size: 0.82rem;
  font-family: var(--ff-mono);
  color: var(--text);
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
}
.modal-wallet-item:last-child { border-bottom: none; }

.btn-confirm {
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity var(--trans);
}
.btn-confirm:hover { opacity: 0.88; }

/* ── Conn badge ─────────────────────────────────────────────────── */
.conn-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.75rem; font-weight: 500;
  padding: 4px 10px;
  border-radius: 10px;
}
.conn-badge.on  { background: var(--green-bg); color: var(--green); }
.conn-badge.off { background: var(--red-bg);   color: var(--red); }
.cb-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ════════════════════════════════════════════════════════════════
   КОШЕЛЬКИ ПАУКА — кнопка в tabs-bar
════════════════════════════════════════════════════════════════ */
.tabs-spacer {
  flex: 1;
}
.tab-wallets-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--ff);
  transition: border-color var(--trans), background var(--trans), color var(--trans);
  margin-right: 8px;
}
.tab-wallets-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}
.tab-wallets-icon {
  font-size: 0.95rem;
  line-height: 1;
}

/* ════════════════════════════════════════════════════════════════
   МОДАЛКА: ГЛОБАЛЬНЫЕ КОШЕЛЬКИ ПАУКА
════════════════════════════════════════════════════════════════ */
.modal-wide {
  max-width: 560px;
  width: 100%;
}

.gw-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  max-height: 320px;
  overflow-y: auto;
}
.gw-empty {
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.gw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.gw-row-name {
  font-weight: 600;
  color: var(--text);
  font-size: 0.92rem;
  min-width: 110px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gw-row-name-edit {
  min-width: 110px;
  max-width: 180px;
  margin: 0;
  padding: 4px 8px;
  font-size: 0.92rem;
  font-weight: 600;
}
.gw-row-addr {
  font-family: var(--ff-mono);
  font-size: 0.82rem;
  color: var(--muted);
  flex: 1;
}
.gw-row-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 0.95rem;
  transition: border-color var(--trans), color var(--trans), background var(--trans);
}
.gw-row-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.gw-row-btn-del:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-bg);
}
.gw-row-btn-confirm {
  border-color: var(--green);
  color: var(--green);
}
.gw-row-btn-confirm:hover {
  background: var(--green-bg);
}

.gw-add-block {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.gw-add-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.gw-required {
  color: var(--accent);
  font-weight: 700;
}
.gw-add-input {
  width: 100%;
  margin: 0;
}
.gw-add-input-addr {
  font-family: var(--ff-mono);
}
.gw-add-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.gw-add-row .gw-add-input {
  flex: 1;
}
.gw-error {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--red-bg);
  border: 1px solid var(--red);
  border-radius: var(--r-sm);
  color: var(--red);
  font-size: 0.82rem;
}

/* ── Актуальные цены (левая панель) ─────────────────────────────────── */
.ap-edit-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  padding: 1px 6px;
  cursor: pointer;
}
.ap-edit-btn:hover { border-color: var(--accent); color: var(--accent); }

.ap-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.ap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 2px 0;
}
.ap-row-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ap-icon-wrap {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ap-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 50%;
}
.ap-icon-fallback {
  font-size: 0.85rem;
  text-align: center;
}
.ap-sym {
  font-weight: 600;
  color: var(--text);
}
.ap-price {
  font-family: var(--ff-mono);
  font-weight: 600;
  color: var(--text);
}
.ap-up   { color: var(--green); }
.ap-down { color: var(--red); }

/* ═══ VPS Servers ═══ */
.vps-row { padding:6px 0; border-bottom:1px solid var(--border); }
.vps-row:last-child { border-bottom:none; }
.vps-row-top { display:flex; align-items:center; gap:5px; font-size:0.72rem; font-weight:600; white-space:nowrap; overflow:hidden; }
.vps-icon-wrap { width:14px; height:14px; flex-shrink:0; }
.vps-icon-img { width:14px; height:14px; }
.vps-name { overflow:hidden; text-overflow:ellipsis; }
.vps-flag { flex-shrink:0; margin-left:auto; line-height:1; }
.vps-flag img { vertical-align:-2px; }
.vps-row-details { font-size:0.62rem; color:var(--muted); margin-top:1px; padding-left:19px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vps-sep { margin:0 3px; }
.vps-row-expiry { font-size:0.66rem; margin-top:2px; display:flex; align-items:center; gap:5px; padding-left:19px; white-space:nowrap; }
.vps-expiry-label { color:var(--muted); }
.vps-expiry-date { font-family:var(--mono, monospace); font-weight:600; }
.vps-days-left { font-size:0.6rem; font-weight:700; padding:1px 5px; border-radius:4px; }
.vps-days-ok { background:#dcfce7; color:#16a34a; }
.vps-days-warning { background:#fef3c7; color:#d97706; }
.vps-days-critical { background:#fee2e2; color:#dc2626; }
.vps-days-expired { background:#dc2626; color:#fff; }
.dark .vps-days-ok { background:rgba(34,197,94,0.15); }
.dark .vps-days-warning { background:rgba(245,158,11,0.15); }
.dark .vps-days-critical { background:rgba(239,68,68,0.15); }
.dark .vps-days-expired { background:rgba(220,38,38,0.3); }

.nc-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  margin-left: auto;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.nc-close:hover { opacity: 1; color: var(--red, #ef4444); }
.nc-top { display: flex; align-items: center; gap: 6px; }