#ai-panel-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#ai-panel-backdrop.visible {
    display: block;
    opacity: 1;
}

#ai-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 420px;
    min-width: 320px;
    max-width: 600px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: rgba(18, 18, 28, 0.97);
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.5), -1px 0 0 rgba(124, 58, 237, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
body.ai-panel-right #ai-panel,
body:not(.ai-panel-left) #ai-panel {
    right: 0;
    left: auto;
    border-left: 1px solid rgba(124, 58, 237, 0.25);
    transform: translateX(100%);
}
body.ai-panel-left #ai-panel {
    left: 0;
    right: auto;
    border-right: 1px solid rgba(124, 58, 237, 0.25);
    border-left: none;
    transform: translateX(-100%);
}
#ai-panel.open::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    z-index: 10;
    background: linear-gradient(
        180deg,
        rgba(88, 28, 135, 0.1) 0%,
        rgba(124, 58, 237, 0.8) 15%,
        rgba(251, 191, 36, 0.9) 35%,
        rgba(124, 58, 237, 0.8) 55%,
        rgba(251, 191, 36, 0.6) 75%,
        rgba(88, 28, 135, 0.1) 100%
    );
    background-size: 100% 300%;
    animation: ai-led-strip 3s linear infinite;
    filter: blur(0.5px);
    pointer-events: none;
}
body.ai-panel-right #ai-panel.open::before,
body:not(.ai-panel-left) #ai-panel.open::before {
    left: 0;
    right: auto;
    border-radius: 0 0 0 2px;
}
body.ai-panel-left #ai-panel.open::before {
    right: 0;
    left: auto;
    border-radius: 0 2px 0 0;
}
#ai-panel.open::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 12px;
    z-index: 9;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(124, 58, 237, 0.15) 15%,
        rgba(251, 191, 36, 0.1) 35%,
        rgba(124, 58, 237, 0.15) 55%,
        rgba(251, 191, 36, 0.08) 75%,
        transparent 100%
    );
    background-size: 100% 300%;
    animation: ai-led-strip 3s linear infinite;
    filter: blur(6px);
    pointer-events: none;
}
body.ai-panel-right #ai-panel.open::after,
body:not(.ai-panel-left) #ai-panel.open::after {
    left: 0;
    right: auto;
}
body.ai-panel-left #ai-panel.open::after {
    right: 0;
    left: auto;
}
@keyframes ai-led-strip {
    0% { background-position: 0 0; }
    100% { background-position: 0 300%; }
}
body.ai-panel-right #ai-panel.open,
body.ai-panel-left #ai-panel.open,
body:not(.ai-panel-left) #ai-panel.open,
#ai-panel.open {
    transform: translateX(0) !important;
    right: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
}
body.ai-panel-left #ai-panel.open {
    right: auto !important;
    left: 0 !important;
}

body.ai-panel-compact #ai-panel {
    width: 420px;
    min-width: 320px;
    max-width: 600px;
}
body.ai-panel-half #ai-panel {
    width: 50vw !important;
    max-width: 50vw !important;
    min-width: 320px;
}
body.ai-panel-full #ai-panel {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    border-left: none !important;
    border-right: none !important;
}

body.ai-panel-compact .main-container,
body.ai-panel-compact main,
body.ai-panel-compact .container {
    transition: margin 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.ai-panel-half .main-container,
body.ai-panel-half main,
body.ai-panel-half .container {
    transition: margin 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#ai-panel-resize {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: col-resize;
    z-index: 10;
    background: transparent;
    transition: background 0.2s;
}
body.ai-panel-right #ai-panel-resize,
body:not(.ai-panel-left) #ai-panel-resize {
    left: -4px;
}
body.ai-panel-left #ai-panel-resize {
    right: -4px;
    left: auto;
}
body.ai-panel-half #ai-panel-resize,
body.ai-panel-full #ai-panel-resize {
    display: none;
}
#ai-panel-resize:hover,
#ai-panel-resize.active {
    background: rgba(124, 58, 237, 0.5);
}

