/* Custom CSS for TradingAgents Dash UI */

body {
    background-color: #0F172A;
    color: #F1F5F9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.dash-markdown {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Card styling */
.card {
    border-radius: 10px;
    border: 1px solid #334155;
    background-color: #1E293B;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Button styling */
.btn-primary {
    background-color: #3B82F6;
    border-color: #3B82F6;
}

.btn-primary:hover {
    background-color: #2563EB;
    border-color: #2563EB;
}

/* Navigation buttons */
.btn-link {
    padding: 0.25rem 0.5rem;
    margin: 0 0.25rem;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: none;
}

/* Status colors */
.text-pending {
    color: #94A3B8;
}

.text-in-progress {
    color: #F59E0B;
}

.text-completed {
    color: #10B981;
}

.text-error {
    color: #EF4444;
}

/* Table styling */
.table {
    color: #F1F5F9;
    border-color: #334155;
}

.table thead th {
    border-bottom: 2px solid #334155;
}

.table td, .table th {
    border-top: 1px solid #334155;
}

/* Input styling */
.form-control {
    background-color: #1E293B;
    border-color: #334155;
    color: #F1F5F9;
}

.form-control:focus {
    background-color: #1E293B;
    border-color: #3B82F6;
    color: #F1F5F9;
}

.llm-param-controls {
    background-color: rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(51, 65, 85, 0.65);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.llm-param-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #64748B;
    color: #93C5FD;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: help;
}

.llm-inline-help {
    display: block;
    color: #94A3B8;
    font-size: 0.78rem;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.llm-model-alert {
    background-color: rgba(51, 65, 85, 0.55) !important;
    border-color: rgba(100, 116, 139, 0.55) !important;
    color: #E2E8F0 !important;
}

/* Tabs styling */
.nav-tabs {
    border-bottom: 1px solid #334155;
}

.nav-tabs .nav-link {
    color: #64748B;
    border: none;
}

.nav-tabs .nav-link.active {
    color: #F1F5F9;
    background-color: transparent;
    border-bottom: 2px solid #3B82F6;
}

.tab-content {
    padding: 1rem 0;
}

/* Chart container */
.chart-container {
    height: 1000px;
    width: 100%;
}

/* Progress indicators */
.progress {
    background-color: #334155;
}

.progress-bar {
    background-color: #3B82F6;
}

/* Researcher Debate styling */
.researcher-debate {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1E293B;
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
}

.debate-header {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-weight: bold;
    border-bottom: 1px solid #334155;
    margin-bottom: 15px;
}

.bull-header {
    color: #10B981;
    padding-left: 20px;
    font-size: 1.1rem;
}

.bear-header {
    color: #EF4444;
    padding-right: 20px;
    font-size: 1.1rem;
}

.debate-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px 0;
}

.message-row {
    display: flex;
    width: 100%;
    margin-bottom: 12px;
}

.bull-message, .bear-message {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 10px;
    white-space: pre-wrap;
    line-height: 1.5;
}

.bull-message {
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10B981;
    margin-right: auto;
    color: #F1F5F9;
}

.bear-message {
    background-color: rgba(239, 68, 68, 0.1);
    border-right: 4px solid #EF4444;
    margin-left: auto;
    text-align: right;
    color: #F1F5F9;
}

.message-spacer {
    flex: 1;
    min-width: 20px;
}

/* Enhanced Alpaca account section styling */
.enhanced-alpaca-section {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.enhanced-account-summary {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    border: 1px solid #334155;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.enhanced-summary-item {
    background: rgba(59, 130, 246, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin: 5px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.enhanced-summary-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.summary-item {
    text-align: center;
}

.summary-label {
    font-size: 0.9rem;
    color: #94A3B8;
    font-weight: 600;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #3B82F6;
}

.summary-value.positive {
    color: #10B981;
}

.summary-value.negative {
    color: #EF4444;
}

/* Enhanced Table Styling */
.enhanced-table-container {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #334155;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.enhanced-table-container.error-state {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.enhanced-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    font-size: 0.9rem;
}

.table-header {
    background: linear-gradient(135deg, #334155 0%, #1E293B 100%);
    color: #F1F5F9;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-header:first-child {
    border-top-left-radius: 8px;
}

.table-header:last-child {
    border-top-right-radius: 8px;
}

.table-row-hover {
    background-color: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.table-row-hover:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.table-row-hover:last-child {
    border-bottom: none;
}

.table-row-hover td {
    padding: 15px 12px;
    border: none;
    vertical-align: middle;
}

.symbol-cell {
    width: 25%;
}

.value-cell, .pnl-cell {
    width: 20%;
}

.action-cell {
    width: 15%;
    text-align: center;
}

.side-cell, .filled-cell, .price-cell, .status-cell {
    width: 20%;
}

.symbol-text {
    color: #3B82F6;
    font-weight: 600;
    font-size: 1rem;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.5);
}

/* Liquidate Button Styling */
.liquidate-btn {
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-width: 2px;
}

.liquidate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Markdown Table Styling - ChatGPT-like appearance */
.dash-markdown table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: transparent;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dash-markdown table thead {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.dash-markdown table thead th {
    color: #FFFFFF;
    font-weight: 600;
    padding: 16px 20px;
    text-align: left;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.dash-markdown table thead th:first-child {
    border-top-left-radius: 10px;
}

.dash-markdown table thead th:last-child {
    border-top-right-radius: 10px;
}

.dash-markdown table tbody tr {
    background-color: rgba(30, 41, 59, 0.3);
    border-bottom: 1px solid rgba(51, 65, 85, 0.2);
    transition: all 0.3s ease;
}

.dash-markdown table tbody tr:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.dash-markdown table tbody tr:nth-child(even) {
    background-color: rgba(30, 41, 59, 0.2);
}

.dash-markdown table tbody tr:nth-child(even):hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
}

.dash-markdown table tbody td {
    padding: 14px 20px;
    color: #F1F5F9;
    font-size: 0.9rem;
    line-height: 1.5;
    border: none;
    vertical-align: middle;
}

.dash-markdown table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.dash-markdown table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

/* Special styling for different types of table cells */
.dash-markdown table td:contains("BUY"),
.dash-markdown table td:contains("LONG"),
.dash-markdown table td:contains("Bullish") {
    color: #10B981;
    font-weight: 600;
}

.dash-markdown table td:contains("SELL"),
.dash-markdown table td:contains("SHORT"),
.dash-markdown table td:contains("Bearish") {
    color: #EF4444;
    font-weight: 600;
}

.dash-markdown table td:contains("HOLD"),
.dash-markdown table td:contains("NEUTRAL"),
.dash-markdown table td:contains("Neutral") {
    color: #F59E0B;
    font-weight: 600;
}

/* Responsive table styling */
@media (max-width: 768px) {
    .dash-markdown table {
        font-size: 0.8rem;
    }
    
    .dash-markdown table thead th,
    .dash-markdown table tbody td {
        padding: 10px 12px;
    }
    
    .dash-markdown table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Code blocks in markdown for better formatting */
.dash-markdown pre {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 16px;
    margin: 1rem 0;
    overflow-x: auto;
    color: #E2E8F0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

.dash-markdown code {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

/* Enhanced markdown headers */
.dash-markdown h1,
.dash-markdown h2,
.dash-markdown h3,
.dash-markdown h4,
.dash-markdown h5,
.dash-markdown h6 {
    color: #F1F5F9;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.dash-markdown h1 {
    font-size: 2rem;
    border-bottom: 2px solid #3B82F6;
    padding-bottom: 0.5rem;
}

.dash-markdown h2 {
    font-size: 1.6rem;
    color: #3B82F6;
}

.dash-markdown h3 {
    font-size: 1.3rem;
    color: #60A5FA;
}

.dash-markdown h4 {
    font-size: 1.1rem;
    color: #93C5FD;
}

/* Lists styling */
.dash-markdown ul,
.dash-markdown ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.dash-markdown li {
    margin: 0.5rem 0;
    line-height: 1.6;
    color: #E2E8F0;
}

/* Blockquotes */
.dash-markdown blockquote {
    border-left: 4px solid #3B82F6;
    background-color: rgba(59, 130, 246, 0.05);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    color: #E2E8F0;
    font-style: italic;
}

/* Strong text and emphasis */
.dash-markdown strong {
    color: #F1F5F9;
    font-weight: 700;
}

.dash-markdown em {
    color: #CBD5E1;
    font-style: italic;
}

/* Horizontal rules */
.dash-markdown hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #334155, transparent);
    margin: 2rem 0;
}

/* Table container wrapper for better spacing */
.dash-markdown {
    max-width: 100%;
    overflow-x: auto;
}

/* Enhanced Reports Panel Styling */
.reports-panel-card {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.report-title {
    color: #F1F5F9;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.report-title i {
    color: #3B82F6;
}

.report-divider {
    background: linear-gradient(90deg, transparent, #334155, transparent);
    border: none;
    height: 1px;
    margin: 1rem 0;
}

.pagination-row {
    background-color: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(51, 65, 85, 0.3);
}

.current-symbol-container {
    color: #94A3B8;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-symbol-container i {
    color: #3B82F6;
}

.symbol-display {
    color: #3B82F6;
    font-weight: 700;
    font-size: 1.4rem;
}

/* Enhanced Tabs Styling */
.enhanced-tabs .nav-tabs {
    background: linear-gradient(135deg, #334155 0%, #1E293B 100%);
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #3B82F6;
    padding: 0.25rem 0.5rem 0 0.5rem;
}

.enhanced-tabs .nav-tabs .nav-link {
    color: #94A3B8;
    border: none;
    background: transparent;
    border-radius: 6px 6px 0 0;
    padding: 0.75rem 1rem;
    margin-right: 0.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.enhanced-tabs .nav-tabs .nav-link:hover {
    color: #E2E8F0;
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.enhanced-tabs .nav-tabs .nav-link.active {
    color: #FFFFFF;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Tab content containers */
[id$="-tab-content"] {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    border-radius: 0 0 8px 8px;
    padding: 1.5rem;
    min-height: 1000px;
    border: 1px solid rgba(51, 65, 85, 0.3);
    border-top: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Enhanced markdown content within tabs */
[id$="-tab-content"] .enhanced-markdown-content {
    background: transparent;
    border: none;
    padding: 0;
    min-height: auto;
    color: #E2E8F0;
    line-height: 1.6;
}

/* Loading messages in tab content */
[id$="-tab-content"] .loading-message {
    color: #3B82F6;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

[id$="-tab-content"] .loading-description {
    color: #94A3B8;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    text-align: center;
    font-style: italic;
}

/* Debate content wrapper styling */
[id$="-tab-content"] .debate-content-wrapper {
    background: transparent;
    padding: 0;
    min-height: 850px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Mobile responsiveness for tab content */
@media (max-width: 768px) {
    [id$="-tab-content"] {
        padding: 1rem;
        min-height: 300px;
    }
    
    .enhanced-tabs .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

.dash-markdown {
    max-width: 100%;
    overflow-x: auto;
}

/* Enhanced Reports Panel Styling */
.reports-panel-card {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.report-title {
    color: #F1F5F9;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.report-title i {
    color: #3B82F6;
}

.report-divider {
    background: linear-gradient(90deg, transparent, #334155, transparent);
    border: none;
    height: 1px;
    margin: 1rem 0;
}

.pagination-row {
    background-color: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(51, 65, 85, 0.3);
}

.current-symbol-container {
    color: #94A3B8;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-symbol-container i {
    color: #3B82F6;
}

.symbol-display {
    color: #3B82F6;
    font-weight: 700;
    font-size: 1.4rem;
}

/* Symbol Pagination Styling */
.symbol-pagination-container {
    background-color: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(51, 65, 85, 0.3);
}

.symbol-pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.symbol-btn {
    transition: all 0.15s ease !important;
    min-width: 60px;
    font-weight: 500;
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    border: 1px solid #475569;
    color: #E2E8F0;
    transform: translateY(0);
    margin: 0 2px;
    border-radius: 6px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.symbol-btn:hover {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    border-color: #2563EB !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3) !important;
}

/* IMMEDIATE CLICK FEEDBACK - This fires instantly! */
.symbol-btn:active {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%) !important;
    border-color: #1E40AF !important;
    color: white !important;
    transform: translateY(0) scale(0.95) !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4) !important;
    transition: all 0.05s ease !important;
}

/* SELECTED STATE - This updates after callback */
.symbol-btn.active {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    border-color: #059669 !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3) !important;
}

/* SELECTED STATE HOVER */
.symbol-btn.active:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    border-color: #047857 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4) !important;
}

/* SELECTED STATE CLICK */
.symbol-btn.active:active {
    background: linear-gradient(135deg, #047857 0%, #065F46 100%) !important;
    border-color: #065F46 !important;
    transform: translateY(0) scale(0.98) !important;
    transition: all 0.05s ease !important;
}

/* Touch device support for immediate feedback */
@media (hover: none) and (pointer: coarse) {
    .symbol-btn:active {
        background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%) !important;
        border-color: #1E40AF !important;
        color: white !important;
        transform: scale(0.95) !important;
        transition: all 0.1s ease !important;
    }
    
    .symbol-btn.active:active {
        background: linear-gradient(135deg, #047857 0%, #065F46 100%) !important;
        border-color: #065F46 !important;
        transform: scale(0.95) !important;
    }
    
    /* Larger touch targets on mobile */
    .symbol-btn {
        min-height: 44px;
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Symbol Button Group Styling */
.btn-group .symbol-btn:not(:last-child) {
    margin-right: 2px;
}

.btn-group .symbol-btn:not(:first-child) {
    margin-left: 2px;
}

/* Button group container */
.symbol-pagination-wrapper .btn-group {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Focus states for accessibility */
.symbol-btn:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.symbol-btn.active:focus {
    outline: 2px solid #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Navigation Info */
.symbol-pagination-wrapper .text-muted {
    font-size: 0.85rem;
    color: #64748B !important;
    font-weight: 500;
}

.symbol-pagination-wrapper .text-muted i {
    color: #3B82F6;
    margin-right: 0.5rem;
}

/* Responsive Symbol Pagination */
@media (max-width: 768px) {
    .symbol-btn {
        min-width: 50px !important;
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem !important;
        margin: 0 1px !important;
    }
    
    .symbol-pagination-wrapper .btn-group {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-row {
        padding: 8px;
    }
}

/* Enhanced Tabs Styling */
.enhanced-tabs .nav-tabs {
    border-bottom: 1px solid #334155;
    background-color: rgba(15, 23, 42, 0.5);
    border-radius: 8px 8px 0 0;
    padding: 0.5rem;
}

.enhanced-tabs .nav-tabs .nav-link {
    color: #94A3B8;
    border: none;
    border-radius: 6px;
    margin: 0 2px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background-color: transparent;
}

.enhanced-tabs .nav-tabs .nav-link:hover {
    color: #E2E8F0;
    background-color: rgba(59, 130, 246, 0.1);
    border-color: transparent;
}

.enhanced-tabs .nav-tabs .nav-link.active {
    color: #FFFFFF;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Loading States for Symbol Pagination */
.symbol-pagination-container .text-muted {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #64748B;
    font-style: italic;
}

/* Animation for Symbol Button Clicks */
@keyframes symbolClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.symbol-btn:active {
    animation: symbolClick 0.15s ease;
}

/* Enhanced Visual Feedback */
.symbol-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

/* Gradient Background for Active State */
.symbol-btn.active {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Debate iframe styling */
.debate-iframe {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.debate-iframe:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Enhanced styling for debate content containers */
[id$="debate-tab-content"] {
    padding: 0 !important;
    background: #1E293B !important;
    border: 1px solid #334155;
}

[id$="debate-tab-content"] .debate-content-wrapper {
    min-height: 850px;
}

/* Mobile responsiveness for debates */
@media (max-width: 768px) {
    .debate-iframe {
        height: 1000px !important;
    }
    
    [id$="debate-tab-content"] {
        padding: 0.5rem !important;
    }
}

/* Prompt Modal and Button Styling */
.show-prompt-btn {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
    opacity: 0.8;
    transition: all 0.2s ease;
    border-radius: 4px !important;
}

.show-prompt-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.report-header {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(51, 65, 85, 0.3);
    margin-bottom: 1rem;
}

.report-header-title {
    color: #E2E8F0;
    font-weight: 600;
    margin: 0;
}

.report-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.prompt-modal .modal-content {
    background-color: #1E293B;
    border: 1px solid #334155;
    border-radius: 12px;
}

.prompt-modal-header {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border-bottom: 1px solid #334155;
    border-radius: 12px 12px 0 0;
}

.prompt-modal-header h4 {
    color: #E2E8F0;
    margin: 0;
}

.prompt-modal-body {
    background-color: #1E293B;
    color: #E2E8F0;
}

.prompt-content {
    background: #0F172A !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #E2E8F0 !important;
    white-space: pre-wrap !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #334155 #1E293B;
}

.prompt-content::-webkit-scrollbar {
    width: 8px;
}

.prompt-content::-webkit-scrollbar-track {
    background: #1E293B;
    border-radius: 4px;
}

.prompt-content::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

.prompt-content::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.prompt-modal .modal-footer {
    background-color: #1E293B;
    border-top: 1px solid #334155;
    border-radius: 0 0 12px 12px;
}

.prompt-modal .btn-outline-primary {
    border-color: #3B82F6;
    color: #3B82F6;
}

.prompt-modal .btn-outline-primary:hover {
    background-color: #3B82F6;
    border-color: #3B82F6;
    color: #FFFFFF;
}

.prompt-modal .btn-secondary {
    background-color: #64748B;
    border-color: #64748B;
    color: #FFFFFF;
}

.prompt-modal .btn-secondary:hover {
    background-color: #475569;
    border-color: #475569;
}

/* Animation for prompt buttons */
@keyframes promptButtonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.show-prompt-btn:active {
    animation: promptButtonPulse 0.15s ease;
}

/* Responsive design for prompt modal */
@media (max-width: 768px) {
    .prompt-modal .modal-dialog {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .report-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .report-header-actions {
        justify-content: center;
    }
    
    .prompt-content {
        font-size: 12px !important;
        max-height: 300px !important;
    }
}

/* Tool Outputs Modal Styling */
.show-tool-outputs-btn {
    transition: all 0.2s ease-in-out;
    border-radius: 6px;
    font-weight: 500;
    letter-spacing: 0.025em;
}

.show-tool-outputs-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.report-debug-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

.tool-outputs-modal .modal-content {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border: 1px solid #374151;
}

.tool-outputs-modal-header {
    background: linear-gradient(135deg, #374151 0%, #1F2937 100%);
    border-bottom: 1px solid #4B5563;
}

.tool-outputs-modal-header h4 {
    color: #FCD34D;
    font-weight: 600;
}

.tool-outputs-modal-body {
    max-height: 70vh;
    background: #0F172A;
}

.tool-outputs-content {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    line-height: 1.6;
    background: #111827 !important;
    border: 1px solid #374151 !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    color: #F8FAFC !important;
    max-height: 500px;
    overflow-y: auto;
}

.tool-outputs-content h1 {
    color: #FCD34D !important;
    border-bottom: 2px solid #4B5563;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.tool-outputs-content h2 {
    color: #34D399 !important;
    border-bottom: 1px solid #374151;
    padding-bottom: 0.3rem;
    margin-bottom: 0.8rem;
    margin-top: 1.5rem;
    font-size: 1.2rem;
}

.tool-outputs-content h3 {
    color: #60A5FA !important;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.tool-outputs-content p {
    color: #E5E7EB !important;
    margin-bottom: 0.5rem;
}

.tool-outputs-content strong {
    color: #F3F4F6 !important;
    font-weight: 600;
}

.tool-outputs-content code {
    background: #1E293B !important; /* slightly lighter than pre */
    color: #93C5FD !important;      /* soft blue text */
    border: 1px solid #334155;
}

/* ---------- Better code block readability in Tool Outputs ---------- */
.tool-outputs-content pre {
    background: #0F172A !important;   /* darker background */
    border: 1px solid #334155 !important;
    color: #F1F5F9 !important;       /* lighter text */
    border-radius: 6px;
    padding: 1rem !important;
    overflow-x: auto;
    font-size: 13px;
}

.tool-outputs-content pre code {
    background: #afbddf !important;   /* darker background */
    color: #0F172A !important;
}

.tool-outputs-content::-webkit-scrollbar {
    width: 8px;
}

.tool-outputs-content::-webkit-scrollbar-track {
    background: #1F2937;
    border-radius: 4px;
}

.tool-outputs-content::-webkit-scrollbar-thumb {
    background: #4B5563;
    border-radius: 4px;
}

.tool-outputs-content::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

.tool-outputs-modal .modal-footer {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    border-top: 1px solid #374151;
}

.tool-outputs-modal .btn-outline-warning {
    border-color: #F59E0B;
    color: #F59E0B;
}

.tool-outputs-modal .btn-outline-warning:hover {
    background-color: #F59E0B;
    color: #1F2937;
}

.tool-outputs-modal .btn-outline-primary {
    border-color: #3B82F6;
    color: #3B82F6;
}

.tool-outputs-modal .btn-outline-primary:hover {
    background-color: #3B82F6;
    color: #FFFFFF;
}

.tool-outputs-modal .btn-outline-success {
    border-color: #10B981;
    color: #10B981;
}

.tool-outputs-modal .btn-outline-success:hover {
    background-color: #10B981;
    color: #FFFFFF;
}

.tool-outputs-modal .btn-secondary {
    background-color: #4B5563;
    border-color: #4B5563;
    color: #F9FAFB;
}

.tool-outputs-modal .btn-secondary:hover {
    background-color: #374151;
    border-color: #374151;
}

@keyframes toolOutputButtonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.show-tool-outputs-btn:active {
    animation: toolOutputButtonPulse 0.2s ease-in-out;
}

@media (max-width: 768px) {
    .tool-outputs-modal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .report-debug-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .tool-outputs-content {
        font-size: 12px;
        max-height: 300px;
    }
}

/* ============================================
   API Configuration Modal Styling
   ============================================ */

.config-apis-btn {
    transition: all 0.3s ease;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.config-apis-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.api-config-modal .modal-content {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border: 1px solid #374151;
    border-radius: 12px;
}

.api-config-modal-header {
    background: linear-gradient(135deg, #374151 0%, #1F2937 100%);
    border-bottom: 1px solid #4B5563;
    border-radius: 12px 12px 0 0;
}

.api-config-modal-header h4 {
    color: #F59E0B;
    font-weight: 600;
}

.api-config-modal-body {
    background: #1E293B;
    color: #E2E8F0;
    padding: 1.5rem;
}

.api-key-input {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    letter-spacing: 0.5px;
}

.api-key-input::placeholder {
    color: #64748B;
    font-style: italic;
}

.api-key-input:focus {
    background: #0F172A !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.api-toggle-btn {
    border-color: #475569 !important;
    color: #94A3B8 !important;
    transition: all 0.2s ease;
}

.api-toggle-btn:hover {
    background-color: rgba(59, 130, 246, 0.1) !important;
    border-color: #3B82F6 !important;
    color: #3B82F6 !important;
}

.api-status-indicator {
    transition: all 0.3s ease;
}

.api-status-indicator.btn-success,
.api-status-indicator[color="success"] {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border-color: #10B981 !important;
    color: #10B981 !important;
}

.api-status-indicator.btn-outline-secondary,
.api-status-indicator[color="outline-secondary"] {
    background-color: transparent !important;
    border-color: #475569 !important;
    color: #64748B !important;
}

.api-config-modal .modal-footer {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    border-top: 1px solid #374151;
    border-radius: 0 0 12px 12px;
}

.api-config-modal .btn-outline-danger {
    border-color: #EF4444;
    color: #EF4444;
}

.api-config-modal .btn-outline-danger:hover {
    background-color: #EF4444;
    border-color: #EF4444;
    color: #FFFFFF;
}

.api-config-modal .btn-outline-info {
    border-color: #0EA5E9;
    color: #0EA5E9;
}

.api-config-modal .btn-outline-info:hover {
    background-color: #0EA5E9;
    border-color: #0EA5E9;
    color: #FFFFFF;
}

.api-config-modal .btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.api-config-modal .btn-primary:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.api-config-modal .alert-info {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: #7DD3FC;
}

.api-config-modal .alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6EE7B7;
}

.api-config-modal .alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #FCD34D;
}

.api-config-modal .form-switch .form-check-input {
    background-color: #475569;
    border-color: #64748B;
}

.api-config-modal .form-switch .form-check-input:checked {
    background-color: #10B981;
    border-color: #10B981;
}

.api-config-modal .input-group {
    border-radius: 8px;
    overflow: hidden;
}

.api-config-modal .input-group .form-control {
    border-radius: 8px 0 0 8px !important;
}

.api-config-modal .input-group .btn:last-child {
    border-radius: 0 8px 8px 0 !important;
}

/* Animation for save button */
@keyframes saveSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.api-config-modal .btn-primary:active {
    animation: saveSuccess 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .api-config-modal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .api-config-modal-body {
        padding: 1rem;
    }
    
    .config-apis-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   Analysis Configuration Refresh
   ============================================ */

.analysis-config-card {
    border-radius: 8px;
    border: 1px solid rgba(71, 85, 105, 0.8);
    background: #111827;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.analysis-config-card .card-body {
    padding: 18px;
}

.config-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.config-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0;
}

.config-subtitle {
    margin-top: 3px;
    color: #94A3B8;
    font-size: 0.85rem;
}

.config-badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid rgba(45, 212, 191, 0.32);
    background: rgba(20, 184, 166, 0.1);
    color: #5EEAD4;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.42rem 0.66rem;
}

.config-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.config-accordion .accordion-item {
    overflow: hidden;
    border: 1px solid rgba(71, 85, 105, 0.76);
    border-radius: 8px !important;
    background: #172033;
}

.config-accordion .accordion-button {
    min-height: 56px;
    padding: 0.75rem 0.95rem;
    background: #172033;
    color: #F8FAFC;
    border-radius: 8px !important;
    box-shadow: none;
}

.config-accordion .accordion-button:not(.collapsed) {
    background: #1B2638;
    color: #F8FAFC;
    box-shadow: inset 3px 0 0 #2DD4BF;
}

.config-accordion .accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

.config-accordion .accordion-button::after {
    filter: invert(1) grayscale(1);
    opacity: 0.65;
}

.config-accordion .accordion-body {
    padding: 14px;
    background: #111827;
}

.config-accordion-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.config-accordion-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.12);
    color: #93C5FD;
}

.config-accordion-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.config-accordion-title {
    font-weight: 700;
}

.config-accordion-meta {
    margin-top: 3px;
    color: #94A3B8;
}

.config-section-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.config-two-column,
.model-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.config-field,
.config-toggle-tile,
.model-panel,
.config-info-panel {
    border: 1px solid rgba(71, 85, 105, 0.62);
    border-radius: 8px;
    background: #0F172A;
    padding: 12px;
}

.config-field {
    min-width: 0;
}

.config-label,
.config-label-row {
    color: #CBD5E1;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
}

.config-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.config-input-group .input-group-text,
.analysis-config-card .input-group-text {
    border-color: #334155;
    background: #172033;
    color: #93C5FD;
}

.config-input,
.config-select,
.analysis-config-card .form-control,
.analysis-config-card .form-select {
    min-height: 42px;
    border-color: #334155;
    border-radius: 7px;
    background-color: #111827;
    color: #F8FAFC;
}

.config-input:focus,
.config-select:focus,
.analysis-config-card .form-control:focus,
.analysis-config-card .form-select:focus {
    border-color: #2DD4BF;
    background-color: #111827;
    color: #F8FAFC;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.14);
}

.analysis-config-card .form-control::placeholder {
    color: #64748B;
}

.analyst-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.analyst-tile {
    min-height: 46px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(71, 85, 105, 0.62);
    border-radius: 8px;
    background: #0F172A;
    padding: 0.7rem 0.8rem;
}

.analyst-checkbox {
    width: 100%;
    margin: 0;
    color: #E2E8F0;
    font-size: 0.87rem;
    font-weight: 650;
}

.analysis-config-card .form-check-input {
    border-color: #64748B;
    background-color: #172033;
}

.analysis-config-card .form-check-input:checked {
    border-color: #2DD4BF;
    background-color: #2DD4BF;
}

.analysis-config-card .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.16);
}

.segmented-radio {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.segmented-radio .form-check {
    margin: 0;
    padding: 0;
}

.segmented-radio .form-check-input {
    position: absolute;
    opacity: 0;
}

.segmented-radio .form-check-label {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 7px;
    border: 1px solid rgba(71, 85, 105, 0.76);
    background: #172033;
    color: #CBD5E1;
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
}

.segmented-radio .form-check-input:checked + .form-check-label {
    border-color: #2DD4BF;
    background: rgba(45, 212, 191, 0.14);
    color: #F8FAFC;
}

.config-switch .form-check-label {
    color: #E2E8F0;
    font-weight: 700;
}

.config-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.config-status-slot:empty,
.config-validation-slot:empty {
    display: none;
}

.config-info-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.config-info-heading {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.config-info-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.12);
    color: #CBD5E1;
}

.config-info-title {
    color: #F8FAFC;
    font-weight: 750;
    line-height: 1.25;
}

.config-info-body {
    margin-top: 3px;
    color: #94A3B8;
    font-size: 0.84rem;
    line-height: 1.35;
}

.config-info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.config-info-pill,
.llm-price-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(100, 116, 139, 0.55);
    background: rgba(30, 41, 59, 0.72);
    color: #CBD5E1;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.24rem 0.5rem;
}

.config-info-panel.info .config-info-icon {
    background: rgba(14, 165, 233, 0.16);
    color: #7DD3FC;
}

.config-info-panel.success .config-info-icon {
    background: rgba(16, 185, 129, 0.16);
    color: #6EE7B7;
}

.config-info-panel.warning .config-info-icon {
    background: rgba(245, 158, 11, 0.16);
    color: #FCD34D;
}

.config-info-panel.danger .config-info-icon {
    background: rgba(239, 68, 68, 0.16);
    color: #FCA5A5;
}

.config-inline-alert {
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
}

.model-panel {
    min-width: 0;
}

.provider-options-grid {
    align-items: start;
}

.model-custom-field {
    margin-top: 10px;
}

.model-panel-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.model-panel-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.12);
    color: #FCD34D;
}

.model-panel-title {
    margin: 0;
    color: #F8FAFC;
    font-size: 0.96rem;
    font-weight: 750;
}

.model-panel-meta {
    color: #94A3B8;
}

.llm-model-info:empty {
    display: none;
}

.llm-model-summary {
    display: grid;
    gap: 5px;
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(71, 85, 105, 0.62);
    background: #172033;
}

.llm-model-name {
    color: #F8FAFC;
    font-weight: 750;
}

.llm-model-description {
    color: #94A3B8;
    font-size: 0.82rem;
    line-height: 1.35;
}

.llm-price-pill {
    justify-self: start;
    border-color: rgba(45, 212, 191, 0.32);
    color: #5EEAD4;
}

.config-subaccordion {
    border-radius: 8px;
    overflow: hidden;
}

.config-subaccordion .accordion-item {
    border: 1px solid rgba(71, 85, 105, 0.62);
    background: #111827;
}

.config-subaccordion .accordion-button {
    padding: 0.65rem 0.8rem;
    background: #172033;
    color: #CBD5E1;
    font-size: 0.86rem;
    font-weight: 750;
}

.config-subaccordion .accordion-button:not(.collapsed) {
    background: #172033;
    color: #F8FAFC;
}

.config-subaccordion .accordion-body {
    padding: 10px;
    background: #0F172A;
}

.llm-param-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
}

.llm-param-field {
    min-width: 0;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(71, 85, 105, 0.52);
    background: #111827;
}

.llm-param-switch {
    display: flex;
    align-items: center;
}

.llm-param-help {
    flex: 0 0 auto;
    border-color: rgba(148, 163, 184, 0.72);
    color: #5EEAD4;
    background: rgba(45, 212, 191, 0.08);
}

.config-action-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin-top: 14px;
    padding-top: 14px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0) 0%, #111827 34%);
}

.config-primary-action {
    min-height: 48px;
    border-radius: 8px;
    font-weight: 800;
    letter-spacing: 0;
}

.result-status {
    color: #CBD5E1;
    font-size: 0.9rem;
    line-height: 1.45;
}

@media (max-width: 1200px) {
    .analyst-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .config-two-column,
    .model-grid {
        grid-template-columns: 1fr;
    }

    .analyst-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .analysis-config-card .card-body {
        padding: 12px;
    }

    .config-header {
        flex-direction: column;
    }

    .config-badge {
        white-space: normal;
    }

    .analyst-grid,
    .llm-param-controls,
    .segmented-radio {
        grid-template-columns: 1fr;
    }

    .config-accordion-meta {
        display: none;
    }
}

/* ============================================
   Interaction Polish: Config, Reports, Orders
   ============================================ */

.analysis-config-card,
.reports-panel-card,
.enhanced-table-container,
.config-accordion .accordion-item,
.config-field,
.config-toggle-tile,
.model-panel,
.config-info-panel,
.analyst-tile {
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.analysis-config-card:hover,
.reports-panel-card:hover {
    border-color: rgba(45, 212, 191, 0.42);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.config-accordion .accordion-item:hover,
.model-panel:hover,
.config-info-panel:hover {
    border-color: rgba(45, 212, 191, 0.46);
    background-color: #111C2E;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.config-accordion .accordion-button:hover {
    background-color: #1F2B3D;
}

.analyst-tile {
    cursor: pointer;
    padding: 0;
}

.analyst-tile:hover {
    transform: translateY(-1px);
    border-color: rgba(147, 197, 253, 0.56);
    background-color: #152033;
}

.analyst-tile:has(.form-check-input:checked) {
    border-color: rgba(45, 212, 191, 0.72);
    background: rgba(45, 212, 191, 0.12);
    box-shadow: inset 3px 0 0 #2DD4BF;
}

.analyst-tile:has(.form-check-input:checked) .form-check-label {
    color: #F8FAFC;
}

.analyst-tile:has(.form-check-input:checked) i {
    color: #5EEAD4;
}

.analyst-tile-click-target {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0.7rem 0.8rem;
    cursor: pointer;
}

.analyst-tile-label {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 0.42rem;
    color: #E2E8F0;
    font-size: 0.87rem;
    font-weight: 650;
    line-height: 1;
}

.analyst-checkbox {
    margin: 0;
}

.analyst-checkbox .form-check-label,
.analyst-checkbox label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.analyst-checkbox .form-check-input {
    cursor: pointer;
    margin-top: 0.18rem;
}

.symbol-search-dropdown .Select-control,
.symbol-search-dropdown .Select-menu-outer,
.symbol-search-dropdown .Select-input,
.symbol-search-dropdown .Select-placeholder {
    background: #111827;
    color: #F8FAFC;
}

.symbol-search-dropdown .Select-control {
    min-height: 42px;
    border-color: #334155;
    border-radius: 7px;
}

.symbol-search-dropdown.is-focused .Select-control,
.symbol-search-dropdown .Select-control:hover {
    border-color: #2DD4BF;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.14);
}

.symbol-search-dropdown .Select-menu-outer {
    z-index: 20;
    border-color: #334155;
    border-radius: 7px;
    overflow: hidden;
}

.symbol-search-dropdown .VirtualizedSelectOption {
    background: #111827;
    color: #E2E8F0;
    line-height: 1.35;
    padding: 10px 12px;
}

.symbol-search-dropdown .VirtualizedSelectFocusedOption {
    background: #1B2638;
    color: #F8FAFC;
}

.symbol-search-dropdown .Select-value {
    border-color: rgba(45, 212, 191, 0.38) !important;
    background: rgba(45, 212, 191, 0.12) !important;
    color: #F8FAFC !important;
    border-radius: 999px !important;
}

.symbol-search-dropdown .Select-value-label {
    color: #F8FAFC !important;
}

.symbol-search-dropdown .Select-value-label .symbol-option-detail {
    display: none;
}

.symbol-option-symbol {
    font-weight: 750;
}

.symbol-option-detail {
    color: #94A3B8;
    font-weight: 500;
}

.symbol-search-dropdown .Select-value-icon {
    border-right-color: rgba(45, 212, 191, 0.28) !important;
    color: #5EEAD4 !important;
}

.symbol-search-dropdown .Select-input > input {
    color: #F8FAFC !important;
}

.symbol-search-status {
    margin-top: 8px;
    min-height: 24px;
}

.symbol-search-summary,
.symbol-search-empty {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #94A3B8;
    font-size: 0.8rem;
}

.symbol-search-count {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.22rem 0.52rem;
    border: 1px solid rgba(45, 212, 191, 0.38);
    background: rgba(45, 212, 191, 0.1);
    color: #5EEAD4;
    font-weight: 700;
}

.symbol-search-empty {
    color: #FCA5A5;
}

.reports-panel-card .card-body {
    transition: background-color 0.18s ease;
}

.reports-panel-card:hover .report-title i {
    color: #5EEAD4;
}

.enhanced-tabs .nav-tabs .nav-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.16);
}

[id$="-tab-content"] .enhanced-markdown-content,
[id$="-tab-content"] .debate-content-wrapper {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

[id$="-tab-content"] .enhanced-markdown-content:hover,
[id$="-tab-content"] .debate-content-wrapper:hover {
    border-color: rgba(45, 212, 191, 0.36) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.orders-loading .dash-spinner {
    color: #5EEAD4;
}

.orders-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid rgba(51, 65, 85, 0.7);
}

.orders-page-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.orders-page-btn {
    min-width: 34px;
    min-height: 32px;
    border-radius: 7px !important;
    font-weight: 700;
}

.orders-page-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(59, 130, 246, 0.2);
}

.orders-page-btn.active,
.orders-page-btn:disabled.active {
    opacity: 1;
    border-color: #2DD4BF !important;
    background: rgba(45, 212, 191, 0.18) !important;
    color: #F8FAFC !important;
}

.orders-page-gap {
    color: #64748B;
    padding: 0 3px;
    font-weight: 800;
}

.orders-page-meta {
    color: #94A3B8;
    font-size: 0.78rem;
    white-space: nowrap;
}

.enhanced-table-container:hover {
    border-color: rgba(45, 212, 191, 0.32);
}

.segmented-radio .form-check-label:hover {
    border-color: rgba(45, 212, 191, 0.58);
    background: rgba(45, 212, 191, 0.09);
    color: #F8FAFC;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.14);
}

.config-toggle-tile .form-check:hover .form-check-label,
.config-toggle-tile .form-check:focus-within .form-check-label {
    color: #F8FAFC;
}

.config-toggle-tile .form-check:hover .form-check-input {
    border-color: #2DD4BF;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.14);
}

.orders-table-container {
    padding: 14px;
}

.orders-table-body {
    min-height: 420px;
}

.orders-table .table-header {
    padding: 9px 10px;
    font-size: 0.74rem;
    letter-spacing: 0;
}

.orders-table .table-row-hover td {
    padding: 7px 10px;
}

.orders-table .symbol-text {
    font-size: 0.86rem;
}

.orders-table small {
    font-size: 0.72rem;
}

.orders-table .status-badge {
    padding: 4px 8px;
    font-size: 0.72rem;
}

.orders-empty-state {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 576px) {
    .orders-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .orders-page-meta {
        white-space: normal;
    }
}
