:root {
    /* Color Palette - Premium Sea & Sky */
    --primary-color: #0c4a6e; /* Deep Ocean Blue */
    --primary-light: #00a5cf; /* Vibrant Azure */
    --primary-vibrant: #70e000; /* Energy Green for highlights */
    --primary-lightest: #f0f9ff;
    
    --bg-main: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.7);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #94a3b8;
    
    --border-color: rgba(226, 232, 240, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    
    --trend-up: #10b981;
    --trend-up-bg: #ecfdf5;
    --trend-down: #ef4444;
    --trend-down-bg: #fef2f2;

    /* Shadow & Border Radius */
    --shadow-premium: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
    
    --radius-md: 14px;
    --radius-lg: 20px;
    
    /* Layout */
    --sidebar-width: 260px;
    --header-height: 80px;

    /* Animations */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* =========================================
   Sidebar
   ========================================= */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-sidebar {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
}

.logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-size: 1.25rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
}

.logo i {
    margin-right: 10px;
    font-size: 1.5rem;
}

.nav-menu {
    padding: 24px 12px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--primary-lightest);
    color: var(--primary-color);
}

.sidebar-footer {
    padding: 24px 12px;
    border-top: 1px solid var(--border-color);
}

/* =========================================
   Main Content & Header
   ========================================= */
.view-section {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: none;
}

.view-section.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.top-header {
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 80;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.search-container {
    position: relative;
    width: 400px;
}

.search-container .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

#globalSearch {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#globalSearch:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-lightest);
    background-color: white;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-button {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.icon-button:hover { color: var(--primary-color); }

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-lightest);
    cursor: pointer;
}

/* =========================================
   Dashboard Content
   ========================================= */
.dashboard-content {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.dashboard-header {
    margin-bottom: 24px;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

.date-display {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
}

/* AI Insights Banner */
.ai-insights-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, #003554 100%);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 40px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    box-shadow: var(--shadow-premium);
    animation: fadeInSlideUp 0.6s ease-out;
    transition: var(--transition-smooth);
}

.ai-insights-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.2;
    pointer-events: none;
}

.ai-insights-content { max-width: 70%; }

.ai-insights-content h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-insights-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
}

.primary-btn {
    padding: 12px 24px;
    background-color: white;
    color: var(--primary-color);
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

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

.section-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.view-all {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.badge.live {
    background-color: #fee2e2;
    color: #ef4444;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* News Cards (Masonry replacement) */
.news-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.news-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-light);
}

.news-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: var(--primary-lightest);
    color: var(--primary-color);
    display: inline-block;
    width: fit-content;
    margin-bottom: 12px;
    font-weight: 600;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    flex-grow: 1;
}

.news-summary {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
}

/* Index Cards */
.index-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.index-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.index-card:hover {
    box-shadow: var(--shadow-premium);
    transform: translateY(-2px);
}

.index-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.index-header h4 {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.trend {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend.up { background: var(--trend-up-bg); color: var(--trend-up); }
.trend.down { background: var(--trend-down-bg); color: var(--trend-down); }

.index-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Mock Charts using CSS Gradients */
.mock-chart {
    height: 60px;
    width: 100%;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.mock-chart::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; top: 0;
}

.chart-up::after {
    background: linear-gradient(to right, transparent, rgba(16, 185, 129, 0.2));
    border-bottom: 3px solid var(--trend-up);
    clip-path: polygon(0 100%, 0 60%, 20% 50%, 40% 70%, 60% 40%, 80% 30%, 100% 10%, 100% 100%);
}

.chart-down::after {
    background: linear-gradient(to right, transparent, rgba(239, 68, 68, 0.2));
    border-bottom: 3px solid var(--trend-down);
    clip-path: polygon(0 100%, 0 20%, 20% 40%, 40% 30%, 60% 60%, 80% 50%, 100% 80%, 100% 100%);
}

/* =========================================
   News Issue View Styles
   ========================================= */
.trending-keywords {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 16px 24px;
    background: var(--primary-lightest);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.keyword-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.keyword-tag {
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 4px 8px;
    border-radius: 6px;
}

.keyword-tag:hover {
    color: var(--primary-light);
    background: white;
}
.news-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* =========================================
   Freight Index View Styles
   ========================================= */
.index-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
}

.index-tab {
    padding: 12px 24px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.index-tab:hover { color: var(--primary-color); }
.index-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.large-chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.chart-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header-row h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.chart-actions {
    display: flex;
    gap: 8px;
    background: var(--bg-main);
    padding: 4px;
    border-radius: 20px;
}

.chart-actions button {
    padding: 6px 16px;
    border-radius: 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.chart-actions button:hover, .chart-actions button.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.mock-large-chart {
    height: 350px;
    width: 100%;
    margin-top: 20px;
    position: relative;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.chart-line-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
}

.line-graph {
    width: 100%;
    height: 100%;
    display: block;
}

.ai-chart-analysis {
    background: linear-gradient(135deg, var(--primary-lightest), white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}

.ai-chart-analysis h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-chart-analysis p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
}

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

.index-grid-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.index-card-small {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition-smooth);
}

.index-card-small:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    background: white;
}

.index-card-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.index-card-value {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.secondary-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.secondary-btn:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* =========================================
   Floating AI Panel
   ========================================= */
.ai-chat-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -10px 0 40px rgba(0,0,0,0.08);
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--glass-border);
    transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-chat-panel.active { right: 0; }

.chat-header {
    height: var(--header-height);
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: var(--primary-color);
    color: white;
}

.chat-title { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.1rem; }

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.close-btn:hover { opacity: 1; }

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-main);
}

