:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --border: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Blobs for Glassmorphism effect */
.background-blobs {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    overflow: hidden;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
}
.blob-1 {
    top: -10%; left: -10%;
    width: 500px; height: 500px;
    background: #4f46e5;
}
.blob-2 {
    bottom: -10%; right: -10%;
    width: 600px; height: 600px;
    background: #0ea5e9;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism Classes */
.glass-nav, .glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}
.logo-box {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    width: 40px; height: 40px;
    display: flex; justify-content: center; align-items: center;
    border-radius: 10px;
    font-weight: 700;
}

.btn-sync {
    background: linear-gradient(135deg, #3b82f6, #4f46e5);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}
.btn-sync:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.dashboard-header {
    margin-bottom: 2rem;
}
.dashboard-header h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}
.dashboard-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.card {
    padding: 1.5rem;
}
.card h3 {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.big-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.chart-container {
    padding: 1.5rem;
    height: 400px;
    display: flex;
    flex-direction: column;
}
.chart-container h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}
.chart-container canvas {
    flex: 1;
    max-height: 100%;
}

.table-container {
    padding: 1.5rem;
}
.table-container h3 {
    margin-bottom: 1rem;
}
.table-scroll {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
}
td {
    font-size: 0.95rem;
}
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}
.badge.Positif { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge.Negatif { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge.Netral { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

/* Modal */
.modal-backdrop {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    padding: 3rem;
    text-align: center;
    max-width: 400px;
}
.loader {
    border: 4px solid rgba(255,255,255,0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px; height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

@media (max-width: 1024px) {
    .charts-grid { grid-template-columns: 1fr; }
}
