/* GEO Dashboard Styles - Dark Theme */

:root {
    --bg-primary: #121212;
    --bg-secondary: #1a1a1a;
    --bg-card: #1e1e1e;
    --bg-card-hover: #252525;
    --bg-elevated: #2a2a2a;

    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;

    --accent-primary: #00A8F3;
    --accent-secondary: #FF6B9D;
    --accent-tertiary: #7C3AED;

    --positive: #10B981;
    --negative: #EF4444;
    --warning: #F59E0B;

    --border-color: #2d2d2d;
    --border-subtle: #333333;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header */
header {
    background: url('/static/contents/banner_background.png') center center / cover no-repeat;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 30px 30px 20px 30px;
    text-align: center;
}

header h1.header-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

header .brand-name {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

header .header-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 0;
}

header #brand-selector,
header #timestamp-selector {
    padding: 8px 14px;
    font-size: 13px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

header #brand-selector {
    min-width: 180px;
}

header #timestamp-selector {
    min-width: 280px;
}

header #brand-selector:hover,
header #timestamp-selector:hover {
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
}

header #brand-selector:focus,
header #timestamp-selector:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 168, 243, 0.15);
}

/* ==========================================================================
   LAYOUT CONTAINER WITH SIDEBAR
   ========================================================================== */

.layout-container {
    display: flex;
    min-height: calc(100vh - 180px);
}

/* Sidebar Navigation */
.sidebar {
    width: 10%;
    min-width: 140px;
    max-width: 180px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    height: calc(100vh - 120px);
    overflow-y: auto;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-card);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
}

.nav-icon {
    font-size: 14px;
    width: 24px;
    text-align: center;
}

.nav-icon.nav-badge {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    color: var(--bg-primary);
}

.nav-icon.nav-badge.v-badge { background: var(--accent-primary); }
.nav-icon.nav-badge.s-badge { background: var(--positive); }
.nav-icon.nav-badge.c-badge { background: #3B82F6; }
.nav-icon.nav-badge.a-badge { background: var(--accent-tertiary); }

/* V-badge now uses new blue accent color */

.nav-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content */
main {
    flex: 1;
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
    overflow-y: auto;
}

/* ==========================================================================
   AI OVERALL SCORE SECTION
   ========================================================================== */

.ai-score-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 20px;
}

.ai-score-layout {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

.ai-score-main {
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 1;
    min-width: 0;
}

.ai-score-circle {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.ai-score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ai-score-circle circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.ai-score-circle circle.bg {
    stroke: var(--bg-elevated);
}

.ai-score-circle circle.progress {
    stroke: var(--accent-primary);
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s ease-out, stroke 0.3s ease;
}

.ai-score-circle circle.progress.good {
    stroke: var(--positive);
}

.ai-score-circle circle.progress.warning {
    stroke: var(--warning);
}

.ai-score-circle circle.progress.bad {
    stroke: var(--negative);
}

.ai-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.ai-score-value .score-number {
    font-size: 38px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.ai-score-value .score-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.ai-score-info {
    flex: 1;
}

.ai-score-info h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.ai-score-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.ai-score-description strong {
    color: var(--accent-primary);
    font-weight: 600;
}

.dimension-list {
    margin: 8px 0 0 0;
    padding-left: 20px;
    list-style: none;
}

.dimension-list li {
    position: relative;
    padding: 2px 0;
    font-size: 12px;
}

.dimension-list li::before {
    content: "-";
    position: absolute;
    left: -12px;
    color: var(--text-muted);
}

/* Methodology link */
.methodology-link {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.methodology-link a {
    color: var(--accent-primary);
    text-decoration: none;
}

.methodology-link a:hover {
    text-decoration: underline;
}

.methodology-link sup {
    font-size: 8px;
    vertical-align: super;
}

/* VSCA TM superscript in title */
.ai-score-info h2 sup {
    font-size: 10px;
    vertical-align: super;
}

/* ==========================================================================
   VSCA DIMENSION CARDS
   ========================================================================== */

.vsca-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
}

.vsca-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    gap: 16px;
}

.vsca-header:hover {
    background: var(--bg-card-hover);
}

/* Drop cap styling for VSCA dimension headers */
.vsca-header-content h3 {
    display: block;
}

.vsca-header-content h3::first-letter {
    float: left;
    font-size: 3.6em;
    font-weight: 700;
    line-height: 0.7;
    margin-right: 8px;
    margin-top: -2px;
    color: var(--accent-primary);
}

/* Sentiment dimension keeps green drop cap */
#sentiment-section .vsca-header-content h3::first-letter {
    color: var(--positive);
}

/* Competitiveness dimension uses blue */
#competitiveness-section .vsca-header-content h3::first-letter {
    color: #3B82F6;
}

