/* ââ TRAINING OVERLAY: MODERN PREMIUM THEME âââââââââââââââââââââââââ */
:root {
    --bg-dark: #FFFFFF;
    --bg-panel: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --border-subtle: #E8E8E8;
    --text-primary: #7A8C90;
    --text-secondary: #7A8C90;
    --accent-color: #FF8575;
    --accent-hover: #e06f60;
    --accent-coral: #FF8575;
    --message-user: #FF8575;
    --message-agent: #F5F5F5;

    /* Apple-inspired tokens for refined feel */
    --apple-system-blue: #0A84FF;
    --apple-border: rgba(0, 0, 0, 0.08);
}

.training-side-panel,
.training-side-panel * {
    box-sizing: border-box;
}

.training-side-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: 50vw;
    min-width: 600px;
    height: 100vh;
    max-width: 50vw;
    background: var(--bg-dark);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

.training-side-panel.active {
    transform: translateX(0);
}

/* ââ HEADER âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.panel-header,
.chat-header {
    height: 60px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-panel);
    flex-shrink: 0;
}

.panel-header h2,
.chat-header h2 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ââ MODE BADGE ââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.mode-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(255, 133, 117, 0.15);
    color: #FF8575;
    border: 1px solid #FF8575;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

#clear-chat-btn {
    background: #FF8575;
    border: none;
    color: #FFFFFF;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

#clear-chat-btn:hover,
.header-clear-btn:hover {
    background: #e06f60;
    color: #FFFFFF;
    border-color: #e06f60;
}

.header-clear-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

#close-training-btn {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 0 8px 0 0;
    white-space: nowrap;
    transition: color 0.2s;
}

#close-training-btn:hover {
    color: var(--text-primary);
}

.panel-content,
.content-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex: 1;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.training-container {
    display: flex !important;
    flex-direction: column !important;
    flex: 1;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* ââ SIDEBAR CONFIGURATION ââââââââââââââââââââââââââââââââââââââââââââ */
.details-sidebar {
    width: 30%;
    box-sizing: border-box;
    flex: none;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    padding: 24px;
    overflow-y: auto;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-shrink: 0;
    transition: opacity 0.3s ease;
}

.details-sidebar.disabled {
    opacity: 0.7;
}

.details-sidebar.disabled input,
.details-sidebar.disabled select,
.details-sidebar.disabled button,
.details-sidebar.disabled textarea {
    pointer-events: none;
}

.sidebar-header {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    font-family: 'Newsreader', serif;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #7A8C90;
    font-weight: 600;
    margin-bottom: 4px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-item label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.sidebar-input,
.sidebar-select,
.sidebar-textarea {
    background: #F5F5F5;
    border: 1px solid #E0E0E0;
    color: var(--text-primary);
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.sidebar-input:focus,
.sidebar-select:focus,
.sidebar-textarea:focus {
    border-color: var(--accent-color);
    background: #FFFFFF;
}

.sidebar-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.sidebar-readonly {
    color: var(--text-primary);
    font-size: 18px;
    font-family: 'Times New Roman', Times, serif;
    font-weight: 700;
    line-height: 1.3;
    padding: 4px 0;
    word-wrap: break-word;
}

#detail-description.sidebar-readonly {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.sidebar-file-input {
    display: flex;
    gap: 8px;
}

.sidebar-browse-btn {
    width: 38px;
    height: 38px;
    background: #262626;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
}

.sidebar-browse-btn:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
}

/* âââ Project Size Toggle ââââââââââââââââââââââââââââââââââââââââââââââ */
.project-size-toggle {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.size-btn {
    flex: 1;
    padding: 8px 0;
    background: #262626;
    color: var(--text-secondary);
    border: none;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.size-btn:not(:last-child) {
    border-right: 1px solid var(--border-subtle);
}

.size-btn:hover {
    background: #2e2e2e;
    color: var(--text-primary);
}

.size-btn.active {
    background: var(--accent-color);
    color: #fff;
}

/* âââ Human Effort Slider ââââââââââââââââââââââââââââââââââââââââââââââ */
.effort-slider-container {
    width: 100%;
}

.effort-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--accent-color), #3ab8b8);
    outline: none;
    cursor: pointer;
}

