/* ============================================
   GLOBAL STYLES & VARIABLES
   ============================================ */

/* CSS Variables (like Python variables!) */
:root {
    --primary-color: #1f77b4;
    --secondary-color: #2ca02c;
    --danger-color: #d62728;
    --warning-color: #ff7f0e;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #e1e8ed;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

/* Reset default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Container for centered content */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER SECTION
   ============================================ */

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 0;
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ============================================
   NAVIGATION TABS
   ============================================ */

.tabs-container {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--border-color);
}

.tabs {
    display: flex;
    gap: 10px;
    padding: 15px 0;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
}

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

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    padding: 30px 0;
}

.company-selector {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.company-selector label {
    font-weight: 600;
    font-size: 1.1rem;
}

.dropdown {
    padding: 10px 15px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    min-width: 250px;
    transition: border-color 0.3s;
}

.dropdown:hover {
    border-color: var(--primary-color);
}

.dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(31, 119, 180, 0.1);
}

/* ============================================
   CONTENT GRID (2 COLUMNS)
   ============================================ */

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

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

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

/* ============================================
   CARD COMPONENTS
   ============================================ */

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

/* ============================================
   NEWS LIST STYLING
   ============================================ */

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

.news-item {
    padding: 15px;
    background: var(--bg-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
    transition: transform 0.2s;
}

.news-item:hover {
    transform: translateX(5px);
    background: #e8f4ff;
}

.news-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.news-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.news-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.news-link:hover {
    text-decoration: underline;
}

/* ============================================
   DOCUMENTS LIST STYLING
   ============================================ */

.docs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-item {
    padding: 12px;
    background: linear-gradient(135deg, #e7f3ff 0%, #f0f8ff 100%);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.doc-item:hover {
    background: linear-gradient(135deg, #d4e8ff 0%, #e3f2ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.doc-title {
    font-weight: 500;
    color: var(--text-dark);
}

.doc-type {
    font-size: 0.85rem;
    color: var(--text-light);
    background: white;
    padding: 4px 12px;
    border-radius: 12px;
}

.doc-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* ============================================
   METRICS GRID (KPI Cards)
   ============================================ */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.metric-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
}

.metric-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.metric-change {
    font-size: 0.9rem;
    font-weight: 600;
}

.metric-change.positive {
    color: #2ecc71;
}

.metric-change.negative {
    color: #e74c3c;
}

/* ============================================
   AUTO-SCROLLING NEWS TICKER
   ============================================ */

.ticker-card {
    height: 300px;
    overflow: hidden;
}

.news-ticker {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    animation: scroll 30s linear infinite;
}

.ticker-content:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.ticker-item {
    padding: 12px;
    margin-bottom: 10px;
    background: var(--bg-color);
    border-left: 3px solid var(--danger-color);
    border-radius: 4px;
}

/* ============================================
   LOADING & PLACEHOLDER STYLES
   ============================================ */

.loading {
    text-align: center;
    color: var(--text-light);
    padding: 20px;
    font-style: italic;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--text-dark);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
}

.footer p {
    margin: 8px 0;
}

/* ============================================
   RESPONSIVE DESIGN (Mobile/Tablet)
   ============================================ */

@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .tabs {
        justify-content: flex-start;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .company-selector {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dropdown {
        width: 100%;
    }
}
