* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f4f6f9;
  color: #1e293b;
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
  width: 240px;
  background: #0f172a;
  color: #fff;
  padding: 30px 20px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 40px;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  padding: 12px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: #cbd5e1;
}

.sidebar li.active,
.sidebar li:hover {
  background: #1e293b;
  color: #fff;
}

/* MAIN */

.main {
  flex: 1;
  padding: 30px 40px;
}

/* HEADER */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.header h1 {
  font-size: 24px;
  margin-bottom: 5px;
}

.timestamp {
  font-size: 13px;
  color: #64748b;
}

.filters {
  display: flex;
  gap: 10px;
}

select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.export-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.export-btn:hover {
  background: #1d4ed8;
}

/* KPIS */

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.kpi h3 {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 10px;
}

.kpi .value {
  font-size: 22px;
  font-weight: 600;
}

.primary {
  border-left: 4px solid #2563eb;
}

.growth {
  font-size: 13px;
  margin-top: 6px;
}

.positive {
  color: #16a34a;
}

.negative {
  color: #dc2626;
}

/* CHARTS */

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
}

.chart-card canvas {
  margin-top: 20px;
}

/* MOBILE */

.mobile-topbar {
  display: none;
  justify-content: space-between;
  align-items: center;
  background: #0f172a;
  color: #fff;
  padding: 15px 20px;
}

.menu-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

@media (max-width: 768px) {

  .layout {
    flex-direction: column;
  }

  .mobile-topbar {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    height: 100vh;
    width: 240px;
    background: #0f172a;
    transition: 0.3s ease;
    z-index: 1000;
  }

  .sidebar.active {
    left: 0;
  }

  .desktop-logo {
    display: none;
  }

  .main {
    padding: 20px;
  }
}
