/* ═══════════════════════════════════════════════════════
   CREATIVE YADLEY — ANTIGRAVITY IDE THEME & WORKBENCH
   Dark VS Code / Antigravity Aesthetic:
   Canvas: #181818 / #1e1e1e / #252526 / #2d2d2d
   Activity Bar: #141414
   Accent: #AFE139 (Creative Yadley Lime)
   Full-Rounded Buttons: 9999px
   White Client Tree Icons: #FFFFFF
   Typography: Bebas Neue (Headers), Nunito Sans (UI), JetBrains Mono (Code/Tabs)
   ═══════════════════════════════════════════════════════ */

:root {
    --ide-bg-app: #121316;
    --ide-bg-sidebar: #17181e;
    --ide-bg-editor: #121316;
    --ide-bg-activity: #0e0f12;
    --ide-bg-titlebar: #0e0f12;
    --ide-bg-panel: #1a1b22;
    --ide-bg-input: #1f2129;
    --ide-bg-hover: rgba(255, 255, 255, 0.08);
    --ide-bg-active: #242732;
    --ide-bg-tab-active: #121316;
    --ide-bg-tab-inactive: #0e0f12;

    --ide-border: #272a36;
    --ide-border-subtle: rgba(255, 255, 255, 0.09);

    --color-accent: #A3E635; /* Creative Yadley Vivid Lime */
    --color-accent-hover: #BEF264;
    --color-accent-muted: rgba(163, 230, 53, 0.16);
    --color-ide-blue: #0ea5e9;

    --color-text-primary: #e2e8f0; /* Crisp slate-200 */
    --color-text-bright: #ffffff;
    --color-text-muted: #94a3b8; /* Slate-400 */
    --color-text-dim: #64748b;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px; /* Creative Yadley Standard Full-Rounded */
}

/* ═══════════════════════════════════════════════════════
   LIGHT THEME DESIGN SYSTEM (PROFESSIONAL & ACCESSIBLE)
   ═══════════════════════════════════════════════════════ */
body.light-theme,
body[data-theme="light"] {
    --ide-bg-app: #f1f5f9;
    --ide-bg-sidebar: #f8fafc;
    --ide-bg-editor: #ffffff;
    --ide-bg-activity: #e2e8f0;
    --ide-bg-titlebar: #ffffff;
    --ide-bg-panel: #f8fafc;
    --ide-bg-input: #ffffff;
    --ide-bg-hover: rgba(0, 0, 0, 0.05);
    --ide-bg-active: #e2e8f0;
    --ide-bg-tab-active: #ffffff;
    --ide-bg-tab-inactive: #f1f5f9;

    --ide-border: #cbd5e1;
    --ide-border-subtle: rgba(0, 0, 0, 0.08);

    --color-accent: #65a30d; /* High-contrast accessible Lime */
    --color-accent-hover: #4d7c0f;
    --color-accent-muted: rgba(101, 163, 13, 0.14);
    --color-ide-blue: #0284c7;

    --color-text-primary: #1e293b;
    --color-text-bright: #0f172a;
    --color-text-muted: #64748b;
    --color-text-dim: #94a3b8;
}

body.light-theme .ide-titlebar {
    background: #ffffff;
    border-bottom: 1px solid var(--ide-border);
}

body.light-theme .ide-app-title {
    color: #0f172a;
}

body.light-theme .titlebar-menu > span,
body[data-theme="light"] .titlebar-menu > span {
    color: #334155;
    font-weight: 600;
}

body.light-theme .titlebar-menu > span:hover,
body[data-theme="light"] .titlebar-menu > span:hover {
    color: #0f172a;
    background: #e2e8f0;
}

body.light-theme .menu-badge.badge-warning {
    background: #f59e0b;
    color: #0f172a;
    font-weight: 800;
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.35);
}

body.light-theme .command-palette-input {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-theme .command-palette-input:focus-within {
    border-color: #0f172a;
    box-shadow: 0 0 0 1px #0f172a;
}

body.light-theme .command-palette-input input {
    color: #0f172a;
    font-weight: 500;
}

body.light-theme .command-palette-input input::placeholder {
    color: #64748b;
}

body.light-theme .cmd-icon {
    color: #475569;
}

body.light-theme .cmd-kbd {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    font-weight: 600;
}

body.light-theme .titlebar-btn {
    color: #475569;
}

body.light-theme .titlebar-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

body.light-theme .titlebar-lock-btn {
    background: #e2e8f0;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    font-weight: 600;
}

body.light-theme .ide-activity-bar {
    background: #f1f5f9;
    border-right: 1px solid var(--ide-border);
}

body.light-theme .activity-btn {
    color: var(--color-text-muted);
}

body.light-theme .activity-btn:hover {
    color: var(--color-text-bright);
}

body.light-theme .activity-btn.active {
    color: var(--color-accent);
}

body.light-theme .ide-sidebar {
    background: #f8fafc;
    border-right: 1px solid var(--ide-border);
}

body.light-theme .sidebar-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--ide-border);
}

body.light-theme .sidebar-search-box {
    background: #ffffff;
    border: 1px solid var(--ide-border);
}

body.light-theme .sidebar-search-box input {
    color: var(--color-text-bright);
}

body.light-theme .sidebar-filter-btn {
    color: var(--color-text-muted);
}

body.light-theme .sidebar-filter-btn.active {
    background: #e2e8f0;
    color: var(--color-text-bright);
}

body.light-theme .client-tree-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

body.light-theme .client-tree-item.active {
    background: #e2e8f0;
}

body.light-theme .client-tree-title {
    color: #0f172a;
    font-weight: 600;
}

body.light-theme .client-tree-sub {
    color: #475569;
}

body.light-theme .tree-chevron {
    color: #64748b;
}

body.light-theme .client-tree-icon {
    background: #0f172a !important;
    color: #ffffff !important;
    border: 1px solid #1e293b !important;
    font-weight: 800 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
}

body.light-theme .client-tree-item:hover .client-tree-icon,
body.light-theme .client-tree-item.active .client-tree-icon {
    background: var(--color-accent) !important;
    color: #0b0f02 !important;
    border-color: var(--color-accent) !important;
}

body.light-theme .client-tickets-sublist {
    background: rgba(0, 0, 0, 0.02);
    border-left: 1px solid var(--ide-border);
}

body.light-theme .ticket-sub-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

body.light-theme .ticket-sub-item.active {
    background: #e2e8f0;
}

body.light-theme .ticket-sub-subject {
    color: var(--color-text-bright);
}

body.light-theme .ide-editor-area {
    background: #ffffff;
}

body.light-theme .editor-tabs-bar {
    background: #f1f5f9;
    border-bottom: 1px solid var(--ide-border);
}

body.light-theme .editor-tab {
    background: #f1f5f9;
    color: #475569;
    border-right: 1px solid var(--ide-border);
    font-weight: 500;
}

body.light-theme .editor-tab.active {
    background: #ffffff;
    color: #0f172a;
    border-top: 2px solid var(--color-accent);
    font-weight: 600;
}

body.light-theme .tab-nav-group {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
}

body.light-theme .tab-nav-btn {
    color: #1e293b !important;
}

body.light-theme .tab-nav-btn svg {
    stroke: #1e293b !important;
}

body.light-theme .tab-nav-btn:hover:not(:disabled):not(.nav-inactive) {
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .tab-nav-btn:disabled,
body.light-theme .tab-nav-btn.nav-inactive {
    opacity: 0.55 !important;
    color: #64748b !important;
}

body.light-theme .tab-nav-btn:disabled svg,
body.light-theme .tab-nav-btn.nav-inactive svg {
    stroke: #64748b !important;
}

body.light-theme .tab-action-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-weight: 500;
}

body.light-theme .tab-action-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

body.light-theme .editor-breadcrumbs {
    background: #f8fafc;
    border-bottom: 1px solid var(--ide-border);
}

body.light-theme .crumb-root {
    color: #64748b;
}

body.light-theme .crumb-sep {
    color: #94a3b8;
}

body.light-theme .crumb-client {
    color: #0f172a;
    font-weight: 600;
}

body.light-theme .conversation-card {
    background: #ffffff;
    border: 1px solid var(--ide-border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

body.light-theme .conversation-card.staff-card {
    background: #fcfdf8;
    border: 1px solid rgba(101, 163, 13, 0.35);
}

body.light-theme .conversation-header {
    border-bottom: 1px solid var(--ide-border-subtle);
}

body.light-theme .conversation-body {
    color: #334155;
}

body.light-theme .composer-card {
    background: #ffffff;
    border-top: 1px solid var(--ide-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
}

body.light-theme .composer-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--ide-border);
}

body.light-theme .wysiwyg-toolbar {
    background: #f8fafc;
    border-bottom: 1px solid var(--ide-border);
}

body.light-theme .wysiwyg-btn {
    color: var(--color-text-muted);
}

body.light-theme .wysiwyg-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-text-bright);
}

body.light-theme .wysiwyg-editor-surface {
    background: #ffffff;
    color: var(--color-text-primary);
}

body.light-theme .wysiwyg-editor-surface strong,
body.light-theme .wysiwyg-editor-surface b,
body.light-theme .wysiwyg-editor-surface h1,
body.light-theme .wysiwyg-editor-surface h2,
body.light-theme .wysiwyg-editor-surface h3 {
    color: #0f172a !important;
}

body.light-theme .wysiwyg-editor-surface em,
body.light-theme .wysiwyg-editor-surface i {
    color: #1e293b !important;
}

body.light-theme .wysiwyg-editor-surface blockquote {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border-left-color: #10b981 !important;
}

body.light-theme .wysiwyg-raw-textarea {
    background: #ffffff;
    color: var(--color-text-primary);
}

body.light-theme .composer-footer {
    background: #f8fafc;
    border-top: 1px solid var(--ide-border);
}

body.light-theme .ide-panel-right,
body.light-theme .ide-agent-panel {
    background: #f8fafc;
    border-left: 1px solid var(--ide-border);
}

body.light-theme .panel-header,
body.light-theme .agent-panel-header,
body.light-theme .panel-header-tabs {
    background: #ffffff;
    border-bottom: 1px solid #cbd5e1;
}

body.light-theme .agent-header-title {
    color: #0f172a !important;
    font-weight: 700;
}

body.light-theme .agent-tool-btn {
    color: #475569;
}

body.light-theme .agent-tool-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

body.light-theme .agent-nav-tabs {
    background: #f8fafc;
    border-bottom: 1px solid #cbd5e1;
}

body.light-theme .agent-nav-tab {
    color: #475569;
    font-weight: 600;
}

body.light-theme .agent-nav-tab:hover {
    color: #0f172a;
}

body.light-theme .agent-nav-tab.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
    font-weight: 700;
}

/* Agent Chat Stream & Empty Hero in Light Mode */
body.light-theme .agent-chat-stream {
    background: #f8fafc;
}

body.light-theme .agent-workspace-title {
    color: #0f172a !important;
    font-weight: 800;
}

body.light-theme .agent-workspace-sub {
    color: #475569 !important;
    font-weight: 500;
}

