/* AI INSIGHT ENGINE STYLES */

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-tertiary: #1a1a3a;
    --aurora-1: #7c3aed;
    --aurora-2: #a855f7;
    --aurora-3: #c084fc;
    --aurora-4: #06b6d4;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

.demo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(18, 18, 42, 0.9);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    font-size: 1.5rem;
    color: var(--aurora-2);
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.product-name {
    color: var(--text-muted);
    padding-left: 0.75rem;
    border-left: 1px solid rgba(168, 85, 247, 0.3);
}

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

.source-select {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
}

.btn-primary {
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
}

.dashboard {
    padding: 1.5rem 2rem;
    padding-bottom: 80px;
}

/* Query Section */
.query-section {
    margin-bottom: 1.5rem;
}

.query-bar {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px;
    padding: 0.5rem;
}

.query-icon {
    padding: 0 1rem;
    font-size: 1.25rem;
}

.query-bar input {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
}

.query-bar input:focus {
    outline: none;
}

.query-bar button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(168, 85, 247, 0.1);
}

.stat-icon {
    font-size: 2rem;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-change {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.stat-change.positive {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.stat-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chart-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid rgba(168, 85, 247, 0.1);
}

.chart-card.wide {
    grid-column: span 1;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-header h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.chart-period {
    padding: 0.4rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8rem;
}

.line-chart {
    width: 100%;
    height: 150px;
}

.chart-line {
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Products List */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.product-row .product-name {
    width: 80px;
}

.product-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.product-bar div {
    height: 100%;
    background: linear-gradient(90deg, var(--aurora-1), var(--aurora-2));
    border-radius: 4px;
}

.product-value {
    width: 60px;
    text-align: right;
    color: var(--aurora-3);
}

/* Pie Chart */
.pie-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pie-chart {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--aurora-2) 0% 45%, var(--aurora-4) 45% 80%, #64748b 80% 100%);
    position: relative;
}

.pie-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    width: 70%;
    height: 70%;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.pie-center small {
    font-size: 0.6rem;
    font-weight: 400;
    color: var(--text-muted);
}

.pie-legend {
    font-size: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.enterprise {
    background: var(--aurora-2);
}

.dot.mid {
    background: var(--aurora-4);
}

.dot.startup {
    background: #64748b;
}

/* Insights */
.insights-section {
    margin-bottom: 2rem;
}

.insights-section h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.insight-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.25rem;
    border-left: 3px solid var(--aurora-2);
}

.insight-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.insight-card p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Demo Banner */
.demo-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2));
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.demo-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
}