:root {
  --green: #4ade80;
  --green-dim: #22c55e;
  --yellow: #facc15;
  --bg: #0a0a0a;
  --surface: #111214;
  --surface2: #16181b;
  --border: rgba(74, 222, 128, 0.16);
  --text: #e5e5e5;
  --muted: #6b7280;
  --red: #f87171;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(74,222,128,0.06), transparent 70%),
    radial-gradient(500px 300px at 90% 100%, rgba(250,204,21,0.04), transparent 70%);
}
.layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ── sidebar ── */
.sidebar {
  width: 230px; flex-shrink: 0;
  background: rgba(13,14,16,0.92);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 26px 16px;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px; color: #fff; letter-spacing: 1px;
  padding: 0 10px 22px; border-bottom: 1px solid var(--border); margin-bottom: 18px;
}
.brand span { color: var(--green); }
.brand small {
  display: block; margin-top: 10px;
  font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 600;
  color: var(--muted); letter-spacing: 2px; text-transform: uppercase;
}
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  transition: all .18s;
}
.sidebar nav a .ico { width: 18px; text-align: center; opacity: .8; }
.sidebar nav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.sidebar nav a.active {
  color: var(--green);
  background: rgba(74,222,128,0.08);
  border-color: var(--border);
}
.sidebar-bottom {
  margin-top: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 14px 10px 0; border-top: 1px solid var(--border);
}
.sidebar-bottom a { color: var(--muted); text-decoration: none; font-size: 13px; }
.sidebar-bottom a:hover { color: var(--text); }
.sidebar-bottom .logout { color: var(--red); font-weight: 600; }

/* ── content ── */
.content { flex: 1; padding: 34px 40px; max-width: 1080px; }
h1 {
  font-size: 26px; font-weight: 700; letter-spacing: .5px; margin-bottom: 4px;
}
.subtitle { color: var(--muted); margin-bottom: 26px; font-size: 14px; }

.flash {
  background: rgba(74,222,128,0.08);
  border: 1px solid var(--border);
  color: var(--green);
  padding: 11px 16px; border-radius: 10px; margin-bottom: 20px;
  font-weight: 600; animation: fadein .3s;
}
@keyframes fadein { from { opacity: 0; transform: translateY(-4px);} to { opacity: 1; } }

/* ── cards / grid ── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 26px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 22px;
}
.card h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--muted); font-weight: 700; margin-bottom: 10px;
}
.card .big { font-size: 24px; font-weight: 700; }
.card .big.green { color: var(--green); }
.card .big.red { color: var(--red); }
.card .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* карточка онлайна на два слота сетки */
.card-players { grid-column: span 2; }
.card-players h3 .cnt { color: var(--green); margin-left: 8px; letter-spacing: 0; }
.card-players h3 .cnt.off { color: var(--muted); }
.ticker { overflow: hidden; margin-top: 8px; display: flex; flex-direction: column; gap: 7px; }
.ticker-row { overflow: hidden; }
.ticker-track { display: inline-flex; gap: 7px; white-space: nowrap; will-change: transform; }
.ticker-track.run { animation: ticker-scroll linear infinite; }
.ticker:hover .ticker-track.run { animation-play-state: paused; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(var(--shift, 0)); } }
.pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 11px 3px 4px; font-size: 12px;
}
.pill .av {
  width: 17px; height: 17px; border-radius: 4px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: 700;
}
.pill img.av { object-fit: cover; image-rendering: pixelated; background: var(--border); }
.ticker .empty, .pill.more { color: var(--muted); font-size: 12px; background: none; border: none; }