body.light-theme .hero-chip {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-theme .hero-chip:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Floating Input Capsule in Light Mode */
body.light-theme .agent-input-container {
    background: transparent !important;
    border: none !important;
}

body.light-theme .agent-input-capsule {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .agent-input-capsule:focus-within {
    border-color: #64748b !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px #64748b !important;
}

body.light-theme .agent-input-capsule textarea {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #0f172a !important;
    box-shadow: none !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

body.light-theme .agent-input-capsule textarea::placeholder {
    color: #94a3b8 !important;
}

/* Light Theme Ticket Message Card & Header Contrast */
body.light-theme .ticket-message-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}
body.light-theme .msg-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
body.light-theme .msg-avatar {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}
body.light-theme .ticket-message-card.client-msg .msg-avatar {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border-color: #bae6fd !important;
}
body.light-theme .ticket-message-card.staff-msg .msg-avatar {
    background: #ecfccb !important;
    color: #3f6212 !important;
    border-color: #d9f99d !important;
}
body.light-theme .msg-name {
    color: #0f172a !important;
}
body.light-theme .msg-role-tag.client {
    background: #e0f2fe !important;
    color: #0284c7 !important;
    border: 1px solid #bae6fd !important;
    font-weight: 700 !important;
}
body.light-theme .msg-role-tag.staff {
    background: #ecfccb !important;
    color: #365314 !important;
    border: 1px solid #bef264 !important;
    font-weight: 700 !important;
}
body.light-theme .msg-date {
    color: #64748b !important;
}
body.light-theme .msg-body {
    color: #1e293b !important;
}
body.light-theme .msg-body strong {
    color: #0f172a !important;
}
body.light-theme .msg-body .code-block {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}
body.light-theme .msg-body .inline-code {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-theme .capsule-tool-btn {
    color: #64748b;
}

body.light-theme .capsule-tool-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

body.light-theme .agent-model-pill {
    color: #1e293b;
    font-weight: 600;
}

body.light-theme .agent-model-pill:hover {
    background: #f1f5f9;
    color: #0f172a;
}

body.light-theme .agent-model-pill .chevron-icon {
    color: #64748b;
}

body.light-theme .capsule-status-pill {
    background: rgba(234, 179, 8, 0.15);
    color: #854d0e;
}

body.light-theme .capsule-send-btn {
    background: #0f172a;
    color: #ffffff;
}

body.light-theme .capsule-send-btn:hover {
    background: var(--color-accent);
    color: #0b0f02;
}

body.light-theme .model-picker-popover,
body.light-theme .context-popover-menu {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
}

body.light-theme .popover-title,
body.light-theme .context-popover-header {
    color: #64748b;
}

body.light-theme .popover-item,
body.light-theme .context-popover-item {
    color: #1e293b;
}

body.light-theme .popover-item:hover,
body.light-theme .context-popover-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

body.light-theme .popover-item.active {
    background: #e2e8f0;
    color: #0f172a;
    font-weight: 700;
}

/* Plan & Debug Tabs in Light Mode */
body.light-theme .agent-plan-hero,
body.light-theme .agent-debug-hero {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-theme .plan-hero-badge,
body.light-theme .debug-hero-badge {
    color: #0f172a;
}

body.light-theme .agent-plan-desc,
body.light-theme .agent-debug-desc {
    color: #475569;
}

body.light-theme .agent-checklist-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-theme .checklist-header,
body.light-theme .check-title {
    color: #0f172a;
}

body.light-theme .check-desc {
    color: #64748b;
}

body.light-theme .debug-label {
    color: #475569;
}

body.light-theme .debug-textarea {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}

body.light-theme .debug-output-panel {
    background: #ffffff;
    border: 1px solid #cbd5e1;
}

body.light-theme .debug-output-header {
    background: #f8fafc;
    border-bottom: 1px solid #cbd5e1;
    color: #0f172a;
}

body.light-theme .debug-output-code {
    background: #f8fafc;
    color: #0f172a;
}

body.light-theme .agent-message-assistant {
    background: #ffffff;
    border: 1px solid var(--ide-border);
    color: var(--color-text-primary);
}

body.light-theme .agent-message-user {
    background: #e2e8f0;
    color: var(--color-text-bright);
}

/* ─────────────────────────────────────────────────────────
   MODAL DIALOGS IN LIGHT THEME (100% Theme-Aware & Accessible)
   ───────────────────────────────────────────────────────── */
body.light-theme .modal-card,
body[data-theme="light"] .modal-card,
body.light-theme .staff-modal-card,
body[data-theme="light"] .staff-modal-card,
body.light-theme .templates-modal-card,
body[data-theme="light"] .templates-modal-card,
body.light-theme .white-label-modal-card,
body[data-theme="light"] .white-label-modal-card,
body.light-theme .license-modal-card,
body[data-theme="light"] .license-modal-card,
body.light-theme .log-analyzer-modal-card,
body[data-theme="light"] .log-analyzer-modal-card,
body.light-theme .link-modal-card,
body[data-theme="light"] .link-modal-card {
    background: #ffffff !important;
    border: 1px solid var(--ide-border) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
    color: #0f172a !important;
}

body.light-theme .modal-header,
body[data-theme="light"] .modal-header,
body.light-theme .staff-modal-card .modal-header,
body[data-theme="light"] .staff-modal-card .modal-header {
    background: #f8fafc !important;
    border-bottom: 1px solid var(--ide-border) !important;
    color: #0f172a !important;
}

body.light-theme .modal-header h2,
body.light-theme .modal-header h3,
body[data-theme="light"] .modal-header h2,
body[data-theme="light"] .modal-header h3,
body.light-theme .modal-header-icon,
body[data-theme="light"] .modal-header-icon {
    color: #0f172a !important;
}

body.light-theme .modal-subheading,
body[data-theme="light"] .modal-subheading {
    color: #64748b !important;
}

body.light-theme .modal-close-btn,
body[data-theme="light"] .modal-close-btn {
    color: #64748b !important;
}
body.light-theme .modal-close-btn:hover,
body[data-theme="light"] .modal-close-btn:hover {
    color: #0f172a !important;
    background: #e2e8f0 !important;
}

/* Staff Modal in Light Theme */
body.light-theme .staff-sidebar-column,
body[data-theme="light"] .staff-sidebar-column {
    background: #f8fafc !important;
    border-right: 1px solid var(--ide-border) !important;
}

body.light-theme .staff-nav-item,
body[data-theme="light"] .staff-nav-item {
    color: #475569 !important;
}
body.light-theme .staff-nav-item:hover,
body[data-theme="light"] .staff-nav-item:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}
body.light-theme .staff-nav-item.active,
body[data-theme="light"] .staff-nav-item.active {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
}
body.light-theme .staff-nav-name,
body[data-theme="light"] .staff-nav-name {
    color: #0f172a !important;
}
body.light-theme .staff-nav-role,
body[data-theme="light"] .staff-nav-role {
    color: #64748b !important;
}
body.light-theme .staff-nav-avatar,
body[data-theme="light"] .staff-nav-avatar {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

body.light-theme .staff-editor-column,
body[data-theme="light"] .staff-editor-column {
    background: #ffffff !important;
    color: #0f172a !important;
}

body.light-theme .staff-avatar-edit-box,
body[data-theme="light"] .staff-avatar-edit-box {
    background: #f8fafc !important;
    border: 1px solid var(--ide-border) !important;
}
body.light-theme .staff-avatar-preview,
body[data-theme="light"] .staff-avatar-preview {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}
body.light-theme .staff-avatar-initials-lg,
body[data-theme="light"] .staff-avatar-initials-lg {
    color: #0f172a !important;
}
body.light-theme .avatar-helper-text,
body[data-theme="light"] .avatar-helper-text {
    color: #64748b !important;
}

body.light-theme .staff-modal-footer,
body[data-theme="light"] .staff-modal-footer {
    background: #f8fafc !important;
    border-top: 1px solid var(--ide-border) !important;
}

body.light-theme .signature-textarea,
body[data-theme="light"] .signature-textarea {
    background: #f8fafc !important;
    border: 1px solid var(--ide-border) !important;
    color: #0f172a !important;
}
body.light-theme .signature-textarea:focus,
body[data-theme="light"] .signature-textarea:focus {
    border-color: #65a30d !important;
    background: #ffffff !important;
}

/* Templates Modal in Light Theme */
body.light-theme .templates-sidebar-column,
body[data-theme="light"] .templates-sidebar-column {
    background: #f8fafc !important;
    border-right: 1px solid var(--ide-border) !important;
}

body.light-theme .template-nav-item,
body[data-theme="light"] .template-nav-item {
    color: #475569 !important;
}
body.light-theme .template-nav-item:hover,
body[data-theme="light"] .template-nav-item:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}
body.light-theme .template-nav-item.active,
body[data-theme="light"] .template-nav-item.active {
    background: rgba(101, 163, 13, 0.12) !important;
    border-color: rgba(101, 163, 13, 0.35) !important;
    color: #3f6212 !important;
    font-weight: 700 !important;
}

body.light-theme .templates-editor-column,
body[data-theme="light"] .templates-editor-column {
    background: #ffffff !important;
    color: #0f172a !important;
}

body.light-theme .templates-modal-footer,
body[data-theme="light"] .templates-modal-footer {
    background: #f8fafc !important;
    border-top: 1px solid var(--ide-border) !important;
}

/* WYSIWYG & Modals Inputs in Light Theme */
body.light-theme .wysiwyg-container.modal-wysiwyg,
body[data-theme="light"] .wysiwyg-container.modal-wysiwyg,
body.light-theme .wysiwyg-container.mini-wysiwyg,
body[data-theme="light"] .wysiwyg-container.mini-wysiwyg {
    background: #ffffff !important;
    border: 1px solid var(--ide-border) !important;
}
body.light-theme .wysiwyg-container .wysiwyg-toolbar,
body[data-theme="light"] .wysiwyg-container .wysiwyg-toolbar {
    background: #f8fafc !important;
    border-bottom: 1px solid var(--ide-border) !important;
}
body.light-theme .wysiwyg-editor-surface.modal-wysiwyg-editor,
body[data-theme="light"] .wysiwyg-editor-surface.modal-wysiwyg-editor,
body.light-theme .wysiwyg-editor-surface.signature-editor-surface,
body[data-theme="light"] .wysiwyg-editor-surface.signature-editor-surface {
    background: #ffffff !important;
    color: #0f172a !important;
}
body.light-theme .wysiwyg-raw-textarea,
body[data-theme="light"] .wysiwyg-raw-textarea {
    background: #ffffff !important;
    color: #0f172a !important;
}

/* Other Modals in Light Theme */
body.light-theme .log-analyzer-body,
body[data-theme="light"] .log-analyzer-body,
body.light-theme .white-label-body,
body[data-theme="light"] .white-label-body,
body.light-theme .license-modal-body,
body[data-theme="light"] .license-modal-body,
body.light-theme .modal-body,
body[data-theme="light"] .modal-body,
body.light-theme .modal-footer,
body[data-theme="light"] .modal-footer {
    background: #ffffff !important;
    color: #0f172a !important;
}

body.light-theme .license-active-box,
body[data-theme="light"] .license-active-box {
    background: #f8fafc !important;
    border: 1px solid rgba(101, 163, 13, 0.4) !important;
    color: #0f172a !important;
}
body.light-theme .license-tier-card,
body[data-theme="light"] .license-tier-card {
    background: #f8fafc !important;
    border: 1px solid var(--ide-border) !important;
    color: #0f172a !important;
}

/* Modal Buttons in Light Theme */
body.light-theme .btn-secondary,
body[data-theme="light"] .btn-secondary {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}
body.light-theme .btn-secondary:hover,
body[data-theme="light"] .btn-secondary:hover {
    background: #cbd5e1 !important;
    color: #000000 !important;
    border-color: #94a3b8 !important;
}

body.light-theme .btn-ghost,
body[data-theme="light"] .btn-ghost {
    color: #475569 !important;
}
body.light-theme .btn-ghost:hover,
body[data-theme="light"] .btn-ghost:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}
body.light-theme .btn-ghost.text-danger,
body[data-theme="light"] .btn-ghost.text-danger {
    color: #dc2626 !important;
}
body.light-theme .btn-ghost.text-danger:hover,
body[data-theme="light"] .btn-ghost.text-danger:hover {
    background: rgba(220, 38, 38, 0.1) !important;
    color: #b91c1c !important;
}

body.light-theme .preview-modal-card {
    background: #ffffff !important;
    border: 1px solid var(--ide-border) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18) !important;
}

body.light-theme .preview-container {
    background: #f8fafc !important;
    color: #1e293b !important;
    border-top: 1px solid var(--ide-border) !important;
    border-bottom: 1px solid var(--ide-border) !important;
}

body.light-theme .preview-container h1,
body.light-theme .preview-container h2,
body.light-theme .preview-container h3 {
    color: #0f172a !important;
}

body.light-theme .preview-container::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
}

body.light-theme .preview-container::-webkit-scrollbar-thumb {
    background: rgba(101, 163, 13, 0.45) !important;
    border: 2px solid #f1f5f9 !important;
}

body.light-theme .pin-card {
    background: #ffffff;
    border: 1px solid var(--ide-border);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

body.light-theme .pin-auth-overlay {
    background: rgba(241, 245, 249, 0.95);
    backdrop-filter: blur(12px);
}

body.light-theme .pin-card h2 {
    color: var(--color-text-bright);
}

body.light-theme .theme-toggle-pill {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}
body.light-theme .theme-toggle-pill:hover {
    background: #f1f5f9;
    border-color: #64748b;
}
body.light-theme .titlebar-cpanel-btn {
    background: rgba(255, 108, 47, 0.12);
    border-color: #ff6c2f;
    color: #d9531e;
}
body.light-theme .pin-theme-btn {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}
body.light-theme .pin-theme-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}
body.light-theme .pin-sso-separator::before,
body.light-theme .pin-sso-separator::after {
    border-bottom: 1px solid #cbd5e1;
}
body.light-theme .pin-cpanel-sso-link {
    background: #ffffff;
    border-color: #ff6c2f;
    color: #d9531e;
    box-shadow: 0 2px 8px rgba(255, 108, 47, 0.15);
}

body.light-theme input:not(.agent-input-capsule input):not(.command-palette-input input),
body.light-theme textarea:not(.agent-input-capsule textarea),
body.light-theme select {
    background: #ffffff;
    color: var(--color-text-primary);
    border-color: var(--ide-border);
}

body.light-theme .operator-dropdown-menu,
body.light-theme .ticket-switcher-menu,
body.light-theme .context-menu-ide {
    background: #ffffff;
    border: 1px solid var(--ide-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

body.light-theme .dropdown-action-btn:hover,
body.light-theme .switcher-menu-item:hover {
    background: #f1f5f9;
}

body.light-theme .drawer-panel {
    background: #ffffff;
    border-left: 1px solid var(--ide-border);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

body.light-theme .drawer-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--ide-border);
}

body.light-theme .domain-chip {
    background: #f1f5f9;
    color: var(--color-text-primary);
    border: 1px solid var(--ide-border);
}

body.light-theme .cpanel-service-card {
    background: #f8fafc;
    border: 1px solid var(--ide-border);
}

body.light-theme .empty-state-ide h2 {
    color: var(--color-text-bright);
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body.vscode-theme {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--ide-bg-app);
    color: var(--color-text-primary);
    height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    font-size: 13px;
}

/* Typography */
.font-display,
[class*="font-display"],
h1.font-display, h2.font-display, h3.font-display, h4.font-display, button.font-display, span.font-display {
    font-family: 'Bebas Neue', system-ui, sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 0.06em;
}

.mono-font {
    font-family: 'JetBrains Mono', monospace;
}

.hidden {
    display: none !important;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* ═══════════════════════════════════════════════════════
   PIN AUTH OVERLAY
   ═══════════════════════════════════════════════════════ */
.pin-auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.94);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pin-card {
    background: var(--ide-bg-sidebar);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
    position: relative;
}

.pin-top-actions {
    position: absolute;
    top: 14px;
    right: 14px;
}

.pin-theme-btn {
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border-subtle);
    border-radius: var(--radius-full);
    padding: 4px 10px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    transition: all 0.15s ease;
}

.pin-theme-btn:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background: var(--ide-bg-hover);
}

.pin-theme-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.theme-mode-icon-pin {
    width: 14px;
    height: 14px;
}

.ide-logo-badge {
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pin-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.pin-card h2 {
    font-size: 26px;
    color: var(--color-text-bright);
    margin-bottom: 6px;
}

.pin-subtitle {
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 24px;
}

.pin-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pin-form input {
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full);
    padding: 12px 18px;
    font-size: 20px;
    text-align: center;
    letter-spacing: 0.3em;
    color: var(--color-text-bright);
    outline: none;
}
.pin-form input:focus {
    border-color: var(--color-accent);
}

.pin-sso-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 18px 0 12px;
}
.pin-sso-separator::before,
.pin-sso-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--ide-border);
}
.pin-sso-separator span {
    padding: 0 10px;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--color-text-dim);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}
