/* ============================================
   ASSET DETAILS PAGE - Redesigned
   Award-winning financial terminal design
   ============================================ */

.details-page {
    max-width: 1800px;
    margin: 0 auto;
    padding: 1.5rem 2rem 6rem;
}

/* ============================================
   HERO SECTION - Prominent price display
   ============================================ */

.details-hero {
    background: linear-gradient(135deg, var(--bg-surface-1) 0%, rgba(59, 107, 53, 0.03) 100%);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.details-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 107, 53, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.details-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.company-info {
    flex: 1;
}

.company-symbol-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-primary);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.company-symbol-badge .market-status {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.company-name {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 0.75rem;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 13px;
    color: var(--text-secondary);
}

.company-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.company-meta-item i {
    font-size: 10px;
    color: var(--accent-primary);
}

.price-section {
    text-align: right;
    min-width: 220px;
}

.current-price {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.price-change {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.price-change.positive { color: var(--green); }
.price-change.negative { color: var(--red); }

.price-change-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
}

.price-change-badge.positive {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.price-change-badge.negative {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.price-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 0.75rem;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn.primary {
    background: var(--accent-primary);
    color: white;
}

.action-btn.primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

.action-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
}

.action-btn.secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-primary);
}

/* ============================================
   CHART SECTION - Enlarged & prominent
   ============================================ */

.chart-container {
    background: var(--bg-surface-1);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    height: 550px;
    position: relative;
    overflow: hidden;
}

.tradingview-widget-container {
    height: 100%;
    width: 100%;
}

.tradingview-widget-container iframe {
    height: 100% !important;
}

.yahoo-chart-container {
    height: 100%;
    width: 100%;
    display: none;
    position: relative;
    box-sizing: border-box;
}

.yahoo-chart-container.active {
    display: flex;
    flex-direction: column;
}

.yahoo-chart-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.yahoo-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    flex-shrink: 0;
}

.yahoo-chart-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-white);
}

.yahoo-chart-meta {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 12px;
    margin-left: 0.5rem;
}

.yahoo-chart-timeframes {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.yahoo-chart-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chart-type-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    padding: 2px;
}

.chart-type-btn {
    padding: 0.375rem 0.625rem;
    font-size: 11px;
    font-weight: 600;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.chart-type-btn:hover {
    color: var(--text-primary);
}

.chart-type-btn.active {
    background: var(--accent-primary);
    color: white;
}

.yahoo-chart-canvas-wrapper {
    flex: 1;
    min-height: 0;
    position: relative;
    padding: 0 0.5rem 0.75rem;
}

#price-chart {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

#chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    text-align: center;
    z-index: 10;
    background: var(--bg-surface-1);
    padding: 1rem 1.5rem;
    border-radius: 8px;
}

/* Chart period buttons */
.chart-period-btn {
    padding: 0.5rem 0.875rem;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.chart-period-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-white);
    border-color: var(--border-secondary);
}

.chart-period-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Chart theme transition overlay */
.chart-theme-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-surface-1);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.chart-theme-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   CONTENT LAYOUT - Two-column grid
   ============================================ */

.content-layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.main-content, .sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ============================================
   INFO CARDS - Enhanced design
   ============================================ */

.info-card {
    background: var(--bg-surface-1);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.2s ease-out;
}

.info-card:hover {
    border-color: var(--border-highlight);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.info-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-primary);
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-surface-1) 100%);
}

.info-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-card-icon {
    font-size: 16px;
    color: var(--accent-primary);
}