.panel-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 24px 26px; margin-bottom: 22px;
}
.panel-block h2 { font-size: 17px; margin-bottom: 16px; color: #fff; letter-spacing: .3px; }

/* ── forms ── */
label { display: block; font-size: 13px; color: var(--muted); font-weight: 700; margin: 14px 0 5px; letter-spacing: .5px; text-transform: uppercase; }
input[type=text], input[type=password], input[type=number], textarea {
  width: 100%; max-width: 460px;
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--text);
  border-radius: 10px; padding: 11px 14px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(74,222,128,0.12);
}
.row { display: flex; gap: 18px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 180px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green); color: #06220f;
  border: none; border-radius: 10px;
  padding: 11px 22px; font-family: inherit;
  font-size: 15px; font-weight: 700; letter-spacing: .3px;
  cursor: pointer; transition: all .15s;
  text-decoration: none;
}
.btn:hover { background: var(--green-dim); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(74,222,128,0.25); }
.btn.secondary { background: transparent; color: var(--green); border: 1px solid var(--border); }
.btn.secondary:hover { background: rgba(74,222,128,0.08); box-shadow: none; }
.btn.warn { background: transparent; color: var(--yellow); border: 1px solid rgba(250,204,21,0.3); }
.btn.warn:hover { background: rgba(250,204,21,0.08); box-shadow: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ── optionals table ── */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border);
}
td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; }
tr:hover td { background: rgba(255,255,255,0.02); }
td input[type=text] { max-width: 100%; padding: 7px 10px; font-size: 14px; }
.modname { font-weight: 700; color: #fff; white-space: nowrap; }

/* ── toggle switch ── */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; cursor: pointer;
  background: rgba(255,255,255,0.12); border-radius: 22px; transition: .2s;
}
.slider::before {
  content: ''; position: absolute; width: 16px; height: 16px;
  left: 3px; top: 3px; border-radius: 50%;
  background: #9ca3af; transition: .2s;
}
.switch input:checked + .slider { background: rgba(74,222,128,0.35); }
.switch input:checked + .slider::before { background: var(--green); transform: translateX(18px); }

/* ── log ── */
.logbox {
  background: #0c0d0f; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 16px;
  font-family: 'Courier New', monospace; font-size: 12.5px; line-height: 1.55;
  color: #b6c2b8; height: 380px; overflow-y: auto; white-space: pre-wrap; word-break: break-all;
}
.logbox .ok { color: var(--green); }

/* ── login page ── */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.login-card {
  width: 360px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px;
  padding: 38px 34px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.login-card .brand { border: none; padding: 0 0 6px; margin: 0 0 4px; }
.login-card .err { color: var(--red); font-weight: 600; margin-top: 12px; font-size: 14px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 22px; }

.hint { color: var(--muted); font-size: 13px; margin-top: 10px; line-height: 1.5; }
code.inline { background: rgba(255,255,255,0.07); padding: 2px 7px; border-radius: 6px; font-size: 13px; }

/* ── chips (категории) ── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(74,222,128,0.08);
  border: 1px solid var(--border);
  color: var(--green);
  padding: 5px 10px; border-radius: 9px;
  font-size: 13px; font-weight: 700;
}
.chip.small { padding: 2px 8px; font-size: 11px; }
.chip form button {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 12px; padding: 0; line-height: 1;
}
.chip form button:hover { color: var(--red); }

/* ── modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(3px);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  width: 100%; max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 26px 28px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  animation: pop .18s ease-out;
  max-height: 90vh; overflow-y: auto;
}
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; } }
.modal h2 { font-size: 17px; margin-bottom: 14px; color: #fff; }
.sel {
  width: 100%; max-width: 460px;
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--text); border-radius: 10px; padding: 11px 14px;
  font-family: inherit; font-size: 15px; font-weight: 600;
}
.sel:focus { outline: none; border-color: var(--green); }

.nav-toggle, .nav-overlay { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: flex; align-items: center; justify-content: center;
    position: fixed; top: 12px; left: 12px; z-index: 60;
    width: 44px; height: 44px; border-radius: 10px;
    background: var(--surface2); border: 1px solid var(--border);
    color: var(--text); font-size: 20px; cursor: pointer;
  }
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 250px; max-width: 82vw;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 22px 16px;
    transform: translateX(-100%); transition: transform .22s ease;
    z-index: 70; overflow-y: auto;
  }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.6); }
  .nav-overlay {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5);
    opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 65;
  }
  body.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
  .sidebar nav { flex-direction: column; }
  .brand { border: none; padding: 0 0 10px; margin: 0; }
  .brand small { display: inline; }
  .sidebar-bottom { margin-top: auto; border: none; padding-top: 14px; flex-direction: column; gap: 10px; }
  .content { padding: 64px 16px 26px; max-width: 100%; }
  h1 { font-size: 22px; }
}

/* ── checkbox line ── */
.chkline { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 15px; cursor: pointer; }
.chkline input { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; }

/* ── card preview ── */
.card-preview { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.card-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── select small ── */
.sel.small { padding: 6px 10px; font-size: 13px; max-width: 150px; }

/* ── online status + tooltip ── */
.srv-online { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.srv-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px rgba(107,114,128,0.15); }
.srv-dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(74,222,128,0.2); }
.srv-online .srv-num { color: var(--green); }
td { position: relative; }
.srv-tip { display: none; position: absolute; z-index: 20; left: 0; top: 100%; margin-top: 4px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; min-width: 120px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); font-size: 13px; }
.srv-tip div { padding: 2px 0; color: var(--text); }
td.has-tip:hover .srv-tip { display: block; }

