/* ═══════════════════════════════════════════════════════════
   AICQBot - Dual Theme CSS
   Default: Claude Code Warm Light (claude)
   Alt:     Warm Dark (dark)
   ═══════════════════════════════════════════════════════════ */

/* ─── Claude Code Warm Light Theme (Default) ─────────────── */
:root {
    --bg-primary: #FAF9F6;
    --bg-secondary: #F5F0E8;
    --bg-tertiary: #EDE8DB;
    --bg-chat: #FAF9F6;
    --bg-input: #FFFFFF;
    --bg-hover: #E8E2D6;
    --bg-active: #D4C5B0;
    --bg-surface: #FFFFFF;
    --text-primary: #2D2319;
    --text-secondary: #5C4A3A;
    --text-muted: #8B7355;
    --accent: #C4621A;
    --accent-hover: #A8510F;
    --green: #2D7D46;
    --red: #C0392B;
    --yellow: #B8860B;
    --orange: #D97706;
    --blue: #2563EB;
    --mauve: #7C3AED;
    --teal: #0D9488;
    --border: #D4C5B0;
    --border-light: #C4B5A0;
    --msg-user-bg: #C4621A;
    --msg-user-text: #FFFFFF;
    --msg-assistant-bg: #FFFFFF;
    --msg-assistant-border: #D4C5B0;
    --msg-tool-bg: rgba(124, 58, 237, 0.08);
    --msg-tool-border: rgba(124, 58, 237, 0.25);
    --msg-error-bg: rgba(192, 57, 43, 0.08);
    --msg-error-border: rgba(192, 57, 43, 0.25);
    --code-bg: #F5F0E8;
    --code-inline-bg: #EDE8DB;
    --shadow: 0 2px 10px rgba(45, 35, 25, 0.08);
    --radius: 10px;
    --radius-sm: 6px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', 'Consolas', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sidebar-width: 280px;
}

/* ─── Warm Dark Theme ────────────────────────────────────── */
[data-theme="dark"] {
    --bg-primary: #1a1510;
    --bg-secondary: #231e17;
    --bg-tertiary: #16120d;
    --bg-chat: #1a1510;
    --bg-input: #2d2620;
    --bg-hover: #3a3228;
    --bg-active: #4a3f33;
    --bg-surface: #2d2620;
    --text-primary: #f5f0eb;
    --text-secondary: #b5a898;
    --text-muted: #7d7068;
    --accent: #e8853d;
    --accent-hover: #d4752f;
    --green: #6bc96b;
    --red: #e85d5d;
    --yellow: #e8c45d;
    --orange: #e8a35d;
    --blue: #5d9de8;
    --mauve: #b87de8;
    --teal: #5dc4b8;
    --border: #3a3228;
    --border-light: #4a3f33;
    --msg-user-bg: #e8853d;
    --msg-user-text: #1a1510;
    --msg-assistant-bg: #2d2620;
    --msg-assistant-border: #3a3228;
    --msg-tool-bg: rgba(184, 125, 232, 0.12);
    --msg-tool-border: rgba(184, 125, 232, 0.3);
    --msg-error-bg: rgba(232, 93, 93, 0.12);
    --msg-error-border: rgba(232, 93, 93, 0.3);
    --code-bg: #16120d;
    --code-inline-bg: #231e17;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ─── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    transition: background var(--transition), color var(--transition);
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-active); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── App Container ──────────────────────────────────────── */
.app-container { display: flex; height: 100vh; height: calc(var(--vh, 100vh)); width: 100%; }

/* ─── Left Sidebar ───────────────────────────────────────── */
.sidebar-left {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    width: var(--sidebar-width);
    max-width: 85vw;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform var(--transition), background var(--transition);
    will-change: transform;
    overflow: hidden;
}
.sidebar-left.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
}
.sidebar-header {
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-header-actions {
    display: flex; gap: 6px; align-items: center;
}
.sidebar-header h2 { font-size: 18px; color: var(--accent); font-weight: 600; letter-spacing: -0.3px; }
.sidebar-header button, .icon-btn {
    background: none; border: 1px solid var(--border); color: var(--text-primary);
    cursor: pointer; padding: 6px 10px; border-radius: var(--radius-sm); font-size: 16px;
    transition: all var(--transition); display: flex; align-items: center; justify-content: center;
}
.sidebar-header button:hover, .icon-btn:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--accent); }