.effort-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--accent-color);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}

.effort-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.effort-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--accent-color);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.effort-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.effort-label-left,
.effort-label-right {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
}

.effort-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-color);
    min-width: 20px;
    text-align: center;
}


.chat-main,
.chat-main-column {
    flex: 1;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    min-width: 0;
}

.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* iMessage / Modern Style Bubbles */
.message {
    padding: 10px 16px;
    max-width: 75%;
    line-height: 1.6;
    font-size: 14.5px;
    position: relative;
    word-wrap: break-word;
    border-radius: 20px;
    animation: messageEntry 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes messageEntry {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    align-self: flex-end;
    background: var(--message-user);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.agent-message {
    align-self: flex-start;
    background: #F5F5F5;
    color: #7A8C90;
    border: 1px solid #E8E8E8;
    border-bottom-left-radius: 4px;
    max-width: 85%;
    font-family: 'Newsreader', serif;
    font-size: 15px;
}

/* ââ RICH MARKDOWN IN CHAT âââââââââââââââââââââââââââââââââââââââââââ */
.agent-message p {
    margin: 0 0 12px 0;
}

.agent-message p:last-child {
    margin-bottom: 0;
}

.agent-message h2,
.agent-message h3 {
    margin: 20px 0 10px 0;
    color: #fff;
    letter-spacing: -0.01em;
}

.agent-message h2 {
    font-size: 1.25em;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}

.agent-message h3 {
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 24px;
}

.agent-message code {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.9em;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #a78bfa;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1c1c1e;
    padding: 6px 12px;
    border-radius: 10px 10px 0 0;
    border: 1px solid var(--border-subtle);
    border-bottom: none;
    font-size: 11px;
    color: #888;
    margin-top: 16px;
}

.agent-message pre {
    background: #1c1c1e;
    padding: 16px;
    border-radius: 0 0 10px 10px;
    overflow-x: auto;
    margin: 0 0 16px 0;
    border: 1px solid var(--border-subtle);
}

.agent-message pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: #64d2ff;
    display: block;
}

.copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    padding: 2px 8px;
    font-size: 10px;
    border-radius: 4px;
}

.copy-btn:hover {
    background: rgba(255, 133, 117, 0.1);
}

.msg-citation {
    display: inline-block;
    font-size: 10px;
    background: rgba(255, 133, 117, 0.1);
    color: var(--accent-color);
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 8px;
    border: 1px solid rgba(255, 133, 117, 0.2);
}

.msg-link {
    color: var(--apple-system-blue);
    text-decoration: none;
}

.msg-link:hover {
    text-decoration: underline;
}

/* ââ INPUT AREA âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */

.input-area {
    padding: 20px 30px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-panel);
    display: flex;
    gap: 12px;
    align-items: center;
}

#message-input {
    flex: 1;
    background: #262626;
    border: 1px solid var(--border-subtle);
    padding: 12px 20px;
    border-radius: 24px;
    color: var(--text-primary);
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

#message-input:focus {
    border-color: var(--accent-color);
}

#send-btn {
    background: #1e1e1e;
    color: #ececec;
    border: 1px solid #333;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

#send-btn:hover {
    background: #2a2a2a;
    border-color: #555;
    color: #fff;
}

#send-btn:active {
    background: #333;
    transform: scale(0.96);
}

#send-btn.is-stop {
    border-color: #c0392b;
    color: #e74c3c;
}

#send-btn.is-stop:hover {
    background: rgba(231, 76, 60, 0.12);
    border-color: #e74c3c;
    color: #ff6b6b;
}

.attach-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 10px;
}