/* ── details/summary ── */
details summary::-webkit-details-marker { color: var(--green); }

/* ══════════ вкладка «Сервер»: файловый менеджер и редактор ══════════ */

/* мелкая кнопка в общем стиле */
.btn.sm { padding: 7px 14px; font-size: 13px; }

/* watchdog */
.wd-box {
  margin-top: 16px; padding: 14px 16px;
  background: var(--surface2); border: 1px solid rgba(255,255,255,0.07); border-radius: 12px;
}
.wd-box .hint { margin-top: 8px; }

/* панель навигации */
.fm-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.fm-actions { margin-left: auto; display: flex; gap: 8px; }
.crumbs { font-size: 14px; font-weight: 700; }
.crumbs a { color: var(--green); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: var(--muted); margin: 0 3px; }

/* загрузка файла — нативный input спрятан под кнопку общего стиля */
.fm-upload { margin-bottom: 14px; }


/* панель массовых действий */
.fm-selbar {
  display: none; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(74,222,128,0.06); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 12px;
  font-weight: 700; font-size: 14px; color: var(--green);
}
.fm-selbar.on { display: flex; }
.fm-selactions { margin-left: auto; display: flex; gap: 8px; }

/* таблица файлов */
#ftable input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--green); cursor: pointer; }
#ftable td { vertical-align: middle; }
#ftable a, #ftable .fname { color: var(--text); text-decoration: none; font-weight: 700; }
#ftable a:hover { color: var(--green); }
#ftable a.dir { color: #fff; }
#ftable .ico-dir { color: var(--green); margin-right: 7px; font-size: 12px; }
#ftable td.dim { color: var(--muted); font-weight: 600; }
#ftable td.sm { font-size: 13px; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--green); }
th.sortable.asc::after { content: ' ▲'; color: var(--green); }
th.sortable.desc::after { content: ' ▼'; color: var(--green); }

/* действия в строке — единый вид кнопок и ссылок */
.fm-row-actions { text-align: right; white-space: nowrap; }
.fm-row-actions button, .fm-row-actions a {
  background: var(--surface2); border: 1px solid rgba(255,255,255,0.12);
  color: var(--muted); border-radius: 8px; padding: 5px 10px; margin-left: 5px;
  font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  text-decoration: none; display: inline-block; transition: all .12s;
}
.fm-row-actions button:hover, .fm-row-actions a:hover {
  color: var(--green); border-color: var(--border); background: rgba(74,222,128,0.08);
}
.fm-row-actions button.danger:hover {
  color: var(--red); border-color: rgba(248,113,113,0.45); background: rgba(248,113,113,0.08);
}