.conv-list { flex: 1; overflow-y: auto; padding: 8px; }
.conv-empty { text-align: center; color: var(--text-muted); padding: 40px 16px; font-size: 14px; }
.conv-item {
    padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer;
    transition: all var(--transition); margin-bottom: 2px;
    display: flex; justify-content: space-between; align-items: center;
}
.conv-item:hover { background: var(--bg-hover); }
.conv-item.active { background: var(--bg-surface); border-left: 3px solid var(--accent); color: var(--accent); }
.conv-item-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.conv-item-delete { opacity: 0; background: none; border: none; color: var(--red); cursor: pointer; font-size: 14px; padding: 2px 4px; transition: opacity 0.15s; }
.conv-item:hover .conv-item-delete { opacity: 1; }

/* ── Conversation Context Menu (Right-Click) ── */
.conv-ctx-menu {
    position: fixed; z-index: 2000;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 150px; padding: 4px 0; font-size: 13px;
}
.conv-ctx-item {
    padding: 8px 16px; cursor: pointer; transition: background 0.1s;
    display: flex; align-items: center; gap: 8px;
}
.conv-ctx-item:hover { background: var(--bg-hover); }
.conv-rename-input {
    font-size: 13px;
}

.sidebar-footer { padding: 8px 10px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px; }
.sidebar-footer button {
    flex: 1 1 calc(50% - 6px); min-width: 0; background: var(--bg-tertiary); border: 1px solid var(--border);
    color: var(--text-secondary); padding: 6px 4px; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 12px; transition: all var(--transition);
    display: flex; align-items: center; justify-content: center; gap: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-footer button:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.sidebar-footer .sf-icon { font-size: 14px; flex-shrink: 0; }
.sidebar-footer .sf-text { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }

/* ─── Sidebar Close Button ──────────────────────────────── */
.sidebar-close-btn {
    width: 30px; height: 30px;
    border: none; background: none;
    color: var(--text-secondary);
    font-size: 18px; cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.sidebar-close-btn:hover { color: var(--accent); background: var(--bg-hover); }

/* ─── Sidebar Overlay Backdrop ─────────────────────────── */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150; /* Below sidebar (200), above main content */
    transition: opacity var(--transition);
}
.sidebar-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ─── Chat Main ──────────────────────────────────────────── */
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg-chat); transition: background var(--transition); width: 100%; }
.chat-header {
    padding: 12px 16px; display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid var(--border); background: var(--bg-secondary); transition: background var(--transition);
}
.chat-header h3 { flex: 1; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.chat-header-actions { display: flex; align-items: center; gap: 4px; }
.chat-header-actions button, .header-icon-btn {
    background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 16px;
    padding: 4px; border-radius: var(--radius-sm); transition: all var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.chat-header-actions button:hover, .header-icon-btn:hover { color: var(--accent); }

/* ─── Theme Toggle Button ────────────────────────────────── */
.btn-theme {
    background: none; border: 1px solid var(--border); color: var(--text-secondary);
    cursor: pointer; width: 34px; height: 34px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition); padding: 0;
}
.btn-theme:hover { background: var(--bg-hover); color: var(--accent); border-color: var(--accent); }
.btn-theme svg { width: 18px; height: 18px; }

/* ─── Panel View (desktop: replaces chat area) ───────────── */
.panel-view { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.panel-view:not(.hidden) { display: flex; }
.panel-header { padding: 12px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); background: var(--bg-secondary); flex-shrink: 0; }
.panel-header h3 { flex: 1; font-size: 15px; font-weight: 500; color: var(--text-primary); }
.panel-body { flex: 1; overflow-y: auto; padding: 16px; }
.panel-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.chat-main.panel-open .chat-messages,
.chat-main.panel-open .chat-input-area { display: none; }
#btn-close-panel { font-size: 18px; }

/* ─── Chat Messages ──────────────────────────────────────── */
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; scroll-behavior: smooth; display: flex; flex-direction: column; gap: 8px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); }
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state h2 { font-size: 24px; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p { font-size: 14px; }

/* ─── Message Bubbles ────────────────────────────────────── */
.chat-msg {
    padding: 10px 14px; border-radius: var(--radius); font-size: 14px; line-height: 1.6;
    max-width: 85%; word-break: break-word; animation: msgFadeIn 0.3s ease; transition: background var(--transition);
}
@keyframes msgFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.chat-msg.user { align-self: flex-end; background: var(--msg-user-bg); color: var(--msg-user-text); border-bottom-right-radius: 4px; }
.chat-msg.assistant { align-self: flex-start; background: var(--msg-assistant-bg); color: var(--text-primary); border: 1px solid var(--msg-assistant-border); border-bottom-left-radius: 4px; }
.chat-msg.assistant.chat-streaming { border-left: 3px solid var(--accent); }
.chat-msg.tool { align-self: flex-start; background: var(--msg-tool-bg); border: 1px solid var(--msg-tool-border); color: var(--text-secondary); font-size: 13px; border-radius: var(--radius-sm); max-width: 90%; }
.chat-msg.error { align-self: flex-start; background: var(--msg-error-bg); border: 1px solid var(--msg-error-border); color: var(--red); font-size: 13px; border-radius: var(--radius-sm); max-width: 90%; }

.msg-role { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.msg-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.chat-msg.user .msg-time { color: rgba(255,255,255,0.6); }
[data-theme="dark"] .chat-msg.user .msg-time { color: rgba(0,0,0,0.5); }

.msg-content { line-height: 1.7; word-wrap: break-word; }
.msg-content p { margin-bottom: 8px; }
.msg-content pre { background: var(--code-bg); padding: 12px; border-radius: var(--radius-sm); overflow-x: auto; margin: 8px 0; border: 1px solid var(--border); }
.msg-content code { font-family: var(--font-mono); font-size: 13px; }
.msg-content :not(pre) > code { background: var(--code-inline-bg); padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.msg-content a { color: var(--accent); text-decoration: none; }
.msg-content a:hover { text-decoration: underline; }
.msg-content table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.msg-content th, .msg-content td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.msg-content th { background: var(--bg-tertiary); font-weight: 600; }
.msg-content blockquote { border-left: 3px solid var(--accent); padding-left: 12px; color: var(--text-secondary); margin: 8px 0; background: var(--bg-tertiary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 8px 12px; }
.msg-content h1, .msg-content h2, .msg-content h3 { margin: 12px 0 6px; color: var(--accent); }
.msg-content ul, .msg-content ol { padding-left: 20px; margin: 8px 0; }
.msg-content li { margin-bottom: 4px; }
.msg-content hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.msg-content img { max-width: 100%; border-radius: var(--radius-sm); }

/* ─── Tool Call Display ──────────────────────────────────── */
.tool-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tool-name { font-weight: 600; color: var(--mauve); font-size: 12px; }
.tool-spinner { animation: spin 1s linear infinite; color: var(--accent); }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.tool-status.tool-ok { color: var(--green); }
.tool-status.tool-fail { color: var(--red); }
.tool-args { color: var(--text-secondary); font-size: 12px; margin-bottom: 4px; font-family: var(--font-mono); white-space: pre-wrap; word-break: break-all; }
.tool-result { color: var(--text-secondary); font-size: 12px; font-family: var(--font-mono); }
.tool-result pre { margin: 0; white-space: pre-wrap; word-break: break-all; font-size: 11px; line-height: 1.4; }
.tool-result-preview { color: var(--text-muted); }
.tool-result-full { max-height: 400px; overflow-y: auto; }
.tool-toggle-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 11px; padding: 4px 0; margin-top: 2px; display: block; }
.tool-toggle-btn:hover { text-decoration: underline; }

.code-block-wrapper { position: relative; }
.code-copy-btn { position: absolute; top: 6px; right: 6px; background: var(--bg-hover); border: none; color: var(--text-secondary); padding: 4px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 12px; transition: all var(--transition); }
.code-copy-btn:hover { background: var(--accent); color: #fff; }
.code-lang { position: absolute; top: 6px; left: 10px; font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-family: var(--font-mono); }

/* ─── Chat Input ─────────────────────────────────────────── */
.chat-input-area { padding: 12px 16px; background: var(--bg-secondary); border-top: 1px solid var(--border); transition: background var(--transition); }
#chat-stop-row { margin-bottom: 8px; text-align: center; }
#chat-stop-row.hidden { display: none; }
.btn-stop { background: var(--red); color: #fff; border: none; padding: 8px 24px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; font-weight: 500; transition: all var(--transition); }
.btn-stop:hover { opacity: 0.85; }

.chat-input-row-top { display: flex; gap: 4px; align-items: center; margin-bottom: 6px; }
.chat-input-row-bottom { display: flex; gap: 6px; align-items: center; }
.btn-icon-input {
    background: none; border: 1px solid var(--border); color: var(--text-secondary);
    cursor: pointer; padding: 6px 8px; border-radius: var(--radius-sm); font-size: 17px;
    transition: all var(--transition); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; line-height: 1;
}
.btn-icon-input:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--accent); }
#chat-input { flex: 1; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-primary); padding: 8px 10px; border-radius: 18px; font-size: 14px; font-family: inherit; resize: none; max-height: 120px; line-height: 1.5; transition: border-color var(--transition), background var(--transition); min-width: 0; }
#chat-input:focus { outline: none; border-color: var(--accent); }
#chat-input::placeholder { color: var(--text-muted); }

.btn-send { background: var(--accent); color: #fff; border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 16px; transition: all var(--transition); display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; }
.btn-send:hover { background: var(--accent-hover); transform: scale(1.05); }
.btn-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

#chat-model-select { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-primary); padding: 4px 6px; border-radius: var(--radius-sm); font-size: 12px; cursor: pointer; font-family: var(--font-mono); transition: background var(--transition); flex-shrink: 0; max-width: 120px; }

/* ─── Dialogs ────────────────────────────────────────────── */
.dialog-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 100; }
.dialog-overlay.hidden { display: none; }
[data-theme="claude"] .dialog-overlay, :root .dialog-overlay { background: rgba(45, 35, 25, 0.3); }
.dialog { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); width: 90%; max-width: 620px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.dialog-header h3 { font-size: 16px; color: var(--text-primary); }
.dialog-close { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 18px; padding: 4px; border-radius: var(--radius-sm); transition: color var(--transition); }
.dialog-close:hover { color: var(--red); }
.dialog-body { flex: 1; overflow-y: auto; padding: 16px; }
.dialog-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

.model-card { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; }
.model-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.model-card-title { font-weight: 600; font-size: 14px; color: var(--accent); }
.model-card-actions { display: flex; align-items: center; gap: 6px; }
.model-card-remove { background: none; border: none; color: var(--red); cursor: pointer; font-size: 14px; }
.form-group { margin-bottom: 8px; }
.form-group label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.form-group input, .form-group select { width: 100%; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-primary); padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; transition: border-color var(--transition); }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent); }
.form-row { display: flex; gap: 8px; }
.form-row .form-group { flex: 1; }