.pin-cpanel-sso-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 108, 47, 0.1);
    border: 1px solid rgba(255, 108, 47, 0.4);
    border-radius: var(--radius-full);
    padding: 10px 18px;
    color: #ff6c2f;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}
.pin-cpanel-sso-link:hover {
    background: #ff6c2f;
    border-color: #ff6c2f;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 108, 47, 0.35);
    transform: translateY(-1px);
}
.pin-cpanel-sso-link:hover .pin-cpanel-logo {
    filter: brightness(0) invert(1);
}
.pin-cpanel-logo {
    height: 18px;
    width: auto;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.pin-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 10px;
}

/* ═══════════════════════════════════════════════════════
   IDE WORKBENCH ROOT
   ═══════════════════════════════════════════════════════ */
.ide-workbench {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   TOP TITLEBAR
   ═══════════════════════════════════════════════════════ */
.ide-titlebar {
    height: 44px;
    background: var(--ide-bg-titlebar);
    border-bottom: 1px solid var(--ide-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    user-select: none;
    flex-shrink: 0;
    z-index: 100;
}

.titlebar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

.app-brand-badge {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.titlebar-logo-img {
    height: 22px;
    width: auto;
    object-fit: contain;
}

.ide-app-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--color-text-bright);
    letter-spacing: 0.03em;
    white-space: nowrap !important;
    flex-shrink: 0;
}

.titlebar-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
}
.titlebar-menu > span {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    transition: all 0.1s ease;
    line-height: 1.2;
    vertical-align: middle;
}
.titlebar-menu > span:hover {
    background: var(--ide-bg-hover);
    color: var(--color-text-bright);
}

.menu-item-with-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}
.menu-item-with-badge > span:not(.menu-badge) {
    padding: 0 !important;
    margin: 0 !important;
    line-height: inherit;
    display: inline;
}
.menu-badge {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    line-height: 1.2;
}
.menu-badge.badge-warning {
    background: #f59e0b;
    color: #0d0d0d;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.titlebar-center {
    flex: 0 1 260px;
    min-width: 140px;
    max-width: 340px;
    margin: 0 10px;
}

@media (max-width: 1400px) {
    #menuFileBtn, #menuEditBtn, #menuSelectionBtn, #menuHelpBtn {
        display: none !important;
    }
}

.command-palette-input {
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full); /* FULL ROUNDED */
    height: 30px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    cursor: text;
}
.command-palette-input:focus-within {
    border-color: var(--color-accent);
}
.cmd-icon {
    width: 14px;
    height: 14px;
    color: var(--color-text-muted);
}
.command-palette-input input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-text-bright);
    font-size: 12px;
    flex: 1;
    min-width: 60px;
}
.cmd-kbd {
    font-size: 10px;
    color: var(--color-text-dim);
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.titlebar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.layout-controls {
    display: flex;
    gap: 2px;
    padding-right: 6px;
    border-right: 1px solid var(--ide-border);
    flex-shrink: 0;
}
.titlebar-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text-muted);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full); /* FULL ROUNDED */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.titlebar-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}
.titlebar-btn.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
}
.titlebar-btn.muted {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}
.titlebar-btn svg {
    width: 14px;
    height: 14px;
}

/* Titlebar cPanel Quick SSO */
.titlebar-cpanel-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 108, 47, 0.12);
    border: 1px solid rgba(255, 108, 47, 0.45);
    color: #ff6c2f;
    padding: 3px 10px;
    height: 28px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.titlebar-cpanel-btn:hover {
    background: #ff6c2f;
    border-color: #ff6c2f;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(255, 108, 47, 0.35);
}
.titlebar-cpanel-btn:hover .cpanel-titlebar-logo {
    filter: brightness(0) invert(1);
}
.cpanel-titlebar-logo {
    height: 12px;
    width: auto;
    object-fit: contain;
    display: inline-block;
}

/* Theme Toggle Pill Switcher */
.theme-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ide-bg-sidebar);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full);
    padding: 2px 10px;
    height: 28px;
    cursor: pointer;
    color: var(--color-text-bright);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    transition: all 0.18s ease;
}
.theme-toggle-pill:hover {
    border-color: var(--color-accent);
    background: var(--ide-bg-hover);
}
.theme-toggle-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle-indicator .theme-mode-icon {
    width: 14px;
    height: 14px;
}
.theme-toggle-text {
    font-size: 11px;
    line-height: 1;
}

.theme-toggle-btn {
    color: var(--color-text-muted);
}
.theme-toggle-btn:hover {
    color: var(--color-accent) !important;
    border-color: var(--color-accent) !important;
}
.theme-mode-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

/* Operator Profile Switcher & Dropdown */
.operator-profile-wrap {
    position: relative;
    flex-shrink: 0;
}
.operator-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full);
    padding: 3px 8px 3px 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--color-text-bright);
    max-width: 140px;
    flex-shrink: 0;
}
.operator-profile-btn:hover {
    background: var(--ide-bg-hover);
    border-color: rgba(255, 255, 255, 0.2);
}
.staff-avatar-slot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    background: #2a2d3d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}
.staff-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.staff-avatar-initials {
    font-size: 9px;
    font-weight: 700;
    color: var(--color-text-bright);
    font-family: 'JetBrains Mono', monospace;
}
.operator-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}
.operator-caret {
    width: 12px;
    height: 12px;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.operator-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 270px;
    background: #181a20;
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
    padding: 8px 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}
.dropdown-section-title {
    padding: 6px 14px 4px 14px;
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--color-text-dim);
    letter-spacing: 0.5px;
}
.operator-dropdown-list {
    display: flex;
    flex-direction: column;
    max-height: 220px;
    overflow-y: auto;
}
.operator-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 0.12s ease;
}
.operator-dropdown-item:hover {
    background: var(--ide-bg-hover);
    color: #ffffff;
}
.operator-dropdown-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.operator-item-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: #2a2d3d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}
.operator-item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.operator-item-name {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.operator-item-role {
    font-size: 10px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.operator-item-check {
    color: var(--color-accent);
    font-size: 14px;
    font-weight: bold;
}
.operator-dropdown-divider {
    height: 1px;
    background: var(--ide-border);
    margin: 6px 0;
}
.dropdown-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.12s ease;
    text-align: left;
    width: 100%;
}
.dropdown-action-btn:hover {
    background: var(--ide-bg-hover);
    color: var(--color-text-bright);
}
.dropdown-action-btn svg {
    width: 14px;
    height: 14px;
}

.btn-action-new {
    background: var(--color-accent);
    color: #080808;
    border: none;
    padding: 6px 16px;
    height: 30px;
    border-radius: var(--radius-full); /* FULL ROUNDED */
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-action-new:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}
.btn-action-new svg {
    width: 14px;
    height: 14px;
}

.titlebar-lock-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    height: 30px;
    border-radius: var(--radius-full);
    border: 1px solid var(--ide-border);
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.15s ease;
}
.titlebar-lock-btn:hover {
    color: var(--color-accent);
    border-color: rgba(163, 230, 53, 0.4);
    background: rgba(163, 230, 53, 0.12);
}
.titlebar-lock-btn svg {
    width: 13px;
    height: 13px;
}

/* ═══════════════════════════════════════════════════════
   MAIN 3-COLUMN CONTAINER
   ═══════════════════════════════════════════════════════ */
.ide-main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* 1. ACTIVITY BAR */
.ide-activity-bar {
    width: 48px;
    background: var(--ide-bg-activity);
    border-right: 1px solid var(--ide-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    flex-shrink: 0;
    z-index: 40;
}

.activity-top {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: center;
}

.activity-btn {
    background: transparent;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full); /* FULL ROUNDED */
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}
.activity-btn svg {
    width: 20px;
    height: 20px;
}
.activity-btn:hover {
    color: var(--color-text-bright);
    background: var(--ide-bg-hover);
}
.activity-btn.active {
    color: var(--color-text-bright);
    background: var(--ide-bg-active);
}
.activity-btn.active::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--color-accent);
    border-radius: 0 3px 3px 0;
}

.activity-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.theme-toggle-activity-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--color-text-muted);
    border-radius: var(--radius-full);
    transition: all 0.18s ease;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}
.theme-toggle-activity-btn:hover {
    color: var(--color-text-bright);
    background: var(--ide-bg-hover);
    transform: rotate(18deg);
}
.theme-toggle-activity-btn svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
}
.whmcs-live-indicator {
    padding: 8px;
    cursor: pointer;
    border-radius: var(--radius-full);
}
.whmcs-live-indicator:hover {
    background: var(--ide-bg-hover);
}
.live-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 8px var(--color-accent);
}

.activity-version-tag {
    font-size: 9px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--color-text-dim);
    letter-spacing: -0.02em;
    user-select: none;
    line-height: 1;
    margin-top: -3px;
    margin-bottom: 6px;
    opacity: 0.75;
    transition: opacity 0.15s ease, color 0.15s ease;
    cursor: default;
}
.activity-version-tag:hover {
    opacity: 1;
    color: var(--color-text-bright);
}
body.light-theme .activity-version-tag {
    color: #64748b;
}
body.light-theme .activity-version-tag:hover {
    color: #0f172a;
}

/* 2. PRIMARY SIDEBAR (EXPLORER: CLIENTS) */
.ide-sidebar {
    width: 280px;
    min-width: 220px;
    max-width: 360px;
    background: var(--ide-bg-sidebar);
    border-right: 1px solid var(--ide-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    transition: width 0.2s ease, transform 0.2s ease;
    z-index: 30;
}
.ide-sidebar.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    border-right: none;
    overflow: hidden;
}

.sidebar-header-bar {
    height: 38px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--ide-border-subtle);
}
.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-bright);
    letter-spacing: 0.05em;
}
.sidebar-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}
.sidebar-count {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    background: var(--ide-bg-active);
    color: var(--color-text-bright);
    padding: 2px 8px;
    border-radius: var(--radius-full); /* FULL ROUNDED */
}
.sidebar-icon-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 18px;
    cursor: pointer;
    border-radius: var(--radius-full);
}

.sidebar-filter-section {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ide-border-subtle);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-search-box {
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full); /* FULL ROUNDED */
    height: 28px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 6px;
}
.sidebar-search-box svg {
    width: 13px;
    height: 13px;
    color: var(--color-text-muted);
}
.sidebar-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-text-bright);
    font-size: 11px;
    flex: 1;
}

.filter-pills-row {
    display: flex;
    gap: 6px;
}
.filter-pill {
    flex: 1;
    background: transparent;
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full); /* FULL ROUNDED */
    color: var(--color-text-muted);
    font-size: 11px;
    padding: 4px 0;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}
.filter-pill:hover {
    color: var(--color-text-bright);
    border-color: rgba(255, 255, 255, 0.2);
}
.filter-pill.active {
    background: var(--ide-bg-active);
    color: var(--color-text-bright);
    border-color: rgba(255, 255, 255, 0.3);
}

.clients-tree-view {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

/* Client Tree Item */
.client-tree-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    gap: 8px;
    border-left: 2px solid transparent;
    transition: background 0.1s ease;
}
.client-tree-item:hover {
    background: var(--ide-bg-hover);
}
.client-tree-item.active {
    background: var(--ide-bg-active);
    border-left-color: var(--color-accent);
}

.tree-chevron {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-dim);
    transition: transform 0.15s ease, color 0.15s ease;
    display: inline-block;
    width: 10px;
    text-align: center;
    line-height: 1;
    flex-shrink: 0;
}
.client-tree-item.expanded .tree-chevron,
.tree-chevron.expanded {
    transform: rotate(90deg);
    color: var(--color-accent);
}

/* WHITE CLIENT TREE ICON (User Request) */
.client-tree-icon {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full); /* FULL ROUNDED */
    background: #2b2b2b;
    color: #ffffff !important; /* STRICTLY WHITE */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.client-tree-content {
    flex: 1;
    min-width: 0;
}
.client-tree-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.client-tree-sub {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.client-tree-badge {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    background: var(--color-accent);
    color: #080808;
    padding: 2px 6px;
    border-radius: var(--radius-full); /* FULL ROUNDED */
    font-weight: bold;
    flex-shrink: 0;
}

/* Explorer Client Tickets Subtree */
.client-tickets-sublist {
    margin-left: 24px;
    padding: 2px 0 6px 12px;
    border-left: 1px dashed rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ticket-sub-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 11px;
    color: var(--color-text-muted);
    transition: all 0.12s ease;
}
.ticket-sub-item:hover {
    background: var(--ide-bg-hover);
    color: var(--color-text-bright);
}
.ticket-sub-item.active {
    background: var(--ide-bg-active);
    color: var(--color-accent);
    font-weight: 700;
}
.ticket-sub-icon {
    font-size: 11px;
    flex-shrink: 0;
}
.ticket-sub-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.ticket-sub-subject {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ticket-sub-meta {
    font-size: 10px;
    color: var(--color-text-dim);
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sub-status-tag {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.sub-status-tag.customer-reply,
.sub-status-tag.customer_reply {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.2);
}
.sub-status-tag.open {
    background: rgba(251, 191, 36, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
}
.sub-status-tag.in-progress,
.sub-status-tag.in_progress,
.sub-status-tag.on-hold {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.35);
}
.sub-status-tag.answered {
    background: rgba(175, 225, 57, 0.15);
    color: var(--color-accent);
    border: 1px solid rgba(175, 225, 57, 0.3);
}
.sub-status-tag.closed {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ticket-sub-item.is-unanswered {
    border-left: 2px solid #f59e0b !important;
}

/* Recent Tickets List in Sidebar */
.recent-tickets-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 6px;
}

.recent-ticket-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--ide-border-subtle);
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}
.recent-ticket-card:hover {
    background: var(--ide-bg-hover);
    border-color: rgba(255, 255, 255, 0.15);
}
.recent-ticket-card.active {
    background: rgba(163, 230, 53, 0.09);
    border-color: rgba(163, 230, 53, 0.4);
    border-left: 3px solid var(--color-accent) !important;
}
.recent-ticket-card.is-unanswered {
    border-left: 3px solid #f59e0b;
}

.recent-ticket-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.recent-ticket-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-accent);
}
.recent-ticket-subject {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}
.recent-ticket-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: var(--color-text-dim);
    font-family: 'JetBrains Mono', monospace;
    gap: 8px;
}
.recent-ticket-client {
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.recent-ticket-time {
    white-space: nowrap;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   3. CENTER CONSOLE (TICKET WORKSPACE & EDITOR)
   ═══════════════════════════════════════════════════════ */
.ide-editor-area {
    flex: 1;
    background: var(--ide-bg-editor);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Tabs Bar */
.editor-tabs-bar {
    height: 38px;
    background: var(--ide-bg-tab-inactive);
    border-bottom: 1px solid var(--ide-border);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.editor-tabs-scroll-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    position: relative;
}

.editor-tabs-list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: stretch;
    scroll-behavior: smooth;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.editor-tabs-list::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}

.editor-tab {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    background: var(--ide-bg-tab-inactive);
    border-right: 1px solid var(--ide-border);
    color: var(--color-text-muted);
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    user-select: none;
    border-top: 2px solid transparent;
    flex-shrink: 0;
    white-space: nowrap;
    max-width: 260px;
    box-sizing: border-box;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.editor-tab:hover {
    background: var(--ide-bg-hover);
    color: var(--color-text-bright);
}
.editor-tab.active {
    background: var(--ide-bg-tab-active);
    color: var(--color-text-bright);
    border-top-color: var(--color-accent);
}
.tab-icon {
    font-size: 13px;
    flex-shrink: 0;
}
.tab-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 180px;
}
.tab-badge {
    font-size: 10px;
    background: rgba(175, 225, 57, 0.15);
    color: var(--color-accent);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(175, 225, 57, 0.3);
    flex-shrink: 0;
    white-space: nowrap;
}
.tab-close {
    font-size: 14px;
    opacity: 0.6;
    margin-left: 4px;
    padding: 2px 4px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    transition: all 0.12s ease;
    line-height: 1;
}
.tab-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
    color: #ff5555;
}

.editor-tab-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    background: var(--ide-bg-tab-inactive);
    border-left: 1px solid var(--ide-border);
    flex-shrink: 0;
    z-index: 5;
}