#console div { padding: 1px 0; }

/* ── редактор файлов ── */
.ed-modal { max-width: 1100px; width: 94vw; padding: 22px 24px; }
.ed-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.ed-head h2 {
  margin: 0; font-family: 'Courier New', monospace; font-size: 15px;
  color: var(--green); word-break: break-all;
}
.ed-stat { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 6px; }
.ed-head .ed-stat { margin-left: auto; margin-top: 0; }
.ed-msg { align-self: center; color: var(--green); font-size: 13px; font-weight: 700; }
.ed-wrap {
  display: flex; background: #0c0d0f;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
  overflow: hidden; height: 62vh;
}
.ed-gutter {
  flex: 0 0 auto; min-width: 48px; padding: 12px 8px 12px 12px;
  background: #0a0b0d; border-right: 1px solid rgba(255,255,255,0.07);
  color: #4b5563; text-align: right; overflow: hidden; white-space: pre;
  font-family: 'Courier New', monospace; font-size: 13px; line-height: 1.6; user-select: none;
}
.ed-wrap textarea {
  flex: 1; max-width: none; width: 100%; height: 100%;
  background: transparent; border: 0; border-radius: 0; resize: none;
  padding: 12px 14px; color: var(--text);
  font-family: 'Courier New', monospace; font-size: 13px; font-weight: 400; line-height: 1.6;
  white-space: pre; overflow: auto; tab-size: 2;
}
.ed-wrap textarea:focus { outline: none; box-shadow: none; border: 0; }