.btn-primary { background: var(--accent); color: #fff; border: none; padding: 8px 20px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; font-weight: 500; transition: all var(--transition); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border); padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; transition: all var(--transition); }
.btn-secondary:hover { background: var(--bg-hover); }

/* ─── Model Test Button (ported from IDE) ─────────────────── */
.llm-test-model-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition);
    line-height: 1;
}
.llm-test-model-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.llm-test-model-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Reasoning Checkbox (ported from IDE) ─────────────────── */
.llm-extras-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
    flex-wrap: wrap;
}

.llm-reasoning-label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.llm-reasoning-label > span:first-child {
    white-space: nowrap;
    font-size: 12px;
    color: var(--text-secondary);
}
.llm-reasoning-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: 0.15s;
    flex-shrink: 0;
}
.llm-reasoning-label input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.llm-reasoning-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.llm-reasoning-label input[type="checkbox"]:hover {
    border-color: var(--accent);
}

/* ─── Modalities Row (ported from IDE) ────────────────────── */
.llm-modalities-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.llm-modalities-row > span:first-child {
    white-space: nowrap;
    font-size: 12px;
    color: var(--text-secondary);
}
.llm-modality-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background var(--transition);
    font-size: 12px;
}
.llm-modality-label:hover {
    background: var(--bg-hover);
}
.llm-modality-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: 0.15s;
    flex-shrink: 0;
}
.llm-modality-label input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.llm-modality-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.llm-modality-label input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.llm-modality-label input[type="checkbox"]:hover:not(:disabled) {
    border-color: var(--accent);
}
.llm-modality-label span {
    color: var(--text-primary);
    font-size: 12px;
    transition: color 0.15s;
}
.llm-modality-label input[type="checkbox"]:not(:checked) + span {
    color: var(--text-muted);
}