.info-card-action {
    font-size: 12px;
    color: var(--accent-primary);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.info-card-action:hover {
    text-decoration: underline;
}

.info-card-body {
    padding: 1.25rem;
}

/* ============================================
   STATS TABS - Tabbed financial ratios
   ============================================ */

.stats-tabs {
    display: flex;
    gap: 0;
    padding: 0.5rem 1.25rem 0;
    border-bottom: 1px solid var(--border-primary);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.stats-tabs::-webkit-scrollbar {
    display: none;
}

.stats-tab-btn {
    padding: 0.625rem 1rem;
    font-size: 12px;
    font-weight: 600;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stats-tab-btn:hover {
    color: var(--text-primary);
}

.stats-tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.stats-tab-content:not(.active) {
    display: none;
}

.stats-tab-content.active {
    display: grid;
}

/* ============================================
   KEY STATISTICS - KPI Cards
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: left;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-primary);
    opacity: 0;
    transition: opacity 0.2s;
}

.stat-card:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat-value {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-family: var(--font-mono);
}

.stat-value.positive { color: var(--green); }
.stat-value.negative { color: var(--red); }
.stat-value.empty { color: var(--text-tertiary); font-weight: 600; }

.stat-subtext {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 0.375rem;
}

.stat-subtext.positive { color: var(--green); }
.stat-subtext.negative { color: var(--red); }
.stat-subtext.warning { color: var(--yellow); }

/* ============================================
   PERFORMANCE GRID
   ============================================ */

.performance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 1.25rem;
}

.performance-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    padding: 1rem 0.75rem;
    text-align: center;
    min-width: 0;
    transition: all 0.2s;
    position: relative;
}

.performance-card:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.performance-label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.performance-value {
    font-size: 1.125rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.performance-value.positive { color: var(--green); }
.performance-value.negative { color: var(--red); }

.performance-bar {
    margin-top: 0.5rem;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.performance-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease-out;
}

.performance-bar-fill.positive { background: var(--green); }
.performance-bar-fill.negative { background: var(--red); }

/* ============================================
   MARKET DATA - Info rows
   ============================================ */

.info-rows {
    padding: 0.5rem 1.25rem 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border-secondary);
}

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

.info-label {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.info-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-white);
    text-align: right;
    font-family: var(--font-mono);
}

.info-value.positive { color: var(--green); }
.info-value.negative { color: var(--red); }

/* ============================================
   ANALYST RATINGS
   ============================================ */

.analyst-body {
    padding: 1.25rem;
}

.recommendation-gauge {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.recommendation-label {
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: capitalize;
    line-height: 1.2;
}

.recommendation-label.strong-buy,
.recommendation-label.buy { color: var(--green); }
.recommendation-label.hold { color: var(--yellow); }
.recommendation-label.sell,
.recommendation-label.strong-sell { color: var(--red); }

.recommendation-scale {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recommendation-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    gap: 2px;
}

.recommendation-bar-segment {
    flex: 1;
    border-radius: 4px;
    opacity: 0.25;
    transition: opacity 0.3s;
}

.recommendation-bar-segment.active {
    opacity: 1;
}

.recommendation-bar-segment.strong-buy { background: #059669; }
.recommendation-bar-segment.buy { background: #10b981; }
.recommendation-bar-segment.hold { background: var(--yellow); }
.recommendation-bar-segment.sell { background: #f97316; }
.recommendation-bar-segment.strong-sell { background: var(--red); }

.recommendation-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    font-weight: 600;
}

.price-target-bar-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-secondary);
}

.price-target-label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.price-target-bar {
    position: relative;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    margin: 0.5rem 0;
}

.price-target-range {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--red), var(--yellow), var(--green));
    border-radius: 4px;
    opacity: 0.3;
}

.price-target-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-surface-1);
    z-index: 2;
}

.price-target-marker.current {
    background: var(--accent-primary);
}

.price-target-marker.target {
    background: var(--yellow);
}

.price-target-values {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-family: var(--font-mono);
}

.price-target-values .mean-target {
    color: var(--yellow);
    font-weight: 700;
}

.analyst-count {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 0.75rem;
    text-align: center;
}

/* ============================================
   OWNERSHIP CARD
   ============================================ */

.ownership-bars {
    padding: 1.25rem;
}

.ownership-bar-item {
    margin-bottom: 1rem;
}

.ownership-bar-item:last-child {
    margin-bottom: 0;
}

.ownership-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
}

.ownership-bar-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.ownership-bar-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-white);
    font-family: var(--font-mono);
}

.ownership-bar-track {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.ownership-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent-primary);
    transition: width 0.5s ease-out;
}

/* ============================================
   EARNINGS HISTORY CHART
   ============================================ */

.earnings-chart-container {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-primary);
}

.earnings-chart-title {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.earnings-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    height: 120px;
    padding: 0.5rem 0;
}

.earnings-quarter {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    height: 100%;
    justify-content: flex-end;
}

.earnings-bars {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    flex: 1;
    width: 100%;
    justify-content: center;
}

.earnings-bar {
    width: 16px;
    min-height: 4px;
    border-radius: 3px 3px 0 0;
    transition: height 0.3s ease;
}

.earnings-bar.estimate {
    background: var(--accent-primary);
    opacity: 0.4;
}

