/* Bindu Agent Chat Interface Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: #fafafa;
    height: 100vh;
    color: #1a1a1a;
    font-size: 14px;
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 24px 32px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agent-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left h1 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    letter-spacing: -0.01em;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

.status-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agent-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.agent-metadata {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.metadata-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    letter-spacing: 0.02em;
}

.metadata-badge.paywall-badge {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    color: #92400e;
    font-weight: 600;
}

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

.auth-settings-btn {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-settings-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.bindu-badge {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 10px 16px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.15);
}

.bindu-badge span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
    letter-spacing: 0;
}

/* Tabs */
.tabs {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 24px;
    height: 48px;
    flex-shrink: 0;
}

.tab {
    padding: 12px 20px;
    cursor: pointer;
    border: none;
    background: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab:hover {
    color: #1a1a1a;
    background: #f8f8f8;
}

.tab.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

/* Main Content Wrapper */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* Tab Content */
.tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Agent Info Tab - Two Column Layout */
.agent-info-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 0;
    overflow: hidden;
    min-height: 0;
    background: #fafafa;
}

/* Left Column - Sidebar with collapsible sections */
.agent-info-left {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    background: #ffffff;
    padding: 0;
}

/* Info Section (Collapsible Card) */
.info-section {
    border-bottom: 1px solid #e5e7eb;
}

.section-header {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    transition: all 0.2s ease;
    user-select: none;
}

.section-header:hover {
    background: #f9fafb;
}

.section-header h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    letter-spacing: 0;
}

.toggle-icon {
    font-size: 9px;
    color: #9ca3af;
    transition: transform 0.3s ease;
}

.section-header:hover .toggle-icon {
    color: #6b7280;
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #ffffff;
}

.section-content.expanded {
    max-height: 2000px;
    padding: 0 16px 16px 16px;
}

.section-content.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* Info Items */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-item:first-child {
    padding-top: 0;
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #111827;
    font-weight: 500;
}

/* Agent Card Content */
#agent-card-content .info-table {
    width: 100%;
    border-collapse: collapse;
}

#agent-card-content .info-table td {
    padding: 7px 0;
    font-size: 10px;
    line-height: 1.4;
    vertical-align: top;
    border-bottom: 1px solid #f3f4f6;
}

#agent-card-content .info-table tr:first-child td {
    padding-top: 0;
}

#agent-card-content .info-table tr:last-child td {
    border-bottom: none;
    padding-bottom: 0;
}

#agent-card-content .info-table td:first-child {
    font-family: 'JetBrains Mono', monospace;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.05em;
    width: 70px;
    padding-right: 10px;
}

#agent-card-content .info-table td:last-child {
    font-family: 'JetBrains Mono', monospace;
    color: #111827;
    word-break: break-word;
    font-weight: 500;
}

/* DID Summary Content */
#did-summary-content .did-table {
    width: 100%;
    border-collapse: collapse;
}

#did-summary-content .did-table td {
    padding: 7px 0;
    font-size: 9px;
    line-height: 1.4;
    vertical-align: top;
    border-bottom: 1px solid #f3f4f6;
}

#did-summary-content .did-table tr:first-child td {
    padding-top: 0;
}

#did-summary-content .did-table tr:last-child td {
    border-bottom: none;
    padding-bottom: 0;
}

#did-summary-content .did-table td:first-child {
    font-family: 'JetBrains Mono', monospace;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 60px;
    padding-right: 10px;
}

#did-summary-content .did-table td:last-child {
    color: #111827;
    font-family: 'JetBrains Mono', monospace;
    word-break: break-all;
    font-weight: 500;
}

#did-summary-content .did-value-with-copy {
    display: flex;
    align-items: center;
    gap: 6px;
}

#did-summary-content .did-value-with-copy .did-value {
    flex: 1;
    background: #f9fafb;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    font-size: 9px;
    line-height: 1.3;
}

.copy-inline-btn {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    flex-shrink: 0;
    line-height: 1;
    font-weight: 500;
}

.copy-inline-btn:hover {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.copy-inline-btn:active {
    transform: scale(0.96);
}

/* Skills Summary Content */
#skills-summary-content .skill-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    min-height: 60px;
    max-height: 85px;
}

#skills-summary-content .skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: #3b82f6;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

#skills-summary-content .skill-item:hover {
    background: #f9fafb;
    border-color: #3b82f6;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

#skills-summary-content .skill-item:hover::before {
    transform: scaleY(1);
}

#skills-summary-content .skill-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

#skills-summary-content .skill-icon {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

#skills-summary-content .skill-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

#skills-summary-content .skill-description {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #6b7280;
    line-height: 1.4;
    margin-left: 22px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Skill Detail Modal */