/* ─── Toast ──────────────────────────────────────────────── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--bg-surface); color: var(--text-primary); padding: 10px 24px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); z-index: 200; font-size: 14px; transition: opacity 0.3s; max-width: 80%; text-align: center; }
.toast.hidden { display: none; }
.toast.error { border-color: var(--red); color: var(--red); }
.toast.success { border-color: var(--green); color: var(--green); }

/* ─── Typing Indicator ───────────────────────────────────── */
.chat-typing { align-self: flex-start; padding: 8px 12px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-muted); font-size: 13px; }
.chat-typing::after { content: '...'; animation: typing 1s infinite; }
@keyframes typing { 0%, 20% { content: '.'; } 40% { content: '..'; } 60%, 100% { content: '...'; } }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Sidebar is always overlay on mobile (base styles handle it) */
    /* Just ensure compact header */
    .sidebar-header { padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }

    /* Chat header: compact */
    .chat-header { padding: 8px 10px; gap: 8px; }
    .chat-header h3 { font-size: 14px; }
    .btn-theme { width: 30px; height: 30px; }
    .btn-theme svg { width: 16px; height: 16px; }
    .btn-tts-toggle { width: 30px; height: 30px; }
    .btn-tts-toggle svg { width: 16px; height: 16px; }

    /* Chat input area: compact padding */
    .chat-input-area { padding: 8px 10px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }

    /* Input row: two-row layout on mobile */
    .chat-input-row-top { gap: 3px; margin-bottom: 4px; }
    .chat-input-row-bottom { gap: 4px; }
    .btn-icon-input { padding: 5px 6px; font-size: 15px; }
    #chat-model-select { max-width: 80px; font-size: 11px; padding: 3px 4px; }
    #chat-input { padding: 7px 10px; font-size: 16px; }
    .btn-send { width: 34px; height: 34px; font-size: 15px; }

    /* Messages */
    .chat-msg { max-width: 95%; font-size: 14px; padding: 8px 12px; }
    .chat-messages { padding: 10px; }
    .empty-icon { font-size: 48px; }
    .empty-state h2 { font-size: 20px; }

    /* Stop button */
    .btn-stop { padding: 6px 18px; font-size: 13px; }

    /* Attachment preview */
    .attachment-preview { padding: 6px 0; }
    .attachment-thumb { width: 36px; height: 36px; }

    /* Dialogs: full screen on mobile */
    .dialog { width: 96%; max-width: none; max-height: 90vh; border-radius: var(--radius-sm); }
    .dialog-header { padding: 12px; }
    .dialog-body { padding: 12px; }
    .dialog-footer { padding: 10px 12px; }

    /* LLM extras row */
    .llm-extras-row { flex-direction: column; align-items: flex-start; gap: 8px; }

    /* Workflow/alarm sub-modal */
    .wf-sub-modal { width: 96%; max-width: none; padding: 14px; }

    /* Workflow stats: 2 columns on mobile */
    .wf-stats { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .wf-stat { padding: 8px; }
    .wf-stat-value { font-size: 16px; }
    .wf-stat-label { font-size: 10px; }

    /* Alarm cards: full width, compact */
    .alarm-card-label { font-size: 13px; }
    .alarm-card-row { font-size: 11px; }
    .alarm-card-header { padding: 8px 10px; }
    .alarm-card-body { padding: 6px 10px; }
    .alarm-card-actions { padding: 6px 10px; gap: 6px; }
    .alarm-card-icon { width: 24px; height: 24px; font-size: 12px; }

    /* Workflow card actions: stack on mobile */
    .wf-card-actions { gap: 4px; flex-wrap: wrap; }
    .wf-card-actions .btn-sm { padding: 3px 6px; font-size: 11px; }
    .wf-step-main { flex-wrap: wrap; }
    .wf-step-actions { justify-content: flex-start; }

    /* Sub-modal on mobile: nearly full screen */
    .wf-sub-modal { width: 96%; max-width: none; padding: 14px; max-height: 90vh; }
    .wf-sub-modal h3 { font-size: 15px; margin-bottom: 12px; }

    /* Workflow form inputs on mobile */
    .wf-sub-modal .form-group input,
    .wf-sub-modal .form-group select,
    .wf-sub-modal .form-group textarea { font-size: 16px; }

    /* Always show message actions on mobile (hover not available) */
    .msg-actions { opacity: 1; }

    /* Prevent iOS zoom on input focus */
    #chat-input, #chat-model-select { font-size: 16px; }
}

