/* --- GLOBAL VARIABLES & RESET --- */
:root {
    --bg-body: #F3F4F6;
    --bg-nav: #F0EDF9;
    --bg-card: #FFFFFF;
    --text-main: #111827;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    
    /* Chart Colors */
    --chart-teal: #14B8A6;   /* Growth Rate */
    --chart-blue: #3B82F6;   /* Starters */
    --chart-cyan: #38BDF8;   /* Avg Comp */
    --chart-purple: #8B5CF6; /* Total Comp */
    
    /* Specific UI Elements */
    --focus-orange: #F97316;
    --nav-item-hover: #E6E2F1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    padding-bottom: 60px;
}

/* --- NAVIGATION BAR --- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background-color: var(--bg-nav);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    height: 64px;
    font-size: 14px;
    box-shadow: 0 1px 8px 2px rgba(0,0,0,0.12);
    position: sticky;
    top: 0;
    z-index: 9;
}

.nav-left, .nav-center, .nav-right {
    display: flex;
    align-items: center;
}

/* Logo & Team Selector */
.nav-left { gap: 20px; }
.logo-box { font-weight: 700; font-size: 30px; color: black; letter-spacing: -1px; }
.team-selector { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; color: #1F2937; }

.avatar-gradient {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #C2185B, #7B1FA2);
    position: relative;
    display: flex; justify-content: center; align-items: center;
}
.avatar-gradient i { color: rgba(255,255,255,0.6); font-size: 12px; }

/* Nav Links */
.nav-center { gap: 8px; }
.nav-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    text-decoration: none;
    color: #5E5E5E;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-item:hover { background-color: var(--nav-item-hover); }

.nav-item.active {
    background-color: #FFFFFF;
    color: #1A1A1A;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Right Actions */
.nav-right { gap: 16px; }
.search-container {
    display: flex; align-items: center; gap: 8px;
    background-color: rgba(0,0,0,0.05);
    padding: 6px 12px; border-radius: 20px;
    color: #5E5E5E; width: 160px; font-size: 13px;
}
.shortcut-badge { margin-left: auto; background-color: rgba(0,0,0,0.05); padding: 2px 6px; border-radius: 4px; font-size: 11px; }

.icon-btn {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background-color: rgba(0,0,0,0.05); color: #5E5E5E;
    cursor: pointer; position: relative;
    text-decoration: none;
}
.icon-btn:hover { background-color: rgba(0,0,0,0.1); }
.badge {
    position: absolute; top: -2px; right: -2px;
    background-color: #DC2626; color: white;
    font-size: 10px; font-weight: bold;
    width: 16px; height: 16px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    border: 2px solid var(--bg-nav);
}

.user-profile {
    width: 36px; height: 36px; background-color: #D1D5DB; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-weight: 600; font-size: 13px; color: #374151; position: relative;
}
.user-profile::after {
    content: ''; position: absolute; bottom: 0; right: -2px;
    width: 10px; height: 10px; background-color: white; border-radius: 50%;
    border: 2px solid var(--bg-nav);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="%23333" d="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"/></svg>');
    background-size: 6px; background-position: center; background-repeat: no-repeat;
}

/* Sub-Header */
.sub-header {
    padding: 16px 24px;
    color: #6B7280;
    font-size: 13px;
    background: linear-gradient(to bottom, var(--bg-nav) 0%, var(--bg-body) 100%);
}

/* --- DASHBOARD LAYOUT --- */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
}

.grid-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* Card Styles */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.card-header {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 500; color: #374151;
    margin-bottom: 8px;
}
.info-icon { color: #9CA3AF; cursor: pointer; font-size: 12px; }

.big-number {
    font-size: 32px; font-weight: 700; color: #111827;
    margin-bottom: 8px; line-height: 1;
}

.sub-text {
    font-size: 11px; color: #6B7280; margin-bottom: 24px;
}

/* Stats List (Left Column Cards) */
.stats-list {
    margin-top: auto;
    display: flex; flex-direction: column; gap: 8px;
}
.stat-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; font-size: 13px; color: #4B5563;
    border-radius: 6px; background-color: #F9FAFB;
}
.stat-item.highlight {
    background-color: transparent; font-weight: 700; color: #111;
    border-top: 1px solid #E5E7EB; border-radius: 0; padding-top: 12px; margin-top: 4px;
}
.stat-value { font-weight: 600; color: #111827; }

/* Chart Styles */
.chart-wrapper {
    flex-grow: 1; display: flex; align-items: flex-end; position: relative;
    margin-top: 10px;
}
svg { width: 100%; height: 120px; overflow: visible; }
.chart-labels {
    display: flex; justify-content: space-between; margin-top: 12px;
    font-size: 11px; color: #9CA3AF;
}

/* --- ACTION BAR (Orange Focus) --- */
.action-bar {
    margin-bottom: 40px;
    border: 2px solid var(--focus-orange);
    border-radius: 10px;
    padding: 4px; /* Creates the gap between border and button */
    background-color: #F3F4F6;
}

.view-dashboard-btn {
    width: 100%;
    height: 44px;
    background-color: #F3F4F6;
    border: 1px solid transparent;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    gap: 10px;
    font-size: 13px; font-weight: 600; color: #1F2937;
    cursor: pointer; transition: background 0.2s;
}
.view-dashboard-btn:hover { background-color: #E5E7EB; }

/* --- SECTION HEADER --- */
.section-header {
    display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px;
}
.icon-box {
    width: 40px; height: 40px; background-color: #FFF;
    border: 1px solid #E5E7EB; border-radius: 12px;
    display: flex; justify-content: center; align-items: center;
    font-size: 18px; color: #4B5563; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.section-title h2 { font-size: 16px; font-weight: 600; color: #111; margin-bottom: 4px; }
.section-title p { font-size: 12px; color: var(--text-secondary); }

/* Helper for flags */
.flag-icon { margin-right: 6px; font-size: 14px; }

/* Responsive */
@media (max-width: 1024px) {
    .nav-center span { display: none; }
    .grid-row { grid-template-columns: 1fr; }
    .chart-wrapper svg { height: 150px; }
}