.message {
    max-width: 85%;
    padding: 16px 20px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    animation: fadeInSlideUp 0.3s ease-out;
}

.message.ai {
    background: white;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
    color: var(--text-primary);
}

.message.user {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-bottom-right-radius: 4px;
    margin-left: auto;
    box-shadow: 0 4px 12px rgba(12, 74, 110, 0.2);
}

.ai-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-lightest);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.chat-input-area {
    padding: 20px 24px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.chat-input-area input {
    flex: 1;
    padding: 16px 24px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 0.95rem;
    background: var(--bg-main);
    transition: var(--transition-smooth);
}
.chat-input-area input:focus { 
    outline: none; 
    border-color: var(--primary-light); 
    background: white;
    box-shadow: 0 0 0 4px var(--primary-lightest);
}

.chat-input-area button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
}
.chat-input-area button:hover { transform: scale(1.05); }

/* Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
    display: none;
    backdrop-filter: blur(2px);
}
.overlay.active { display: block; }

/* =========================================
   Responsive Design
   ========================================= */
/* Animations */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-section.active .dashboard-header {
    animation: fadeInSlideUp 0.5s ease-out;
}

.view-section.active .grid-column {
    animation: fadeInSlideUp 0.7s ease-out;
}

@media (max-width: 1024px) {
    .grid-layout { grid-template-columns: 1fr; }
    .ai-insights-banner { flex-direction: column; align-items: flex-start; gap: 24px; padding: 32px; }
    .ai-insights-content { max-width: 100%; }
    .ai-insights-banner .primary-btn { width: 100%; }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px; /* Hide completely */
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }
    .sidebar.active { transform: translateX(280px); }
    
    .close-sidebar { display: block; }
    
    .mobile-menu-toggle { display: block; }
    .top-header { padding: 0 20px; height: 70px; }
    
    .search-container { display: none; }
    
    .dashboard-content { padding: 20px 16px; }
    .dashboard-header h1 { font-size: 1.5rem; }
    
    .ai-insights-banner { padding: 24px; }
    .ai-insights-content h2 { font-size: 1.2rem; }
    .ai-insights-content p { font-size: 0.9rem; }
    
    .index-value { font-size: 1.75rem; }
    
    .ai-chat-panel { width: 100%; right: -100%; }
    .ai-chat-panel.active { right: 0; }

    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-setup {
        flex-direction: column;
        text-align: center;
    }
    
    .settings-actions {
        flex-direction: column-reverse;
    }
    .settings-actions button { width: 100%; }
}

@media (max-width: 480px) {
    .top-header { padding: 0 16px; }
    .user-actions { gap: 12px; }
    .nav-menu { padding: 16px 8px; }
    .nav-item { padding: 10px 12px; font-size: 0.9rem; }
    
    .large-chart-card { padding: 16px; }
    .chart-header-row { flex-direction: column; align-items: flex-start; gap: 12px; }
    .chart-actions { width: 100%; justify-content: space-between; }
    .chart-actions button { flex: 1; padding: 6px 4px; font-size: 0.8rem; }
}