.skill-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.skill-modal-content {
    background: #ffffff;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.skill-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.skill-modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.skill-modal-close:hover {
    color: #1a1a1a;
}

.skill-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.skill-detail-section {
    margin-bottom: 20px;
}

.skill-detail-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.skill-detail-section p {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.skill-tag {
    background: #f0f0f0;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 10px;
    color: #666;
}

.skill-examples {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.skill-examples li {
    font-size: 11px;
    color: #666;
    padding: 6px 10px;
    background: #f8f8f8;
    border-left: 3px solid #1a1a1a;
    margin-bottom: 6px;
    font-family: 'JetBrains Mono', monospace;
}

/* Right Column - JSON Panel */
.agent-info-right {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fafafa;
}

.json-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 20px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.json-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border-radius: 12px 12px 0 0;
}

.json-panel-header h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    letter-spacing: 0;
}

.json-content {
    flex: 1;
    overflow: auto;
    background: #ffffff;
    border-radius: 0 0 12px 12px;
}

#agent-json-display {
    margin: 0;
    padding: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 1.8;
    color: #1f2937;
    white-space: pre;
    overflow-wrap: normal;
    text-align: left;
}

.copy-json-btn {
    background: #3b82f6;
    color: #ffffff;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    padding: 8px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.copy-json-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.copy-json-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

/* Chat Tab - Split Layout */
.chat-layout {
    display: flex;
    flex: 1;
    width: 100%;
    overflow: hidden;
    min-height: 0;
}

/* Context Sidebar */
.context-sidebar {
    width: 280px;
    background: #f8f8f8;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.sidebar-header h3 {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
}

.new-chat-btn {
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
}

.new-chat-btn:hover {
    background: #333;
}

.context-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 0;
}

.context-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.context-item:hover {
    border-color: #1a1a1a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.context-item.active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

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

.context-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.context-badge.color-blue {
    background: #e3f2fd;
    color: #1976d2;
}

.context-badge.color-green {
    background: #e8f5e9;
    color: #2e7d32;
}

.context-badge.color-purple {
    background: #f3e5f5;
    color: #7b1fa2;
}

.context-badge.color-orange {
    background: #fff3e0;
    color: #f57c00;
}

.context-badge.color-pink {
    background: #fce4ec;
    color: #c2185b;
}

.context-badge.color-teal {
    background: #e0f2f1;
    color: #00796b;
}

.context-item.active .context-badge.color-blue {
    background: #1976d2;
    color: #ffffff;
}

.context-item.active .context-badge.color-green {
    background: #2e7d32;
    color: #ffffff;
}

.context-item.active .context-badge.color-purple {
    background: #7b1fa2;
    color: #ffffff;
}

.context-item.active .context-badge.color-orange {
    background: #f57c00;
    color: #ffffff;
}

.context-item.active .context-badge.color-pink {
    background: #c2185b;
    color: #ffffff;
}

.context-item.active .context-badge.color-teal {
    background: #00796b;
    color: #ffffff;
}

.context-time {
    font-size: 10px;
    color: #999;
    flex: 1;
}

.context-item.active .context-time {
    color: #ccc;
}

.context-clear-btn {
    background: transparent;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.2s;
    opacity: 0;
}

.context-item:hover .context-clear-btn {
    opacity: 1;
}

.context-clear-btn:hover {
    background: #ff4444;
    color: #ffffff;
}

.context-item.active .context-clear-btn {
    color: #ccc;
}

.context-item.active .context-clear-btn:hover {
    background: #ff4444;
    color: #ffffff;
}

.context-preview {
    font-size: 11px;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}

.context-item.active .context-preview {
    color: #ffffff;
}

.context-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f0f0f0;
}

.context-item.active .context-footer {
    border-top-color: #333;
}

.context-tasks {
    font-size: 10px;
    color: #999;
    font-weight: 500;
}

.context-item.active .context-tasks {
    color: #ccc;
}

.context-id-label {
    font-size: 9px;
    color: #bbb;
    font-family: 'JetBrains Mono', monospace;
}

.context-item.active .context-id-label {
    color: #888;
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    position: relative;
    min-width: 0;
    overflow: hidden;
}

.context-indicator {
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 24px;
    font-size: 11px;
    color: #666;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.context-indicator::before {
    content: '●';
    font-size: 8px;
    color: #4caf50;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 120px; /* Space for input container */
    background: #ffffff;
    min-height: 0;
}

.message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    padding-bottom: 40px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    position: relative;
}

.message.user .message-content {
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    color: #1a1a1a;
}

.message.agent .message-content {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #1a1a1a;
}

.message.status .message-content {
    background: transparent;
    border: none;
    color: #999;
    font-style: normal;
    text-align: center;
    max-width: 100%;
    font-size: 11px;
    padding: 4px 8px;
}