/* ─── Highlight.js Theme Overrides ───────────────────────── */
.hljs { background: var(--code-bg) !important; color: var(--text-primary) !important; }
[data-theme="dark"] .hljs { background: var(--code-bg) !important; }

/* ─── Smooth theme transition for all elements ───────────── */
.app-container, .sidebar-left, .chat-main, .chat-header, .chat-input-area, .chat-msg, .dialog, .toast, .conv-item, .btn-send, .btn-stop, #chat-input, #chat-model-select {
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}


/* ── Dialog ── */
.dialog { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.dialog.hidden { display: none; }
.dialog-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.dialog-content { position: relative; background: var(--bg-primary); border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.3); width: 90%; overflow: hidden; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.dialog-header h3 { margin: 0; }
.dialog-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted); padding: 0 4px; }
.dialog-close:hover { color: var(--text-primary); }
.dialog-body { padding: 16px 20px; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); }

/* ── TTS Toggle Button (header) ── */
.btn-tts-toggle {
    background: none; border: 1px solid var(--border); color: var(--text-muted);
    cursor: pointer; width: 34px; height: 34px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition); padding: 0; position: relative;
}
.btn-tts-toggle svg { width: 18px; height: 18px; }
.btn-tts-toggle:hover { background: var(--bg-hover); color: var(--text-secondary); border-color: var(--accent); }
.btn-tts-toggle.active { color: var(--accent); border-color: var(--accent); background: var(--bg-hover); }
.btn-tts-toggle.active svg { stroke: var(--accent); }