.ai-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(30, 20, 50, 0.8) 0%, rgba(18, 18, 28, 0.6) 100%);
}
.ai-panel-header-logo {
    flex-shrink: 0;
}
.ai-panel-header-info {
    flex: 1;
    min-width: 0;
}
.ai-panel-header-name {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ai-panel-header-status {
    font-size: 11px;
    color: rgba(124, 58, 237, 0.8);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-panel-context-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.ai-panel-context-badge.ctx-generate { background: rgba(124, 58, 237, 0.2); color: #a78bfa; }
.ai-panel-context-badge.ctx-streams { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.ai-panel-context-badge.ctx-compliance { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.ai-panel-context-badge.ctx-run { background: rgba(251, 191, 36, 0.2); color: #fde68a; }
.ai-panel-context-badge.ctx-dashboard { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.ai-panel-context-badge.ctx-general { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.ai-panel-context-badge.ctx-planner { background: rgba(124, 58, 237, 0.18); color: #c4b5fd; }
.ai-panel-context-badge.ctx-units { background: rgba(124, 58, 237, 0.15); color: #a78bfa; }
.ai-panel-context-badge.ctx-course-builder { background: rgba(124, 58, 237, 0.22); color: #ddd6fe; }
.ai-panel-context-badge.ctx-pipeline { background: rgba(124, 58, 237, 0.12); color: #8b5cf6; }
.ai-panel-context-badge.ctx-templates { background: rgba(124, 58, 237, 0.16); color: #b197fc; }
.ai-panel-context-badge.ctx-books { background: rgba(99, 102, 241, 0.18); color: #a5b4fc; }
.ai-panel-context-badge.ctx-book-detail { background: rgba(99, 102, 241, 0.22); color: #c7d2fe; }
.ai-panel-context-badge.ctx-toolkit { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.ai-panel-context-badge.ctx-pptx-builder { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.ai-panel-context-badge.ctx-polish { background: rgba(99, 102, 241, 0.16); color: #93a3f8; }
.ai-panel-context-badge.ctx-canvas { background: rgba(99, 102, 241, 0.12); color: #818cf8; }
.ai-panel-context-badge.ctx-settings { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.ai-panel-context-badge.ctx-system-health { background: rgba(100, 116, 139, 0.18); color: #cbd5e1; }
.ai-panel-context-badge.ctx-scope { background: rgba(100, 116, 139, 0.22); color: #94a3b8; }
.ai-panel-context-badge.ctx-evidence { background: rgba(100, 116, 139, 0.16); color: #cbd5e1; }
.ai-panel-context-badge.ctx-admin { background: rgba(100, 116, 139, 0.24); color: #e2e8f0; }
.ai-panel-context-badge.ctx-benchmark { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }
.ai-panel-context-badge.ctx-funding { background: rgba(100, 116, 139, 0.18); color: #cbd5e1; }
.ai-panel-context-badge.ctx-learner { background: rgba(20, 184, 166, 0.2); color: #5eead4; }
.ai-panel-context-badge.ctx-learner-courses { background: rgba(20, 184, 166, 0.18); color: #99f6e4; }
.ai-panel-context-badge.ctx-learning { background: rgba(20, 184, 166, 0.15); color: #5eead4; }
.ai-panel-context-badge.ctx-onboarding { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }

.ai-panel-header-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    align-items: center;
    flex-wrap: wrap;
}
.ai-panel-header-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    text-decoration: none;
}
.ai-panel-header-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
}
.ai-panel-header-btn.active {
    color: #a78bfa;
    background: rgba(124, 58, 237, 0.15);
}
.ai-panel-header-btn svg {
    width: 16px;
    height: 16px;
}

.ai-mode-group {
    display: flex;
    gap: 1px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 1px;
    margin: 0 2px;
}
.ai-mode-group .ai-mode-btn {
    padding: 4px 5px;
    border-radius: 5px;
}
.ai-mode-group .ai-mode-btn.active {
    background: rgba(124, 58, 237, 0.25);
    color: #a78bfa;
}

.ai-research-toggle.active {
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.15) !important;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.2);
}

.ai-popout-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 8px;
    background: #7c3aed;
    color: #fff;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ai-connection-bar {
    padding: 6px 16px;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    flex-shrink: 0;
    animation: ai-connection-slide 0.3s ease;
}
.ai-connection-bar.reconnected {
    background: #d1fae5;
    color: #065f46;
}
@keyframes ai-connection-slide {
    from { max-height: 0; opacity: 0; padding: 0 16px; }
    to { max-height: 40px; opacity: 1; padding: 6px 16px; }
}

.ai-panel-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    background: rgba(18, 18, 28, 0.4);
    padding: 0 8px;
}
.ai-panel-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}
.ai-panel-tab:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.03);
}
.ai-panel-tab.active {
    color: #a78bfa;
    border-bottom-color: #7c3aed;
}
.ai-panel-tab svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}
.ai-panel-tab.active svg {
    opacity: 1;
}

.ai-panel-tab-content {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.ai-panel-tab-content.active {
    display: flex;
    opacity: 1;
}

.ai-filter-bar {
    display: flex;
    gap: 4px;
    padding: 8px 16px;
    flex-shrink: 0;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    align-items: center;
}
.ai-filter-chip {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ai-filter-chip:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.2);
    color: rgba(255, 255, 255, 0.7);
}
.ai-filter-chip.active {
    background: rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.4);
    color: #a78bfa;
}
.ai-filter-search-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.ai-filter-search-btn:hover {
    color: #a78bfa;
}

.ai-search-bar {
    display: flex;
    gap: 6px;
    padding: 6px 16px;
    align-items: center;
    background: rgba(18, 18, 28, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}
.ai-search-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 4px 8px;
    color: #e2e8f0;
    font-size: 12px;
    outline: none;
}
.ai-search-input:focus {
    border-color: rgba(124, 58, 237, 0.4);
}
.ai-search-count {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    min-width: 50px;
    text-align: center;
}
.ai-search-nav,
.ai-search-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 11px;
    border-radius: 3px;
    transition: color 0.15s;
}
.ai-search-nav:hover,
.ai-search-close:hover {
    color: #e2e8f0;
}

.search-highlight {
    background: rgba(251, 191, 36, 0.3);
    border-radius: 2px;
    padding: 0 1px;
}
.search-highlight-active {
    background: rgba(251, 191, 36, 0.6);
    outline: 1px solid #fbbf24;
}

.ai-msg-collapsed {
    display: none !important;
}
.ai-collapsed-divider {
    text-align: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.25);
    padding: 2px 0;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.06);
}

.ai-panel-chat {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.25) transparent;
}
.ai-panel-chat::-webkit-scrollbar {
    width: 4px;
}
.ai-panel-chat::-webkit-scrollbar-track {
    background: transparent;
}
.ai-panel-chat::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.25);
    border-radius: 2px;
}
.ai-panel-chat::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.4);
}

.ai-panel-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 16px;
    flex: 1;
}
.ai-panel-welcome-logo {
    margin-bottom: 16px;
}
.ai-panel-welcome h3 {
    color: #e2e8f0;
    font-size: 16px;
    margin: 0 0 6px 0;
    font-weight: 600;
}
.ai-panel-welcome p {
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    margin: 0 0 20px 0;
    line-height: 1.5;
}
.ai-panel-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.ai-panel-chip {
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    color: rgba(167, 139, 250, 0.9);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}
.ai-panel-chip:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.4);
    color: #e2e8f0;
    transform: translateY(-1px);
}
.ai-panel-chip--feedback {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.25);
    color: rgba(251, 191, 36, 0.9);
}
.ai-panel-chip--feedback:hover {
    background: rgba(251, 191, 36, 0.18);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fbbf24;
}

.ai-panel-msg {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    max-width: 100%;
    animation: ai-panel-msg-enter 0.25s ease-out;
}
.ai-panel-msg.user {
    flex-direction: row-reverse;
}
@keyframes ai-panel-msg-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-panel-msg-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    color: #e2e8f0;
    letter-spacing: 0.5px;
}
.ai-panel-msg.assistant .ai-panel-msg-avatar {
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.2);
}
.ai-panel-msg.user .ai-panel-msg-avatar {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.ai-panel-msg-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.55;
    color: #e2e8f0;
    max-width: 85%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.ai-panel-msg.assistant .ai-panel-msg-bubble {
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-top-left-radius: 4px;
}
.ai-panel-msg.user .ai-panel-msg-bubble {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-top-right-radius: 4px;
}
.ai-panel-msg-bubble p { margin: 0 0 6px 0; }
.ai-panel-msg-bubble p:last-child { margin-bottom: 0; }
.ai-panel-msg-bubble code {
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
}
.ai-panel-msg-bubble pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 10px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 6px 0;
    font-size: 12px;
}
.ai-panel-msg-bubble ul,
.ai-panel-msg-bubble ol {
    padding-left: 18px;
    margin: 4px 0;
}
.ai-panel-msg-bubble li { margin-bottom: 2px; }
.ai-panel-msg-bubble strong { color: #f0f0f5; }
.ai-panel-msg-bubble a {
    color: #a78bfa;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ai-panel-msg-bubble a:hover { color: #c4b5fd; }
.ai-panel-msg-bubble hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}
.ai-panel-msg-bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0;
    font-size: 12px;
}
.ai-panel-msg-bubble th,
.ai-panel-msg-bubble td {
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}
.ai-panel-msg-bubble th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

@keyframes ai-panel-tool-enter {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

.ai-tool-result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0;
    font-size: 11px;
}
.ai-tool-result-table th {
    background: rgba(124, 58, 237, 0.1);
    color: #a78bfa;
    font-weight: 600;
    text-transform: capitalize;
    padding: 4px 8px;
    text-align: left;
    border: 1px solid rgba(124, 58, 237, 0.15);
}
.ai-tool-result-table td {
    padding: 3px 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
}
.ai-tool-result-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}
.ai-tool-status-chip {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ai-tool-result-link {
    color: #a78bfa !important;
    text-decoration: underline;
    font-size: 11px;
}

@keyframes ai-panel-spin {
    to { transform: rotate(360deg); }
}

.ai-panel-typing-enhanced {
    padding: 8px 12px;
    animation: ai-panel-msg-enter 0.25s ease-out;
}
.ai-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-typing-dots {
    display: flex;
    gap: 4px;
}
.ai-typing-dots .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.5);
    animation: ai-panel-bounce 1.4s infinite ease-in-out both;
}
.ai-typing-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dots .dot:nth-child(2) { animation-delay: -0.16s; }
.ai-typing-text {
    font-size: 11px;
    color: rgba(167, 139, 250, 0.7);
    font-weight: 500;
}
.ai-panel-typing-enhanced.research .ai-typing-dots .dot {
    background: rgba(251, 191, 36, 0.6);
}
.ai-panel-typing-enhanced.research .ai-typing-text {
    color: rgba(251, 191, 36, 0.8);
}
.ai-typing-progress {
    height: 2px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 1px;
    margin-top: 6px;
    overflow: hidden;
}
.ai-typing-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.4), rgba(124, 58, 237, 0.7));
    border-radius: 1px;
    transition: width 0.5s ease;
}
.ai-panel-typing-enhanced.research .ai-typing-progress-bar {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.3), rgba(251, 191, 36, 0.7));
}
@keyframes ai-panel-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.ai-panel-input-area {
    padding: 18px 22px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(18, 18, 28, 0.85) 0%, rgba(30, 20, 50, 0.7) 100%);
}
.ai-panel-attachment-preview {
    display: none;
    padding: 0 0 8px;
}
.ai-panel-attachment-preview.visible { display: block; }
.ai-panel-attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 16px;
    padding: 4px 10px 4px 8px;
    font-size: 11px;
    color: rgba(167, 139, 250, 0.9);
    backdrop-filter: blur(8px);
    max-width: 100%;
}
.ai-panel-attachment-chip svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}
.ai-panel-attachment-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.ai-panel-attachment-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0 0 0 4px;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.ai-panel-attachment-remove:hover { color: #ef4444; }
.ai-panel-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.ai-panel-input-row.voice-recording {
    border-color: rgba(239, 68, 68, 0.3);
}
.ai-panel-textarea {
    flex: 1;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 16px 20px;
    color: #e2e8f0;
    font-size: 14.5px;
    font-family: inherit;
    resize: none;
    min-height: 56px;
    max-height: 200px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.ai-panel-textarea::placeholder { color: rgba(255, 255, 255, 0.3); font-size: 14px; }
.ai-panel-textarea:focus {
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    background: rgba(255, 255, 255, 0.08);
}
.ai-panel-attach-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.ai-panel-attach-btn:hover {
    color: #a78bfa;
    border-color: rgba(124, 58, 237, 0.3);
    background: rgba(124, 58, 237, 0.08);
}
.ai-panel-attach-btn svg { width: 18px; height: 18px; }
.ai-panel-send-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.85) 0%, rgba(99, 47, 189, 0.95) 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.ai-panel-send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(124, 58, 237, 1) 0%, rgba(99, 47, 189, 1) 100%);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.45);
    transform: scale(1.05);
}
.ai-panel-send-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.ai-panel-send-btn svg { width: 22px; height: 22px; }