.message-meta {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Feedback button in bottom-right corner of message */
.feedback-btn-corner {
    position: absolute;
    bottom: 8px;
    right: 12px;
    background: #f8f8f8;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 5px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    color: #555;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    z-index: 10;
}

.feedback-btn-corner:hover {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Cancel task button in thinking indicator */
.cancel-task-btn {
    margin-left: 12px;
    background: #ff4444;
    border: 1px solid #cc0000;
    border-radius: 4px;
    padding: 5px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    color: #ffffff;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(255, 68, 68, 0.3);
}

.cancel-task-btn:hover {
    background: #cc0000;
    border-color: #990000;
    box-shadow: 0 2px 6px rgba(255, 68, 68, 0.5);
    transform: translateY(-1px);
}

.cancel-task-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(255, 68, 68, 0.3);
}

.task-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.task-badge.completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.task-badge.input-required {
    background: #fff3e0;
    color: #f57c00;
}

.task-badge.working {
    background: #e3f2fd;
    color: #1976d2;
}

.task-badge.failed {
    background: #ffebee;
    color: #c62828;
}

/* Chat Input */
.chat-input-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid #e0e0e0;
    padding: 16px 24px;
    background: #ffffff;
    z-index: 10;
    min-height: 80px;
    max-height: 200px;
}

.reply-indicator {
    background: #f0f0f0;
    border-left: 3px solid #1a1a1a;
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: 4px;
    font-size: 11px;
    display: none;
}

.reply-indicator.visible {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reply-close {
    cursor: pointer;
    font-weight: bold;
    color: #666;
}

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

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    transition: border-color 0.2s;
}

.chat-input input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.chat-input button {
    padding: 12px 24px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.chat-input button:hover:not(:disabled) {
    background: #333;
}

.chat-input button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Skills Tab */
.skills-container {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    min-height: 0;
}

.skill-item {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
}

.skill-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.skill-description {
    font-size: 11px;
    color: #666;
    line-height: 1.5;
}

/* Thinking Indicator */
.message-content.thinking {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    padding: 12px 20px;
    min-width: 60px;
}

.thinking-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.thinking-dots span {
    font-size: 20px;
    line-height: 1;
    animation: thinking 1.4s infinite;
    color: #999;
}

.thinking-dots span:nth-child(1) {
    animation-delay: 0s;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes thinking {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

/* Markdown Styling */
.message-content p {
    margin: 0.5em 0;
}

.message-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.message-content pre {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    padding: 12px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-content pre code {
    background: none;
    padding: 0;
}

/* Loading */
.loading {
    text-align: left;
    padding: 12px;
    color: #9ca3af;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
}

/* Error */
.error {
    color: #c62828;
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 4px;
    padding: 12px;
    margin: 12px 24px;
    font-size: 12px;
    display: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Footer */
.footer {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 16px 32px;
    min-height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #6b7280;
    flex-shrink: 0;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.04);
}

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

.footer-protocol {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.footer-protocol .dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-link {
    font-family: 'JetBrains Mono', monospace;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 11px;
    font-weight: 500;
}

.footer-link:hover {
    color: #3b82f6;
}

.footer-made {
    font-family: 'JetBrains Mono', monospace;
    color: #6b7280;
    font-size: 11px;
}

.footer-made a {
    color: #111827;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-made a:hover {
    color: #3b82f6;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #1a1a1a;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.task-id-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #666;
    background: #f8f8f8;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    word-break: break-all;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #1a1a1a;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #1a1a1a;
    color: #ffffff;
}

.btn-primary:hover {
    background: #333;
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
    border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e0e0e0;
    color: #1a1a1a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .context-sidebar {
        width: 240px;
    }

    .chat-messages {
        padding: 16px;
        padding-bottom: 100px;
    }

    .message-content {
        max-width: 85%;
    }

    /* Agent Info - Stack vertically on tablets */
    .agent-info-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .agent-info-left {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        max-height: 40vh;
    }

    .agent-info-right {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .context-sidebar {
        display: none;
    }

    .header {
        padding: 12px 16px;
        height: 60px;
    }

    .tabs {
        padding: 0 16px;
        height: 44px;
    }

    .chat-messages {
        padding: 12px;
        padding-bottom: 90px;
    }

    .chat-input-container {
        padding: 12px 16px;
        min-height: 70px;
    }

    .footer {
        padding: 12px 16px;
        height: 44px;
        font-size: 10px;
    }

    .modal-content {
        width: 95%;
        max-width: none;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }

    .feedback-btn-corner {
        font-size: 9px;
        padding: 3px 8px;
        bottom: 6px;
        right: 8px;
    }
}