/* ── Message Actions Row (copy + read) ── */
.msg-actions { display: flex; gap: 2px; margin-top: 6px; opacity: 0; transition: opacity 0.2s; }
.chat-msg:hover .msg-actions { opacity: 1; }
.msg-action-btn {
    background: none; border: 1px solid transparent; color: var(--text-muted);
    cursor: pointer; font-size: 13px; padding: 2px 6px; border-radius: 4px;
    transition: all 0.15s; display: flex; align-items: center; gap: 3px;
    line-height: 1; white-space: nowrap;
}
.msg-action-btn:hover { color: var(--accent); background: var(--bg-hover); border-color: var(--border); }
.msg-action-btn.speaking { color: var(--accent); }

/* ── Message Copy Button (legacy, kept for compat) ── */
.msg-copy-btn { position: absolute; top: 4px; right: 4px; opacity: 0; transition: opacity 0.2s; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 4px; cursor: pointer; font-size: 12px; padding: 4px 6px; z-index: 10; }
.chat-msg:hover .msg-copy-btn { opacity: 0.7; }
.msg-copy-btn:hover { opacity: 1 !important; background: var(--bg-tertiary); }

/* ── Workflow/Alarm Cards ── */
.model-card { border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 8px; }
.model-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.model-card-title { font-weight: 600; }
.model-card-actions { display: flex; gap: 4px; }

/* ── File Attachment ── */
/* btn-icon-input is used for attach/camera buttons - styles defined in chat-input section */

.attachment-preview {
    display: flex; gap: 8px; padding: 8px 0; flex-wrap: wrap; border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.attachment-item {
    position: relative; background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 4px; display: flex; align-items: center; gap: 6px;
    font-size: 12px; max-width: 140px;
}
.attachment-thumb {
    width: 48px; height: 48px; object-fit: cover; border-radius: 4px; cursor: pointer;
}
.attachment-file-icon { font-size: 18px; flex-shrink: 0; }
.attachment-name {
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--text-secondary); font-size: 11px;
}
.attachment-remove {
    position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff;
    border: none; border-radius: 50%; width: 16px; height: 16px; font-size: 10px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    line-height: 1; padding: 0;
}
.attachment-remove:hover { opacity: 0.8; }

/* ── Workflow Stats ── */
.wf-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px;
}
.wf-stat {
    background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 10px 12px; text-align: center;
}
.wf-stat-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.wf-stat-value { font-size: 20px; font-weight: 700; color: var(--text-primary); }

/* ── Badges ── */
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px;
    font-weight: 500; line-height: 1.4;
}
.badge-green { background: rgba(45, 125, 70, 0.15); color: var(--green); }
.badge-red { background: rgba(192, 57, 43, 0.15); color: var(--red); }
.badge-blue { background: rgba(37, 99, 235, 0.15); color: var(--blue); }
.badge-yellow { background: rgba(184, 134, 11, 0.15); color: var(--yellow); }
.badge-teal { background: rgba(13, 148, 136, 0.15); color: var(--teal); }
.badge-mauve { background: rgba(124, 58, 237, 0.15); color: var(--mauve); }

/* ── Tag (inline label for workflow cards) ── */
.tag {
    display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px;
    background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border);
    white-space: nowrap;
}

/* ── Workflow/Alarm Sub-modal ── */
.wf-sub-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1001;
    display: flex; align-items: center; justify-content: center;
}
.wf-sub-modal {
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius);
    width: 90%; max-width: 680px; max-height: 85vh; overflow-y: auto; padding: 20px;
    box-shadow: var(--shadow);
}
.wf-sub-modal h3 { margin-bottom: 16px; color: var(--accent); }

/* ── Alarm Table ── */
.alarm-table {
    width: 100%; border-collapse: collapse; font-size: 12px;
}
.alarm-table th, .alarm-table td {
    border: 1px solid var(--border); padding: 6px 8px; text-align: left;
}
.alarm-table th {
    background: var(--bg-tertiary); font-weight: 600; font-size: 11px;
    color: var(--text-secondary); white-space: nowrap;
}
.alarm-table td { vertical-align: middle; }
.table-wrap { overflow-x: auto; }

