:root, [data-theme="dark"] {
    --bg: #0e1621;
    --panel: #17212b;
    --panel-light: #1e2a36;
    --accent: #4ea8de;
    --accent-dark: #3a8bc2;
    --text: #e8edf1;
    --text-dim: #8a9aa9;
    --bubble-mine: #2b5278;
    --bubble-other: #1e2a36;
    --border: #223140;
    --modal-overlay: rgba(0,0,0,.55);
}
[data-theme="light"] {
    --bg: #eef2f5;
    --panel: #ffffff;
    --panel-light: #f4f6f8;
    --accent: #3a8bc2;
    --accent-dark: #2f6f9c;
    --text: #16202a;
    --text-dim: #6b7a87;
    --bubble-mine: #d5e8fb;
    --bubble-other: #f0f2f5;
    --border: #dde3e8;
    --modal-overlay: rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    transition: background .2s, color .2s;
}

/* ---------- Auth pages ---------- */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, var(--bg), var(--panel));
}
.auth-card {
    background: var(--panel);
    padding: 32px 28px;
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.auth-card h1 { margin: 0 0 20px; font-size: 22px; text-align: center; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.auth-card input {
    background: var(--panel-light);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
}
.auth-card input:focus { border-color: var(--accent); }
.auth-card button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
}
.auth-card button:hover { background: var(--accent-dark); }
.auth-error {
    background: #4a1f24;
    color: #f4a3a3;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 14px;
}
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-dim); }
.auth-switch a { color: var(--accent); text-decoration: none; }

/* ---------- App layout ---------- */
.app { display: flex; height: 100vh; }