.tab-nav-group {
    display: flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full);
    padding: 2px;
    background: rgba(0, 0, 0, 0.25);
}

.tab-nav-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}
.tab-nav-btn:hover:not(:disabled):not(.nav-inactive) {
    background: var(--ide-bg-hover);
    color: var(--color-text-bright);
}
.tab-nav-btn:disabled,
.tab-nav-btn.nav-inactive {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}
.tab-nav-btn svg {
    width: 12px;
    height: 12px;
}

.tab-action-btn {
    background: transparent;
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full); /* FULL ROUNDED */
    color: var(--color-text-muted);
    font-size: 11px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.tab-action-btn:hover {
    background: var(--ide-bg-hover);
    color: var(--color-text-bright);
    border-color: rgba(255, 255, 255, 0.2);
}
.tab-action-btn svg {
    width: 12px;
    height: 12px;
}

/* Breadcrumbs Bar & Ticket Switcher */
.editor-breadcrumbs {
    height: 32px;
    background: var(--ide-bg-editor);
    border-bottom: 1px solid var(--ide-border-subtle);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 6px;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--color-text-muted);
    flex-shrink: 0;
    position: relative;
    z-index: 50;
}
.crumb-root {
    color: var(--color-accent);
}
.crumb-sep {
    color: var(--color-text-dim);
}
.crumb-client {
    color: var(--color-text-bright);
    cursor: pointer;
}
.crumb-client:hover {
    color: var(--color-accent);
}

.ticket-switcher-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.ticket-switcher-btn {
    background: var(--ide-bg-active);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full);
    color: var(--color-text-bright);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    padding: 3px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    max-width: 240px;
}
.ticket-switcher-btn:hover {
    border-color: var(--color-accent);
    background: rgba(175, 225, 57, 0.12);
}
.ticket-switcher-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.switcher-arrow-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.ticket-switcher-wrap.open .switcher-arrow-icon {
    transform: rotate(180deg);
}
.ticket-switcher-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 280px;
    max-width: 380px;
    max-height: 280px;
    overflow-y: auto;
    background: #1f1f1f;
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
    z-index: 500;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.switcher-menu-item {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    transition: background 0.1s ease;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    font-family: 'Nunito Sans', sans-serif;
    width: 100%;
}
.switcher-menu-item:hover {
    background: var(--ide-bg-hover);
    color: var(--color-text-bright);
}
.switcher-menu-item.active {
    background: rgba(175, 225, 57, 0.12);
    color: var(--color-accent);
    font-weight: 700;
}
.switcher-ticket-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.switcher-ticket-subject {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.switcher-ticket-date {
    font-size: 10px;
    color: var(--color-text-dim);
    font-family: 'JetBrains Mono', monospace;
}

.breadcrumbs-status-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
.crumb-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: var(--radius-full); /* FULL ROUNDED */
    background: var(--ide-bg-active);
    color: var(--color-text-bright);
}
.domain-badges {
    display: flex;
    gap: 4px;
}
.domain-chip {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ide-border);
    padding: 2px 8px;
    border-radius: var(--radius-full); /* FULL ROUNDED */
    color: var(--color-text-muted);
}
.cpanel-sso-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 108, 47, 0.12);
    border: 1px solid rgba(255, 108, 47, 0.45);
    color: #ff6c2f;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    vertical-align: middle;
}
.cpanel-sso-btn:hover {
    background: #ff6c2f;
    border-color: #ff6c2f;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(255, 108, 47, 0.4);
}
.cpanel-sso-btn:hover .cpanel-sso-logo-img {
    filter: brightness(0) invert(1);
}
.cpanel-sso-logo-img {
    height: 12px;
    width: auto;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}
.cpanel-service-card {
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: border-color 0.15s ease;
}
.cpanel-service-card:hover {
    border-color: rgba(255, 108, 47, 0.5);
}
.cpanel-service-info {
    min-width: 0;
    flex: 1;
}
.cpanel-service-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--color-text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cpanel-service-sub {
    font-size: 11px;
    color: var(--color-text-dim);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}

/* Conversation Feed */
.editor-feed-container {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) rgba(0, 0, 0, 0.25);
}
.editor-feed-container::-webkit-scrollbar {
    width: 8px;
}
.editor-feed-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
}
.editor-feed-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
}
.editor-feed-container::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* Empty State */
.empty-state-ide {
    margin: auto;
    text-align: center;
    max-width: 480px;
    padding: 40px 20px;
}
.empty-logo-img {
    height: 64px;
    width: auto;
    margin-bottom: 18px;
    opacity: 0.9;
}
.empty-state-ide h2 {
    font-size: 32px;
    color: var(--color-text-bright);
    margin-bottom: 8px;
}
.empty-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}
.quick-start-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Message Bubble (Fixed flex-shrink & rich aesthetics) */
.ticket-message-card {
    background: var(--ide-bg-panel);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.ticket-message-card.client-msg {
    border-left: 4px solid #38bdf8;
}
.ticket-message-card.staff-msg {
    border-left: 4px solid var(--color-accent);
}

.msg-header {
    background: rgba(0, 0, 0, 0.35);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--ide-border-subtle);
    flex-shrink: 0;
}
.msg-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.msg-avatar {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    border-radius: var(--radius-full); /* FULL ROUNDED */
    background: var(--ide-bg-active);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}
.msg-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-bright);
}
.msg-role-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: var(--radius-full); /* FULL ROUNDED */
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}
.msg-role-tag.client {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}
.msg-role-tag.staff {
    background: var(--color-accent-muted);
    color: var(--color-accent);
    border: 1px solid rgba(175, 225, 57, 0.25);
}
.msg-date {
    font-size: 11px;
    color: var(--color-text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.msg-body {
    padding: 16px 18px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--color-text-primary);
    word-break: break-word;
    flex-shrink: 0;
}
.msg-body p {
    margin-bottom: 12px;
}
.msg-body p:last-child {
    margin-bottom: 0;
}
.msg-body strong {
    color: var(--color-text-bright);
    font-weight: 700;
}
.msg-body em {
    color: #e0e0e0;
    font-style: italic;
}
.msg-body ul, .msg-body ol {
    padding-left: 22px;
    margin: 10px 0;
}
.msg-body li {
    margin-bottom: 6px;
}
.msg-body .code-block {
    background: #141414;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #e6e6e6;
    border: 1px solid var(--ide-border-subtle);
    margin: 10px 0;
    overflow-x: auto;
}
.msg-body .inline-code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--color-accent);
}
.msg-body .msg-h2 {
    color: var(--color-text-bright);
    margin: 14px 0 8px;
    font-size: 16px;
    font-weight: 700;
}
.msg-body .msg-h3 {
    color: var(--color-text-bright);
    margin: 12px 0 6px;
    font-size: 14px;
    font-weight: 700;
}
.msg-body .msg-h4 {
    color: var(--color-text-bright);
    margin: 10px 0 4px;
    font-size: 13px;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   BOTTOM PANEL / TERMINAL COMPOSER
   ═══════════════════════════════════════════════════════ */
.ide-bottom-panel {
    border-top: 1px solid var(--ide-border);
    background: var(--ide-bg-panel);
    display: flex;
    flex-direction: column;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    height: 310px;
    min-height: 280px;
    max-height: 360px;
    transition: height 0.2s ease, max-height 0.2s ease;
    overflow: hidden;
    position: relative;
    z-index: 20;
}
.ide-bottom-panel.collapsed {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    overflow: hidden;
}

.panel-header-tabs {
    height: 34px;
    background: #141414;
    border-bottom: 1px solid var(--ide-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    flex-shrink: 0;
}
.panel-tabs-left {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-wrap: nowrap;
}
.panel-tab {
    background: transparent;
    border: none;
    color: var(--color-text-bright);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.tab-terminal-icon {
    color: var(--color-accent);
}
.ticket-status-pill {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    background: var(--ide-bg-active);
    color: var(--color-text-muted);
    padding: 3px 8px;
    border-radius: var(--radius-full); /* FULL ROUNDED */
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ticket-status-pill.ticket-link-btn {
    cursor: pointer;
    text-decoration: none;
}
.ticket-status-pill.ticket-link-btn:hover {
    background: var(--ide-bg-hover);
    color: var(--color-accent);
    border-color: rgba(175, 225, 57, 0.4);
}
.pill-ext-icon {
    width: 10px;
    height: 10px;
    margin-left: 4px;
    opacity: 0.7;
}

.panel-tabs-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.composer-header-send-btn {
    background: var(--color-accent);
    color: #0b0f02 !important;
    border: none;
    border-radius: var(--radius-full);
    padding: 3px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(163, 230, 53, 0.3);
    transition: all 0.15s ease;
    flex-shrink: 0;
    white-space: nowrap;
}
.composer-header-send-btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(163, 230, 53, 0.5);
}
.composer-header-send-btn:active {
    transform: translateY(0);
}
.composer-header-send-btn svg {
    width: 12px;
    height: 12px;
    stroke: #0b0f02;
}
.preset-select-dropdown {
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full); /* FULL ROUNDED */
    color: var(--color-text-bright);
    font-size: 11px;
    padding: 3px 10px;
    outline: none;
    cursor: pointer;
}
.panel-toggle-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: var(--radius-full);
}
.panel-toggle-btn svg {
    width: 14px;
    height: 14px;
}

.panel-content-body {
    padding: 8px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   WYSIWYG RICH TEXT EDITOR STYLES
   ═══════════════════════════════════════════════════════ */
.wysiwyg-container {
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 155px;
    transition: border-color 0.15s ease;
}
.wysiwyg-container:focus-within {
    border-color: var(--color-accent);
}

.wysiwyg-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    padding: 6px 10px;
    background: #111216;
    border-bottom: 1px solid var(--ide-border);
    user-select: none;
}

.wysiwyg-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.wysiwyg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.12s ease;
}
.wysiwyg-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.wysiwyg-btn:active,
.wysiwyg-btn.active {
    background: rgba(163, 230, 53, 0.18);
    color: var(--color-accent);
    border-color: rgba(163, 230, 53, 0.3);
}
.wysiwyg-btn svg {
    width: 14px;
    height: 14px;
}
.wysiwyg-text-icon {
    font-family: 'JetBrains Mono', 'Bebas Neue', monospace;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.wysiwyg-divider {
    width: 1px;
    height: 18px;
    background: var(--ide-border);
    margin: 0 4px;
}

.wysiwyg-spacer {
    flex: 1;
}

.wysiwyg-editor-surface {
    flex: 1 1 auto;
    min-height: 110px;
    max-height: 180px;
    overflow-y: auto;
    padding: 10px 14px;
    background: var(--ide-bg-input);
    color: var(--color-text-bright);
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    outline: none;
    word-break: break-word;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}
.wysiwyg-editor-surface::-webkit-scrollbar {
    width: 6px;
}
.wysiwyg-editor-surface::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 3px;
}
.wysiwyg-editor-surface::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}
.wysiwyg-editor-surface:empty::before {
    content: attr(data-placeholder);
    color: var(--color-text-dim);
    pointer-events: none;
    display: block;
}

/* Rich Content Formatting inside WYSIWYG */
.wysiwyg-editor-surface h1,
.wysiwyg-editor-surface h2,
.wysiwyg-editor-surface h3 {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-bright);
    margin: 10px 0 6px;
    line-height: 1.3;
}
.wysiwyg-editor-surface p {
    margin: 0 0 8px;
}
.wysiwyg-editor-surface strong,
.wysiwyg-editor-surface b {
    font-weight: 700;
    color: var(--color-text-bright);
}
.wysiwyg-editor-surface em,
.wysiwyg-editor-surface i {
    font-style: italic;
    color: var(--color-text-primary);
}
.wysiwyg-editor-surface u {
    text-decoration: underline;
}
.wysiwyg-editor-surface ul,
.wysiwyg-editor-surface ol {
    margin: 0 0 8px;
    padding-left: 22px;
}
.wysiwyg-editor-surface li {
    margin-bottom: 3px;
}
.wysiwyg-editor-surface blockquote {
    border-left: 3px solid var(--color-accent);
    padding: 6px 12px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0 4px 4px 0;
    color: var(--color-text-primary);
}
.wysiwyg-editor-surface a {
    color: var(--color-accent);
    text-decoration: underline;
}
.wysiwyg-editor-surface hr {
    border: none;
    border-top: 1px solid var(--ide-border);
    margin: 12px 0;
}