/* ── Alarm Cards (mobile-friendly) ── */
.alarm-cards {
    display: flex; flex-direction: column; gap: 10px;
}
.alarm-card {
    background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); overflow: hidden;
    transition: border-color 0.2s;
}
.alarm-card:hover { border-color: var(--accent); }
.alarm-card-paused { opacity: 0.7; }
.alarm-card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.alarm-card-title {
    display: flex; align-items: center; gap: 8px;
}
.alarm-card-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 6px; font-size: 14px;
}
.alarm-card-label {
    font-weight: 600; font-size: 14px; color: var(--text-primary);
}
.alarm-card-body {
    padding: 8px 12px;
}
.alarm-card-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 0; font-size: 12px;
}
.alarm-card-row + .alarm-card-row { border-top: 1px solid var(--border); }
.alarm-card-key {
    color: var(--text-muted); white-space: nowrap; min-width: 60px;
}
.alarm-card-val {
    color: var(--text-secondary); text-align: right;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 70%;
}
.alarm-card-actions {
    display: flex; gap: 8px; padding: 8px 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

/* ── Workflow Card Actions ── */
.wf-card-actions {
    display: flex; gap: 6px; margin-top: 12px;
    flex-wrap: wrap; align-items: center;
}
.wf-more-btn { font-weight: 700; letter-spacing: 1px; }

/* ── Workflow Step Editor ── */
.wf-step-item {
    padding: 8px 12px; margin-bottom: 4px;
    border: 1px solid var(--border); border-radius: 6px;
}
.wf-step-main {
    display: flex; align-items: flex-start; gap: 8px;
}
.wf-step-num {
    flex-shrink: 0; width: 24px; text-align: center;
    font-size: 12px; color: var(--text-muted); font-weight: 600;
    line-height: 24px;
}
.wf-step-icon {
    flex-shrink: 0; width: 24px; text-align: center; font-size: 16px;
}
.wf-step-actions {
    display: flex; gap: 4px; margin-top: 6px; padding-top: 6px;
    border-top: 1px dashed var(--border);
    justify-content: flex-end;
}

/* ── Small Buttons ── */
.btn-sm {
    padding: 3px 8px; font-size: 12px; border-radius: 4px;
}
.btn-ghost {
    background: none; border: 1px solid var(--border); color: var(--text-secondary);
    cursor: pointer; transition: all var(--transition);
}
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--accent); }
.btn-danger {
    background: none; border: 1px solid var(--red); color: var(--red);
    cursor: pointer; transition: all var(--transition);
}
.btn-danger:hover { background: var(--red); color: #fff; }

/* ── Step Row ── */
.step-row {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px;
    background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); margin-bottom: 4px;
}
.step-num { font-size: 12px; color: var(--text-muted); font-weight: 600; width: 24px; text-align: center; }
.step-icon { font-size: 16px; width: 24px; text-align: center; }
.step-info { flex: 1; min-width: 0; }
.step-name { font-size: 13px; font-weight: 500; }
.step-params { font-size: 11px; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ── Skills Page ───────────────────────────────────────── */
.skills-tabs {
    display: flex; gap: 0; margin-bottom: 16px;
    border-bottom: 2px solid var(--border); overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.skills-tab {
    padding: 10px 20px; cursor: pointer; font-size: 14px; font-weight: 600;
    border-bottom: 2px solid transparent; color: var(--text-secondary);
    margin-bottom: -2px; white-space: nowrap; transition: all 0.2s;
    flex-shrink: 0;
}
.skills-tab:hover { color: var(--accent); }
.skills-tab-active {
    border-bottom-color: var(--accent); color: var(--accent);
}

.skills-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; flex-wrap: wrap; gap: 8px;
}
.skills-summary { color: var(--text-secondary); font-size: 13px; }
.skills-search {
    width: 200px; padding: 6px 10px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--bg-input);
    color: var(--text-primary); font-size: 13px;
}
.skills-search:focus { outline: none; border-color: var(--accent); }