/* ââ UTILS ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.word-reveal {
    display: inline-block;
    opacity: 0;
    transform: translateY(2px);
    animation: reveal 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stream-status {
    min-height: 12px;
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2px;
    gap: 4px;
}

.thinking-label {
    font-size: 11px;
    color: #555;
    font-style: italic;
    letter-spacing: 0.02em;
}

.loading-dots::after {
    content: '';
    display: inline-block;
    width: 12px;
    text-align: left;
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {

    0%,
    20% {
        content: '';
    }

    40% {
        content: '.';
    }

    60% {
        content: '..';
    }

    80% {
        content: '...';
    }
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 8px 14px;
    background: var(--message-agent);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.typing-indicator-mini {
    display: inline-flex;
    gap: 3px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    height: 10px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.save-status {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.6;
    transition: opacity 0.3s;
}

/* Custom Scrollbar for Chat Area */
.chat-area::-webkit-scrollbar,
.details-sidebar::-webkit-scrollbar,
.plan-content::-webkit-scrollbar {
    width: 8px;
}

.chat-area::-webkit-scrollbar-track,
.details-sidebar::-webkit-scrollbar-track,
.plan-content::-webkit-scrollbar-track {
    background: transparent;
}

.chat-area::-webkit-scrollbar-thumb,
.details-sidebar::-webkit-scrollbar-thumb,
.plan-content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.chat-area::-webkit-scrollbar-thumb:hover,
.details-sidebar::-webkit-scrollbar-thumb:hover,
.plan-content::-webkit-scrollbar-thumb:hover {
    background: #444;
}


/* Resizer specific helper classes */
.resizer-middle,
.sidebar-resizer {
    display: none !important;
}

.resizer-left,
.panel-resizer {
    position: absolute !important;
    left: 0;
    top: 0;
    width: 8px !important;
    height: 100%;
    background: transparent;
    border-left: 2px solid rgba(255, 133, 117, 0.3);
    z-index: 1300;
    cursor: ew-resize;
    display: block !important;
    transition: background 0.2s, border-color 0.2s;
}

.resizer-left:hover,
.panel-resizer:hover,
.resizer-left.dragging,
.panel-resizer.dragging {
    background: rgba(255, 133, 117, 0.1) !important;
    border-left-color: var(--accent-color) !important;
}

/* Autonomous Execution Button */
.start-autonomous-btn {
    background: #4a4a4a;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
}

.start-autonomous-btn:hover {
    background: #5a5a5a;
    box-shadow: none;
    transform: none;
}

.start-autonomous-btn:active {
    background: #3a3a3a;
}

/* Autonomous Plan Area */
.autonomous-plan-area {
    background: rgba(74, 74, 74, 0.2);
    border: 1px solid rgba(74, 74, 74, 0.4);
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 12px;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 500;
    color: #a0a0a0;
    font-size: 12px;
}

.close-plan-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-plan-btn:hover {
    color: #888;
}

.plan-content {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-secondary);
    max-height: 200px;
    overflow-y: auto;
}

.plan-step {
    padding: 4px 0;
    border-bottom: none;
    transition: color 0.2s;
    font-size: 12px;
}

.plan-step:hover {
    color: var(--text-primary);
}

.section-help {
    font-size: 10px;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: -4px;
    line-height: 1.4;
}