.wysiwyg-raw-textarea {
    width: 100%;
    min-height: 105px;
    max-height: 260px;
    background: var(--ide-bg-input);
    border: none;
    padding: 12px 14px;
    color: #cbd5e1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    outline: none;
    resize: vertical;
}

.modal-wysiwyg .wysiwyg-editor-surface,
.modal-wysiwyg .wysiwyg-raw-textarea {
    min-height: 140px;
    max-height: 280px;
}

.mini-wysiwyg .wysiwyg-editor-surface,
.mini-wysiwyg .wysiwyg-raw-textarea {
    min-height: 85px;
    max-height: 160px;
    font-size: 12px;
}

.composer-editor-wrapper textarea {
    width: 100%;
    height: 100px;
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-md);
    padding: 12px;
    color: var(--color-text-bright);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    outline: none;
    resize: vertical;
}

.panel-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: var(--ide-bg-panel);
    padding: 6px 0 2px;
    z-index: 10;
}
.footer-select-group {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--color-text-muted);
}
.footer-select-group select {
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full); /* FULL ROUNDED */
    color: var(--color-text-bright);
    font-size: 11px;
    padding: 5px 12px;
    outline: none;
}

.panel-footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.footer-send-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════
   4. SECONDARY SIDEBAR: ANTIGRAVITY AGENT COPILOT (RIGHT PANE)
   ═══════════════════════════════════════════════════════ */
.ide-agent-panel {
    width: 340px;
    min-width: 280px;
    max-width: 440px;
    background: #18191d;
    border-left: 1px solid var(--ide-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    transition: width 0.2s ease, transform 0.2s ease;
    z-index: 30;
}
.ide-agent-panel.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    border-left: none;
    overflow: hidden;
}

/* Minimal Agent Header (Matches user screenshot) */
.agent-panel-header {
    height: 44px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #18191d;
    flex-shrink: 0;
}
.agent-header-title {
    font-size: 15px;
    font-weight: 600;
    color: #f3f4f6;
    letter-spacing: -0.01em;
}
.agent-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.agent-tool-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.agent-tool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.agent-tool-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
}

/* 3 Minimal Tabs: Chat | Plan | Debug */
.agent-nav-tabs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #141518;
    flex-shrink: 0;
    padding: 0 10px;
    gap: 4px;
}
.agent-nav-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 8px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.agent-nav-tab:hover {
    color: #e5e7eb;
}
.agent-nav-tab.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}
.agent-nav-tab svg {
    stroke: currentColor;
}

/* Tab Content Pages */
.agent-tab-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.agent-tab-page.hidden {
    display: none !important;
}

/* Chat Stream & Empty Hero (Matches screenshot!) */
.agent-chat-stream {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.agent-empty-hero {
    margin: auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 8px;
}
.agent-workspace-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #f3f4f6;
    margin: 0 0 4px 0;
}
.agent-workspace-sub {
    font-size: 11px;
    color: #9ca3af;
    margin: 0 0 20px 0;
}
.agent-hero-chips {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 290px;
}
.hero-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    padding: 8px 14px;
    font-size: 11px;
    color: #d1d5db;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    line-height: 1.3;
}
.hero-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}
.agent-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(175, 225, 57, 0.12);
    border: 1px solid rgba(175, 225, 57, 0.3);
    border-radius: var(--radius-full); /* FULL ROUNDED */
    padding: 3px 10px;
    font-size: 10px;
    color: var(--color-accent);
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}
.agent-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
}
.agent-welcome-card h3 {
    font-size: 18px;
    color: var(--color-text-bright);
    margin-bottom: 4px;
}
.agent-welcome-card p {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}
.agent-example-chips {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.example-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full); /* FULL ROUNDED */
    padding: 6px 12px;
    color: var(--color-text-primary);
    font-size: 11px;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}
.example-chip:hover {
    background: var(--ide-bg-hover);
    color: var(--color-text-bright);
    border-color: var(--color-accent);
}

/* Chat Message Bubbles */
.chat-msg-user {
    align-self: flex-end;
    background: #004b87;
    color: #ffffff;
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-size: 12px;
    max-width: 90%;
    line-height: 1.4;
    word-break: break-word;
}

.chat-msg-agent {
    align-self: flex-start;
    background: var(--ide-bg-active);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-md);
    padding: 14px;
    font-size: 12px;
    max-width: 100%;
    width: 100%;
    line-height: 1.5;
    word-break: break-word;
}
.chat-msg-agent pre {
    background: #141414;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    white-space: pre-wrap;
    margin: 8px 0;
    border: 1px solid var(--ide-border-subtle);
    color: #e6e6e6;
}

.agent-msg-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ide-border-subtle);
}
.agent-msg-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    gap: 6px;
}
.agent-msg-tools {
    display: flex;
    align-items: center;
    gap: 4px;
}
.btn-chat-tool {
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text-muted);
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}
.btn-chat-tool:hover {
    background: var(--ide-bg-hover);
    color: var(--color-text-bright);
    border-color: var(--ide-border-subtle);
}
.btn-chat-tool svg {
    width: 13px;
    height: 13px;
}
.btn-chat-tool.btn-clear-msg:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
}
.btn-chat-tool.btn-regenerate-msg:hover {
    color: var(--color-accent);
    border-color: var(--color-accent-muted);
}

.agent-msg-rendered {
    color: var(--color-text-primary);
    font-size: 12px;
    line-height: 1.6;
    margin: 6px 0 10px 0;
}
.agent-msg-rendered .msg-h2,
.agent-msg-rendered .msg-h3,
.agent-msg-rendered .msg-h4 {
    color: var(--color-text-bright);
    margin: 12px 0 4px 0;
    font-weight: 700;
}
.agent-msg-rendered .msg-h3 {
    font-size: 13px;
    border-bottom: 1px solid var(--ide-border-subtle);
    padding-bottom: 3px;
}
.agent-msg-rendered .msg-h4 {
    font-size: 12px;
    color: var(--color-accent);
}
.agent-msg-rendered ul,
.agent-msg-rendered ol {
    margin: 6px 0;
    padding-left: 18px;
}
.agent-msg-rendered li {
    margin-bottom: 4px;
}
.agent-msg-rendered strong {
    color: var(--color-text-bright);
    font-weight: 700;
}
.agent-msg-rendered .msg-hr {
    border: none;
    border-top: 1px solid var(--ide-border-subtle);
    margin: 12px 0;
}
.agent-msg-rendered p {
    margin-bottom: 8px;
}
.agent-msg-rendered p:last-child {
    margin-bottom: 0;
}
.agent-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.btn-agent-action {
    background: var(--color-accent);
    color: #080808;
    border: none;
    border-radius: var(--radius-full); /* FULL ROUNDED */
    font-size: 11px;
    font-weight: bold;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-agent-action.secondary {
    background: #252836;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-agent-action:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}
.btn-agent-action.secondary:hover {
    background: #313547;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
}

body.light-theme .btn-agent-action,
body[data-theme="light"] .btn-agent-action {
    background: #65a30d;
    color: #ffffff !important;
}
body.light-theme .btn-agent-action.secondary,
body[data-theme="light"] .btn-agent-action.secondary {
    background: #e2e8f0;
    color: #0f172a !important;
    border: 1px solid #cbd5e1;
}
body.light-theme .btn-agent-action.secondary:hover,
body[data-theme="light"] .btn-agent-action.secondary:hover {
    background: #cbd5e1;
    color: #000000 !important;
    border-color: #94a3b8;
}

/* ═══════════════════════════════════════════════════════
   INTERACTIVE MARKDOWN DOCUMENT & REVIEW WORKSPACE
   ═══════════════════════════════════════════════════════ */
.doc-workspace-container {
    padding: 16px 20px;
    max-width: 920px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.doc-header-card {
    background: var(--ide-bg-panel);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.doc-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.doc-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.doc-title-icon {
    font-size: 20px;
}
.doc-title-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-bright);
    letter-spacing: -0.01em;
}

.doc-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 11px;
}
.doc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full);
    padding: 3px 10px;
    color: var(--color-text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}
.doc-chip strong {
    color: var(--color-text-bright);
}
.doc-chip.accent {
    background: var(--color-accent-muted);
    border-color: rgba(163, 230, 53, 0.35);
    color: var(--color-accent);
}

.doc-body-card {
    background: var(--ide-bg-panel);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.doc-section-block {
    position: relative;
    border-radius: var(--radius-md);
    padding: 8px 12px;
    margin: -4px -12px;
    transition: background 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
}
.doc-section-block:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}
.doc-section-block.has-comments {
    border-left: 3px solid var(--color-accent);
    background: rgba(163, 230, 53, 0.03);
}

.doc-section-trigger {
    opacity: 0;
    position: absolute;
    right: 8px;
    top: 6px;
    background: var(--ide-bg-active);
    border: 1px solid var(--ide-border);
    color: var(--color-text-muted);
    font-size: 11px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
    z-index: 10;
}
.doc-section-block:hover .doc-section-trigger,
.doc-section-block:focus-within .doc-section-trigger,
.doc-section-trigger:focus-visible,
.doc-section-trigger.active {
    opacity: 1;
}
.doc-section-trigger:hover {
    background: var(--color-accent);
    color: #000000;
    border-color: var(--color-accent);
    font-weight: bold;
}

.doc-comments-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--ide-border-subtle);
}

.doc-comment-card {
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.15s ease;
}
.doc-comment-card.resolved {
    opacity: 0.65;
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.05);
}

.doc-comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.doc-comment-user {
    display: flex;
    align-items: center;
    gap: 8px;
}
.doc-comment-avatar {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: #000;
    font-weight: 700;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
}
.doc-comment-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-bright);
}
.doc-comment-date {
    font-size: 10px;
    color: var(--color-text-dim);
    font-family: 'JetBrains Mono', monospace;
}

.doc-comment-text {
    font-size: 12px;
    color: var(--color-text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
    padding-left: 30px;
}

.doc-comment-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 2px;
}
.doc-comment-action-btn {
    background: transparent;
    border: 1px solid var(--ide-border);
    color: var(--color-text-muted);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.1s ease;
}
.doc-comment-action-btn:hover {
    background: var(--ide-bg-hover);
    color: var(--color-text-bright);
}
.doc-comment-action-btn.btn-resolve:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}
.doc-comment-action-btn.btn-delete:hover {
    color: #f87171;
    border-color: #f87171;
}

.doc-composer-inline {
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.doc-composer-textarea {
    background: var(--ide-bg-panel);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-bright);
    font-family: inherit;
    font-size: 12px;
    padding: 8px 10px;
    resize: vertical;
    min-height: 64px;
    outline: none;
}
.doc-composer-textarea:focus {
    border-color: var(--color-accent);
}
.doc-composer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.editor-tab .tab-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: var(--ide-bg-active);
    color: var(--color-accent);
    font-family: 'JetBrains Mono', monospace;
}
.editor-tab.active .tab-badge {
    background: var(--color-accent);
    color: #000000;
    font-weight: 700;
}

/* Floating Input Capsule (Matches User Screenshot!) */
.agent-input-container {
    padding: 12px 14px 14px;
    background: transparent;
    position: relative;
    flex-shrink: 0;
}
.agent-input-capsule {
    background: #1f2025;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 12px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: border-color 0.18s ease, box-shadow 0.25s ease;
    position: relative;
}
.agent-input-capsule:focus-within {
    border-color: rgba(255, 255, 255, 0.22);
}
.agent-input-capsule.recording-active {
    border-color: rgba(234, 84, 85, 0.9) !important;
    box-shadow: 0 0 0 1.5px rgba(234, 84, 85, 0.6), 0 0 24px rgba(234, 84, 85, 0.35), 0 4px 20px rgba(0, 0, 0, 0.45) !important;
    animation: capsuleRecordGlow 1.8s ease-in-out infinite alternate;
}
@keyframes capsuleRecordGlow {
    0% {
        border-color: rgba(234, 84, 85, 0.7);
        box-shadow: 0 0 0 1px rgba(234, 84, 85, 0.4), 0 0 14px rgba(234, 84, 85, 0.25), 0 4px 20px rgba(0, 0, 0, 0.45);
    }
    100% {
        border-color: rgba(234, 84, 85, 1);
        box-shadow: 0 0 0 2px rgba(234, 84, 85, 0.85), 0 0 30px rgba(234, 84, 85, 0.45), 0 4px 20px rgba(0, 0, 0, 0.45);
    }
}
.agent-input-capsule.sent-glow {
    animation: capsuleSentGlow 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes capsuleSentGlow {
    0% {
        border-color: rgba(34, 197, 94, 0.95);
        box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.7), 0 0 25px rgba(34, 197, 94, 0.4);
    }
    100% {
        border-color: rgba(255, 255, 255, 0.09);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    }
}
.agent-input-capsule textarea {
    background: transparent;
    border: none;
    outline: none;
    color: #f3f4f6;
    font-size: 13px;
    line-height: 1.45;
    resize: none;
    width: 100%;
    min-height: 22px;
    max-height: 140px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    font-family: 'Nunito Sans', sans-serif;
    padding: 0;
    box-sizing: border-box;
}
.agent-input-capsule textarea::placeholder {
    color: #6b7280;
}