/* Authority dimension uses purple */
#authority-section .vsca-header-content h3::first-letter {
    color: var(--accent-tertiary);
}

/* Hide the old badge */
.vsca-badge {
    display: none;
}

.vsca-header-content {
    flex: 1;
    min-width: 0;
}

.vsca-header-content h3 {
    margin: 0 0 2px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.vsca-desc {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.vsca-key-metric {
    text-align: center;
    padding: 0 16px;
}

.vsca-key-metric.dual-metric {
    display: flex;
    gap: 24px;
}

.vsca-key-metric .metric-value {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.vsca-key-metric .metric-label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vsca-toggle {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.vsca-card.collapsed .vsca-toggle {
    transform: rotate(-90deg);
}

.vsca-content {
    padding: 0 20px 20px 20px;
    border-top: 1px solid var(--border-color);
    display: block;
}

.vsca-card.collapsed .vsca-content {
    display: none;
}

/* VSCA Top Row */
.vsca-top-row {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.vsca-top-row.ratio-3-7 > .vsca-metrics-row {
    flex: 3;
    padding: 0;
    border-bottom: none;
    margin-bottom: 0;
    justify-content: center;
    align-items: center;
}

.vsca-top-row.ratio-3-7 > .vsca-summary {
    flex: 7;
}

.vsca-top-row.ratio-4-6 > .vsca-left-section,
.vsca-top-row.ratio-4-6 > .vsca-metrics-row {
    flex: 4;
    padding: 0;
    border-bottom: none;
    margin-bottom: 0;
}

.vsca-top-row.ratio-4-6 > .vsca-summary {
    flex: 6;
}

.vsca-top-row .vsca-summary {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    border-left: 3px solid var(--border-subtle);
}

.vsca-top-row .vsca-summary h4 {
    margin: 0 0 10px 0;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Left section */
.vsca-left-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.vsca-left-section .vsca-metrics-row {
    padding: 0;
    border-bottom: none;
    margin-bottom: 0;
}

/* Mini chart */
.vsca-chart-mini {
    width: 100%;
    height: 160px;
    margin-top: 10px;
}

.vsca-chart-mini canvas {
    max-width: 100%;
    max-height: 100%;
}

/* Sentiment Chart Layout - Ring left, Metrics right */
.sentiment-layout.vsca-left-section {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 30px;
    width: 100%;
}

.sentiment-chart-ring {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.sentiment-chart-ring canvas {
    width: 100% !important;
    height: 100% !important;
}

.sentiment-metrics-stack {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 140px;
}

.sentiment-metric-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sentiment-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
}

.sentiment-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* SOV Chart Custom Layout */
.sov-section {
    margin-top: 16px;
}

.sov-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: center;
}

.sov-chart-container {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin-top: 10px;
    padding-left: 30px;
}

.sov-chart-ring {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.sov-chart-ring canvas {
    width: 100% !important;
    height: 100% !important;
}

.sov-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 16px;
    align-content: center;
}

.sov-legend-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.sov-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 3px;
}

.sov-legend-text {
    font-size: 10px;
    color: var(--text-primary);
    line-height: 1.3;
    max-width: 120px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* VSCA Metrics Row */
.vsca-metrics-row {
    display: flex;
    gap: 32px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.vsca-metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vsca-metric-item .metric-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.vsca-metric-item .metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.vsca-metric-item .metric-desc {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
    max-width: 140px;
    line-height: 1.4;
}

.positive-text { color: var(--positive) !important; }
.negative-text { color: var(--negative) !important; }

/* ==========================================================================
   AI INSIGHTS
   ========================================================================== */

.vsca-insights {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 16px;
    border-left: 3px solid var(--border-subtle);
}

.vsca-insights h4 {
    margin: 0 0 10px 0;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-insights-container {
    margin-top: 16px;
}

.ai-insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-insights-list li {
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    border-bottom: 1px solid var(--border-color);
}

.ai-insights-list li:last-child {
    border-bottom: none;
}

.ai-insights-list li::before {
    content: "\2022";
    color: var(--text-muted);
    font-weight: bold;
    margin-right: 10px;
}

/* Executive Summary Section */
.executive-summary-section {
    flex: 1;
    min-width: 0;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border-radius: 12px;
    border-left: 3px solid var(--border-subtle);
}

.executive-summary-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.executive-summary-section .ai-insights-container {
    margin-top: 0;
}

.executive-summary-section .ai-insights-list li {
    padding: 6px 0;
    font-size: 12px;
}

/* ==========================================================================
   TIME SERIES CHARTS
   ========================================================================== */

.timeseries-container {
    margin-top: 20px;
    padding-top: 16px;
}

.timeseries-container h4 {
    margin: 0 0 16px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.timeseries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.timeseries-header h4 {
    margin: 0;
}

.timeseries-toggle {
    display: flex;
    gap: 16px;
}

.timeseries-toggle label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
}

.timeseries-toggle input[type="radio"] {
    accent-color: var(--accent-primary);
}

#visibility-timeseries-chart,
#sentiment-timeseries-chart,
#competitiveness-timeseries-chart {
    height: 350px;
    max-height: 350px;
}

/* Chart wrapper for legend hint positioning */
.chart-wrapper {
    position: relative;
}

.legend-hint {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 10px;
    color: var(--text-muted);
    font-style: italic;
}

/* Timeseries Scrollbar - Using native range input */
.timeseries-scrollbar {
    display: flex;
    align-items: center;
    margin-top: 12px;
    padding: 8px 0;
    background: transparent;
    /* Width and margin-left are set dynamically by JS to match chart area */
}

.timeseries-scrollbar .scrollbar-label {
    display: none;
}

.timeseries-scrollbar .scrollbar-range {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

/* Webkit (Chrome, Safari, Edge) track */
.timeseries-scrollbar .scrollbar-range::-webkit-slider-runnable-track {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
}

/* Webkit thumb */
.timeseries-scrollbar .scrollbar-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: var(--thumb-width, 60px);
    height: 16px;
    background: var(--accent-primary);
    border-radius: 4px;
    cursor: grab;
    margin-top: -4px;
    transition: background 0.15s ease;
}

.timeseries-scrollbar .scrollbar-range::-webkit-slider-thumb:hover {
    background: #33BBFF;
}

.timeseries-scrollbar .scrollbar-range::-webkit-slider-thumb:active {
    cursor: grabbing;
    background: #0090D9;
}

/* Firefox track */
.timeseries-scrollbar .scrollbar-range::-moz-range-track {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
}

/* Firefox thumb */
.timeseries-scrollbar .scrollbar-range::-moz-range-thumb {
    width: var(--thumb-width, 60px);
    height: 16px;
    background: var(--accent-primary);
    border: none;
    border-radius: 4px;
    cursor: grab;
}

.timeseries-scrollbar .scrollbar-range::-moz-range-thumb:hover {
    background: #33BBFF;
}

.timeseries-scrollbar .scrollbar-range::-moz-range-thumb:active {
    cursor: grabbing;
    background: #0090D9;
}


/* ==========================================================================
   QUALITATIVE SECTIONS
   ========================================================================== */

.qualitative-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.qualitative-section .section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.qualitative-section .section-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.section-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ==========================================================================
   INSIGHTS GRID
   ========================================================================== */

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.insights-grid.two-columns {
    grid-template-columns: 1fr 1fr;
}

.insight-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border-color);
}

.insight-card h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-subtle);
}

.insight-card.win-card h4 {
    color: var(--positive);
    border-bottom-color: var(--positive);
}

.insight-card.lose-card h4 {
    color: var(--negative);
    border-bottom-color: var(--negative);
}

.insight-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin: -8px 0 12px 0;
}

.theme-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 280px;
    overflow-y: auto;
}