.ai-panel-mic-wrapper {
    flex-shrink: 0;
}
.ai-tab-help-card {
    margin: 8px 12px;
    max-height: 120px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}
.ai-tab-help-inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}
.ai-tab-help-icon {
    flex-shrink: 0;
    color: rgba(167, 139, 250, 0.7);
    margin-top: 1px;
}
.ai-tab-help-text {
    flex: 1;
}
.ai-tab-help-text strong {
    color: rgba(167, 139, 250, 0.9);
}
.ai-tab-help-dismiss {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 16px;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}
.ai-tab-help-dismiss:hover {
    color: rgba(255, 255, 255, 0.7);
}

.ai-panel-mic-wrapper .voice-mic-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.ai-panel-mic-wrapper .voice-mic-btn:hover {
    color: #a78bfa;
    border-color: rgba(124, 58, 237, 0.3);
    background: rgba(124, 58, 237, 0.08);
}
.ai-panel-mic-wrapper .voice-mic-btn.recording {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.1);
    animation: ai-mic-pulse 1.5s ease-in-out infinite;
}
.ai-panel-mic-wrapper .voice-mic-btn.processing {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
}
.ai-panel-mic-wrapper .voice-timer {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 4px;
}
@keyframes ai-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.ai-panel-msg.error .ai-panel-msg-bubble {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.ai-panel-build-content,
.ai-panel-actions-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.25) transparent;
}

.ai-panel-build-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.ai-panel-build-header svg {
    width: 24px;
    height: 24px;
    color: #a78bfa;
    opacity: 0.8;
}
.ai-panel-build-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    flex: 1;
}
.ai-panel-build-clear {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}
.ai-panel-build-clear:hover {
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.2);
}
.ai-panel-build-card {
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.12);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.ai-panel-build-card p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 12px 0;
}
.ai-panel-build-card p:last-child { margin-bottom: 0; }