.sidebar {
    width: 340px;
    min-width: 340px;
    background: var(--panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.my-profile { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.my-name { font-weight: 600; font-size: 15px; }
.my-status { font-size: 12px; color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 18px;
    padding: 6px;
    cursor: pointer;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.icon-btn:hover { background: var(--panel-light); color: var(--text); }
.logout-btn:hover { color: #e57373; }

.avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #7c5fd6);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 88px; height: 88px; font-size: 32px; }

.search-box { padding: 10px 14px; position: relative; border-bottom: 1px solid var(--border); }
.search-box input {
    width: 100%;
    background: var(--panel-light);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}
.search-box input:focus { border-color: var(--accent); }
.search-results {
    position: absolute;
    left: 14px; right: 14px; top: 54px;
    background: var(--panel-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 20;
    display: none;
}
.search-results.active { display: block; }
.search-results.static { position: static; display: block; margin-top: 8px; max-height: 200px; }
.search-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
}
.search-item:hover { background: rgba(255,255,255,.05); }
.search-item .avatar { width: 34px; height: 34px; font-size: 13px; }
.online-dot-inline { width: 8px; height: 8px; border-radius: 50%; background: #4caf50; margin-left: auto; }

.chats-list { flex: 1; overflow-y: auto; }
.empty-hint { padding: 20px; color: var(--text-dim); text-align: center; font-size: 14px; }

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(128,128,128,.06);
    position: relative;
}
.chat-item:hover, .chat-item.active { background: var(--panel-light); }
.chat-item-avatar-wrap { position: relative; flex-shrink: 0; }
.online-dot {
    position: absolute; bottom: -1px; right: -1px;
    width: 11px; height: 11px; border-radius: 50%;
    background: #4caf50; border: 2px solid var(--panel);
}
.chat-item-body { flex: 1; min-width: 0; }
.chat-item-top { display: flex; justify-content: space-between; align-items: baseline; }
.chat-item-name { font-weight: 600; font-size: 14.5px; }
.chat-item-time { font-size: 11.5px; color: var(--text-dim); }
.chat-item-preview {
    font-size: 13px; color: var(--text-dim);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 220px;
}
.unread-badge {
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 5px;
}

/* ---------- Chat window ---------- */
.chat-window { flex: 1; display: flex; flex-direction: column; background: var(--bg); position: relative; }
.no-chat-selected {
    flex: 1; display: flex; align-items: center; justify-content: center;
    color: var(--text-dim); text-align: center; padding: 20px;
}
.no-chat-selected h2 { color: var(--text); margin-bottom: 8px; }

.chat-active { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-header {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
}
.back-btn { display: none; background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; }
.chat-header-info { flex: 1; }
.chat-header-name { font-weight: 600; font-size: 15.5px; }
.chat-header-status { font-size: 12.5px; color: var(--text-dim); }

/* Поиск по переписке */
.search-panel {
    padding: 10px 16px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.search-panel input {
    flex: 1;
    background: var(--panel-light);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 16px;
    outline: none;
    font-size: 13.5px;
}
.search-msg-results { width: 100%; max-height: 220px; overflow-y: auto; }
.search-msg-item {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid rgba(128,128,128,.08);
}
.search-msg-sender { color: var(--accent); font-weight: 600; font-size: 12px; }
.search-msg-time { color: var(--text-dim); font-size: 11px; }

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.load-more-hint { text-align: center; color: var(--text-dim); font-size: 12.5px; padding: 8px; }
.msg-row { display: flex; margin-bottom: 6px; }
.msg-row.mine { justify-content: flex-end; }
.bubble {
    max-width: 66%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 14.5px;
    line-height: 1.4;
    word-wrap: break-word;
    background: var(--bubble-other);
    position: relative;
}
.msg-row.mine .bubble { background: var(--bubble-mine); }
.bubble .sender-name { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 2px; display: block; }
.bubble .msg-text { white-space: pre-wrap; }
.bubble .deleted-msg { color: var(--text-dim); font-size: 13.5px; }
.bubble .msg-time { font-size: 10.5px; color: var(--text-dim); margin-top: 4px; display: block; text-align: right; }
.bubble img.msg-image { max-width: 100%; border-radius: 10px; margin-top: 4px; display: block; }
.bubble a.msg-file {
    display: flex; align-items: center; gap: 8px;
    color: var(--text); text-decoration: none;
    background: rgba(128,128,128,.12);
    padding: 8px 10px; border-radius: 8px; margin-top: 4px;
}
.msg-actions {
    position: absolute;
    top: -14px;
    right: 4px;
    display: none;
    gap: 2px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2px;
}
.bubble:hover .msg-actions { display: flex; }
.msg-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 6px;
}
.msg-action-btn:hover { background: var(--panel-light); }

.typing-indicator {
    padding: 4px 18px;
    font-size: 12.5px;
    color: var(--accent);
    font-style: italic;
}

.message-form {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    background: var(--panel);
    border-top: 1px solid var(--border);
}
.message-form.editing { background: rgba(78,168,222,.08); }
.file-btn { font-size: 20px; cursor: pointer; color: var(--text-dim); background: none; border: none; padding: 0; }
.message-form input[type=text] {
    flex: 1;
    background: var(--panel-light);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 16px;
    border-radius: 22px;
    outline: none;
    font-size: 14.5px;
}
.message-form input[type=text]:focus { border-color: var(--accent); }
.send-btn {
    background: var(--accent);
    border: none; color: #fff;
    width: 40px; height: 40px; border-radius: 50%;
    font-size: 16px; cursor: pointer; flex-shrink: 0;
}
.send-btn:hover { background: var(--accent-dark); }
.file-preview {
    padding: 8px 16px;
    background: var(--panel);
    color: var(--text-dim);
    font-size: 13px;
    border-top: 1px solid var(--border);
}

/* Эмодзи-пикер */
.emoji-picker {
    position: absolute;
    bottom: 68px;
    left: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    display: none;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    z-index: 30;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.emoji-item {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}
.emoji-item:hover { background: var(--panel-light); }

/* ---------- Модальные окна ---------- */
.modal-overlay {
    position: fixed; inset: 0;
    background: var(--modal-overlay);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}
.modal {
    background: var(--panel);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    max-height: 84vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.modal-input {
    background: var(--panel-light);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 14px;
    border-radius: 10px;
    outline: none;
    font-size: 14.5px;
    width: 100%;
}
.modal-input:focus { border-color: var(--accent); }
.modal-primary-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.modal-primary-btn:hover { background: var(--accent-dark); }

.profile-modal-body { align-items: center; text-align: center; }
.avatar-upload-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.avatar-upload-btn {
    color: var(--accent);
    font-size: 13.5px;
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid var(--accent);
    border-radius: 16px;
}
.avatar-upload-btn:hover { background: rgba(78,168,222,.1); }
.profile-field { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; }
.profile-label { font-size: 12px; color: var(--text-dim); }
.profile-value { font-size: 15px; font-weight: 600; }

.group-selected-list { display: flex; flex-wrap: wrap; gap: 6px; }
.selected-chip {
    background: var(--panel-light);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 14px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.selected-chip.static { width: 100%; justify-content: space-between; }
.chip-remove { cursor: pointer; color: var(--text-dim); }
.chip-remove:hover { color: #e57373; }

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
    .sidebar { width: 100%; min-width: 0; }
    .chat-window { display: none; }
    .app.chat-open .sidebar { display: none; }
    .app.chat-open .chat-window { display: flex; }
    .back-btn { display: inline-block; }
    .bubble { max-width: 82%; }
    .modal { max-width: 100%; }
}

/* ---------- Ответы, пересылка, реакции ---------- */
.forward-label { font-size: 12px; color: var(--accent); margin-bottom: 4px; opacity: .85; }
.reply-quote {
    border-left: 3px solid var(--accent);
    padding: 4px 8px;
    margin-bottom: 6px;
    border-radius: 4px;
    background: rgba(128,128,128,.08);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.reply-quote-sender { font-size: 12px; color: var(--accent); font-weight: 600; }
.reply-quote-text { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }

.reactions-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.reaction-chip {
    background: rgba(128,128,128,.14);
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 12px;
    padding: 2px 7px;
    cursor: pointer;
    color: var(--text);
}
.reaction-chip.mine { background: rgba(78,168,222,.22); border-color: var(--accent); }
.reaction-chip:hover { filter: brightness(1.1); }

.quick-reaction-bar {
    position: absolute;
    top: -46px;
    right: 4px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 6px;
    display: none;
    gap: 2px;
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
    z-index: 10;
}
.quick-reaction-btn { background: none; border: none; font-size: 18px; cursor: pointer; padding: 2px 4px; border-radius: 50%; }
.quick-reaction-btn:hover { background: var(--panel-light); }

.read-ticks { color: var(--text-dim); font-size: 10.5px; }
.read-ticks.read { color: var(--accent); }

.flash-highlight { animation: flashHighlight 1.2s ease; }
@keyframes flashHighlight {
    0% { background: rgba(78,168,222,.25); border-radius: 12px; }
    100% { background: transparent; }
}

/* ---------- Reply preview bar (над полем ввода) ---------- */
.reply-preview-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--panel-light);
    border-top: 1px solid var(--border);
    border-left: 3px solid var(--accent);
}
.reply-preview-content { min-width: 0; }
.reply-preview-sender { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.reply-preview-text { font-size: 13px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }

/* ---------- Прогресс-бар загрузки ---------- */
.upload-progress-wrap {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--panel);
    border-top: 1px solid var(--border);
}
.upload-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--panel-light);
    border-radius: 3px;
    overflow: hidden;
}
.upload-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width .15s ease;
}
#uploadProgressLabel { font-size: 12.5px; color: var(--text-dim); min-width: 90px; }

/* ---------- Голосовые сообщения ---------- */
.voice-player { display: flex; align-items: center; gap: 8px; min-width: 200px; }
.voice-play-btn {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--accent); color: #fff; border: none;
    cursor: pointer; font-size: 13px; flex-shrink: 0;
}
.voice-waveform { flex: 1; display: flex; align-items: center; gap: 2px; height: 24px; }
.voice-waveform span { width: 3px; background: var(--text-dim); border-radius: 2px; opacity: .6; }
.voice-duration { font-size: 11.5px; color: var(--text-dim); flex-shrink: 0; }

.voice-record-bar {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--panel);
    border-top: 1px solid var(--border);
    font-size: 13.5px;
}
.voice-record-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #e57373;
    animation: recordPulse 1s infinite;
}
@keyframes recordPulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.voice-record-hint { color: var(--text-dim); font-size: 12px; margin-left: auto; }
#voiceBtn.recording { color: #e57373; }

/* ---------- Видео/аудио в чате ---------- */
.msg-video { max-width: 100%; border-radius: 10px; margin-top: 4px; display: block; }
.msg-audio { margin-top: 4px; width: 240px; max-width: 100%; }

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}
.lightbox-content { max-width: 92vw; max-height: 92vh; }
.lightbox-content img, .lightbox-content video { max-width: 92vw; max-height: 92vh; border-radius: 6px; }
.lightbox-close {
    position: absolute; top: 18px; right: 22px;
    background: rgba(255,255,255,.12);
    border: none; color: #fff;
    width: 40px; height: 40px; border-radius: 50%;
    font-size: 18px; cursor: pointer;
}

/* ---------- Меню чата (закреп/мьют/архив) ---------- */
.dropdown-menu {
    position: absolute;
    top: 52px; right: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    z-index: 30;
    min-width: 220px;
    overflow: hidden;
}
.dropdown-item { padding: 12px 16px; font-size: 14px; cursor: pointer; }
.dropdown-item:hover { background: var(--panel-light); }

.archived-toggle {
    padding: 12px 16px;
    color: var(--text-dim);
    font-size: 13.5px;
    cursor: pointer;
    border-top: 1px solid var(--border);
}
.archived-toggle:hover { background: var(--panel-light); }

/* ---------- Список для пересылки ---------- */
.forward-list { max-height: 320px; overflow-y: auto; }
.forward-chat-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 6px;
    cursor: pointer;
}
.forward-chat-item .avatar { width: 32px; height: 32px; font-size: 13px; }
.forward-chat-item input { margin-right: 4px; }

