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

:root {
    --primary-blue: #3b82f6;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --success-green: #10b981;
    --danger-red: #ef4444;
    --warning-orange: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--gray-50);
    min-height: 100vh;
    color: var(--gray-900);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== HEADER ===== 
.header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
*/
.header {
    background: linear-gradient(135deg, #283c6f 0%, #1e293b 100%);
    color: white;
    text-align: center;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    position: relative;
    border-bottom: 3px solid #3b82f6;
}


.header-top {
    max-width: 1400px;
    margin: 0 auto;
    /*
    padding: 1rem 1.5rem;*/
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo-section {
    flex-shrink: 0;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 28px;
    height: 28px;
    stroke-width: 2px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--white);
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-center h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}

.header-subtitle {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.separator {
    opacity: 0.5;
}

.app-branding {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    text-decoration: none;
}

.app-branding:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* ===== LIVE COUNTER ===== */
.live-counter {
    position: relative;
    background: var(--white);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 120px;
    text-align: center;
    animation: pulse-subtle 4s infinite ease-in-out;
}

@keyframes pulse-subtle {

    0%,
    100% {
        box-shadow: var(--shadow-lg);
    }

    50% {
        box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -5px rgba(0, 0, 0, 0.08);
    }
}

.live-indicator {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    background: var(--success-green);
    border-radius: 50%;
    border: 2px solid var(--white);
    animation: blink-indicator 2s infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
}

@keyframes blink-indicator {

    0%,
    50% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    51%,
    100% {
        opacity: 0.3;
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

.live-counter .number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1;
    margin-bottom: 0.25rem;
    display: block;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.live-counter .number.updating {
    animation: number-update 0.5s ease;
}

@keyframes number-update {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        color: var(--success-green);
    }
}

.live-counter .label {
    font-size: 0.6875rem;
    color: var(--gray-600);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
}

/* ===== CONTROLS ===== */
.controls {
    background: var(--white);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.date-selector {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.date-selector .icon {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
    color: var(--gray-600);
}

.date-selector label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

select {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: var(--white);
    transition: all 0.2s ease;
    font-weight: 500;
    cursor: pointer;
    outline: none;
}

select:hover {
    border-color: var(--primary-blue);
}

select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.export-btn,
.download-btn {
    padding: 0.625rem 1.25rem;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.export-btn:hover,
.download-btn:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.export-btn .icon,
.download-btn .icon {
    width: 16px;
    height: 16px;
    stroke-width: 2.5px;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.tab {
    flex: 1;
    padding: 0.625rem 0.875rem;
    text-align: center;
    background: var(--white);
    border: none;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border-right: 1px solid var(--gray-200);
    color: var(--gray-600);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.tab:last-child {
    border-right: none;
}

.tab-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
}

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

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--white);
    border-radius: 2px 2px 0 0;
}

.tab:hover:not(.active) {
    background: var(--gray-50);
    color: var(--gray-800);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.stat-card {
    background: var(--white);
    padding: 0.75rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary-blue);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.stat-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.stat-card h3 {
    color: var(--gray-600);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.stat-value {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    line-height: 1;
    letter-spacing: -0.025em;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

.stat-value.updating {
    animation: value-pulse 0.5s ease;
}

@keyframes value-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
        color: var(--primary-blue);
    }
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.625rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.stat-change.positive {
    color: var(--success-green);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.stat-change.positive::before {
    content: '↗';
    font-size: 0.875rem;
}

.stat-change.negative {
    color: var(--danger-red);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.stat-change.negative::before {
    content: '↘';
    font-size: 0.875rem;
}

/* ===== CHANNELS GRID ===== */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.channel-card {
    background: var(--white);
    padding: 0.625rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.channel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-blue);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.channel-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.channel-card:hover::before {
    transform: scaleX(1);
}

.channel-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2px;
    color: var(--primary-blue);
    margin: 0 auto 0.375rem;
}

.channel-value {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

.channel-card:hover .channel-value {
    color: var(--primary-blue);
}

.channel-label {
    font-size: 0.6875rem;
    color: var(--gray-600);
    font-weight: 600;
    letter-spacing: 0.025em;
    line-height: 1.2;
}

/* ===== CHARTS CONTAINER ===== */
.charts-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.chart-container {
    background: var(--white);
    padding: 0.75rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    position: relative;
}

.chart-container.full-width {
    grid-column: 1 / -1;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-100);
}

.chart-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.2;
}

.title-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
    color: var(--primary-blue);
}

.chart-period-selector {
    position: relative;
}

.chart-period-selector select {
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
}

.chart-legend {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-100);
    font-size: 0.6875rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    line-height: 1.2;
}

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

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* ===== TOOLTIP ===== */
.tooltip {
    position: fixed;
    background: rgba(17, 24, 39, 0.95);
    color: var(--white);
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: var(--shadow-lg);
    max-width: 250px;
    backdrop-filter: blur(8px);
}

.tooltip.visible {
    opacity: 1;
}

/* ===== TABLES ===== */
.data-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.table-container {
    background: var(--white);
    padding: 0.75rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.table-container.full-width {
    grid-column: 1 / -1;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

thead th {
    padding: 0.5rem 0.625rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--gray-200);
    line-height: 1.2;
}

tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: var(--gray-50);
}

tbody td {
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
    color: var(--gray-700);
    line-height: 1.3;
}

tbody td:first-child {
    font-weight: 600;
    color: var(--gray-900);
}

/* ===== BUTTONS ===== */
.location-btn {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.location-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue));
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.location-btn .icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--white);
    margin: 3% auto;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    width: 85%;
    max-width: 900px;
    max-height: 85vh;
    position: relative;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-content p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--gray-100);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.modal-close svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
}

.region-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.region-card {
    background: var(--gray-50);
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.3s ease;
}

.region-card:hover {
    background: var(--white);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.region-name {
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.region-stats {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.channel-detail-section {
    margin-bottom: 2rem;
}

.channel-detail-section h3 {
    color: var(--gray-900);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-200);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.875rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-100);
}

.detail-item .label {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

.detail-item .value {
    font-weight: 700;
    color: var(--gray-900);
}

.keyword-list {
    list-style: none;
    padding: 0;
}

.keyword-list li {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(16, 185, 129, 0.05);
    border-left: 3px solid var(--success-green);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--gray-700);
}

/* ===== SANKEY CONTAINER ===== */
.sankey-container {
    width: 100%;
    height: 350px;
    overflow: auto;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    padding: 1rem;
    box-shadow: var(--shadow);
    position: relative;
    margin: 1rem 0;
}

#sankeyChart {
    display: block;
    margin: 0 auto;
    min-width: 250px;
    min-height: 300px;
    max-width: 500px;
    max-height: 400px;
    cursor: pointer;
    border-radius: var(--radius);
}

#trafficChart {
    display: block;
    margin: 0 auto;
    min-width: auto;
    min-height: auto;
     max-width: 900px;
    max-height: 430px;
    cursor: pointer;
    border-radius: var(--radius);
}