.agent-capsule-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.capsule-footer-left {
    display: flex;
    align-items: center;
    gap: 5px;
}
.capsule-footer-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.capsule-tool-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}
.capsule-tool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* Microphone / Voice Dictation Button & Equalizer Wave */
.capsule-tool-btn.mic-btn {
    position: relative;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.capsule-tool-btn.mic-btn.recording {
    background: #ea5455 !important;
    color: #ffffff !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    box-shadow: 0 0 12px rgba(234, 84, 85, 0.75), 0 0 24px rgba(234, 84, 85, 0.45) !important;
    animation: micPulseRecord 1.5s ease-in-out infinite alternate !important;
}
.capsule-tool-btn.mic-btn.recording .mic-icon-default {
    display: none !important;
}
.mic-wave-container {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 2.5px;
    height: 16px;
    width: 16px;
}
.capsule-tool-btn.mic-btn.recording .mic-wave-container {
    display: flex !important;
}
.wave-bar {
    width: 2.5px;
    background: #ffffff;
    border-radius: 2px;
    height: 14px;
    display: inline-block;
    transform-origin: center;
}
.wave-bar.bar-1 {
    animation: audioEqualizer 0.75s ease-in-out infinite alternate;
}
.wave-bar.bar-2 {
    animation: audioEqualizer 0.55s ease-in-out infinite alternate 0.15s;
}
.wave-bar.bar-3 {
    animation: audioEqualizer 0.85s ease-in-out infinite alternate 0.3s;
}
.wave-bar.bar-4 {
    animation: audioEqualizer 0.65s ease-in-out infinite alternate 0.1s;
}

@keyframes audioEqualizer {
    0% {
        height: 3px;
        opacity: 0.6;
    }
    50% {
        height: 14px;
        opacity: 1;
    }
    100% {
        height: 5px;
        opacity: 0.8;
    }
}
@keyframes micPulseRecord {
    0% {
        box-shadow: 0 0 8px rgba(234, 84, 85, 0.6), 0 0 16px rgba(234, 84, 85, 0.3);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 16px rgba(234, 84, 85, 0.95), 0 0 28px rgba(234, 84, 85, 0.55);
        transform: scale(1.06);
    }
}

/* Model Selector Button (Models hidden by default!) */
.model-picker-wrap {
    position: relative;
}
.agent-model-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #d1d5db;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 6px;
    transition: background 0.15s ease;
}
.agent-model-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.agent-model-pill .chevron-icon {
    color: #9ca3af;
    transition: transform 0.15s ease;
}

/* Status Pill */
.capsule-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #eab308;
    padding: 2px 5px;
    border-radius: 4px;
    cursor: default;
    user-select: none;
}
.status-warning-icon {
    font-size: 11px;
}
.status-warning-text {
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

/* Circular Arrow Send Button */
.capsule-send-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #32353e;
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}
.capsule-send-btn:hover {
    background: var(--color-accent);
    color: #0b0f02;
    transform: scale(1.05);
}

/* Model Selection Popover Menu (Upward Floating) */
.model-picker-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    width: 275px;
    background: #25272e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    padding: 6px 0;
    z-index: 1000;
    animation: popoverSlideUp 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes popoverSlideUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.popover-title {
    padding: 6px 14px 4px;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.popover-list {
    display: flex;
    flex-direction: column;
}
.popover-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: #d1d5db;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease;
}
.popover-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}
.popover-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: 600;
}
.popover-name .dim-text {
    color: #9ca3af;
    font-size: 11px;
    font-weight: normal;
}
.popover-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}
.popover-tag.notice {
    background: rgba(255, 255, 255, 0.06);
    color: #9ca3af;
}
.popover-tag.fast {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

/* Context '+' Quick Action Popover */
.context-plus-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    width: 290px;
    background: #25272e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    padding: 6px 0;
    z-index: 1000;
    animation: popoverSlideUp 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.context-popover-header {
    padding: 6px 14px 4px;
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: 0.06em;
    font-family: 'JetBrains Mono', monospace;
}
.context-popover-list {
    display: flex;
    flex-direction: column;
    max-height: 280px;
    overflow-y: auto;
}
.context-action-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 7px 14px;
    background: transparent;
    border: none;
    color: #d1d5db;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease;
}
.context-action-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}
.popover-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 5px 0;
}

/* Plan & Debug Subpages */
.agent-subpage-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
/* ═══════════════════════════════════════════════════════
   BRAND STRATEGY & PROJECT ROADMAP (PLAN TAB ENHANCEMENTS)
   ═══════════════════════════════════════════════════════ */
.plan-mode-switcher {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--ide-border-subtle);
    margin-bottom: 4px;
}
.plan-mode-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    white-space: nowrap;
}
.plan-mode-btn:hover {
    color: var(--color-text-bright);
    background: rgba(255, 255, 255, 0.05);
}
.plan-mode-btn.active {
    background: var(--ide-bg-active, #242732);
    color: var(--color-text-bright);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

body.light-theme .plan-mode-switcher,
body[data-theme="light"] .plan-mode-switcher {
    background: #e2e8f0;
    border-color: #cbd5e1;
}
body.light-theme .plan-mode-btn,
body[data-theme="light"] .plan-mode-btn {
    color: #475569;
}
body.light-theme .plan-mode-btn:hover,
body[data-theme="light"] .plan-mode-btn:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.05);
}
body.light-theme .plan-mode-btn.active,
body[data-theme="light"] .plan-mode-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.brand-plan-container,
.support-plan-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checklist-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.plan-phase-counter {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--color-accent);
    background: rgba(163, 230, 53, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(163, 230, 53, 0.25);
}
body.light-theme .plan-phase-counter,
body[data-theme="light"] .plan-phase-counter {
    color: #4d7c0f;
    background: rgba(101, 163, 13, 0.1);
    border-color: rgba(101, 163, 13, 0.25);
}

.project-phases-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-phase-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    transition: all 0.15s ease;
}
.project-phase-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}
.project-phase-card.in-progress {
    border-color: rgba(163, 230, 53, 0.35);
    background: rgba(163, 230, 53, 0.04);
}

body.light-theme .project-phase-card,
body[data-theme="light"] .project-phase-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
body.light-theme .project-phase-card:hover,
body[data-theme="light"] .project-phase-card:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
body.light-theme .project-phase-card.in-progress,
body[data-theme="light"] .project-phase-card.in-progress {
    border-color: rgba(101, 163, 13, 0.4);
    background: rgba(101, 163, 13, 0.05);
}

.phase-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.phase-number-badge {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.05em;
    margin-left: 4px;
}
body.light-theme .phase-number-badge,
body[data-theme="light"] .phase-number-badge {
    color: #4d7c0f;
}

.phase-status-pill {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}
.phase-status-pill.completed {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.phase-status-pill.in-progress {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.phase-status-pill.pending {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.phase-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-bright);
    margin-bottom: 4px;
}
.phase-desc {
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin: 0;
}

.plan-outreach-card {
    border-left: 3px solid var(--color-accent);
}
body.light-theme .plan-outreach-card,
body[data-theme="light"] .plan-outreach-card {
    border-left: 3px solid #65a30d;
}
.outreach-angle-body {
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-text-bright);
    background: rgba(0, 0, 0, 0.18);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--ide-border-subtle);
    font-style: italic;
}
body.light-theme .outreach-angle-body,
body[data-theme="light"] .outreach-angle-body {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 10px;
}

.agent-plan-hero, .agent-debug-hero {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 14px;
}
.plan-hero-badge, .debug-hero-badge {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}
.agent-plan-desc, .agent-debug-desc {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.4;
    margin: 0 0 12px 0;
}
.agent-plan-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.agent-checklist-card {
    background: #1f2025;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
}
.checklist-header {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: 0.03em;
}
.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.plan-check-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}
.plan-check-item input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--color-accent);
}
.check-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.check-title {
    font-size: 12px;
    font-weight: 600;
    color: #f3f4f6;
}
.check-desc {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.3;
}

/* Debug Form & Output */
.agent-debug-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.debug-label {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: 0.05em;
}
.debug-textarea {
    width: 100%;
    background: #141518;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #f3f4f6;
    line-height: 1.4;
    resize: vertical;
}
.debug-textarea:focus {
    border-color: var(--color-accent);
    outline: none;
}
.debug-results-card {
    background: #141518;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.debug-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.debug-result-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}
.debug-output-rendered {
    font-size: 12px;
    color: #d1d5db;
    line-height: 1.5;
    max-height: 300px;
    overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════
   BUTTONS & MODALS (FULL ROUNDED & SIZED)
   ═══════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 32px;
    padding: 0 16px;
    border-radius: var(--radius-full); /* FULL ROUNDED */
    border: 1px solid transparent;
    outline: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
    text-decoration: none;
}
.btn svg {
    width: 14px;
    height: 14px;
    max-width: 14px;
    max-height: 14px;
    flex-shrink: 0;
}
.btn-primary {
    background: var(--color-accent);
    color: #080808;
    border-color: var(--color-accent);
}
.btn-primary:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    transform: translateY(-1px);
}
.btn-secondary {
    background: #252836;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-secondary:hover {
    background: #313548;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.modal-overlay, .drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-card {
    background: var(--ide-bg-panel);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
}
.modal-header {
    background: #141414;
    padding: 14px 20px;
    border-bottom: 1px solid var(--ide-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.modal-header-icon,
.modal-icon {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    flex-shrink: 0 !important;
}
.modal-header h3 {
    font-size: 20px;
    color: var(--color-text-bright);
}
.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 20px;
    cursor: pointer;
    border-radius: var(--radius-full);
}
.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.form-group label {
    font-size: 11px;
    color: var(--color-text-muted);
}
.form-group input, .form-group select {
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-full); /* FULL ROUNDED */
    padding: 8px 14px;
    color: var(--color-text-bright);
    font-size: 12px;
    outline: none;
}
.form-group textarea {
    background: var(--ide-bg-input);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    color: var(--color-text-bright);
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
}
.form-row {
    display: flex;
    gap: 10px;
}
.flex-1 {
    flex: 1;
}
.modal-footer {
    padding: 14px 20px;
    background: #141414;
    border-top: 1px solid var(--ide-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Drawer */
.drawer-panel {
    background: var(--ide-bg-panel);
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}
.drawer-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--ide-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.drawer-body {
    padding: 20px;
}

/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVENESS & DOCK
   ═══════════════════════════════════════════════════════ */
.hide-desktop {
    display: none !important;
}

.ide-mobile-dock {
    display: none;
}

@media (max-width: 900px) {
    .hide-mobile {
        display: none !important;
    }
    .hide-desktop {
        display: flex !important;
    }

    .ide-activity-bar {
        display: none;
    }

    .ide-titlebar {
        height: 46px;
        padding: 0 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .titlebar-left {
        flex-shrink: 0;
        white-space: nowrap;
        gap: 8px;
    }
    .ide-app-title {
        font-size: 13px;
        font-weight: 800;
        white-space: nowrap !important;
    }
    .titlebar-center {
        display: none !important;
    }
    .titlebar-right {
        gap: 6px;
    }
    .operator-profile-pill {
        padding: 3px 8px;
    }
    .operator-select {
        font-size: 11px;
    }
    .btn-action-new {
        width: 32px;
        height: 32px;
        padding: 0;
        border-radius: var(--radius-full);
        justify-content: center;
    }
    .btn-action-new svg {
        width: 16px;
        height: 16px;
    }

    .ide-main-container {
        flex-direction: column;
        position: relative;
    }

    .ide-sidebar {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 88% !important;
        max-width: 340px;
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.85);
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }
    .ide-sidebar.mobile-open {
        transform: translateX(0);
    }

    .ide-agent-panel {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        width: 92% !important;
        max-width: 360px;
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.85);
        transform: translateX(100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }
    .ide-agent-panel.mobile-open {
        transform: translateX(0);
    }

    /* Mobile Bottom Dock */
    .ide-mobile-dock {
        display: flex;
        height: 56px;
        background: #141414;
        border-top: 1px solid var(--ide-border);
        align-items: center;
        justify-content: space-around;
        flex-shrink: 0;
        z-index: 100;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .mobile-dock-btn {
        background: transparent;
        border: none;
        color: var(--color-text-muted);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        font-size: 10px;
        cursor: pointer;
        padding: 6px 16px;
        border-radius: var(--radius-full);
    }
    .mobile-dock-btn svg {
        width: 18px;
        height: 18px;
    }
    .mobile-dock-btn.active {
        color: var(--color-accent);
        background: rgba(175, 225, 57, 0.1);
    }
}

/* Mobile-Specific Refinements (Phones < 640px) */
@media (max-width: 640px) {
    .hide-mobile-inline {
        display: none !important;
    }
    .hide-mobile-label {
        display: none !important;
    }

    .editor-breadcrumbs {
        padding: 4px 10px;
        height: 32px;
        white-space: nowrap;
        overflow: visible !important;
        overflow-x: visible !important;
        gap: 4px;
        font-size: 10px;
        position: relative;
        z-index: 50;
    }
    .crumb-root {
        display: none;
    }
    .editor-breadcrumbs .crumb-sep:first-of-type {
        display: none;
    }
    .domain-badges {
        display: none;
    }
    .ticket-switcher-btn {
        max-width: 150px;
        padding: 2px 8px;
        font-size: 10px;
    }
    .ticket-switcher-menu {
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        width: 85vw;
        max-width: 320px;
        z-index: 2000;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95);
    }

    .editor-feed-container {
        padding: 12px 10px;
        gap: 12px;
    }

    .ide-bottom-panel {
        max-height: 52vh;
        min-height: 120px;
        flex-shrink: 1;
    }
    .panel-content-body {
        padding: 6px 10px 8px;
        gap: 6px;
    }
    .wysiwyg-editor-surface {
        min-height: 65px;
        max-height: 120px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .panel-footer-actions {
        padding: 4px 0 2px;
        gap: 6px;
    }
    .footer-select-group select {
        padding: 4px 6px;
        font-size: 10px;
        max-width: 105px;
    }
    #previewReplyBtn {
        width: 32px;
        height: 32px;
        padding: 0;
        border-radius: var(--radius-full);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    #previewReplyBtn svg {
        width: 14px;
        height: 14px;
    }
    #sendReplyBtn,
    .footer-send-reply-btn {
        min-width: 80px;
        height: 32px;
        padding: 0 12px;
        border-radius: var(--radius-full);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.04em;
        flex-shrink: 0;
    }
    #sendReplyBtn svg,
    .footer-send-reply-btn svg {
        width: 13px;
        height: 13px;
    }
    .send-btn-label {
        display: inline !important;
    }
    .composer-header-send-btn {
        padding: 2px 8px;
        font-size: 10px;
        gap: 3px;
    }
    .composer-editor-wrapper textarea {
        height: 70px;
    }
}

/* ═══════════════════════════════════════════════════════
   PRELOADERS & EVENT LOADING ANIMATIONS (CSS-LOADERS DOTS)
   ═══════════════════════════════════════════════════════ */

/* 1. Bouncing 3-Dot Wave Loader (.loader-dots) — Multi-Color RGB Pulse */
.loader-dots {
    width: 48px;
    aspect-ratio: 2;
    --_g1: no-repeat radial-gradient(circle closest-side, #A3E635 92%, transparent); /* Creative Yadley Vivid Lime */
    --_g2: no-repeat radial-gradient(circle closest-side, #38bdf8 92%, transparent); /* Cyber Blue */
    --_g3: no-repeat radial-gradient(circle closest-side, #f59e0b 92%, transparent); /* Warm Amber Gold */
    background: 
        var(--_g1) 0%   50%,
        var(--_g2) 50%  50%,
        var(--_g3) 100% 50%;
    background-size: calc(100% / 3) 50%;
    animation: loader-dots-anim 1s infinite linear;
    display: inline-block;
    vertical-align: middle;
}
@keyframes loader-dots-anim {
    20% { background-position: 0% 0%, 50% 50%, 100% 50%; }
    40% { background-position: 0% 100%, 50% 0%, 100% 50%; }
    60% { background-position: 0% 50%, 50% 100%, 100% 0%; }
    80% { background-position: 0% 50%, 50% 50%, 100% 100%; }
}

/* 2. Orbital Jumping / Rotating Dots Loader (.loader-orbit) */
.loader-orbit {
    width: 14px;
    aspect-ratio: 1;
    position: relative;
    animation: loader-orbit-step 1.5s infinite steps(2);
    display: inline-block;
    vertical-align: middle;
}
.loader-orbit::before,
.loader-orbit::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #A3E635;
}
.loader-orbit::before {
    box-shadow: 20px 0 #38bdf8;
    transform: translateX(-20px);
    animation: loader-orbit-left 0.75s infinite linear alternate;
}
.loader-orbit::after {
    background: #f59e0b;
    transform: translateX(10px) rotate(0deg) translateX(10px);
    animation: loader-orbit-right 0.75s infinite linear alternate;
}
@keyframes loader-orbit-step {
    0%, 49.9% { transform: scale(1); }
    50%, 100% { transform: scale(-1); }
}
@keyframes loader-orbit-left {
    100% { box-shadow: 40px 0 #38bdf8; }
}
@keyframes loader-orbit-right {
    100% { transform: translateX(10px) rotate(-180deg) translateX(10px); }
}

/* 3. Traveling Scanning Dots Loader (.loader-scan) */
.loader-scan {
    width: 72px;
    height: 12px;
    --_g1: no-repeat radial-gradient(farthest-side, #A3E635 94%, transparent);
    --_g2: no-repeat radial-gradient(farthest-side, #f59e0b 94%, transparent);
    background:
        var(--_g1) 25% 0,
        var(--_g2) 75% 0;
    background-size: 12px 12px;
    position: relative;
    animation: loader-scan-outer 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}
.loader-scan::before {
    content: "";
    position: absolute;
    height: 12px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
    inset: 0;
    margin: auto;
    animation: loader-scan-inner 1s cubic-bezier(0.5, 300, 0.5, -300) infinite;
}
@keyframes loader-scan-outer {
    0%, 24%  { background-position: 25% 0, 75% 0; }
    40%      { background-position: 25% 0, 85% 0; }
    50%, 72% { background-position: 25% 0, 75% 0; }
    90%      { background-position: 15% 0, 75% 0; }
    100%     { background-position: 25% 0, 75% 0; }
}
@keyframes loader-scan-inner {
    100% { transform: translate(0.1px); }
}

/* Generic Fallback Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(175, 225, 57, 0.2);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin-wheel 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin-wheel {
    to { transform: rotate(360deg); }
}

/* Loading States & Containers */
.loading-state,
.loading-state-ide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 36px 20px;
    text-align: center;
    color: var(--color-text-muted);
}
.loading-title {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-bright);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.loading-sub {
    font-size: 11px;
    color: var(--color-text-dim);
    font-family: 'JetBrains Mono', monospace;
}

/* Agent Thinking Card (When Copilot is thinking) */
.chat-msg-agent.agent-thinking-bubble {
    background: transparent;
    border: none;
    padding: 0;
    width: 100%;
    box-shadow: none;
}

.agent-thinking-card {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(15, 23, 15, 0.95));
    border: 1px solid rgba(175, 225, 57, 0.28);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 16px rgba(175, 225, 57, 0.05);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: thinking-card-glow 2s infinite ease-in-out;
}

@keyframes thinking-card-glow {
    0%, 100% {
        border-color: rgba(175, 225, 57, 0.25);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }
    50% {
        border-color: rgba(175, 225, 57, 0.55);
        box-shadow: 0 4px 28px rgba(175, 225, 57, 0.15), inset 0 0 20px rgba(175, 225, 57, 0.08);
    }
}

.agent-thinking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.thinking-agent-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(175, 225, 57, 0.12);
    border: 1px solid rgba(175, 225, 57, 0.35);
    border-radius: var(--radius-full);
    padding: 3px 9px;
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--color-accent);
}

.agent-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 8px var(--color-accent);
    animation: pulse-agent-dot 1.2s infinite ease-in-out;
}

@keyframes pulse-agent-dot {
    0%, 100% { transform: scale(0.85); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; }
}

.thinking-status-indicator {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--color-text-muted);
}

.agent-thinking-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 4px 4px 4px;
}