/* ══════════ зона загрузки: перетаскивание или клик ══════════ */
.dropzone {
  position: relative; cursor: pointer; user-select: none;
  border: 2px dashed rgba(74,222,128,0.28); border-radius: 12px;
  background: var(--surface2); padding: 20px 18px;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus-visible {
  border-color: var(--green); background: rgba(74,222,128,0.05); outline: none;
}
.dropzone.over {
  border-color: var(--green); background: rgba(74,222,128,0.12);
  box-shadow: 0 0 0 3px rgba(74,222,128,0.12);
}
.dropzone.busy { cursor: progress; border-style: solid; border-color: var(--border); }
.dz-main { display: flex; align-items: center; gap: 14px; justify-content: center; }
.dz-icon {
  font-size: 20px; color: var(--green); line-height: 1;
  background: rgba(74,222,128,0.1); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px;
}
.dz-text { color: var(--text); font-weight: 700; font-size: 14px; line-height: 1.4; }
.dz-text small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.dropzone.busy .dz-main { opacity: .5; }
.dz-progress {
  display: none; height: 6px; margin-top: 14px;
  background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden;
}
.dz-progress.on { display: block; }
.dz-bar { height: 100%; width: 0; background: var(--green); transition: width .15s; }
.dz-status {
  margin-top: 8px; text-align: center; font-size: 13px; font-weight: 600;
  color: var(--muted); min-height: 18px; word-break: break-all;
}
.dz-status.ok { color: var(--green); }
.dz-status.err { color: var(--red); }

/* ══════════ карточки подключений (Безопасность) ══════════ */
.conn-card {
  background: var(--surface2); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px; padding: 16px 18px; margin-top: 14px;
}
.conn-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.conn-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.conn-actions form { display: inline; }
.conn-servers { margin-top: 14px; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 12px; }
.conn-servers table { margin-bottom: 10px; }
.conn-servers td input[type=text] { max-width: 100%; }

/* сводка сервера (Безопасность): процессор · CPU% · RAM */
.srv-meta { font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 3px;
  display: flex; gap: 12px; flex-wrap: wrap; }
.srv-meta span { white-space: nowrap; }

/* подсветка всей области приёма файла при перетаскивании */
[data-drop-scope].dz-scope-over {
  outline: 2px dashed var(--green); outline-offset: -6px; border-radius: 14px;
}

/* ══════════ синхронизация модов профиль↔сервер ══════════ */
.bind-head {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 18px;
}
.bind-head b { display: block; color: #fff; font-size: 15px; }
.bind-head small { color: var(--muted); font-size: 12px; }
.bh-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin-bottom: 2px; }
.bh-arrow { font-size: 22px; color: var(--green); }
.sync-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sync-col { margin: 0; }
.sync-col h2 .cnt { font-size: 13px; color: var(--muted); font-weight: 600; }
.modrow { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.modrow .modname { flex: 1; white-space: normal; word-break: break-all; font-weight: 600; font-size: 13px; }
.modrow .modname.dim { color: var(--muted); }
.modrow .act { flex: 0 0 auto; max-width: 190px; }
.bulk { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 10px; }
.bulk button { background: var(--surface2); border: 1px solid rgba(255,255,255,0.12); color: var(--muted);
  border-radius: 7px; padding: 4px 10px; font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.bulk button:hover { color: var(--green); border-color: var(--border); }
.plan-group { margin-bottom: 14px; }
.plan-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.plan-item { font-family: 'Courier New', monospace; font-size: 13px; color: var(--text); padding: 2px 0 2px 14px; word-break: break-all; }
@media (max-width: 760px) { .sync-cols { grid-template-columns: 1fr; } }

/* ══════════ колокольчик уведомлений ══════════ */
.notif { position: absolute; top: 18px; right: 22px; z-index: 40; }
.notif-btn {
  position: relative; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; width: 40px; height: 40px; font-size: 18px;
  cursor: pointer; line-height: 1; transition: border-color .15s;
}
.notif-btn:hover { border-color: var(--green); }
.notif-badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--red); color: #fff; border-radius: 9px; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.notif-drop {
  position: absolute; top: 48px; right: 0; width: 340px; max-width: 86vw;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55); overflow: hidden;
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px;
}
.notif-clear { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 600; }
.notif-clear:hover { color: var(--red); }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.ni-ico { flex: 0 0 auto; font-size: 14px; }
.ni-text { font-size: 13px; color: var(--text); line-height: 1.4; }
.ni-meta { font-size: 11px; color: var(--muted); margin-top: 3px; text-transform: uppercase; letter-spacing: .5px; }
.notif-item.lvl-err .ni-text { color: var(--red); }
.notif-item.lvl-warn .ni-text { color: var(--yellow); }
.notif-empty { padding: 22px 14px; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 860px) { .notif { top: 12px; right: 14px; } }

/* ── client cards (список клиентов) ── */
.client-list { display: flex; flex-direction: column; gap: 12px; }
.client-card { display: flex; gap: 16px; align-items: flex-start; }
.client-card .cc-main { flex: 1; min-width: 0; }
.cc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 1.05em; }
.cc-head a { color: var(--text); text-decoration: none; }
.cc-head a:hover { color: var(--green); }
.cc-date { color: var(--muted); font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.cc-summary {
  white-space: pre-wrap; line-height: 1.5; color: var(--text);
  overflow-wrap: anywhere; word-break: break-word;
  max-height: 150px; overflow-y: auto;
  padding-right: 6px;
}
.cc-summary::-webkit-scrollbar { width: 8px; }
.cc-summary::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 4px; }
.cc-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; width: 140px; }
.cc-actions .btn, .cc-actions form { width: 100%; }
.cc-actions form { margin: 0; }
.cc-actions form .btn { width: 100%; }
.client-card.is-ignored { opacity: 0.55; }
.client-card.is-ignored:hover { opacity: 0.85; }
@media (max-width: 700px) {
  .client-card { flex-direction: column; }
  .cc-actions { flex-direction: row; width: 100%; }
}