.earnings-bar.actual.beat {
    background: var(--green);
}

.earnings-bar.actual.miss {
    background: var(--red);
}

.earnings-quarter-label {
    font-size: 9px;
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
}

.earnings-quarter-value {
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.earnings-legend {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.75rem;
    font-size: 10px;
    color: var(--text-tertiary);
}

.earnings-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.earnings-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

/* ============================================
   OFFICERS GRID
   ============================================ */

.officers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-secondary);
}

.officer-card {
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.officer-card:hover {
    border-color: var(--accent-primary);
}

.officer-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.25rem;
}

.officer-title {
    font-size: 10px;
    color: var(--text-tertiary);
    line-height: 1.3;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-body {
    padding: 1.25rem;
}

.about-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.company-logo {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-primary);
    border: 1px solid var(--border-secondary);
}

.about-header-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.25rem;
}

.about-header-info span {
    font-size: 12px;
    color: var(--text-tertiary);
}

.about-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.about-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s;
}

.about-tag:hover {
    border-color: var(--accent-primary);
}

.about-tag i {
    font-size: 10px;
    color: var(--accent-primary);
}

.about-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    position: relative;
}

.about-description.truncated {
    max-height: 4.5em;
    overflow: hidden;
}

.about-description.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2em;
    background: linear-gradient(transparent, var(--bg-surface-1));
}

.about-description.expanded {
    max-height: none;
}

.about-description.expanded::after {
    display: none;
}

.about-expand-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.about-expand-btn:hover {
    text-decoration: underline;
}

.about-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-secondary);
}

.about-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.about-detail-label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.about-detail-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-white);
}

/* ============================================
   NEWS SECTION
   ============================================ */

.news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-primary);
    transition: all 0.15s;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.news-item:hover {
    background: var(--bg-tertiary);
    padding-left: 1.5rem;
}

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

.news-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 11px;
    color: var(--text-tertiary);
}

.news-publisher {
    font-weight: 600;
    color: var(--accent-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.news-publisher::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.news-view-more {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid var(--border-primary);
}

.news-view-more a {
    color: var(--accent-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.news-view-more a:hover {
    text-decoration: underline;
}

.news-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-tertiary);
}

/* ============================================
   NAVIGATION - Back link
   ============================================ */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 1.25rem;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent-primary);
}

.back-link svg {
    transition: transform 0.2s;
}

.back-link:hover svg {
    transform: translateX(-3px);
}

/* ============================================
   LOADING STATE & SKELETON
   ============================================ */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-secondary);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.skeleton-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.skeleton-hero {
    height: 200px;
    background: var(--bg-surface-1);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}

.skeleton-chart {
    height: 550px;
    background: var(--bg-surface-1);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}

.skeleton-card {
    height: 200px;
    background: var(--bg-surface-1);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}

.skeleton-hero::after,
.skeleton-chart::after,
.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-primary);
    padding: 0.5rem 1rem calc(0.5rem + env(safe-area-inset-bottom, 0));
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    gap: 0.25rem;
    max-width: 500px;
    margin: 0 auto;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    cursor: pointer;
    background: none;
    border: none;
}

.mobile-nav-item i {
    font-size: 16px;
}

.mobile-nav-item.active,
.mobile-nav-item:active {
    color: var(--accent-primary);
    background: rgba(59, 107, 53, 0.1);
}

/* ============================================
   RESPONSIVE - Tablet
   ============================================ */

