/* L2 Control — Arctic Cyan & Deep Slate design system */
:root {
  --bg: #080d1a;
  --bg-panel: #0f172a;
  --bg-panel-2: #141f38;
  --bg-elevated: #0c1426;
  --border: rgba(56, 189, 248, 0.14);
  --border-soft: rgba(56, 189, 248, 0.22);
  --border-strong: rgba(56, 189, 248, 0.32);
  --text: #eaf6ff;
  --text-dim: #9fb7cc;
  --text-dimmer: #6f879d;
  --accent: #0ea5e9;
  --accent-2: #38bdf8;
  --accent-hover: #38bdf8;
  --success: #22c55e;
  --danger: #f43f5e;
  --warn: #f59e0b;
  --info: #38bdf8;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 12px 32px rgba(2, 8, 23, 0.45);
  --shadow-soft: 0 6px 18px rgba(2, 8, 23, 0.3);
  --focus-ring: 0 0 0 3px rgba(56, 189, 248, 0.22);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  /* ── Glass HUD tokens (глубокая полупрозрачность поверх 3D-космоса) ── */
  --glass-bg: linear-gradient(160deg, rgba(12, 20, 38, 0.38) 0%, rgba(5, 9, 18, 0.28) 100%);
  --glass-bg-soft: rgba(6, 11, 22, 0.30);
  --glass-bg-menu: rgba(7, 13, 26, 0.72);
  --glass-blur: blur(12px) saturate(125%);
  --glass-blur-deep: blur(18px) saturate(135%);
  --glass-line: rgba(34, 211, 238, 0.16);
  --glass-line-soft: rgba(34, 211, 238, 0.14);
  --glass-line-strong: rgba(34, 211, 238, 0.45);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  --glass-edge-soft: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --glass-glow: 0 12px 32px -8px rgba(34, 211, 238, 0.22);
  --glass-shadow: 0 18px 46px rgba(2, 8, 23, 0.38);
  --ease-tactile: cubic-bezier(0.22, 1, 0.36, 1);
  --tactile-fast: 220ms;
  --text-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(14, 165, 233, 0.12), transparent 60%),
    radial-gradient(700px 360px at -10% 10%, rgba(56, 189, 248, 0.08), transparent 60%),
    #030712;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

#app { position: relative; z-index: 1; }

/* Мелкие подписи и цифры поверх полупрозрачного стекла — лёгкая тень для контраста. */
.nav-subitem-count, .nav-group-title, .acc-card-sub, .acc-card-sub .acc-mini-tag,
.stat-label, .stat-sub, .stat-card-compact .stat-label, .stat-card-compact .stat-sub,
.table th, .field-hint, .label, .fish-rot-hint, .fish-limit-meta, .l2-path-hint,
.dash-card-sub, .acc-card-login, .acc-cur-label, .acc-cur-val, .acc-more-item {
  text-shadow: var(--text-shadow-soft);
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #7dd3fc; }
h1 { font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -0.02em; color: #f3fbff; }
h2 { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -0.015em; }
.page-head p { color: var(--text-dim); margin: 6px 0 0; font-size: 13px; max-width: 72ch; }

.font-mono-nums, .num, .stat-value, .font-mono, code, pre {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* Buttons — тактильное стекло с неоновым ореолом */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border-soft);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: transform var(--tactile-fast) var(--ease-tactile),
              box-shadow var(--tactile-fast) var(--ease-tactile),
              border-color var(--tactile-fast) var(--ease-tactile),
              background var(--tactile-fast) var(--ease-tactile),
              color var(--tactile-fast) var(--ease-tactile),
              filter var(--tactile-fast) var(--ease-tactile);
  user-select: none; white-space: nowrap; font-family: inherit;
  background: rgba(12, 20, 38, 0.42); color: var(--text);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  overflow: hidden;
}
/* Световой блик, пробегающий по контуру кнопки при наведении. */
.btn::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
  background-size: 250% 100%;
  background-position: 140% 0;
  transition: opacity .2s var(--ease-tactile), background-position .6s var(--ease-tactile);
}
.btn:hover:not(:disabled)::after { opacity: 1; background-position: -40% 0; }
.btn:hover:not(:disabled) {
  transform: translateY(-1.5px);
  border-color: var(--glass-line-strong);
  background: rgba(18, 30, 54, 0.5);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.16) inset, 0 10px 24px -8px rgba(34, 211, 238, 0.38);
}
.btn:hover:not(:disabled) > * { position: relative; z-index: 1; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.985); box-shadow: 0 2px 8px -4px rgba(2, 8, 23, 0.6); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.86), rgba(14, 165, 233, 0.88) 55%, rgba(56, 189, 248, 0.9));
  color: #04131f; border-color: rgba(125, 211, 252, 0.42);
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px) saturate(130%);
  -webkit-backdrop-filter: blur(6px) saturate(130%);
}
.btn-primary:hover:not(:disabled) {
  /* Подложка остаётся яркой, тёмный текст #04131f читается (не сливается со светлым фоном). */
  filter: none;
  background: linear-gradient(135deg, #0ea5e9, #38bdf8 55%, #7dd3fc);
  background-color: #38bdf8;
  border-color: rgba(186, 230, 253, 0.7);
  color: #04131f;
  box-shadow: 0 12px 30px -8px rgba(34, 211, 238, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-secondary {
  background: rgba(12, 20, 38, 0.42); border-color: var(--glass-line); color: #e2f4ff;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}
.btn-secondary:hover:not(:disabled) { background: rgba(20, 34, 60, 0.5); }
.btn-danger { background: rgba(244, 63, 94, 0.14); color: #fecdd3; border-color: rgba(244, 63, 94, 0.3); }
.btn-danger:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.22); border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 10px 24px -8px rgba(244, 63, 94, 0.4);
}
.btn-ghost { background: transparent; color: var(--text-dim); border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.btn-ghost:hover:not(:disabled) {
  color: #f8fafc; background: rgba(34, 211, 238, 0.12); border-color: var(--glass-line);
  box-shadow: 0 8px 20px -10px rgba(34, 211, 238, 0.35);
}
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; gap: 6px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 7px; gap: 4px; }

/* Inputs */
input, select, textarea,
input[type="text"], input[type="password"], input[type="number"], input[type="search"], input[type="email"] {
  background: rgba(8, 13, 26, 0.75); color: #f0faff;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; font-size: 14px; font-family: inherit; width: 100%;
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #6f879d; opacity: 1; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: var(--focus-ring);
  background: rgba(10, 18, 34, 0.95);
}
input:disabled, select:disabled, textarea:disabled { color: #94a8bb; opacity: .7; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; padding: 0; border-radius: 4px; }
select option { background: #0f172a; color: #f0faff; }
.label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; letter-spacing: .01em; }
.field-hint { font-size: 12px; color: var(--text-dimmer); margin-top: 5px; line-height: 1.4; }

/* Cards & tables — глубокое стекло (3D-космос просвечивает сквозь панели) */
.card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-lg); padding: 18px 20px;
  box-shadow: var(--glass-edge), var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: transform var(--tactile-fast) var(--ease-tactile),
              border-color var(--tactile-fast) var(--ease-tactile),
              box-shadow var(--tactile-fast) var(--ease-tactile);
}
/* Бегущий диагональный блик при наведении на любые стеклянные блоки. */
.card::before,
.acc-card.acc-card-3d::before,
.settings-acc::before,
.stat-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(186, 230, 253, 0.10) 45%,
    rgba(34, 211, 238, 0.16) 50%,
    rgba(186, 230, 253, 0.10) 55%,
    transparent 70%);
  background-size: 260% 260%;
  background-position: 130% 0;
  transition: opacity .24s var(--ease-tactile), background-position .72s var(--ease-tactile);
  z-index: 0;
}
.card:hover,
.settings-acc:hover,
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--glass-line-strong);
  box-shadow: var(--glass-edge), var(--glass-glow), var(--glass-shadow);
}
.card:hover::before,
.acc-card.acc-card-3d:hover::before,
.settings-acc:hover::before,
.stat-card:hover::before {
  opacity: 1;
  background-position: -30% 100%;
}

