/* Data Page Styles */

.data-page-main {
    min-height: calc(100vh - 200px);
    padding: 20px;
    background: #0f172a;
}

.data-page-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #334155;
}

.page-header h1 {
    color: #fbbf24;
    margin: 0 0 10px 0;
    font-size: 32px;
}

.page-header .subtitle {
    color: #94a3b8;
    font-size: 16px;
    margin: 0;
}

/* Tab Navigation - Match main navigation style exactly */
.data-page-main .data-tabs {
    display: flex;
    gap: 0;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
    overflow-x: auto;
    border-radius: 0;
    width: 100%;
}

.data-page-main .tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    background: transparent !important;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0 !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #aaaaaa !important;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.data-page-main .tab-btn:hover {
    color: #029D6E !important;
    background: rgba(2, 157, 110, 0.05) !important;
}

.data-page-main .tab-btn.active {
    color: #029D6E !important;
    border-bottom-color: #029D6E !important;
    background: rgba(2, 157, 110, 0.1) !important;
}

.data-page-main .tab-btn.active .tab-icon,
.data-page-main .tab-btn.active .tab-label {
    color: #029D6E !important;
}

.data-page-main .tab-btn:hover .tab-icon,
.data-page-main .tab-btn:hover .tab-label {
    color: #029D6E !important;
}

.data-page-main .tab-icon {
    font-size: 18px;
    color: inherit;
}

.data-page-main .tab-label {
    color: inherit;
}

/* Tab Content Wrapper - Override main style.css */
/* Must be more specific than style.css .tab-content rule */
.data-page-container .tab-content,
.data-page-main .tab-content,
main.data-page-main .tab-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
}

/* Tab Content */
.tab-pane {
    display: none !important;
    opacity: 0;
    visibility: hidden;
}

.tab-pane.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 1;
}

/* Portfolio Summary */
.portfolio-summary {
    background: #1e293b;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #334155;
}

.portfolio-summary h2 {
    color: #fbbf24;
    margin: 0 0 16px 0;
    font-size: 24px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background: #0f172a;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.stat-card .label {
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.stat-card .value {
    color: #fbbf24;
    font-size: 24px;
    font-weight: bold;
}

/* Add Symbol Section */
.add-symbol-section {
    background: #1e293b;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #334155;
}

.add-symbol-section h3 {
    color: #fbbf24;
    margin: 0 0 16px 0;
    font-size: 20px;
}

.add-symbol-form {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.symbol-input {
    flex: 1;
    min-width: 150px;
    padding: 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 16px;
    text-transform: uppercase;
}

.symbol-input:focus {
    outline: none;
    border-color: #fbbf24;
}

.symbol-notes {
    flex: 2;
    min-width: 200px;
    padding: 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 14px;
    min-height: 44px;
    resize: vertical;
    font-family: inherit;
}

.symbol-notes:focus {
    outline: none;
    border-color: #fbbf24;
}

.btn-primary {
    padding: 12px 24px;
    background: #fbbf24;
    color: #0f172a;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #f59e0b;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 10px 20px;
    background: #334155;
    color: #cbd5e1;
    border: 1px solid #475569;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #475569;
    border-color: #64748b;
}

#add-symbol-message {
    margin-top: 12px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

#add-symbol-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #10b981;
    display: block;
}

#add-symbol-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    display: block;
}

/* Holdings Section */
.holdings-section {
    background: #1e293b;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.holdings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.holdings-header h3 {
    color: #fbbf24;
    margin: 0;
    font-size: 20px;
}

.filter-buttons {
    display: flex;
    gap: 0;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    background: transparent !important;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0 !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #aaaaaa !important;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.filter-btn:hover {
    color: #029D6E !important;
    background: rgba(2, 157, 110, 0.05) !important;
}

.filter-btn.active {
    color: #029D6E !important;
    border-bottom-color: #029D6E !important;
    background: rgba(2, 157, 110, 0.1) !important;
}

.filter-btn.active .filter-icon,
.filter-btn.active .filter-label {
    color: #029D6E !important;
}

.filter-btn:hover .filter-icon,
.filter-btn:hover .filter-label {
    color: #029D6E !important;
}

.filter-icon {
    font-size: 18px;
    color: inherit;
}

.filter-label {
    color: inherit;
}