.ai-panel-build-mockup {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}
.ai-panel-build-task {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.ai-panel-build-task:last-child { border-bottom: none; }
.ai-panel-build-task-id {
    color: #a78bfa;
    font-weight: 600;
    font-size: 11px;
    width: 36px;
    flex-shrink: 0;
}
.ai-panel-build-task-name {
    color: rgba(255, 255, 255, 0.6);
    flex: 1;
}
.ai-panel-build-task-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ai-panel-build-task-status.pending { background: rgba(148, 163, 184, 0.4); }
.ai-panel-build-task-status.in-progress {
    background: #fbbf24;
    animation: ai-task-pulse 1.2s ease-in-out infinite;
}
.ai-panel-build-task-status.done { background: #22c55e; }
.ai-panel-build-task-status.waiting { background: #f97316; animation: ai-task-pulse 1.2s ease-in-out infinite; }
.ai-panel-build-task-status.error { background: #ef4444; }
@keyframes ai-task-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.ai-panel-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ai-panel-actions-category { margin-bottom: 4px; }
.ai-panel-actions-category-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 8px;
}
.ai-panel-actions-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.ai-panel-action-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ai-panel-action-card:hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.ai-panel-action-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.ai-panel-action-icon.content { background: rgba(124, 58, 237, 0.15); }
.ai-panel-action-icon.data { background: rgba(59, 130, 246, 0.15); }
.ai-panel-action-icon.settings { background: rgba(251, 191, 36, 0.15); }
.ai-panel-action-icon.reports { background: rgba(34, 197, 94, 0.15); }
.ai-panel-action-name {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 4px;
}
.ai-panel-action-desc {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.4;
}

.ai-help-hint {
    background: none;
    border: none;
    color: rgba(124, 58, 237, 0.5);
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: color 0.2s;
    vertical-align: middle;
}
.ai-help-hint:hover { color: #a78bfa; }
.ai-help-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: rgba(15, 10, 30, 0.95);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    width: 200px;
    z-index: 30;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.ai-help-tooltip.visible { opacity: 1; pointer-events: auto; }

.ai-msg-help.collapsed .ai-panel-msg-avatar,
.ai-msg-help.collapsed .ai-panel-msg-bubble {
    display: none;
}
.ai-help-toggle-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11px;
    color: rgba(124, 58, 237, 0.7);
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
}
.ai-help-toggle-bar:hover { background: rgba(124, 58, 237, 0.08); }
.ai-msg-help:not(.collapsed) .ai-help-toggle-bar {
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

body.ai-panel-open {
    overflow: hidden;
}
@media (min-width: 769px) {
    body.ai-panel-open { overflow: auto; }
}
body.ai-panel-compact.ai-panel-open,
body.ai-panel-half.ai-panel-open {
    overflow: auto;
}

@media (max-width: 768px) {
    #ai-panel {
        width: 100% !important;
        max-width: 100%;
        min-width: 100%;
        border-left: none;
        border-right: none;
    }
    #ai-panel-resize { display: none; }
    .ai-mode-group { display: none; }
}

@media (min-width: 769px) and (max-width: 1023px) {
    body.ai-panel-half #ai-panel {
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

.ai-panel-nav-logo {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-right: 4px;
}

.ai-panel-history-drawer {
    position: absolute;
    top: 60px;
    left: 8px;
    right: 8px;
    max-height: 0;
    overflow: hidden;
    background: rgba(15,10,30,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(124,58,237,0.2);
    border-radius: 10px;
    z-index: 20;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.ai-panel-history-drawer.open {
    max-height: 320px;
    opacity: 1;
    padding: 8px 0;
}
.ai-panel-history-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 4px 14px 8px;
}
.ai-panel-history-list {
    overflow-y: auto;
    max-height: 270px;
}
.ai-panel-history-list::-webkit-scrollbar { width: 4px; }
.ai-panel-history-list::-webkit-scrollbar-thumb {
    background: rgba(124,58,237,0.3);
    border-radius: 2px;
}
.ai-panel-history-item {
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.2s, transform 0.15s;
    border-left: 2px solid transparent;
}
.ai-panel-history-item:hover {
    background: rgba(124,58,237,0.1);
    box-shadow: 0 1px 4px rgba(124, 58, 237, 0.08);
    transform: translateX(1px);
}
.ai-panel-history-item.ai-deleting {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.ai-panel-history-item.active {
    background: rgba(124,58,237,0.15);
    border-left-color: #7c3aed;
}
.ai-panel-history-title {
    font-size: 12px;
    color: #e2e8f0;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ai-panel-history-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
}
.ai-panel-history-loading,
.ai-panel-history-empty {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 12px;
}

.ai-panel-followup-card {
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 10px;
    padding: 12px;
    margin-top: 8px;
    transition: opacity 0.3s;
}
.ai-panel-followup-card.accepted,
.ai-panel-followup-card.skipped { opacity: 0.5; }
.ai-panel-followup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.ai-panel-followup-icon { width: 20px; height: 20px; color: #22c55e; }
.ai-panel-followup-icon svg { width: 100%; height: 100%; }
.ai-panel-followup-title {
    font-size: 12px;
    font-weight: 600;
    color: #86efac;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ai-panel-followup-msg {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin-bottom: 10px;
}
.ai-panel-followup-actions { display: flex; gap: 8px; }
.ai-panel-followup-btn {
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.ai-panel-followup-btn.run {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.ai-panel-followup-btn.run:hover:not(:disabled) { background: rgba(34, 197, 94, 0.35); }
.ai-panel-followup-btn.skip {
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.ai-panel-followup-btn.skip:hover:not(:disabled) { background: rgba(255, 255, 255, 0.05); }
.ai-panel-followup-btn:disabled { cursor: default; opacity: 0.6; }

.ai-panel-retry-card {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 12px;
    margin-top: 8px;
    transition: opacity 0.3s;
}
.ai-panel-retry-card.retrying,
.ai-panel-retry-card.dismissed { opacity: 0.5; }
.ai-panel-retry-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.ai-panel-retry-header svg {
    width: 16px;
    height: 16px;
    color: #ef4444;
    flex-shrink: 0;
}
.ai-panel-retry-label {
    font-size: 12px;
    font-weight: 600;
    color: #fca5a5;
}
.ai-panel-retry-msg {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    margin-bottom: 10px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}
.ai-panel-retry-actions { display: flex; gap: 8px; }
.ai-panel-retry-btn {
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.ai-panel-retry-btn.retry {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.25);
}
.ai-panel-retry-btn.retry:hover:not(:disabled) { background: rgba(251, 191, 36, 0.3); }
.ai-panel-retry-btn.dismiss {
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.ai-panel-retry-btn.dismiss:hover:not(:disabled) { background: rgba(255, 255, 255, 0.05); }
.ai-panel-retry-btn:disabled { cursor: default; opacity: 0.6; }

.ai-msg-actions {
    position: absolute;
    top: -4px;
    right: 8px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 5;
    background: rgba(15, 10, 30, 0.9);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 6px;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.ai-panel-msg.assistant:hover .ai-msg-actions { opacity: 1; }
.ai-msg-action-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.15s;
}
.ai-msg-action-btn:hover {
    color: #a78bfa;
    background: rgba(124, 58, 237, 0.15);
}

.ai-pinned-messages {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    margin-bottom: 8px;
}
.ai-pinned-card {
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 8px;
    padding: 6px 10px;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.ai-pinned-card::before {
    content: '\u{1F4CC}';
    font-size: 10px;
    flex-shrink: 0;
    margin-top: 2px;
}
.ai-pinned-text {
    flex: 1;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
}
.ai-pinned-text p { margin: 0; }
.ai-pinned-unpin {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0 2px;
    font-size: 14px;
    flex-shrink: 0;
    transition: color 0.15s;
}
.ai-pinned-unpin:hover { color: #ef4444; }

.ai-proactive-suggestions {
    display: flex;
    gap: 6px;
    padding: 8px 0 4px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}
.ai-proactive-suggestions::-webkit-scrollbar { display: none; }
.ai-proactive-chip {
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.15);
    color: rgba(167, 139, 250, 0.8);
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}
.ai-proactive-chip:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
    color: #e2e8f0;
}

.ai-export-btn { position: relative; }
.ai-export-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: rgba(15, 10, 30, 0.95);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 8px;
    padding: 4px 0;
    z-index: 30;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.ai-export-option {
    display: block;
    width: 100%;
    padding: 8px 14px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}
.ai-export-option:hover {
    background: rgba(124, 58, 237, 0.15);
    color: #e2e8f0;
}

.ai-msg-footer {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    opacity: 0;
    transition: opacity 0.2s;
}
.ai-msg-footer.visible,
.ai-panel-msg.assistant:hover .ai-msg-footer { opacity: 1; }

.ai-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: -999;
    color: #a78bfa;
    font-size: 12px;
}
.ai-skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    z-index: 100;
    padding: 8px 16px;
    display: block;
    background: rgba(124, 58, 237, 0.15);
    text-align: center;
}

.ai-panel-msg-bubble blockquote {
    border-left: 3px solid rgba(124, 58, 237, 0.4);
    padding-left: 12px;
    margin: 6px 0;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}
.ai-panel-msg-bubble del,
.ai-panel-msg-bubble s {
    opacity: 0.5;
}
.ai-panel-msg-bubble h1,
.ai-panel-msg-bubble h2,
.ai-panel-msg-bubble h3 {
    color: #f0f0f5;
    margin: 8px 0 4px 0;
    line-height: 1.3;
}
.ai-panel-msg-bubble h1 { font-size: 16px; }
.ai-panel-msg-bubble h2 { font-size: 15px; }
.ai-panel-msg-bubble h3 { font-size: 14px; }
.ai-panel-msg-bubble input[type="checkbox"] {
    margin-right: 6px;
    accent-color: #7c3aed;
}

.ai-stage-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    padding: 2px 0;
}
.ai-stage-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
    background: rgba(124, 58, 237, 0.25);
    line-height: 1.2;
}
.ai-stage-chip.active {
    background: rgba(124, 58, 237, 0.4);
    animation: ai-chip-pulse 1.5s ease-in-out infinite;
}
.ai-stage-chip.active[data-chip-type="tool"] {
    background: rgba(251, 191, 36, 0.35);
    color: #fbbf24;
}
.ai-stage-chip.complete {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}
.ai-stage-chip.complete[data-chip-type="tool"] {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}
.ai-stage-chip.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.ai-stage-chip.research {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}
.ai-stage-chip.expanded {
    outline: 1px solid rgba(124, 58, 237, 0.4);
}
.ai-stage-chip:hover {
    filter: brightness(1.15);
}
@keyframes ai-chip-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}
.ai-stage-chip-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.ai-stage-chip-icon svg {
    width: 13px;
    height: 13px;
}
.ai-stage-chip-label {
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ai-stage-detail {
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.12);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    animation: ai-panel-tool-enter 0.15s ease-out;
    max-height: 200px;
    overflow-y: auto;
}
.ai-stage-detail-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.ai-continue-btn {
    display: block;
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(124, 58, 237, 0.3);
    background: rgba(124, 58, 237, 0.1);
    color: #a78bfa;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.ai-continue-btn:hover {
    background: rgba(124, 58, 237, 0.2);
}

.ai-user-msg-actions {
    opacity: 0;
    transition: opacity 0.15s;
}
.ai-panel-msg.user:hover .ai-user-msg-actions {
    opacity: 1;
}
.ai-edit-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 6px;
    color: #f0f0f5;
    padding: 8px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}
.ai-edit-textarea:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.6);
}
.ai-edit-btns {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    justify-content: flex-end;
}
.ai-edit-send {
    padding: 4px 14px;
    border-radius: 6px;
    border: none;
    background: #7c3aed;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.ai-edit-send:hover { background: #6d28d9; }
.ai-edit-cancel {
    padding: 4px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.ai-edit-cancel:hover { background: rgba(255, 255, 255, 0.05); }

.ai-retry-send-btn {
    margin-top: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}
.ai-retry-send-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}
.ai-msg-failed .ai-panel-msg-bubble {
    border-color: rgba(239, 68, 68, 0.3) !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.1);
}

.ai-queue-btn {
    position: relative;
    padding: 4px 8px !important;
}
.ai-queue-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #7c3aed;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 3px;
}
.ai-queue-drawer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, padding 0.3s ease;
    padding: 0 8px;
}
.ai-queue-drawer.open {
    max-height: 260px;
    overflow-y: auto;
    opacity: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px;
}
.ai-queue-controls {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}
.ai-queue-run-all,
.ai-queue-clear {
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(124, 58, 237, 0.3);
    background: rgba(124, 58, 237, 0.1);
    color: #a78bfa;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}
.ai-queue-run-all:hover { background: rgba(124, 58, 237, 0.2); }
.ai-queue-clear {
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}
.ai-queue-clear:hover { background: rgba(239, 68, 68, 0.15); }
.ai-queue-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ai-queue-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.15s;
}
.ai-queue-item.running {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.05);
}
.ai-queue-item.complete {
    border-color: rgba(16, 185, 129, 0.3);
    opacity: 0.6;
}
.ai-queue-item.error {
    border-color: rgba(239, 68, 68, 0.3);
}
.ai-queue-item-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ai-queue-item-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ai-queue-item-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s;
}
.ai-queue-item:hover .ai-queue-item-actions { opacity: 1; }
.ai-queue-item-actions button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 12px;
    border-radius: 3px;
    transition: all 0.1s;
}
.ai-queue-item-actions button:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.06);
}
.ai-queue-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ai-queue-status-dot.queued { background: rgba(255, 255, 255, 0.2); }
.ai-queue-status-dot.running { background: #fbbf24; animation: ai-chip-pulse 1s infinite; }
.ai-queue-status-dot.complete { background: #10b981; }
.ai-queue-status-dot.error { background: #ef4444; }
.ai-queue-empty {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    padding: 12px;
}
.ai-queue-edit-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 4px;
    color: #f0f0f5;
    padding: 2px 6px;
    font-size: 12px;
}

.ai-context-inspector {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 10, 30, 0.95);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 6px;
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
    animation: ai-panel-tool-enter 0.15s ease-out;
    backdrop-filter: blur(12px);
}
.ai-ctx-insp-title {
    font-size: 12px;
    font-weight: 600;
    color: #a78bfa;
    margin-bottom: 4px;
}
.ai-ctx-insp-url {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 8px;
    word-break: break-all;
}
.ai-ctx-insp-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.ai-ctx-insp-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
}
.ai-ctx-insp-toggle input[type="checkbox"] {
    accent-color: #7c3aed;
    width: 14px;
    height: 14px;
}
.ai-ctx-insp-key {
    font-size: 11px;
    color: #a78bfa;
    font-weight: 500;
    min-width: 70px;
}
.ai-ctx-insp-val {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.ai-prefs-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 10, 30, 0.98);
    z-index: 200;
    display: flex;
    flex-direction: column;
    animation: ai-panel-tool-enter 0.15s ease-out;
}
.ai-prefs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ai-prefs-header h3 {
    margin: 0;
    font-size: 14px;
    color: #f0f0f5;
    font-weight: 600;
}
.ai-prefs-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.ai-prefs-close:hover { color: rgba(255, 255, 255, 0.7); }
.ai-prefs-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}
.ai-prefs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.ai-prefs-row label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}
.ai-prefs-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #f0f0f5;
    padding: 4px 8px;
    font-size: 12px;
}
.ai-prefs-toggle-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}
.ai-prefs-toggle-label input { display: none; }
.ai-prefs-toggle-slider {
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
}
.ai-prefs-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s;
}
.ai-prefs-toggle-label input:checked + .ai-prefs-toggle-slider {
    background: rgba(124, 58, 237, 0.6);
}
.ai-prefs-toggle-label input:checked + .ai-prefs-toggle-slider::after {
    transform: translateX(16px);
    background: #a78bfa;
}
.ai-prefs-danger {
    margin-top: 16px;
    border-top: 1px solid rgba(239, 68, 68, 0.15);
    padding-top: 16px;
}
.ai-prefs-clear-all {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.ai-prefs-clear-all:hover { background: rgba(239, 68, 68, 0.15); }

.ai-help-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 10, 30, 0.98);
    z-index: 200;
    display: flex;
    flex-direction: column;
    animation: ai-panel-tool-enter 0.15s ease-out;
    overflow-y: auto;
}
.ai-help-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.ai-help-overlay-header h3 {
    margin: 0;
    font-size: 14px;
    color: #f0f0f5;
    font-weight: 600;
    flex: 1;
    text-align: center;
}
.ai-help-overlay-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.ai-help-overlay-close:hover { color: rgba(255, 255, 255, 0.7); }
.ai-help-section {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    text-align: center;
}
.ai-help-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    text-align: center;
}
.ai-help-section .ai-help-item {
    display: flex;
}
.ai-help-section--feedback .ai-help-feedback-btn {
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.2);
}
.ai-help-section--feedback .ai-help-feedback-btn:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.35);
}
.ai-help-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    text-align: center;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(124, 58, 237, 0.1);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 6px;
    color: inherit;
    align-items: center;
}
.ai-help-item:hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.15);
}
.ai-help-item-prompt,
.ai-help-item-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}
.ai-help-item-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}
.ai-help-tips {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ai-help-tip {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    padding: 6px 0;
    line-height: 1.4;
}
.ai-help-tip strong {
    color: #a78bfa;
}
.ai-inline-feedback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 10, 30, 0.98);
    z-index: 200;
    display: flex;
    flex-direction: column;
    animation: ai-panel-tool-enter 0.15s ease-out;
    overflow-y: auto;
}
.ai-inline-feedback-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.ai-inline-feedback-header h3 {
    margin: 0;
    font-size: 14px;
    color: #f0f0f5;
    font-weight: 600;
    flex: 1;
}
.ai-inline-feedback-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.ai-inline-feedback-close:hover { color: rgba(255, 255, 255, 0.7); }
.ai-inline-feedback-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ai-inline-feedback-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: -4px;
}
.ai-inline-feedback-req { color: #ef4444; }
.ai-inline-feedback-select,
.ai-inline-feedback-input,
.ai-inline-feedback-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #f0f0f5;
    font-family: inherit;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.ai-inline-feedback-select:focus,
.ai-inline-feedback-input:focus,
.ai-inline-feedback-textarea:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.5);
}
.ai-inline-feedback-textarea { resize: vertical; min-height: 80px; }
.ai-inline-feedback-severity {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}
.ai-inline-feedback-severity label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.ai-inline-feedback-severity input[type="radio"] { accent-color: #7c3aed; }
.ai-inline-feedback-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
}
.ai-inline-feedback-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
}
.ai-inline-feedback-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.ai-inline-feedback-cancel:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}
.ai-inline-feedback-submit {
    background: linear-gradient(135deg, #7c3aed, #581c87);
    border: none;
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.ai-inline-feedback-submit:hover { filter: brightness(1.1); }
.ai-inline-feedback-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-conv-summary-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 8px 0;
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.12);
    border-radius: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    transition: opacity 0.2s;
}
.ai-conv-summary-text {
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}
.ai-conv-summary-text strong {
    color: #a78bfa;
}
.ai-conv-summary-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    flex-shrink: 0;
}
.ai-conv-summary-close:hover { color: rgba(255, 255, 255, 0.6); }