.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th {
  text-align: left; padding: 10px 12px; color: var(--text-dim); font-weight: 600;
  font-size: 11px; letter-spacing: .04em;
  border-bottom: 1px solid var(--glass-line-soft); white-space: nowrap;
  background: rgba(6, 11, 22, 0.26);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.table td {
  padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); vertical-align: middle;
  background: rgba(10, 18, 34, 0.22);
  transition: none;
}
.table tbody tr {
  transition: background-color 0s linear, box-shadow 0s linear;
}
.table tbody tr td {
  transition: background-color 0s linear, box-shadow 0s linear;
}
.table tbody tr:hover {
  background-color: rgba(34, 211, 238, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(34, 211, 238, 0.25),
    inset 0 -1px 0 rgba(34, 211, 238, 0.25);
  transition: background-color 120ms ease-out, box-shadow 120ms ease-out;
}
.table tbody tr:hover td {
  background: transparent;
  box-shadow: none;
  transition: none;
}
/* Мгновенное снятие подсветки при уходе курсора (исключаем «залипание» между строками). */
.table tbody tr:not(:hover) {
  background-color: transparent;
  box-shadow: none;
}
.table tr:last-child td { border-bottom: none; }
.table-compact th, .table-compact td { padding: 8px 10px; }
.table-wrap {
  overflow: auto; border: 1px solid var(--glass-line-soft); border-radius: var(--radius-md);
  background: var(--glass-bg-soft);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  box-shadow: var(--glass-edge-soft);
}
.table td, .table th, .stat-value, .progress-text { font-variant-numeric: tabular-nums; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; border: 1px solid transparent; line-height: 1.4; white-space: nowrap; }
.badge-green { background: rgba(16,185,129,.10); color: #34d399; border-color: rgba(16,185,129,.18); }
.badge-red { background: rgba(244,63,94,.10); color: #fda4af; border-color: rgba(244,63,94,.18); }
.badge-blue { background: rgba(14,165,233,.12); color: #7dd3fc; border-color: rgba(14,165,233,.20); }
.badge-gray { background: rgba(148,163,184,.10); color: #cbd5e1; border-color: rgba(148,163,184,.18); }
.badge-amber, .badge-yellow { background: rgba(245,158,11,.10); color: #fbbf24; border-color: rgba(245,158,11,.18); }

/* Shell / sidebar — глубокое стекло с тонкой световой кромкой */
.sidebar {
  width: 208px; flex-shrink: 0; display: flex; flex-direction: column;
  z-index: 40;
  background: rgba(6, 11, 22, 0.34);
  border-right: 1px solid rgba(34, 211, 238, 0.14);
  position: sticky; top: 0; height: 100vh;
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.brand { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); min-height: 56px; }
.brand-main { display:flex; align-items:center; gap:10px; min-width:0; }
.sidebar-logo-3d { width:36px; height:36px; flex:0 0 36px; border-radius:10px; overflow:hidden; border:1px solid rgba(56,189,248,.22); background: rgba(8,13,26,.45); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 16px rgba(2,8,23,.35); }
.brand-title-wrap { min-width: 0; }
.brand-mark { width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, #0ea5e9, #38bdf8); box-shadow: 0 0 0 1px rgba(125,211,252,.25) inset; flex: 0 0 24px; }
.brand-name { font-weight: 700; font-size: 15px; color: #f3fbff; letter-spacing: -0.02em; line-height: 1.05; white-space: nowrap; }
.brand-l2 { color:#7dd3fc; text-shadow: 0 0 12px rgba(56,189,248,.35); }
.brand-control { color:#eaf6ff; }
.brand-sub { display: none; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; flex: 1; overflow-y: auto; }
.nav-group-title { font-size: 10px; font-weight: 600; letter-spacing: .07em; color: #6f879d; padding: 2px 8px 4px; margin-top: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px;
  color: #b8d0e3; font-size: 13px; line-height: 1.25; font-weight: 500; cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--tactile-fast) var(--ease-tactile),
              color var(--tactile-fast) var(--ease-tactile),
              border-color var(--tactile-fast) var(--ease-tactile),
              transform var(--tactile-fast) var(--ease-tactile),
              box-shadow var(--tactile-fast) var(--ease-tactile);
  min-height: 32px;
  text-shadow: var(--text-shadow-soft);
}
.nav-item svg { width: 16px; height: 16px; opacity: .95; transition: transform var(--tactile-fast) var(--ease-tactile), opacity var(--tactile-fast) var(--ease-tactile), filter var(--tactile-fast) var(--ease-tactile); }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; min-width: 20px; height: 20px; font-size: 14px; line-height: 1; flex: 0 0 20px; }
.nav-ico-3d { width: 18px; height: 18px; display:block; filter: drop-shadow(0 1px 2px rgba(2,8,23,.45)); }
.nav-item:hover .nav-ico-3d, .nav-item-active .nav-ico-3d { filter: drop-shadow(0 0 6px rgba(56,189,248,.45)); }
.nav-label { min-width: 0; }
a.nav-item:hover, .nav-item:hover {
  color: #eff9ff;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.14), rgba(34, 211, 238, 0.06));
  border-color: rgba(34, 211, 238, 0.18);
  transform: translateX(4px);
}
a.nav-item:hover svg, .nav-item:hover svg,
a.nav-item:hover .nav-icon, .nav-item:hover .nav-icon {
  opacity: 1; transform: scale(1.12); filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.55));
}
.nav-item-active { color: #7dd3fc !important; background: rgba(14, 165, 233, 0.14) !important; border: 1px solid rgba(56, 189, 248, 0.2) !important; }
.nav-item-soon { opacity: .45; cursor: default; }
.nav-soon { margin-left: auto; font-size: 10px; color: #64748b; border: 1px solid rgba(148,163,184,0.2); border-radius: 4px; padding: 0 4px; }
/* Древовидное подменю серверов под «Аккаунты» */
.nav-submenu { position: relative; display: flex; flex-direction: column; gap: 1px; margin: 1px 0 4px; padding: 2px 0 2px 8px; }
.nav-submenu::before {
  content: ''; position: absolute; left: 4px; top: 2px; bottom: 2px; width: 1px;
  background: linear-gradient(180deg, rgba(56,189,248,.32), rgba(56,189,248,.07) 70%, transparent);
}
.nav-subitem {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 4px 7px 4px 15px; border-radius: 7px; min-height: 26px;
  color: #93aec6; font-size: 12px; line-height: 1.22; font-weight: 500;
  border: 1px solid transparent; text-decoration: none; cursor: pointer;
  transition: background var(--tactile-fast) var(--ease-tactile),
              color var(--tactile-fast) var(--ease-tactile),
              border-color var(--tactile-fast) var(--ease-tactile),
              transform var(--tactile-fast) var(--ease-tactile);
  font-variant-numeric: tabular-nums;
  text-shadow: var(--text-shadow-soft);
}
.nav-subitem::before {
  content: ''; position: absolute; left: -4px; top: 50%; width: 5px; height: 5px;
  margin-top: -2.5px; border-radius: 50%; background: rgba(56,189,248,.35);
  box-shadow: 0 0 0 3px rgba(8,13,26,.9);
  transition: background .14s, box-shadow .14s, transform .14s;
}
.nav-subitem:hover {
  color: #e6f6ff;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.10), rgba(34, 211, 238, 0.04));
  border-color: rgba(34, 211, 238, 0.14);
  transform: translateX(4px);
}
.nav-subitem:hover::before { background: rgba(125,211,252,.75); }
.nav-subitem-active {
  color: #bae6fd !important; background: rgba(14,165,233,.13) !important;
  border-color: rgba(56,189,248,.18) !important;
}
.nav-subitem-active::before { background: #38bdf8; box-shadow: 0 0 0 3px rgba(8,13,26,.9), 0 0 8px rgba(56,189,248,.8); transform: scale(1.15); }
.nav-subitem-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-subitem-count {
  flex-shrink: 0; min-width: 20px; text-align: right;
  font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: #7dd3fc; background: rgba(14,165,233,.12);
  border: 1px solid rgba(56,189,248,.16); border-radius: 5px; padding: 0 4px;
}
.nav-subitem-active .nav-subitem-count { color: #e0f2fe; background: rgba(14,165,233,.22); border-color: rgba(56,189,248,.3); }
.sidebar-footer { padding: 8px 8px 10px; border-top: 1px solid var(--border); background: rgba(15, 23, 42, 0.25); }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 2px 2px; }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #0ea5e9, #38bdf8); color: #04131f;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px;
}
.user-name { font-weight: 600; font-size: 12.5px; color: #eaf6ff; line-height: 1.2; }
.user-role { font-size: 11px; line-height: 1.2; margin-top: 1px; }
.role-admin { color: #7dd3fc; }
.role-emp { color: #86efac; }
.sidebar-logout-btn { height: 30px; font-size: 12px; padding: 4px 10px; }
#btn-logout:focus { outline: none; }
#btn-logout:focus-visible { outline: none; box-shadow: 0 0 0 1px rgba(255,255,255,0.2); }
.app-main { padding: 16px 18px 20px; min-width: 0; position: relative; z-index: 1; }

/* Login */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background:
    radial-gradient(700px 320px at 50% 0%, rgba(14,165,233,.16), transparent 60%),
    radial-gradient(500px 260px at 0% 100%, rgba(56,189,248,.10), transparent 60%),
    transparent;
}
.login-card { width: 100%; max-width: 380px; backdrop-filter: var(--glass-blur-deep); -webkit-backdrop-filter: var(--glass-blur-deep); }
.login-logo {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 14px;
  background: linear-gradient(135deg, #0ea5e9, #38bdf8); color: #04131f;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; letter-spacing: -0.02em;
  box-shadow: 0 10px 28px rgba(14,165,233,.25), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform var(--tactile-fast) var(--ease-tactile), box-shadow var(--tactile-fast) var(--ease-tactile);
  animation: login-logo-float 6.5s ease-in-out infinite;
}
.login-card:hover .login-logo {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 16px 36px -8px rgba(34, 211, 238, 0.45), inset 0 1px 0 rgba(255,255,255,.4);
  animation-play-state: paused;
}
@keyframes login-logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
body.no-3d-fx .login-logo { animation: none !important; }
body.no-3d-fx .login-card:hover .login-logo { transform: none !important; }
.login-error {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(244,63,94,.12);
  color: #fecdd3; border: 1px solid rgba(244,63,94,.28); font-size: 13px;
}

.acc-card,
.card,
.settings-acc,
.stat-card { overflow: visible; }

/* Бейджи и индикаторы: мягкая подсветка контура при наведении. */
.badge {
  transition: border-color .18s var(--ease-tactile), box-shadow .18s var(--ease-tactile),
              color .18s var(--ease-tactile), background .18s var(--ease-tactile);
}
.badge:hover { border-color: var(--glass-line-strong); box-shadow: 0 0 12px rgba(34, 211, 238, 0.16); }
.acc-ind, .acc-server-badge, .chip-btn, .lc-tab, .fish-tg-badge {
  transition: border-color .18s var(--ease-tactile), box-shadow .18s var(--ease-tactile),
              transform var(--tactile-fast) var(--ease-tactile), background .18s var(--ease-tactile);
}
.acc-ind:hover, .acc-server-badge:hover, .fish-tg-badge:hover {
  border-color: var(--glass-line-strong);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.18);
}
.chip-btn:hover, .lc-tab:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(34, 211, 238, 0.3); }

/* Иконочные кнопки действий — тактильное масштабирование. */
.acc-more-btn,
.acc-icon-btn,
.acc-card-actions .btn,
.chars-icon-btn,
.users-icon-btn,
.proxy-icon-btn,
.proxy-mini-btn,
.mk-icon-btn {
  transition: transform var(--tactile-fast) var(--ease-tactile),
              border-color var(--tactile-fast) var(--ease-tactile),
              box-shadow var(--tactile-fast) var(--ease-tactile),
              background var(--tactile-fast) var(--ease-tactile),
              color var(--tactile-fast) var(--ease-tactile);
}
.acc-more-btn:hover:not(:disabled),
.acc-icon-btn:hover:not(:disabled),
.acc-card-actions .btn:hover:not(:disabled),
.chars-icon-btn:hover:not(:disabled),
.users-icon-btn:hover:not(:disabled),
.proxy-icon-btn:hover:not(:disabled),
.proxy-mini-btn:hover:not(:disabled),
.mk-icon-btn:hover:not(:disabled) {
  transform: scale(1.04);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35) inset, 0 6px 18px -6px rgba(34, 211, 238, 0.4);
}
.acc-more-btn:active:not(:disabled),
.acc-icon-btn:active:not(:disabled),
.chars-icon-btn:active:not(:disabled),
.users-icon-btn:active:not(:disabled),
.proxy-icon-btn:active:not(:disabled),
.mk-icon-btn:active:not(:disabled) {
  transform: scale(0.96);
}

/* Select / input / checkbox — подсветка рамки и лёгкий отклик. */
input, select, textarea {
  transition: border-color .18s var(--ease-tactile), box-shadow .18s var(--ease-tactile),
              background .18s var(--ease-tactile);
}
input:not([type="checkbox"]):not([type="radio"]):hover:enabled,
select:hover:enabled,
textarea:hover:enabled { border-color: rgba(34, 211, 238, 0.34); }
input[type="checkbox"], input[type="radio"] { transition: box-shadow .18s var(--ease-tactile), transform var(--tactile-fast) var(--ease-tactile); }
input[type="checkbox"]:hover:enabled, input[type="radio"]:hover:enabled {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

/* Modals */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(2, 8, 23, 0.38); backdrop-filter: blur(12px) saturate(115%);
  -webkit-backdrop-filter: blur(12px) saturate(115%);
  display: flex; align-items: center; justify-content: center; z-index: 900; padding: 20px;
}
.modal {
  width: 100%; max-width: 720px; max-height: 90vh; overflow: auto;
  background: var(--glass-bg-menu);
  backdrop-filter: var(--glass-blur-deep);
  -webkit-backdrop-filter: var(--glass-blur-deep);
  border: 1px solid rgba(34, 211, 238, 0.2); border-radius: 16px; padding: 20px 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 28px 80px rgba(0,0,0,.55), 0 0 40px -10px rgba(34,211,238,.18);
  animation: modal-glass-in .28s var(--ease-tactile);
}
@keyframes modal-glass-in {
  from { opacity: 0; transform: translateY(10px) scale(.988); }
  to { opacity: 1; transform: none; }
}
.modal-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; color: #f3fbff; }
.modal-sub { font-size: 13px; color: var(--text-dim); margin: 0 0 14px; line-height: 1.45; }

/* Toasts */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 10000; padding: 12px 16px;
  border-radius: 12px; background: rgba(6, 78, 59, 0.95); color: #d1fae5; border: 1px solid rgba(52,211,153,.3);
  box-shadow: 0 12px 30px rgba(0,0,0,.4); animation: toast-in .2s ease; max-width: 420px;
  backdrop-filter: blur(8px);
}
.toast-error { background: rgba(127, 29, 29, 0.95); color: #fecdd3; border-color: rgba(244,63,94,.35); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Settings */
.settings-acc-list { display:flex; flex-direction:column; gap:16px; }
.settings-acc {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line); border-radius: 16px; overflow: hidden;
  box-shadow: var(--glass-edge), var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color .2s var(--ease-tactile), box-shadow .2s var(--ease-tactile),
              transform var(--tactile-fast) var(--ease-tactile);
}
.settings-acc:hover { border-color: var(--glass-line-strong); box-shadow: var(--glass-edge), var(--glass-glow); }
.settings-acc.open {
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 0 0 1px rgba(34,211,238,.10) inset, var(--glass-shadow);
}
.settings-acc-head {
  width:100%; border:none; background:transparent; color:inherit; text-align:left;
  padding:14px 16px; display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer;
  min-height: 0;
}
.settings-acc-head:hover { background: rgba(56,189,248,.04); }
.settings-acc-head--compact-toggle { padding:14px 16px; }
.settings-acc-head-mainbtn {
  flex:1; min-width:0; border:none; background:transparent; color:inherit; text-align:left; padding:0; cursor:pointer;
  display:flex; align-items:center;
}
.settings-acc-head-main { min-width:0; display:flex; flex-direction:column; gap:4px; flex:1; }
.settings-acc-head-main--row { flex-direction:row; align-items:center; gap:12px; flex-wrap:wrap; }
.settings-acc-head-main--row .settings-acc-title { white-space:normal; }
.settings-acc-title-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; min-width:0; }
.settings-acc-title { font-size:14px; font-weight:700; color:#eaf6ff; letter-spacing:-.01em; line-height:1.3; }
.settings-acc-badges { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.settings-acc-badges--inline { gap:8px; }
.settings-acc-badges--line { flex-wrap:wrap; gap:8px; margin-left:0; align-items:center; }
.settings-acc-meta { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-left:auto; color:#cbd5e1; font-size:13px; }
.settings-acc-meta-item { display:inline-flex; align-items:center; gap:4px; white-space:nowrap; }
.settings-acc-meta-item b { color:#e2e8f0; font-weight:600; }
.settings-acc-meta-sep { width:1px; height:14px; background:rgba(148,163,184,.28); display:inline-block; }
.settings-acc-head-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; margin-left:auto; }
.settings-acc-chevron { color:#7dd3fc; font-size:15px; line-height:1; padding-left:4px; flex:0 0 auto; }
.settings-acc-chevron-btn {
  border:none; background:transparent; color:#7dd3fc; font-size:15px; line-height:1; cursor:pointer; padding:4px 6px; border-radius:8px;
}
.settings-acc-chevron-btn:hover { background: rgba(56,189,248,.10); }
.settings-acc-body { border-top:1px solid rgba(255,255,255,0.08); padding:16px; display:flex; flex-direction:column; gap:16px; }
.settings-table th, .settings-table td { vertical-align: middle; }
.acc-inline-badges { display:flex; flex-wrap:wrap; gap:6px; }
.settings-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.settings-form-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:16px; padding-top:16px; border-top:1px solid rgba(255,255,255,0.10); }
.settings-form-footer-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.settings-form-footer-actions--right { margin-left:auto; justify-content:flex-end; }
.ikar-btn-check {
  background:rgba(255,255,255,0.05); color:#cbd5e1; border:1px solid rgba(255,255,255,0.10);
  font-weight:500; font-size:12px; padding:6px 14px; border-radius:8px; transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.ikar-btn-check:hover:not(:disabled) { background:rgba(255,255,255,0.10); color:#e2e8f0; border-color:rgba(255,255,255,0.14); }
.ikar-btn-save {
  background:#0ea5e9; color:#020617; border:1px solid transparent;
  font-weight:500; font-size:12px; padding:6px 16px; border-radius:8px; transition: background-color .16s ease;
}
.ikar-btn-save:hover:not(:disabled) { background:#38bdf8; color:#020617; }

.settings-cta, .btn.settings-cta, .ai-btn-add.settings-cta, .ikar-btn-save.settings-cta {
  background:#0ea5e9; /* sky-500 */ color:#020617; /* slate-950 */ border:1px solid transparent;
  font-weight:500; font-size:12px; padding:6px 16px; border-radius:8px; transition: background-color .16s ease, color .16s ease, border-color .16s ease;
  box-shadow:none; background-image:none;
}
.settings-cta:hover:not(:disabled), .btn.settings-cta:hover:not(:disabled), .ai-btn-add.settings-cta:hover:not(:disabled), .ikar-btn-save.settings-cta:hover:not(:disabled) {
  background:#38bdf8; /* sky-400 */ color:#020617; border-color:transparent; background-image:none;
}

.chip-item--tag {
  --tag-color: #0ea5e9;
  background: color-mix(in srgb, var(--tag-color) 10%, transparent);
  color: color-mix(in srgb, var(--tag-color) 75%, #cbd5e1);
  border-color: color-mix(in srgb, var(--tag-color) 20%, transparent);
}
.chip-item--tag .chip-x { color: color-mix(in srgb, var(--tag-color) 55%, #94a3b8); }
.chip-item--tag .chip-x:hover { color: #fda4af; }
.settings-check-row { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:500; margin:0; cursor:pointer; color:var(--text); }
.module-checks { display:flex; flex-wrap:wrap; gap:8px 10px; }
.module-check { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:#e2e8f0; cursor:pointer; padding:5px 10px; border:1px solid var(--border); border-radius:999px; background:rgba(8,13,26,.45); }
.module-check input { margin:0; }
.refs-grid-3 { display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; }
.ref-card { border:1px solid var(--border); border-radius:12px; padding:12px; background:rgba(8,13,26,.35); min-width:0; }
.ref-card-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.ref-title { font-weight:600; color:#eaf6ff; }
.ref-add-row { display:flex; gap:8px; align-items:center; }
.ref-add-row input { flex:1; min-width:0; }
.chips-wrap { display:flex; flex-wrap:wrap; gap:8px; align-items:center; min-height:28px; }
.chip-item { display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border-radius:999px; border:1px solid var(--border); background:rgba(56,189,248,.08); color:#e2f4ff; font-size:12px; }
.chip-x { background:none; border:none; color:#fda4af; cursor:pointer; font-size:14px; line-height:1; padding:0; }
.btn-outline-compact { background: rgba(8,13,26,.25); border-color: rgba(56,189,248,.28); color:#dff4ff; box-shadow:none; }
.btn-outline-compact:hover:not(:disabled) { background: rgba(14,165,233,.12); border-color: rgba(56,189,248,.45); color:#fff; }
@media (max-width: 1100px) { .refs-grid-3 { grid-template-columns:1fr; } .settings-form-grid { grid-template-columns:1fr; } .settings-acc-head-main--row { flex-wrap:wrap; } .settings-acc-badges--line { flex-wrap:wrap; } }

/* AI balancer */
.ai-pools-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px; margin-bottom:16px; }
.ai-pool-card { border:1px solid rgba(255,255,255,0.1); border-radius:12px; padding:16px 18px; background:rgba(8,13,26,.38); position:relative; overflow:hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,0.02); }
.ai-pool-card--vision { border-color: rgba(56,189,248,.22); }
.ai-pool-card--text { border-color: rgba(45,212,191,.22); }
.ai-pool-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.ai-pool-title-wrap { min-width:0; flex:1; }
.ai-pool-title { font-weight:700; color:#eaf6ff; font-size:14px; margin-bottom:10px; line-height:1.3; }
.ai-pool-mini-metrics { display:flex; flex-wrap:wrap; gap:14px 18px; align-items:center; }
.ai-pool-mini { display:inline-flex; align-items:center; gap:7px; font-size:13px; color:#cbd5e1; line-height:1.2; }
.ai-pool-mini-label { color:#94a3b8; font-size:12px; font-weight:500; }
.ai-pool-mini b { color:#e2e8f0; font-weight:600; }
.ai-dot { width:8px; height:8px; border-radius:999px; flex:0 0 8px; box-shadow:0 0 0 3px rgba(148,163,184,.12); }
.ai-dot--active { background:#22c55e; box-shadow:0 0 0 3px rgba(34,197,94,.16); }
.ai-dot--paused { background:#f59e0b; box-shadow:0 0 0 3px rgba(245,158,11,.16); }
.ai-dot--total { background:#94a3b8; box-shadow:0 0 0 3px rgba(148,163,184,.14); }
.ai-pool-remaining { text-align:right; padding-left:12px; flex:0 0 auto; }
.ai-pool-remaining-val { font-size:28px; line-height:1; font-weight:600; color:#f8fafc; letter-spacing:-0.02em; }
.ai-pool-remaining-caption { font-size:12px; color:#94a3b8; margin-top:6px; font-weight:500; }
.ai-pool-card--vision .ai-pool-remaining-val { color:#7dd3fc; }
.ai-pool-card--text .ai-pool-remaining-val { color:#5eead4; }
.ai-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin: 0 0 16px; }
.ai-tabs { display:flex; gap:6px; flex-wrap:wrap; margin: 0; }
.ai-tabs--toolbar { margin:0; }
.ai-segmented { display:inline-flex; gap:4px; padding:4px; border:1px solid rgba(255,255,255,0.1); border-radius:12px; background:rgba(8,13,26,.5); flex-wrap:wrap; }
.ai-tab { padding:7px 12px; border-radius:8px; border:1px solid transparent; background:transparent; color:#94a3b8; font-size:13px; cursor:pointer; font-weight:500; line-height:1.2; display:inline-flex; align-items:center; gap:8px; transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease; }
.ai-tab:hover { color:#cbd5e1; background:rgba(56,189,248,.06); }
.ai-tab.active { color:#eaf6ff; border-color:rgba(56,189,248,.28); background:rgba(14,165,233,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.ai-tab-count { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:18px; padding:0 6px; border-radius:999px; font-size:11px; font-weight:600; color:#cbd5e1; background:rgba(148,163,184,.14); border:1px solid rgba(148,163,184,.18); }
.ai-tab.active .ai-tab-count { color:#e0f2fe; background:rgba(56,189,248,.18); border-color:rgba(56,189,248,.22); }
.ai-toolbar-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-left:auto; }
.ai-btn-add, .btn.ai-btn-add {
  background:#0ea5e9; color:#020617; border:1px solid transparent;
  box-shadow:none; border-radius:8px; font-weight:500; font-size:12px; padding:6px 14px; transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.ai-btn-add:hover:not(:disabled), .btn.ai-btn-add:hover:not(:disabled) { background:#38bdf8; color:#020617; border-color:transparent; }
.ai-btn-outline { background:transparent; border-color:rgba(148,163,184,.28); color:#cbd5e1; }
.ai-btn-outline:hover:not(:disabled) { background:rgba(148,163,184,.08); border-color:rgba(148,163,184,.4); color:#f1f5f9; }
.ai-test-bar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin: 4px 0 12px; }
.ai-test-result { border:1px solid rgba(255,255,255,0.1); border-radius:12px; padding:10px 12px; background:rgba(8,13,26,.35); font-size:12px; color:#cbd5e1; margin-bottom:12px; }
.ai-test-result.ok { border-color:rgba(34,197,94,.25); }
.ai-test-result.err { border-color:rgba(244,63,94,.25); }
.ai-test-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:6px 12px; margin-top:6px; }
.ai-status { display:inline-flex; align-items:center; gap:6px; }
.ai-cd-timer { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight:600; }
.ai-keys-table th, .ai-keys-table td { vertical-align: middle; }
.ai-keys-table .col-num-right { text-align:right; }
.ai-keys-table thead th.col-num-right { text-align:right; }
.ai-col-keylimits .badge { margin-left:auto; }
.ai-actions { justify-content:flex-end; }
.ai-empty-state { padding: 16px 12px !important; text-align:center; color:#94a3b8; }
.ai-empty-inner { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:28px; font-size:13px; }
.ai-empty-state-panel {
  border:1px dashed rgba(255,255,255,0.12); border-radius:12px; background:rgba(8,13,26,.28);
  padding:28px 20px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:10px;
}
.ai-empty-state-icon {
  width:52px; height:52px; border-radius:14px; display:flex; align-items:center; justify-content:center;
  color:#7dd3fc; background:rgba(14,165,233,.12); border:1px solid rgba(56,189,248,.18); margin-bottom:2px;
}
.ai-empty-state-title { font-size:16px; font-weight:600; color:#eaf6ff; letter-spacing:-0.01em; }
.ai-empty-state-desc { font-size:13px; color:#94a3b8; line-height:1.45; max-width:520px; }
@media (max-width: 900px) { .ai-pools-grid { grid-template-columns:1fr; } .ai-toolbar { align-items:stretch; } .ai-toolbar-actions { margin-left:0; } .ai-pool-head { flex-direction:column; gap:12px; } .ai-pool-remaining { text-align:left; padding-left:0; } }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.stat-card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  border-radius: 14px; padding: 14px 16px;
  box-shadow: var(--glass-edge), var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: transform var(--tactile-fast) var(--ease-tactile),
              border-color var(--tactile-fast) var(--ease-tactile),
              box-shadow var(--tactile-fast) var(--ease-tactile);
}
.stat-value { font-size: 26px; font-weight: 700; color:#f3fbff; }
.stat-label { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.stat-sub { font-size: 12px; color: var(--text-dimmer); margin-top: 6px; }
.stats-grid-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.stat-card-compact { padding: 11px 12px 10px 14px; border-radius: 12px; min-width: 0; position: relative; overflow: hidden; }
.stat-card-accent::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, #38bdf8, #0ea5e9); box-shadow: 0 0 0 1px rgba(56,189,248,0.12); }
.stat-card-compact .stat-label { font-size: 11px; margin: 0; color: #9fb7cc; line-height: 1.2; font-weight: 600; letter-spacing: .01em; }
.stat-card-compact .stat-value { font-size: 22px; line-height: 1.1; letter-spacing: -0.01em; margin-top: 4px; color: #f3fbff; }
.stat-card-compact .stat-sub { font-size: 11px; margin-top: 4px; color: #7f97ad; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Progress, chips */
.progress { height: 8px; border-radius: 999px; background: rgba(8,13,26,.8); border: 1px solid var(--border); overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0ea5e9, #38bdf8); transition: width .25s ease; }
.progress-bar.warn { background: linear-gradient(90deg, #f59e0b, #f43f5e); }
.chip-btn { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; border:1px solid var(--border); background:rgba(8,13,26,.45); color:#cfe8f7; font-size:12px; cursor:pointer; }
.chip-btn:hover { border-color:var(--border-strong); color:#fff; background:rgba(56,189,248,.08); }
.lc-tabs { display:flex; gap:6px; flex-wrap:wrap; }
.lc-tab { padding:4px 10px; border-radius:999px; border:1px solid var(--border); background:rgba(8,13,26,.45); color:var(--text-dim); font-size:11px; cursor:pointer; }
.lc-tab.active { color:#fff; border-color:rgba(56,189,248,.4); background:rgba(14,165,233,.18); }

/* Accounts */
.acc-topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.acc-topbar-left { display:flex; align-items:center; min-width:0; }
.acc-page-title { margin:0; font-size:24px; font-weight:700; letter-spacing:-0.02em; color:#f3fbff; }
.acc-topbar-right { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.acc-bank-indicator { margin-left:6px; font-size:12px; color:#7dd3fc; font-weight:500; }
.acc-filters-wrap { position:relative; }
.acc-filters-popover {
  position:absolute; right:0; top:calc(100% + 8px); z-index:400; width:min(860px, 92vw);
  background:var(--glass-bg-menu); border:1px solid rgba(34,211,238,0.2); border-radius:12px; padding:12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.09), 0 24px 48px rgba(2,6,23,0.5), 0 0 32px -12px rgba(34,211,238,0.22);
  backdrop-filter: var(--glass-blur-deep); -webkit-backdrop-filter: var(--glass-blur-deep);
  animation: menu-glass-in .18s var(--ease-tactile);
}
@keyframes menu-glass-in {
  from { opacity: 0; transform: translateY(-6px) scale(.99); }
  to { opacity: 1; transform: none; }
}
.acc-filters-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:10px; }
.acc-filters-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; justify-content:flex-end; border-top:1px solid var(--border); padding-top:10px; }
.acc-bulk-inner {
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:rgba(14,165,233,.08); border:1px solid rgba(56,189,248,.2); border-radius:12px; padding:8px 12px;
}
.acc-bulk-count { color:#e2e8f0; margin-right:4px; }
/* Тулбар списка аккаунтов: «Выбрать все» + компактная панель пакетных действий в одну строку. */
.acc-list-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.acc-list-toolbar-left { display:flex; align-items:center; gap:12px; flex-wrap:wrap; min-width:0; }
.acc-hidden-count { font-variant-numeric: tabular-nums; }
.acc-list-toolbar .acc-bulk-inner { padding:6px 10px; gap:8px; }
.acc-list-toolbar .acc-bulk-count { margin-right:0; font-size:12px; white-space:nowrap; }
.acc-grid {
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap:14px;
}
.acc-card {
  position:relative;
  border:1px solid var(--glass-line);
  background: var(--glass-bg);
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: var(--glass-edge), var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  min-height: 118px;
  display:flex;
  flex-direction:column;
  gap:6px;
  cursor:pointer;
  /* Меню «⋮» выходит за границы карточки — обрезать его нельзя. */
  overflow: visible;
  transition: transform var(--tactile-fast) var(--ease-tactile),
              border-color var(--tactile-fast) var(--ease-tactile),
              box-shadow var(--tactile-fast) var(--ease-tactile);
}
/* Карточка с открытым меню «⋮» поднимается над соседними карточками. */
/* Safe 3D Stacking: карточка с открытым меню не трансформируется (иначе containing block
   для position:absolute меню и clipping), сохраняем только z-index над соседями. */
.acc-card.is-menu-open,
.acc-card.is-menu-open:hover { z-index: 60; transform: none !important; }
/* Крупные кликабельные плитки ведут себя как карточки: подъём и подсветка кромки. */
.stat-card-link:hover,
.agent-tpl-card:hover {
  border-color: var(--glass-line-strong);
  box-shadow: var(--glass-edge), var(--glass-glow);
}
.stat-card-link { transition: transform var(--tactile-fast) var(--ease-tactile), border-color .2s var(--ease-tactile), box-shadow .2s var(--ease-tactile); }
.agent-tpl-card { transition: transform var(--tactile-fast) var(--ease-tactile), border-color .2s var(--ease-tactile), box-shadow .2s var(--ease-tactile); }
.acc-card.is-selected {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2) inset, var(--glass-edge), var(--glass-glow);
}
/* Скрытый (архивный/забаненный) аккаунт: визуально приглушён, но остаётся читаемым. */
.acc-card.is-hidden-acc {
  opacity: 0.62;
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.32);
}
.acc-card.is-hidden-acc:hover { opacity: 0.9; }
.acc-card.is-hidden-acc .acc-card-login::after {
  content: "скрыт";
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.32);
  vertical-align: middle;
}
.acc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: var(--glass-edge), 0 12px 32px -8px rgba(34, 211, 238, 0.22), var(--glass-shadow);
}
/* Чекбокс выбора аккаунта — выровнен в flex-шапке карточки (без наложения на текст). */
.acc-card-check {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; margin: 0; flex: 0 0 16px;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  opacity: 1 !important; visibility: visible !important; pointer-events: auto;
}
.acc-card-check:hover { box-shadow: 0 0 0 3px rgba(56,189,248,.18), inset 0 1px 0 rgba(255,255,255,0.04); }
.acc-card-check:checked {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
  border-color: #38bdf8;
}
.acc-card-check:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #04131f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.acc-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; flex-wrap:wrap; min-height:0; padding-left:0; padding-right:0; }
.acc-card-ident { min-width:0; display:flex; flex-direction:column; gap:2px; }
.acc-card-login { font-weight:700; color:#f3fbff; font-size:13.5px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.acc-card-sub { font-size:11px; color:var(--text-dimmer); display:flex; gap:4px 6px; align-items:center; flex-wrap:wrap; min-height:16px; }
.acc-card-sub .acc-tag-slot { margin-left:auto; display:inline-flex; min-width:0; }
.acc-card-sub .acc-mini-tag { max-width:72px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.acc-card-sub .acc-exp-pct {
  color: var(--accent-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: .01em;
  white-space: nowrap;
}
/* Длинная строка метаданных переносится, чтобы уровень и опыт читались полностью (без перекрытий). */
.acc-card-sub > span:not(.acc-tag-slot) { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
/* Сервер аккаунта — заметный бейдж рядом с логином (разные серверы визуально различаются). */
.acc-server-slot { display:inline-flex; align-items:center; flex:0 0 auto; }
.acc-server-badge {
  display:inline-flex; align-items:center; gap:4px;
  padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1.5;
  letter-spacing: .02em; white-space: nowrap;
  border: 1px solid rgba(56,189,248,.42);
  background: rgba(14,165,233,.16); color: #7dd3fc;
  font-variant-numeric: tabular-nums;
}
/* Привязка Мастер-Аккаунта: компактная строка «МА: user@mail.ru». */
.acc-card-bind { display:flex; align-items:center; gap:6px; flex-wrap:wrap; min-height:0; }
.acc-card-bind:empty { display:none; }
.acc-master-email {
  display:inline-flex; align-items:center; gap:4px; min-width:0; max-width:100%;
  font-size: 11px; line-height: 1.45; color: #9fb7cc;
}
.acc-master-email-ico { width:12px; height:12px; flex:0 0 12px; color:#7dd3fc; }
.acc-master-email-tag { font-weight:700; color:#7dd3fc; letter-spacing:.02em; }
.acc-master-email-val {
  min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-variant-numeric: tabular-nums;
}
/* Бейдж Камалоки — отдельная строка под метаданными, без наложения на уровень/опыт. */
.acc-card-kam { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.acc-card-metrics { display:none; }
.acc-card-indicators { display:flex; flex-direction:column; gap:4px; align-items:stretch; align-content:flex-start; min-height:34px; padding-top:0; min-width:0; overflow:hidden; }
.acc-cur-list { display:inline-grid; grid-template-columns: max-content auto; column-gap: 12px; row-gap: 5px; align-items:center; }
.acc-cur-row { display:contents; }
.acc-cur-label { display:inline-flex; align-items:center; gap:6px; color:#9fb7cc; white-space:nowrap; }
.acc-cur-val { font-variant-numeric: tabular-nums; color:#eaf6ff; font-weight:600; justify-self:start; }
.acc-cur-ico { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:999px; font-size:10px; font-weight:700; }
.acc-cur-ico-adena { color:#fde68a; background:rgba(245,158,11,.14); border:1px solid rgba(245,158,11,.24); }
.acc-cur-ico-col { color:#7dd3fc; background:rgba(14,165,233,.12); border:1px solid rgba(56,189,248,.22); }
.acc-kam-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:4px; }
.acc-kam-dot.is-ok { background:#10b981; box-shadow:0 0 0 3px rgba(16,185,129,.15); }
.acc-kam-dot.is-bad { background:#ef4444; box-shadow:0 0 0 3px rgba(239,68,68,.15); }
.acc-ind {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1;
  border: 1px solid rgba(148,163,184,0.18); background: rgba(148,163,184,0.08); color: #9fb7cc;
  letter-spacing: .01em;
}
.acc-ind .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.acc-ind-bohpts.is-ok { color: #86efac; background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.22); }
.acc-ind-bohpts.is-bad { color: #fda4af; background: rgba(244,63,94,0.12); border-color: rgba(244,63,94,0.22); }
.acc-ind-inc.is-ok { color: #7dd3fc; background: rgba(14,165,233,0.12); border-color: rgba(56,189,248,0.22); }
.acc-ind-inc.is-off { color: #6f879d; background: rgba(100,116,139,0.10); border-color: rgba(148,163,184,0.14); }
.acc-ind-fish { color: #7dd3fc; background: rgba(14,165,233,0.12); border-color: rgba(56,189,248,0.22); font-family: var(--mono); }
.acc-ind-fish.is-off { color: #94a3b8; background: rgba(148,163,184,0.10); border-color: rgba(148,163,184,0.18); font-family: inherit; }
.acc-ind-fish.is-warn { color: #fcd34d; background: rgba(245,158,11,0.14); border-color: rgba(245,158,11,0.24); font-family: inherit; }
.acc-ind-fish.is-bad { color: #fda4af; background: rgba(244,63,94,0.12); border-color: rgba(244,63,94,0.24); font-family: inherit; }
.acc-ind-adena { color: #fde68a; background: rgba(245,158,11,0.14); border-color: rgba(245,158,11,0.24); font-weight:700; }
.acc-ind-pa.is-ok, .acc-ind-kam.is-ok { color: #86efac; background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.22); }
.acc-ind-pa.is-off, .acc-ind-kam.is-off { color: #94a3b8; background: rgba(148,163,184,0.10); border-color: rgba(148,163,184,0.18); }
.acc-ind-kam.is-warn, .acc-ind-pa.is-warn { color: #fcd34d; background: rgba(245,158,11,0.14); border-color: rgba(245,158,11,0.24); }
.acc-ind-ag { color: #c4b5fd; background: rgba(139,92,246,0.14); border-color: rgba(139,92,246,0.22); }
@media (min-width: 1600px) { .acc-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); } }
.acc-card-actions { display:flex; gap:6px; flex-wrap:nowrap; justify-content:flex-end; align-items:center; align-self:end; }
.acc-card-actions.acc-card-actions-compact {
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}
.acc-card-actions.acc-card-actions-compact .acc-browser-btn {
  flex: 1 1 140px;
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
}
.acc-card-actions.acc-card-actions-compact .l2-launch-group {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}
.acc-card-actions.acc-card-actions-compact .l2-launch-group .l2-launch-btn {
  flex: 1 1 50%;
  width: auto;
  min-width: 0;
  justify-content: center;
  padding: 0 8px;
  overflow: visible;
  text-overflow: clip;
}
/* Длинная подпись «Ручное / ХардШифт»: не обрезается, переносится внутри кнопки. */
.acc-card-actions .l2-launch-btn--manual,
.acc-card-actions .l2-launch-btn--manual .l2-launch-btn-label {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.acc-card-actions .l2-launch-btn--manual .l2-launch-btn-label {
  min-width: 0;
  display: inline-block;
}
.acc-card-actions.acc-card-actions-compact .acc-more-wrap { margin-left: auto; }
/* При подсветке фона текст кнопок карточки остаётся высококонтрастным и читаемым. */
.acc-card-actions .btn { height: 28px; padding: 0 10px; }
.acc-card-actions button:hover:not(:disabled) { color: #f8fafc; }
.acc-card-actions .btn-primary:hover:not(:disabled) { color: #04131f; background: linear-gradient(135deg, #0ea5e9, #38bdf8 55%, #7dd3fc); }
.acc-card-actions .acc-more-item:hover { color: #f8fafc; background: rgba(56, 189, 248, 0.16); }
.acc-card input[data-select-id] { cursor:pointer; }
.acc-icon-btn { width: 28px; min-width: 28px; padding: 0 !important; height: 28px; }
.acc-more-wrap { position: relative; }
.acc-more-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 900;
  min-width: 220px; background: var(--glass-bg-menu); border: 1px solid rgba(34,211,238,0.22);
  border-radius: 10px; padding: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 20px 44px rgba(2,6,23,0.5), 0 0 34px -12px rgba(34,211,238,0.28);
  backdrop-filter: var(--glass-blur-deep) !important;
  -webkit-backdrop-filter: var(--glass-blur-deep) !important;
  animation: menu-glass-in .18s var(--ease-tactile);
}
.acc-more-item {
  display: block; width: 100%; text-align: left; background: transparent; border: none;
  color: #e2f4ff; font-size: 13px; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  transition: background .16s var(--ease-tactile), color .16s var(--ease-tactile), transform .16s var(--ease-tactile);
  text-shadow: var(--text-shadow-soft);
}
.acc-more-item:hover {
  background: rgba(34, 211, 238, 0.16); color: #fff;
  transform: translateX(2px);
}

/* Account modal compact */
.modal:has(.acc-modal-header) { max-width: 980px; width: 94vw; }
.acc-modal-header { display:flex; flex-direction:column; gap:10px; margin-bottom:12px; }
.acc-modal-toprow { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; flex-wrap:wrap; min-width:0; }
.acc-modal-title { font-size:18px; font-weight:700; color:#f3fbff; }
.acc-modal-more-menu { right:0; top:calc(100% + 4px); min-width:180px; padding:6px; }
.acc-modal-header, .acc-modal-meta-row, .acc-quick-actions { min-width:0; }
.acc-char-nick-wrap { display:flex; flex-direction:column; gap:3px; min-width:0; }
.acc-char-fish-badge { display:inline-flex; align-items:center; gap:4px; width:max-content; max-width:100%; padding:1px 8px; border-radius:999px; font-size:11px; line-height:1.4; font-weight:600; white-space:nowrap; border:1px solid rgba(148,163,184,.18); background:rgba(148,163,184,.08); color:#9fb7cc; }
.acc-char-fish-badge.is-on { color:#7dd3fc; background:rgba(14,165,233,.14); border-color:rgba(56,189,248,.28); }
.acc-char-fish-badge.is-off { color:#94a3b8; }
.acc-char-sync { font-size:11px; color:var(--text-dim); white-space:nowrap; font-variant-numeric: tabular-nums; }
.acc-mail-bank-block { margin:10px 0 12px; padding:10px 12px; border:1px solid rgba(56,189,248,.14); border-radius:12px; background: rgba(8,13,26,.35); }
.acc-mail-bank-head { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-bottom:8px; }
.acc-mail-bank-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap:8px 12px; align-items:start; }
.acc-mail-triggers { display:flex; flex-direction:column; gap:4px; }
.acc-mail-triggers label { display:flex; align-items:center; gap:6px; font-size:12px; color:#cfe8f7; cursor:pointer; }
.acc-mail-status { font-size:12px; color:var(--text-dim); font-variant-numeric: tabular-nums; }
.acc-adena-cell { white-space:nowrap; font-variant-numeric: tabular-nums; }
.acc-adena-main { font-weight:600; color:#eaf6ff; }
.acc-adena-sub { margin-left:6px; }
.acc-inc-badge { display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; border:1px solid var(--border); background:rgba(8,13,26,.45); font-size:12px; color:#cfe8f7; }
.acc-inc-badge code { color:#7dd3fc; }
.acc-quick-actions { display:flex; gap:8px; flex-wrap:wrap; }
.acc-quick-icon { width:34px; height:34px; padding:0; }
.acc-chars-table { border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.acc-chars-table table { width:100%; border-collapse:collapse; font-size:13px; }
.acc-chars-table th, .acc-chars-table td { padding:8px 10px; border-bottom:1px solid rgba(56,189,248,.08); text-align:left; }
.acc-chars-table th { color:var(--text-dim); font-size:11px; font-weight:600; background:rgba(8,13,26,.35); }
.acc-chars-table tr:last-child td { border-bottom:none; }
.acc-agent-list { display:flex; flex-direction:column; gap:8px; }
.acc-agent-compact { display:flex; align-items:center; justify-content:space-between; gap:10px; border:1px solid var(--border); border-radius:10px; padding:8px 10px; background:rgba(8,13,26,.3); }
.acc-agent-main { min-width:0; display:flex; flex-direction:column; gap:2px; }
.acc-agent-name { font-weight:600; font-size:13px; color:#eaf6ff; }
.acc-agent-meta { font-size:11.5px; color:var(--text-dim); display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.acc-agent-actions { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.text-xs { font-size: 12px; } .text-sm { font-size: 13px; } .text-xl { font-size: 20px; } .text-2xl { font-size: 24px; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-dim { color: var(--text-dim); }
.flex-1 { flex: 1; }
.overflow-x-auto { overflow-x: auto; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(56,189,248,.25); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* Dashboard */
.dash-head p { margin-top: 4px; }
.stat-card-link { display: block; color: inherit; text-decoration: none; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease; }
.stat-card-link:hover { border-color: rgba(56,189,248,.45); box-shadow: 0 0 0 1px rgba(56,189,248,.18) inset, 0 10px 24px rgba(14,165,233,.12); transform: translateY(-1px); }
.stat-card-link:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.bohpts-panel { padding: 12px 14px; border-color: rgba(56,189,248,.22); background: linear-gradient(180deg, rgba(14,165,233,.10), rgba(15,23,42,.92)); }
.bohpts-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bohpts-panel-title { font-weight: 700; color: #f3fbff; font-size: 14px; letter-spacing: -.01em; padding-top: 4px; }
.bohpts-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.bohpts-total { display: flex; align-items: baseline; gap: 8px; padding: 6px 10px; border-radius: 10px; background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.22); }
.bohpts-total-label { font-size: 11px; color: #fcd34d; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.bohpts-total-val { font-size: 20px; font-weight: 700; color: #fcd34d; line-height: 1; }
.bohpts-manage-btn { white-space: nowrap; margin-left: 2px; }
.bohpts-refresh-btn { width: 32px; padding: 0; font-size: 16px; line-height: 1; margin-left: 2px; }
.bohpts-indicators { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bohpts-ind { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: rgba(8,13,26,.35); min-width: 0; }
.bohpts-dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; box-shadow: 0 0 0 3px rgba(100,116,139,.18); flex: 0 0 8px; }
.bohpts-ind.is-on .bohpts-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18), 0 0 10px rgba(34,197,94,.35); }
.bohpts-ind.is-fishing.is-on .bohpts-dot,
.bohpts-ind.is-trade.is-on .bohpts-dot { background: #38bdf8; box-shadow: 0 0 0 3px rgba(56,189,248,.18), 0 0 10px rgba(56,189,248,.35); }
.bohpts-ind-label { font-size: 12px; color: #cfe8f7; font-weight: 500; }
.bohpts-ind-val { margin-left: auto; font-size: 14px; font-weight: 700; color: #f3fbff; }
.bohpts-ind-state { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #7f97ad; padding: 2px 6px; border-radius: 999px; border: 1px solid rgba(148,163,184,.18); }
.bohpts-ind.is-on .bohpts-ind-state { color: #7dd3fc; border-color: rgba(56,189,248,.25); background: rgba(14,165,233,.12); }
.bohpts-ind.is-off { opacity: .85; }

.dash-table-card { padding: 10px 12px; }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 0 2px; }
.dash-card-title { font-weight: 700; font-size: 14px; color: #f3fbff; }
.dash-card-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.dash-servers-table th, .dash-servers-table td { padding: 8px 12px; font-size: 12.5px; }
.dash-servers-table thead th { font-size: 10.5px; }
.dash-servers-table .col-num, .dash-servers-table th.col-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-servers-table .col-text, .dash-servers-table th.col-text { text-align: left; }
.dash-servers-table th.col-coins, .dash-servers-table td.col-coins { padding-left: 16px; }
.dash-servers-table tbody tr { transition: background .14s ease; }
.dash-servers-table tbody tr:hover { background: rgba(56,189,248,0.08); }
.srv-cell { display: flex; align-items: center; gap: 8px; min-width: 170px; }
.srv-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; background: #64748b; box-shadow: 0 0 0 3px rgba(100,116,139,.18); }
.srv-dot-ok { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.16), 0 0 8px rgba(34,197,94,.35); }
.srv-dot-bad { background: #f43f5e; box-shadow: 0 0 0 3px rgba(244,63,94,.16); }
.srv-dot-warn { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.16); }
.srv-dot-unknown { background: #64748b; }
.srv-name { font-weight: 600; color: #eaf6ff; }
.srv-status { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; border: 1px solid transparent; }
.srv-status-ok { color: #86efac; background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.22); }
.srv-status-bad { color: #fda4af; background: rgba(244,63,94,.14); border-color: rgba(244,63,94,.22); }
.srv-status-warn { color: #fcd34d; background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.22); }
.srv-status-unknown { color: #94a8bb; background: rgba(148,163,184,.12); border-color: rgba(148,163,184,.18); }
.currency-adena { color: #fcd34d; font-weight: 600; }
.dash-adena-val { color: #fcd34d; font-weight: 700; }
.dash-adena-label { color: #7dd3fc; font-weight: 600; margin-right: 4px; }
.coin-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.dash-chart-card { padding: 12px 14px; display: block; width: 100%; }
.dash-chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.dash-chart-head-left { min-width: 0; }
.dash-chart-summary { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: #9fb7cc; }
.dash-chart-summary .dash-chart-stat-val { color: #7dd3fc; font-weight: 700; }
.period-switch { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; border: 1px solid var(--border); background: rgba(8,13,26,.45); flex: 0 0 auto; }
.period-btn { border: none; background: transparent; color: #9fb7cc; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.period-btn:hover { color: #eaf6ff; }
.period-btn.is-active { color: #04131f; background: linear-gradient(135deg, #0ea5e9, #38bdf8); box-shadow: 0 4px 12px rgba(14,165,233,.25); }
.farm-chart-wrap { position: relative; display: block; width: 100%; overflow: visible; border-radius: 10px; border: 1px solid rgba(56,189,248,.12); background: linear-gradient(180deg, rgba(8,13,26,.35), rgba(8,13,26,.15)); padding: 8px 8px 6px; min-height: 190px; box-sizing: border-box; }
.farm-chart-container { width: 100%; height: auto; min-height: 190px; display: block; overflow: visible; }
.farm-svg-stage { position: relative; width: 100%; height: 200px; display: block; overflow: visible; }
.farm-svg { width: 100%; height: 200px; display: block; overflow: visible; }
.farm-empty-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: rgba(159,183,204,0.7); font-size: 12px; line-height: 1.3; text-align: center; padding: 6px 10px; border-radius: 8px; background: rgba(8,13,26,0.35); border: 1px dashed rgba(56,189,248,0.18); pointer-events: none; white-space: nowrap; }
.farm-x-axis { display: flex; justify-content: space-between; width: 100%; gap: 2px; margin-top: 4px; padding: 0 2px; box-sizing: border-box; }
.farm-x-label { flex: 1 1 0; min-width: 0; font-size: 11px; line-height: 1.2; color: rgba(159,183,204,0.9); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: clip; }
.farm-bar-item { cursor: pointer; }
.farm-bar-item .farm-bar { transition: filter .15s ease, opacity .15s ease; }
.farm-bar-item:hover .farm-bar, .farm-bar-item:focus .farm-bar, .farm-bar-item.is-active .farm-bar { filter: brightness(1.15); }
.farm-bar-item:focus { outline: none; }
.farm-grid-line { stroke: rgba(148,163,184,0.15); stroke-width: 1; stroke-dasharray: 4 4; }
.farm-zero-line { stroke: #38bdf8; stroke-opacity: 0.85; stroke-width: 1.5; }
.farm-area { opacity: 1; }
.farm-line { stroke: #38bdf8; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.farm-dot { fill: #38bdf8; stroke: #0f172a; stroke-width: 1.5; }

/* Fishing: server badge, rotation selects, statuses */
.fish-server-line { margin-top: 4px; }
.fish-server-badge {
  display: inline-flex; align-items: center;
  padding: 1px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; line-height: 1.5;
  letter-spacing: .02em; white-space: nowrap;
  border: 1px solid rgba(56,189,248,.42);
  background: rgba(14,165,233,.16); color: #7dd3fc;
}
.fish-rotation { min-width: 220px; }
.fish-rot-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; }
.fish-rot-title { font-size: 11px; color: var(--text-dim); font-weight: 600; }
.fish-rot-slot { font-size: 11px; color: #7dd3fc; font-weight: 700; }
.fish-rot-inputs { display:flex; flex-direction:column; gap:6px; margin-bottom:6px; }
.fish-rot-selects .fish-rot-slot-wrap { display:flex; flex-direction:column; gap:2px; }
.fish-rot-select { width:100%; padding:6px 8px; font-size:12px; border-radius:8px; }
.fish-rot-hint { font-size:10px; color: var(--text-dimmer); }
.fish-rot-actions { display:flex; gap:6px; flex-wrap:wrap; }
.fish-rot-notice {
  font-size: 12px; color: #9fb7cc; line-height: 1.4;
  padding: 8px 10px; border-radius: 8px;
  border: 1px dashed rgba(56,189,248,.22); background: rgba(8,13,26,.35);
}
.fish-badge-limit { color: #cbd5e1 !important; border-color: rgba(148,163,184,.22) !important; background: rgba(148,163,184,.10) !important; }
.fish-limit-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.fish-limit-live { font-size: 10.5px; color: #34d399; margin-top: 2px; }
.farm-hit { fill: transparent; cursor: pointer; }
.farm-point.is-active .farm-dot { fill: #eaf6ff; }
.farm-axis-label { fill: rgba(159,183,204,0.9); font-size: 11px; font-family: var(--mono); }
.farm-tooltip { position: absolute; transform: translate(-50%, -100%); pointer-events: none; background: rgba(15,23,42,0.96); border: 1px solid rgba(56,189,248,.28); border-radius: 8px; padding: 6px 8px; box-shadow: 0 10px 24px rgba(2,8,23,.45); z-index: 5; min-width: 120px; }
.farm-tooltip[hidden] { display: none; }
.farm-tooltip-date { font-size: 11px; color: #9fb7cc; margin-bottom: 2px; }
.farm-tooltip-val { font-size: 12px; color: #eaf6ff; font-weight: 600; }

@media (max-width: 1279px) {
  .stats-grid-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .bohpts-indicators { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .dash-chart-head { flex-direction: column; align-items: stretch; }
}

/* Fishing (Авторыбалка) — Arctic Cyan & Deep Slate polish */
.fish-control-card { padding: 14px 16px; }
.fish-kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:10px; margin-bottom:12px; }
.fish-kpi { position:relative; padding:10px 14px 10px 16px; border-radius:12px; overflow:hidden; }
.fish-kpi::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--accent-2); box-shadow:0 0 0 1px rgba(56,189,248,0.18); }
.fish-kpi-blue::before { background:linear-gradient(180deg,#38bdf8,#0ea5e9); }
.fish-kpi-green::before { background:linear-gradient(180deg,#22c55e,#16a34a); box-shadow:0 0 0 1px rgba(34,197,94,0.18); }
.fish-kpi-red::before { background:linear-gradient(180deg,#f43f5e,#dc2626); box-shadow:0 0 0 1px rgba(244,63,94,0.18); }
/* Верхняя KPI-карточка: «Мало наживки (< 30)» держим одной строкой,
   чтобы пояснение к порогу не разрывалось на три строки над числом. */
.fish-kpi-label { line-height:1.2; }
.fish-kpi-label.fish-kpi-nowrap { white-space:nowrap; }
.fish-kpi-label.fish-kpi-nowrap svg { display:inline-block; vertical-align:-2px; flex-shrink:0; }
.fish-kpi-value { font-size:22px; font-weight:700; line-height:1.1; margin-top:2px; letter-spacing:-0.01em; }
.fish-kpi-green .fish-kpi-value { color:#86efac; }
.fish-kpi-red .fish-kpi-value { color:#fda4af; }
.fish-control-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.fish-control-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; flex:1 1 auto; min-width:0; }
.fish-tg-badge { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; font-size:12px; border:1px solid var(--border); background:rgba(8,13,26,0.55); color:var(--text-dim); white-space:nowrap; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.fish-tg-badge.is-ok { color:#7dd3fc; border-color:rgba(56,189,248,0.28); background:rgba(14,165,233,0.12); }
.fish-tg-badge.is-warn { color:#fcd34d; border-color:rgba(245,158,11,0.28); background:rgba(245,158,11,0.12); }

.fish-table-card { padding:10px 12px; }
.fish-filter-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.fish-filter-group { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.fish-filter-label { font-weight:600; color:#eaf6ff; }
.fish-filter-count { margin-left:auto; }
.fish-table th, .fish-table td { padding:8px 10px; vertical-align:middle; }
.fish-table thead th { font-size:10px; letter-spacing:.05em; }

.fish-inc-badge { display:inline-flex; align-items:center; gap:6px; padding:2px 6px 2px 8px; border-radius:999px; border:1px solid var(--border); background:rgba(8,13,26,0.45); max-width:150px; }
.fish-inc-id { font-size:11px; color:#cfe8f7; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fish-inc-copy { border:none; background:transparent; color:var(--text-dim); cursor:pointer; padding:2px 4px; font-size:11px; line-height:1; border-radius:6px; }
.fish-inc-copy:hover { color:#eaf6ff; background:rgba(56,189,248,0.12); }

/* Ротация 3 персонажей (24/7) в строке рыбака.
   После удаления колонки «Подключённые агенты» блок занимает освободившуюся
   ширину, поэтому селекты слотов больше не обрезаются. */
.fish-rotation { margin-top:6px; padding:6px 8px; border:1px solid var(--border); border-radius:10px; background:rgba(8,13,26,0.4); display:flex; flex-direction:column; gap:6px; min-width:0; width:100%; max-width:560px; }
.fish-rot-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.fish-rot-title { font-size:11px; font-weight:600; color:#cfe8f7; line-height:1.2; }
.fish-rot-slot { font-size:11px; font-weight:700; color:#7dd3fc; padding:1px 8px; border-radius:999px; border:1px solid rgba(56,189,248,0.28); background:rgba(14,165,233,0.12); white-space:nowrap; }
.fish-rot-inputs { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:6px; }
.fish-rot-input { font-size:11px; padding:4px 6px; border-radius:7px; min-width:0; }
.fish-rot-select { width:100%; min-width:0; font-size:11px; padding:5px 6px; border-radius:7px; line-height:1.25; text-overflow:ellipsis; }
.fish-rot-select option { font-size:12px; padding:4px 6px; }
.fish-rot-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }

.fish-limit-wrap { display:flex; flex-direction:column; gap:1px; min-width:150px; }
.fish-limit-countdown { font-weight:600; font-size:13px; line-height:1.25; letter-spacing:-0.01em; }
.fish-limit-meta { display:flex; flex-wrap:wrap; gap:4px; align-items:baseline; font-size:11px; line-height:1.25; color:var(--text-dim); }
.fish-limit-meta-label { color:var(--text-dimmer); }
.fish-limit-meta-val { color:var(--text-dim); }
.fish-limit-live { font-size:11px; color:#22c55e; line-height:1.2; }

/* Карточки агентов используются в модалках/чате агента (в таблице рыбаков колонка убрана). */
.fish-agent-card { border:1px solid var(--border); border-radius:10px; padding:6px 8px; background:rgba(8,13,26,0.38); display:flex; flex-direction:column; gap:3px; }
.fish-agent-top { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:nowrap; }
.fish-agent-title { display:flex; align-items:center; gap:6px; flex-wrap:nowrap; min-width:0; flex:1 1 auto; }
.fish-agent-name { font-weight:600; font-size:12px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.fish-agent-scope { padding:1px 6px; font-size:10px; flex:0 0 auto; }
.fish-agent-badge { display:inline-flex; align-items:center; padding:1px 6px; border-radius:999px; font-size:10px; border:1px solid transparent; white-space:nowrap; flex:0 0 auto; }
.fish-agent-badge.is-active { background:rgba(34,197,94,0.16); color:#86efac; border-color:rgba(34,197,94,0.28); }
.fish-agent-badge.is-error { background:rgba(244,63,94,0.16); color:#fda4af; border-color:rgba(244,63,94,0.28); }
.fish-agent-badge.is-stopped { background:rgba(148,163,184,0.16); color:#cbd5e1; border-color:rgba(148,163,184,0.24); }
.fish-agent-actions { display:flex; align-items:center; gap:4px; flex-wrap:nowrap; flex:0 0 auto; }
.fish-agent-type { line-height:1.2; }
.fish-agent-model { color:var(--text-dimmer); }
.fish-agent-meta { display:flex; align-items:center; gap:6px; }
.fish-agent-key { font-size:11px; color:var(--text-dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fish-agent-status { font-size:11px; color:var(--text-dim); line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fish-agent-empty { margin-bottom:4px; }
.fish-agent-add { align-self:flex-start; }

.fish-actions-wrap { display:flex; flex-direction:column; gap:6px; align-items:stretch; min-width:130px; max-width:170px; }
.fish-actions { display:flex; gap:6px; justify-content:space-between; }
.fish-actions .btn, .fish-actions-check .btn { flex:1 1 0; min-width:0; white-space:nowrap; }
.fish-actions-check { display:flex; }
.fish-actions-check .btn { width:100%; }

/* Characters (Персонажи) polish */
.chars-page-head { margin-bottom: 14px; }
.chars-head-row { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.chars-add-btn { flex:0 0 auto; }
.chars-filters { padding:10px 12px; }
.chars-filters-grid { display:grid; grid-template-columns:minmax(220px,2fr) repeat(2,minmax(150px,1fr)) minmax(220px,1.4fr); gap:8px 10px; align-items:end; }
.chars-filter-field .label { margin-bottom:4px; font-size:11px; }
.chars-filter-field input, .chars-filter-field select { padding:7px 10px; font-size:13px; }
.chars-table-meta { display:flex; align-items:center; justify-content:flex-end; }
.chars-table-card { padding:6px 8px; overflow-x:auto; }
.chars-table th, .chars-table td { padding:7px 10px; vertical-align:middle; }
.chars-table thead th { font-size:10px; letter-spacing:.05em; }
.chars-num { color:#eaf6ff; }
.chars-adena { color:#fcd34d; font-weight:600; }
.chars-coins { display:flex; flex-wrap:wrap; gap:4px; }
.chars-coin-badge { display:inline-flex; align-items:center; padding:2px 7px; border-radius:999px; font-size:11px; font-weight:600; color:#fde68a; background:rgba(245,158,11,0.14); border:1px solid rgba(245,158,11,0.24); white-space:nowrap; }
.chars-updated { line-height:1.25; white-space:nowrap; }
.chars-updated-by { color:var(--text-dimmer); font-size:11px; margin-top:1px; }
.chars-actions-cell { width:1%; white-space:nowrap; }
.chars-actions { display:inline-flex; align-items:center; gap:4px; }
.chars-icon-btn { width:28px; height:28px; padding:0; display:inline-flex; align-items:center; justify-content:center; font-size:13px; line-height:1; }
.chars-edit-btn:hover:not(:disabled) { color:#7dd3fc; border-color:rgba(56,189,248,0.35); background:rgba(14,165,233,0.14); }
.chars-delete-btn { color:#fda4af; border-color:rgba(244,63,94,0.22); }
.chars-delete-btn:hover:not(:disabled) { color:#fecdd3; border-color:rgba(244,63,94,0.38); background:rgba(244,63,94,0.16); }

/* Worklogs (Журнал выработки) polish */
.wl-kpi-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; width:100%; }
.wl-coin-kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; }
.wl-kpi { position:relative; padding:10px 14px 10px 16px; border-radius:12px; overflow:hidden; }
.wl-kpi::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--accent-2); box-shadow:0 0 0 1px rgba(56,189,248,0.18); }
.wl-kpi-blue::before { background:linear-gradient(180deg,#38bdf8,#0ea5e9); }
.wl-kpi-amber::before { background:linear-gradient(180deg,#f59e0b,#d97706); box-shadow:0 0 0 1px rgba(245,158,11,0.18); }
.wl-kpi-green::before { background:linear-gradient(180deg,#22c55e,#16a34a); box-shadow:0 0 0 1px rgba(34,197,94,0.18); }
.wl-kpi-coin::before { background:linear-gradient(180deg,#fcd34d,#f59e0b); box-shadow:0 0 0 1px rgba(245,158,11,0.18); }
.wl-kpi-label { line-height:1.2; }
.wl-kpi-value { font-size:22px; font-weight:700; line-height:1.1; margin-top:2px; letter-spacing:-0.01em; color:#f3fbff; }
.wl-kpi-sub { margin-top:2px; line-height:1.2; }

.wl-filters { padding:10px 12px; }
.wl-filters-grid { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px 10px; }
.wl-filter-field { min-width:140px; flex:1 1 150px; }
.wl-filter-wide { min-width:220px; flex:2 1 240px; }
.wl-filter-field .label { margin-bottom:4px; font-size:11px; }
.wl-filter-field input, .wl-filter-field select { padding:7px 10px; font-size:13px; height:34px; }
.wl-filter-actions { display:flex; align-items:flex-end; flex:0 0 auto; }
.wl-reset-btn { height:34px; }

.wl-summary-tables { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.wl-summary-card { padding:12px 14px; min-width:0; }
.wl-summary-title { font-weight:600; margin-bottom:8px; color:#eaf6ff; font-size:13px; }
.wl-table-wrap { overflow-x:auto; }
.wl-table th, .wl-table td { padding:7px 10px; vertical-align:middle; }
.wl-table thead th { font-size:10px; letter-spacing:.05em; }
.wl-empty-cell { text-align:center; padding:22px 12px; color:var(--text-dim); font-size:13px; background:rgba(8,13,26,0.18); }

.wl-log-meta { display:flex; align-items:center; justify-content:flex-end; padding-right: 4px; }
.wl-log-card { padding:8px 10px; overflow-x:auto; }
.wl-log-table th, .wl-log-table td { padding:7px 10px; }

.wl-delta { font-weight:600; }
.wl-delta-pos { color:#86efac; }
.wl-delta-neg { color:#fda4af; }
.wl-delta-zero { color:var(--text-dim); }
.wl-delta-adena { color:#fcd34d; font-weight:600; }
.wl-coins { display:flex; flex-wrap:wrap; gap:4px; }
.wl-coin-badge { display:inline-flex; align-items:center; padding:2px 7px; border-radius:999px; font-size:11px; font-weight:600; border:1px solid rgba(245,158,11,0.24); background:rgba(245,158,11,0.12); white-space:nowrap; }
.wl-coin-badge.wl-delta-pos { color:#fde68a; border-color:rgba(245,158,11,0.28); }
.wl-coin-badge.wl-delta-neg { color:#fda4af; border-color:rgba(244,63,94,0.28); background:rgba(244,63,94,0.12); }
.wl-coin-badge.wl-delta-zero { color:#cbd5e1; border-color:rgba(148,163,184,0.22); background:rgba(148,163,184,0.12); }

/* Proxies (Прокси) polish */
.proxy-page-head { margin-bottom: 14px; }
.proxy-head-row { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.proxy-head-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.proxy-kpi-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; width:100%; }
.proxy-kpi { position:relative; padding:10px 14px 10px 16px; border-radius:12px; overflow:hidden; }
.proxy-kpi::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--accent-2); box-shadow:0 0 0 1px rgba(56,189,248,0.18); }
.proxy-kpi-blue::before { background:linear-gradient(180deg,#38bdf8,#0ea5e9); }
.proxy-kpi-green::before { background:linear-gradient(180deg,#22c55e,#16a34a); box-shadow:0 0 0 1px rgba(34,197,94,0.18); }
.proxy-kpi-amber::before { background:linear-gradient(180deg,#f59e0b,#f43f5e); box-shadow:0 0 0 1px rgba(245,158,11,0.18); }
.proxy-kpi-label { line-height:1.2; }
.proxy-kpi-value { font-size:22px; font-weight:700; line-height:1.1; margin-top:2px; letter-spacing:-0.01em; }
.proxy-kpi-green .proxy-kpi-value { color:#86efac; }
.proxy-kpi-amber .proxy-kpi-value { color:#fcd34d; }

.proxy-table-card { padding:8px 10px; overflow-x:auto; }
.proxy-table th, .proxy-table td { padding:7px 10px; vertical-align:middle; }
.proxy-table thead th { font-size:10px; letter-spacing:.05em; }
.proxy-proto { font-weight:600; }
.proxy-proto-http { color:#7dd3fc; background:rgba(14,165,233,0.14); border-color:rgba(56,189,248,0.25); }
.proxy-proto-socks { color:#c4b5fd; background:rgba(139,92,246,0.14); border-color:rgba(139,92,246,0.25); }
.proxy-addr-wrap, .proxy-pass-wrap { display:inline-flex; align-items:center; gap:6px; }
.proxy-addr, .proxy-login, .proxy-pass { font-size:12px; color:#eaf6ff; }
.proxy-mini-btn { border:1px solid var(--border); background:rgba(8,13,26,0.45); color:var(--text-dim); border-radius:6px; width:22px; height:22px; padding:0; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; font-size:11px; line-height:1; }
.proxy-mini-btn:hover { color:#eaf6ff; border-color:rgba(56,189,248,0.35); background:rgba(56,189,248,0.12); }
.proxy-accounts { display:flex; flex-wrap:wrap; gap:4px; }
.proxy-account-badge { font-size:10px; padding:2px 7px; max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.proxy-status { display:inline-flex; align-items:center; gap:6px; }
.proxy-status-dot { width:7px; height:7px; border-radius:50%; background:#64748b; box-shadow:0 0 0 3px rgba(100,116,139,.18); flex:0 0 7px; }
.proxy-status-dot.is-ok { background:#22c55e; box-shadow:0 0 0 3px rgba(34,197,94,.18), 0 0 8px rgba(34,197,94,.35); }
.proxy-status-dot.is-bad { background:#f43f5e; box-shadow:0 0 0 3px rgba(244,63,94,.18); }
.proxy-status-dot.is-unknown { background:#94a3b8; box-shadow:0 0 0 3px rgba(148,163,184,.16); }
.proxy-check-time { margin-top:2px; line-height:1.2; }
.proxy-actions-cell { width:1%; white-space:nowrap; }
.proxy-actions { display:inline-flex; align-items:center; gap:4px; }
.proxy-icon-btn { width:28px; height:28px; padding:0; display:inline-flex; align-items:center; justify-content:center; font-size:13px; line-height:1; }
.proxy-check-btn:hover:not(:disabled), .proxy-edit-btn:hover:not(:disabled) { color:#7dd3fc; border-color:rgba(56,189,248,0.35); background:rgba(14,165,233,0.14); }
.proxy-delete-btn { color:#fda4af; border-color:rgba(244,63,94,0.22); }
.proxy-delete-btn:hover:not(:disabled) { color:#fecdd3; border-color:rgba(244,63,94,0.38); background:rgba(244,63,94,0.16); }

.proxy-empty-cell { padding:0; }
.proxy-empty { padding:28px 16px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:8px; }
.proxy-empty-title { font-weight:600; color:#eaf6ff; }
.proxy-empty-hint { max-width:520px; }
.proxy-empty-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; margin-top:4px; }

@media (max-width: 1100px) {
  .app-main { padding: 14px; }
  .sidebar { width: 196px; }
  .stats-grid-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fish-control-bar { align-items:flex-start; }
  .chars-filters-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .wl-summary-tables { grid-template-columns:1fr; }
}
@media (max-width: 860px) {
  body { font-size: 13.5px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s; z-index: 40; width: 208px; }
  .app-main { padding: 12px; }
  .acc-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
  .stats-grid-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fish-kpi-grid { grid-template-columns:1fr; }
  .fish-control-actions { width:100%; }
  .chars-filters-grid { grid-template-columns:1fr; }
  .chars-head-row { align-items:stretch; }
  .wl-kpi-grid { grid-template-columns:1fr; }
  .wl-filter-field, .wl-filter-wide { flex:1 1 100%; min-width:0; }
  .proxy-kpi-grid { grid-template-columns:1fr; }
  .proxy-head-actions { width:100%; }
}

/* Users (пользователи и роли) polish */
.users-page-head { margin-bottom: 14px; }
.users-head-row { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.users-add-btn { flex:0 0 auto; }
.users-kpi-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; width:100%; }
.users-kpi { position:relative; padding:10px 14px 10px 16px; border-radius:12px; overflow:hidden; }
.users-kpi::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--accent-2); box-shadow:0 0 0 1px rgba(56,189,248,0.18); }
.users-kpi-blue::before { background:linear-gradient(180deg,#38bdf8,#0ea5e9); }
.users-kpi-emerald::before { background:linear-gradient(180deg,#34d399,#10b981); box-shadow:0 0 0 1px rgba(16,185,129,0.18); }
.users-kpi-amber::before { background:linear-gradient(180deg,#f59e0b,#d97706); box-shadow:0 0 0 1px rgba(245,158,11,0.18); }
.users-kpi-label { line-height:1.2; }
.users-kpi-value { font-size:22px; font-weight:700; line-height:1.1; margin-top:2px; letter-spacing:-0.01em; color:#f3fbff; }
.users-table-card { padding:8px 10px; overflow-x:auto; }
.users-table-wrap { overflow-x:auto; }
.users-table th, .users-table td { padding:7px 10px; vertical-align:middle; }
.users-table thead th { font-size:10px; letter-spacing:.05em; vertical-align:middle; }
.users-table tbody tr { transition: background .14s ease; }
.users-table .users-col-accounts { width:110px; text-align:center; }
.users-num { color:#eaf6ff; }
.users-date { white-space:nowrap; }
.users-actions-cell { width:1%; white-space:nowrap; }
.users-actions { display:inline-flex; align-items:center; gap:4px; }
.users-icon-btn { width:28px; height:28px; padding:0; display:inline-flex; align-items:center; justify-content:center; font-size:13px; line-height:1; }
.users-icon-btn:hover:not(:disabled) { color:#7dd3fc; border-color:rgba(56,189,248,0.35); background:rgba(14,165,233,0.14); }
.users-role-badge { font-weight:600; }
.users-role-admin { background: rgba(14,165,233,.22); color: #bae6fd; border: 1px solid rgba(56,189,248,.38); box-shadow: 0 0 0 1px rgba(56,189,248,.08) inset; }
.users-role-employee { background: rgba(100,116,139,.16); color: #cbd5e1; border: 1px solid rgba(148,163,184,.2); }
@media (max-width: 860px) { .users-kpi-grid { grid-template-columns:1fr; } }

/* BoHpts automation (автоматизация и интеграция) polish */
.bh-page-head { margin-bottom: 14px; }
/* Панель BoHpts внутри аккордеона «Диагностика» (Настройки). */
.bh-panel { display:flex; flex-direction:column; gap:14px; min-width:0; }
.bh-panel > .card, .bh-panel > .bh-table-card { margin-bottom:0; }
.bh-panel-error { padding:10px 12px; border-radius:10px; border:1px solid rgba(244,63,94,.28); background:rgba(244,63,94,.10); color:#fecdd3; font-size:13px; }
.bh-control-card { padding: 12px 14px; }
.bh-control-row { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.bh-control-fields { display:flex; align-items:flex-end; gap:10px; flex:1 1 520px; min-width:0; flex-wrap:wrap; }
.bh-field { min-width:0; }
.bh-field-action { flex:1 1 220px; min-width:180px; }
.bh-field-params { flex:2 1 320px; min-width:220px; }
.bh-field .label { margin-bottom:4px; font-size:11px; }
.bh-field select, .bh-field input { height:36px; padding:7px 10px; font-size:13px; }
.bh-json-input { font-family: var(--mono); font-size:12px; letter-spacing:-0.01em; }
.bh-control-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; flex:0 1 auto; }
.bh-control-actions .btn { height:36px; }
.bh-cleanup-btn { margin-left:auto; opacity:.92; }
.bh-info-banner { margin-top:10px; padding:8px 10px; border-radius:10px; border:1px dashed rgba(56,189,248,0.18); background:rgba(8,13,26,0.28); color:var(--text-dim); line-height:1.4; }
.bh-inline-code { font-family: var(--mono); font-size:11px; color:#7dd3fc; background:rgba(14,165,233,0.12); border:1px solid rgba(56,189,248,0.18); border-radius:6px; padding:1px 6px; }
.bh-inline-strong { color:#eaf6ff; font-weight:600; }

.bh-table-card { padding:8px 10px; }
.bh-table-wrap { overflow-x:auto; }
.bh-table th, .bh-table td { padding:8px 12px; vertical-align:middle; }
.bh-table thead th { font-size:10px; letter-spacing:.05em; vertical-align:middle; }
.bh-table tbody tr { transition: background .14s ease; }
.bh-table tbody tr:hover { background: rgba(56,189,248,0.06); }
.bh-col-select { width:36px; text-align:center; }
.bh-col-server { width:120px; }
.bh-col-chars { width:72px; text-align:center; }
.bh-col-session { width:120px; }
.bh-col-check { width:170px; }
.bh-col-actions-head { text-align:right; }
.bh-login-cell { font-weight:600; color:#f3fbff; }
.bh-check-cell { white-space:nowrap; color:var(--text-dim); }
.bh-empty-cell { text-align:center; padding:24px 12px; color:var(--text-dim); }
.bh-actions-cell { width:1%; white-space:nowrap; }
.bh-actions { display:flex; flex-direction:row; flex-wrap:nowrap; align-items:center; justify-content:flex-end; gap:6px; white-space:nowrap; }
.bh-action-btn { font-size:12px; padding:4px 10px; height:28px; line-height:1; white-space:nowrap; }
.bh-action-btn.btn-danger { color:#fda4af; border-color:rgba(244,63,94,0.22); background:rgba(244,63,94,0.10); }
.bh-action-btn.btn-danger:hover:not(:disabled) { color:#fecdd3; border-color:rgba(244,63,94,0.38); background:rgba(244,63,94,0.18); }

.bh-server-badge { background: rgba(100,116,139,.16); color:#dce8f3; border:1px solid rgba(148,163,184,.22); font-weight:600; }
.bh-session-badge { font-weight:600; }
.bh-session-ok { background: rgba(34,197,94,.16); color:#86efac; border:1px solid rgba(34,197,94,.28); }
.bh-session-error { background: rgba(244,63,94,.18); color:#fecdd3; border:1px solid rgba(244,63,94,.34); box-shadow:0 0 0 1px rgba(244,63,94,.08) inset; }
.bh-session-neutral { background: rgba(100,116,139,.16); color:#cbd5e1; border:1px solid rgba(148,163,184,.22); }

.bh-batches-card { display:block; }
.bh-section-head { padding:4px 4px 10px; border-bottom:1px solid var(--border); margin-bottom:4px; }
.bh-section-title { margin:0; font-size:15px; font-weight:700; color:#f3fbff; letter-spacing:-0.01em; }
.bh-section-sub { margin-top:2px; }
.bh-batch-status { font-weight:600; }
.bh-batch-ok { background: rgba(34,197,94,.14); color:#86efac; border:1px solid rgba(34,197,94,.25); }
.bh-batch-error { background: rgba(244,63,94,.16); color:#fda4af; border:1px solid rgba(244,63,94,.28); }
.bh-batch-run { background: rgba(14,165,233,.14); color:#7dd3fc; border:1px solid rgba(56,189,248,.25); }
.bh-batch-neutral { background: rgba(100,116,139,.16); color:#cbd5e1; border:1px solid rgba(148,163,184,.22); }

@media (max-width: 1100px) {
  .bh-control-row { align-items:stretch; }
  .bh-control-actions { width:100%; justify-content:flex-start; }
  .bh-cleanup-btn { margin-left:0; }
}

/* Agent template picker (Settings source of truth) */
.agent-tpl-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-height: 62vh;
  overflow: auto;
  padding-right: 2px;
}
.agent-tpl-card {
  text-align: left;
  width: 100%;
  border: 1px solid rgba(56, 189, 248, 0.16);
  background: linear-gradient(180deg, rgba(20, 31, 56, 0.82), rgba(15, 23, 42, 0.78));
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-soft);
}
.agent-tpl-card.is-connected {
  border-color: rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(20, 31, 56, 0.55), rgba(15, 23, 42, 0.55));
  opacity: 0.9;
}
.agent-tpl-card.is-disabled:not(.is-connected) {
  border-color: rgba(245, 158, 11, 0.18);
}
.agent-tpl-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.agent-tpl-name {
  font-weight: 700;
  color: #eaf6ff;
  font-size: 14px;
  line-height: 1.3;
}
.agent-tpl-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.agent-tpl-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}
.agent-tpl-meta-row {
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #d7ebf8;
  line-height: 1.35;
  min-width: 0;
}
.agent-tpl-meta-k {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 12px;
}
.agent-tpl-mods {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.agent-tpl-preview {
  font-size: 12px;
  color: #c9deee;
  line-height: 1.45;
  white-space: pre-wrap;
  border-top: 1px solid rgba(56, 189, 248, 0.08);
  padding-top: 8px;
}
.agent-tpl-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
  border-top: 1px solid rgba(56, 189, 248, 0.08);
  padding-top: 8px;
}
@media (max-width: 700px) {
  .agent-tpl-meta { grid-template-columns: 1fr; }
}

/* Market / Autobuy (Impeccable, quiet B2B terminal) */
.mk-page--impeccable { padding-bottom: 150px; background: transparent; }
.mk-page--impeccable .card {
  background: #111827;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: none;
  border-radius: 12px;
}
.mk-page--impeccable .table-wrap { border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; background: #0f1623; }
.mk-page--impeccable .table th { background: #0f1623; color: #9CA3AF; border-bottom: 1px solid rgba(255,255,255,0.08); }
.mk-page--impeccable .table td { border-bottom: 1px solid rgba(255,255,255,0.06); }
.mk-page--impeccable .table tbody tr:hover { background: rgba(255,255,255,0.03); }
.mk-page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; flex-wrap:wrap; }
.mk-page-head h1 { font-size:22px; color:#F9FAFB; margin:0; }
.mk-page-head p { margin:4px 0 0; color:#9CA3AF; font-size:13px; }
.mk-head-actions { display:flex; align-items:center; gap:8px; }
.mk-command-card { padding:12px; margin-bottom:16px; }
.mk-command-bar { display:flex; align-items:center; gap:8px; height:50px; }
.mk-command-input {
  flex:1; min-width:0; height:50px; padding:0 14px; border-radius:10px;
  background:#0B0F17; border:1px solid rgba(255,255,255,0.08); color:#F9FAFB; font-size:14px;
}
.mk-command-input:focus { border-color: rgba(6,182,212,0.5); box-shadow: 0 0 0 3px rgba(6,182,212,0.12); }
.mk-command-send { height:50px; padding:0 14px; border-radius:10px; white-space:nowrap; }
.mk-preset-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.mk-preset-chip {
  display:inline-flex; align-items:center; padding:5px 10px; border-radius:999px;
  border:1px solid rgba(255,255,255,0.10); background:#0f1623; color:#D1D5DB; font-size:12px; cursor:pointer;
}
.mk-preset-chip:hover { border-color: rgba(6,182,212,0.35); color:#F9FAFB; background:#111827; }
.mk-preset-chip.is-on { border-color: rgba(6,182,212,0.55); background: rgba(6,182,212,0.14); color:#A5F3FC; }
.mk-command-status { margin-top:8px; min-height:16px; }
.mk-section-title { font-weight:600; color:#F9FAFB; font-size:14px; letter-spacing:0; }
.mk-table-card { padding:12px; margin-bottom:16px; }
.mk-table-card-head { padding:0 0 10px; }
.mk-console-card { padding:12px; margin-bottom:16px; }
.mk-rules-table th, .mk-rules-table td, .mk-feed-table th, .mk-feed-table td { padding:8px 10px; vertical-align:middle; }
.mk-rules-table .mk-num, .mk-rules-table th.mk-num, .mk-feed-table .mk-num, .mk-feed-table th.mk-num { text-align:right; white-space:nowrap; font-variant-numeric: tabular-nums; }
.mk-progress-cell { min-width:150px; }
.mk-progress { width:100%; max-width:130px; }
.mk-progress-top { display:flex; align-items:baseline; justify-content:space-between; gap:8px; font-size:12px; line-height:1.2; margin-bottom:4px; color:#D1D5DB; }
.mk-progress-bar { height:6px; max-width:130px; background:#0B0F17; border-color:rgba(255,255,255,0.08); }
.mk-actions-cell { text-align:right; white-space:nowrap; }
.mk-actions { display:inline-flex; align-items:center; justify-content:flex-end; gap:4px; flex-wrap:nowrap; }
.mk-action-main { padding:5px 10px; }
.mk-icon-btn { width:28px; height:28px; padding:0 !important; display:inline-flex; align-items:center; justify-content:center; }
.mk-empty-cell { text-align:center; padding:16px 12px; color:#9CA3AF; font-size:13px; }
.mk-prompt-preview { max-width:320px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Analytics (quiet, compact, collapsible) */
.mk-analytics-card--quiet { padding:12px; margin-bottom:16px; }
.mk-analytics-head-compact { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.mk-analytics-empty {
  min-height:56px; max-height:80px; padding:10px 12px; border:1px solid rgba(255,255,255,0.08); border-radius:10px;
  background:#0f1623; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
}
.mk-analytics-empty-left { display:flex; align-items:center; gap:10px; flex-wrap:wrap; min-width:0; }
.mk-analytics-empty-title { font-weight:600; color:#F9FAFB; font-size:13px; }
.mk-analytics-empty-status { color:#9CA3AF; font-size:13px; }
.mk-analytics-empty-actions { display:flex; align-items:center; gap:8px; }
.mk-analytics-details { margin-top:10px; }
.mk-analytics-controls-row { display:flex; align-items:center; gap:8px; flex-wrap:nowrap; margin-bottom:10px; }
.mk-an-rule-select { min-width:220px; flex:1 1 320px; max-width:520px; height:34px; background:#0B0F17; border:1px solid rgba(255,255,255,0.08); color:#F9FAFB; }
.mk-tf-row { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:10px; }
.mk-analytics-note { color:#9CA3AF; font-size:13px; padding:8px 0; }
.mk-metrics-grid { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px; margin-bottom:10px; }
.mk-metric-panel {
  border:1px solid rgba(255,255,255,0.08); border-radius:10px; padding:10px 12px; background:#0f1623; min-width:0;
}
.mk-metric-title { font-size:11.5px; color:#9CA3AF; font-weight:500; line-height:1.3; margin-bottom:4px; }
.mk-metric-value { font-size:20px; line-height:1.15; font-weight:600; color:#F9FAFB; letter-spacing:-0.01em; margin-bottom:2px; font-variant-numeric: tabular-nums; }
.mk-metric-sub { font-size:11.5px; color:#9CA3AF; line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mk-chart-section { margin-top:2px; }
.mk-chart-wrap { border:1px solid rgba(255,255,255,0.08); border-radius:10px; background:#0B0F17; padding:8px 8px 6px; overflow-x:auto; }
.mk-chart-bars { display:flex; gap:3px; align-items:flex-end; min-height:84px; }
.mk-chart-empty {
  height:80px; border:1px dashed rgba(255,255,255,0.10); border-radius:10px; background:#0f1623;
  display:flex; align-items:center; justify-content:center; gap:8px; color:#9CA3AF; font-size:13px; text-align:center; padding:10px;
}
.mk-chart-empty--compact { height:80px; }
.mk-log-comment-cell { max-width:420px; min-width:240px; }
.mk-log-comment-text { white-space:pre-wrap; word-break:break-word; font-size:12.5px; line-height:1.4; color:#D1D5DB; }
.mk-log-comment.is-clamped .mk-log-comment-text { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.mk-log-toggle { margin-top:4px; padding:0; border:none; background:transparent; color:#06B6D4; font-size:11.5px; font-weight:500; cursor:pointer; }
.mk-log-toggle:hover { color:#67e8f9; text-decoration:underline; }

/* Scoped quieter buttons on market page (primary accent only #06B6D4) */
.mk-page--impeccable .btn-primary {
  background: #06B6D4; color:#041016; border-color: rgba(6,182,212,0.5);
  box-shadow: none; background-image: none;
}
.mk-page--impeccable .btn-primary:hover:not(:disabled) { filter: brightness(1.05); }
.mk-page--impeccable .btn-secondary { background:#111827; border-color: rgba(255,255,255,0.10); color:#E5E7EB; }
.mk-page--impeccable .btn-secondary:hover:not(:disabled) { background:#162033; border-color: rgba(255,255,255,0.14); }
.mk-page--impeccable .badge { border-color: rgba(255,255,255,0.08); }

@media (max-width: 1200px) { .mk-metrics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 800px) {
  .mk-metrics-grid { grid-template-columns: 1fr; }
  .mk-analytics-controls-row { flex-wrap:wrap; }
  .mk-an-rule-select { min-width:0; width:100%; max-width:none; }
  .mk-command-bar { height:auto; flex-wrap:wrap; }
  .mk-command-input, .mk-command-send { height:46px; }
}

/* ── Гибридный Рынок: пул потоков, стратегии, AI-прогноз ──────────────────── */
.mk-pool-card { padding:10px 12px; margin-bottom:12px; }
.mk-pool-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.mk-pool-metrics { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; font-size:12.5px; color:#9CA3AF; }
.mk-pool-item { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.mk-pool-item b { color:#F9FAFB; font-weight:600; }
.mk-pool-sep { color:#4B5563; }
.mk-pool-dot { width:7px; height:7px; border-radius:999px; flex:0 0 7px; background:#22c55e; box-shadow:0 0 0 3px rgba(34,197,94,.14); }
.mk-pool-track { flex:1 1 120px; min-width:90px; max-width:220px; height:6px; border-radius:999px; background:#0B0F17; border:1px solid rgba(255,255,255,0.08); overflow:hidden; }
.mk-pool-track-fill { height:100%; background:#06B6D4; border-radius:999px; transition:width .25s ease-out; }
.mk-pool-track-fill.warn { background:#f59e0b; }

.mk-strategies-card { padding:12px; margin-bottom:16px; }
.mk-strategies-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; padding-bottom:10px; }
.mk-strategy-list { display:flex; flex-direction:column; gap:8px; }
.mk-strategy {
  border:1px solid rgba(255,255,255,0.08); border-radius:10px; background:#0f1623;
  padding:10px 12px; min-width:0;
}
.mk-strategy.is-paused { background:#0d141f; }
.mk-strategy.is-paused .mk-strategy-title { color:#CBD5E1; }
.mk-strategy-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.mk-strategy-head-main { min-width:0; }
.mk-strategy-title { font-size:14px; font-weight:600; color:#F9FAFB; line-height:1.3; }
.mk-strategy-item-id { font-size:11.5px; font-weight:500; color:#9CA3AF; }
.mk-strategy-sub { margin-top:2px; font-size:12px; color:#9CA3AF; }
.mk-strategy-head-badges { display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.mk-strategy-grid {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.15fr) minmax(0,1fr) minmax(0,1.5fr);
  gap:8px; margin-top:10px; padding-top:10px; border-top:1px solid rgba(255,255,255,0.06);
}
.mk-strategy-cell { min-width:0; border-left:1px solid rgba(255,255,255,0.05); padding-left:10px; }
.mk-strategy-cell:first-child { border-left:none; padding-left:0; }
.mk-strategy-cell-k { font-size:11px; font-weight:600; letter-spacing:.02em; color:#9CA3AF; margin-bottom:4px; }
.mk-strategy-cell-v { font-size:12.5px; color:#E5E7EB; line-height:1.45; min-width:0; overflow-wrap:anywhere; }
.mk-strategy-cell-sub { margin-top:4px; font-size:11.5px; color:#9CA3AF; line-height:1.4; }
.mk-strategy-cell-sub b { color:#CBD5E1; font-weight:600; }
.mk-strategy-cell-sub.mk-hard { color:#94A3B8; }
.mk-window-row { display:flex; align-items:baseline; justify-content:space-between; gap:8px; font-size:12.5px; color:#E5E7EB; }
.mk-window-row b { font-weight:600; font-variant-numeric:tabular-nums; }
.mk-window-k { color:#9CA3AF; font-size:11.5px; }
.mk-threshold { display:flex; flex-wrap:wrap; gap:4px 12px; font-size:12.5px; color:#E5E7EB; }
.mk-threshold b { font-weight:600; font-variant-numeric:tabular-nums; }
.mk-threshold.is-breach { color:#fbbf24; }
.mk-threshold.is-breach b { color:#fbbf24; }
.mk-forecast-text { font-size:12.5px; line-height:1.5; color:#CBD5E1; white-space:pre-wrap; }
.mk-strategy-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:10px; }
.mk-strategies-empty {
  border:1px dashed rgba(255,255,255,0.10); border-radius:10px; background:#0f1623;
  padding:14px; color:#9CA3AF; font-size:13px; line-height:1.5;
}

/* Модалка стратегии */
.mk-strategy-modal { max-width:780px; margin:0 auto; }
.mk-form-section { margin-top:12px; }
.mk-form-section-title { font-size:12px; font-weight:600; letter-spacing:.03em; color:#7DD3FC; margin-bottom:8px; }
.mk-form-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; }
.mk-form-grid--hours { grid-template-columns:repeat(4, minmax(0,1fr)); }
.mk-field { min-width:0; }
.mk-field .label { display:block; margin-bottom:5px; }
.mk-field-hint { margin-top:5px; font-size:11.5px; line-height:1.4; color:#9CA3AF; }
.mk-corridor-note {
  margin-top:8px; padding:8px 10px; border:1px solid rgba(6,182,212,0.22); border-radius:8px;
  background:rgba(6,182,212,0.06); font-size:11.5px; line-height:1.45; color:#A5D8E8;
}
.mk-hour-grid { display:grid; grid-template-columns:repeat(12, minmax(0,1fr)); gap:4px; }
.mk-hour-chip {
  padding:4px 0; border-radius:6px; border:1px solid rgba(255,255,255,0.10); background:#0B0F17;
  color:#9CA3AF; font-size:11px; line-height:1.2; cursor:pointer; font-variant-numeric:tabular-nums;
  font-family:var(--mono);
}
.mk-hour-chip:hover { border-color:rgba(6,182,212,0.35); color:#E5E7EB; }
.mk-hour-chip.is-on { border-color:rgba(6,182,212,0.55); background:rgba(6,182,212,0.14); color:#A5F3FC; }
.mk-switch-row { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:10px; }
.mk-switch { display:inline-flex; align-items:center; gap:8px; font-size:12.5px; color:#E5E7EB; cursor:pointer; }
.mk-switch input { width:auto; margin:0; }

@media (max-width: 1200px) {
  .mk-strategy-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .mk-strategy-cell:nth-child(3) { border-left:none; padding-left:0; }
}
@media (max-width: 760px) {
  .mk-strategy-grid { grid-template-columns:1fr; }
  .mk-strategy-cell { border-left:none; padding-left:0; border-top:1px solid rgba(255,255,255,0.05); padding-top:8px; }
  .mk-strategy-cell:first-child { border-top:none; padding-top:0; }
  .mk-form-grid, .mk-form-grid--hours { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .mk-hour-grid { grid-template-columns:repeat(8, minmax(0,1fr)); }
  .mk-pool-track { max-width:none; flex-basis:100%; }
}

/* Индикация синхронизации BoHpts на кнопках обновления */
@keyframes spin-360 { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.is-syncing { opacity: 0.75; cursor: wait; }
.is-syncing:disabled { opacity: 0.75; cursor: wait; }
.is-syncing svg { animation: spin-360 0.9s linear infinite; transform-origin: 50% 50%; }

/* ── Клиент Lineage 2 / Ikar Bot: пути, лимиты окон, автологин ───────────── */
.l2-client-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,1fr); gap:16px; align-items:start; }
.l2-client-fields { display:flex; flex-direction:column; gap:12px; min-width:0; }
.l2-path-field { min-width:0; }
.l2-path-field .label { display:block; margin-bottom:6px; }
.l2-path-input-row { display:flex; align-items:center; gap:8px; min-width:0; }
.l2-path-input-row input { flex:1 1 auto; min-width:0; font-family:var(--mono); font-size:12.5px; }
.l2-path-hint { margin-top:5px; font-size:11.5px; line-height:1.4; color:var(--text-dimmer); }
.l2-path-hint code { font-size:11px; color:#9fd9f6; background:rgba(56,189,248,.08); border:1px solid rgba(56,189,248,.12); border-radius:5px; padding:0 4px; }
.l2-path-hint b { color:#cbd5e1; }
.l2-client-params { margin-top:2px; }

.l2-path-status {
  flex:0 0 auto; display:inline-flex; align-items:center; gap:5px;
  font-size:11.5px; font-weight:600; line-height:1; white-space:nowrap;
  padding:6px 9px; border-radius:999px;
  border:1px solid rgba(148,163,184,.22); background:rgba(148,163,184,.08); color:var(--text-dim);
  font-variant-numeric:tabular-nums;
}
.l2-path-status--ok { border-color:rgba(34,197,94,.42); background:rgba(34,197,94,.12); color:#4ade80; }
.l2-path-status--err { border-color:rgba(244,63,94,.45); background:rgba(244,63,94,.12); color:#fb7185; }
.l2-path-status--checking { border-color:rgba(56,189,248,.35); background:rgba(56,189,248,.10); color:#7dd3fc; }
.l2-path-status--unknown { border-color:rgba(148,163,184,.22); background:rgba(148,163,184,.07); color:var(--text-dimmer); font-weight:500; }

.l2-client-side { display:flex; flex-direction:column; gap:12px; min-width:0; }
.l2-limits {
  border:1px solid var(--border); border-radius:12px; padding:12px;
  background:linear-gradient(180deg, rgba(20,31,56,.55), rgba(8,13,26,.55));
  display:flex; flex-direction:column; gap:8px;
}
.l2-limit-tile { border:1px solid rgba(56,189,248,.12); border-radius:10px; padding:8px 10px; background:rgba(8,13,26,.45); min-width:0; }
.l2-limit-tile--bot { border-left:3px solid var(--accent); }
.l2-limit-tile--manual { border-left:3px solid #a78bfa; }
.l2-limit-title { font-size:11.5px; font-weight:600; color:var(--text-dim); line-height:1.3; }
.l2-limit-value { margin-top:3px; font-size:13px; color:#eaf6ff; font-variant-numeric:tabular-nums; }
.l2-limit-value b { font-size:15px; color:#f8fafc; }
.l2-limit-tile--bot .l2-limit-value b { color:#7dd3fc; }
.l2-limit-tile--manual .l2-limit-value b { color:#c4b5fd; }
.l2-limit-total { font-size:11.5px; color:var(--text-dimmer); text-align:center; padding-top:2px; }
.l2-limit-total b { color:#cbd5e1; }

.l2-autologin {
  border:1px solid var(--border); border-radius:12px; padding:12px;
  background:rgba(8,13,26,.35); display:flex; flex-direction:column; gap:6px; min-width:0;
}
.l2-autologin .label { display:block; }
.l2-autologin select { width:100%; }

/* ── Индикатор занятых окон L2 и кнопки запуска игры ─────────────────────── */
.acc-topbar-left { gap:10px; flex-wrap:wrap; }
.acc-topbar-l2win { display:flex; align-items:center; min-width:0; }
.l2-win-indicator {
  display:inline-flex; align-items:center; gap:7px;
  padding:5px 10px; border-radius:999px;
  border:1px solid var(--border); background:rgba(8,13,26,.5);
  font-size:12px; color:var(--text-dim); line-height:1.2; white-space:nowrap;
}
.l2-win-dot { width:7px; height:7px; border-radius:999px; flex:0 0 7px; background:#22c55e; box-shadow:0 0 0 3px rgba(34,197,94,.14); }
.l2-win-indicator--unknown .l2-win-dot { background:#94a3b8; box-shadow:0 0 0 3px rgba(148,163,184,.14); }
.l2-win-indicator--full { border-color:rgba(245,158,11,.42); background:rgba(245,158,11,.10); }
.l2-win-indicator--full .l2-win-dot { background:#f59e0b; box-shadow:0 0 0 3px rgba(245,158,11,.16); }
.l2-win-text { min-width:0; }
.l2-win-text b { color:#e2f4ff; font-weight:600; }
.l2-win-text b.is-full { color:#fbbf24; }

.l2-launch-group { display:inline-flex; align-items:center; gap:6px; flex-wrap:wrap; }
.l2-launch-btn { gap:5px; }
.l2-launch-btn--bot { border-color:rgba(56,189,248,.32); color:#dff4ff; }
.l2-launch-btn--bot:hover:not(:disabled) { border-color:rgba(56,189,248,.55); background:rgba(14,165,233,.12); }
.l2-launch-btn--manual { border-color:rgba(167,139,250,.32); color:#ede9fe; }
.l2-launch-btn--manual:hover:not(:disabled) { border-color:rgba(167,139,250,.55); background:rgba(167,139,250,.12); }
.l2-launch-btn.is-launching { opacity:.7; cursor:progress; }

@media (max-width: 1100px) {
  .l2-client-grid { grid-template-columns:1fr; }
}
@media (max-width: 640px) {
  .l2-path-input-row { flex-wrap:wrap; }
  .l2-path-input-row input { flex:1 1 100%; }
  .l2-win-indicator { white-space:normal; }
}




/* ===== 3D UI Redesign (Arctic Cyan & Deep Slate) ===== */
body.no-3d-fx .acc-card-3d { transform: none !important; }
body.no-3d-fx .fx3d-toggle { box-shadow: none; }

/* Топбар — лёгкая стеклянная полоса (глубокая прозрачность, чтобы космос просвечивал) */
.shell-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  margin: -2px 0 10px;
  padding: 6px 8px;
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(9, 15, 28, 0.34), rgba(6, 11, 22, 0.24));
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.shell-topbar-left { min-width: 0; flex: 1; }
.shell-topbar-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.shell-content { min-width: 0; }

.fx3d-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.24);
  background: rgba(8,13,26,0.55);
  color: #9fb7cc;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: all .16s ease;
  font-variant-numeric: tabular-nums;
}
.fx3d-toggle:hover { border-color: rgba(56,189,248,0.35); color: #eaf6ff; background: rgba(15,23,42,0.75); }
.fx3d-toggle.is-on {
  border-color: rgba(34,211,238,0.38);
  background: linear-gradient(180deg, rgba(14,165,233,0.18), rgba(8,13,26,0.55));
  color: #e0f7ff;
  box-shadow: 0 0 0 1px rgba(34,211,238,0.08) inset, 0 6px 16px rgba(14,165,233,0.12);
}
.fx3d-toggle-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #64748b;
  box-shadow: 0 0 0 3px rgba(100,116,139,0.18);
  transition: all .16s ease;
}
.fx3d-toggle.is-on .fx3d-toggle-dot { background: #22d3ee; box-shadow: 0 0 0 3px rgba(34,211,238,0.18), 0 0 10px rgba(34,211,238,0.45); }
.fx3d-toggle-state { color: #7dd3fc; font-family: var(--mono); font-size: 10.5px; }
.fx3d-toggle:not(.is-on) .fx3d-toggle-state { color: #94a3b8; }

body.no-3d-fx .acc-card-3d { transform: none !important; }
body.no-3d-fx .fx3d-toggle { box-shadow: none; }

/* 3D sidebar depth — глубокое стекло */
.sidebar {
  background: rgba(6, 11, 22, 0.34);
  border-right: 1px solid rgba(34, 211, 238, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}
.nav-item-active {
  position: relative;
  box-shadow: inset 3px 0 0 #22d3ee, inset 0 0 0 1px rgba(34,211,238,0.16), 0 6px 16px rgba(14,165,233,0.14);
  background: linear-gradient(90deg, rgba(34,211,238,0.20), rgba(14,165,233,0.10) 55%, rgba(12,20,38,0.18)) !important;
}
.nav-item { box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); }

/* Server submenu CSS 3D crystals */
.nav-subitem-label { display: inline-flex; align-items: center; }
.nav-server-crystal {
  width: 12px; height: 12px; flex: 0 0 12px; margin-right: 2px;
  position: relative; display: inline-block;
  transform-style: preserve-3d;
  animation: l2c-crystal-idle 5.5s linear infinite;
  filter: drop-shadow(0 0 4px rgba(34,211,238,0.15));
}
.nav-server-crystal::before,
.nav-server-crystal::after {
  content: '';
  position: absolute; inset: 0;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  border-radius: 1px;
}
.nav-server-crystal::before { transform: rotate(45deg) rotateX(52deg); opacity: .95; }
.nav-server-crystal::after { transform: rotate(-45deg) rotateY(52deg) scale(.82); opacity: .8; }
.nav-subitem:hover .nav-server-crystal { animation-duration: 2.2s; }
.nav-server-crystal--x7::before { background: linear-gradient(180deg, #fde68a, #fbbf24); box-shadow: 0 0 8px rgba(251,191,36,0.35); }
.nav-server-crystal--x7::after { background: linear-gradient(180deg, #f59e0b, #b45309); }
.nav-server-crystal--dark::before { background: linear-gradient(180deg, #a5b4fc, #818cf8); box-shadow: 0 0 8px rgba(129,140,248,0.35); }
.nav-server-crystal--dark::after { background: linear-gradient(180deg, #6366f1, #4338ca); }
.nav-server-crystal--light::before { background: linear-gradient(180deg, #67e8f9, #22d3ee); box-shadow: 0 0 8px rgba(34,211,238,0.4); }
.nav-server-crystal--light::after { background: linear-gradient(180deg, #06b6d4, #0891b2); }
.nav-server-crystal--other::before { background: linear-gradient(180deg, #6ee7b7, #34d399); box-shadow: 0 0 8px rgba(52,211,153,0.35); }
.nav-server-crystal--other::after { background: linear-gradient(180deg, #10b981, #047857); }
.nav-server-crystal--all::before { background: linear-gradient(180deg, #7dd3fc, #38bdf8); box-shadow: 0 0 8px rgba(56,189,248,0.3); }
.nav-server-crystal--all::after { background: linear-gradient(180deg, #0ea5e9, #0369a1); }
@keyframes l2c-crystal-idle {
  0% { transform: rotateY(0deg) rotateX(0deg); }
  50% { transform: rotateY(180deg) rotateX(10deg); }
  100% { transform: rotateY(360deg) rotateX(0deg); }
}
body.no-3d-fx .nav-server-crystal { animation: none !important; }

/* 3D account cards — глубокое стекло с бегущим бликом */
.acc-card.acc-card-3d {
  border-color: rgba(34, 211, 238, 0.16);
  background: var(--glass-bg);
  backdrop-filter: blur(12px) saturate(125%);
  -webkit-backdrop-filter: blur(12px) saturate(125%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 14px 30px rgba(2, 8, 23, 0.32);
  transition: border-color .2s var(--ease-tactile), box-shadow .2s var(--ease-tactile),
              transform var(--tactile-fast) var(--ease-tactile);
  will-change: transform;
}
.acc-card.acc-card-3d::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px 130px at var(--hx, 10%) var(--hy, 0%),
    rgba(34, 211, 238, 0.14), transparent 62%);
  opacity: var(--ho, 0);
  transition: none;
}
/* Прожектор управляется JS через --ho: без залипания. */
.acc-card.acc-card-3d:hover {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 32px -8px rgba(34, 211, 238, 0.22),
    0 18px 36px rgba(2, 8, 23, 0.36);
}
/* Safe 3D Stacking: tilt не создаёт preserve-3d на карточке, меню остаётся в документе */
.acc-card .tilt-glare {
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s var(--ease-tactile);
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%),
    rgba(224, 247, 255, calc(0.11 * var(--glare-o, 0))), transparent 55%);
}
.acc-card.is-tilting .tilt-glare { opacity: 1; }
.acc-card .tilt-layer { position: relative; }
/* Keep dropdown menus above 3D cards and free of transform clipping */
.acc-card { overflow: visible; }
.acc-more-menu { z-index: 120 !important; }

.acc-ind, .acc-server-badge, .acc-ind-fish, .acc-ind-pa, .acc-ind-adena, .acc-kam-badge {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 4px 10px rgba(2,8,23,0.18);
}

/* Tactile 3D buttons */
.btn-3d {
  position: relative;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 3px 0 rgba(2,8,23,0.55),
    0 8px 16px rgba(2,8,23,0.22);
  transform: translateY(0);
}
.btn-3d:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 4px 0 rgba(2,8,23,0.5),
    0 10px 18px rgba(2,8,23,0.26);
}
.btn-3d:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 1px 0 rgba(2,8,23,0.55),
    0 4px 10px rgba(2,8,23,0.18);
}
.btn-primary.btn-3d {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 3px 0 rgba(3,105,161,0.55),
    0 10px 20px rgba(14,165,233,0.22);
}
.btn-primary.btn-3d:hover:not(:disabled) {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.14) inset,
    0 4px 0 rgba(3,105,161,0.5),
    0 12px 22px rgba(14,165,233,0.28);
}
.btn-primary.btn-3d:active:not(:disabled) {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 1px 0 rgba(3,105,161,0.55),
    0 6px 14px rgba(14,165,233,0.18);
}
body.no-3d-fx .btn-3d,
body.no-3d-fx .btn-3d:hover:not(:disabled),
body.no-3d-fx .btn-3d:active:not(:disabled) {
  transform: none !important;
  box-shadow: none !important;
}

/* Fishing 3D widget */
.fish-top-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 12px;
}
.fish-top-row .fish-kpi-grid { flex: 1 1 auto; margin-bottom: 0; }
.fish-3d-widget {
  flex: 0 0 220px;
  width: 220px;
  height: 140px;
  border: 1px solid rgba(56,189,248,0.16);
  border-radius: 12px;
  background:
    radial-gradient(120px 80px at 50% 40%, rgba(34,211,238,0.10), transparent 70%),
    linear-gradient(180deg, rgba(15,23,42,0.85), rgba(8,13,26,0.85));
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 10px 24px rgba(2,8,23,0.25);
}
.fish-3d-canvas-wrap, .fish-3d-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.fish-3d-fallback { width: 100%; height: 100%; background: radial-gradient(circle at 50% 45%, rgba(56,189,248,0.12), transparent 60%); }
body.no-3d-fx .fish-3d-widget { background: linear-gradient(180deg, rgba(15,23,42,0.85), rgba(8,13,26,0.85)); }

/* Тяжёлое размытие — только на устройствах с точным указателем. */
@media (hover: hover) and (pointer: fine) {
  .card, .settings-acc, .stat-card, .acc-card.acc-card-3d { will-change: transform; }
}

/* ── Glass HUD: адаптация под компактные/боковые раскладки ── */
@media (max-width: 1100px) {
  .card { padding: 16px 16px; }
  .acc-card.acc-card-3d { backdrop-filter: blur(10px) saturate(120%); -webkit-backdrop-filter: blur(10px) saturate(120%); }
}
@media (max-width: 860px) {
  .card, .settings-acc, .stat-card { backdrop-filter: blur(9px) saturate(115%); -webkit-backdrop-filter: blur(9px) saturate(115%); }
  .sidebar { backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
  .btn { padding: 8px 12px; }
}

/* Touch: без hover-подъёма и бегущих бликов, только нажатие. */
@media (hover: none) {
  .card:hover, .settings-acc:hover, .stat-card:hover, .acc-card:hover,
  .acc-card.acc-card-3d:hover { transform: none; }
  .card::before, .acc-card.acc-card-3d::before, .settings-acc::before,
  .stat-card::before, .btn::after { display: none !important; }
  .nav-item:hover, .nav-subitem:hover { transform: none; }
  .card::after, .settings-acc::after, .stat-card::after,
  .ai-pool-card::after, .agent-tpl-card::after { display: none !important; }
}

/* Свечение кромки при наведении на стеклянные панели. */
.card:hover,
.settings-acc:hover,
.stat-card:hover,
.acc-card.acc-card-3d:hover,
.agent-tpl-card:hover,
.ai-pool-card:hover {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 32px -8px rgba(34, 211, 238, 0.22),
    0 18px 40px rgba(2, 8, 23, 0.34);
}

/* Пятно света, следующее за курсором по стеклянной панели (управляется из ui3d.js). */
.card,
.settings-acc,
.stat-card,
.acc-card.acc-card-3d,
.ai-pool-card,
.agent-tpl-card { --hx: 10%; --hy: 0%; --ho: 0; }
.card::after,
.settings-acc::after,
.stat-card::after,
.ai-pool-card::after,
.agent-tpl-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--ho, 0);
  transition: none;
  background: radial-gradient(320px 200px at var(--hx, 50%) var(--hy, 0%),
    rgba(34, 211, 238, 0.05), transparent 65%);
  z-index: 0;
}
/* Прожектор управляется JS через --ho: только текущий элемент активен и мгновенно гаснет. */

/* Содержимое панели всегда над декоративными слоями. */
.card > *, .settings-acc > *, .stat-card > *, .ai-pool-card > *, .agent-tpl-card > * {
  position: relative; z-index: 1;
}
body.no-3d-fx .card::after,
body.no-3d-fx .settings-acc::after,
body.no-3d-fx .stat-card::after,
body.no-3d-fx .ai-pool-card::after,
body.no-3d-fx .agent-tpl-card::after { display: none !important; }

@media (max-width: 900px) {
  .fish-top-row { flex-direction: column; }
  .fish-3d-widget { width: 100%; flex-basis: 140px; }
}
@media (max-width: 860px) {
  .shell-topbar { margin-top: 0; }
}

/* Glass tables over 3D backdrop — прозрачные строки, деликатные разделители */
.table-wrap { background: var(--glass-bg-soft); border: 1px solid var(--glass-line-soft); }
.table thead th, .table th { background: rgba(6, 11, 22, 0.26); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.table tbody tr { background: rgba(10, 18, 34, 0.22); transition: none; }
.table tbody tr td { border-bottom: 1px solid rgba(255, 255, 255, 0.06); background: rgba(10, 18, 34, 0.22); transition: none; }
.table tbody tr:hover {
  background-color: rgba(34, 211, 238, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(34, 211, 238, 0.25),
    inset 0 -1px 0 rgba(34, 211, 238, 0.25);
  transition: background-color 120ms ease-out, box-shadow 120ms ease-out;
}
.table tbody tr:hover td { background: transparent; box-shadow: none; transition: none; }

/* Glass cards & panels */
.card, .settings-acc, .fish-3d-widget {
  background: var(--glass-bg);
  border-color: var(--glass-line);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge), var(--glass-shadow);
}

/* ── HUD: отключение тяжёлых эффектов и трансформаций при body.no-3d-fx ── */
body.no-3d-fx #space-bg-canvas { display: none !important; }
body.no-3d-fx .sidebar,
body.no-3d-fx .card,
body.no-3d-fx .acc-card.acc-card-3d,
body.no-3d-fx .table-wrap,
body.no-3d-fx .modal { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
body.no-3d-fx .card,
body.no-3d-fx .card:hover,
body.no-3d-fx .settings-acc,
body.no-3d-fx .settings-acc:hover,
body.no-3d-fx .stat-card,
body.no-3d-fx .stat-card:hover,
body.no-3d-fx .acc-card,
body.no-3d-fx .acc-card:hover,
body.no-3d-fx .acc-card.acc-card-3d,
body.no-3d-fx .acc-card.acc-card-3d:hover,
body.no-3d-fx .btn,
body.no-3d-fx .btn:hover:not(:disabled),
body.no-3d-fx .btn:active:not(:disabled),
body.no-3d-fx .nav-item,
body.no-3d-fx a.nav-item:hover,
body.no-3d-fx .nav-subitem,
body.no-3d-fx .nav-subitem:hover,
body.no-3d-fx .acc-more-btn:hover:not(:disabled),
body.no-3d-fx .acc-icon-btn:hover:not(:disabled),
body.no-3d-fx .chars-icon-btn:hover:not(:disabled),
body.no-3d-fx .users-icon-btn:hover:not(:disabled),
body.no-3d-fx .proxy-icon-btn:hover:not(:disabled),
body.no-3d-fx .proxy-mini-btn:hover:not(:disabled),
body.no-3d-fx .mk-icon-btn:hover:not(:disabled),
body.no-3d-fx .chip-btn:hover,
body.no-3d-fx .lc-tab:hover,
body.no-3d-fx .acc-more-item:hover,
body.no-3d-fx .stat-card-link:hover,
body.no-3d-fx .agent-tpl-card:hover,
body.no-3d-fx .acc-card.is-menu-open,
body.no-3d-fx .acc-card.is-menu-open:hover,
body.no-3d-fx input[type="checkbox"]:hover:enabled,
body.no-3d-fx input[type="radio"]:hover:enabled {
  transform: none !important;
}
body.no-3d-fx .card::before,
body.no-3d-fx .acc-card.acc-card-3d::before,
body.no-3d-fx .settings-acc::before,
body.no-3d-fx .stat-card::before,
body.no-3d-fx .btn::after { display: none !important; }
body.no-3d-fx .card:hover,
body.no-3d-fx .settings-acc:hover,
body.no-3d-fx .stat-card:hover,
body.no-3d-fx .acc-card.acc-card-3d:hover { box-shadow: var(--glass-edge), 0 0 0 1px rgba(34, 211, 238, 0.22) inset; }
body.no-3d-fx body,
body.no-3d-fx { background: #080d1a !important; }

@media (prefers-reduced-motion: reduce) {
  .card, .settings-acc, .stat-card, .acc-card, .btn, .nav-item, .nav-subitem,
  .acc-more-btn, .acc-icon-btn, .chars-icon-btn, .users-icon-btn, .proxy-icon-btn,
  .proxy-mini-btn, .mk-icon-btn, .chip-btn, .lc-tab, .acc-more-item, .badge {
    transition-duration: 1ms !important;
  }
  .card:hover, .settings-acc:hover, .stat-card:hover, .acc-card:hover,
  .btn:hover:not(:disabled), .nav-item:hover, .nav-subitem:hover { transform: none !important; }
  .card::before, .acc-card.acc-card-3d::before, .settings-acc::before,
  .stat-card::before, .btn::after { display: none !important; }
  .modal, .acc-more-menu, .acc-filters-popover { animation: none !important; }
}

body.no-3d-fx body,
body.no-3d-fx { background: #080d1a !important; }

/* =========================================================================
   Сводка статусов «Авторыбалка» — компактная стеклянная строка
   Arctic Cyan & Deep Slate
   ========================================================================= */
.fish-status-summary {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 8px 14px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(8, 13, 26, 0.62));
  backdrop-filter: blur(13px) saturate(125%);
  -webkit-backdrop-filter: blur(13px) saturate(125%);
  box-shadow: 0 6px 22px rgba(2, 8, 23, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.fish-ss-item { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; line-height: 1.2; white-space: nowrap; }
.fish-ss-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; background: currentColor; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12); }
.fish-ss-label { color: #9fb7cc; }
.fish-ss-val { font-size: 15px; font-weight: 700; color: #eaf6ff; font-variant-numeric: tabular-nums; }
.fish-ss-fishing { color: #34d399; }
.fish-ss-fishing .fish-ss-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16); }
.fish-ss-fishing .fish-ss-val { color: #86efac; }
.fish-ss-pause { color: #fbbf24; }
.fish-ss-pause .fish-ss-dot { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16); }
.fish-ss-pause .fish-ss-val { color: #fcd34d; }
.fish-ss-sep { width: 1px; height: 16px; background: rgba(148, 163, 184, 0.22); flex: 0 0 1px; }
.fish-ss-ok { color: #34d399; }
.fish-ss-ok .fish-ss-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16); }
.fish-ss-alert { color: #fb7185; }
.fish-ss-alert .fish-ss-dot { background: #f43f5e; box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18); animation: fish-ss-pulse 1.8s ease-in-out infinite; }
.fish-ss-alert .fish-ss-val { color: #fda4af; }
.fish-ss-badge-no-bait {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.3;
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(244, 63, 94, 0.2));
  box-shadow: 0 0 0 1px rgba(244, 63, 94, 0.12) inset, 0 2px 10px rgba(245, 158, 11, 0.18);
  white-space: nowrap; max-width: 100%; overflow: hidden;
}
.fish-ss-badge-no-bait svg { flex: 0 0 auto; color: #fbbf24; }
.fish-ss-badge-no-bait b { font-variant-numeric: tabular-nums; color: #fff; }
.fish-ss-badge-names { color: #fcd34d; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes fish-ss-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18); } 50% { box-shadow: 0 0 0 5px rgba(244, 63, 94, 0.28); } }
@media (max-width: 640px) {
  .fish-status-summary { gap: 8px 10px; padding: 8px 10px; }
  .fish-ss-badge-no-bait { margin-left: 0; width: 100%; justify-content: center; }
}

/* =========================================================================
   Вкладки «Игровые» / «Мастер-аккаунты» (segmented control) в шапке
   ========================================================================= */
.acc-tabs {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  background: rgba(8, 13, 26, 0.55);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.acc-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: #9fb7cc; cursor: pointer;
  font-size: 13px; font-weight: 600; line-height: 1.2; letter-spacing: .01em;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.acc-tab:hover { color: #eaf6ff; background: rgba(56, 189, 248, 0.08); }
.acc-tab.is-active {
  color: #f8fafc;
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(56, 189, 248, 0.16));
  box-shadow: 0 2px 12px rgba(14, 165, 233, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.acc-tab-label { line-height: 1.2; }
.acc-tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 18px; padding: 0 6px;
  border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #7dd3fc; background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.28);
}
.acc-tab.is-active .acc-tab-count { color: #04131f; background: linear-gradient(135deg, #38bdf8, #7dd3fc); border-color: transparent; }
.acc-master-panel { min-height: 120px; }

/* =========================================================================
   Мастер-аккаунты: сетка и карточки (.acc-card-3d)
   ========================================================================= */
.acc-master-grid-wrap { width: 100%; }
.acc-master-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
@media (max-width: 720px) { .acc-master-grid { grid-template-columns: 1fr; } }

.acc-master-card { display: flex; flex-direction: column; }
.acc-master-card.is-highlighted {
  border-color: rgba(56, 189, 248, 0.7) !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35), 0 0 26px rgba(14, 165, 233, 0.35) !important;
  animation: acc-master-flash 1.4s ease-in-out 2;
}
@keyframes acc-master-flash {
  0%, 100% { box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35), 0 0 26px rgba(14, 165, 233, 0.35); }
  50% { box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.6), 0 0 40px rgba(14, 165, 233, 0.55); }
}
.acc-master-title { display: inline-flex; align-items: center; }
.acc-master-card-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.acc-master-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1.5; letter-spacing: .02em;
  border: 1px solid transparent; white-space: nowrap;
}
.acc-master-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.14); flex: 0 0 7px; }
.acc-master-status-is-ok { color: #5eead4; background: rgba(20, 184, 166, 0.16); border-color: rgba(45, 212, 191, 0.4); }
.acc-master-status-is-warn { color: #fcd34d; background: rgba(245, 158, 11, 0.16); border-color: rgba(245, 158, 11, 0.42); }
.acc-master-status-is-bad { color: #fda4af; background: rgba(244, 63, 94, 0.16); border-color: rgba(244, 63, 94, 0.42); }
.acc-master-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #7dd3fc; background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.28);
}
.acc-master-card-email { margin-top: 8px; font-size: 12px; color: #cfe8f7; }
.acc-master-nomail { margin-top: 8px; font-size: 12px; color: var(--text-dim); font-style: italic; }
.acc-master-body { margin-top: 10px; flex: 1 1 auto; }
.ma-server-panel {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(56, 189, 248, 0.14);
  border-radius: 10px;
  background: rgba(8, 13, 26, 0.38);
}
.ma-server-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.ma-server-panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #9fb7cc;
}
.ma-server-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px dashed rgba(56, 189, 248, 0.28);
  background: rgba(14, 165, 233, 0.06);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: all .16s ease;
}
.ma-server-add:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(14, 165, 233, 0.14);
  color: #eaf6ff;
}
.ma-server-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ma-server-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.35);
  color: #9fb7cc;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: all .16s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ma-server-chip:hover {
  border-color: rgba(56, 189, 248, 0.28);
  color: #cfe8f7;
  background: rgba(15, 23, 42, 0.5);
}
.ma-server-chip.is-selected {
  color: #eaf6ff;
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(56, 189, 248, 0.14));
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.12) inset, 0 4px 12px rgba(14, 165, 233, 0.12);
}
.ma-server-chip.is-selected:hover {
  border-color: rgba(56, 189, 248, 0.62);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.36), rgba(56, 189, 248, 0.2));
}
.ma-server-chip-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 14px;
}
.ma-server-chip-label { line-height: 1.2; }
.ma-server-empty {
  font-size: 11px;
  color: #6f879d;
  font-style: italic;
}
.ma-sync-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #04131f;
  background: linear-gradient(135deg, #38bdf8, #7dd3fc);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.acc-master-children { display: flex; flex-direction: column; gap: 6px; }
.acc-master-child {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 9px; border-radius: 9px;
  border: 1px solid rgba(56, 189, 248, 0.12);
  background: rgba(8, 13, 26, 0.4);
  cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.acc-master-child:hover { background: rgba(14, 165, 233, 0.12); border-color: rgba(56, 189, 248, 0.3); transform: translateX(2px); }
.acc-master-child:focus-visible { outline: 2px solid rgba(56, 189, 248, 0.6); outline-offset: 1px; }
.acc-master-child-login { font-size: 12px; font-weight: 600; color: #eaf6ff; font-variant-numeric: tabular-nums; }
.acc-master-child-arrow { color: #7dd3fc; flex: 0 0 auto; }
.acc-master-child-char { font-size: 12px; color: #cfe8f7; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-master-child-lvl { font-size: 10px; color: #9fb7cc; font-variant-numeric: tabular-nums; }
.acc-master-child-srv { margin-left: auto; flex: 0 0 auto; }
/* Компактное управление паролем игрового аккаунта (карточка + строка МА). */
.acc-pwd-inline {
  display: flex; align-items: center; gap: 6px; flex-wrap: nowrap;
  min-width: 0; margin-top: 4px;
  white-space: nowrap;
}
.acc-pwd-inline > * { flex: 0 0 auto; }
.acc-pwd-inline--child { margin-top: 0; margin-left: auto; flex: 0 0 auto; }
.acc-pwd-inline--child .acc-pwd-mask { font-size: 10px; letter-spacing: .04em; }
.acc-pwd-inline--child .acc-pwd-copy,
.acc-pwd-inline--child .acc-pwd-edit-btn { font-size: 10px; padding: 1px 6px; }
.acc-pwd-inline--child .acc-pwd-empty { font-size: 10px; }
.acc-pwd-mask {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  color: #7dd3fc; background: rgba(14, 165, 233, .10);
  border: 1px solid rgba(56, 189, 248, .22);
  font-variant-numeric: tabular-nums;
}
.acc-pwd-empty {
  font-size: 11px; color: #94a3b8;
  background: rgba(148, 163, 184, .08); border: 1px solid rgba(148, 163, 184, .16);
}
.acc-pwd-val {
  display: inline-flex; align-items: center; max-width: 140px;
  padding: 1px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600; color: #eaf6ff;
  background: rgba(14, 165, 233, .14); border: 1px solid rgba(56, 189, 248, .28);
  font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acc-pwd-copy, .acc-pwd-eye, .acc-pwd-edit-btn { flex: 0 0 auto; }
.acc-pwd-copy {
  color: #7dd3fc !important; border: 1px solid rgba(56, 189, 248, .28) !important;
  background: rgba(14, 165, 233, .12) !important;
}
.acc-pwd-copy:hover:not(:disabled) {
  color: #f8fafc !important; background: rgba(14, 165, 233, .22) !important;
}
.acc-pwd-edit-btn { color: #94a3b8 !important; }
.acc-pwd-edit-btn:hover:not(:disabled) { color: #f8fafc !important; background: rgba(56, 189, 248, .16) !important; }
.acc-pwd-eye { line-height: 1; padding: 2px 6px !important; }
.acc-master-empty {
  padding: 12px; border-radius: 9px; text-align: center;
  font-size: 12px; color: var(--text-dim); font-style: italic;
  border: 1px dashed rgba(56, 189, 248, 0.18); background: rgba(8, 13, 26, 0.3);
}
.acc-master-actions { display: flex; }
.acc-master-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 40px; color: var(--text-dim); font-size: 13px;
  border: 1px dashed rgba(56, 189, 248, 0.18); border-radius: 14px; background: rgba(8, 13, 26, 0.3);
}
.acc-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.25); border-top-color: #38bdf8;
  animation: spin-360 0.9s linear infinite; display: inline-block;
}
.acc-master-empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px;
  border: 1px dashed rgba(56, 189, 248, 0.2); border-radius: 16px;
  background: rgba(8, 13, 26, 0.32);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.acc-master-empty-ico {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #7dd3fc; margin-bottom: 12px;
  background: radial-gradient(circle at 50% 35%, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.05));
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.2);
}

/* Кликабельный бейдж «MP / МА» на игровой карточке */
.acc-master-bind-badge {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; line-height: 1.5; cursor: pointer;
  color: #7dd3fc; background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.32);
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.acc-master-bind-badge:hover { background: rgba(20, 184, 166, 0.22); border-color: rgba(45, 212, 191, 0.55); box-shadow: 0 0 12px rgba(20, 184, 166, 0.25); }
.acc-master-bind-tag { font-weight: 700; letter-spacing: .02em; color: #5eead4; }
.acc-master-bind-val { color: #cfe8f7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-variant-numeric: tabular-nums; }

/* Диагностические логи + улучшенные toast */
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.toast-msg {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.toast-copy-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: inherit;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.toast-copy-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.28);
}
.toast-copy-btn:disabled { opacity: .8; cursor: default; }

.diag-logs-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34,211,238,0.22);
  background: rgba(8,13,26,0.55);
  color: #cfe8f7;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.diag-logs-btn:hover {
  color: #eff9ff;
  border-color: rgba(34,211,238,0.4);
  background: rgba(14,165,233,0.14);
  box-shadow: 0 0 0 1px rgba(34,211,238,0.08) inset, 0 6px 16px rgba(14,165,233,0.12);
}
.diag-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(180deg, #f43f5e, #e11d48);
  border: 1px solid rgba(251,113,133,0.45);
  box-shadow: 0 0 0 2px rgba(8,13,26,0.7);
  font-variant-numeric: tabular-nums;
}

.diag-modal {
  max-width: 980px;
  width: min(980px, 100%);
  padding: 16px 18px;
}
.diag-modal-wrap { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.diag-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.diag-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.diag-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.diag-toolbar-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.diag-filter-btn.is-active {
  color: #04131f;
  border-color: rgba(125,211,252,0.45);
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
  box-shadow: 0 6px 14px rgba(14,165,233,0.22);
}
.diag-meta { font-size: 12px; color: var(--text-dim); }
.diag-table-wrap {
  max-height: 58vh;
  overflow: auto;
  border: 1px solid var(--glass-line-soft);
  border-radius: 12px;
  background: rgba(8,13,26,0.28);
}
.diag-table { margin: 0; font-size: 12.5px; }
.diag-table th, .diag-table td { padding: 8px 10px; vertical-align: top; }
.diag-table th { position: sticky; top: 0; z-index: 1; background: rgba(10,18,34,0.92); backdrop-filter: blur(8px); }
.diag-col-ts { white-space: nowrap; width: 190px; }
.diag-col-dur { white-space: nowrap; width: 90px; font-variant-numeric: tabular-nums; }
.diag-col-proc { min-width: 180px; }
.diag-col-detail { min-width: 260px; white-space: pre-wrap; word-break: break-word; }
.diag-level-tag { font-weight: 700; font-family: var(--mono); font-size: 11px; margin-right: 4px; }
.diag-target { color: #7dd3fc; font-family: var(--mono); font-size: 11px; }
.diag-row.diag-level-ok .diag-level-tag { color: #22c55e; }
.diag-row.diag-level-warn .diag-level-tag { color: #f59e0b; }
.diag-row.diag-level-error .diag-level-tag { color: #f43f5e; }
.diag-row.diag-level-ok td { background: rgba(34,197,94,0.04); }
.diag-row.diag-level-warn td { background: rgba(245,158,11,0.06); }
.diag-row.diag-level-error td { background: rgba(244,63,94,0.07); }
.diag-row.diag-level-warn:hover td { background: rgba(245,158,11,0.10); }
.diag-row.diag-level-error:hover td { background: rgba(244,63,94,0.11); }
.diag-row.diag-level-ok:hover td { background: rgba(34,197,94,0.08); }
.diag-empty { text-align: center; color: var(--text-dim); padding: 18px 12px !important; }
.diag-empty-error { color: #fda4af; }
@media (max-width: 760px) {
  .diag-toolbar { flex-direction: column; align-items: stretch; }
  .diag-toolbar-actions { justify-content: flex-start; }
  .diag-col-ts { white-space: normal; }
}

/* ===== UI/UX fixes v85: users modal, master accordion, misc ===== */
.users-row-click { cursor: pointer; transition: background .15s var(--ease-tactile); }
.users-row-click:hover { background: rgba(14,165,233,.10); }
.users-row-click:focus-visible { outline: 2px solid rgba(56,189,248,.45); outline-offset: -2px; }
.user-modal-card { max-width: 980px; }
.modal:has(.user-modal-card) { max-width: 980px; width: 94vw; }
.user-employee-modal { display:flex; flex-direction:column; gap:12px; }
.user-modal-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.user-modal-section { border:1px solid rgba(56,189,248,.12); border-radius:12px; padding:12px; background: rgba(8,13,26,.28); }
.user-modal-section-title { font-weight:700; color:#eaf6ff; margin-bottom:8px; }
.user-modal-subtitle { font-weight:600; color:#cfe8f7; margin:10px 0 6px; font-size:13px; }
.user-stats-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap:8px; }
.user-stat { border:1px solid rgba(56,189,248,.1); border-radius:10px; padding:8px 10px; background: rgba(15,23,42,.35); }
.user-stat-label { font-size:11px; color:var(--text-dim); margin-bottom:2px; }
.user-stat-val { font-size:14px; font-weight:700; color:#f3fbff; font-variant-numeric: tabular-nums; }
.user-perms-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap:6px 10px; margin-bottom:8px; }
.user-perm-check, .user-perm-toggle { display:flex; align-items:center; gap:8px; font-size:13px; color:#dbefff; cursor:pointer; }
.user-perms-toggles { display:flex; flex-direction:column; gap:6px; margin:8px 0; }
.user-bind-block .label { margin-bottom:4px; }
.user-bind-list { display:flex; flex-wrap:wrap; gap:6px; }

/* Master accordion inside MA card */
.acc-master-accordion { border:1px solid rgba(56,189,248,.12); border-radius:10px; overflow:hidden; background: rgba(8,13,26,.28); }
.acc-master-accordion-summary { list-style:none; cursor:pointer; padding:8px 10px; display:flex; align-items:center; justify-content:space-between; gap:8px; color:#dff4ff; font-size:12px; font-weight:600; }
.acc-master-accordion-summary::-webkit-details-marker { display:none; }
.acc-master-accordion[open] .acc-master-accordion-summary { border-bottom:1px solid rgba(56,189,248,.1); background: rgba(14,165,233,.08); }
.acc-master-summary-meta { color:var(--text-dim); font-weight:500; font-variant-numeric: tabular-nums; }
.acc-master-children-wrap { max-height:240px; overflow-y:auto; padding:8px; }
.acc-master-group { margin-bottom:8px; }
.acc-master-group:last-child { margin-bottom:0; }
.acc-master-group-title { font-size:11px; font-weight:700; color:#7dd3fc; letter-spacing:.02em; margin:0 0 4px; padding:2px 4px; }
.acc-master-child-main { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1 1 auto; }
.acc-master-child-row1, .acc-master-child-row2 { display:flex; align-items:center; gap:6px; flex-wrap:wrap; min-width:0; }
.acc-master-child-row2 { font-size:11px; color:#9fb7cc; }
.acc-master-child-actions { margin-left:auto; display:flex; align-items:center; gap:6px; flex:0 0 auto; flex-wrap:nowrap; }
.acc-master-body { margin-top:10px; }
.acc-mail-toggle { display:inline-flex; align-items:center; gap:6px; cursor:pointer; font-size:13px; color:#dbefff; }
.acc-mail-toggle input { accent-color:#38bdf8; }
