/* ══════════════════════════════════════════════════════════════
   Wormhole — Design Tokens
   ══════════════════════════════════════════════════════════════ */

:root {
    --wh-bg-primary: #1a1a2e;
    --wh-bg-secondary: #16213e;
    --wh-bg-tertiary: #0f3460;
    --wh-accent: #e94560;
    --wh-accent-hover: #ff6b81;
    --wh-text-primary: #eaeaea;
    --wh-text-muted: #8a8a9a;
    --wh-border: #2a2a4a;
    --wh-online: #43b581;
    --wh-offline: #747f8d;
    --wh-sidebar-width: 280px;
    --wh-radius: 8px;
    --wh-transition: 0.2s ease;

    /* Shoelace primary color override */
    --sl-color-primary-50: #fff1f3;
    --sl-color-primary-100: #ffe0e5;
    --sl-color-primary-200: #ffc7d0;
    --sl-color-primary-300: #ffa0af;
    --sl-color-primary-400: #ff6b81;
    --sl-color-primary-500: #e94560;
    --sl-color-primary-600: #d6334e;
    --sl-color-primary-700: #b4243d;
    --sl-color-primary-800: #96213a;
    --sl-color-primary-900: #802038;
    --sl-color-primary-950: #480d1a;
    --sl-input-background-color: var(--wh-bg-primary);
    --sl-input-background-color-hover: var(--wh-bg-primary);
    --sl-input-background-color-focus: var(--wh-bg-primary);
    --sl-input-border-color: var(--wh-border);
    --sl-input-border-color-hover: var(--wh-text-muted);
    --sl-input-border-color-focus: var(--wh-accent);
    --sl-input-color: var(--wh-text-primary);
    --sl-panel-background-color: var(--wh-bg-secondary);
    --sl-panel-border-color: var(--wh-border);
    --sl-overlay-background-color: rgba(0, 0, 0, 0.6);
}

/* ══════════════════════════════════════════════════════════════
   Reset & Base
   ══════════════════════════════════════════════════════════════ */

* {
    scrollbar-width: thin;
    scrollbar-color: var(--wh-border) transparent;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: var(--wh-bg-primary);
    color: var(--wh-text-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

#app {
    height: 100%;
}

a {
    color: var(--wh-accent);
    text-decoration: none;
}

a:hover {
    color: var(--wh-accent-hover);
}

/* ══════════════════════════════════════════════════════════════
   Login Page
   ══════════════════════════════════════════════════════════════ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--wh-bg-primary) 0%, var(--wh-bg-secondary) 50%, var(--wh-bg-tertiary) 100%);
    padding: 1rem;
}

.login-card {
    background: var(--wh-bg-secondary);
    border: 1px solid var(--wh-border);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.login-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.login-card .subtitle {
    color: var(--wh-text-muted);
    margin: 0 0 2rem;
    font-size: 0.9rem;
}

.login-card .field-label {
    color: var(--wh-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

/* Certificate dropzone */
.cert-dropzone {
    border: 2px dashed var(--wh-border);
    border-radius: var(--wh-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--wh-transition), background var(--wh-transition);
    color: var(--wh-text-muted);
    margin-bottom: 1.25rem;
}

.cert-dropzone:hover,
.cert-dropzone.dragover {
    border-color: var(--wh-accent);
    background: rgba(233, 69, 96, 0.05);
}

.cert-dropzone.has-file {
    border-color: var(--wh-online);
    background: rgba(67, 181, 129, 0.05);
    color: var(--wh-online);
}

.cert-dropzone i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* ══════════════════════════════════════════════════════════════
   App Layout (Chat)
   ══════════════════════════════════════════════════════════════ */

.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar ──────────────────────────────────────────────── */

.sidebar {
    width: var(--wh-sidebar-width);
    min-width: var(--wh-sidebar-width);
    background: var(--wh-bg-secondary);
    border-right: 1px solid var(--wh-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--wh-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--wh-accent);
}

.sidebar-actions {
    display: flex;
    gap: 0.25rem;
}

.sidebar-actions sl-icon-button::part(base) {
    color: var(--wh-text-muted);
}

.sidebar-actions sl-icon-button::part(base):hover {
    color: var(--wh-text-primary);
}

.conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border-radius: var(--wh-radius);
    cursor: pointer;
    color: var(--wh-text-muted);
    text-decoration: none;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.conversation-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--wh-text-primary);
}