.ai-panel-history-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.ai-panel-history-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transform: translateX(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}
.ai-panel-history-item:hover .ai-panel-history-actions {
    opacity: 1;
    transform: translateX(0);
}
.ai-panel-history-rename,
.ai-panel-history-delete {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 3px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    transition: all 0.1s;
}
.ai-panel-history-rename:hover { color: #a78bfa; background: rgba(124, 58, 237, 0.1); }
.ai-panel-history-delete:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.ai-panel-history-edit-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 4px;
    color: #f0f0f5;
    padding: 2px 6px;
    font-size: 12px;
    outline: none;
}
.ai-panel-history-edit-input:focus {
    border-color: rgba(124, 58, 237, 0.6);
}
.ai-panel-history-summary {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-panel-credit-bar {
    padding: 0 12px;
}
.ai-credit-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    color: #a1a1aa;
    width: 100%;
    justify-content: center;
}
.ai-credit-indicator:hover { background: rgba(40, 40, 55, 0.8); }
.ai-credit-green { color: #4ade80; border-color: rgba(74, 222, 128, 0.2); }
.ai-credit-amber { color: #fbbf24; border-color: rgba(251, 191, 36, 0.2); }
.ai-credit-red { color: #f87171; border-color: rgba(248, 113, 113, 0.2); }

.ai-credit-popover {
    position: absolute;
    bottom: 100%;
    left: 12px;
    right: 12px;
    background: #1e1e2e;
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 6px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
    z-index: 100;
    font-size: 12px;
    color: #d1d5db;
}
.ai-credit-pop-plan { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ai-credit-pop-plan strong { color: #f0f0f5; font-size: 13px; }
.ai-credit-pop-status {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ai-credit-pop-gauge {
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.ai-credit-pop-gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    border-radius: 3px;
    transition: width 0.5s;
}
.ai-credit-pop-detail { margin-bottom: 6px; color: #a1a1aa; }
.ai-credit-pop-meta { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 4px; }
.ai-credit-auto::before { content: '\2713 '; color: #4ade80; }
.ai-credit-pop-link {
    display: block;
    margin-top: 10px;
    color: #a78bfa;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}
.ai-credit-pop-link:hover { color: #c4b5fd; }
.ai-credit-topup { color: #fbbf24; }
.ai-credit-topup:hover { color: #fde68a; }

.ai-nav-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.ai-nav-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 8px;
    text-decoration: none;
    color: #f0f0f5;
    transition: all 0.2s;
    cursor: pointer;
}
.ai-nav-card:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.15);
    transform: translateX(2px);
}
.ai-nav-card-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.15);
    border-radius: 8px;
    color: #a78bfa;
}
.ai-nav-card-body { flex: 1; min-width: 0; }
.ai-nav-card-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.ai-nav-card-desc { font-size: 11px; color: #a1a1aa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-nav-card-arrow { color: #a78bfa; font-size: 16px; flex-shrink: 0; transition: transform 0.2s; }
.ai-nav-card:hover .ai-nav-card-arrow { transform: translateX(3px); }

.ai-billing-card {
    background: rgba(30, 30, 40, 0.7);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 10px;
    padding: 14px;
    margin-top: 8px;
    font-size: 12px;
    color: #d1d5db;
}
.ai-billing-green { border-color: rgba(74, 222, 128, 0.25); }
.ai-billing-amber { border-color: rgba(251, 191, 36, 0.25); }
.ai-billing-red { border-color: rgba(248, 113, 113, 0.25); }
.ai-billing-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ai-billing-header strong { color: #f0f0f5; font-size: 14px; }
.ai-billing-status {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
    text-transform: uppercase;
}
.ai-billing-gauge {
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.ai-billing-gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    border-radius: 4px;
    transition: width 0.5s;
}
.ai-billing-detail { color: #a1a1aa; margin-bottom: 4px; }
.ai-billing-cost { color: #fbbf24; margin-top: 4px; }
.ai-billing-auto { color: #4ade80; margin-top: 4px; }
.ai-billing-auto::before { content: '\2713 '; }
.ai-billing-meta { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 4px; }
.ai-billing-link {
    display: inline-block;
    margin-top: 10px;
    color: #a78bfa;
    text-decoration: none;
    font-size: 12px;
}
.ai-billing-link:hover { color: #c4b5fd; }

.ai-credit-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 12px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}
.ai-credit-warning a { color: #fde68a; text-decoration: none; margin-left: auto; }
.ai-credit-warning a:hover { text-decoration: underline; }
.ai-credit-blocked {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
    color: #f87171;
}
.ai-credit-blocked a { color: #fca5a5; }

.ai-ops-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px;
}
.ai-ops-metric-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
    cursor: default;
    transition: border-color 0.2s, background 0.2s;
    animation: ai-ops-fade-in 0.4s ease;
}
.ai-ops-metric-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(124, 58, 237, 0.3);
}
.ai-ops-metric-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #f0f0f5;
}
.ai-ops-metric-label {
    font-size: 10px;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.ai-ops-metric-card.status-green .ai-ops-metric-value { color: #4ade80; }
.ai-ops-metric-card.status-amber .ai-ops-metric-value { color: #fbbf24; }
.ai-ops-metric-card.status-red .ai-ops-metric-value { color: #f87171; }
.ai-ops-metric-card.status-purple .ai-ops-metric-value { color: #a78bfa; }

.ai-ops-section {
    padding: 0 12px 8px;
}
.ai-ops-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ai-ops-section-title svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.ai-ops-alerts {
    max-height: 140px;
    overflow-y: auto;
    margin-bottom: 8px;
}
.ai-ops-alert-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #d4d4d8;
    animation: ai-ops-fade-in 0.3s ease;
}
.ai-ops-alert-item.severity-critical {
    border-left-color: #f87171;
    background: rgba(248, 113, 113, 0.06);
}
.ai-ops-alert-item.severity-warning {
    border-left-color: #fbbf24;
    background: rgba(251, 191, 36, 0.06);
}
.ai-ops-alert-item.severity-info {
    border-left-color: #60a5fa;
    background: rgba(96, 165, 250, 0.06);
}
.ai-ops-alert-icon {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
    margin-top: 1px;
}
.ai-ops-alert-body {
    flex: 1;
    min-width: 0;
}
.ai-ops-alert-msg {
    line-height: 1.3;
    word-break: break-word;
}
.ai-ops-alert-time {
    font-size: 10px;
    color: #71717a;
    margin-top: 2px;
}
.ai-ops-empty {
    text-align: center;
    padding: 16px 12px;
    color: #71717a;
    font-size: 12px;
}
.ai-ops-empty-icon {
    font-size: 24px;
    margin-bottom: 6px;
    opacity: 0.5;
}

.ai-ops-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}
.ai-ops-action-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    animation: ai-ops-fade-in 0.4s ease;
}
.ai-ops-action-card:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-1px);
}
.ai-ops-action-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(124, 58, 237, 0.1);
}
.ai-ops-action-text {
    flex: 1;
    min-width: 0;
}
.ai-ops-action-name {
    font-size: 12px;
    font-weight: 600;
    color: #e4e4e7;
    line-height: 1.2;
}
.ai-ops-action-desc {
    font-size: 10px;
    color: #71717a;
    line-height: 1.3;
    margin-top: 1px;
}
.ai-ops-action-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    flex-shrink: 0;
}
.ai-ops-action-badge.badge-amber {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}
.ai-ops-action-badge.badge-green {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.ai-ops-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 8px 12px;
}

.ai-ops-tab-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    color: #fff;
    background: #f87171;
    line-height: 1;
    pointer-events: none;
}
.ai-ops-tab-badge.badge-amber {
    background: #f59e0b;
}
.ai-ops-tab-badge:empty,
.ai-ops-tab-badge.hidden {
    display: none;
}

.ai-panel-tab[data-tab="actions"] {
    position: relative;
}

@keyframes ai-ops-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ai-ops-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
    50% { box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2); }
}
.ai-ops-critical-pulse {
    animation: ai-ops-pulse 2s ease-in-out infinite;
}

.ai-health-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px;
    margin: 4px 0;
    font-size: 12px;
}
.ai-health-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.ai-health-header strong {
    color: #f0f0f5;
    font-size: 13px;
}
.ai-health-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
}
.ai-health-status-dot.status-warning { background: #fbbf24; }
.ai-health-status-dot.status-critical { background: #f87171; }
.ai-health-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    color: #a1a1aa;
}
.ai-health-row-value {
    font-weight: 600;
    color: #e4e4e7;
}
.ai-health-row-value.val-green { color: #4ade80; }
.ai-health-row-value.val-amber { color: #fbbf24; }
.ai-health-row-value.val-red { color: #f87171; }
.ai-health-recommendation {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.15);
    color: #c4b5fd;
    font-size: 11px;
    line-height: 1.4;
}

@keyframes ai-nav-arrival {
    0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
    30% { box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.3); }
    60% { box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15); }
    100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}
.ai-nav-arrival {
    animation: ai-nav-arrival 1.8s ease-out;
    border-radius: 8px;
}

.ai-inline-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    color: #a78bfa;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.15);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s, color 0.2s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}
.ai-inline-trigger:hover {
    background: rgba(124, 58, 237, 0.18);
    border-color: rgba(124, 58, 237, 0.35);
    color: #c4b5fd;
    transform: translateY(-1px);
}
.ai-inline-trigger svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}
.ai-inline-trigger.trigger-warning {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.2);
}
.ai-inline-trigger.trigger-warning:hover {
    background: rgba(251, 191, 36, 0.18);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fde68a;
}
.ai-inline-trigger.trigger-danger {
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.2);
}
.ai-inline-trigger.trigger-danger:hover {
    background: rgba(248, 113, 113, 0.18);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}

.ai-briefing-card {
    background: var(--surface-card, rgba(30, 41, 59, 0.85));
    border: 1px solid var(--border-color, #334155);
    border-left: 4px solid #7c3aed;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.ai-briefing-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.ai-briefing-header svg {
    width: 20px;
    height: 20px;
    color: #7c3aed;
    flex-shrink: 0;
}
.ai-briefing-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}
.ai-briefing-summary {
    font-size: 13px;
    color: var(--text-secondary, #64748b);
    line-height: 1.5;
    margin-bottom: 12px;
}
.ai-briefing-metrics {
    display: flex;
    gap: 20px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.ai-briefing-metric {
    font-size: 12px;
    color: var(--text-secondary, #64748b);
    font-weight: 500;
}
.ai-briefing-metric strong {
    color: var(--text-primary, #1e293b);
    font-size: 18px;
    margin-right: 3px;
    font-weight: 700;
}
.ai-briefing-metric.metric-green strong { color: #16a34a; }
.ai-briefing-metric.metric-amber strong { color: #d97706; }
.ai-briefing-metric.metric-red strong { color: #dc2626; }
.ai-briefing-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: #7c3aed;
    border: none;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    text-decoration: none;
}
.ai-briefing-btn:hover {
    background: #6d28d9;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
    color: #ffffff;
}
.ai-briefing-btn svg {
    stroke: #ffffff;
}

.ai-proactive-alert-card {
    margin: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(251, 191, 36, 0.3);
    animation: ai-ops-fade-in 0.4s ease;
}
.ai-proactive-alert-card.proactive-critical {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.04);
}
.ai-proactive-alert-card.proactive-warning {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.04);
}
.ai-proactive-alert-card.proactive-success {
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(74, 222, 128, 0.04);
}
.proactive-alert-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #e4e4e7;
}
.proactive-alert-icon { font-size: 14px; }
.proactive-alert-summary { flex: 1; }
.proactive-alert-dismiss {
    background: none;
    border: none;
    color: #71717a;
    cursor: pointer;
    font-size: 16px;
    padding: 0 2px;
    line-height: 1;
}
.proactive-alert-dismiss:hover { color: #d4d4d8; }
.proactive-alert-items { display: flex; flex-direction: column; gap: 4px; }
.proactive-alert-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.15s;
}
.proactive-alert-item:hover { background: rgba(124, 58, 237, 0.1); }
.proactive-item-icon {
    flex-shrink: 0;
    font-size: 14px;
    margin-top: 1px;
    line-height: 1;
}
.proactive-item-severity {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 4px;
    background: #60a5fa;
}
.proactive-item-severity.severity-critical { background: #f87171; }
.proactive-item-severity.severity-warning { background: #fbbf24; }
.proactive-item-severity.severity-info { background: #60a5fa; }
.proactive-item-text { flex: 1; min-width: 0; }
.proactive-item-title { font-size: 12px; font-weight: 500; color: #e4e4e7; line-height: 1.3; }
.proactive-item-msg { font-size: 11px; color: #a1a1aa; margin-top: 2px; line-height: 1.3; }

.ai-ops-alert-type-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-top: 1px;
    display: inline-block;
}
.ai-ops-icon-critical { background: #f87171; box-shadow: 0 0 6px rgba(248, 113, 113, 0.4); }
.ai-ops-icon-stall { background: #fbbf24; box-shadow: 0 0 6px rgba(251, 191, 36, 0.4); }
.ai-ops-icon-breaker { background: #facc15; box-shadow: 0 0 6px rgba(250, 204, 21, 0.4); }
.ai-ops-icon-warning { background: #fbbf24; }
.ai-ops-icon-info { background: #60a5fa; }

.ai-ops-alert-title {
    font-size: 12px;
    font-weight: 600;
    color: #e4e4e7;
    margin-bottom: 2px;
}
.ai-ops-alert-entity {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.ai-ops-entity-tag {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(124, 58, 237, 0.15);
    color: #c4b5fd;
    font-family: 'JetBrains Mono', monospace;
}
.ai-ops-alert-error-preview {
    font-size: 10px;
    color: #f87171;
    margin-top: 3px;
    font-style: italic;
    word-break: break-word;
}
.ai-ops-alert-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    gap: 6px;
}
.ai-ops-ask-ai-btn {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: #c4b5fd;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.ai-ops-ask-ai-btn:hover {
    background: rgba(124, 58, 237, 0.35);
    color: #e4e4e7;
}

.ai-notif-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #7c3aed;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 0 4px;
    cursor: pointer;
    margin-left: 4px;
    transition: transform 0.2s;
}
.ai-notif-dot:hover { transform: scale(1.1); }

.ai-notif-dropdown {
    position: absolute;
    top: 42px;
    right: 8px;
    width: 280px;
    max-height: 300px;
    overflow-y: auto;
    background: rgba(28, 28, 35, 0.98);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1200;
    padding: 4px;
}
.ai-notif-empty {
    padding: 20px;
    text-align: center;
    color: #71717a;
    font-size: 12px;
}
.ai-notif-item {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 2px;
}
.ai-notif-item:hover { background: rgba(124, 58, 237, 0.1); }
.ai-notif-item.ai-notif-unread {
    background: rgba(124, 58, 237, 0.06);
    border-left: 2px solid #7c3aed;
}
.ai-notif-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}
.ai-notif-title {
    font-size: 12px;
    font-weight: 500;
    color: #e4e4e7;
}
.ai-notif-time {
    font-size: 10px;
    color: #71717a;
}
.ai-notif-msg {
    font-size: 11px;
    color: #a1a1aa;
    line-height: 1.3;
}

.ai-agent-section {
    padding-bottom: 4px;
}
.ai-agent-loading {
    font-size: 11px;
    color: #71717a;
    padding: 8px 0;
    text-align: center;
}
.ai-agent-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}
.ai-agent-level-badge {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.ai-agent-budget {
    flex: 1;
    min-width: 0;
}
.ai-agent-budget-label {
    font-size: 10px;
    color: #a1a1aa;
    margin-bottom: 2px;
}
.ai-agent-budget-bar {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}
.ai-agent-budget-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.ai-agent-guardian {
    padding: 6px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.ai-agent-sub-title {
    font-size: 11px;
    font-weight: 600;
    color: #d4d4d8;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ai-agent-guardian-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
}
.ai-agent-stat {
    font-size: 10px;
    color: #a1a1aa;
}
.ai-agent-stat-val {
    font-weight: 600;
    color: #e4e4e7;
}
.ai-agent-recent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.ai-agent-pill {
    font-size: 9px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ai-agent-pill-success {
    background: rgba(34,197,94,0.15);
    color: #4ade80;
}
.ai-agent-pill-warning {
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
}
.ai-agent-pill-danger {
    background: rgba(239,68,68,0.15);
    color: #f87171;
}
.ai-agent-pill-info {
    background: rgba(124,58,237,0.15);
    color: #a78bfa;
}
.ai-agent-plans {
    padding: 6px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.ai-agent-plan-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 6px;
}
.ai-agent-plan-card.ai-agent-plan-draft {
    border-color: rgba(251,191,36,0.3);
}
.ai-agent-plan-card.ai-agent-plan-done {
    border-color: rgba(34,197,94,0.3);
}
.ai-agent-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.ai-agent-plan-type {
    font-size: 10px;
    font-weight: 600;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ai-agent-plan-status {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
    color: #a1a1aa;
    text-transform: uppercase;
}
.ai-agent-plan-summary {
    font-size: 11px;
    color: #d4d4d8;
    margin-bottom: 4px;
    line-height: 1.3;
}
.ai-agent-plan-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-agent-plan-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}
.ai-agent-plan-progress-fill {
    height: 100%;
    background: #7c3aed;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.ai-agent-plan-progress-text {
    font-size: 10px;
    color: #71717a;
    white-space: nowrap;
}
.ai-agent-plan-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
.ai-agent-approve-btn,
.ai-agent-cancel-btn {
    font-size: 10px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}
.ai-agent-approve-btn {
    background: #7c3aed;
    color: #fff;
}
.ai-agent-approve-btn:hover {
    opacity: 0.85;
}
.ai-agent-cancel-btn {
    background: rgba(255,255,255,0.08);
    color: #a1a1aa;
}
.ai-agent-cancel-btn:hover {
    background: rgba(239,68,68,0.2);
    color: #f87171;
}
.ai-agent-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 6px 0;
}

.ai-agent-personas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 4px 0;
}
.ai-agent-persona-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    animation: ai-ops-fade-in 0.3s ease;
}
.ai-agent-persona-card:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateX(2px);
}
.ai-agent-persona-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    border: 1px solid rgba(124, 58, 237, 0.2);
}
.ai-agent-persona-info {
    flex: 1;
    min-width: 0;
}
.ai-agent-persona-name {
    font-size: 12px;
    font-weight: 600;
    color: #e4e4e7;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ai-agent-persona-role {
    font-size: 10px;
    color: #a78bfa;
    line-height: 1.2;
    margin-top: 1px;
}
.ai-agent-persona-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.ai-agent-persona-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}
.ai-agent-persona-status-dot.active {
    background: #4ade80;
    box-shadow: 0 0 4px rgba(74, 222, 128, 0.4);
}
.ai-agent-persona-time {
    font-size: 9px;
    color: #71717a;
    white-space: nowrap;
}
.ai-agent-persona-badges {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}
.ai-agent-persona-count {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
    line-height: 1.4;
}
.ai-agent-persona-pending {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    line-height: 1.4;
}

.ai-agent-detail-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: ai-ops-fade-in 0.25s ease;
}
.ai-agent-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.ai-agent-detail-back {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}
.ai-agent-detail-back:hover {
    color: #a78bfa;
    background: rgba(124, 58, 237, 0.1);
}
.ai-agent-detail-avatar-lg {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.15);
    border: 2px solid rgba(124, 58, 237, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.ai-agent-detail-info {
    flex: 1;
    min-width: 0;
}
.ai-agent-detail-name {
    font-size: 15px;
    font-weight: 600;
    color: #f0f0f5;
}
.ai-agent-detail-role {
    font-size: 11px;
    color: #a78bfa;
    margin-top: 1px;
}
.ai-agent-detail-timeline-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.25) transparent;
}
.ai-agent-detail-timeline-wrap::-webkit-scrollbar { width: 4px; }
.ai-agent-detail-timeline-wrap::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.25);
    border-radius: 2px;
}
.ai-agent-detail-loading,
.ai-agent-detail-empty {
    text-align: center;
    padding: 24px 12px;
    color: #71717a;
    font-size: 12px;
}

.ai-agent-detail-timeline {
    position: relative;
    padding-left: 20px;
}
.ai-agent-detail-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(124, 58, 237, 0.15);
    border-radius: 1px;
}
.ai-tl-entry {
    position: relative;
    display: flex;
    gap: 8px;
    padding: 8px 0;
    animation: ai-ops-fade-in 0.3s ease;
}
.ai-tl-entry + .ai-tl-entry {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}
.ai-tl-icon {
    position: absolute;
    left: -20px;
    top: 10px;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a78bfa;
    z-index: 1;
    background: rgba(18, 18, 28, 0.97);
}
.ai-tl-entry.tl-proposal .ai-tl-icon { color: #fbbf24; }
.ai-tl-entry.tl-memory .ai-tl-icon { color: #a78bfa; }
.ai-tl-entry.tl-llm .ai-tl-icon { color: #93c5fd; }

.ai-tl-content {
    flex: 1;
    min-width: 0;
}
.ai-tl-title {
    font-size: 12px;
    font-weight: 500;
    color: #e4e4e7;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ai-tl-detail {
    font-size: 11px;
    color: #a1a1aa;
    line-height: 1.4;
    margin-top: 2px;
    word-break: break-word;
}
.ai-tl-time {
    font-size: 9px;
    color: #52525b;
    margin-top: 2px;
}
.ai-tl-status {
    font-size: 8px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ai-tl-status.tl-status-pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}
.ai-tl-status.tl-status-accepted {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}
.ai-tl-status.tl-status-ignored {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.ai-agent-detail-actions {
    padding: 10px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.ai-agent-detail-ask-btn {
    width: 100%;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(124, 58, 237, 0.3);
    background: rgba(124, 58, 237, 0.1);
    color: #a78bfa;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.ai-agent-detail-ask-btn:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.5);
    color: #c4b5fd;
}

.ai-proposals-loading {
    font-size: 12px;
    color: #71717a;
    padding: 8px 0;
}

.ai-proposal-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    animation: ai-ops-fade-in 0.3s ease;
    transition: border-color 0.2s;
}
.ai-proposal-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
}
.ai-proposal-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.ai-proposal-icon {
    font-size: 14px;
    flex-shrink: 0;
}
.ai-proposal-type {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #a78bfa;
}
.ai-proposal-priority {
    margin-left: auto;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ai-proposal-priority.priority-critical {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}
.ai-proposal-priority.priority-high {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}
.ai-proposal-priority.priority-medium {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}
.ai-proposal-priority.priority-low {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}
.ai-proposal-priority.priority-info {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}
.ai-proposal-title {
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
    margin-bottom: 4px;
    line-height: 1.3;
}
.ai-proposal-summary {
    font-size: 12px;
    color: #a1a1aa;
    line-height: 1.4;
    margin-bottom: 6px;
}
.ai-proposal-confidence {
    font-size: 10px;
    color: #71717a;
    margin-bottom: 6px;
}
.ai-proposal-detail-btn {
    background: none;
    border: none;
    color: rgba(124, 58, 237, 0.7);
    font-size: 10px;
    cursor: pointer;
    padding: 2px 0;
    transition: color 0.2s;
}
.ai-proposal-detail-btn:hover {
    color: #a78bfa;
}
.ai-proposal-detail-pre {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 10px;
    color: #d4d4d8;
    overflow-x: auto;
    margin-top: 4px;
    max-height: 150px;
    overflow-y: auto;
    line-height: 1.4;
}
.ai-proposal-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.ai-proposal-accept-btn,
.ai-proposal-ignore-btn {
    font-size: 10px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
}
.ai-proposal-accept-btn {
    background: #7c3aed;
    color: #fff;
}
.ai-proposal-accept-btn:hover {
    opacity: 0.85;
}
.ai-proposal-ignore-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #a1a1aa;
}
.ai-proposal-ignore-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.ai-choice-cards-container {
    margin: 12px 0 8px;
    padding: 0;
}
.ai-choice-cards-header {
    margin-bottom: 10px;
}
.ai-choice-cards-prompt {
    font-size: 13px;
    font-weight: 600;
    color: #e4e4e7;
    margin-bottom: 4px;
}
.ai-choice-cards-context {
    font-size: 11px;
    color: #a1a1aa;
    line-height: 1.4;
}
.ai-choice-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ai-choice-card {
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ai-choice-card:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.4);
    transform: translateY(-1px);
}
.ai-choice-card--high {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.06);
}
.ai-choice-card--high:hover {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.5);
}
.ai-choice-card--selected {
    background: rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.6);
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.15);
}
.ai-choice-card--dimmed {
    opacity: 0.4;
    pointer-events: none;
}
.ai-choice-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.ai-choice-card-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.ai-choice-card-label {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #e4e4e7;
}
.ai-choice-card-cost {
    font-size: 12px;
    font-weight: 600;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
}
.ai-choice-card-cost--free {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
}
.ai-choice-card-desc {
    font-size: 12px;
    color: #a1a1aa;
    line-height: 1.4;
    margin-bottom: 8px;
}
.ai-choice-card-btn {
    display: inline-block;
    padding: 5px 16px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 6px;
    background: rgba(124, 58, 237, 0.15);
    color: #c4b5fd;
    cursor: pointer;
    transition: all 0.15s ease;
}
.ai-choice-card-btn:hover {
    background: rgba(124, 58, 237, 0.3);
    border-color: rgba(124, 58, 237, 0.6);
    color: #e4e4e7;
}
.ai-choice-card-btn:disabled {
    opacity: 0.5;
    cursor: default;
}
.ai-choice-card--selected .ai-choice-card-btn {
    background: rgba(124, 58, 237, 0.4);
    border-color: rgba(124, 58, 237, 0.7);
    color: #fff;
}
.ai-choice-cards-skip {
    display: block;
    margin-top: 8px;
    padding: 4px 12px;
    font-size: 11px;
    color: #71717a;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ai-choice-cards-skip:hover {
    color: #a1a1aa;
}
.ai-choice-cards--skipped {
    opacity: 0.5;
}