.agent-thinking-caption {
    font-size: 11px;
    color: var(--color-text-muted);
    font-style: italic;
    text-align: center;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════
   GEMINI ICONS & SUBTLE BADGE AESTHETICS (REDUCED GREEN)
   ═══════════════════════════════════════════════════════ */
.gemini-nav-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(14, 165, 233, 0.45));
    transition: transform 0.2s ease;
}
.activity-btn:hover .gemini-nav-icon {
    transform: scale(1.12);
}
.gemini-header-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(14, 165, 233, 0.35));
}
.gemini-inline-icon {
    width: 13px;
    height: 13px;
    object-fit: contain;
    vertical-align: middle;
}

.agent-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: var(--radius-full);
    padding: 3px 10px;
    font-size: 10px;
    color: #e2e8f0 !important;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}
.agent-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8 !important; /* Sky Blue Pulse */
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.6) !important;
}

.agent-model-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    padding: 3px 8px;
    font-size: 10px;
    color: var(--color-text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════════════════════
   STAFF DIRECTORY & SIGNATURES MODAL
   ═══════════════════════════════════════════════════════ */
.staff-modal-card {
    max-width: 820px;
    width: 94vw;
    background: #16181e;
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.92);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.staff-modal-card .modal-header {
    padding: 16px 20px;
    background: #121317;
    border-bottom: 1px solid var(--ide-border);
}

.staff-modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.staff-modal-header-left .modal-header-icon {
    width: 28px;
    height: 28px;
    color: #ffffff;
    flex-shrink: 0;
}
.modal-subheading {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.staff-modal-layout {
    display: flex;
    min-height: 440px;
}

.staff-sidebar-column {
    width: 240px;
    border-right: 1px solid var(--ide-border);
    background: #101216;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.staff-members-nav-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 350px;
}

.staff-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    text-align: left;
    transition: all 0.12s ease;
    width: 100%;
}
.staff-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}
.staff-nav-item.active {
    background: #20232d;
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.staff-nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: #272a38;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.staff-nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-nav-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.staff-nav-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.staff-nav-role {
    font-size: 10px;
    color: var(--color-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-add-staff {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    justify-content: center;
}

.staff-editor-column {
    flex: 1;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    background: #16181e;
}

.staff-avatar-edit-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: #111317;
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-md);
}

.staff-avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background: #232634;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}
.staff-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.staff-avatar-initials-lg {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
}

.staff-avatar-action-btns {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.btn-upload-avatar {
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    width: fit-content;
}
.avatar-helper-text {
    font-size: 10px;
    color: var(--color-text-dim);
}

.staff-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.label-with-compliance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.compliance-badge-pill {
    font-size: 10px;
    background: rgba(163, 230, 53, 0.12);
    color: var(--color-accent);
    border: 1px solid rgba(163, 230, 53, 0.3);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.signature-textarea {
    width: 100%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    background: #101216;
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-sm);
    color: #ffffff;
    padding: 10px;
    resize: vertical;
    line-height: 1.5;
}
.signature-textarea:focus {
    border-color: rgba(255, 255, 255, 0.25);
}

.form-field-hint {
    font-size: 10px;
    color: var(--color-text-dim);
    margin-top: 4px;
    display: block;
}

.staff-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--ide-border);
    margin-top: auto;
}
.staff-footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 11px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    transition: all 0.12s ease;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.text-danger {
    color: #f87171 !important;
}
.text-danger:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

@media (max-width: 640px) {
    .staff-modal-layout {
        flex-direction: column;
    }
    .staff-sidebar-column {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--ide-border);
    }
    .staff-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════
   CANNED RESPONSES & PROMPTS WIDGET
   ═══════════════════════════════════════════════════════ */
.canned-responses-widget {
    background: #14151b;
    border-bottom: 1px solid var(--ide-border-subtle);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}
.canned-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.canned-widget-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: var(--color-text-dim);
}
.canned-widget-title svg {
    width: 12px;
    height: 12px;
    color: var(--color-accent);
}
.canned-count-badge {
    font-size: 9px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-muted);
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-family: 'JetBrains Mono', monospace;
}
.canned-widget-control {
    display: flex;
    align-items: center;
    gap: 8px;
}
.canned-dropdown-select {
    flex: 1;
    min-width: 0;
    background: #0d0e12;
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 11px;
    padding: 6px 8px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s ease;
}
.canned-dropdown-select:focus {
    border-color: rgba(255, 255, 255, 0.3);
}
.canned-apply-btn {
    padding: 6px 12px;
    font-size: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════
   TOAST NOTIFICATIONS (NON-BLOCKING)
   ═══════════════════════════════════════════════════════ */
.cy-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.cy-toast {
    background: #191b22;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 10px 16px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.2s ease;
    max-width: 360px;
}
.cy-toast.success {
    border-left: 3px solid var(--color-accent);
}
.cy-toast.info {
    border-left: 3px solid #60a5fa;
}
.cy-toast.error {
    border-left: 3px solid #f87171;
}
.cy-toast.hide {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
}
.cy-toast-icon {
    font-size: 14px;
    flex-shrink: 0;
}
.cy-toast-msg {
    flex: 1;
    line-height: 1.4;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ═══════════════════════════════════════════════════════
   RESPONSE TEMPLATES MANAGEMENT MODAL
   ═══════════════════════════════════════════════════════ */
.templates-modal-card {
    max-width: 900px;
    width: 92vw;
    background: #14161d;
    border: 1px solid var(--ide-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
}

.templates-modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.templates-modal-header-left .modal-header-icon {
    width: 26px;
    height: 26px;
    color: var(--color-accent);
    flex-shrink: 0;
}

.templates-modal-layout {
    display: flex;
    min-height: 480px;
    max-height: 80vh;
}

.templates-sidebar-column {
    width: 260px;
    border-right: 1px solid var(--ide-border);
    background: #101216;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.templates-nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    max-height: 420px;
}

.template-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    text-align: left;
    transition: all 0.12s ease;
    width: 100%;
    font-size: 12px;
}
.template-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}
.template-nav-item.active {
    background: rgba(163, 230, 53, 0.12);
    border-color: rgba(163, 230, 53, 0.35);
    color: var(--color-accent);
    font-weight: 600;
}
.template-nav-icon {
    font-size: 14px;
    flex-shrink: 0;
}
.template-nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.btn-add-template {
    width: 100%;
    padding: 8px 12px;
    font-size: 11px;
}

.templates-editor-column {
    flex: 1;
    padding: 20px 24px;
    background: #14161d;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.template-form-grid {
    display: flex;
    gap: 12px;
}
.template-form-grid .flex-2 {
    flex: 2;
}
.template-form-grid .flex-1 {
    flex: 1;
}

.template-editor-group {
    display: flex;
    flex-direction: column;
}

.template-wysiwyg .wysiwyg-editor-surface,
.template-wysiwyg .wysiwyg-raw-textarea {
    min-height: 180px;
    max-height: 320px;
}

.templates-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--ide-border);
    margin-top: auto;
}
.templates-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ═══════════════════════════════════════════════════════
   18. INSERT LINK MODAL
   ═══════════════════════════════════════════════════════ */
.link-modal-card {
    max-width: 440px;
    width: 100%;
}
.link-modal-card .modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ═══════════════════════════════════════════════════════
   19. ATTACHMENTS TRAY & CHIPS
   ═══════════════════════════════════════════════════════ */
.attachments-tray {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: var(--ide-bg-sidebar);
    border-top: 1px solid var(--ide-border);
    max-height: 120px;
    overflow-y: auto;
}
.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: var(--ide-bg-active);
    border: 1px solid var(--ide-border-focus);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--color-text-bright);
}
.attachment-chip svg {
    width: 12px;
    height: 12px;
    color: var(--color-accent);
    flex-shrink: 0;
}
.attachment-chip-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.attachment-chip-size {
    font-size: 10px;
    color: var(--color-text-dim);
}
.attachment-chip-remove {
    background: transparent;
    border: none;
    color: var(--color-text-dim);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 0 2px;
    margin-left: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.1s ease;
}
.attachment-chip-remove:hover {
    color: #ef4444;
}
.attachment-chip.cloud-backed {
    border-color: rgba(163, 230, 53, 0.45);
    background: rgba(163, 230, 53, 0.08);
}
.attachment-chip.cloud-backed svg {
    color: var(--color-accent);
}
.attachment-chip-copy {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 11px;
    padding: 0 2px;
    margin: 0 1px;
    opacity: 0.8;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.attachment-chip-copy:hover {
    transform: scale(1.2);
    opacity: 1;
}

#composerCard.drag-over {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 25px rgba(163, 230, 53, 0.35) !important;
}