/* Holdings Grid */
.holdings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.holding-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.holding-card:hover {
    transform: translateY(-2px);
    border-color: #475569;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.holding-card.research-card {
    border-left: 4px solid #f59e0b;
}

.holding-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.holding-header > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.holding-header h4 {
    margin: 0;
    font-size: 20px;
    color: #fbbf24;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
}

.badge-holding {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid #3b82f6;
}

.badge-research {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid #f59e0b;
}

.holding-header > div:last-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remove-research-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.remove-research-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.holding-header .price {
    font-size: 22px;
    font-weight: bold;
    color: #cbd5e1;
}

.holding-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.metric span {
    font-size: 16px;
    font-weight: 500;
    color: #cbd5e1;
}

.metric span.positive {
    color: #10b981;
}

.metric span.negative {
    color: #ef4444;
}

.metric .rating {
    font-size: 14px;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.metric .rating.strong.buy,
.metric .rating.buy {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.metric .rating.hold {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.metric .rating.sell,
.metric .rating.strong.sell {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Stock Detail */
.stock-selector-section {
    background: #1e293b;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #334155;
}

.stock-selector {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.stock-selector label {
    color: #cbd5e1;
    font-weight: 500;
}

.stock-select {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 16px;
    cursor: pointer;
}

.stock-select:focus {
    outline: none;
    border-color: #fbbf24;
}

.stock-detail-content {
    min-height: 400px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

/* Detail Sections */
.detail-section {
    background: #1e293b;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #334155;
}

.detail-section h3 {
    color: #fbbf24;
    margin: 0 0 16px 0;
    font-size: 20px;
    border-bottom: 2px solid #334155;
    padding-bottom: 12px;
}

/* Financial Health Scorecard */
.health-scorecard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.health-metric {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    background: #0f172a;
    border: 2px solid #334155;
}

.health-metric.good {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.health-metric.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
}

.health-metric.bad {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.health-metric .label {
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.health-metric .value {
    color: #fbbf24;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 4px;
}

.health-metric .interpretation {
    color: #64748b;
    font-size: 12px;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Responsive */
@media (max-width: 768px) {
    .holdings-grid {
        grid-template-columns: 1fr;
    }
    
    .data-page-main .data-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .data-page-main .tab-btn {
        padding: 12px 15px;
        font-size: 12px;
    }
    
    .data-page-main .tab-label {
        display: none;
    }
    
    .data-page-main .tab-icon {
        font-size: 20px;
    }
    
    .data-page-main .filter-btn {
        padding: 12px 15px;
        font-size: 12px;
    }
    
    .data-page-main .filter-label {
        display: none;
    }
    
    .data-page-main .filter-icon {
        font-size: 20px;
    }
    
    .add-symbol-form {
        flex-direction: column;
    }
    
    .symbol-input,
    .symbol-notes {
        width: 100%;
    }
    
    .holdings-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stock-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stock-select {
        width: 100%;
    }
    
    .health-scorecard,
    .valuation-grid,
    .analyst-summary {
        grid-template-columns: 1fr;
    }
}

/* Valuation Grid */
.valuation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.valuation-item {
    background: #0f172a;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.valuation-item .label {
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.valuation-item .value {
    color: #fbbf24;
    font-size: 20px;
    font-weight: bold;
}

/* Statement Summary */
.statement-summary {
    background: #0f172a;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.statement-summary h4 {
    color: #fbbf24;
    margin: 0 0 16px 0;
}

.statement-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

/* Analyst Summary */
.analyst-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.analyst-item {
    background: #0f172a;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.analyst-item .label {
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.analyst-item .value {
    color: #cbd5e1;
    font-size: 18px;
    font-weight: 500;
}

/* Quick Stats Grid */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.stat-item {
    background: #0f172a;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.stat-item .label {
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.stat-item .value {
    color: #fbbf24;
    font-size: 24px;
    font-weight: bold;
}

/* Peers List */
.peers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.peer-item {
    background: #0f172a;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.peer-item strong {
    color: #fbbf24;
    font-size: 16px;
}

.peer-metrics {
    display: flex;
    gap: 16px;
    color: #cbd5e1;
    font-size: 14px;
}

.peer-symbols-list {
    color: #94a3b8;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Corporate Events Styling */
.events-group {
    margin-bottom: 24px;
}

.events-group h4 {
    color: #fbbf24;
    margin: 0 0 12px 0;
    font-size: 18px;
}

.events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.events-list li {
    background: #0f172a;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #334155;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.events-list li::before {
    content: '•';
    color: #fbbf24;
    font-weight: bold;
    margin-right: 12px;
    font-size: 18px;
}

.event-date {
    color: #cbd5e1;
    font-weight: 500;
    min-width: 120px;
}

.event-detail {
    color: #94a3b8;
    font-size: 14px;
}

.rating-breakdown {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.stock-detail-header {
    background: #1e293b;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #334155;
}

.stock-detail-header h2 {
    color: #fbbf24;
    margin: 0 0 16px 0;
    font-size: 28px;
}

.stock-detail-sections {
    display: grid;
    gap: 20px;
}

/* ============================================
   ANALYST RATING MODAL - CSS
   ============================================ */

/* Modal Overlay */
.analyst-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

.analyst-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Container */
.analyst-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    border: 2px solid #5e35b1;
    box-shadow: 0 0 30px rgba(94, 53, 177, 0.3),
                0 0 60px rgba(94, 53, 177, 0.1);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

/* Modal Header */
.analyst-modal-header {
    background: linear-gradient(135deg, #5e35b1 0%, #e91e63 100%);
    padding: 20px 25px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.analyst-modal-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.analyst-modal-symbol {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 12px;
    border-radius: 6px;
    font-size: 0.9em;
}

.analyst-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 1.5em;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.analyst-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Body */
.analyst-modal-body {
    padding: 25px;
}

/* Consensus Display */
.analyst-consensus {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(94, 53, 177, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(94, 53, 177, 0.3);
}

.analyst-consensus-label {
    font-size: 0.9em;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.analyst-consensus-rating {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.analyst-consensus-rating.rating-strong-buy { color: #10b981; }
.analyst-consensus-rating.rating-buy { color: #4ecca3; }
.analyst-consensus-rating.rating-hold { color: #fbbf24; }
.analyst-consensus-rating.rating-sell { color: #ff9f43; }
.analyst-consensus-rating.rating-strong-sell { color: #ef4444; }

.analyst-total-count {
    font-size: 0.9em;
    color: #94a3b8;
}

/* Rating Breakdown */
.analyst-breakdown {
    margin-top: 30px;
}

.analyst-breakdown-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #cbd5e1;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #334155;
}

.rating-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.rating-bar-label {
    min-width: 90px;
    font-size: 0.9em;
    color: #94a3b8;
    font-weight: 500;
}

.rating-bar-visual {
    flex: 1;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid #334155;
}

.rating-bar-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.1); /* Default gray for 0% */
    border-radius: 5px;
    transition: width 0.4s ease-out;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    font-size: 0.75em;
    font-weight: bold;
    color: #fff;
    min-width: 30px;
}

/* Only apply colors when there's actual data (not 0%) */
.rating-bar-fill.strong-buy { background: linear-gradient(90deg, #00b894 0%, #00cec9 100%); }
.rating-bar-fill.buy { background: linear-gradient(90deg, #4ecca3 0%, #2ec4b6 100%); }
.rating-bar-fill.hold { background: linear-gradient(90deg, #ffd93d 0%, #f6ad55 100%); }
.rating-bar-fill.sell { background: linear-gradient(90deg, #ff9f43 0%, #ff7f50 100%); }
.rating-bar-fill.strong-sell { background: linear-gradient(90deg, #ff6b6b 0%, #ee5a6f 100%); }

.rating-bar-fill.strong-buy { background: linear-gradient(90deg, #00b894 0%, #00cec9 100%); }
.rating-bar-fill.buy { background: linear-gradient(90deg, #4ecca3 0%, #2ec4b6 100%); }
.rating-bar-fill.hold { background: linear-gradient(90deg, #ffd93d 0%, #f6ad55 100%); }
.rating-bar-fill.sell { background: linear-gradient(90deg, #ff9f43 0%, #ff7f50 100%); }
.rating-bar-fill.strong-sell { background: linear-gradient(90deg, #ff6b6b 0%, #ee5a6f 100%); }

.rating-bar-count {
    min-width: 80px;
    text-align: right;
    font-size: 0.9em;
    color: #cbd5e1;
    font-weight: 600;
}

.rating-bar-percentage {
    color: #94a3b8;
    font-size: 0.85em;
    margin-left: 5px;
}

/* Last Updated */
.analyst-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #334155;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85em;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling */
.analyst-modal::-webkit-scrollbar {
    width: 8px;
}

.analyst-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.analyst-modal::-webkit-scrollbar-thumb {
    background: #5e35b1;
    border-radius: 4px;
}

.analyst-modal::-webkit-scrollbar-thumb:hover {
    background: #e91e63;
}

/* Make consensus rating clickable */
.analyst-consensus-rating-clickable {
    cursor: pointer;
    transition: all 0.2s;
    padding: 5px 10px;
    border-radius: 6px;
    display: inline-block;
}

.analyst-consensus-rating-clickable:hover {
    background: rgba(94, 53, 177, 0.2);
    transform: scale(1.02);
}

.rating-breakdown-clickable {
    cursor: pointer;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.rating-breakdown-clickable:hover {
    background: rgba(94, 53, 177, 0.15);
    opacity: 0.9;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .analyst-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .analyst-modal-body {
        padding: 15px;
    }
    
    .rating-bar-label {
        min-width: 70px;
        font-size: 0.8em;
    }
    
    .rating-bar-count {
        min-width: 60px;
        font-size: 0.85em;
    }
}

/* ============================================
   PRICE TARGET MODAL - CSS
   ============================================ */

/* Price Target Specific Styles */
.price-target-visual {
    margin: 30px 0;
    padding: 25px;
    background: rgba(94, 53, 177, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(94, 53, 177, 0.3);
}

.price-range-container {
    position: relative;
    height: 60px;
    margin: 20px 0;
}

.price-range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, 
        #ef4444 0%, 
        #fbbf24 50%, 
        #10b981 100%);
    border-radius: 4px;
    transform: translateY(-50%);
}

.price-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid #fff;
    z-index: 2;
}

.price-marker.current {
    background: #5e35b1;
    box-shadow: 0 0 15px #5e35b1;
}

.price-marker.low {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

.price-marker.high {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.price-label {
    position: absolute;
    top: -30px;
    transform: translateX(-50%);
    font-size: 0.85em;
    color: #94a3b8;
    white-space: nowrap;
}

.price-value {
    position: absolute;
    bottom: -30px;
    transform: translateX(-50%);
    font-size: 1em;
    font-weight: bold;
    white-space: nowrap;
}

.price-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.price-stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #334155;
    text-align: center;
}

.price-stat-label {
    font-size: 0.85em;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #cbd5e1;
}

.price-stat-value.positive {
    color: #10b981;
}

.price-stat-value.negative {
    color: #ef4444;
}

.upside-indicator {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(78, 204, 163, 0.1) 0%, rgba(78, 204, 163, 0.05) 100%);
    border-radius: 8px;
    border-left: 4px solid #10b981;
    text-align: center;
}

.upside-indicator.negative {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
    border-left-color: #ef4444;
}

.upside-value {
    font-size: 2em;
    font-weight: bold;
    margin: 10px 0;
}

/* ============================================
   FINANCIAL HEALTH MODAL - CSS
   ============================================ */

/* Financial Health Specific Styles */
.health-score-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.health-score-card {
    background: rgba(94, 53, 177, 0.1);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(94, 53, 177, 0.3);
    text-align: center;
}

.health-score-title {
    font-size: 0.9em;
    color: #94a3b8;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.health-score-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #5e35b1;
    margin: 10px 0;
}

.health-score-interpretation {
    font-size: 0.85em;
    color: #94a3b8;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #334155;
}

.health-breakdown {
    margin-top: 30px;
}

.health-breakdown-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #cbd5e1;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #334155;
}

.health-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border-left: 3px solid #5e35b1;
}

.health-metric.good {
    border-left-color: #10b981;
    background: rgba(78, 204, 163, 0.05);
}

.health-metric.warning {
    border-left-color: #fbbf24;
    background: rgba(255, 217, 61, 0.05);
}

.health-metric.danger {
    border-left-color: #ef4444;
    background: rgba(255, 107, 107, 0.05);
}

.health-metric-label {
    font-size: 0.9em;
    color: #94a3b8;
}

.health-metric-value {
    font-weight: bold;
    color: #cbd5e1;
}

.rating-explanation {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid #334155;
}

.rating-explanation-title {
    font-size: 1em;
    font-weight: bold;
    color: #cbd5e1;
    margin-bottom: 15px;
}

.rating-scale {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-scale-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    font-size: 0.85em;
}

.rating-scale-grade {
    font-weight: bold;
    min-width: 30px;
}

.rating-scale-grade.A { color: #00b894; }
.rating-scale-grade.B { color: #4ecca3; }
.rating-scale-grade.C { color: #ffd93d; }
.rating-scale-grade.D { color: #ff6b6b; }

/* Make targets and ratings clickable */
.price-target-clickable,
.financial-rating-clickable {
    cursor: pointer;
    transition: all 0.2s;
    padding: 5px 10px;
    border-radius: 6px;
    display: inline-block;
}

.price-target-clickable:hover,
.financial-rating-clickable:hover {
    background: rgba(94, 53, 177, 0.2);
    transform: scale(1.02);
}

/* Mobile Responsive for Additional Modals */
@media (max-width: 768px) {
    .health-score-container {
        grid-template-columns: 1fr;
    }
    
    .price-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .price-range-container {
        height: 80px;
    }
}

/* ============================================
   ANALYTICS TAB STYLES
   ============================================ */

.analytics-content {
    padding: 20px;
}

.analytics-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(94, 53, 177, 0.1);
    border: 1px solid rgba(94, 53, 177, 0.3);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.stat-card:hover {
    background: rgba(94, 53, 177, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(94, 53, 177, 0.2);
}

.stat-card-label {
    font-size: 0.9em;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.stat-card-value {
    font-size: 2em;
    font-weight: bold;
    color: #cbd5e1;
    margin-bottom: 5px;
}

.stat-card-value.positive {
    color: #10b981;
}

.stat-card-value.negative {
    color: #ef4444;
}

.stat-card-subvalue {
    font-size: 0.9em;
    color: #94a3b8;
}

.analytics-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: rgba(94, 53, 177, 0.1);
    border: 1px solid rgba(94, 53, 177, 0.3);
    border-radius: 8px;
    padding: 20px;
}

.chart-container h3 {
    color: #fbbf24;
    margin: 0 0 20px 0;
    font-size: 1.2em;
}

.chart-container.half {
    /* Already handled by grid */
}

.chart-container.full {
    grid-column: 1 / -1;
}

.chart-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.period-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(94, 53, 177, 0.3);
    color: #cbd5e1;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.period-btn:hover {
    background: rgba(94, 53, 177, 0.2);
    border-color: #5e35b1;
}

.period-btn.active {
    background: linear-gradient(135deg, #5e35b1 0%, #e91e63 100%);
    border-color: #5e35b1;
    color: #fff;
}

.analytics-table-container {
    margin-top: 30px;
}

.analytics-table-container h3 {
    color: #fbbf24;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.table-wrapper {
    overflow-x: auto;
    background: rgba(94, 53, 177, 0.1);
    border: 1px solid rgba(94, 53, 177, 0.3);
    border-radius: 8px;
    padding: 20px;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
}

.analytics-table thead {
    background: rgba(94, 53, 177, 0.2);
}

.analytics-table th {
    padding: 12px 15px;
    text-align: left;
    color: #fbbf24;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(94, 53, 177, 0.3);
}

.analytics-table td {
    padding: 12px 15px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.analytics-table tbody tr {
    cursor: pointer;
    transition: all 0.2s;
}

.analytics-table tbody tr:hover {
    background: rgba(94, 53, 177, 0.15);
}

.analytics-table .symbol {
    font-weight: bold;
    color: #fbbf24;
}

.analytics-table .value {
    font-weight: 600;
}

.analytics-table .gain {
    font-weight: 600;
}

.analytics-table .gain.positive {
    color: #10b981;
}

.analytics-table .gain.negative {
    color: #ef4444;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .analytics-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-charts-row {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        padding: 15px;
    }
    
    .table-wrapper {
        padding: 10px;
    }
    
    .analytics-table {
        font-size: 0.9em;
    }
    
    .analytics-table th,
    .analytics-table td {
        padding: 8px 10px;
    }
}

/* ============================================
   ACTION TRIGGERS MODAL
   ============================================ */

.trigger-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trigger-modal-overlay.active {
    opacity: 1;
}

.trigger-modal {
    background: #1e293b;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #334155;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.trigger-modal-overlay.active .trigger-modal {
    transform: translateY(0);
}

.trigger-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f172a;
    border-radius: 12px 12px 0 0;
}

.trigger-modal-header h2 {
    color: #4ecca3;
    margin: 0;
    font-size: 24px;
}

.trigger-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.trigger-modal-close:hover {
    background: #334155;
    color: #fff;
}

.trigger-modal-body {
    padding: 25px;
}

.trigger-step {
    margin-bottom: 25px;
}

.trigger-step h3 {
    color: #fbbf24;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.trigger-type-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trigger-type-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.trigger-type-option:hover {
    border-color: #4ecca3;
    background: #16213e;
}

.trigger-type-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.trigger-type-option input[type="radio"]:checked + .option-content {
    color: #4ecca3;
}

.option-content strong {
    display: block;
    color: #cbd5e1;
    margin-bottom: 4px;
    font-size: 16px;
}

.option-content small {
    display: block;
    color: #94a3b8;
    font-size: 13px;
}

.suggested-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.suggested-price-btn {
    background: #0f172a;
    border: 1px solid #334155;
    color: #cbd5e1;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.suggested-price-btn:hover {
    background: #16213e;
    border-color: #4ecca3;
    color: #4ecca3;
}

#trigger-price {
    width: 100%;
    padding: 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 16px;
}

#trigger-price:focus {
    outline: none;
    border-color: #4ecca3;
}

#trigger-action-text,
#trigger-reasoning {
    width: 100%;
    padding: 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

#trigger-action-text:focus,
#trigger-reasoning:focus {
    outline: none;
    border-color: #4ecca3;
}

.snapshot-preview {
    background: #0f172a;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #334155;
}

.snapshot-item {
    padding: 8px 0;
    color: #cbd5e1;
    font-size: 14px;
    border-bottom: 1px solid #334155;
}

.snapshot-item:last-child {
    border-bottom: none;
}

.snapshot-item strong {
    color: #4ecca3;
    margin-right: 8px;
}

.trigger-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #334155;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #4ecca3;
    color: #0f172a;
}

.btn-primary:hover {
    background: #3db894;
}

.btn-primary:disabled {
    background: #64748b;
    cursor: not-allowed;
}

.btn-secondary {
    background: #334155;
    color: #cbd5e1;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-block {
    width: 100%;
}

.help-text {
    font-size: 0.85em;
    color: #94a3b8;
    margin-top: 8px;
}

.existing-triggers {
    margin-top: 20px;
}

.trigger-item {
    background: #0f3460;
    padding: 12px;
    margin: 8px 0;
    border-radius: 4px;
    border-left: 3px solid #4ecca3;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .trigger-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .trigger-modal-header {
        padding: 15px 20px;
    }
    
    .trigger-modal-body {
        padding: 20px;
    }
    
    .suggested-prices {
        flex-direction: column;
    }
    
    .suggested-price-btn {
        width: 100%;
    }
    
    .trigger-modal-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* ============================================
   ACTION TRIGGERS PAGE
   ============================================ */

.triggers-section {
    margin-top: 30px;
}

.alert-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 4px solid #ff6b6b;
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #334155;
}

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

.alert-icon {
    font-size: 24px;
}

.alert-title h2 {
    color: #4ecca3;
    margin: 0;
    font-size: 22px;
}

.alert-actions {
    display: flex;
    gap: 10px;
}

.alert-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.alert-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    color: #cbd5e1;
}

.info-item strong {
    color: #4ecca3;
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
}

.alert-reasoning {
    background: #0f172a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.alert-reasoning h3 {
    color: #fbbf24;
    margin: 0 0 10px 0;
    font-size: 16px;
}

.alert-reasoning p {
    color: #cbd5e1;
    margin: 0;
    line-height: 1.6;
}

.thesis-validation {
    background: #0f172a;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.thesis-validation h3 {
    color: #fbbf24;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.thesis-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 16px;
}

.thesis-status.intact {
    background: rgba(78, 204, 163, 0.15);
    border: 1px solid #4ecca3;
    color: #4ecca3;
}

.thesis-status.changed {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
}

.thesis-icon {
    font-size: 20px;
}

.thesis-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.thesis-table thead {
    background: #0f172a;
}

.thesis-table th {
    padding: 12px;
    text-align: left;
    color: #fbbf24;
    font-size: 13px;
    text-transform: uppercase;
    border-bottom: 2px solid #334155;
}

.thesis-table td {
    padding: 12px;
    color: #cbd5e1;
    border-bottom: 1px solid #334155;
}

.thesis-table tr.ok {
    background: rgba(78, 204, 163, 0.05);
}

.thesis-table tr.changed {
    background: rgba(255, 107, 107, 0.05);
}

.status-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-icon {
    font-size: 16px;
}

.alert-actions-bottom {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #334155;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
}

.btn-danger:hover {
    background: #ee5a5a;
}

.symbol-group {
    margin-bottom: 30px;
}

.symbol-header {
    color: #4ecca3;
    margin: 0 0 15px 0;
    font-size: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #334155;
}

/* Category Grouping */
.category-group {
    margin-bottom: 35px;
}

.category-header {
    color: #cbd5e1;
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 600;
    padding: 12px 15px;
    padding-left: 19px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border-bottom: 2px solid #334155;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-count {
    color: #94a3b8;
    font-size: 16px;
    font-weight: 400;
}

.category-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-left: 8px;
}

.trigger-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.trigger-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 8px 0;
    font-size: 13px;
    color: #94a3b8;
}

.trigger-detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.trigger-detail-item strong {
    color: #cbd5e1;
}

.trigger-reasoning {
    margin: 10px 0;
    padding: 10px;
    background: rgba(148, 163, 184, 0.05);
    border-left: 3px solid #4ecca3;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    color: #cbd5e1;
}

.trigger-reasoning strong {
    color: #4ecca3;
    margin-right: 6px;
}

.reasoning-tooltip {
    display: inline-block;
    margin-left: 8px;
    cursor: help;
    color: #4ecca3;
    font-size: 14px;
    vertical-align: middle;
}

.trigger-item {
    background: #0f172a;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid #4ecca3;
}

.trigger-item.triggered {
    border-left-color: #ff6b6b;
}

.trigger-item.dismissed {
    border-left-color: #64748b;
    opacity: 0.7;
}

.trigger-info {
    flex: 1;
}

.trigger-type {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.trigger-icon {
    font-size: 18px;
}

.trigger-type strong {
    color: #cbd5e1;
    font-size: 16px;
}

.trigger-action {
    color: #94a3b8;
    margin-bottom: 6px;
    font-size: 14px;
}

.trigger-meta {
    color: #64748b;
    font-size: 12px;
}

.trigger-actions {
    display: flex;
    gap: 8px;
}

.badge {
    background: #ff6b6b;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .alert-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .alert-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .alert-info {
        grid-template-columns: 1fr;
    }
    
    .thesis-table {
        font-size: 12px;
    }
    
    .thesis-table th,
    .thesis-table td {
        padding: 8px;
    }
    
    .alert-actions-bottom {
        flex-direction: column;
    }
    
    .trigger-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .trigger-actions {
        width: 100%;
        flex-direction: column;
    }
}

/* Philosophy Panel */
.philosophy-panel {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.philosophy-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.5);
    transition: background 0.2s ease;
}

.philosophy-panel-header:hover {
    background: rgba(15, 23, 42, 0.7);
}

.philosophy-panel-header h2 {
    color: #fbbf24;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.philosophy-toggle {
    color: #94a3b8;
    font-size: 18px;
    transition: transform 0.3s ease;
    user-select: none;
}

.philosophy-panel.collapsed .philosophy-toggle {
    transform: rotate(-90deg);
}

.philosophy-panel-content {
    padding: 25px;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.philosophy-panel.collapsed .philosophy-panel-content {
    max-height: 0;
    padding: 0 25px;
}

.philosophy-intro {
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
}

.philosophy-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.philosophy-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.philosophy-section h3 {
    color: #4ecca3;
    font-size: 18px;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.philosophy-section p {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.7;
    margin: 8px 0;
}

.philosophy-section ul {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.8;
    margin: 12px 0;
    padding-left: 25px;
}

.philosophy-section li {
    margin-bottom: 6px;
}

.philosophy-section strong {
    color: #fbbf24;
    font-weight: 600;
}

.philosophy-final {
    background: rgba(251, 191, 36, 0.1);
    border-left: 3px solid #fbbf24;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 15px;
}

@media (max-width: 768px) {
    .philosophy-panel-header {
        padding: 15px 20px;
    }
    
    .philosophy-panel-header h2 {
        font-size: 18px;
    }
    
    .philosophy-panel-content {
        padding: 20px;
    }
    
    .philosophy-section {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
}