@media (max-width: 1200px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .performance-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */

@media (max-width: 768px) {
    .details-page {
        padding: 1rem 1rem 5rem !important;
    }

    .mobile-bottom-nav {
        display: block;
    }

    .details-hero {
        padding: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    .details-hero::before {
        display: none;
    }

    .details-header-section {
        flex-direction: column;
        gap: 1rem !important;
    }

    .company-symbol-badge {
        font-size: 12px;
        padding: 0.25rem 0.625rem;
    }

    .price-section {
        text-align: left;
        padding-top: 1rem;
        border-top: 1px solid var(--border-primary);
        width: 100%;
        min-width: auto;
    }

    .current-price {
        font-size: 2.25rem !important;
        margin-bottom: 0.5rem !important;
    }

    .company-name {
        font-size: 1.375rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
    }

    .company-meta {
        gap: 0.375rem !important;
        margin-bottom: 0.75rem !important;
    }

    .company-meta-item {
        padding: 0.2rem 0.5rem;
        font-size: 11px;
    }

    .price-change {
        font-size: 1rem !important;
        justify-content: flex-start;
    }

    .action-buttons {
        flex-direction: row;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .action-btn {
        flex: 1;
        padding: 0.625rem 0.75rem !important;
        font-size: 12px !important;
        justify-content: center;
    }

    .chart-container {
        height: 480px !important;
        margin-bottom: 1rem !important;
        padding: 0.5rem;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .chart-period-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .chart-period-btn {
        flex: 1;
        padding: 0.5rem 0.5rem;
        font-size: 11px;
        text-align: center;
    }

    .yahoo-chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
    }

    .yahoo-chart-controls {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .yahoo-chart-timeframes {
        width: 100%;
        justify-content: space-between;
    }

    .yahoo-chart-canvas-wrapper {
        padding: 0 0.25rem 0.5rem;
    }

    .stats-tabs {
        padding: 0.375rem 0.75rem 0;
    }

    .stats-tab-btn {
        padding: 0.5rem 0.625rem;
        font-size: 10px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.625rem !important;
        padding: 1rem;
    }

    .stat-card {
        padding: 0.875rem !important;
    }

    .stat-label {
        font-size: 10px !important;
        margin-bottom: 0.375rem !important;
    }

    .stat-value {
        font-size: 1.125rem !important;
        line-height: 1.3 !important;
    }

    .performance-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.5rem !important;
        padding: 1rem;
    }

    .performance-card {
        padding: 0.75rem 0.5rem !important;
    }

    .performance-label {
        font-size: 10px !important;
    }

    .performance-value {
        font-size: 0.875rem !important;
    }

    .info-card {
        margin-bottom: 0.75rem !important;
    }

    .info-card-header {
        padding: 0.875rem 1rem;
    }

    .info-card-title {
        font-size: 12px !important;
    }

    .info-rows {
        padding: 0.25rem 1rem 0.75rem;
    }

    .info-row {
        padding: 0.625rem 0;
    }

    .info-label,
    .info-value {
        font-size: 12px;
    }

    .about-details-grid {
        grid-template-columns: 1fr;
    }

    .officers-grid {
        grid-template-columns: 1fr;
    }

    .news-item {
        padding: 0.875rem 1rem;
    }

    .news-title {
        font-size: 12px;
    }

    .analyst-body {
        padding: 1rem;
    }

    .recommendation-gauge {
        flex-direction: column;
        align-items: flex-start;
    }

    .recommendation-label {
        font-size: 1.25rem;
    }

    .earnings-chart {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .performance-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .current-price {
        font-size: 1.875rem !important;
    }

    .company-name {
        font-size: 1.125rem !important;
    }
}

/* Landscape mobile */
@media (max-width: 896px) and (orientation: landscape) {
    .chart-container {
        height: 280px !important;
    }
}

/* ============================================
   EQUITY ANALYSIS STYLES
   ============================================ */

/* --- SMA / Price Action --- */
.sma-signal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.sma-signal.positive { background: rgba(34, 197, 94, 0.1); color: var(--green); }
.sma-signal.negative { background: rgba(239, 68, 68, 0.1); color: var(--red); }
.sma-signal.neutral-signal { background: var(--bg-surface-2); color: var(--text-secondary); }

.sma-signal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.sma-gauges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sma-gauge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: var(--bg-surface-2);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.sma-gauge-label {
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 100px;
}

.sma-gauge-value {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 600;
}

.sma-gauge-pct {
    font-weight: 600;
    min-width: 90px;
    text-align: right;
}
.sma-gauge-pct.positive { color: var(--green); }
.sma-gauge-pct.negative { color: var(--red); }

.sma-cross-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    margin-top: 0.75rem;
}
.sma-cross-alert.positive { background: rgba(34, 197, 94, 0.1); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.2); }
.sma-cross-alert.negative { background: rgba(239, 68, 68, 0.1); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.2); }

#sma-sparkline svg {
    width: 100%;
    max-height: 160px;
}

/* --- Insider Transactions --- */
.insider-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-primary);
    flex-wrap: wrap;
}

.insider-net-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.insider-net-badge.positive { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.insider-net-badge.negative { background: rgba(239, 68, 68, 0.15); color: var(--red); }

.insider-summary-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.insider-table {
    padding: 0.25rem 0;
}

.insider-row {
    display: grid;
    grid-template-columns: 2fr 0.6fr 1fr 0.6fr;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--border-primary);
    font-size: 12px;
    align-items: center;
}
.insider-row:last-child { border-bottom: none; }

