/* ============================================
   DASHBOARD — ATENDE DIREITO LIGHT THEME
   Clean SaaS-style · Inter · Gold Accent
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --bg: #f8f9fa;
  --sidebar: #ffffff;
  --surface: #f3f4f6;
  --card: #ffffff;
  --card-hover: #fafbfc;
  --card-featured: linear-gradient(135deg, #faf6f0 0%, #ffffff 100%);
  --input: #f3f4f6;

  --border: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(201, 168, 118, 0.4);
  --divider: rgba(0, 0, 0, 0.04);

  --primary: #c9a876;
  --primary-hover: #b89560;
  --primary-glow: rgba(201, 168, 118, 0.12);
  --accent-blue: #3b82f6;
  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.08);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.08);
  --purple: #7c3aed;
  --cyan: #0891b2;
  --pink: #db2777;

  --text: #121317;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --text-dim: #d1d5db;

  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);

  --sidebar-width: 68px;
  --topbar-height: 68px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === LAYOUT === */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  margin-bottom: 32px;
}
.sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
  background: none;
}

.nav-item:hover {
  color: var(--text-secondary);
  background: var(--surface);
}
.nav-item.active {
  color: var(--primary);
  background: var(--primary-glow);
}

.sidebar-bottom {
  margin-top: auto;
}

.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

/* === TOPBAR === */
.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
}

.search-box:hover {
  border-color: var(--border-hover);
}
.search-box i {
  font-size: 0.85rem;
}
.search-box span {
  color: var(--text-dim);
}

.topbar-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.topbar-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.topbar-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--primary);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  line-height: 1.3;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.date-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* === CONTENT === */
.content {
  padding: 28px 32px 48px;
  max-width: 1500px;
}

/* === SECTION HEADERS === */
.section {
  margin-bottom: 28px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label .count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 2px 8px;
  border-radius: 6px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-group {
  display: flex;
  background: var(--input);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  overflow: hidden;
}

.pill {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  transition: all 0.2s ease;
}

.pill:hover {
  color: var(--text-secondary);
}
.pill.active {
  background: var(--primary);
  color: white;
}

/* === FILTERS === */
.filters-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.filter-chip:hover {
  border-color: var(--border-hover);
  color: var(--text);
}
.filter-chip.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
}
.filter-chip i {
  font-size: 0.75rem;
}

.filter-select {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 28px 7px 12px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239CA3AF' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all 0.2s ease;
}

.filter-select:hover {
  border-color: var(--border-hover);
}
.filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* === CARDS / METRICS === */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: all 0.25s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.metric-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.metric-card.clickable {
  cursor: pointer;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.metric-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.metric-change {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.metric-change.up {
  color: var(--success);
}
.metric-change.down {
  color: var(--danger);
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 6px;
  color: var(--text);
}

.metric-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* === CHART CARDS === */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.charts-row.equal {
  grid-template-columns: 1fr 1fr 1fr;
}

.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.chart-card:hover {
  border-color: rgba(0, 0, 0, 0.1);
}

.chart-card.featured {
  background: var(--card-featured);
  border-color: rgba(201, 168, 118, 0.2);
}

.chart-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.chart-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.chart-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.chart-area {
  position: relative;
  height: 260px;
}
.chart-area.sm {
  height: 200px;
}
.chart-area.tall {
  height: 320px;
}

/* === FEATURED NUMBER === */
.big-number {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.big-number .prefix {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  vertical-align: top;
  margin-right: 2px;
}

.big-pct {
  font-size: 1rem;
  font-weight: 600;
  color: var(--success);
  margin-left: 8px;
}

.big-pct.down {
  color: var(--danger);
}

/* === FUNNEL === */
.funnel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
}

.funnel-step {
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  transition: all 0.2s ease;
  position: relative;
}

.funnel-step:hover {
  filter: brightness(1.03);
  transform: scale(1.01);
}

.funnel-step-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.funnel-step-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.funnel-step-data {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.funnel-step-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.85);
  font-variant-numeric: tabular-nums;
}

.funnel-step-pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.5);
}

.funnel-arrow {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 0 0 0 20px;
}

/* === TABLE === */
.table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-stats {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.table-stat {
  flex: 1;
  padding: 16px 20px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.table-stat:last-child {
  border-right: none;
}

.table-stat-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.table-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.data-table-wrap {
  max-height: 400px;
  overflow-y: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 20px;
  text-align: left;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--divider);
}

.data-table th {
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}
.data-table tbody tr:hover {
  background: var(--primary-glow);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--primary-glow);
  color: var(--primary);
}

