/* ─── TOKENS ─── */
:root {
  --bg:     #f8f9fa;
  --white:  #ffffff;
  --dark:   #111827;
  --text:   #6b7280;
  --border: #e5e7eb;
  --blue:   #0066ff;
  --font:   'Inter', Arial, sans-serif;
  --sidebar-w: 200px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--dark); -webkit-font-smoothing: antialiased; }

@keyframes relFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── SHELL ─── */
.shell { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo {
  height: 52px; padding: 0 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.sidebar-nav { padding: 12px 8px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar-section-label {
  font-size: 10px; font-weight: 700; color: var(--text); opacity: .6;
  text-transform: uppercase; letter-spacing: .1em; padding: 10px 8px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--text);
  cursor: default; text-decoration: none;
}
.nav-item:hover { background: var(--bg); color: var(--dark); }
.nav-item.active { background: var(--blue); color: #fff; }
.nav-item.active svg path,
.nav-item.active svg rect,
.nav-item.active svg circle,
.nav-item.active svg line,
.nav-item.active svg polyline { stroke: #fff; }
.nav-item svg { color: var(--blue); flex-shrink: 0; }
.nav-item.danger { color: #ef4444; }
.nav-item.danger:hover { background: #fff5f5; }

/* ─── MAIN ─── */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: var(--white); border-bottom: 1px solid var(--border);
  height: 52px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 10;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-hamburger { display: flex; flex-direction: column; gap: 4px; padding: 4px; }
.topbar-hamburger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; display: block; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.topbar-name { font-size: 13px; font-weight: 600; color: var(--dark); display: flex; align-items: center; gap: 4px; }

/* ─── CONTENT ─── */
.content { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }

/* ─── HEADER ─── */
.rel-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  animation: relFadeUp .4s ease both;
}
.rel-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 800; color: var(--dark);
}
.rel-sub { font-size: 13px; color: var(--text); margin-top: 4px; margin-left: 30px; }
.rel-export-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px; border: none;
  background: var(--blue); color: #fff;
  font-size: 13px; font-weight: 700; font-family: var(--font); cursor: default;
}

/* ─── FILTERS ─── */
.rel-filters {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 20px;
  animation: relFadeUp .4s .1s ease both;
}
.rel-filter-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 14px;
}
.rel-filter-row { display: flex; align-items: flex-end; gap: 12px; }
.rel-filter-group { flex: 0 0 180px; }
.rel-filter-label-sm { font-size: 10px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.rel-select {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--white); font-size: 13px; color: var(--dark); cursor: default;
}
.rel-date-range {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--white); font-size: 13px; color: var(--text); cursor: default;
  flex: 1;
}

/* ─── SECTION TITLE ─── */
.rel-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--dark);
  animation: relFadeUp .4s .2s ease both;
}

/* ─── KPI GRID ─── */
.rel-kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  animation: relFadeUp .4s .25s ease both;
}
.rel-kpi {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
}
.rel-kpi-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.rel-kpi-label { font-size: 10px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .06em; }
.rel-kpi-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rel-kpi-val { font-size: 24px; font-weight: 800; color: var(--dark); line-height: 1.1; margin-bottom: 6px; }
.rel-kpi-trend { font-size: 11px; font-weight: 600; }
.rel-kpi-trend.up     { color: #10b981; }
.rel-kpi-trend.neutral{ color: var(--text); }

/* ─── CHARTS ─── */
.rel-charts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  animation: relFadeUp .4s .35s ease both;
}
.rel-chart-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 22px;
}
.rel-chart-title { font-size: 14px; font-weight: 700; color: var(--dark); }
.rel-chart-sub { font-size: 11px; color: var(--text); margin-top: 2px; margin-bottom: 16px; }
.rel-line-chart { width: 100%; height: 120px; display: block; }
.rel-chart-labels {
  display: flex; justify-content: space-between;
  margin-top: 8px; font-size: 10px; color: var(--text); font-weight: 600;
}
.rel-pie-wrap { display: flex; align-items: center; gap: 24px; margin-top: 4px; }
.rel-pie-legend { display: flex; flex-direction: column; gap: 10px; }
.rel-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--dark); }
.rel-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
