/* ═══════════════════════════════════════════════════════════════════════════
   Надстройка над console.css для панели МинЖКХ Хакасии.
   console.css — общая дизайн-система (перенесена из khakasia-bot как есть);
   здесь только фирменный цвет с логотипа и то, чего в исходной панели не было.
   ═══════════════════════════════════════════════════════════════════════════ */

:root:not([data-theme="dark"]) {
  --brand:        #0A4FA6;
  --brand-deep:   #083F86;
  --brand-soft:   rgba(10, 79, 166, 0.10);
  --brand-line:   rgba(10, 79, 166, 0.28);
}

/* ─── Логотип в рейле ───────────────────────────────────────────────────── */

.rail-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: #fff;
}

/* ─── Список получателей ────────────────────────────────────────────────── */

.channel-subs { margin-left: 6px; color: var(--faint); font-size: 11.5px; white-space: nowrap; }

.group-count {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-sunk);
  border-radius: 999px;
  padding: 1px 7px;
}

.group-delete-btn {
  border: 0;
  background: none;
  color: var(--faint);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.12s var(--ease);
}
.group-header-row:hover .group-delete-btn, .group-delete-btn:focus-visible { opacity: 1; }
.group-delete-btn:hover { color: var(--err); background: var(--err-soft); }
@media (hover: none) { .group-delete-btn { opacity: 1; } }

.group-dropzone.search-hidden { display: none; }

.bulk-select { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.bulk-select-item { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.bulk-select-item .form-check-input { margin-top: 0; }
.bulk-select-item:has(:disabled) { color: var(--faint); cursor: default; }
/* «отмечена часть» — в цвет бренда, как и обычная галочка */
.console .form-check-input:indeterminate { background-color: var(--brand); border-color: var(--brand); }

.empty-hint {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 28px 18px;
}
.empty-hint i { font-size: 30px; color: var(--faint); display: block; margin-bottom: 8px; }
.empty-hint b { color: var(--text); }

.bc-counter { margin-top: 4px; text-align: right; font-size: 11.5px; color: var(--faint); }
.bc-counter.is-over { color: var(--err); font-weight: 600; }

/* ─── Уведомления ───────────────────────────────────────────────────────── */

.notif-time { color: var(--muted); }
.notif-details { white-space: pre-line; color: var(--text); }

/* ─── Отчёт ─────────────────────────────────────────────────────────────── */

.report-status {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.report-status--done    { color: var(--ok);   background: var(--ok-soft); }
.report-status--sending { color: var(--warn); background: rgba(178, 106, 0, 0.12); }
.report-status--deleted { color: var(--muted); background: var(--surface-sunk); }
.report-status--failed  { color: var(--err);  background: var(--err-soft); }

.table-report tr.is-deleted td { color: var(--faint); }
.table-report .report-fail { color: var(--err); font-weight: 600; }

.post-preview { white-space: pre-wrap; overflow-wrap: anywhere; }
.post-preview h1, .post-preview h2, .post-preview h3,
.post-preview h4, .post-preview h5, .post-preview h6 { font-size: 1.05rem; font-weight: 700; margin: 0.15em 0; }
.post-preview blockquote { border-left: 3px solid var(--brand); padding-left: 10px; margin: 0.25em 0; color: var(--muted); }
.post-preview mark { background: #FFE066; color: #333; border-radius: 2px; padding: 0 1px; }

.chat-result { display: flex; gap: 10px; align-items: flex-start; }
.chat-result i { margin-top: 2px; }
.chat-result .bi-check-circle-fill { color: var(--ok); }
.chat-result .bi-x-circle-fill { color: var(--err); }
.chat-result .bi-hourglass-split { color: var(--warn); }
.chat-result .bi-trash { color: var(--faint); }

/* ─── Страница входа ────────────────────────────────────────────────────── */

.login-logo { display: block; margin: 0 auto 14px; width: 96px; height: 96px; }

.login-qr {
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  padding: 10px;
  width: fit-content;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.login-qr img { display: block; width: 232px; height: 232px; }

.login-hint { font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.5; margin: 0 0 14px; }

.login-open { display: block; width: 100%; font-size: 13.5px; padding: 0.55rem; }

.login-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-sunk);
  color: var(--muted);
  font-size: 12.5px;
  flex-wrap: wrap;
}
.login-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
  animation: login-pulse 1.4s ease-in-out infinite;
}
.login-status.is-success { color: var(--ok); background: var(--ok-soft); }
.login-status.is-error { color: var(--err); background: var(--err-soft); }
.login-status.is-success .login-status-dot { background: var(--ok); animation: none; }
.login-status.is-error .login-status-dot { background: var(--err); animation: none; }
.login-reload { font-weight: 600; text-decoration: underline; }

@keyframes login-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .login-status-dot { animation: none; } }

/* ─── «Выйти» — кнопка формы (выход в Django только POST-запросом) ──────── */

button.rail-exit { border: 0; background: none; cursor: pointer; font: inherit; }
button.more-item { font: inherit; }
.console-more form .more-item { width: 100%; }