/* === RANKING CARDS === */
.ranking-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.ranking-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.ranking-card:hover {
  border-color: rgba(0, 0, 0, 0.1);
}

.ranking-head {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ranking-head i {
  color: var(--primary);
  font-size: 0.85rem;
}

.r-list {
  list-style: none;
}

.r-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  margin-bottom: 4px;
  transition: background 0.15s ease;
  font-size: 0.84rem;
}

.r-item:hover {
  background: var(--surface);
}

.r-pos {
  min-width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--primary-glow);
  color: var(--primary);
}

.r-name {
  flex: 1;
  color: var(--text-secondary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.r-val {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.rank-more {
  text-align: right;
  font-size: 0.72rem;
  color: var(--primary);
  cursor: pointer;
  padding: 6px 0 0;
  font-weight: 600;
  opacity: 0.75;
  transition: opacity 0.2s ease;
  margin-top: 4px;
}
.rank-more:hover {
  opacity: 1;
}

.ranking-head:hover {
  color: var(--primary);
}
.ranking-head:hover i {
  color: var(--primary);
}

/* === HERITAGE / PATRIMÔNIO === */
.heritage-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.heritage-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.hkpi {
  text-align: center;
  padding: 14px 10px;
  background: var(--surface);
  border-radius: var(--radius-sm);
}

.hkpi-val {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hkpi-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.htabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.htab {
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.htab:hover {
  color: var(--text);
  background: var(--surface);
}
.htab.active {
  background: var(--primary);
  color: white;
}

.h-charts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.h-chart-box {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.h-chart-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  text-align: center;
}

.h-chart-box .chart-area {
  height: 200px;
}

.score-pill {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.score-pill.high {
  background: var(--success-bg);
  color: var(--success);
}
.score-pill.med {
  background: var(--warning-bg);
  color: var(--warning);
}
.score-pill.low {
  background: var(--danger-bg);
  color: var(--danger);
}

/* === GROUPS === */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.group-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.group-card:hover {
  border-color: rgba(0, 0, 0, 0.1);
}

.group-name {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.group-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.group-metric {
  text-align: center;
}
.group-metric-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.group-metric-lbl {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.progress-bar {
  width: 100%;
  height: 5px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.progress-fill.ok {
  background: var(--success);
}
.progress-fill.warn {
  background: var(--warning);
}
.progress-fill.full {
  background: var(--danger);
}

/* === MODAL === */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-bg.open {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 90%;
  max-width: 850px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-bg.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.modal-x {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  transition: color 0.15s;
  line-height: 1;
}

.modal-x:hover {
  color: var(--text);
}

.modal-search {
  width: 100%;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  margin-bottom: 16px;
}

.modal-search:focus {
  border-color: var(--primary);
}

/* === LOADING === */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.4s ease;
}

.loading-screen.done {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loader-text {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* === FOOTER === */
.footer {
  text-align: center;
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.18);
}

/* === ANIMATIONS === */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.anim {
  animation: fadeUp 0.45s ease both;
}
.d1 {
  animation-delay: 50ms;
}
.d2 {
  animation-delay: 100ms;
}
.d3 {
  animation-delay: 150ms;
}
.d4 {
  animation-delay: 200ms;
}
.d5 {
  animation-delay: 250ms;
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .charts-row {
    grid-template-columns: 1fr;
  }
  .charts-row.equal {
    grid-template-columns: 1fr 1fr;
  }
  .ranking-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .heritage-kpis {
    grid-template-columns: repeat(3, 1fr);
  }
  .h-charts {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main {
    margin-left: 0;
  }
  .topbar {
    padding: 0 16px;
  }
  .content {
    padding: 16px;
  }
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
  .charts-row.equal {
    grid-template-columns: 1fr;
  }
  .ranking-row {
    grid-template-columns: 1fr;
  }
  .heritage-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .h-charts {
    grid-template-columns: 1fr;
  }
  .table-stats {
    flex-wrap: wrap;
  }
  .table-stat {
    min-width: 33%;
  }
  .htabs {
    flex-wrap: wrap;
  }
  .search-box {
    display: none;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .metric-value {
    font-size: 1.6rem;
  }
  .groups-grid {
    grid-template-columns: 1fr;
  }
}