.theme-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.theme-list li:last-child {
    border-bottom: none;
}

.theme-list li.no-data {
    color: var(--text-muted);
    font-style: italic;
    justify-content: flex-start;
}

.theme-name {
    flex: 1;
}

.theme-count {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 12px;
    margin-left: 12px;
}

.win-card .theme-count {
    color: var(--positive);
}

.lose-card .theme-count {
    color: var(--negative);
}

/* ==========================================================================
   COMPETITOR TABLE
   ========================================================================== */

.competitor-table-full {
    margin-bottom: 20px;
}

.competitor-table-full h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.table-note {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: right;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-elevated);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

td {
    font-size: 13px;
    color: var(--text-secondary);
}

tr:hover td {
    background: var(--bg-card-hover);
}

tr.highlight td {
    background: rgba(0, 168, 243, 0.1);
}

.compact-table {
    width: 100%;
    font-size: 12px;
    table-layout: fixed;
}

.compact-table th,
.compact-table td {
    padding: 10px 12px;
}

/* Competitor table column widths */
.compact-table th:nth-child(1),
.compact-table td:nth-child(1) {
    width: 5%;  /* Rank */
}

.compact-table th:nth-child(2),
.compact-table td:nth-child(2) {
    width: 35%;  /* Brand */
}

.compact-table th:nth-child(n+3),
.compact-table td:nth-child(n+3) {
    width: 12%;  /* 5 metric columns - equal (12% x 5 = 60%) */
    text-align: center;
}