.conversation-item.active {
    background: rgba(233, 69, 96, 0.15);
    color: var(--wh-text-primary);
}

.conversation-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--wh-bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.conversation-info {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User panel at bottom of sidebar */
.user-panel {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--wh-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
}

.user-panel .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--wh-bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.user-panel .username { font-weight: 600; font-size: 0.85rem; }
.user-panel .user-status { font-size: 0.75rem; color: var(--wh-text-muted); }

.status-dot {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.status-dot.online  { background: var(--wh-online); }
.status-dot.offline { background: var(--wh-offline); }

/* ── Main chat area ───────────────────────────────────────── */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--wh-bg-primary);
}

.chat-header {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--wh-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: var(--wh-bg-secondary);
    gap: 0.5rem;
}

.chat-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.chat-header-actions sl-icon-button::part(base) {
    color: var(--wh-text-muted);
}

.chat-header-actions sl-icon-button::part(base):hover {
    color: var(--wh-text-primary);
}

.search-input {
    width: 200px;
}

/* ── Messages ─────────────────────────────────────────────── */

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column-reverse;
}

.message {
    display: flex;
    padding: 0.4rem 0.5rem;
    gap: 0.75rem;
    border-radius: 4px;
    position: relative;
}

.message:hover {
    background: rgba(255, 255, 255, 0.02);
}

.message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--wh-bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.message-body {
    flex: 1;
    min-width: 0;
}

.message .meta {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.message .author { font-weight: 600; font-size: 0.9rem; }
.message .author.own { color: var(--wh-accent); }
.message .timestamp { font-size: 0.75rem; color: var(--wh-text-muted); }

.message .content {
    margin-top: 0.2rem;
    line-height: 1.45;
    word-break: break-word;
}

.edited-tag {
    font-size: 0.7rem;
    color: var(--wh-text-muted);
    margin-left: 0.5rem;
}

/* ── Message actions (hover to reveal) ────────────────────── */

.message-actions {
    opacity: 0;
    transition: opacity 0.15s;
    display: flex;
    gap: 0.25rem;
    align-items: start;
    flex-shrink: 0;
}

.message:hover .message-actions { opacity: 1; }

.message-actions sl-icon-button::part(base) {
    color: var(--wh-text-muted);
    padding: 2px;
}

.message-actions sl-icon-button::part(base):hover {
    color: var(--wh-text-primary);
}

/* ── Thread indicator ─────────────────────────────────────── */

.thread-indicator {
    font-size: 0.8rem;
    color: var(--wh-accent);
    cursor: pointer;
    margin-top: 0.25rem;
}
.thread-indicator:hover { text-decoration: underline; }

/* ── Message input ────────────────────────────────────────── */

.message-input-area {
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid var(--wh-border);
    flex-shrink: 0;
}

.input-wrapper {
    background: var(--wh-bg-secondary);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    display: flex;
    align-items: flex-end;
    padding: 0.5rem;
}

.input-wrapper textarea {
    background: transparent;
    border: none;
    color: var(--wh-text-primary);
    resize: none;
    flex: 1;
    padding: 0.5rem;
    font-size: 0.9rem;
    max-height: 120px;
    outline: none;
    font-family: inherit;
}

.send-btn {
    background: var(--wh-accent);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--wh-transition);
    flex-shrink: 0;
}
.send-btn:hover { background: var(--wh-accent-hover); }

.attach-btn {
    background: transparent;
    border: none;
    color: var(--wh-text-muted);
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.15s;
    flex-shrink: 0;
}
.attach-btn:hover { color: var(--wh-text-primary); }

/* ══════════════════════════════════════════════════════════════
   File Uploads & Attachments
   ══════════════════════════════════════════════════════════════ */

.upload-progress { margin-top: 0.5rem; }

.upload-progress-bar {
    height: 4px;
    background: var(--wh-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.upload-progress-fill {
    height: 100%;
    background: var(--wh-accent);
    border-radius: 2px;
    transition: width 0.3s;
}

.upload-progress-text {
    font-size: 0.75rem;
    color: var(--wh-text-muted);
}

.upload-retry { color: var(--wh-accent); cursor: pointer; }

.attachment-item { margin-top: 0.5rem; max-width: 400px; }
.attachment-image-link { display: block; }

.attachment-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--wh-radius);
    object-fit: contain;
    cursor: pointer;
    border: 1px solid var(--wh-border);
}

.attachment-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.att-size { color: var(--wh-text-muted); font-size: 0.75rem; }