.ai-run-progress-card {
    margin: 10px 0 6px;
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
    transition: border-color 0.3s ease;
}
.ai-run-progress-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.ai-run-progress-icon {
    color: #a78bfa;
    flex-shrink: 0;
    animation: ai-spin 2s linear infinite;
}
@keyframes ai-spin {
    to { transform: rotate(360deg); }
}
.ai-run-progress--done .ai-run-progress-icon,
.ai-run-progress--failed .ai-run-progress-icon {
    animation: none;
}
.ai-run-progress-title {
    font-size: 13px;
    font-weight: 600;
    color: #e4e4e7;
    flex: 1;
}
.ai-run-progress-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    color: #a78bfa;
    background: rgba(124, 58, 237, 0.12);
    padding: 2px 8px;
    border-radius: 10px;
}
.ai-run-progress--done .ai-run-progress-status {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
}
.ai-run-progress--failed .ai-run-progress-status {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
}
.ai-run-progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}
.ai-run-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    border-radius: 2px;
    transition: width 0.5s ease;
}
.ai-run-progress--done .ai-run-progress-bar {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}
.ai-run-progress--failed .ai-run-progress-bar {
    background: linear-gradient(90deg, #ef4444, #f87171);
}
.ai-run-progress-detail {
    font-size: 11px;
    color: #71717a;
    line-height: 1.3;
}

.ai-chat-mode-selector {
    display: flex;
    gap: 4px;
    padding: 6px 12px 2px;
    align-items: center;
}
.ai-chat-mode-btn {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.3;
}
.ai-chat-mode-btn:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    border-color: rgba(255,255,255,0.15);
}
.ai-chat-mode-btn.active {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.4);
}
.ai-chat-mode-btn[data-chat-mode="deep"].active {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}
.ai-chat-mode-btn[data-chat-mode="research"].active {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
}

.ai-cost-chip {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
}
.ai-cost-chip--quick {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}
.ai-cost-chip--lookup {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
}
.ai-cost-chip--deep {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}
.ai-cost-chip--research {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}