.plan-btn {
    background: rgba(255, 133, 117, 0.1);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.plan-btn:hover {
    background: var(--accent-color);
    color: white;
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* STREAMING STYLES */
.thought-block {
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid var(--accent-color);
    margin: 8px 0;
    border-radius: 8px;
}

.thought-block summary {
    padding: 10px;
    cursor: pointer;
    color: var(--accent-color);
    font-weight: 600;
}

.thought-content {
    padding: 10px;
    font-size: 13px;
    color: #b0bec5;
    white-space: pre-wrap;
    font-family: monospace;
}

.response-text {
    margin-top: 10px;
}

.stream-status {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* ââ HITL CHECKPOINT BUBBLES ââââââââââââââââââââââââââââââââââââââââââ */
.hitl-question {
    margin: 6px 0 2px 0;
    padding: 6px 10px;
    border-left: 2px solid #444;
    font-size: 12px;
    color: #ccc;
}

.hitl-checkpoint-bubble {
    margin: 8px 0;
    padding: 10px 14px;
    background: #1e1e2e;
    border-left: 3px solid #7c6fe0;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #e0e0e0;
    line-height: 1.5;
}

.hitl-checkpoint-bubble + .hitl-checkpoint-bubble {
    margin-top: 4px;
}

/* ââ ReAct LOOP DISPLAY âââââââââââââââââââââââââââââââââââââââââââââââ */
.react-container {
    margin: 4px 0 8px 0;
}

.react-iteration {
    border-left: 1px solid #3a3a3a;
    padding-left: 10px;
    margin-bottom: 6px;
}

.thought-line {
    font-size: 11px;
    font-style: italic;
    color: #555;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 1px 0;
}

.action-line {
    font-size: 11px;
    font-family: 'SF Mono', 'Consolas', monospace;
    color: #777;
    line-height: 1.4;
    padding: 1px 0;
}

.action-result-line {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
    padding: 1px 0;
    margin-left: 8px;
}

@keyframes pulse-s {
    0% {
        opacity: 0.5
    }

    50% {
        opacity: 1
    }

    100% {
        opacity: 0.5
    }
}

/* ââ WORKMAP DAG VISUALIZATION ââââââââââââââââââââââââââââââââââââââââ */

.workmap-dag {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 10px 6px;
    margin-top: 2px;
}

.dag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.dag-title {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
}

.dag-controls {
    display: flex;
    gap: 4px;
}

.dag-play-btn,
.dag-pause-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    padding: 2px 5px;
    line-height: 1;
    transition: color 0.15s, border-color 0.15s;
}

.dag-play-btn:hover {
    color: #86efac;
    border-color: #86efac;
}

.dag-pause-btn:hover {
    color: #fbbf24;
    border-color: #fbbf24;
}

.dag-nodes {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dag-node {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    gap: 8px;
}

.dag-node-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dag-node-badge {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.75;
    flex-shrink: 0;
}

/* Status colour-coding */
.dag-node-status-pending {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
}

.dag-node-status-in-progress {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    animation: dag-pulse 1.6s ease-in-out infinite;
}

.dag-node-status-completed {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.dag-node-status-error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

@keyframes dag-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35);
    }

    50% {
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0);
    }
}

/* ââ WORKMAP TREE CANVAS (full-screen overlay) âââââââââââââââââââââââ */

#workmap-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
}

.workmap-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #141414;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.workmap-toolbar-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}

.workmap-toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.workmap-btn-play:hover {
    border-color: #86efac;
    color: #86efac;
}

.workmap-btn-pause:hover {
    border-color: #fbbf24;
    color: #fbbf24;
}

.workmap-toolbar-title {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.03em;
}

.workmap-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.workmap-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.workmap-badge-paused {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
}

.workmap-badge-running {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.workmap-badge-completed {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

/* Tree container â pannable canvas */
#workmap-tree-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: grab;
    user-select: none;
}

#workmap-tree-container:active {
    cursor: grabbing;
}

/* Dot grid background â pans with the canvas */
.wm-grid-layer {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

/* Pan layer â transforms applied here for pan + zoom */
#workmap-pan-layer {
    position: relative;
    transform-origin: 0 0;
    padding: 60px;
    min-width: max-content;
    min-height: max-content;
}

#workmap-edges {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#workmap-nodes {
    position: relative;
    z-index: 2;
    min-width: 1200px;
    min-height: 800px;
}

/* Individual tree node */
.wm-node {
    width: 260px;
    padding: 16px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1a1a1a;
    cursor: default;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    position: relative;
}

/* Absolutely-positioned nodes (draggable on canvas â whole node is handle) */
.wm-node-abs {
    position: absolute;
    cursor: grab;
    z-index: 2;
    user-select: none;
}

.wm-node-abs:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.06);
}

.wm-node-abs:active {
    cursor: grabbing;
}

.wm-node-dragging {
    cursor: grabbing !important;
    z-index: 10 !important;
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    opacity: 0.92;
}

.wm-node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wm-node-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.wm-node-id {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.2);
}

.wm-node-status {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}

.wm-node-task {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.45;
    margin-top: 4px;
}

.wm-node-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.wm-node-agent {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
}