.attachment-file {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--wh-bg-secondary);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    color: var(--wh-text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.attachment-file:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--wh-text-primary);
}

.attachment-file .att-icon { font-size: 1.5rem; color: var(--wh-accent); }

/* ── Image lightbox ────────────────────────────────────────── */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.5);
}

.lightbox-filename {
    margin-right: auto;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lightbox-download,
.lightbox-close {
    color: rgba(255, 255, 255, 0.8);
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.15s;
    text-decoration: none;
}

.lightbox-download:hover,
.lightbox-close:hover {
    color: #fff;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--wh-radius);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.messages-container.drag-active {
    outline: 2px dashed var(--wh-accent);
    outline-offset: -4px;
    background: rgba(233, 69, 96, 0.03);
}

/* ══════════════════════════════════════════════════════════════
   Thread Panel
   ══════════════════════════════════════════════════════════════ */

.thread-panel {
    width: 0;
    min-width: 0;
    overflow: hidden;
    background: var(--wh-bg-secondary);
    border-left: 1px solid var(--wh-border);
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease, min-width 0.25s ease;
}

.thread-panel.open { width: 380px; min-width: 380px; }

.thread-panel-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--wh-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.thread-panel-header h4 { margin: 0; font-size: 1rem; font-weight: 700; }

.thread-parent {
    padding: 0.5rem;
    border-bottom: 1px solid var(--wh-border);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.thread-parent-body,
.thread-reply-body { flex: 1; min-width: 0; }

.thread-avatar { width: 32px; height: 32px; font-size: 0.75rem; }

.thread-divider {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--wh-border);
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--wh-text-muted);
    font-weight: 600;
}

.thread-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
}

.thread-messages .message { padding: 0.3rem 0; }

.thread-loading,
.thread-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--wh-text-muted);
    font-size: 0.85rem;
}

.thread-input-area {
    padding: 0.5rem 0.75rem 0.75rem;
    border-top: 1px solid var(--wh-border);
    flex-shrink: 0;
}

.thread-input-area .input-wrapper {
    background: var(--wh-bg-primary);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    display: flex;
    align-items: flex-end;
    padding: 0.35rem;
}

.thread-input-area textarea {
    background: transparent;
    border: none;
    color: var(--wh-text-primary);
    resize: none;
    flex: 1;
    padding: 0.35rem;
    font-size: 0.85rem;
    max-height: 80px;
    outline: none;
    font-family: inherit;
}

/* ══════════════════════════════════════════════════════════════
   Voice Call Bar
   ══════════════════════════════════════════════════════════════ */

.call-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
    background: var(--wh-bg-tertiary);
    border-bottom: 1px solid var(--wh-border);
    flex-shrink: 0;
}

.call-bar-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wh-online);
}

.call-pulse { animation: call-pulse-anim 1.5s ease-in-out infinite; }

@keyframes call-pulse-anim {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}

.call-bar-controls { display: flex; gap: 0.5rem; }

.call-control-btn {
    width: 36px; height: 36px; border-radius: 50%;
    border: none; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background var(--wh-transition);
    background: rgba(255, 255, 255, 0.1); color: var(--wh-text-primary);
}
.call-control-btn:hover { background: rgba(255, 255, 255, 0.2); }
.call-control-btn.muted { background: var(--wh-accent); color: white; }
.call-end-btn { background: #e74c3c; color: white; }
.call-end-btn:hover { background: #c0392b; }

/* ══════════════════════════════════════════════════════════════
   Typing Indicator
   ══════════════════════════════════════════════════════════════ */

.typing-indicator {
    font-size: 0.8rem;
    color: var(--wh-text-muted);
    font-style: italic;
    animation: typing-pulse 1.5s ease-in-out infinite;
}

@keyframes typing-pulse {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════
   Toast Notifications (Shoelace sl-alert)
   ══════════════════════════════════════════════════════════════ */

.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast-stack > * {
    pointer-events: auto;
}

/* ══════════════════════════════════════════════════════════════
   Shoelace Dialog Overrides
   ══════════════════════════════════════════════════════════════ */

sl-dialog::part(panel) {
    background: var(--wh-bg-secondary);
    border: 1px solid var(--wh-border);
}

sl-dialog::part(header) {
    border-bottom: 1px solid var(--wh-border);
}

sl-dialog::part(footer) {
    border-top: 1px solid var(--wh-border);
}

sl-tab-group::part(tabs) {
    border-bottom-color: var(--wh-border);
}

/* ══════════════════════════════════════════════════════════════
   Admin Page
   ══════════════════════════════════════════════════════════════ */

.admin-page {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--wh-bg-secondary) 0%, var(--wh-bg-primary) 300px);
}

.admin-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.admin-back-link {
    color: var(--wh-text-muted);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
    transition: color var(--wh-transition);
}
.admin-back-link:hover { color: var(--wh-text-primary); }

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-subtitle {
    color: var(--wh-text-muted);
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}

/* User cards */
.user-cards { display: flex; flex-direction: column; gap: 0.5rem; }

.user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--wh-bg-secondary);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    transition: border-color var(--wh-transition);
}
.user-card:hover { border-color: rgba(255, 255, 255, 0.1); }
.user-card--revoked { opacity: 0.55; }