/* ---------- Восстановление пароля / успех ---------- */
.auth-success {
    background: #1f4a2e;
    color: #a3d9a5;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 14px;
    line-height: 1.5;
}
.auth-founder { text-align: center; margin-top: 10px; }

/* ---------- Email в профиле ---------- */
.profile-email-edit { display: flex; gap: 8px; margin-top: 6px; }
.profile-email-edit .modal-input { flex: 1; }
.modal-primary-btn.small { padding: 10px 14px; font-size: 13px; white-space: nowrap; }
.email-save-status { font-size: 12.5px; margin-top: 4px; display: block; }
.email-save-status.success { color: #6fcf7a; }
.email-save-status.error { color: #e57373; }

/* ---------- Чекбокс согласия с условиями ---------- */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.4;
    cursor: pointer;
}
.terms-checkbox input { margin-top: 3px; flex-shrink: 0; }
.terms-checkbox a { color: var(--accent); text-decoration: none; }
.terms-checkbox a:hover { text-decoration: underline; }
.terms-notice { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; margin-bottom: 16px; }

/* ---------- Страница пользовательского соглашения ---------- */
.terms-body { height: auto; overflow-y: auto; background: var(--bg); }
.terms-wrap { display: flex; justify-content: center; padding: 32px 16px; }
.terms-card {
    background: var(--panel);
    border-radius: 16px;
    padding: 32px;
    max-width: 680px;
    width: 100%;
}
.terms-card h1 { font-size: 22px; margin: 0 0 6px; }
.terms-meta { color: var(--text-dim); font-size: 13px; margin-bottom: 24px; }
.terms-card h2 { font-size: 16px; margin: 24px 0 8px; color: var(--accent); }
.terms-card p { font-size: 14px; line-height: 1.6; color: var(--text); margin: 0 0 10px; }
.terms-card ul { margin: 0 0 10px; padding-left: 20px; }
.terms-card li { font-size: 14px; line-height: 1.6; margin-bottom: 6px; }
.terms-back { margin-top: 28px; }
.terms-back a { color: var(--accent); text-decoration: none; font-size: 14px; }
.terms-back a:hover { text-decoration: underline; }

/* ---------- Жалобы ---------- */
.dropdown-item-danger { color: #e57373; }
.report-target-label { font-size: 13.5px; color: var(--text-dim); }
.report-target-label strong { color: var(--text); }
textarea.report-details {
    resize: vertical;
    font-family: inherit;
    min-height: 70px;
}
.report-submit-btn { background: #c0392b; }
.report-submit-btn:hover { background: #a5311f; }
select.modal-input { cursor: pointer; }

/* ---------- Админ-панель ---------- */
.admin-wrap { max-width: 780px; margin: 0 auto; padding: 28px 16px 60px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-header h1 { font-size: 22px; margin: 0; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.admin-tab {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.admin-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.admin-tab-badge {
    background: #e57373;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 16px;
    padding: 1px 5px;
    border-radius: 8px;
}
.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}
.admin-card-dim { opacity: .55; }
.admin-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.admin-card p { margin: 4px 0; font-size: 14px; color: var(--text); }
.admin-card-time { font-size: 12px; color: var(--text-dim); margin-left: auto; }
.admin-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.admin-badge-new { background: #4a1f24; color: #f4a3a3; }
.admin-badge-reviewed { background: #1f4a2e; color: #a3d9a5; }
.admin-badge-dismissed { background: var(--panel-light); color: var(--text-dim); }
.admin-blocked-tag { color: #e57373; font-size: 12px; }
.admin-quote { font-style: italic; color: var(--text-dim); background: var(--panel-light); padding: 6px 10px; border-radius: 8px; }
.admin-details { font-size: 13px; color: var(--text-dim); }
.admin-card-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.admin-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    cursor: pointer;
}
.admin-btn:hover { background: var(--accent-dark); }
.admin-btn-ghost { background: var(--panel-light); color: var(--text); border: 1px solid var(--border); }

/* ---------- Управление участниками группы ---------- */
.member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: var(--panel-light);
    border-radius: 10px;
    font-size: 13.5px;
    flex-wrap: wrap;
}
.member-actions { display: flex; gap: 6px; }
.member-action-btn {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 11.5px;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
}
.member-action-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.member-action-danger:hover { background: #c0392b; border-color: #c0392b; }

/* ---------- Профиль собеседника ---------- */
#contactProfileModal .profile-modal-body { gap: 6px; }