.wm-node-deps {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.2);
    margin-top: 6px;
    font-style: italic;
}

/* Node status variants */
.wm-node-pending {
    border-color: rgba(255, 255, 255, 0.08);
}

.wm-node-pending .wm-node-status {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.35);
}

.wm-node-in-progress {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
    animation: wm-glow 2s ease-in-out infinite;
}

.wm-node-in-progress .wm-node-status {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

.wm-node-completed {
    border-color: rgba(34, 197, 94, 0.4);
}

.wm-node-completed .wm-node-status {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.wm-node-completed .wm-node-task {
    color: rgba(255, 255, 255, 0.4);
}

.wm-node-error {
    border-color: rgba(239, 68, 68, 0.5);
}

.wm-node-error .wm-node-status {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

@keyframes wm-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
    }

    50% {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
    }
}

/* Edge lines */
.wm-edge {
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 2;
    fill: none;
}

.wm-edge-active {
    stroke: rgba(59, 130, 246, 0.5);
    stroke-width: 2;
}

.wm-edge-done {
    stroke: rgba(34, 197, 94, 0.35);
    stroke-width: 2;
}

/* Chat button to open workmap */
.view-workmap-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    margin-top: 8px;
    display: inline-block;
    transition: all 0.2s;
}

.view-workmap-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
    color: #bfdbfe;
}

/* ââ RIGHT-CLICK CONTEXT MENU âââââââââââââââââââââââââââââââââââââââââ */

.wm-context-menu {
    position: fixed;
    z-index: 10000;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    min-width: 170px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.wm-ctx-item {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    padding: 8px 14px;
    text-align: left;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.12s;
}

.wm-ctx-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.wm-ctx-danger {
    color: #fca5a5;
}

.wm-ctx-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fecaca;
}

.wm-node-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wm-node-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 3px;
}

.wm-node-deps {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    margin-top: 4px;
    font-style: italic;
}

/* ââ DEADLINE INPUT (toolbar) âââââââââââââââââââââââââââââââââââââââââ */

.wm-deadline-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
}

.wm-deadline-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.wm-deadline-input {
    width: 56px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    color: #fff;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    padding: 4px 8px;
    text-align: center;
    outline: none;
    transition: border-color 0.15s;
}

.wm-deadline-input:focus {
    border-color: rgba(59, 130, 246, 0.5);
}

.wm-deadline-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.wm-deadline-unit {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
}

/* ââ ADD NODE BUTTON (toolbar) ââââââââââââââââââââââââââââââââââââââââ */

.workmap-btn-add {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.workmap-btn-add:hover {
    background: rgba(34, 197, 94, 0.22);
    border-color: #86efac;
    color: #bbf7d0;
}

/* ââ NODE EDIT MODAL ââââââââââââââââââââââââââââââââââââââââââââââââââ */

.wm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wm-modal {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    width: 520px;
    max-width: 92vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.wm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wm-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.wm-modal-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.15s;
}

.wm-modal-close-btn:hover {
    color: #fff;
}

.wm-modal-body {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wm-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.wm-field textarea,
.wm-field input[type="text"],
.wm-field input[type="number"],
.wm-field select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    padding: 10px 12px;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.wm-field textarea:focus,
.wm-field input:focus,
.wm-field select:focus {
    border-color: rgba(59, 130, 246, 0.5);
}

.wm-field textarea {
    resize: vertical;
    min-height: 60px;
}

.wm-field select {
    cursor: pointer;
}

.wm-field select option {
    background: #1a1a1a;
    color: #fff;
}

.wm-field-row {
    display: flex;
    gap: 14px;
}

.wm-field-half {
    flex: 1;
    min-width: 0;
}

/* Dependency chips */
.wm-deps-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
}

.wm-dep-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.15s;
}

.wm-dep-chip:hover {
    border-color: rgba(59, 130, 246, 0.4);
    color: rgba(255, 255, 255, 0.6);
}

.wm-dep-chip.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #93c5fd;
}

/* Modal footer */
.wm-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wm-modal-footer-right {
    display: flex;
    gap: 8px;
}

