.dashboard-layout {
  display: flex; min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg-secondary); border-right: 1px solid var(--border-default);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow: hidden;
}
.sidebar-logo {
  padding: 1.25rem 1.5rem; font-size: 1.1rem; font-weight: 800;
  text-decoration: none; color: var(--text-primary);
  border-bottom: 1px solid var(--border-default);
  display: flex; align-items: center; gap: 0.5rem;
  flex-shrink: 0;
}
.sidebar-logo span { color: var(--primary-500); }
.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.875rem; border-radius: var(--radius-md);
  color: var(--text-secondary); text-decoration: none; font-size: 0.875rem; font-weight: 500;
  transition: all 0.15s;
}
.sidebar-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-link.active { background: rgba(255,107,44,0.1); color: var(--primary-500); }
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-section-label {
  font-size: 0.7rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.75rem 0.875rem 0.25rem;
}
.sidebar-user {
  padding: 1rem 0.75rem; border-top: 1px solid var(--border-default);
  display: flex; align-items: center; gap: 0.75rem;
}
.sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gradient-primary); display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sidebar-user-info { flex: 1; overflow: hidden; }
.sidebar-user-name { font-size: 0.825rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 0.7rem; color: var(--text-muted); }

/* Language switcher in sidebar */
.sidebar-lang {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border-default);
  display: flex; gap: 0.25rem;
}
.sidebar-lang-btn {
  flex: 1; padding: 0.3rem 0.2rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-default); background: transparent;
  color: var(--text-muted); font-size: 0.68rem; font-weight: 700;
  cursor: pointer; transition: all 0.15s; text-align: center; line-height: 1;
}
.sidebar-lang-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.sidebar-lang-btn.active { border-color: var(--primary-500); color: var(--primary-500); background: rgba(255,107,44,0.08); }

/* ── Main content ── */
.main-content {
  flex: 1; min-width: 0;
  padding: 2rem; overflow-y: auto;
}
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.75rem; font-weight: 700; }
.page-header p { color: var(--text-muted); margin-top: 0.25rem; }

/* ── Stats cards ── */
.stat-card {
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-radius: var(--radius-xl); padding: 1.25rem;
}
.stat-card-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card-value { font-size: 2rem; font-weight: 800; margin: 0.25rem 0; }
.stat-card-sub { font-size: 0.8rem; color: var(--text-muted); }
.stat-card-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; margin-bottom: 0.75rem;
}
.stat-card-icon.orange { background: rgba(255,107,44,0.1); color: var(--primary-500); }
.stat-card-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-card-icon.green { background: var(--success-bg); color: var(--success); }
.stat-card-icon.yellow { background: var(--warning-bg); color: var(--warning); }

/* ── Report cards ── */
.report-card {
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-radius: var(--radius-xl); padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.report-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.report-card-title { font-weight: 600; }
.report-card-domain { font-size: 0.8rem; color: var(--text-muted); }
.report-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.score-ring {
  width: 48px; height: 48px; border-radius: 50%;
  background: conic-gradient(var(--primary-500) calc(var(--score, 0) * 1%), var(--bg-elevated) 0);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.score-ring::before {
  content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--bg-secondary);
}
.score-ring-value { position: relative; font-size: 0.7rem; font-weight: 700; }

/* ── Charts grid ── */
#charts-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.75rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .main-content { padding: 1rem; }

  #charts-grid {
    grid-template-columns: 1fr;
  }

  #charts-grid .card {
    min-height: 180px;
  }

  #radar-chart {
    max-height: 220px;
  }

  #timeline-chart {
    max-height: 200px;
  }

  #competitor-chart-wrap {
    overflow: hidden;
  }
}