.competitor-table-container {
    max-height: 300px;
    overflow-y: auto;
}

/* ==========================================================================
   SOURCES SECTION
   ========================================================================== */

.sources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.source-list h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.source-list ul {
    list-style: none;
    padding: 0;
}

.source-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

.source-list li .count {
    color: var(--text-secondary);
    font-weight: 600;
}

.source-list li.no-data {
    color: var(--text-muted);
    font-style: italic;
}

.source-list li .url {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   RECOMMENDATIONS SECTION
   ========================================================================== */

.recommendations-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 24px;
    overflow: hidden;
}

.recommendations-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.recommendations-icon {
    font-size: 24px;
}

.recommendations-header-content h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.recommendations-desc {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.recommendations-content {
    padding: 40px 24px;
}

.coming-soon-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.coming-soon-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.coming-soon-text {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-secondary);
}

.coming-soon-desc {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: var(--text-muted);
    max-width: 400px;
}

/* ==========================================================================
   APPENDIX SECTION
   ========================================================================== */

.appendix-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 24px;
}

.appendix-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: background 0.2s;
}

.appendix-header:hover {
    background: var(--bg-card-hover);
}

.appendix-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.appendix-toggle {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.appendix-section.collapsed .appendix-toggle {
    transform: rotate(-90deg);
}

.appendix-content {
    padding: 20px;
    display: block;
}

.appendix-section.collapsed .appendix-content {
    display: none;
}

.appendix-item {
    margin-bottom: 24px;
}

.appendix-item:last-child {
    margin-bottom: 0;
}

.appendix-item h4 {
    margin: 0 0 6px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Platform Grid */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.platform-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
}

.platform-header {
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.platform-name {
    font-weight: 600;
    display: block;
    font-size: 13px;
    color: var(--text-primary);
}

.market-share {
    font-size: 10px;
    color: var(--text-muted);
}

.platform-metrics {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.platform-metric {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.platform-metric .label {
    color: var(--text-muted);
}

.platform-metric .value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Data Quality Grid */
.data-quality-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.data-quality-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: var(--radius-md);
    text-align: center;
}

.data-quality-item .label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.data-quality-item .value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ==========================================================================
   LANGUAGE SWITCHER
   ========================================================================== */

.language-switcher {
    position: relative;
}

.language-switcher select {
    padding: 8px 12px;
    font-size: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    min-width: 90px;
    transition: all 0.2s;
}

.language-switcher select:hover {
    border-color: var(--accent-primary);
}

.language-switcher select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 168, 243, 0.15);
}

/* ==========================================================================
   TREND INDICATORS
   ========================================================================== */

.trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.trend-positive {
    color: var(--positive);
    background: rgba(16, 185, 129, 0.15);
}

.trend-negative {
    color: var(--negative);
    background: rgba(239, 68, 68, 0.15);
}

.trend-neutral {
    color: var(--text-muted);
    background: rgba(102, 102, 102, 0.15);
}

.trend-indicator .trend-arrow {
    font-size: 10px;
}

.trend-indicator .trend-value {
    font-size: 11px;
}

/* Card with trend */
.card .metric-with-trend {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

.card .metric-with-trend .metric {
    font-size: 32px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

/* ==========================================================================
   NO DATA STATE
   ========================================================================== */

.no-data {
    color: var(--text-muted);
    font-style: italic;
}

/* ==========================================================================
   SCROLLBAR STYLING
   ========================================================================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    header {
        padding: 16px 20px;
    }

    main {
        padding: 16px;
    }

    .ai-score-main {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .ai-score-circle {
        width: 100px;
        height: 100px;
    }

    .ai-score-value .score-number {
        font-size: 32px;
    }

    .ai-score-info {
        text-align: center;
    }

    .sources-grid {
        grid-template-columns: 1fr;
    }

    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .insights-grid {
        grid-template-columns: 1fr;
    }

    .insights-grid.two-columns {
        grid-template-columns: 1fr;
    }

    header .header-controls {
        flex-wrap: wrap;
        gap: 8px;
    }

    header #brand-selector,
    header #timestamp-selector {
        min-width: 140px;
        font-size: 12px;
    }

    .trend-indicator {
        font-size: 10px;
    }

    /* VSCA Cards responsive */
    .vsca-header {
        flex-wrap: wrap;
        padding: 14px 16px;
    }

    .vsca-key-metric {
        width: 100%;
        margin-top: 10px;
        padding: 10px 0 0 52px;
        text-align: left;
    }

    .vsca-key-metric.dual-metric {
        justify-content: flex-start;
    }

    .vsca-metrics-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .vsca-top-row {
        flex-direction: column;
        gap: 16px;
    }

    .vsca-top-row .vsca-summary {
        width: 100%;
    }

    .vsca-left-section {
        width: 100%;
    }

    .vsca-left-section .vsca-chart-mini {
        width: 100px;
        height: 100px;
    }

    .data-quality-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeseries-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Sidebar responsive */
    .layout-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-width: none;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 10px 0;
    }

    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .nav-item {
        padding: 8px 12px;
        border-left: none;
        border-radius: var(--radius-md);
    }

    .nav-item.active {
        border-left: none;
        background: var(--accent-primary);
        color: var(--bg-primary);
    }

    .nav-text {
        display: none;
    }

    .nav-icon {
        margin: 0;
    }

    main {
        width: 100%;
    }
}

#brand-selector, #timestamp-selector { display: none; }

/* ==========================================================================
   DEMO MOSAIC EFFECT
   ========================================================================== */

.demo-mosaic {
    position: relative;
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
}

.demo-mosaic::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(30, 30, 30, 0.3),
        rgba(30, 30, 30, 0.3) 2px,
        transparent 2px,
        transparent 4px
    );
}