.wm-modal-btn {
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    padding: 8px 18px;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wm-btn-save {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.wm-btn-save:hover {
    background: rgba(59, 130, 246, 0.3);
    color: #bfdbfe;
}

.wm-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.wm-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.wm-btn-delete {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.wm-btn-delete:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fecaca;
}

/* ââ MCP TOOLS CONNECTOR PANEL âââââââââââââââââââââââââââââââââââââââââââââââ */

/* Sidebar summary area */
.mcp-tools-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mcp-tools-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.manage-tools-btn {
    font-size: 11px;
    font-weight: 500;
    background: rgba(255, 133, 117, 0.12);
    color: var(--accent-color);
    border: 1px solid rgba(255, 133, 117, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.manage-tools-btn:hover {
    background: rgba(255, 133, 117, 0.22);
    border-color: rgba(255, 133, 117, 0.5);
    color: #fff;
}

/* Connected tool badge pills */
.mcp-connected-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.mcp-badge {
    font-size: 10px;
    background: rgba(255, 133, 117, 0.1);
    color: var(--accent-color);
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 133, 117, 0.25);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mcp-badge img {
    width: 12px;
    height: 12px;
}

/* Modal overlay */
.mcp-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9600;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcp-modal {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 780px;
    max-width: 92vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: mcpModalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mcpModalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modal header */
.mcp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 12px;
    flex-shrink: 0;
}

.mcp-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.mcp-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mcp-search-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    padding: 7px 14px;
    width: 200px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.mcp-search-input:focus {
    border-color: var(--accent-color);
}

.mcp-search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.mcp-modal-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
}

.mcp-modal-close-btn:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.06);
}

/* Subtitle */
.mcp-modal-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    padding: 0 24px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    line-height: 1.4;
}

/* Modal body */
.mcp-modal-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Category tabs */
.mcp-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px 24px 10px;
    flex-shrink: 0;
}

.mcp-cat-tab {
    font-size: 11px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.mcp-cat-tab:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
}

.mcp-cat-tab.active {
    background: rgba(255, 133, 117, 0.15);
    color: var(--accent-color);
    border-color: rgba(255, 133, 117, 0.4);
}

/* Tools grid */
.mcp-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 14px 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.mcp-tools-grid::-webkit-scrollbar {
    width: 6px;
}

.mcp-tools-grid::-webkit-scrollbar-track {
    background: transparent;
}

.mcp-tools-grid::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

/* Tool card */
.mcp-tool-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mcp-tool-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.mcp-tool-card.connected {
    background: rgba(255, 133, 117, 0.06);
    border-color: rgba(255, 133, 117, 0.3);
}

.mcp-tool-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
}

.mcp-tool-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.mcp-tool-icon .mcp-icon-fallback {
    font-size: 18px;
    line-height: 1;
}

.mcp-tool-info {
    flex: 1;
    min-width: 0;
}

.mcp-tool-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mcp-tool-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.3;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mcp-tool-connect-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: rgba(255, 255, 255, 0.35);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    line-height: 1;
}

.mcp-tool-connect-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(255, 133, 117, 0.1);
}

.mcp-tool-card.connected .mcp-tool-connect-btn {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    font-size: 14px;
}

/* Modal footer */
.mcp-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.mcp-selected-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.mcp-modal-done-btn {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 8px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.mcp-modal-done-btn:hover {
    background: var(--accent-hover);
}

/* Responsive: 2-column on narrower modals */
@media (max-width: 600px) {
    .mcp-tools-grid {
        grid-template-columns: 1fr;
    }

    .mcp-modal {
        width: 95vw;
        max-height: 90vh;
    }
}

/* Interactive Glass Box Buttons */
.glass-box-btn {
    display: inline-block;
    background: rgba(88, 166, 255, 0.15);
    border: 1px solid rgba(88, 166, 255, 0.4);
    color: #58a6ff;
    padding: 6px 12px;
    margin: 4px 8px 4px 0;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.glass-box-btn:hover:not(:disabled) {
    background: rgba(88, 166, 255, 0.3);
    border-color: #58a6ff;
}