/* ==============================
   Settings View Styles
   ============================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.settings-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.settings-card.full-width {
    grid-column: 1 / -1;
}

.settings-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.profile-setup {
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-avatar-large {
    position: relative;
    width: 100px;
    height: 100px;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.avatar-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.profile-info-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.input-group input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.interest-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tag-chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(13, 138, 188, 0.1);
    border: 1px solid rgba(13, 138, 188, 0.2);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.tag-chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(13, 138, 188, 0.3);
}

.theme-selection {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.theme-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.theme-option.active {
    border-color: var(--primary-color);
    background: rgba(13, 138, 188, 0.05);
}

.theme-preview {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.theme-preview.light { background: #f8fafc; }
.theme-preview.dark { background: #0f172a; }
.theme-preview.system { background: linear-gradient(135deg, #f8fafc 50%, #0f172a 50%); }

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
    padding: 24px;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}
/* =========================================
   Login & OAuth UI
   ========================================= */
.login-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, #003554 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card-container {
    background: white;
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 440px;
    text-align: center;
}

.login-logo {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-header p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.social-login-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
    width: 100%;
    text-decoration: none;
}

.social-btn.google {
    background: white;
    color: #3c4043;
}

.social-btn.kakao {
    background: #FEE500;
    color: #000000;
    border: none;
}

.social-btn.naver {
    background: #03C75A;
    color: white;
    border: none;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    margin-bottom: 32px;
    font-size: 0.85rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider:not(:empty)::before { margin-right: 1.5rem; }
.divider:not(:empty)::after { margin-left: 1.5rem; }

/* Provider Mock Screen */
.provider-page {
    background-color: #f3f4f6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
}

.provider-logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.google-text { color: #4285F4; }
.google-text span:nth-child(2) { color: #EA4335; }
.google-text span:nth-child(3) { color: #FBBC05; }
.google-text span:nth-child(4) { color: #34A853; }

.provider-card {
    background: white;
    border: 1px solid #dadce0;
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    padding: 36px 40px;
    text-align: center;
}

.account-selector {
    margin-top: 32px;
    text-align: left;
    border-top: 1px solid #eee;
}

.account-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.account-item:hover { background: #f8f9fa; }

.account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.account-info {
    flex: 1;
}

.account-name {
    font-weight: 600;
    color: #202124;
    font-size: 0.95rem;
}

.account-email {
    color: #5f6368;
    font-size: 0.85rem;
}

/* ==============================
   Data Provenance & Source Styles
   ============================== */
.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.news-source-label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.source-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.source-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.ai-source-origin {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.source-item {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-origin {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.report-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-lightest);
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.report-link:hover {
    background: var(--primary-color);
    color: white;
}

/* AI Enhancements UI Styles */
.llm-selector {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 10px;
    outline: none;
    cursor: pointer;
}
.llm-selector option {
    background: white;
    color: var(--text-primary);
}

.chat-disclaimer {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    padding: 8px 16px;
    background: rgba(241, 245, 249, 0.8);
    border-top: 1px solid var(--border-color);
}
.chat-disclaimer i { margin-right: 4px; }

.typing-cursor {
    display: inline-block;
    width: 6px;
    height: 14px;
    background-color: var(--primary-color);
    animation: blink 0.8s infinite;
    vertical-align: middle;
    margin-left: 2px;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.ai-references {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}
.ref-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
}
.ref-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--primary-lightest);
    color: var(--primary-color);
    font-size: 0.75rem;
    margin-right: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.ref-chip:hover {
    background: var(--primary-color);
    color: white;
}

.ai-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
}
.ai-feedback {
    display: flex;
    gap: 8px;
}
.feedback-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
}
.feedback-btn:hover { color: var(--primary-color); }

.report-generate-btn {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: all 0.2s;
}
.report-generate-btn:hover {
    background: var(--primary-lightest);
    border-color: var(--primary-light);
}

/* Report Modal Override */
.report-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}
.report-modal-overlay.active { display: flex; }

.report-modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 450px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    animation: fadeInSlideUp 0.3s ease-out;
}
.report-modal-header {
    background: var(--primary-color);
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.report-modal-header h3 { font-size: 1.1rem; font-weight: 600; display:flex; gap: 8px; align-items: center; }
.close-report-btn {
    background: none; border: none; color: white; opacity: 0.8; font-size: 1.25rem; cursor: pointer;
}
.close-report-btn:hover { opacity: 1; }
.report-modal-body {
    padding: 32px 24px;
}
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-top: 16px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-light);
    animation: progressAnim 3s ease forwards;
}
@keyframes progressAnim {
    0% { width: 0%; }
    40% { width: 60%; }
    100% { width: 100%; }
}