/* ==========================================================================
   AI ERROR LOG ANALYZER ("PASTE & PATCH") STYLES
   ========================================================================== */
.composer-patch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}
.composer-patch-btn:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: #10b981;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}
.composer-patch-btn svg {
    width: 14px;
    height: 14px;
}

.log-analyzer-modal-card {
    max-width: 860px;
    width: 95vw;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}
.log-analyzer-body {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.log-input-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.log-sample-pills {
    display: flex;
    align-items: center;
    gap: 6px;
}
.sample-pill-label {
    font-size: 11px;
    color: var(--color-text-dim);
}
.sample-pill-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-muted);
    font-size: 10px;
    font-family: inherit;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.1s ease;
}
.sample-pill-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #34d399;
}
.raw-log-textarea {
    width: 100%;
    background: #070d18;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    color: #38bdf8;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 12px;
    line-height: 1.5;
    padding: 12px 14px;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s ease;
}
.raw-log-textarea:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18);
}
.raw-log-textarea::placeholder {
    color: #475569;
}
.log-analyzer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}
.btn-analyze-log {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    font-size: 12px;
    letter-spacing: 0.5px;
}
.log-analysis-output-col {
    background: rgba(2, 6, 23, 0.65);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.log-output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.log-output-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}
.log-results-content {
    font-size: 13px;
    line-height: 1.6;
    color: #cbd5e1;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 6px;
}
.log-results-content h3 {
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
    margin-top: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 4px;
}
.log-results-content code {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

/* ==========================================================================
   SAAS WHITE-LABELING & WHMCS MARKETPLACE STYLES
   ========================================================================== */
.white-label-modal-card {
    max-width: 740px;
    width: 95vw;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.white-label-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.white-label-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 640px) {
    .white-label-grid {
        grid-template-columns: 1fr;
    }
}
.theme-color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}
.theme-color-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.theme-color-circle:hover {
    transform: scale(1.15);
}
.theme-color-circle.active {
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    transform: scale(1.15);
}
.whmcs-marketplace-box {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.marketplace-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.marketplace-box-badge {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
}
.marketplace-box-header h4 {
    margin: 0;
    font-size: 13px;
    color: #f8fafc;
}
.marketplace-box-desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #94a3b8;
}
.marketplace-box-desc code {
    color: #34d399;
    font-family: 'JetBrains Mono', monospace;
}
.marketplace-download-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}
.btn-download-addon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 11px;
    text-decoration: none;
}
.addon-install-note {
    font-size: 11px;
    color: #64748b;
}
.addon-install-note code {
    color: #38bdf8;
    font-family: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════════════════════
   EXPANDED COMPOSER (FULL HEIGHT CENTER WORKSPACE)
   ═══════════════════════════════════════════════════════ */
.ide-bottom-panel.expanded {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    z-index: 60 !important;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.85) !important;
    border-top: none !important;
}
.ide-bottom-panel.expanded .panel-content-body {
    height: calc(100% - 34px) !important;
    display: flex !important;
    flex-direction: column !important;
}
.ide-bottom-panel.expanded .composer-editor-wrapper {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
}
.ide-bottom-panel.expanded .wysiwyg-editor-surface {
    flex: 1 !important;
    height: auto !important;
    min-height: 250px !important;
    max-height: none !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    padding: 16px 20px !important;
}
.ide-bottom-panel.expanded .wysiwyg-raw-textarea {
    flex: 1 !important;
    height: auto !important;
    max-height: none !important;
    font-size: 13px !important;
}

/* ═══════════════════════════════════════════════════════
   DRAFT AUTOSAVE INDICATOR & CONTROLS
   ═══════════════════════════════════════════════════════ */
.draft-autosave-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 6px;
    user-select: none;
}
.draft-autosave-badge .autosave-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
    animation: autosavePulse 2s infinite ease-in-out;
}
@keyframes autosavePulse {
    0%, 100% { opacity: 0.55; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); }
}
.btn-xs {
    padding: 2px 7px;
    font-size: 10px;
    border-radius: 4px;
}
.text-danger {
    color: #f87171 !important;
}
.text-danger:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.15) !important;
}

/* ═══════════════════════════════════════════════════════
   PHOTO SIGNATURE TOGGLE & SIGNATURE CARD IN COMPOSER
   ═══════════════════════════════════════════════════════ */
.signature-auto-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--color-text-muted);
    cursor: pointer;
    margin-left: 8px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    user-select: none;
    transition: all 0.15s ease;
}
.signature-auto-toggle:hover {
    color: var(--color-text-bright);
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
}
.signature-auto-toggle input[type="checkbox"] {
    accent-color: var(--color-accent);
    cursor: pointer;
}
.staff-signature-block {
    margin-top: 22px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    user-select: all;
}
.staff-sig-name {
    color: #f8fafc;
}
.staff-sig-role {
    color: #94a3b8;
}
body.light-theme .staff-signature-block,
body[data-theme="light"] .staff-signature-block {
    border-top-color: #cbd5e1 !important;
}
body.light-theme .staff-sig-name,
body[data-theme="light"] .staff-sig-name {
    color: #0f172a !important;
}
body.light-theme .staff-sig-role,
body[data-theme="light"] .staff-sig-role {
    color: #475569 !important;
}

/* ═══════════════════════════════════════════════════════
   AI ASSISTANCE PROVIDER SELECTOR BAR
   ═══════════════════════════════════════════════════════ */
.ai-provider-bar {
    padding: 6px 10px;
    border-bottom: 1px solid var(--ide-border-subtle);
    background: #111111;
}
.ai-provider-select {
    width: 100%;
    background: #181818;
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-family: 'Nunito Sans', sans-serif;
    outline: none;
    cursor: pointer;
}
.ai-provider-select:focus {
    border-color: var(--color-accent);
}

/* ═══════════════════════════════════════════════════════
   BREADCRUMBS NOWRAP FIX (ZERO AWKWARD WRAPPING)
   ═══════════════════════════════════════════════════════ */
.editor-breadcrumbs {
    white-space: nowrap !important;
    overflow: hidden !important;
}
.editor-breadcrumbs .crumb-client {
    max-width: min(380px, 40vw) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
    vertical-align: middle !important;
}
.editor-breadcrumbs .ticket-switcher-wrap {
    max-width: 260px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}
.editor-breadcrumbs .ticket-switcher-btn {
    max-width: 260px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* ═══════════════════════════════════════════════════════
   COMPOSER EXPAND, FLOPPY ICON & LICENSING ENGINE
   ═══════════════════════════════════════════════════════ */

/* Full-Height Expanded Composer */
.ide-bottom-panel.expanded {
    position: absolute !important;
    top: 34px !important; /* right below breadcrumbs */
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: 100% !important;
    z-index: 50 !important;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.7);
}

.ide-editor-area {
    position: relative !important;
}

/* Window controls (Expand & Minimize) pinned to prevent overflow */
.panel-window-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    padding: 2px 6px;
    flex-shrink: 0;
    margin-left: 6px;
}
.panel-window-controls .panel-toggle-btn {
    padding: 3px 5px;
    color: var(--color-text-muted);
    transition: all 0.15s ease;
    border-radius: 4px;
}
.panel-window-controls .panel-toggle-btn:hover {
    color: var(--color-accent);
    background: rgba(163, 230, 53, 0.15);
}

/* Interactive Floppy Disk Icon (Draft Autosave & Discard) */
.draft-floppy-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    padding: 3px 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.draft-floppy-btn .floppy-icon {
    width: 15px;
    height: 15px;
    transition: stroke 0.2s ease, filter 0.2s ease;
}
.draft-floppy-btn .floppy-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

/* Clean status: no pending unsaved edits */
.draft-floppy-btn.clean {
    color: #64748b;
    border-color: rgba(255, 255, 255, 0.06);
}
.draft-floppy-btn.clean .floppy-dot {
    background: #64748b;
    opacity: 0.4;
}

/* Dirty status: actively typing / saving */
.draft-floppy-btn.dirty {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}
.draft-floppy-btn.dirty .floppy-dot {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
    animation: pulse-dot 1.2s infinite ease-in-out;
}

/* Saved status: autosaved safely in browser storage */
.draft-floppy-btn.saved {
    color: #a3e635;
    background: rgba(163, 230, 53, 0.12);
    border-color: rgba(163, 230, 53, 0.35);
}
.draft-floppy-btn.saved .floppy-dot {
    background: #a3e635;
    box-shadow: 0 0 6px rgba(163, 230, 53, 0.8);
}
.draft-floppy-btn:hover {
    border-color: currentColor;
    transform: scale(1.05);
}

.btn-icon-tab {
    padding: 3px 8px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: var(--radius-full);
}
.btn-icon-tab svg {
    width: 12px;
    height: 12px;
}
.compact-preset-select {
    max-width: 115px;
    padding: 3px 8px;
    font-size: 11px;
}

/* Titlebar license badge */
.license-badge-btn {
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.15), rgba(59, 130, 246, 0.15)) !important;
    border: 1px solid rgba(163, 230, 53, 0.4) !important;
    color: var(--color-accent) !important;
    font-weight: 700 !important;
    font-size: 10px !important;
    padding: 3px 8px !important;
    border-radius: var(--radius-full) !important;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}
.license-badge-btn:hover {
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.25), rgba(59, 130, 246, 0.25)) !important;
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 10px rgba(163, 230, 53, 0.3);
}
.license-badge-btn svg {
    width: 12px;
    height: 12px;
}

/* Licensing Modal */
.license-modal-card {
    max-width: 780px !important;
    width: 95% !important;
    background: #141414 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
}
.license-modal-body {
    padding: 16px 20px !important;
    max-height: 75vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.license-active-box {
    background: #1c1c1c;
    border: 1px solid rgba(163, 230, 53, 0.3);
    border-radius: var(--radius-sm);
    padding: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.license-active-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.license-plan-badge {
    background: var(--color-accent);
    color: #0b0f02;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: 4px;
}
.license-plan-title {
    margin: 0;
    font-size: 18px;
    color: #ffffff;
}
.license-status-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(163, 230, 53, 0.15);
    color: var(--color-accent);
    border: 1px solid rgba(163, 230, 53, 0.3);
}
.license-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 16px;
    font-size: 12px;
}
.license-meta-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.license-meta-item .meta-label {
    color: var(--color-text-muted);
    font-size: 11px;
}
.license-meta-item .meta-value {
    color: #ffffff;
    font-weight: 600;
}
.key-display-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.key-display-row code {
    background: #0d0d0d;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--color-accent);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.license-tiers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.tier-card {
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.tier-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}
.tier-card.featured {
    border-color: var(--color-accent);
    background: #1c2018;
    box-shadow: 0 4px 20px rgba(163, 230, 53, 0.1);
}
.tier-badge {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: #0b0f02;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.tier-title {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 4px;
}
.tier-price {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}
.tier-period {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 400;
}
.tier-desc {
    font-size: 11px;
    color: var(--color-text-muted);
    margin: 0 0 12px 0;
    line-height: 1.4;
}
.tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    color: #d1d5db;
    flex: 1;
}
.tier-features li {
    line-height: 1.3;
}
.license-activate-section {
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.license-activate-section h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #ffffff;
}
.activate-sub {
    font-size: 11px;
    color: var(--color-text-muted);
    margin: 0 0 10px 0;
}
.activate-input-row {
    display: flex;
    gap: 8px;
}
.activate-input-row input {
    flex: 1;
    background: #0f0f0f;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 7px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #ffffff;
    outline: none;
}
.activate-input-row input:focus {
    border-color: var(--color-accent);
}

/* ═══════════════════════════════════════════════════════
   SCROLLABLE MESSAGE & TICKET PREVIEW MODAL
   ═══════════════════════════════════════════════════════ */
.preview-modal-card {
    max-width: 820px !important;
    width: 95% !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    background: #121212 !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9) !important;
}

.preview-modal-card .modal-header-icon {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    flex-shrink: 0 !important;
    color: var(--color-accent) !important;
}

.preview-container {
    flex: 1 1 auto !important;
    max-height: calc(90vh - 140px) !important;
    overflow-y: scroll !important; /* Force always-visible scrollbar */
    padding: 24px 28px !important;
    font-size: 14px !important;
    line-height: 1.65 !important;
    color: #e2e8f0 !important;
    background: #181818 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    word-break: break-word !important;
    scrollbar-gutter: stable !important;
}

/* Distinct high-visibility scrollbar */
.preview-container::-webkit-scrollbar {
    width: 10px !important;
    display: block !important;
}
.preview-container::-webkit-scrollbar-track {
    background: #0f0f0f !important;
    border-radius: 6px !important;
}
.preview-container::-webkit-scrollbar-thumb {
    background: rgba(163, 230, 53, 0.45) !important;
    border-radius: 6px !important;
    border: 2px solid #0f0f0f !important;
}
.preview-container::-webkit-scrollbar-thumb:hover {
    background: rgba(163, 230, 53, 0.8) !important;
}

.preview-container p {
    margin-bottom: 14px !important;
}
.preview-container h1, .preview-container h2, .preview-container h3 {
    color: #ffffff !important;
    margin-top: 18px !important;
    margin-bottom: 10px !important;
}
.preview-container ul, .preview-container ol {
    margin-bottom: 14px !important;
    padding-left: 24px !important;
}
.preview-container li {
    margin-bottom: 6px !important;
}
.preview-container a {
    color: var(--color-accent) !important;
    text-decoration: underline !important;
}
.preview-container img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 6px !important;
    margin: 8px 0 !important;
}