.skills-section {
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; margin-bottom: 16px;
}
.skills-section-header {
    padding: 12px 16px; display: flex; align-items: center; gap: 8px;
    background: var(--bg-tertiary); border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.skills-section-header strong { font-size: 14px; }
.skills-section-hint {
    font-size: 11px; color: var(--text-muted); margin-left: auto;
}
.skills-cat-label {
    padding: 8px 16px 4px; font-size: 12px; color: var(--text-muted);
    font-weight: 600;
}

.skill-row {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    border-bottom: 1px solid var(--border); transition: background 0.15s;
}
.skill-row:last-child { border-bottom: none; }
.skill-row:hover { background: var(--bg-hover); }
.skill-row-indent { padding-left: 48px; }

.skill-icon {
    flex-shrink: 0; width: 32px; text-align: center; font-size: 16px;
}
.skill-info { flex: 1; min-width: 0; }
.skill-name { font-size: 13px; font-weight: 500; }
.skill-desc {
    font-size: 12px; color: var(--text-muted); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.skill-actions {
    display: flex; gap: 6px; align-items: center; flex-shrink: 0;
}
.skill-cli-cmd {
    font-size: 11px; color: var(--accent); background: var(--bg-tertiary);
    padding: 2px 6px; border-radius: 3px;
}

/* Toggle switch for skills */
.toggle-switch {
    position: relative; display: inline-block; width: 36px; height: 20px;
    cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border); border-radius: 20px; transition: 0.3s;
}
.toggle-knob {
    position: absolute; height: 16px; width: 16px; left: 2px; bottom: 2px;
    background: white; border-radius: 50%; transition: 0.3s;
    pointer-events: none;
}
.toggle-slider.toggle-on { background: var(--green); }
.toggle-on + .toggle-knob { left: 18px; }
.knob-on { left: 18px; }

/* ClawHub Market */
.market-search-row {
    margin-bottom: 16px; display: flex; align-items: center;
    gap: 12px; flex-wrap: wrap;
}
.market-search-input-wrap {
    flex: 1; min-width: 200px; display: flex; gap: 8px;
}
.market-search-input {
    flex: 1; padding: 8px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--bg-input);
    color: var(--text-primary); font-size: 13px;
}
.market-search-input:focus { outline: none; border-color: var(--accent); }
.market-sort-btns { display: flex; gap: 6px; flex-shrink: 0; }

.clawhub-result-card {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px 16px; display: flex; align-items: center; gap: 12px;
    transition: border-color 0.2s;
}
.clawhub-result-card:hover { border-color: var(--accent); }
.clawhub-missing { opacity: 0.5; }
.clawhub-result-icon {
    flex-shrink: 0; width: 36px; text-align: center; font-size: 18px;
}
.clawhub-result-info { flex: 1; min-width: 0; }
.clawhub-result-actions {
    display: flex; gap: 6px; flex-shrink: 0; align-items: center;
    flex-wrap: wrap;
}
.clawhub-version { font-size: 10px; color: var(--text-muted); }
.clawhub-meta {
    display: flex; gap: 8px; margin-top: 4px; font-size: 11px;
    color: var(--text-muted); flex-wrap: wrap;
}
.installed-header {
    margin-bottom: 12px; display: flex; align-items: center;
    justify-content: space-between;
}

/* ── Skills Mobile Responsive ──────────────────────────── */
@media (max-width: 768px) {
    .skills-tabs { gap: 0; }
    .skills-tab { padding: 8px 12px; font-size: 13px; }
    .skills-header { flex-direction: column; align-items: stretch; }
    .skills-search { width: 100%; }
    .skills-section-hint { display: none; }

    .skill-row {
        flex-wrap: wrap; gap: 8px; padding: 10px 12px;
    }
    .skill-icon { width: 24px; font-size: 14px; }
    .skill-desc {
        white-space: normal; overflow: visible;
        text-overflow: unset;
    }
    .skill-row-indent { padding-left: 12px; }
    .skill-actions {
        width: 100%; justify-content: flex-end; padding-top: 4px;
        border-top: 1px dashed var(--border); margin-top: 4px;
    }

    .market-search-row { flex-direction: column; align-items: stretch; }
    .market-search-input-wrap { min-width: 0; }
    .market-sort-btns { justify-content: center; }

    .clawhub-result-card { flex-wrap: wrap; padding: 10px 12px; }
    .clawhub-result-icon { width: 28px; font-size: 16px; }
    .clawhub-result-info { min-width: 0; flex: 1 1 calc(100% - 40px); }
    .clawhub-result-actions {
        width: 100%; justify-content: flex-end;
        padding-top: 4px; border-top: 1px dashed var(--border);
        margin-top: 4px;
    }
    .clawhub-meta { flex-wrap: wrap; }
}


/* ── Settings Gear Dropdown ── */
.settings-gear-wrap {
    position: relative;
}
.settings-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}
.settings-dropdown.show {
    display: block;
    animation: dropdownFadeIn 0.15s ease;
}
@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.settings-dropdown-section {
    padding: 4px 0;
}
.settings-dropdown-label {
    padding: 6px 14px 4px;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.settings-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}
.settings-dropdown-item:hover {
    background: var(--bg-tertiary);
}
.settings-dropdown-item-danger {
    color: var(--red);
}
.settings-dropdown-item-danger:hover {
    background: rgba(239,68,68,0.08);
}
.settings-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}