.user-card-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--wh-bg-tertiary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; flex-shrink: 0;
    color: var(--wh-accent);
}

.user-card-info { flex: 1; min-width: 0; }

.user-card-name {
    font-weight: 600; font-size: 0.95rem;
    display: flex; align-items: center; gap: 0.5rem;
}

.user-card-username { color: var(--wh-text-muted); font-size: 0.8rem; }

.user-card-meta {
    display: flex; flex-direction: column;
    align-items: flex-end; gap: 0.25rem; flex-shrink: 0;
}

.user-card-date {
    color: var(--wh-text-muted); font-size: 0.75rem;
    display: flex; align-items: center; gap: 0.35rem;
}

.user-card-actions { flex-shrink: 0; margin-left: 0.25rem; }

/* Badges */
.badge-admin {
    background: var(--wh-accent); color: white;
    font-size: 0.65rem; padding: 0.15rem 0.45rem;
    border-radius: 4px; font-weight: 700; letter-spacing: 0.03em;
}

.badge-revoked {
    background: rgba(231, 76, 60, 0.15); color: #e74c3c;
    font-size: 0.7rem; padding: 0.2rem 0.5rem;
    border-radius: 4px; font-weight: 600;
}

.badge-active {
    background: rgba(67, 181, 129, 0.15); color: var(--wh-online);
    font-size: 0.7rem; padding: 0.2rem 0.5rem;
    border-radius: 4px; font-weight: 600;
}

/* Cert alert */
.cert-alert {
    display: flex; gap: 1rem;
    background: rgba(67, 181, 129, 0.06);
    border: 1px solid rgba(67, 181, 129, 0.25);
    border-radius: var(--wh-radius);
    padding: 1.25rem; margin-bottom: 1.5rem;
}

.cert-alert-icon { font-size: 1.75rem; color: var(--wh-online); flex-shrink: 0; line-height: 1; }
.cert-alert-body h5 { font-size: 1rem; font-weight: 700; margin: 0 0 0.5rem; color: var(--wh-online); }
.cert-alert-body p { font-size: 0.85rem; color: var(--wh-text-muted); margin: 0 0 0.75rem; }

.cert-password-box {
    background: var(--wh-bg-primary);
    border: 1px solid var(--wh-border);
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.cert-password-label {
    font-size: 0.7rem; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--wh-text-muted); font-weight: 600;
}

.cert-password-box code {
    color: var(--wh-accent-hover); font-size: 1rem; user-select: all;
}

/* ══════════════════════════════════════════════════════════════
   Empty State
   ══════════════════════════════════════════════════════════════ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--wh-text-muted);
    text-align: center;
    padding: 2rem;
}

.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

/* Modal user select list */
.user-select-list .conversation-item { margin-bottom: 2px; }

.no-users-message {
    color: var(--wh-text-muted); text-align: center; padding: 1rem; margin: 0;
}

.selected-members { display: flex; flex-wrap: wrap; gap: 4px; }

.member-badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    background: var(--wh-bg-tertiary); color: var(--wh-text-primary);
    font-size: 0.8rem; padding: 0.2rem 0.5rem;
    border-radius: 4px; cursor: pointer;
}

.member-badge:hover { background: rgba(255, 255, 255, 0.1); }

/* ══════════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0; bottom: 0;
        z-index: 1000;
        transition: left 0.3s;
    }
    .sidebar.open { left: 0; }

    .thread-panel.open {
        position: fixed;
        right: 0; top: 0; bottom: 0;
        z-index: 1000;
        width: 100%; min-width: 100%;
    }

    .admin-header { flex-direction: column; }
}