.insider-name {
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insider-relation {
    display: block;
    font-size: 10px;
    color: var(--text-tertiary);
    font-weight: 400;
}

.insider-action {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
}
.insider-action.positive { color: var(--green); }
.insider-action.negative { color: var(--red); }

.insider-shares {
    color: var(--text-secondary);
    text-align: right;
    font-family: var(--font-mono);
}

.insider-date {
    color: var(--text-tertiary);
    text-align: right;
}

/* --- News Sentiment --- */
.news-sentiment-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    width: 100%;
    flex-wrap: wrap;
}

.news-velocity {
    font-size: 11px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.news-sentiment-label {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.news-sentiment-label.positive { color: var(--green); }
.news-sentiment-label.negative { color: var(--red); }
.news-sentiment-label.neutral-signal { color: var(--text-secondary); }

.news-sentiment-gauge {
    position: relative;
    width: 80px;
    height: 6px;
    background: var(--bg-surface-3);
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.news-sentiment-gauge-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 3px;
}
.news-sentiment-gauge-fill.positive { background: var(--green); }
.news-sentiment-gauge-fill.negative { background: var(--red); }
.news-sentiment-gauge-fill.neutral-signal { background: var(--text-tertiary); }

.news-sentiment-gauge-center {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: var(--text-tertiary);
    border-radius: 1px;
}

/* --- Peer Comparison Table --- */
.peer-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.peer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.peer-table th {
    text-align: left;
    padding: 0.625rem 0.75rem;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border-primary);
    white-space: nowrap;
}

.peer-table td {
    padding: 0.625rem 0.75rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-primary);
    font-family: var(--font-mono);
    font-size: 12px;
    white-space: nowrap;
}

.peer-table tr:last-child td { border-bottom: none; }

.peer-table tr.peer-current {
    background: rgba(59, 107, 53, 0.06);
}

.peer-symbol {
    font-weight: 600;
    color: var(--text-white) !important;
    font-family: inherit !important;
}

.peer-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    margin-right: 0.375rem;
}

.peer-summary {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 500;
    border-top: 1px solid var(--border-primary);
}
.peer-summary .positive { color: var(--green); }
.peer-summary .negative { color: var(--red); }

/* --- Sector Flow --- */
.sector-flow-signal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.sector-flow-signal.positive { background: rgba(34, 197, 94, 0.1); color: var(--green); }
.sector-flow-signal.negative { background: rgba(239, 68, 68, 0.1); color: var(--red); }
.sector-flow-signal.neutral-signal { background: var(--bg-surface-2); color: var(--text-secondary); }

.sector-flow-corr {
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.sector-flow-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sector-flow-header,
.sector-flow-row {
    display: grid;
    grid-template-columns: 80px repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 13px;
    align-items: center;
}

.sector-flow-header {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border-primary);
}

.sector-flow-row {
    border-bottom: 1px solid var(--border-primary);
    font-family: var(--font-mono);
}
.sector-flow-row:last-child { border-bottom: none; }

.sector-flow-label {
    font-weight: 600;
    color: var(--text-white);
    font-family: inherit;
}

.sector-flow-diff {
    background: var(--bg-surface-2);
    border-radius: var(--radius-sm);
}

.sector-flow-row .positive { color: var(--green); }
.sector-flow-row .negative { color: var(--red); }

#sector-flow-chart svg {
    width: 100%;
    max-height: 180px;
}

/* --- Responsive: Analysis Sections --- */
@media (max-width: 768px) {
    .sma-gauge-row {
        font-size: 12px;
        padding: 0.5rem 0.75rem;
    }
    .sma-gauge-label { min-width: 80px; }
    .sma-gauge-pct { min-width: 70px; }

    .insider-row {
        grid-template-columns: 1.5fr 0.6fr 1fr 0.6fr;
        font-size: 11px;
        padding: 0.5rem 0.75rem;
    }

    .peer-table td, .peer-table th {
        padding: 0.5rem;
        font-size: 11px;
    }

    .sector-flow-header,
    .sector-flow-row {
        font-size: 12px;
        padding: 0.375rem 0.75rem;
    }

    .news-sentiment-bar {
        gap: 0.5rem;
    }
}