#deviceChart {
    display: block;
    margin: 0 auto;
    min-width: auto;
    min-height: auto;
    max-width: 300px;
    max-height: 380px;
    cursor: pointer;
    border-radius: var(--radius);
}


.sankey-container::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

.sankey-container::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius);
}

.sankey-container::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius);
    border: 2px solid var(--gray-100);
}

.sankey-container::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.sankey-container {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) var(--gray-100);
}

.scroll-indicator {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: rgba(59, 130, 246, 0.95);
    color: var(--white);
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    box-shadow: var(--shadow);
}

.sankey-container:hover .scroll-indicator {
    opacity: 1;
}

.sankey-instructions {
    margin-top: 1rem;
    padding: 0.875rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary-blue);
    font-size: 0.8125rem;
    color: var(--gray-600);
    text-align: center;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 1rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--gray-800);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.footer-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.footer-title {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
    line-height: 1.2;
}

.footer-subtitle {
    font-size: 0.6875rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    line-height: 1.2;
}

/* ===== ICON HELPERS ===== */
.icon {
    stroke-width: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .header-top {
        flex-direction: column;
        gap: 1.5rem;
    }

    .live-counter {
        position: static;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .data-tables {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-direction: column;
    }

    .tab {
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }

    .tab:last-child {
        border-bottom: none;
    }

    .sankey-container {
        height: 350px;
        padding: 0.75rem;
    }

    #sankeyChart {
        min-width: 700px;
        min-height: 350px;
    }
}

@media (max-width: 480px) {
    .header-center h1 {
        font-size: 1.5rem;
    }

    .sankey-container {
        height: 300px;
    }

    #sankeyChart {
        min-width: 600px;
        min-height: 280px;
    }
}

/* ===== ANIMATIONS TEMPS RÉEL ===== */
@keyframes data-refresh {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.refreshing {
    animation: data-refresh 0.5s ease;
}

/* Indicateur de mise à jour en temps réel */
.updating-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--success-green);
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
    margin-left: 0.5rem;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(1.2);
    }
}

.stat-card {
    background: var(--white);
    padding: 0.75rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card[onclick] {
    cursor: pointer;
}

.stat-card[onclick]:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--primary-blue);
}

.stat-card[onclick]:hover::before {
    opacity: 1;
}